#!/usr/bin/env node

exports.id = 394;
exports.ids = [394];
exports.modules = {

/***/ 228929:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "RQ": () => (/* reexport */ AbiCoder),
  "_R": () => (/* reexport */ fragments_ParamType)
});

// UNUSED EXPORTS: ConstructorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, Indexed, Interface, LogDescription, TransactionDescription, checkResultErrors, defaultAbiCoder

// EXTERNAL MODULE: ./node_modules/bn.js/lib/bn.js
var bn = __webpack_require__(213550);
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/logger/lib.esm/_version.js
const version = "logger/5.0.6";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/logger/lib.esm/index.js

let _permanentCensorErrors = false;
let _censorErrors = false;
const LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 };
let _logLevel = LogLevels["default"];

let _globalLogger = null;
function _checkNormalize() {
    try {
        const missing = [];
        // Make sure all forms of normalization are supported
        ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => {
            try {
                if ("test".normalize(form) !== "test") {
                    throw new Error("bad normalize");
                }
                ;
            }
            catch (error) {
                missing.push(form);
            }
        });
        if (missing.length) {
            throw new Error("missing " + missing.join(", "));
        }
        if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) {
            throw new Error("broken implementation");
        }
    }
    catch (error) {
        return error.message;
    }
    return null;
}
const _normalizeError = _checkNormalize();
var LogLevel;
(function (LogLevel) {
    LogLevel["DEBUG"] = "DEBUG";
    LogLevel["INFO"] = "INFO";
    LogLevel["WARNING"] = "WARNING";
    LogLevel["ERROR"] = "ERROR";
    LogLevel["OFF"] = "OFF";
})(LogLevel || (LogLevel = {}));
var ErrorCode;
(function (ErrorCode) {
    ///////////////////
    // Generic Errors
    // Unknown Error
    ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
    // Not Implemented
    ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED";
    // Unsupported Operation
    //   - operation
    ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION";
    // Network Error (i.e. Ethereum Network, such as an invalid chain ID)
    //   - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown)
    ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
    // Some sort of bad response from the server
    ErrorCode["SERVER_ERROR"] = "SERVER_ERROR";
    // Timeout
    ErrorCode["TIMEOUT"] = "TIMEOUT";
    ///////////////////
    // Operational  Errors
    // Buffer Overrun
    ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN";
    // Numeric Fault
    //   - operation: the operation being executed
    //   - fault: the reason this faulted
    ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT";
    ///////////////////
    // Argument Errors
    // Missing new operator to an object
    //  - name: The name of the class
    ErrorCode["MISSING_NEW"] = "MISSING_NEW";
    // Invalid argument (e.g. value is incompatible with type) to a function:
    //   - argument: The argument name that was invalid
    //   - value: The value of the argument
    ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT";
    // Missing argument to a function:
    //   - count: The number of arguments received
    //   - expectedCount: The number of arguments expected
    ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT";
    // Too many arguments
    //   - count: The number of arguments received
    //   - expectedCount: The number of arguments expected
    ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT";
    ///////////////////
    // Blockchain Errors
    // Call exception
    //  - transaction: the transaction
    //  - address?: the contract address
    //  - args?: The arguments passed into the function
    //  - method?: The Solidity method signature
    //  - errorSignature?: The EIP848 error signature
    //  - errorArgs?: The EIP848 error parameters
    //  - reason: The reason (only for EIP848 "Error(string)")
    ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION";
    // Insufficien funds (< value + gasLimit * gasPrice)
    //   - transaction: the transaction attempted
    ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
    // Nonce has already been used
    //   - transaction: the transaction attempted
    ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED";
    // The replacement fee for the transaction is too low
    //   - transaction: the transaction attempted
    ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED";
    // The gas limit could not be estimated
    //   - transaction: the transaction passed to estimateGas
    ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT";
})(ErrorCode || (ErrorCode = {}));
;
class lib_esm_Logger {
    constructor(version) {
        Object.defineProperty(this, "version", {
            enumerable: true,
            value: version,
            writable: false
        });
    }
    _log(logLevel, args) {
        const level = logLevel.toLowerCase();
        if (LogLevels[level] == null) {
            this.throwArgumentError("invalid log level name", "logLevel", logLevel);
        }
        if (_logLevel > LogLevels[level]) {
            return;
        }
        console.log.apply(console, args);
    }
    debug(...args) {
        this._log(lib_esm_Logger.levels.DEBUG, args);
    }
    info(...args) {
        this._log(lib_esm_Logger.levels.INFO, args);
    }
    warn(...args) {
        this._log(lib_esm_Logger.levels.WARNING, args);
    }
    makeError(message, code, params) {
        // Errors are being censored
        if (_censorErrors) {
            return this.makeError("censored error", code, {});
        }
        if (!code) {
            code = lib_esm_Logger.errors.UNKNOWN_ERROR;
        }
        if (!params) {
            params = {};
        }
        const messageDetails = [];
        Object.keys(params).forEach((key) => {
            try {
                messageDetails.push(key + "=" + JSON.stringify(params[key]));
            }
            catch (error) {
                messageDetails.push(key + "=" + JSON.stringify(params[key].toString()));
            }
        });
        messageDetails.push(`code=${code}`);
        messageDetails.push(`version=${this.version}`);
        const reason = message;
        if (messageDetails.length) {
            message += " (" + messageDetails.join(", ") + ")";
        }
        // @TODO: Any??
        const error = new Error(message);
        error.reason = reason;
        error.code = code;
        Object.keys(params).forEach(function (key) {
            error[key] = params[key];
        });
        return error;
    }
    throwError(message, code, params) {
        throw this.makeError(message, code, params);
    }
    throwArgumentError(message, name, value) {
        return this.throwError(message, lib_esm_Logger.errors.INVALID_ARGUMENT, {
            argument: name,
            value: value
        });
    }
    assert(condition, message, code, params) {
        if (!!condition) {
            return;
        }
        this.throwError(message, code, params);
    }
    assertArgument(condition, message, name, value) {
        if (!!condition) {
            return;
        }
        this.throwArgumentError(message, name, value);
    }
    checkNormalize(message) {
        if (message == null) {
            message = "platform missing String.prototype.normalize";
        }
        if (_normalizeError) {
            this.throwError("platform missing String.prototype.normalize", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "String.prototype.normalize", form: _normalizeError
            });
        }
    }
    checkSafeUint53(value, message) {
        if (typeof (value) !== "number") {
            return;
        }
        if (message == null) {
            message = "value not safe";
        }
        if (value < 0 || value >= 0x1fffffffffffff) {
            this.throwError(message, lib_esm_Logger.errors.NUMERIC_FAULT, {
                operation: "checkSafeInteger",
                fault: "out-of-safe-range",
                value: value
            });
        }
        if (value % 1) {
            this.throwError(message, lib_esm_Logger.errors.NUMERIC_FAULT, {
                operation: "checkSafeInteger",
                fault: "non-integer",
                value: value
            });
        }
    }
    checkArgumentCount(count, expectedCount, message) {
        if (message) {
            message = ": " + message;
        }
        else {
            message = "";
        }
        if (count < expectedCount) {
            this.throwError("missing argument" + message, lib_esm_Logger.errors.MISSING_ARGUMENT, {
                count: count,
                expectedCount: expectedCount
            });
        }
        if (count > expectedCount) {
            this.throwError("too many arguments" + message, lib_esm_Logger.errors.UNEXPECTED_ARGUMENT, {
                count: count,
                expectedCount: expectedCount
            });
        }
    }
    checkNew(target, kind) {
        if (target === Object || target == null) {
            this.throwError("missing new", lib_esm_Logger.errors.MISSING_NEW, { name: kind.name });
        }
    }
    checkAbstract(target, kind) {
        if (target === kind) {
            this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" });
        }
        else if (target === Object || target == null) {
            this.throwError("missing new", lib_esm_Logger.errors.MISSING_NEW, { name: kind.name });
        }
    }
    static globalLogger() {
        if (!_globalLogger) {
            _globalLogger = new lib_esm_Logger(version);
        }
        return _globalLogger;
    }
    static setCensorship(censorship, permanent) {
        if (!censorship && permanent) {
            this.globalLogger().throwError("cannot permanently disable censorship", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "setCensorship"
            });
        }
        if (_permanentCensorErrors) {
            if (!censorship) {
                return;
            }
            this.globalLogger().throwError("error censorship permanent", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "setCensorship"
            });
        }
        _censorErrors = !!censorship;
        _permanentCensorErrors = !!permanent;
    }
    static setLogLevel(logLevel) {
        const level = LogLevels[logLevel.toLowerCase()];
        if (level == null) {
            lib_esm_Logger.globalLogger().warn("invalid log level - " + logLevel);
            return;
        }
        _logLevel = level;
    }
}
lib_esm_Logger.errors = ErrorCode;
lib_esm_Logger.levels = LogLevel;
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bytes/lib.esm/_version.js
const _version_version = "bytes/5.0.5";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bytes/lib.esm/index.js



const logger = new lib_esm_Logger(_version_version);
///////////////////////////////
function isHexable(value) {
    return !!(value.toHexString);
}
function addSlice(array) {
    if (array.slice) {
        return array;
    }
    array.slice = function () {
        const args = Array.prototype.slice.call(arguments);
        return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));
    };
    return array;
}
function isBytesLike(value) {
    return ((lib_esm_isHexString(value) && !(value.length % 2)) || isBytes(value));
}
function isBytes(value) {
    if (value == null) {
        return false;
    }
    if (value.constructor === Uint8Array) {
        return true;
    }
    if (typeof (value) === "string") {
        return false;
    }
    if (value.length == null) {
        return false;
    }
    for (let i = 0; i < value.length; i++) {
        const v = value[i];
        if (v < 0 || v >= 256 || (v % 1)) {
            return false;
        }
    }
    return true;
}
function lib_esm_arrayify(value, options) {
    if (!options) {
        options = {};
    }
    if (typeof (value) === "number") {
        logger.checkSafeUint53(value, "invalid arrayify value");
        const result = [];
        while (value) {
            result.unshift(value & 0xff);
            value = parseInt(String(value / 256));
        }
        if (result.length === 0) {
            result.push(0);
        }
        return addSlice(new Uint8Array(result));
    }
    if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") {
        value = "0x" + value;
    }
    if (isHexable(value)) {
        value = value.toHexString();
    }
    if (lib_esm_isHexString(value)) {
        let hex = value.substring(2);
        if (hex.length % 2) {
            if (options.hexPad === "left") {
                hex = "0x0" + hex.substring(2);
            }
            else if (options.hexPad === "right") {
                hex += "0";
            }
            else {
                logger.throwArgumentError("hex data is odd-length", "value", value);
            }
        }
        const result = [];
        for (let i = 0; i < hex.length; i += 2) {
            result.push(parseInt(hex.substring(i, i + 2), 16));
        }
        return addSlice(new Uint8Array(result));
    }
    if (isBytes(value)) {
        return addSlice(new Uint8Array(value));
    }
    return logger.throwArgumentError("invalid arrayify value", "value", value);
}
function lib_esm_concat(items) {
    const objects = items.map(item => lib_esm_arrayify(item));
    const length = objects.reduce((accum, item) => (accum + item.length), 0);
    const result = new Uint8Array(length);
    objects.reduce((offset, object) => {
        result.set(object, offset);
        return offset + object.length;
    }, 0);
    return addSlice(result);
}
function stripZeros(value) {
    let result = lib_esm_arrayify(value);
    if (result.length === 0) {
        return result;
    }
    // Find the first non-zero entry
    let start = 0;
    while (start < result.length && result[start] === 0) {
        start++;
    }
    // If we started with zeros, strip them
    if (start) {
        result = result.slice(start);
    }
    return result;
}
function zeroPad(value, length) {
    value = lib_esm_arrayify(value);
    if (value.length > length) {
        logger.throwArgumentError("value out of range", "value", arguments[0]);
    }
    const result = new Uint8Array(length);
    result.set(value, length - value.length);
    return addSlice(result);
}
function lib_esm_isHexString(value, length) {
    if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
        return false;
    }
    if (length && value.length !== 2 + 2 * length) {
        return false;
    }
    return true;
}
const HexCharacters = "0123456789abcdef";
function lib_esm_hexlify(value, options) {
    if (!options) {
        options = {};
    }
    if (typeof (value) === "number") {
        logger.checkSafeUint53(value, "invalid hexlify value");
        let hex = "";
        while (value) {
            hex = HexCharacters[value & 0x0f] + hex;
            value = Math.floor(value / 16);
        }
        if (hex.length) {
            if (hex.length % 2) {
                hex = "0" + hex;
            }
            return "0x" + hex;
        }
        return "0x00";
    }
    if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") {
        value = "0x" + value;
    }
    if (isHexable(value)) {
        return value.toHexString();
    }
    if (lib_esm_isHexString(value)) {
        if (value.length % 2) {
            if (options.hexPad === "left") {
                value = "0x0" + value.substring(2);
            }
            else if (options.hexPad === "right") {
                value += "0";
            }
            else {
                logger.throwArgumentError("hex data is odd-length", "value", value);
            }
        }
        return value.toLowerCase();
    }
    if (isBytes(value)) {
        let result = "0x";
        for (let i = 0; i < value.length; i++) {
            let v = value[i];
            result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];
        }
        return result;
    }
    return logger.throwArgumentError("invalid hexlify value", "value", value);
}
/*
function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {
    if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") {
        return "0x0" + value.substring(2);
    }
    return value;
}
*/
function hexDataLength(data) {
    if (typeof (data) !== "string") {
        data = lib_esm_hexlify(data);
    }
    else if (!lib_esm_isHexString(data) || (data.length % 2)) {
        return null;
    }
    return (data.length - 2) / 2;
}
function lib_esm_hexDataSlice(data, offset, endOffset) {
    if (typeof (data) !== "string") {
        data = lib_esm_hexlify(data);
    }
    else if (!lib_esm_isHexString(data) || (data.length % 2)) {
        logger.throwArgumentError("invalid hexData", "value", data);
    }
    offset = 2 + 2 * offset;
    if (endOffset != null) {
        return "0x" + data.substring(offset, 2 + 2 * endOffset);
    }
    return "0x" + data.substring(offset);
}
function hexConcat(items) {
    let result = "0x";
    items.forEach((item) => {
        result += lib_esm_hexlify(item).substring(2);
    });
    return result;
}
function hexValue(value) {
    const trimmed = hexStripZeros(lib_esm_hexlify(value, { hexPad: "left" }));
    if (trimmed === "0x") {
        return "0x0";
    }
    return trimmed;
}
function hexStripZeros(value) {
    if (typeof (value) !== "string") {
        value = lib_esm_hexlify(value);
    }
    if (!lib_esm_isHexString(value)) {
        logger.throwArgumentError("invalid hex string", "value", value);
    }
    value = value.substring(2);
    let offset = 0;
    while (offset < value.length && value[offset] === "0") {
        offset++;
    }
    return "0x" + value.substring(offset);
}
function lib_esm_hexZeroPad(value, length) {
    if (typeof (value) !== "string") {
        value = lib_esm_hexlify(value);
    }
    else if (!lib_esm_isHexString(value)) {
        logger.throwArgumentError("invalid hex string", "value", value);
    }
    if (value.length > 2 * length + 2) {
        logger.throwArgumentError("value out of range", "value", arguments[1]);
    }
    while (value.length < 2 * length + 2) {
        value = "0x0" + value.substring(2);
    }
    return value;
}
function splitSignature(signature) {
    const result = {
        r: "0x",
        s: "0x",
        _vs: "0x",
        recoveryParam: 0,
        v: 0
    };
    if (isBytesLike(signature)) {
        const bytes = lib_esm_arrayify(signature);
        if (bytes.length !== 65) {
            logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature);
        }
        // Get the r, s and v
        result.r = lib_esm_hexlify(bytes.slice(0, 32));
        result.s = lib_esm_hexlify(bytes.slice(32, 64));
        result.v = bytes[64];
        // Allow a recid to be used as the v
        if (result.v < 27) {
            if (result.v === 0 || result.v === 1) {
                result.v += 27;
            }
            else {
                logger.throwArgumentError("signature invalid v byte", "signature", signature);
            }
        }
        // Compute recoveryParam from v
        result.recoveryParam = 1 - (result.v % 2);
        // Compute _vs from recoveryParam and s
        if (result.recoveryParam) {
            bytes[32] |= 0x80;
        }
        result._vs = lib_esm_hexlify(bytes.slice(32, 64));
    }
    else {
        result.r = signature.r;
        result.s = signature.s;
        result.v = signature.v;
        result.recoveryParam = signature.recoveryParam;
        result._vs = signature._vs;
        // If the _vs is available, use it to populate missing s, v and recoveryParam
        // and verify non-missing s, v and recoveryParam
        if (result._vs != null) {
            const vs = zeroPad(lib_esm_arrayify(result._vs), 32);
            result._vs = lib_esm_hexlify(vs);
            // Set or check the recid
            const recoveryParam = ((vs[0] >= 128) ? 1 : 0);
            if (result.recoveryParam == null) {
                result.recoveryParam = recoveryParam;
            }
            else if (result.recoveryParam !== recoveryParam) {
                logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature);
            }
            // Set or check the s
            vs[0] &= 0x7f;
            const s = lib_esm_hexlify(vs);
            if (result.s == null) {
                result.s = s;
            }
            else if (result.s !== s) {
                logger.throwArgumentError("signature v mismatch _vs", "signature", signature);
            }
        }
        // Use recid and v to populate each other
        if (result.recoveryParam == null) {
            if (result.v == null) {
                logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature);
            }
            else {
                result.recoveryParam = 1 - (result.v % 2);
            }
        }
        else {
            if (result.v == null) {
                result.v = 27 + result.recoveryParam;
            }
            else if (result.recoveryParam !== (1 - (result.v % 2))) {
                logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature);
            }
        }
        if (result.r == null || !lib_esm_isHexString(result.r)) {
            logger.throwArgumentError("signature missing or invalid r", "signature", signature);
        }
        else {
            result.r = lib_esm_hexZeroPad(result.r, 32);
        }
        if (result.s == null || !lib_esm_isHexString(result.s)) {
            logger.throwArgumentError("signature missing or invalid s", "signature", signature);
        }
        else {
            result.s = lib_esm_hexZeroPad(result.s, 32);
        }
        const vs = lib_esm_arrayify(result.s);
        if (vs[0] >= 128) {
            logger.throwArgumentError("signature s out of range", "signature", signature);
        }
        if (result.recoveryParam) {
            vs[0] |= 0x80;
        }
        const _vs = lib_esm_hexlify(vs);
        if (result._vs) {
            if (!lib_esm_isHexString(result._vs)) {
                logger.throwArgumentError("signature invalid _vs", "signature", signature);
            }
            result._vs = lib_esm_hexZeroPad(result._vs, 32);
        }
        // Set or check the _vs
        if (result._vs == null) {
            result._vs = _vs;
        }
        else if (result._vs !== _vs) {
            logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature);
        }
    }
    return result;
}
function joinSignature(signature) {
    signature = splitSignature(signature);
    return lib_esm_hexlify(lib_esm_concat([
        signature.r,
        signature.s,
        (signature.recoveryParam ? "0x1c" : "0x1b")
    ]));
}
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bignumber/lib.esm/_version.js
const lib_esm_version_version = "bignumber/5.0.8";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js

/**
 *  BigNumber
 *
 *  A wrapper around the BN.js object. We use the BN.js library
 *  because it is used by elliptic, so it is required regardles.
 *
 */




const bignumber_logger = new lib_esm_Logger(lib_esm_version_version);
const _constructorGuard = {};
const MAX_SAFE = 0x1fffffffffffff;
function isBigNumberish(value) {
    return (value != null) && (bignumber_BigNumber.isBigNumber(value) ||
        (typeof (value) === "number" && (value % 1) === 0) ||
        (typeof (value) === "string" && !!value.match(/^-?[0-9]+$/)) ||
        lib_esm_isHexString(value) ||
        (typeof (value) === "bigint") ||
        isBytes(value));
}
class bignumber_BigNumber {
    constructor(constructorGuard, hex) {
        bignumber_logger.checkNew(new.target, bignumber_BigNumber);
        if (constructorGuard !== _constructorGuard) {
            bignumber_logger.throwError("cannot call constructor directly; use BigNumber.from", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "new (BigNumber)"
            });
        }
        this._hex = hex;
        this._isBigNumber = true;
        Object.freeze(this);
    }
    fromTwos(value) {
        return toBigNumber(toBN(this).fromTwos(value));
    }
    toTwos(value) {
        return toBigNumber(toBN(this).toTwos(value));
    }
    abs() {
        if (this._hex[0] === "-") {
            return bignumber_BigNumber.from(this._hex.substring(1));
        }
        return this;
    }
    add(other) {
        return toBigNumber(toBN(this).add(toBN(other)));
    }
    sub(other) {
        return toBigNumber(toBN(this).sub(toBN(other)));
    }
    div(other) {
        const o = bignumber_BigNumber.from(other);
        if (o.isZero()) {
            throwFault("division by zero", "div");
        }
        return toBigNumber(toBN(this).div(toBN(other)));
    }
    mul(other) {
        return toBigNumber(toBN(this).mul(toBN(other)));
    }
    mod(other) {
        const value = toBN(other);
        if (value.isNeg()) {
            throwFault("cannot modulo negative values", "mod");
        }
        return toBigNumber(toBN(this).umod(value));
    }
    pow(other) {
        const value = toBN(other);
        if (value.isNeg()) {
            throwFault("cannot raise to negative values", "pow");
        }
        return toBigNumber(toBN(this).pow(value));
    }
    and(other) {
        const value = toBN(other);
        if (this.isNegative() || value.isNeg()) {
            throwFault("cannot 'and' negative values", "and");
        }
        return toBigNumber(toBN(this).and(value));
    }
    or(other) {
        const value = toBN(other);
        if (this.isNegative() || value.isNeg()) {
            throwFault("cannot 'or' negative values", "or");
        }
        return toBigNumber(toBN(this).or(value));
    }
    xor(other) {
        const value = toBN(other);
        if (this.isNegative() || value.isNeg()) {
            throwFault("cannot 'xor' negative values", "xor");
        }
        return toBigNumber(toBN(this).xor(value));
    }
    mask(value) {
        if (this.isNegative() || value < 0) {
            throwFault("cannot mask negative values", "mask");
        }
        return toBigNumber(toBN(this).maskn(value));
    }
    shl(value) {
        if (this.isNegative() || value < 0) {
            throwFault("cannot shift negative values", "shl");
        }
        return toBigNumber(toBN(this).shln(value));
    }
    shr(value) {
        if (this.isNegative() || value < 0) {
            throwFault("cannot shift negative values", "shr");
        }
        return toBigNumber(toBN(this).shrn(value));
    }
    eq(other) {
        return toBN(this).eq(toBN(other));
    }
    lt(other) {
        return toBN(this).lt(toBN(other));
    }
    lte(other) {
        return toBN(this).lte(toBN(other));
    }
    gt(other) {
        return toBN(this).gt(toBN(other));
    }
    gte(other) {
        return toBN(this).gte(toBN(other));
    }
    isNegative() {
        return (this._hex[0] === "-");
    }
    isZero() {
        return toBN(this).isZero();
    }
    toNumber() {
        try {
            return toBN(this).toNumber();
        }
        catch (error) {
            throwFault("overflow", "toNumber", this.toString());
        }
        return null;
    }
    toString() {
        // Lots of people expect this, which we do not support, so check
        if (arguments.length !== 0) {
            bignumber_logger.throwError("bigNumber.toString does not accept parameters", lib_esm_Logger.errors.UNEXPECTED_ARGUMENT, {});
        }
        return toBN(this).toString(10);
    }
    toHexString() {
        return this._hex;
    }
    toJSON(key) {
        return { type: "BigNumber", hex: this.toHexString() };
    }
    static from(value) {
        if (value instanceof bignumber_BigNumber) {
            return value;
        }
        if (typeof (value) === "string") {
            if (value.match(/^-?0x[0-9a-f]+$/i)) {
                return new bignumber_BigNumber(_constructorGuard, toHex(value));
            }
            if (value.match(/^-?[0-9]+$/)) {
                return new bignumber_BigNumber(_constructorGuard, toHex(new bn.BN(value)));
            }
            return bignumber_logger.throwArgumentError("invalid BigNumber string", "value", value);
        }
        if (typeof (value) === "number") {
            if (value % 1) {
                throwFault("underflow", "BigNumber.from", value);
            }
            if (value >= MAX_SAFE || value <= -MAX_SAFE) {
                throwFault("overflow", "BigNumber.from", value);
            }
            return bignumber_BigNumber.from(String(value));
        }
        const anyValue = value;
        if (typeof (anyValue) === "bigint") {
            return bignumber_BigNumber.from(anyValue.toString());
        }
        if (isBytes(anyValue)) {
            return bignumber_BigNumber.from(lib_esm_hexlify(anyValue));
        }
        if (anyValue) {
            // Hexable interface (takes piority)
            if (anyValue.toHexString) {
                const hex = anyValue.toHexString();
                if (typeof (hex) === "string") {
                    return bignumber_BigNumber.from(hex);
                }
            }
            else {
                // For now, handle legacy JSON-ified values (goes away in v6)
                let hex = anyValue._hex;
                // New-form JSON
                if (hex == null && anyValue.type === "BigNumber") {
                    hex = anyValue.hex;
                }
                if (typeof (hex) === "string") {
                    if (lib_esm_isHexString(hex) || (hex[0] === "-" && lib_esm_isHexString(hex.substring(1)))) {
                        return bignumber_BigNumber.from(hex);
                    }
                }
            }
        }
        return bignumber_logger.throwArgumentError("invalid BigNumber value", "value", value);
    }
    static isBigNumber(value) {
        return !!(value && value._isBigNumber);
    }
}
// Normalize the hex string
function toHex(value) {
    // For BN, call on the hex string
    if (typeof (value) !== "string") {
        return toHex(value.toString(16));
    }
    // If negative, prepend the negative sign to the normalized positive value
    if (value[0] === "-") {
        // Strip off the negative sign
        value = value.substring(1);
        // Cannot have mulitple negative signs (e.g. "--0x04")
        if (value[0] === "-") {
            bignumber_logger.throwArgumentError("invalid hex", "value", value);
        }
        // Call toHex on the positive component
        value = toHex(value);
        // Do not allow "-0x00"
        if (value === "0x00") {
            return value;
        }
        // Negate the value
        return "-" + value;
    }
    // Add a "0x" prefix if missing
    if (value.substring(0, 2) !== "0x") {
        value = "0x" + value;
    }
    // Normalize zero
    if (value === "0x") {
        return "0x00";
    }
    // Make the string even length
    if (value.length % 2) {
        value = "0x0" + value.substring(2);
    }
    // Trim to smallest even-length string
    while (value.length > 4 && value.substring(0, 4) === "0x00") {
        value = "0x" + value.substring(4);
    }
    return value;
}
function toBigNumber(value) {
    return bignumber_BigNumber.from(toHex(value));
}
function toBN(value) {
    const hex = bignumber_BigNumber.from(value).toHexString();
    if (hex[0] === "-") {
        return (new bn.BN("-" + hex.substring(3), 16));
    }
    return new bn.BN(hex.substring(2), 16);
}
function throwFault(fault, operation, value) {
    const params = { fault: fault, operation: operation };
    if (value != null) {
        params.value = value;
    }
    return bignumber_logger.throwError(fault, lib_esm_Logger.errors.NUMERIC_FAULT, params);
}
//# sourceMappingURL=bignumber.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js




const fixednumber_logger = new lib_esm_Logger(lib_esm_version_version);

const fixednumber_constructorGuard = {};
const Zero = bignumber_BigNumber.from(0);
const NegativeOne = bignumber_BigNumber.from(-1);
function fixednumber_throwFault(message, fault, operation, value) {
    const params = { fault: fault, operation: operation };
    if (value !== undefined) {
        params.value = value;
    }
    return fixednumber_logger.throwError(message, lib_esm_Logger.errors.NUMERIC_FAULT, params);
}
// Constant to pull zeros from for multipliers
let zeros = "0";
while (zeros.length < 256) {
    zeros += zeros;
}
// Returns a string "1" followed by decimal "0"s
function getMultiplier(decimals) {
    if (typeof (decimals) !== "number") {
        try {
            decimals = bignumber_BigNumber.from(decimals).toNumber();
        }
        catch (e) { }
    }
    if (typeof (decimals) === "number" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {
        return ("1" + zeros.substring(0, decimals));
    }
    return fixednumber_logger.throwArgumentError("invalid decimal size", "decimals", decimals);
}
function formatFixed(value, decimals) {
    if (decimals == null) {
        decimals = 0;
    }
    const multiplier = getMultiplier(decimals);
    // Make sure wei is a big number (convert as necessary)
    value = bignumber_BigNumber.from(value);
    const negative = value.lt(Zero);
    if (negative) {
        value = value.mul(NegativeOne);
    }
    let fraction = value.mod(multiplier).toString();
    while (fraction.length < multiplier.length - 1) {
        fraction = "0" + fraction;
    }
    // Strip training 0
    fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];
    const whole = value.div(multiplier).toString();
    value = whole + "." + fraction;
    if (negative) {
        value = "-" + value;
    }
    return value;
}
function parseFixed(value, decimals) {
    if (decimals == null) {
        decimals = 0;
    }
    const multiplier = getMultiplier(decimals);
    if (typeof (value) !== "string" || !value.match(/^-?[0-9.,]+$/)) {
        fixednumber_logger.throwArgumentError("invalid decimal value", "value", value);
    }
    if (multiplier.length - 1 === 0) {
        return bignumber_BigNumber.from(value);
    }
    // Is it negative?
    const negative = (value.substring(0, 1) === "-");
    if (negative) {
        value = value.substring(1);
    }
    if (value === ".") {
        fixednumber_logger.throwArgumentError("missing value", "value", value);
    }
    // Split it into a whole and fractional part
    const comps = value.split(".");
    if (comps.length > 2) {
        fixednumber_logger.throwArgumentError("too many decimal points", "value", value);
    }
    let whole = comps[0], fraction = comps[1];
    if (!whole) {
        whole = "0";
    }
    if (!fraction) {
        fraction = "0";
    }
    // Prevent underflow
    if (fraction.length > multiplier.length - 1) {
        fixednumber_throwFault("fractional component exceeds decimals", "underflow", "parseFixed");
    }
    // Fully pad the string with zeros to get to wei
    while (fraction.length < multiplier.length - 1) {
        fraction += "0";
    }
    const wholeValue = bignumber_BigNumber.from(whole);
    const fractionValue = bignumber_BigNumber.from(fraction);
    let wei = (wholeValue.mul(multiplier)).add(fractionValue);
    if (negative) {
        wei = wei.mul(NegativeOne);
    }
    return wei;
}
class FixedFormat {
    constructor(constructorGuard, signed, width, decimals) {
        if (constructorGuard !== fixednumber_constructorGuard) {
            fixednumber_logger.throwError("cannot use FixedFormat constructor; use FixedFormat.from", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "new FixedFormat"
            });
        }
        this.signed = signed;
        this.width = width;
        this.decimals = decimals;
        this.name = (signed ? "" : "u") + "fixed" + String(width) + "x" + String(decimals);
        this._multiplier = getMultiplier(decimals);
        Object.freeze(this);
    }
    static from(value) {
        if (value instanceof FixedFormat) {
            return value;
        }
        let signed = true;
        let width = 128;
        let decimals = 18;
        if (typeof (value) === "string") {
            if (value === "fixed") {
                // defaults...
            }
            else if (value === "ufixed") {
                signed = false;
            }
            else if (value != null) {
                const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);
                if (!match) {
                    fixednumber_logger.throwArgumentError("invalid fixed format", "format", value);
                }
                signed = (match[1] !== "u");
                width = parseInt(match[2]);
                decimals = parseInt(match[3]);
            }
        }
        else if (value) {
            const check = (key, type, defaultValue) => {
                if (value[key] == null) {
                    return defaultValue;
                }
                if (typeof (value[key]) !== type) {
                    fixednumber_logger.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
                }
                return value[key];
            };
            signed = check("signed", "boolean", signed);
            width = check("width", "number", width);
            decimals = check("decimals", "number", decimals);
        }
        if (width % 8) {
            fixednumber_logger.throwArgumentError("invalid fixed format width (not byte aligned)", "format.width", width);
        }
        if (decimals > 80) {
            fixednumber_logger.throwArgumentError("invalid fixed format (decimals too large)", "format.decimals", decimals);
        }
        return new FixedFormat(fixednumber_constructorGuard, signed, width, decimals);
    }
}
class FixedNumber {
    constructor(constructorGuard, hex, value, format) {
        fixednumber_logger.checkNew(new.target, FixedNumber);
        if (constructorGuard !== fixednumber_constructorGuard) {
            fixednumber_logger.throwError("cannot use FixedNumber constructor; use FixedNumber.from", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "new FixedFormat"
            });
        }
        this.format = format;
        this._hex = hex;
        this._value = value;
        this._isFixedNumber = true;
        Object.freeze(this);
    }
    _checkFormat(other) {
        if (this.format.name !== other.format.name) {
            fixednumber_logger.throwArgumentError("incompatible format; use fixedNumber.toFormat", "other", other);
        }
    }
    addUnsafe(other) {
        this._checkFormat(other);
        const a = parseFixed(this._value, this.format.decimals);
        const b = parseFixed(other._value, other.format.decimals);
        return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);
    }
    subUnsafe(other) {
        this._checkFormat(other);
        const a = parseFixed(this._value, this.format.decimals);
        const b = parseFixed(other._value, other.format.decimals);
        return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);
    }
    mulUnsafe(other) {
        this._checkFormat(other);
        const a = parseFixed(this._value, this.format.decimals);
        const b = parseFixed(other._value, other.format.decimals);
        return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);
    }
    divUnsafe(other) {
        this._checkFormat(other);
        const a = parseFixed(this._value, this.format.decimals);
        const b = parseFixed(other._value, other.format.decimals);
        return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);
    }
    floor() {
        let comps = this.toString().split(".");
        let result = FixedNumber.from(comps[0], this.format);
        const hasFraction = !comps[1].match(/^(0*)$/);
        if (this.isNegative() && hasFraction) {
            result = result.subUnsafe(ONE);
        }
        return result;
    }
    ceiling() {
        let comps = this.toString().split(".");
        let result = FixedNumber.from(comps[0], this.format);
        const hasFraction = !comps[1].match(/^(0*)$/);
        if (!this.isNegative() && hasFraction) {
            result = result.addUnsafe(ONE);
        }
        return result;
    }
    // @TODO: Support other rounding algorithms
    round(decimals) {
        if (decimals == null) {
            decimals = 0;
        }
        // If we are already in range, we're done
        let comps = this.toString().split(".");
        if (decimals < 0 || decimals > 80 || (decimals % 1)) {
            fixednumber_logger.throwArgumentError("invalid decimal count", "decimals", decimals);
        }
        if (comps[1].length <= decimals) {
            return this;
        }
        const factor = FixedNumber.from("1" + zeros.substring(0, decimals));
        return this.mulUnsafe(factor).addUnsafe(BUMP).floor().divUnsafe(factor);
    }
    isZero() {
        return (this._value === "0.0");
    }
    isNegative() {
        return (this._value[0] === "-");
    }
    toString() { return this._value; }
    toHexString(width) {
        if (width == null) {
            return this._hex;
        }
        if (width % 8) {
            fixednumber_logger.throwArgumentError("invalid byte width", "width", width);
        }
        const hex = bignumber_BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();
        return lib_esm_hexZeroPad(hex, width / 8);
    }
    toUnsafeFloat() { return parseFloat(this.toString()); }
    toFormat(format) {
        return FixedNumber.fromString(this._value, format);
    }
    static fromValue(value, decimals, format) {
        // If decimals looks more like a format, and there is no format, shift the parameters
        if (format == null && decimals != null && !isBigNumberish(decimals)) {
            format = decimals;
            decimals = null;
        }
        if (decimals == null) {
            decimals = 0;
        }
        if (format == null) {
            format = "fixed";
        }
        return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));
    }
    static fromString(value, format) {
        if (format == null) {
            format = "fixed";
        }
        const fixedFormat = FixedFormat.from(format);
        const numeric = parseFixed(value, fixedFormat.decimals);
        if (!fixedFormat.signed && numeric.lt(Zero)) {
            fixednumber_throwFault("unsigned value cannot be negative", "overflow", "value", value);
        }
        let hex = null;
        if (fixedFormat.signed) {
            hex = numeric.toTwos(fixedFormat.width).toHexString();
        }
        else {
            hex = numeric.toHexString();
            hex = lib_esm_hexZeroPad(hex, fixedFormat.width / 8);
        }
        const decimal = formatFixed(numeric, fixedFormat.decimals);
        return new FixedNumber(fixednumber_constructorGuard, hex, decimal, fixedFormat);
    }
    static fromBytes(value, format) {
        if (format == null) {
            format = "fixed";
        }
        const fixedFormat = FixedFormat.from(format);
        if (lib_esm_arrayify(value).length > fixedFormat.width / 8) {
            throw new Error("overflow");
        }
        let numeric = bignumber_BigNumber.from(value);
        if (fixedFormat.signed) {
            numeric = numeric.fromTwos(fixedFormat.width);
        }
        const hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();
        const decimal = formatFixed(numeric, fixedFormat.decimals);
        return new FixedNumber(fixednumber_constructorGuard, hex, decimal, fixedFormat);
    }
    static from(value, format) {
        if (typeof (value) === "string") {
            return FixedNumber.fromString(value, format);
        }
        if (isBytes(value)) {
            return FixedNumber.fromBytes(value, format);
        }
        try {
            return FixedNumber.fromValue(value, 0, format);
        }
        catch (error) {
            // Allow NUMERIC_FAULT to bubble up
            if (error.code !== lib_esm_Logger.errors.INVALID_ARGUMENT) {
                throw error;
            }
        }
        return fixednumber_logger.throwArgumentError("invalid FixedNumber value", "value", value);
    }
    static isFixedNumber(value) {
        return !!(value && value._isFixedNumber);
    }
}
const ONE = FixedNumber.from(1);
const BUMP = FixedNumber.from("0.5");
//# sourceMappingURL=fixednumber.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/bignumber/lib.esm/index.js


//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/properties/lib.esm/_version.js
const properties_lib_esm_version_version = "properties/5.0.4";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/node_modules/@ethersproject/properties/lib.esm/index.js

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};


const lib_esm_logger = new lib_esm_Logger(properties_lib_esm_version_version);
function lib_esm_defineReadOnly(object, name, value) {
    Object.defineProperty(object, name, {
        enumerable: true,
        value: value,
        writable: false,
    });
}
// Crawl up the constructor chain to find a static method
function lib_esm_getStatic(ctor, key) {
    for (let i = 0; i < 32; i++) {
        if (ctor[key]) {
            return ctor[key];
        }
        if (!ctor.prototype || typeof (ctor.prototype) !== "object") {
            break;
        }
        ctor = Object.getPrototypeOf(ctor.prototype).constructor;
    }
    return null;
}
function resolveProperties(object) {
    return __awaiter(this, void 0, void 0, function* () {
        const promises = Object.keys(object).map((key) => {
            const value = object[key];
            return Promise.resolve(value).then((v) => ({ key: key, value: v }));
        });
        const results = yield Promise.all(promises);
        return results.reduce((accum, result) => {
            accum[(result.key)] = result.value;
            return accum;
        }, {});
    });
}
function checkProperties(object, properties) {
    if (!object || typeof (object) !== "object") {
        lib_esm_logger.throwArgumentError("invalid object", "object", object);
    }
    Object.keys(object).forEach((key) => {
        if (!properties[key]) {
            lib_esm_logger.throwArgumentError("invalid object key - " + key, "transaction:" + key, object);
        }
    });
}
function shallowCopy(object) {
    const result = {};
    for (const key in object) {
        result[key] = object[key];
    }
    return result;
}
const opaque = { bigint: true, boolean: true, "function": true, number: true, string: true };
function _isFrozen(object) {
    // Opaque objects are not mutable, so safe to copy by assignment
    if (object === undefined || object === null || opaque[typeof (object)]) {
        return true;
    }
    if (Array.isArray(object) || typeof (object) === "object") {
        if (!Object.isFrozen(object)) {
            return false;
        }
        const keys = Object.keys(object);
        for (let i = 0; i < keys.length; i++) {
            if (!_isFrozen(object[keys[i]])) {
                return false;
            }
        }
        return true;
    }
    return lib_esm_logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object);
}
// Returns a new copy of object, such that no properties may be replaced.
// New properties may be added only to objects.
function _deepCopy(object) {
    if (_isFrozen(object)) {
        return object;
    }
    // Arrays are mutable, so we need to create a copy
    if (Array.isArray(object)) {
        return Object.freeze(object.map((item) => deepCopy(item)));
    }
    if (typeof (object) === "object") {
        const result = {};
        for (const key in object) {
            const value = object[key];
            if (value === undefined) {
                continue;
            }
            lib_esm_defineReadOnly(result, key, deepCopy(value));
        }
        return result;
    }
    return lib_esm_logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, "object", object);
}
function deepCopy(object) {
    return _deepCopy(object);
}
class lib_esm_Description {
    constructor(info) {
        for (const key in info) {
            this[key] = deepCopy(info[key]);
        }
    }
}
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/_version.js
const abi_lib_esm_version_version = "abi/5.0.0-beta.153";

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/fragments.js





const fragments_logger = new lib_esm_Logger(abi_lib_esm_version_version);
;
const fragments_constructorGuard = {};
let ModifiersBytes = { calldata: true, memory: true, storage: true };
let ModifiersNest = { calldata: true, memory: true };
function checkModifier(type, name) {
    if (type === "bytes" || type === "string") {
        if (ModifiersBytes[name]) {
            return true;
        }
    }
    else if (type === "address") {
        if (name === "payable") {
            return true;
        }
    }
    else if (type.indexOf("[") >= 0 || type === "tuple") {
        if (ModifiersNest[name]) {
            return true;
        }
    }
    if (ModifiersBytes[name] || name === "payable") {
        fragments_logger.throwArgumentError("invalid modifier", "name", name);
    }
    return false;
}
// @TODO: Make sure that children of an indexed tuple are marked with a null indexed
function parseParamType(param, allowIndexed) {
    let originalParam = param;
    function throwError(i) {
        fragments_logger.throwArgumentError(`unexpected character at position ${i}`, "param", param);
    }
    param = param.replace(/\s/g, " ");
    function newNode(parent) {
        let node = { type: "", name: "", parent: parent, state: { allowType: true } };
        if (allowIndexed) {
            node.indexed = false;
        }
        return node;
    }
    let parent = { type: "", name: "", state: { allowType: true } };
    let node = parent;
    for (let i = 0; i < param.length; i++) {
        let c = param[i];
        switch (c) {
            case "(":
                if (node.state.allowType && node.type === "") {
                    node.type = "tuple";
                }
                else if (!node.state.allowParams) {
                    throwError(i);
                }
                node.state.allowType = false;
                node.type = verifyType(node.type);
                node.components = [newNode(node)];
                node = node.components[0];
                break;
            case ")":
                delete node.state;
                if (node.name === "indexed") {
                    if (!allowIndexed) {
                        throwError(i);
                    }
                    node.indexed = true;
                    node.name = "";
                }
                if (checkModifier(node.type, node.name)) {
                    node.name = "";
                }
                node.type = verifyType(node.type);
                let child = node;
                node = node.parent;
                if (!node) {
                    throwError(i);
                }
                delete child.parent;
                node.state.allowParams = false;
                node.state.allowName = true;
                node.state.allowArray = true;
                break;
            case ",":
                delete node.state;
                if (node.name === "indexed") {
                    if (!allowIndexed) {
                        throwError(i);
                    }
                    node.indexed = true;
                    node.name = "";
                }
                if (checkModifier(node.type, node.name)) {
                    node.name = "";
                }
                node.type = verifyType(node.type);
                let sibling = newNode(node.parent);
                //{ type: "", name: "", parent: node.parent, state: { allowType: true } };
                node.parent.components.push(sibling);
                delete node.parent;
                node = sibling;
                break;
            // Hit a space...
            case " ":
                // If reading type, the type is done and may read a param or name
                if (node.state.allowType) {
                    if (node.type !== "") {
                        node.type = verifyType(node.type);
                        delete node.state.allowType;
                        node.state.allowName = true;
                        node.state.allowParams = true;
                    }
                }
                // If reading name, the name is done
                if (node.state.allowName) {
                    if (node.name !== "") {
                        if (node.name === "indexed") {
                            if (!allowIndexed) {
                                throwError(i);
                            }
                            if (node.indexed) {
                                throwError(i);
                            }
                            node.indexed = true;
                            node.name = "";
                        }
                        else if (checkModifier(node.type, node.name)) {
                            node.name = "";
                        }
                        else {
                            node.state.allowName = false;
                        }
                    }
                }
                break;
            case "[":
                if (!node.state.allowArray) {
                    throwError(i);
                }
                node.type += c;
                node.state.allowArray = false;
                node.state.allowName = false;
                node.state.readArray = true;
                break;
            case "]":
                if (!node.state.readArray) {
                    throwError(i);
                }
                node.type += c;
                node.state.readArray = false;
                node.state.allowArray = true;
                node.state.allowName = true;
                break;
            default:
                if (node.state.allowType) {
                    node.type += c;
                    node.state.allowParams = true;
                    node.state.allowArray = true;
                }
                else if (node.state.allowName) {
                    node.name += c;
                    delete node.state.allowArray;
                }
                else if (node.state.readArray) {
                    node.type += c;
                }
                else {
                    throwError(i);
                }
        }
    }
    if (node.parent) {
        fragments_logger.throwArgumentError("unexpected eof", "param", param);
    }
    delete parent.state;
    if (node.name === "indexed") {
        if (!allowIndexed) {
            throwError(originalParam.length - 7);
        }
        if (node.indexed) {
            throwError(originalParam.length - 7);
        }
        node.indexed = true;
        node.name = "";
    }
    else if (checkModifier(node.type, node.name)) {
        node.name = "";
    }
    parent.type = verifyType(parent.type);
    return parent;
}
function populate(object, params) {
    for (let key in params) {
        lib_esm_defineReadOnly(object, key, params[key]);
    }
}
const fragments_FormatTypes = Object.freeze({
    // Bare formatting, as is needed for computing a sighash of an event or function
    sighash: "sighash",
    // Human-Readable with Minimal spacing and without names (compact human-readable)
    minimal: "minimal",
    // Human-Readble with nice spacing, including all names
    full: "full",
    // JSON-format a la Solidity
    json: "json"
});
const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/);
class fragments_ParamType {
    constructor(constructorGuard, params) {
        if (constructorGuard !== fragments_constructorGuard) {
            fragments_logger.throwError("use fromString", lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "new ParamType()"
            });
        }
        populate(this, params);
        let match = this.type.match(paramTypeArray);
        if (match) {
            populate(this, {
                arrayLength: parseInt(match[2] || "-1"),
                arrayChildren: fragments_ParamType.fromObject({
                    type: match[1],
                    components: this.components
                }),
                baseType: "array"
            });
        }
        else {
            populate(this, {
                arrayLength: null,
                arrayChildren: null,
                baseType: ((this.components != null) ? "tuple" : this.type)
            });
        }
        this._isParamType = true;
        Object.freeze(this);
    }
    // Format the parameter fragment
    //   - sighash: "(uint256,address)"
    //   - minimal: "tuple(uint256,address) indexed"
    //   - full:    "tuple(uint256 foo, addres bar) indexed baz"
    format(format) {
        if (!format) {
            format = fragments_FormatTypes.sighash;
        }
        if (!fragments_FormatTypes[format]) {
            fragments_logger.throwArgumentError("invalid format type", "format", format);
        }
        if (format === fragments_FormatTypes.json) {
            let result = {
                type: ((this.baseType === "tuple") ? "tuple" : this.type),
                name: (this.name || undefined)
            };
            if (typeof (this.indexed) === "boolean") {
                result.indexed = this.indexed;
            }
            if (this.components) {
                result.components = this.components.map((comp) => JSON.parse(comp.format(format)));
            }
            return JSON.stringify(result);
        }
        let result = "";
        // Array
        if (this.baseType === "array") {
            result += this.arrayChildren.format(format);
            result += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]";
        }
        else {
            if (this.baseType === "tuple") {
                if (format !== fragments_FormatTypes.sighash) {
                    result += this.type;
                }
                result += "(" + this.components.map((comp) => comp.format(format)).join((format === fragments_FormatTypes.full) ? ", " : ",") + ")";
            }
            else {
                result += this.type;
            }
        }
        if (format !== fragments_FormatTypes.sighash) {
            if (this.indexed === true) {
                result += " indexed";
            }
            if (format === fragments_FormatTypes.full && this.name) {
                result += " " + this.name;
            }
        }
        return result;
    }
    static from(value, allowIndexed) {
        if (typeof (value) === "string") {
            return fragments_ParamType.fromString(value, allowIndexed);
        }
        return fragments_ParamType.fromObject(value);
    }
    static fromObject(value) {
        if (fragments_ParamType.isParamType(value)) {
            return value;
        }
        return new fragments_ParamType(fragments_constructorGuard, {
            name: (value.name || null),
            type: verifyType(value.type),
            indexed: ((value.indexed == null) ? null : !!value.indexed),
            components: (value.components ? value.components.map(fragments_ParamType.fromObject) : null)
        });
    }
    static fromString(value, allowIndexed) {
        function ParamTypify(node) {
            return fragments_ParamType.fromObject({
                name: node.name,
                type: node.type,
                indexed: node.indexed,
                components: node.components
            });
        }
        return ParamTypify(parseParamType(value, !!allowIndexed));
    }
    static isParamType(value) {
        return !!(value != null && value._isParamType);
    }
}
;
function parseParams(value, allowIndex) {
    return splitNesting(value).map((param) => fragments_ParamType.fromString(param, allowIndex));
}
class fragments_Fragment {
    constructor(constructorGuard, params) {
        if (constructorGuard !== fragments_constructorGuard) {
            fragments_logger.throwError("use a static from method", Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "new Fragment()"
            });
        }
        populate(this, params);
        this._isFragment = true;
        Object.freeze(this);
    }
    static from(value) {
        if (fragments_Fragment.isFragment(value)) {
            return value;
        }
        if (typeof (value) === "string") {
            return fragments_Fragment.fromString(value);
        }
        return fragments_Fragment.fromObject(value);
    }
    static fromObject(value) {
        if (fragments_Fragment.isFragment(value)) {
            return value;
        }
        switch (value.type) {
            case "function":
                return fragments_FunctionFragment.fromObject(value);
            case "event":
                return fragments_EventFragment.fromObject(value);
            case "constructor":
                return fragments_ConstructorFragment.fromObject(value);
            case "fallback":
            case "receive":
                // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?
                return null;
        }
        return fragments_logger.throwArgumentError("invalid fragment object", "value", value);
    }
    static fromString(value) {
        // Make sure the "returns" is surrounded by a space and all whitespace is exactly one space
        value = value.replace(/\s/g, " ");
        value = value.replace(/\(/g, " (").replace(/\)/g, ") ").replace(/\s+/g, " ");
        value = value.trim();
        if (value.split(" ")[0] === "event") {
            return fragments_EventFragment.fromString(value.substring(5).trim());
        }
        else if (value.split(" ")[0] === "function") {
            return fragments_FunctionFragment.fromString(value.substring(8).trim());
        }
        else if (value.split("(")[0].trim() === "constructor") {
            return fragments_ConstructorFragment.fromString(value.trim());
        }
        return fragments_logger.throwArgumentError("unsupported fragment", "value", value);
    }
    static isFragment(value) {
        return !!(value && value._isFragment);
    }
}
class fragments_EventFragment extends (/* unused pure expression or super */ null && (fragments_Fragment)) {
    format(format) {
        if (!format) {
            format = fragments_FormatTypes.sighash;
        }
        if (!fragments_FormatTypes[format]) {
            fragments_logger.throwArgumentError("invalid format type", "format", format);
        }
        if (format === fragments_FormatTypes.json) {
            return JSON.stringify({
                type: "event",
                anonymous: this.anonymous,
                name: this.name,
                inputs: this.inputs.map((input) => JSON.parse(input.format(format)))
            });
        }
        let result = "";
        if (format !== fragments_FormatTypes.sighash) {
            result += "event ";
        }
        result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === fragments_FormatTypes.full) ? ", " : ",") + ") ";
        if (format !== fragments_FormatTypes.sighash) {
            if (this.anonymous) {
                result += "anonymous ";
            }
        }
        return result.trim();
    }
    static from(value) {
        if (typeof (value) === "string") {
            return fragments_EventFragment.fromString(value);
        }
        return fragments_EventFragment.fromObject(value);
    }
    static fromObject(value) {
        if (fragments_EventFragment.isEventFragment(value)) {
            return value;
        }
        if (value.type !== "event") {
            fragments_logger.throwArgumentError("invalid event object", "value", value);
        }
        const params = {
            name: verifyIdentifier(value.name),
            anonymous: value.anonymous,
            inputs: (value.inputs ? value.inputs.map(fragments_ParamType.fromObject) : []),
            type: "event"
        };
        return new fragments_EventFragment(fragments_constructorGuard, params);
    }
    static fromString(value) {
        let match = value.match(regexParen);
        if (!match) {
            fragments_logger.throwArgumentError("invalid event string", "value", value);
        }
        let anonymous = false;
        match[3].split(" ").forEach((modifier) => {
            switch (modifier.trim()) {
                case "anonymous":
                    anonymous = true;
                    break;
                case "":
                    break;
                default:
                    fragments_logger.warn("unknown modifier: " + modifier);
            }
        });
        return fragments_EventFragment.fromObject({
            name: match[1].trim(),
            anonymous: anonymous,
            inputs: parseParams(match[2], true),
            type: "event"
        });
    }
    static isEventFragment(value) {
        return (value && value._isFragment && value.type === "event");
    }
}
function parseGas(value, params) {
    params.gas = null;
    let comps = value.split("@");
    if (comps.length !== 1) {
        if (comps.length > 2) {
            fragments_logger.throwArgumentError("invalid human-readable ABI signature", "value", value);
        }
        if (!comps[1].match(/^[0-9]+$/)) {
            fragments_logger.throwArgumentError("invalid human-readable ABI signature gas", "value", value);
        }
        params.gas = BigNumber.from(comps[1]);
        return comps[0];
    }
    return value;
}
function parseModifiers(value, params) {
    params.constant = false;
    params.payable = false;
    params.stateMutability = "nonpayable";
    value.split(" ").forEach((modifier) => {
        switch (modifier.trim()) {
            case "constant":
                params.constant = true;
                break;
            case "payable":
                params.payable = true;
                params.stateMutability = "payable";
                break;
            case "pure":
                params.constant = true;
                params.stateMutability = "pure";
                break;
            case "view":
                params.constant = true;
                params.stateMutability = "view";
                break;
            case "external":
            case "public":
            case "":
                break;
            default:
                console.log("unknown modifier: " + modifier);
        }
    });
}
function verifyState(value) {
    let result = {
        constant: false,
        payable: true,
        stateMutability: "payable"
    };
    if (value.stateMutability != null) {
        result.stateMutability = value.stateMutability;
        // Set (and check things are consistent) the constant property
        result.constant = (result.stateMutability === "view" || result.stateMutability === "pure");
        if (value.constant != null) {
            if ((!!value.constant) !== result.constant) {
                fragments_logger.throwArgumentError("cannot have constant function with mutability " + result.stateMutability, "value", value);
            }
        }
        // Set (and check things are consistent) the payable property
        result.payable = (result.stateMutability === "payable");
        if (value.payable != null) {
            if ((!!value.payable) !== result.payable) {
                fragments_logger.throwArgumentError("cannot have payable function with mutability " + result.stateMutability, "value", value);
            }
        }
    }
    else if (value.payable != null) {
        result.payable = !!value.payable;
        // If payable we can assume non-constant; otherwise we can't assume
        if (value.constant == null && !result.payable && value.type !== "constructor") {
            fragments_logger.throwArgumentError("unable to determine stateMutability", "value", value);
        }
        result.constant = !!value.constant;
        if (result.constant) {
            result.stateMutability = "view";
        }
        else {
            result.stateMutability = (result.payable ? "payable" : "nonpayable");
        }
        if (result.payable && result.constant) {
            fragments_logger.throwArgumentError("cannot have constant payable function", "value", value);
        }
    }
    else if (value.constant != null) {
        result.constant = !!value.constant;
        result.payable = !result.constant;
        result.stateMutability = (result.constant ? "view" : "payable");
    }
    else if (value.type !== "constructor") {
        fragments_logger.throwArgumentError("unable to determine stateMutability", "value", value);
    }
    return result;
}
class fragments_ConstructorFragment extends (/* unused pure expression or super */ null && (fragments_Fragment)) {
    format(format) {
        if (!format) {
            format = fragments_FormatTypes.sighash;
        }
        if (!fragments_FormatTypes[format]) {
            fragments_logger.throwArgumentError("invalid format type", "format", format);
        }
        if (format === fragments_FormatTypes.json) {
            return JSON.stringify({
                type: "constructor",
                stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined),
                payble: this.payable,
                gas: (this.gas ? this.gas.toNumber() : undefined),
                inputs: this.inputs.map((input) => JSON.parse(input.format(format)))
            });
        }
        if (format === fragments_FormatTypes.sighash) {
            fragments_logger.throwError("cannot format a constructor for sighash", Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "format(sighash)"
            });
        }
        let result = "constructor(" + this.inputs.map((input) => input.format(format)).join((format === fragments_FormatTypes.full) ? ", " : ",") + ") ";
        if (this.stateMutability && this.stateMutability !== "nonpayable") {
            result += this.stateMutability + " ";
        }
        return result.trim();
    }
    static from(value) {
        if (typeof (value) === "string") {
            return fragments_ConstructorFragment.fromString(value);
        }
        return fragments_ConstructorFragment.fromObject(value);
    }
    static fromObject(value) {
        if (fragments_ConstructorFragment.isConstructorFragment(value)) {
            return value;
        }
        if (value.type !== "constructor") {
            fragments_logger.throwArgumentError("invalid constructor object", "value", value);
        }
        let state = verifyState(value);
        if (state.constant) {
            fragments_logger.throwArgumentError("constructor cannot be constant", "value", value);
        }
        const params = {
            name: null,
            type: value.type,
            inputs: (value.inputs ? value.inputs.map(fragments_ParamType.fromObject) : []),
            payable: state.payable,
            stateMutability: state.stateMutability,
            gas: (value.gas ? BigNumber.from(value.gas) : null)
        };
        return new fragments_ConstructorFragment(fragments_constructorGuard, params);
    }
    static fromString(value) {
        let params = { type: "constructor" };
        value = parseGas(value, params);
        let parens = value.match(regexParen);
        if (!parens || parens[1].trim() !== "constructor") {
            fragments_logger.throwArgumentError("invalid constructor string", "value", value);
        }
        params.inputs = parseParams(parens[2].trim(), false);
        parseModifiers(parens[3].trim(), params);
        return fragments_ConstructorFragment.fromObject(params);
    }
    static isConstructorFragment(value) {
        return (value && value._isFragment && value.type === "constructor");
    }
}
class fragments_FunctionFragment extends (/* unused pure expression or super */ null && (fragments_ConstructorFragment)) {
    format(format) {
        if (!format) {
            format = fragments_FormatTypes.sighash;
        }
        if (!fragments_FormatTypes[format]) {
            fragments_logger.throwArgumentError("invalid format type", "format", format);
        }
        if (format === fragments_FormatTypes.json) {
            return JSON.stringify({
                type: "function",
                name: this.name,
                constant: this.constant,
                stateMutability: ((this.stateMutability !== "nonpayable") ? this.stateMutability : undefined),
                payble: this.payable,
                gas: (this.gas ? this.gas.toNumber() : undefined),
                inputs: this.inputs.map((input) => JSON.parse(input.format(format))),
                ouputs: this.outputs.map((output) => JSON.parse(output.format(format))),
            });
        }
        let result = "";
        if (format !== fragments_FormatTypes.sighash) {
            result += "function ";
        }
        result += this.name + "(" + this.inputs.map((input) => input.format(format)).join((format === fragments_FormatTypes.full) ? ", " : ",") + ") ";
        if (format !== fragments_FormatTypes.sighash) {
            if (this.stateMutability) {
                if (this.stateMutability !== "nonpayable") {
                    result += (this.stateMutability + " ");
                }
            }
            else if (this.constant) {
                result += "view ";
            }
            if (this.outputs && this.outputs.length) {
                result += "returns (" + this.outputs.map((output) => output.format(format)).join(", ") + ") ";
            }
            if (this.gas != null) {
                result += "@" + this.gas.toString() + " ";
            }
        }
        return result.trim();
    }
    static from(value) {
        if (typeof (value) === "string") {
            return fragments_FunctionFragment.fromString(value);
        }
        return fragments_FunctionFragment.fromObject(value);
    }
    static fromObject(value) {
        if (fragments_FunctionFragment.isFunctionFragment(value)) {
            return value;
        }
        if (value.type !== "function") {
            fragments_logger.throwArgumentError("invalid function object", "value", value);
        }
        let state = verifyState(value);
        const params = {
            type: value.type,
            name: verifyIdentifier(value.name),
            constant: state.constant,
            inputs: (value.inputs ? value.inputs.map(fragments_ParamType.fromObject) : []),
            outputs: (value.outputs ? value.outputs.map(fragments_ParamType.fromObject) : []),
            payable: state.payable,
            stateMutability: state.stateMutability,
            gas: (value.gas ? BigNumber.from(value.gas) : null)
        };
        return new fragments_FunctionFragment(fragments_constructorGuard, params);
    }
    static fromString(value) {
        let params = { type: "function" };
        value = parseGas(value, params);
        let comps = value.split(" returns ");
        if (comps.length > 2) {
            fragments_logger.throwArgumentError("invalid function string", "value", value);
        }
        let parens = comps[0].match(regexParen);
        if (!parens) {
            fragments_logger.throwArgumentError("invalid function signature", "value", value);
        }
        params.name = parens[1].trim();
        if (params.name) {
            verifyIdentifier(params.name);
        }
        params.inputs = parseParams(parens[2], false);
        parseModifiers(parens[3].trim(), params);
        // We have outputs
        if (comps.length > 1) {
            let returns = comps[1].match(regexParen);
            if (returns[1].trim() != "" || returns[3].trim() != "") {
                fragments_logger.throwArgumentError("unexpected tokens", "value", value);
            }
            params.outputs = parseParams(returns[2], false);
        }
        else {
            params.outputs = [];
        }
        return fragments_FunctionFragment.fromObject(params);
    }
    static isFunctionFragment(value) {
        return (value && value._isFragment && value.type === "function");
    }
}
//export class ErrorFragment extends Fragment {
//}
//export class StructFragment extends Fragment {
//}
function verifyType(type) {
    // These need to be transformed to their full description
    if (type.match(/^uint($|[^1-9])/)) {
        type = "uint256" + type.substring(4);
    }
    else if (type.match(/^int($|[^1-9])/)) {
        type = "int256" + type.substring(3);
    }
    // @TODO: more verification
    return type;
}
const regexIdentifier = (/* unused pure expression or super */ null && (new RegExp("^[A-Za-z_][A-Za-z0-9_]*$")));
function verifyIdentifier(value) {
    if (!value || !value.match(regexIdentifier)) {
        fragments_logger.throwArgumentError(`invalid identifier "${value}"`, "value", value);
    }
    return value;
}
const regexParen = (/* unused pure expression or super */ null && (new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")));
function splitNesting(value) {
    value = value.trim();
    let result = [];
    let accum = "";
    let depth = 0;
    for (let offset = 0; offset < value.length; offset++) {
        let c = value[offset];
        if (c === "," && depth === 0) {
            result.push(accum);
            accum = "";
        }
        else {
            accum += c;
            if (c === "(") {
                depth++;
            }
            else if (c === ")") {
                depth--;
                if (depth === -1) {
                    fragments_logger.throwArgumentError("unbalanced parenthesis", "value", value);
                }
            }
        }
    }
    if (accum) {
        result.push(accum);
    }
    return result;
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js






const abstract_coder_logger = new lib_esm_Logger(abi_lib_esm_version_version);
function checkResultErrors(result) {
    // Find the first error (if any)
    const errors = [];
    const checkErrors = function (path, object) {
        if (!Array.isArray(object)) {
            return;
        }
        for (let key in object) {
            const childPath = path.slice();
            childPath.push(key);
            try {
                checkErrors(childPath, object[key]);
            }
            catch (error) {
                errors.push({ path: childPath, error: error });
            }
        }
    };
    checkErrors([], result);
    return errors;
}
class Coder {
    constructor(name, type, localName, dynamic) {
        // @TODO: defineReadOnly these
        this.name = name;
        this.type = type;
        this.localName = localName;
        this.dynamic = dynamic;
    }
    _throwError(message, value) {
        abstract_coder_logger.throwArgumentError(message, this.localName, value);
    }
}
class Writer {
    constructor(wordSize) {
        lib_esm_defineReadOnly(this, "wordSize", wordSize || 32);
        this._data = lib_esm_arrayify([]);
        this._padding = new Uint8Array(wordSize);
    }
    get data() { return lib_esm_hexlify(this._data); }
    get length() { return this._data.length; }
    _writeData(data) {
        this._data = lib_esm_concat([this._data, data]);
        return data.length;
    }
    // Arrayish items; padded on the right to wordSize
    writeBytes(value) {
        let bytes = lib_esm_arrayify(value);
        if (bytes.length % this.wordSize) {
            bytes = lib_esm_concat([bytes, this._padding.slice(bytes.length % this.wordSize)]);
        }
        return this._writeData(bytes);
    }
    _getValue(value) {
        let bytes = lib_esm_arrayify(bignumber_BigNumber.from(value));
        if (bytes.length > this.wordSize) {
            abstract_coder_logger.throwError("value out-of-bounds", lib_esm_Logger.errors.BUFFER_OVERRUN, {
                length: this.wordSize,
                offset: bytes.length
            });
        }
        if (bytes.length % this.wordSize) {
            bytes = lib_esm_concat([this._padding.slice(bytes.length % this.wordSize), bytes]);
        }
        return bytes;
    }
    // BigNumberish items; padded on the left to wordSize
    writeValue(value) {
        return this._writeData(this._getValue(value));
    }
    writeUpdatableValue() {
        let offset = this.length;
        this.writeValue(0);
        return (value) => {
            this._data.set(this._getValue(value), offset);
        };
    }
}
class Reader {
    constructor(data, wordSize, coerceFunc) {
        lib_esm_defineReadOnly(this, "_data", lib_esm_arrayify(data));
        lib_esm_defineReadOnly(this, "wordSize", wordSize || 32);
        lib_esm_defineReadOnly(this, "_coerceFunc", coerceFunc);
        this._offset = 0;
    }
    get data() { return lib_esm_hexlify(this._data); }
    get consumed() { return this._offset; }
    // The default Coerce function
    static coerce(name, value) {
        let match = name.match("^u?int([0-9]+)$");
        if (match && parseInt(match[1]) <= 48) {
            value = value.toNumber();
        }
        return value;
    }
    coerce(name, value) {
        if (this._coerceFunc) {
            return this._coerceFunc(name, value);
        }
        return Reader.coerce(name, value);
    }
    _peekBytes(offset, length) {
        let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;
        if (this._offset + alignedLength > this._data.length) {
            abstract_coder_logger.throwError("data out-of-bounds", lib_esm_Logger.errors.BUFFER_OVERRUN, {
                length: this._data.length,
                offset: this._offset + alignedLength
            });
        }
        return this._data.slice(this._offset, this._offset + alignedLength);
    }
    subReader(offset) {
        return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc);
    }
    readBytes(length) {
        let bytes = this._peekBytes(0, length);
        this._offset += bytes.length;
        // @TODO: Make sure the length..end bytes are all 0?
        return bytes.slice(0, length);
    }
    readValue() {
        return bignumber_BigNumber.from(this.readBytes(this.wordSize));
    }
}

// EXTERNAL MODULE: ./node_modules/@ethersproject/address/lib.esm/index.js + 9 modules
var lib_esm = __webpack_require__(403174);
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/address.js




class AddressCoder extends Coder {
    constructor(localName) {
        super("address", "address", localName, false);
    }
    encode(writer, value) {
        try {
            (0,lib_esm/* getAddress */.Kn)(value);
        }
        catch (error) {
            this._throwError(error.message, value);
        }
        return writer.writeValue(value);
    }
    decode(reader) {
        return (0,lib_esm/* getAddress */.Kn)(lib_esm_hexZeroPad(reader.readValue().toHexString(), 20));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js


// Clones the functionality of an existing Coder, but without a localName
class AnonymousCoder extends Coder {
    constructor(coder) {
        super(coder.name, coder.type, undefined, coder.dynamic);
        this.coder = coder;
    }
    encode(writer, value) {
        return this.coder.encode(writer, value);
    }
    decode(reader) {
        return this.coder.decode(reader);
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/array.js



const array_logger = new lib_esm_Logger(abi_lib_esm_version_version);


function pack(writer, coders, values) {
    if (Array.isArray(values)) {
        // do nothing
    }
    else if (values && typeof (values) === "object") {
        let arrayValues = [];
        coders.forEach(function (coder) {
            arrayValues.push(values[coder.localName]);
        });
        values = arrayValues;
    }
    else {
        array_logger.throwArgumentError("invalid tuple value", "tuple", values);
    }
    if (coders.length !== values.length) {
        array_logger.throwArgumentError("types/value length mismatch", "tuple", values);
    }
    let staticWriter = new Writer(writer.wordSize);
    let dynamicWriter = new Writer(writer.wordSize);
    let updateFuncs = [];
    coders.forEach((coder, index) => {
        let value = values[index];
        if (coder.dynamic) {
            // Get current dynamic offset (for the future pointer)
            let dynamicOffset = dynamicWriter.length;
            // Encode the dynamic value into the dynamicWriter
            coder.encode(dynamicWriter, value);
            // Prepare to populate the correct offset once we are done
            let updateFunc = staticWriter.writeUpdatableValue();
            updateFuncs.push((baseOffset) => {
                updateFunc(baseOffset + dynamicOffset);
            });
        }
        else {
            coder.encode(staticWriter, value);
        }
    });
    // Backfill all the dynamic offsets, now that we know the static length
    updateFuncs.forEach((func) => { func(staticWriter.length); });
    let length = writer.writeBytes(staticWriter.data);
    length += writer.writeBytes(dynamicWriter.data);
    return length;
}
function unpack(reader, coders) {
    let values = [];
    // A reader anchored to this base
    let baseReader = reader.subReader(0);
    // The amount of dynamic data read; to consume later to synchronize
    let dynamicLength = 0;
    coders.forEach((coder) => {
        let value = null;
        if (coder.dynamic) {
            let offset = reader.readValue();
            let offsetReader = baseReader.subReader(offset.toNumber());
            try {
                value = coder.decode(offsetReader);
            }
            catch (error) {
                // Cannot recover from this
                if (error.code === lib_esm_Logger.errors.BUFFER_OVERRUN) {
                    throw error;
                }
                value = error;
                value.baseType = coder.name;
                value.name = coder.localName;
                value.type = coder.type;
            }
            dynamicLength += offsetReader.consumed;
        }
        else {
            try {
                value = coder.decode(reader);
            }
            catch (error) {
                // Cannot recover from this
                if (error.code === lib_esm_Logger.errors.BUFFER_OVERRUN) {
                    throw error;
                }
                value = error;
                value.baseType = coder.name;
                value.name = coder.localName;
                value.type = coder.type;
            }
        }
        if (value != undefined) {
            values.push(value);
        }
    });
    // @TODO: get rid of this an see if it still works?
    // Consume the dynamic components in the main reader
    reader.readBytes(dynamicLength);
    // Add any named parameters (i.e. tuples)
    coders.forEach((coder, index) => {
        let name = coder.localName;
        if (!name) {
            return;
        }
        if (name === "length") {
            name = "_length";
        }
        if (values[name] != null) {
            return;
        }
        const value = values[index];
        if (value instanceof Error) {
            Object.defineProperty(values, name, {
                get: () => { throw value; }
            });
        }
        else {
            values[name] = value;
        }
    });
    for (let i = 0; i < values.length; i++) {
        const value = values[i];
        if (value instanceof Error) {
            Object.defineProperty(values, i, {
                get: () => { throw value; }
            });
        }
    }
    return Object.freeze(values);
}
class ArrayCoder extends Coder {
    constructor(coder, length, localName) {
        const type = (coder.type + "[" + (length >= 0 ? length : "") + "]");
        const dynamic = (length === -1 || coder.dynamic);
        super("array", type, localName, dynamic);
        this.coder = coder;
        this.length = length;
    }
    encode(writer, value) {
        if (!Array.isArray(value)) {
            this._throwError("expected array value", value);
        }
        let count = this.length;
        if (count === -1) {
            count = value.length;
            writer.writeValue(value.length);
        }
        array_logger.checkArgumentCount(count, value.length, "coder array" + (this.localName ? (" " + this.localName) : ""));
        let coders = [];
        for (let i = 0; i < value.length; i++) {
            coders.push(this.coder);
        }
        return pack(writer, coders, value);
    }
    decode(reader) {
        let count = this.length;
        if (count === -1) {
            count = reader.readValue().toNumber();
        }
        let coders = [];
        for (let i = 0; i < count; i++) {
            coders.push(new AnonymousCoder(this.coder));
        }
        return reader.coerce(this.name, unpack(reader, coders));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/boolean.js


class BooleanCoder extends Coder {
    constructor(localName) {
        super("bool", "bool", localName, false);
    }
    encode(writer, value) {
        return writer.writeValue(value ? 1 : 0);
    }
    decode(reader) {
        return reader.coerce(this.type, !reader.readValue().isZero());
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/bytes.js



class DynamicBytesCoder extends Coder {
    constructor(type, localName) {
        super(type, type, localName, true);
    }
    encode(writer, value) {
        value = lib_esm_arrayify(value);
        let length = writer.writeValue(value.length);
        length += writer.writeBytes(value);
        return length;
    }
    decode(reader) {
        return reader.readBytes(reader.readValue().toNumber());
    }
}
class BytesCoder extends DynamicBytesCoder {
    constructor(localName) {
        super("bytes", localName);
    }
    decode(reader) {
        return reader.coerce(this.name, lib_esm_hexlify(super.decode(reader)));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js



// @TODO: Merge this with bytes
class FixedBytesCoder extends Coder {
    constructor(size, localName) {
        let name = "bytes" + String(size);
        super(name, name, localName, false);
        this.size = size;
    }
    encode(writer, value) {
        let data = lib_esm_arrayify(value);
        if (data.length !== this.size) {
            this._throwError("incorrect data length", value);
        }
        return writer.writeBytes(data);
    }
    decode(reader) {
        return reader.coerce(this.name, lib_esm_hexlify(reader.readBytes(this.size)));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/null.js


class NullCoder extends Coder {
    constructor(localName) {
        super("null", "", localName, false);
    }
    encode(writer, value) {
        if (value != null) {
            this._throwError("not null", value);
        }
        return writer.writeBytes([]);
    }
    decode(reader) {
        reader.readBytes(0);
        return reader.coerce(this.name, null);
    }
}

// EXTERNAL MODULE: ./node_modules/@ethersproject/constants/lib.esm/index.js + 8 modules
var constants_lib_esm = __webpack_require__(655337);
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/number.js




class NumberCoder extends Coder {
    constructor(size, signed, localName) {
        const name = ((signed ? "int" : "uint") + (size * 8));
        super(name, name, localName, false);
        this.size = size;
        this.signed = signed;
    }
    encode(writer, value) {
        let v = bignumber_BigNumber.from(value);
        // Check bounds are safe for encoding
        let maxUintValue = constants_lib_esm/* MaxUint256.mask */.Bz.mask(writer.wordSize * 8);
        if (this.signed) {
            let bounds = maxUintValue.mask(this.size * 8 - 1);
            if (v.gt(bounds) || v.lt(bounds.add(constants_lib_esm/* One */.fh).mul(constants_lib_esm/* NegativeOne */.tL))) {
                this._throwError("value out-of-bounds", value);
            }
        }
        else if (v.lt(constants_lib_esm/* Zero */._Y) || v.gt(maxUintValue.mask(this.size * 8))) {
            this._throwError("value out-of-bounds", value);
        }
        v = v.toTwos(this.size * 8).mask(this.size * 8);
        if (this.signed) {
            v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);
        }
        return writer.writeValue(v);
    }
    decode(reader) {
        let value = reader.readValue().mask(this.size * 8);
        if (this.signed) {
            value = value.fromTwos(this.size * 8);
        }
        return reader.coerce(this.name, value);
    }
}

// EXTERNAL MODULE: ./node_modules/@ethersproject/strings/lib.esm/index.js
var strings_lib_esm = __webpack_require__(462741);
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/string.js



class StringCoder extends DynamicBytesCoder {
    constructor(localName) {
        super("string", localName);
    }
    encode(writer, value) {
        return super.encode(writer, (0,strings_lib_esm/* toUtf8Bytes */.Y0)(value));
    }
    decode(reader) {
        return (0,strings_lib_esm/* toUtf8String */.ZN)(super.decode(reader));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/coders/tuple.js



class TupleCoder extends Coder {
    constructor(coders, localName) {
        let dynamic = false;
        const types = [];
        coders.forEach((coder) => {
            if (coder.dynamic) {
                dynamic = true;
            }
            types.push(coder.type);
        });
        const type = ("tuple(" + types.join(",") + ")");
        super("tuple", type, localName, dynamic);
        this.coders = coders;
    }
    encode(writer, value) {
        return pack(writer, this.coders, value);
    }
    decode(reader) {
        return reader.coerce(this.name, unpack(reader, this.coders));
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/abi-coder.js

// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI




const abi_coder_logger = new lib_esm_Logger(abi_lib_esm_version_version);











const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
class AbiCoder {
    constructor(coerceFunc) {
        abi_coder_logger.checkNew(new.target, AbiCoder);
        lib_esm_defineReadOnly(this, "coerceFunc", coerceFunc || null);
    }
    _getCoder(param) {
        switch (param.baseType) {
            case "address":
                return new AddressCoder(param.name);
            case "bool":
                return new BooleanCoder(param.name);
            case "string":
                return new StringCoder(param.name);
            case "bytes":
                return new BytesCoder(param.name);
            case "array":
                return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);
            case "tuple":
                return new TupleCoder((param.components || []).map((component) => {
                    return this._getCoder(component);
                }), param.name);
            case "":
                return new NullCoder(param.name);
        }
        // u?int[0-9]*
        let match = param.type.match(paramTypeNumber);
        if (match) {
            let size = parseInt(match[2] || "256");
            if (size === 0 || size > 256 || (size % 8) !== 0) {
                abi_coder_logger.throwArgumentError("invalid " + match[1] + " bit length", "param", param);
            }
            return new NumberCoder(size / 8, (match[1] === "int"), param.name);
        }
        // bytes[0-9]+
        match = param.type.match(paramTypeBytes);
        if (match) {
            let size = parseInt(match[1]);
            if (size === 0 || size > 32) {
                abi_coder_logger.throwArgumentError("invalid bytes length", "param", param);
            }
            return new FixedBytesCoder(size, param.name);
        }
        return abi_coder_logger.throwArgumentError("invalid type", "type", param.type);
    }
    _getWordSize() { return 32; }
    _getReader(data) {
        return new Reader(data, this._getWordSize(), this.coerceFunc);
    }
    _getWriter() {
        return new Writer(this._getWordSize());
    }
    encode(types, values) {
        if (types.length !== values.length) {
            abi_coder_logger.throwError("types/values length mismatch", lib_esm_Logger.errors.INVALID_ARGUMENT, {
                count: { types: types.length, values: values.length },
                value: { types: types, values: values }
            });
        }
        const coders = types.map((type) => this._getCoder(fragments_ParamType.from(type)));
        const coder = (new TupleCoder(coders, "_"));
        const writer = this._getWriter();
        coder.encode(writer, values);
        return writer.data;
    }
    decode(types, data) {
        const coders = types.map((type) => this._getCoder(fragments_ParamType.from(type)));
        const coder = new TupleCoder(coders, "_");
        return coder.decode(this._getReader(lib_esm_arrayify(data)));
    }
}
const abi_coder_defaultAbiCoder = new AbiCoder();

;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/node_modules/@ethersproject/logger/lib.esm/_version.js
const logger_lib_esm_version_version = "logger/5.0.6";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/node_modules/@ethersproject/logger/lib.esm/index.js

let lib_esm_permanentCensorErrors = false;
let lib_esm_censorErrors = false;
const lib_esm_LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 };
let lib_esm_logLevel = lib_esm_LogLevels["default"];

let lib_esm_globalLogger = null;
function lib_esm_checkNormalize() {
    try {
        const missing = [];
        // Make sure all forms of normalization are supported
        ["NFD", "NFC", "NFKD", "NFKC"].forEach((form) => {
            try {
                if ("test".normalize(form) !== "test") {
                    throw new Error("bad normalize");
                }
                ;
            }
            catch (error) {
                missing.push(form);
            }
        });
        if (missing.length) {
            throw new Error("missing " + missing.join(", "));
        }
        if (String.fromCharCode(0xe9).normalize("NFD") !== String.fromCharCode(0x65, 0x0301)) {
            throw new Error("broken implementation");
        }
    }
    catch (error) {
        return error.message;
    }
    return null;
}
const lib_esm_normalizeError = lib_esm_checkNormalize();
var lib_esm_LogLevel;
(function (LogLevel) {
    LogLevel["DEBUG"] = "DEBUG";
    LogLevel["INFO"] = "INFO";
    LogLevel["WARNING"] = "WARNING";
    LogLevel["ERROR"] = "ERROR";
    LogLevel["OFF"] = "OFF";
})(lib_esm_LogLevel || (lib_esm_LogLevel = {}));
var lib_esm_ErrorCode;
(function (ErrorCode) {
    ///////////////////
    // Generic Errors
    // Unknown Error
    ErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
    // Not Implemented
    ErrorCode["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED";
    // Unsupported Operation
    //   - operation
    ErrorCode["UNSUPPORTED_OPERATION"] = "UNSUPPORTED_OPERATION";
    // Network Error (i.e. Ethereum Network, such as an invalid chain ID)
    //   - event ("noNetwork" is not re-thrown in provider.ready; otherwise thrown)
    ErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
    // Some sort of bad response from the server
    ErrorCode["SERVER_ERROR"] = "SERVER_ERROR";
    // Timeout
    ErrorCode["TIMEOUT"] = "TIMEOUT";
    ///////////////////
    // Operational  Errors
    // Buffer Overrun
    ErrorCode["BUFFER_OVERRUN"] = "BUFFER_OVERRUN";
    // Numeric Fault
    //   - operation: the operation being executed
    //   - fault: the reason this faulted
    ErrorCode["NUMERIC_FAULT"] = "NUMERIC_FAULT";
    ///////////////////
    // Argument Errors
    // Missing new operator to an object
    //  - name: The name of the class
    ErrorCode["MISSING_NEW"] = "MISSING_NEW";
    // Invalid argument (e.g. value is incompatible with type) to a function:
    //   - argument: The argument name that was invalid
    //   - value: The value of the argument
    ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT";
    // Missing argument to a function:
    //   - count: The number of arguments received
    //   - expectedCount: The number of arguments expected
    ErrorCode["MISSING_ARGUMENT"] = "MISSING_ARGUMENT";
    // Too many arguments
    //   - count: The number of arguments received
    //   - expectedCount: The number of arguments expected
    ErrorCode["UNEXPECTED_ARGUMENT"] = "UNEXPECTED_ARGUMENT";
    ///////////////////
    // Blockchain Errors
    // Call exception
    //  - transaction: the transaction
    //  - address?: the contract address
    //  - args?: The arguments passed into the function
    //  - method?: The Solidity method signature
    //  - errorSignature?: The EIP848 error signature
    //  - errorArgs?: The EIP848 error parameters
    //  - reason: The reason (only for EIP848 "Error(string)")
    ErrorCode["CALL_EXCEPTION"] = "CALL_EXCEPTION";
    // Insufficien funds (< value + gasLimit * gasPrice)
    //   - transaction: the transaction attempted
    ErrorCode["INSUFFICIENT_FUNDS"] = "INSUFFICIENT_FUNDS";
    // Nonce has already been used
    //   - transaction: the transaction attempted
    ErrorCode["NONCE_EXPIRED"] = "NONCE_EXPIRED";
    // The replacement fee for the transaction is too low
    //   - transaction: the transaction attempted
    ErrorCode["REPLACEMENT_UNDERPRICED"] = "REPLACEMENT_UNDERPRICED";
    // The gas limit could not be estimated
    //   - transaction: the transaction passed to estimateGas
    ErrorCode["UNPREDICTABLE_GAS_LIMIT"] = "UNPREDICTABLE_GAS_LIMIT";
})(lib_esm_ErrorCode || (lib_esm_ErrorCode = {}));
;
class logger_lib_esm_Logger {
    constructor(version) {
        Object.defineProperty(this, "version", {
            enumerable: true,
            value: version,
            writable: false
        });
    }
    _log(logLevel, args) {
        const level = logLevel.toLowerCase();
        if (lib_esm_LogLevels[level] == null) {
            this.throwArgumentError("invalid log level name", "logLevel", logLevel);
        }
        if (lib_esm_logLevel > lib_esm_LogLevels[level]) {
            return;
        }
        console.log.apply(console, args);
    }
    debug(...args) {
        this._log(logger_lib_esm_Logger.levels.DEBUG, args);
    }
    info(...args) {
        this._log(logger_lib_esm_Logger.levels.INFO, args);
    }
    warn(...args) {
        this._log(logger_lib_esm_Logger.levels.WARNING, args);
    }
    makeError(message, code, params) {
        // Errors are being censored
        if (lib_esm_censorErrors) {
            return this.makeError("censored error", code, {});
        }
        if (!code) {
            code = logger_lib_esm_Logger.errors.UNKNOWN_ERROR;
        }
        if (!params) {
            params = {};
        }
        const messageDetails = [];
        Object.keys(params).forEach((key) => {
            try {
                messageDetails.push(key + "=" + JSON.stringify(params[key]));
            }
            catch (error) {
                messageDetails.push(key + "=" + JSON.stringify(params[key].toString()));
            }
        });
        messageDetails.push(`code=${code}`);
        messageDetails.push(`version=${this.version}`);
        const reason = message;
        if (messageDetails.length) {
            message += " (" + messageDetails.join(", ") + ")";
        }
        // @TODO: Any??
        const error = new Error(message);
        error.reason = reason;
        error.code = code;
        Object.keys(params).forEach(function (key) {
            error[key] = params[key];
        });
        return error;
    }
    throwError(message, code, params) {
        throw this.makeError(message, code, params);
    }
    throwArgumentError(message, name, value) {
        return this.throwError(message, logger_lib_esm_Logger.errors.INVALID_ARGUMENT, {
            argument: name,
            value: value
        });
    }
    assert(condition, message, code, params) {
        if (!!condition) {
            return;
        }
        this.throwError(message, code, params);
    }
    assertArgument(condition, message, name, value) {
        if (!!condition) {
            return;
        }
        this.throwArgumentError(message, name, value);
    }
    checkNormalize(message) {
        if (message == null) {
            message = "platform missing String.prototype.normalize";
        }
        if (lib_esm_normalizeError) {
            this.throwError("platform missing String.prototype.normalize", logger_lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "String.prototype.normalize", form: lib_esm_normalizeError
            });
        }
    }
    checkSafeUint53(value, message) {
        if (typeof (value) !== "number") {
            return;
        }
        if (message == null) {
            message = "value not safe";
        }
        if (value < 0 || value >= 0x1fffffffffffff) {
            this.throwError(message, logger_lib_esm_Logger.errors.NUMERIC_FAULT, {
                operation: "checkSafeInteger",
                fault: "out-of-safe-range",
                value: value
            });
        }
        if (value % 1) {
            this.throwError(message, logger_lib_esm_Logger.errors.NUMERIC_FAULT, {
                operation: "checkSafeInteger",
                fault: "non-integer",
                value: value
            });
        }
    }
    checkArgumentCount(count, expectedCount, message) {
        if (message) {
            message = ": " + message;
        }
        else {
            message = "";
        }
        if (count < expectedCount) {
            this.throwError("missing argument" + message, logger_lib_esm_Logger.errors.MISSING_ARGUMENT, {
                count: count,
                expectedCount: expectedCount
            });
        }
        if (count > expectedCount) {
            this.throwError("too many arguments" + message, logger_lib_esm_Logger.errors.UNEXPECTED_ARGUMENT, {
                count: count,
                expectedCount: expectedCount
            });
        }
    }
    checkNew(target, kind) {
        if (target === Object || target == null) {
            this.throwError("missing new", logger_lib_esm_Logger.errors.MISSING_NEW, { name: kind.name });
        }
    }
    checkAbstract(target, kind) {
        if (target === kind) {
            this.throwError("cannot instantiate abstract class " + JSON.stringify(kind.name) + " directly; use a sub-class", logger_lib_esm_Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: "new" });
        }
        else if (target === Object || target == null) {
            this.throwError("missing new", logger_lib_esm_Logger.errors.MISSING_NEW, { name: kind.name });
        }
    }
    static globalLogger() {
        if (!lib_esm_globalLogger) {
            lib_esm_globalLogger = new logger_lib_esm_Logger(logger_lib_esm_version_version);
        }
        return lib_esm_globalLogger;
    }
    static setCensorship(censorship, permanent) {
        if (!censorship && permanent) {
            this.globalLogger().throwError("cannot permanently disable censorship", logger_lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "setCensorship"
            });
        }
        if (lib_esm_permanentCensorErrors) {
            if (!censorship) {
                return;
            }
            this.globalLogger().throwError("error censorship permanent", logger_lib_esm_Logger.errors.UNSUPPORTED_OPERATION, {
                operation: "setCensorship"
            });
        }
        lib_esm_censorErrors = !!censorship;
        lib_esm_permanentCensorErrors = !!permanent;
    }
    static setLogLevel(logLevel) {
        const level = lib_esm_LogLevels[logLevel.toLowerCase()];
        if (level == null) {
            logger_lib_esm_Logger.globalLogger().warn("invalid log level - " + logLevel);
            return;
        }
        lib_esm_logLevel = level;
    }
}
logger_lib_esm_Logger.errors = lib_esm_ErrorCode;
logger_lib_esm_Logger.levels = lib_esm_LogLevel;
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/node_modules/@ethersproject/bytes/lib.esm/_version.js
const bytes_lib_esm_version_version = "bytes/5.0.5";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/node_modules/@ethersproject/bytes/lib.esm/index.js



const bytes_lib_esm_logger = new logger_lib_esm_Logger(bytes_lib_esm_version_version);
///////////////////////////////
function lib_esm_isHexable(value) {
    return !!(value.toHexString);
}
function lib_esm_addSlice(array) {
    if (array.slice) {
        return array;
    }
    array.slice = function () {
        const args = Array.prototype.slice.call(arguments);
        return lib_esm_addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));
    };
    return array;
}
function lib_esm_isBytesLike(value) {
    return ((bytes_lib_esm_isHexString(value) && !(value.length % 2)) || lib_esm_isBytes(value));
}
function lib_esm_isBytes(value) {
    if (value == null) {
        return false;
    }
    if (value.constructor === Uint8Array) {
        return true;
    }
    if (typeof (value) === "string") {
        return false;
    }
    if (value.length == null) {
        return false;
    }
    for (let i = 0; i < value.length; i++) {
        const v = value[i];
        if (v < 0 || v >= 256 || (v % 1)) {
            return false;
        }
    }
    return true;
}
function bytes_lib_esm_arrayify(value, options) {
    if (!options) {
        options = {};
    }
    if (typeof (value) === "number") {
        bytes_lib_esm_logger.checkSafeUint53(value, "invalid arrayify value");
        const result = [];
        while (value) {
            result.unshift(value & 0xff);
            value = parseInt(String(value / 256));
        }
        if (result.length === 0) {
            result.push(0);
        }
        return lib_esm_addSlice(new Uint8Array(result));
    }
    if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") {
        value = "0x" + value;
    }
    if (lib_esm_isHexable(value)) {
        value = value.toHexString();
    }
    if (bytes_lib_esm_isHexString(value)) {
        let hex = value.substring(2);
        if (hex.length % 2) {
            if (options.hexPad === "left") {
                hex = "0x0" + hex.substring(2);
            }
            else if (options.hexPad === "right") {
                hex += "0";
            }
            else {
                bytes_lib_esm_logger.throwArgumentError("hex data is odd-length", "value", value);
            }
        }
        const result = [];
        for (let i = 0; i < hex.length; i += 2) {
            result.push(parseInt(hex.substring(i, i + 2), 16));
        }
        return lib_esm_addSlice(new Uint8Array(result));
    }
    if (lib_esm_isBytes(value)) {
        return lib_esm_addSlice(new Uint8Array(value));
    }
    return bytes_lib_esm_logger.throwArgumentError("invalid arrayify value", "value", value);
}
function bytes_lib_esm_concat(items) {
    const objects = items.map(item => bytes_lib_esm_arrayify(item));
    const length = objects.reduce((accum, item) => (accum + item.length), 0);
    const result = new Uint8Array(length);
    objects.reduce((offset, object) => {
        result.set(object, offset);
        return offset + object.length;
    }, 0);
    return lib_esm_addSlice(result);
}
function lib_esm_stripZeros(value) {
    let result = bytes_lib_esm_arrayify(value);
    if (result.length === 0) {
        return result;
    }
    // Find the first non-zero entry
    let start = 0;
    while (start < result.length && result[start] === 0) {
        start++;
    }
    // If we started with zeros, strip them
    if (start) {
        result = result.slice(start);
    }
    return result;
}
function lib_esm_zeroPad(value, length) {
    value = bytes_lib_esm_arrayify(value);
    if (value.length > length) {
        bytes_lib_esm_logger.throwArgumentError("value out of range", "value", arguments[0]);
    }
    const result = new Uint8Array(length);
    result.set(value, length - value.length);
    return lib_esm_addSlice(result);
}
function bytes_lib_esm_isHexString(value, length) {
    if (typeof (value) !== "string" || !value.match(/^0x[0-9A-Fa-f]*$/)) {
        return false;
    }
    if (length && value.length !== 2 + 2 * length) {
        return false;
    }
    return true;
}
const lib_esm_HexCharacters = "0123456789abcdef";
function bytes_lib_esm_hexlify(value, options) {
    if (!options) {
        options = {};
    }
    if (typeof (value) === "number") {
        bytes_lib_esm_logger.checkSafeUint53(value, "invalid hexlify value");
        let hex = "";
        while (value) {
            hex = lib_esm_HexCharacters[value & 0x0f] + hex;
            value = Math.floor(value / 16);
        }
        if (hex.length) {
            if (hex.length % 2) {
                hex = "0" + hex;
            }
            return "0x" + hex;
        }
        return "0x00";
    }
    if (options.allowMissingPrefix && typeof (value) === "string" && value.substring(0, 2) !== "0x") {
        value = "0x" + value;
    }
    if (lib_esm_isHexable(value)) {
        return value.toHexString();
    }
    if (bytes_lib_esm_isHexString(value)) {
        if (value.length % 2) {
            if (options.hexPad === "left") {
                value = "0x0" + value.substring(2);
            }
            else if (options.hexPad === "right") {
                value += "0";
            }
            else {
                bytes_lib_esm_logger.throwArgumentError("hex data is odd-length", "value", value);
            }
        }
        return value.toLowerCase();
    }
    if (lib_esm_isBytes(value)) {
        let result = "0x";
        for (let i = 0; i < value.length; i++) {
            let v = value[i];
            result += lib_esm_HexCharacters[(v & 0xf0) >> 4] + lib_esm_HexCharacters[v & 0x0f];
        }
        return result;
    }
    return bytes_lib_esm_logger.throwArgumentError("invalid hexlify value", "value", value);
}
/*
function unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {
    if (typeof(value) === "string" && value.length % 2 && value.substring(0, 2) === "0x") {
        return "0x0" + value.substring(2);
    }
    return value;
}
*/
function lib_esm_hexDataLength(data) {
    if (typeof (data) !== "string") {
        data = bytes_lib_esm_hexlify(data);
    }
    else if (!bytes_lib_esm_isHexString(data) || (data.length % 2)) {
        return null;
    }
    return (data.length - 2) / 2;
}
function bytes_lib_esm_hexDataSlice(data, offset, endOffset) {
    if (typeof (data) !== "string") {
        data = bytes_lib_esm_hexlify(data);
    }
    else if (!bytes_lib_esm_isHexString(data) || (data.length % 2)) {
        bytes_lib_esm_logger.throwArgumentError("invalid hexData", "value", data);
    }
    offset = 2 + 2 * offset;
    if (endOffset != null) {
        return "0x" + data.substring(offset, 2 + 2 * endOffset);
    }
    return "0x" + data.substring(offset);
}
function lib_esm_hexConcat(items) {
    let result = "0x";
    items.forEach((item) => {
        result += bytes_lib_esm_hexlify(item).substring(2);
    });
    return result;
}
function lib_esm_hexValue(value) {
    const trimmed = lib_esm_hexStripZeros(bytes_lib_esm_hexlify(value, { hexPad: "left" }));
    if (trimmed === "0x") {
        return "0x0";
    }
    return trimmed;
}
function lib_esm_hexStripZeros(value) {
    if (typeof (value) !== "string") {
        value = bytes_lib_esm_hexlify(value);
    }
    if (!bytes_lib_esm_isHexString(value)) {
        bytes_lib_esm_logger.throwArgumentError("invalid hex string", "value", value);
    }
    value = value.substring(2);
    let offset = 0;
    while (offset < value.length && value[offset] === "0") {
        offset++;
    }
    return "0x" + value.substring(offset);
}
function bytes_lib_esm_hexZeroPad(value, length) {
    if (typeof (value) !== "string") {
        value = bytes_lib_esm_hexlify(value);
    }
    else if (!bytes_lib_esm_isHexString(value)) {
        bytes_lib_esm_logger.throwArgumentError("invalid hex string", "value", value);
    }
    if (value.length > 2 * length + 2) {
        bytes_lib_esm_logger.throwArgumentError("value out of range", "value", arguments[1]);
    }
    while (value.length < 2 * length + 2) {
        value = "0x0" + value.substring(2);
    }
    return value;
}
function lib_esm_splitSignature(signature) {
    const result = {
        r: "0x",
        s: "0x",
        _vs: "0x",
        recoveryParam: 0,
        v: 0
    };
    if (lib_esm_isBytesLike(signature)) {
        const bytes = bytes_lib_esm_arrayify(signature);
        if (bytes.length !== 65) {
            bytes_lib_esm_logger.throwArgumentError("invalid signature string; must be 65 bytes", "signature", signature);
        }
        // Get the r, s and v
        result.r = bytes_lib_esm_hexlify(bytes.slice(0, 32));
        result.s = bytes_lib_esm_hexlify(bytes.slice(32, 64));
        result.v = bytes[64];
        // Allow a recid to be used as the v
        if (result.v < 27) {
            if (result.v === 0 || result.v === 1) {
                result.v += 27;
            }
            else {
                bytes_lib_esm_logger.throwArgumentError("signature invalid v byte", "signature", signature);
            }
        }
        // Compute recoveryParam from v
        result.recoveryParam = 1 - (result.v % 2);
        // Compute _vs from recoveryParam and s
        if (result.recoveryParam) {
            bytes[32] |= 0x80;
        }
        result._vs = bytes_lib_esm_hexlify(bytes.slice(32, 64));
    }
    else {
        result.r = signature.r;
        result.s = signature.s;
        result.v = signature.v;
        result.recoveryParam = signature.recoveryParam;
        result._vs = signature._vs;
        // If the _vs is available, use it to populate missing s, v and recoveryParam
        // and verify non-missing s, v and recoveryParam
        if (result._vs != null) {
            const vs = lib_esm_zeroPad(bytes_lib_esm_arrayify(result._vs), 32);
            result._vs = bytes_lib_esm_hexlify(vs);
            // Set or check the recid
            const recoveryParam = ((vs[0] >= 128) ? 1 : 0);
            if (result.recoveryParam == null) {
                result.recoveryParam = recoveryParam;
            }
            else if (result.recoveryParam !== recoveryParam) {
                bytes_lib_esm_logger.throwArgumentError("signature recoveryParam mismatch _vs", "signature", signature);
            }
            // Set or check the s
            vs[0] &= 0x7f;
            const s = bytes_lib_esm_hexlify(vs);
            if (result.s == null) {
                result.s = s;
            }
            else if (result.s !== s) {
                bytes_lib_esm_logger.throwArgumentError("signature v mismatch _vs", "signature", signature);
            }
        }
        // Use recid and v to populate each other
        if (result.recoveryParam == null) {
            if (result.v == null) {
                bytes_lib_esm_logger.throwArgumentError("signature missing v and recoveryParam", "signature", signature);
            }
            else {
                result.recoveryParam = 1 - (result.v % 2);
            }
        }
        else {
            if (result.v == null) {
                result.v = 27 + result.recoveryParam;
            }
            else if (result.recoveryParam !== (1 - (result.v % 2))) {
                bytes_lib_esm_logger.throwArgumentError("signature recoveryParam mismatch v", "signature", signature);
            }
        }
        if (result.r == null || !bytes_lib_esm_isHexString(result.r)) {
            bytes_lib_esm_logger.throwArgumentError("signature missing or invalid r", "signature", signature);
        }
        else {
            result.r = bytes_lib_esm_hexZeroPad(result.r, 32);
        }
        if (result.s == null || !bytes_lib_esm_isHexString(result.s)) {
            bytes_lib_esm_logger.throwArgumentError("signature missing or invalid s", "signature", signature);
        }
        else {
            result.s = bytes_lib_esm_hexZeroPad(result.s, 32);
        }
        const vs = bytes_lib_esm_arrayify(result.s);
        if (vs[0] >= 128) {
            bytes_lib_esm_logger.throwArgumentError("signature s out of range", "signature", signature);
        }
        if (result.recoveryParam) {
            vs[0] |= 0x80;
        }
        const _vs = bytes_lib_esm_hexlify(vs);
        if (result._vs) {
            if (!bytes_lib_esm_isHexString(result._vs)) {
                bytes_lib_esm_logger.throwArgumentError("signature invalid _vs", "signature", signature);
            }
            result._vs = bytes_lib_esm_hexZeroPad(result._vs, 32);
        }
        // Set or check the _vs
        if (result._vs == null) {
            result._vs = _vs;
        }
        else if (result._vs !== _vs) {
            bytes_lib_esm_logger.throwArgumentError("signature _vs mismatch v and s", "signature", signature);
        }
    }
    return result;
}
function lib_esm_joinSignature(signature) {
    signature = lib_esm_splitSignature(signature);
    return bytes_lib_esm_hexlify(bytes_lib_esm_concat([
        signature.r,
        signature.s,
        (signature.recoveryParam ? "0x1c" : "0x1b")
    ]));
}
//# sourceMappingURL=index.js.map
// EXTERNAL MODULE: ./node_modules/@ethersproject/keccak256/lib.esm/index.js + 4 modules
var keccak256_lib_esm = __webpack_require__(11848);
;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/lib.esm/_version.js
const hash_lib_esm_version_version = "hash/5.0.5";
//# sourceMappingURL=_version.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/hash/lib.esm/index.js






const hash_lib_esm_logger = new logger_lib_esm_Logger(hash_lib_esm_version_version);
///////////////////////////////
const Zeros = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
const Partition = (/* unused pure expression or super */ null && (new RegExp("^((.*)\\.)?([^.]+)$")));
function isValidName(name) {
    try {
        const comps = name.split(".");
        for (let i = 0; i < comps.length; i++) {
            if (nameprep(comps[i]).length === 0) {
                throw new Error("empty");
            }
        }
        return true;
    }
    catch (error) { }
    return false;
}
function namehash(name) {
    /* istanbul ignore if */
    if (typeof (name) !== "string") {
        hash_lib_esm_logger.throwArgumentError("invalid address - " + String(name), "name", name);
    }
    let result = Zeros;
    while (name.length) {
        const partition = name.match(Partition);
        const label = toUtf8Bytes(nameprep(partition[3]));
        result = keccak256(concat([result, keccak256(label)]));
        name = partition[2] || "";
    }
    return hexlify(result);
}
function lib_esm_id(text) {
    return keccak256(toUtf8Bytes(text));
}
const messagePrefix = "\x19Ethereum Signed Message:\n";
function hashMessage(message) {
    if (typeof (message) === "string") {
        message = toUtf8Bytes(message);
    }
    return keccak256(concat([
        toUtf8Bytes(messagePrefix),
        toUtf8Bytes(String(message.length)),
        message
    ]));
}
//# sourceMappingURL=index.js.map
;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/interface.js












const interface_logger = new lib_esm_Logger(abi_lib_esm_version_version);

class LogDescription extends (/* unused pure expression or super */ null && (Description)) {
}
class TransactionDescription extends (/* unused pure expression or super */ null && (Description)) {
}
class Indexed extends (/* unused pure expression or super */ null && (Description)) {
    static isIndexed(value) {
        return !!(value && value._isIndexed);
    }
}
function wrapAccessError(property, error) {
    const wrap = new Error(`deferred error during ABI decoding triggered accessing ${property}`);
    wrap.error = error;
    return wrap;
}
function checkNames(fragment, type, params) {
    params.reduce((accum, param) => {
        if (param.name) {
            if (accum[param.name]) {
                interface_logger.throwArgumentError(`duplicate ${type} parameter ${JSON.stringify(param.name)} in ${fragment.format("full")}`, "fragment", fragment);
            }
            accum[param.name] = true;
        }
        return accum;
    }, {});
}
class Interface {
    constructor(fragments) {
        interface_logger.checkNew(new.target, Interface);
        let abi = [];
        if (typeof (fragments) === "string") {
            abi = JSON.parse(fragments);
        }
        else {
            abi = fragments;
        }
        defineReadOnly(this, "fragments", abi.map((fragment) => {
            return Fragment.from(fragment);
        }).filter((fragment) => (fragment != null)));
        defineReadOnly(this, "_abiCoder", getStatic((new.target), "getAbiCoder")());
        defineReadOnly(this, "functions", {});
        defineReadOnly(this, "errors", {});
        defineReadOnly(this, "events", {});
        defineReadOnly(this, "structs", {});
        // Add all fragments by their signature
        this.fragments.forEach((fragment) => {
            let bucket = null;
            switch (fragment.type) {
                case "constructor":
                    if (this.deploy) {
                        interface_logger.warn("duplicate definition - constructor");
                        return;
                    }
                    checkNames(fragment, "input", fragment.inputs);
                    defineReadOnly(this, "deploy", fragment);
                    return;
                case "function":
                    checkNames(fragment, "input", fragment.inputs);
                    checkNames(fragment, "output", fragment.outputs);
                    bucket = this.functions;
                    break;
                case "event":
                    checkNames(fragment, "input", fragment.inputs);
                    bucket = this.events;
                    break;
                default:
                    return;
            }
            let signature = fragment.format();
            if (bucket[signature]) {
                interface_logger.warn("duplicate definition - " + signature);
                return;
            }
            bucket[signature] = fragment;
        });
        // If we do not have a constructor add a default
        if (!this.deploy) {
            defineReadOnly(this, "deploy", ConstructorFragment.from({
                payable: false,
                type: "constructor"
            }));
        }
        defineReadOnly(this, "_isInterface", true);
    }
    format(format) {
        if (!format) {
            format = FormatTypes.full;
        }
        if (format === FormatTypes.sighash) {
            interface_logger.throwArgumentError("interface does not support formatting sighash", "format", format);
        }
        const abi = this.fragments.map((fragment) => fragment.format(format));
        // We need to re-bundle the JSON fragments a bit
        if (format === FormatTypes.json) {
            return JSON.stringify(abi.map((j) => JSON.parse(j)));
        }
        return abi;
    }
    // Sub-classes can override these to handle other blockchains
    static getAbiCoder() {
        return defaultAbiCoder;
    }
    static getAddress(address) {
        return getAddress(address);
    }
    static getSighash(functionFragment) {
        return hexDataSlice(id(functionFragment.format()), 0, 4);
    }
    static getEventTopic(eventFragment) {
        return id(eventFragment.format());
    }
    // Find a function definition by any means necessary (unless it is ambiguous)
    getFunction(nameOrSignatureOrSighash) {
        if (isHexString(nameOrSignatureOrSighash)) {
            for (const name in this.functions) {
                if (nameOrSignatureOrSighash === this.getSighash(name)) {
                    return this.functions[name];
                }
            }
            interface_logger.throwArgumentError("no matching function", "sighash", nameOrSignatureOrSighash);
        }
        // It is a bare name, look up the function (will return null if ambiguous)
        if (nameOrSignatureOrSighash.indexOf("(") === -1) {
            const name = nameOrSignatureOrSighash.trim();
            const matching = Object.keys(this.functions).filter((f) => (f.split("(" /* fix:) */)[0] === name));
            if (matching.length === 0) {
                interface_logger.throwArgumentError("no matching function", "name", name);
            }
            else if (matching.length > 1) {
                interface_logger.throwArgumentError("multiple matching functions", "name", name);
            }
            return this.functions[matching[0]];
        }
        // Normlize the signature and lookup the function
        const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];
        if (!result) {
            interface_logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash);
        }
        return result;
    }
    // Find an event definition by any means necessary (unless it is ambiguous)
    getEvent(nameOrSignatureOrTopic) {
        if (isHexString(nameOrSignatureOrTopic)) {
            const topichash = nameOrSignatureOrTopic.toLowerCase();
            for (const name in this.events) {
                if (topichash === this.getEventTopic(name)) {
                    return this.events[name];
                }
            }
            interface_logger.throwArgumentError("no matching event", "topichash", topichash);
        }
        // It is a bare name, look up the function (will return null if ambiguous)
        if (nameOrSignatureOrTopic.indexOf("(") === -1) {
            const name = nameOrSignatureOrTopic.trim();
            const matching = Object.keys(this.events).filter((f) => (f.split("(" /* fix:) */)[0] === name));
            if (matching.length === 0) {
                interface_logger.throwArgumentError("no matching event", "name", name);
            }
            else if (matching.length > 1) {
                interface_logger.throwArgumentError("multiple matching events", "name", name);
            }
            return this.events[matching[0]];
        }
        // Normlize the signature and lookup the function
        const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];
        if (!result) {
            interface_logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic);
        }
        return result;
    }
    // Get the sighash (the bytes4 selector) used by Solidity to identify a function
    getSighash(functionFragment) {
        if (typeof (functionFragment) === "string") {
            functionFragment = this.getFunction(functionFragment);
        }
        return getStatic(this.constructor, "getSighash")(functionFragment);
    }
    // Get the topic (the bytes32 hash) used by Solidity to identify an event
    getEventTopic(eventFragment) {
        if (typeof (eventFragment) === "string") {
            eventFragment = this.getEvent(eventFragment);
        }
        return getStatic(this.constructor, "getEventTopic")(eventFragment);
    }
    _decodeParams(params, data) {
        return this._abiCoder.decode(params, data);
    }
    _encodeParams(params, values) {
        return this._abiCoder.encode(params, values);
    }
    encodeDeploy(values) {
        return this._encodeParams(this.deploy.inputs, values || []);
    }
    // Decode the data for a function call (e.g. tx.data)
    decodeFunctionData(functionFragment, data) {
        if (typeof (functionFragment) === "string") {
            functionFragment = this.getFunction(functionFragment);
        }
        const bytes = arrayify(data);
        if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {
            interface_logger.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, "data", hexlify(bytes));
        }
        return this._decodeParams(functionFragment.inputs, bytes.slice(4));
    }
    // Encode the data for a function call (e.g. tx.data)
    encodeFunctionData(functionFragment, values) {
        if (typeof (functionFragment) === "string") {
            functionFragment = this.getFunction(functionFragment);
        }
        return hexlify(concat([
            this.getSighash(functionFragment),
            this._encodeParams(functionFragment.inputs, values || [])
        ]));
    }
    // Decode the result from a function call (e.g. from eth_call)
    decodeFunctionResult(functionFragment, data) {
        if (typeof (functionFragment) === "string") {
            functionFragment = this.getFunction(functionFragment);
        }
        let bytes = arrayify(data);
        let reason = null;
        let errorSignature = null;
        switch (bytes.length % this._abiCoder._getWordSize()) {
            case 0:
                try {
                    return this._abiCoder.decode(functionFragment.outputs, bytes);
                }
                catch (error) { }
                break;
            case 4:
                if (hexlify(bytes.slice(0, 4)) === "0x08c379a0") {
                    errorSignature = "Error(string)";
                    reason = this._abiCoder.decode(["string"], bytes.slice(4))[0];
                }
                break;
        }
        return interface_logger.throwError("call revert exception", Logger.errors.CALL_EXCEPTION, {
            method: functionFragment.format(),
            errorSignature: errorSignature,
            errorArgs: [reason],
            reason: reason
        });
    }
    // Encode the result for a function call (e.g. for eth_call)
    encodeFunctionResult(functionFragment, values) {
        if (typeof (functionFragment) === "string") {
            functionFragment = this.getFunction(functionFragment);
        }
        return hexlify(this._abiCoder.encode(functionFragment.outputs, values || []));
    }
    // Create the filter for the event with search criteria (e.g. for eth_filterLog)
    encodeFilterTopics(eventFragment, values) {
        if (typeof (eventFragment) === "string") {
            eventFragment = this.getEvent(eventFragment);
        }
        if (values.length > eventFragment.inputs.length) {
            interface_logger.throwError("too many arguments for " + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {
                argument: "values",
                value: values
            });
        }
        let topics = [];
        if (!eventFragment.anonymous) {
            topics.push(this.getEventTopic(eventFragment));
        }
        const encodeTopic = (param, value) => {
            if (param.type === "string") {
                return id(value);
            }
            else if (param.type === "bytes") {
                return keccak256(hexlify(value));
            }
            // Check addresses are valid
            if (param.type === "address") {
                this._abiCoder.encode(["address"], [value]);
            }
            return hexZeroPad(hexlify(value), 32);
        };
        values.forEach((value, index) => {
            let param = eventFragment.inputs[index];
            if (!param.indexed) {
                if (value != null) {
                    interface_logger.throwArgumentError("cannot filter non-indexed parameters; must be null", ("contract." + param.name), value);
                }
                return;
            }
            if (value == null) {
                topics.push(null);
            }
            else if (param.baseType === "array" || param.baseType === "tuple") {
                interface_logger.throwArgumentError("filtering with tuples or arrays not supported", ("contract." + param.name), value);
            }
            else if (Array.isArray(value)) {
                topics.push(value.map((value) => encodeTopic(param, value)));
            }
            else {
                topics.push(encodeTopic(param, value));
            }
        });
        // Trim off trailing nulls
        while (topics.length && topics[topics.length - 1] === null) {
            topics.pop();
        }
        return topics;
    }
    encodeEventLog(eventFragment, values) {
        if (typeof (eventFragment) === "string") {
            eventFragment = this.getEvent(eventFragment);
        }
        const topics = [];
        const dataTypes = [];
        const dataValues = [];
        if (!eventFragment.anonymous) {
            topics.push(this.getEventTopic(eventFragment));
        }
        if (values.length !== eventFragment.inputs.length) {
            interface_logger.throwArgumentError("event arguments/values mismatch", "values", values);
        }
        eventFragment.inputs.forEach((param, index) => {
            const value = values[index];
            if (param.indexed) {
                if (param.type === "string") {
                    topics.push(id(value));
                }
                else if (param.type === "bytes") {
                    topics.push(keccak256(value));
                }
                else if (param.baseType === "tuple" || param.baseType === "array") {
                    // @TOOD
                    throw new Error("not implemented");
                }
                else {
                    topics.push(this._abiCoder.encode([param.type], [value]));
                }
            }
            else {
                dataTypes.push(param);
                dataValues.push(value);
            }
        });
        return {
            data: this._abiCoder.encode(dataTypes, dataValues),
            topics: topics
        };
    }
    // Decode a filter for the event and the search criteria
    decodeEventLog(eventFragment, data, topics) {
        if (typeof (eventFragment) === "string") {
            eventFragment = this.getEvent(eventFragment);
        }
        if (topics != null && !eventFragment.anonymous) {
            let topicHash = this.getEventTopic(eventFragment);
            if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {
                interface_logger.throwError("fragment/topic mismatch", Logger.errors.INVALID_ARGUMENT, { argument: "topics[0]", expected: topicHash, value: topics[0] });
            }
            topics = topics.slice(1);
        }
        let indexed = [];
        let nonIndexed = [];
        let dynamic = [];
        eventFragment.inputs.forEach((param, index) => {
            if (param.indexed) {
                if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") {
                    indexed.push(ParamType.fromObject({ type: "bytes32", name: param.name }));
                    dynamic.push(true);
                }
                else {
                    indexed.push(param);
                    dynamic.push(false);
                }
            }
            else {
                nonIndexed.push(param);
                dynamic.push(false);
            }
        });
        let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)) : null;
        let resultNonIndexed = this._abiCoder.decode(nonIndexed, data);
        let result = [];
        let nonIndexedIndex = 0, indexedIndex = 0;
        eventFragment.inputs.forEach((param, index) => {
            if (param.indexed) {
                if (resultIndexed == null) {
                    result[index] = new Indexed({ _isIndexed: true, hash: null });
                }
                else if (dynamic[index]) {
                    result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });
                }
                else {
                    try {
                        result[index] = resultIndexed[indexedIndex++];
                    }
                    catch (error) {
                        result[index] = error;
                    }
                }
            }
            else {
                try {
                    result[index] = resultNonIndexed[nonIndexedIndex++];
                }
                catch (error) {
                    result[index] = error;
                }
            }
            // Add the keyword argument if named and safe
            if (param.name && result[param.name] == null) {
                const value = result[index];
                // Make error named values throw on access
                if (value instanceof Error) {
                    Object.defineProperty(result, param.name, {
                        get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); }
                    });
                }
                else {
                    result[param.name] = value;
                }
            }
        });
        // Make all error indexed values throw on access
        for (let i = 0; i < result.length; i++) {
            const value = result[i];
            if (value instanceof Error) {
                Object.defineProperty(result, i, {
                    get: () => { throw wrapAccessError(`index ${i}`, value); }
                });
            }
        }
        return Object.freeze(result);
    }
    // Given a transaction, find the matching function fragment (if any) and
    // determine all its properties and call parameters
    parseTransaction(tx) {
        let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());
        if (!fragment) {
            return null;
        }
        return new TransactionDescription({
            args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)),
            functionFragment: fragment,
            name: fragment.name,
            signature: fragment.format(),
            sighash: this.getSighash(fragment),
            value: BigNumber.from(tx.value || "0"),
        });
    }
    // Given an event log, find the matching event fragment (if any) and
    // determine all its properties and values
    parseLog(log) {
        let fragment = this.getEvent(log.topics[0]);
        if (!fragment || fragment.anonymous) {
            return null;
        }
        // @TODO: If anonymous, and the only method, and the input count matches, should we parse?
        //        Probably not, because just because it is the only event in the ABI does
        //        not mean we have the full ABI; maybe jsut a fragment?
        return new LogDescription({
            eventFragment: fragment,
            name: fragment.name,
            signature: fragment.format(),
            topic: this.getEventTopic(fragment),
            args: this.decodeEventLog(fragment, log.data, log.topics)
        });
    }
    /*
    static from(value: Array<Fragment | string | JsonAbi> | string | Interface) {
        if (Interface.isInterface(value)) {
            return value;
        }
        if (typeof(value) === "string") {
            return new Interface(JSON.parse(value));
        }
        return new Interface(value);
    }
    */
    static isInterface(value) {
        return !!(value && value._isInterface);
    }
}

;// CONCATENATED MODULE: ./node_modules/@ethersproject/abi/lib.esm/index.js







/***/ }),

/***/ 462741:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Y0": () => (/* reexport safe */ _utf8__WEBPACK_IMPORTED_MODULE_2__.Y0),
/* harmony export */   "ZN": () => (/* reexport safe */ _utf8__WEBPACK_IMPORTED_MODULE_2__.ZN)
/* harmony export */ });
/* harmony import */ var _bytes32__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(986237);
/* harmony import */ var _idna__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(835637);
/* harmony import */ var _utf8__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(244242);





//# sourceMappingURL=index.js.map

/***/ }),

/***/ 475443:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
function createHashFunction(hashConstructor) {
    return function (msg) {
        var hash = hashConstructor();
        hash.update(msg);
        return Buffer.from(hash.digest());
    };
}
exports.createHashFunction = createHashFunction;
//# sourceMappingURL=hash-utils.js.map

/***/ }),

/***/ 55107:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var hdkey = __webpack_require__(657969);
exports.HDKey = hdkey;
//# sourceMappingURL=hdkey.js.map

/***/ }),

/***/ 682192:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var hash_utils_1 = __webpack_require__(475443);
var createKeccakHash = __webpack_require__(877864);
exports.keccak224 = hash_utils_1.createHashFunction(function () {
    return createKeccakHash("keccak224");
});
exports.keccak256 = hash_utils_1.createHashFunction(function () {
    return createKeccakHash("keccak256");
});
exports.keccak384 = hash_utils_1.createHashFunction(function () {
    return createKeccakHash("keccak384");
});
exports.keccak512 = hash_utils_1.createHashFunction(function () {
    return createKeccakHash("keccak512");
});
//# sourceMappingURL=keccak.js.map

/***/ }),

/***/ 546698:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var elliptic = exports;

elliptic.version = __webpack_require__(636409)/* .version */ .i8;
elliptic.utils = __webpack_require__(587383);
elliptic.rand = __webpack_require__(929931);
elliptic.curve = __webpack_require__(992116);
elliptic.curves = __webpack_require__(456314);

// Protocols
elliptic.ec = __webpack_require__(86747);
elliptic.eddsa = __webpack_require__(901334);


/***/ }),

/***/ 177852:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(587383);
var getNAF = utils.getNAF;
var getJSF = utils.getJSF;
var assert = utils.assert;

function BaseCurve(type, conf) {
  this.type = type;
  this.p = new BN(conf.p, 16);

  // Use Montgomery, when there is no fast reduction for the prime
  this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);

  // Useful for many curves
  this.zero = new BN(0).toRed(this.red);
  this.one = new BN(1).toRed(this.red);
  this.two = new BN(2).toRed(this.red);

  // Curve configuration, optional
  this.n = conf.n && new BN(conf.n, 16);
  this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);

  // Temporary arrays
  this._wnafT1 = new Array(4);
  this._wnafT2 = new Array(4);
  this._wnafT3 = new Array(4);
  this._wnafT4 = new Array(4);

  this._bitLength = this.n ? this.n.bitLength() : 0;

  // Generalized Greg Maxwell's trick
  var adjustCount = this.n && this.p.div(this.n);
  if (!adjustCount || adjustCount.cmpn(100) > 0) {
    this.redN = null;
  } else {
    this._maxwellTrick = true;
    this.redN = this.n.toRed(this.red);
  }
}
module.exports = BaseCurve;

BaseCurve.prototype.point = function point() {
  throw new Error('Not implemented');
};

BaseCurve.prototype.validate = function validate() {
  throw new Error('Not implemented');
};

BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
  assert(p.precomputed);
  var doubles = p._getDoubles();

  var naf = getNAF(k, 1, this._bitLength);
  var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
  I /= 3;

  // Translate into more windowed form
  var repr = [];
  for (var j = 0; j < naf.length; j += doubles.step) {
    var nafW = 0;
    for (var k = j + doubles.step - 1; k >= j; k--)
      nafW = (nafW << 1) + naf[k];
    repr.push(nafW);
  }

  var a = this.jpoint(null, null, null);
  var b = this.jpoint(null, null, null);
  for (var i = I; i > 0; i--) {
    for (var j = 0; j < repr.length; j++) {
      var nafW = repr[j];
      if (nafW === i)
        b = b.mixedAdd(doubles.points[j]);
      else if (nafW === -i)
        b = b.mixedAdd(doubles.points[j].neg());
    }
    a = a.add(b);
  }
  return a.toP();
};

BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
  var w = 4;

  // Precompute window
  var nafPoints = p._getNAFPoints(w);
  w = nafPoints.wnd;
  var wnd = nafPoints.points;

  // Get NAF form
  var naf = getNAF(k, w, this._bitLength);

  // Add `this`*(N+1) for every w-NAF index
  var acc = this.jpoint(null, null, null);
  for (var i = naf.length - 1; i >= 0; i--) {
    // Count zeroes
    for (var k = 0; i >= 0 && naf[i] === 0; i--)
      k++;
    if (i >= 0)
      k++;
    acc = acc.dblp(k);

    if (i < 0)
      break;
    var z = naf[i];
    assert(z !== 0);
    if (p.type === 'affine') {
      // J +- P
      if (z > 0)
        acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
      else
        acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
    } else {
      // J +- J
      if (z > 0)
        acc = acc.add(wnd[(z - 1) >> 1]);
      else
        acc = acc.add(wnd[(-z - 1) >> 1].neg());
    }
  }
  return p.type === 'affine' ? acc.toP() : acc;
};

BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
                                                       points,
                                                       coeffs,
                                                       len,
                                                       jacobianResult) {
  var wndWidth = this._wnafT1;
  var wnd = this._wnafT2;
  var naf = this._wnafT3;

  // Fill all arrays
  var max = 0;
  for (var i = 0; i < len; i++) {
    var p = points[i];
    var nafPoints = p._getNAFPoints(defW);
    wndWidth[i] = nafPoints.wnd;
    wnd[i] = nafPoints.points;
  }

  // Comb small window NAFs
  for (var i = len - 1; i >= 1; i -= 2) {
    var a = i - 1;
    var b = i;
    if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
      naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
      naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
      max = Math.max(naf[a].length, max);
      max = Math.max(naf[b].length, max);
      continue;
    }

    var comb = [
      points[a], /* 1 */
      null, /* 3 */
      null, /* 5 */
      points[b] /* 7 */
    ];

    // Try to avoid Projective points, if possible
    if (points[a].y.cmp(points[b].y) === 0) {
      comb[1] = points[a].add(points[b]);
      comb[2] = points[a].toJ().mixedAdd(points[b].neg());
    } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
      comb[1] = points[a].toJ().mixedAdd(points[b]);
      comb[2] = points[a].add(points[b].neg());
    } else {
      comb[1] = points[a].toJ().mixedAdd(points[b]);
      comb[2] = points[a].toJ().mixedAdd(points[b].neg());
    }

    var index = [
      -3, /* -1 -1 */
      -1, /* -1 0 */
      -5, /* -1 1 */
      -7, /* 0 -1 */
      0, /* 0 0 */
      7, /* 0 1 */
      5, /* 1 -1 */
      1, /* 1 0 */
      3  /* 1 1 */
    ];

    var jsf = getJSF(coeffs[a], coeffs[b]);
    max = Math.max(jsf[0].length, max);
    naf[a] = new Array(max);
    naf[b] = new Array(max);
    for (var j = 0; j < max; j++) {
      var ja = jsf[0][j] | 0;
      var jb = jsf[1][j] | 0;

      naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
      naf[b][j] = 0;
      wnd[a] = comb;
    }
  }

  var acc = this.jpoint(null, null, null);
  var tmp = this._wnafT4;
  for (var i = max; i >= 0; i--) {
    var k = 0;

    while (i >= 0) {
      var zero = true;
      for (var j = 0; j < len; j++) {
        tmp[j] = naf[j][i] | 0;
        if (tmp[j] !== 0)
          zero = false;
      }
      if (!zero)
        break;
      k++;
      i--;
    }
    if (i >= 0)
      k++;
    acc = acc.dblp(k);
    if (i < 0)
      break;

    for (var j = 0; j < len; j++) {
      var z = tmp[j];
      var p;
      if (z === 0)
        continue;
      else if (z > 0)
        p = wnd[j][(z - 1) >> 1];
      else if (z < 0)
        p = wnd[j][(-z - 1) >> 1].neg();

      if (p.type === 'affine')
        acc = acc.mixedAdd(p);
      else
        acc = acc.add(p);
    }
  }
  // Zeroify references
  for (var i = 0; i < len; i++)
    wnd[i] = null;

  if (jacobianResult)
    return acc;
  else
    return acc.toP();
};

function BasePoint(curve, type) {
  this.curve = curve;
  this.type = type;
  this.precomputed = null;
}
BaseCurve.BasePoint = BasePoint;

BasePoint.prototype.eq = function eq(/*other*/) {
  throw new Error('Not implemented');
};

BasePoint.prototype.validate = function validate() {
  return this.curve.validate(this);
};

BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  bytes = utils.toArray(bytes, enc);

  var len = this.p.byteLength();

  // uncompressed, hybrid-odd, hybrid-even
  if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
      bytes.length - 1 === 2 * len) {
    if (bytes[0] === 0x06)
      assert(bytes[bytes.length - 1] % 2 === 0);
    else if (bytes[0] === 0x07)
      assert(bytes[bytes.length - 1] % 2 === 1);

    var res =  this.point(bytes.slice(1, 1 + len),
                          bytes.slice(1 + len, 1 + 2 * len));

    return res;
  } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
              bytes.length - 1 === len) {
    return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
  }
  throw new Error('Unknown point format');
};

BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
  return this.encode(enc, true);
};

BasePoint.prototype._encode = function _encode(compact) {
  var len = this.curve.p.byteLength();
  var x = this.getX().toArray('be', len);

  if (compact)
    return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);

  return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;
};

BasePoint.prototype.encode = function encode(enc, compact) {
  return utils.encode(this._encode(compact), enc);
};

BasePoint.prototype.precompute = function precompute(power) {
  if (this.precomputed)
    return this;

  var precomputed = {
    doubles: null,
    naf: null,
    beta: null
  };
  precomputed.naf = this._getNAFPoints(8);
  precomputed.doubles = this._getDoubles(4, power);
  precomputed.beta = this._getBeta();
  this.precomputed = precomputed;

  return this;
};

BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
  if (!this.precomputed)
    return false;

  var doubles = this.precomputed.doubles;
  if (!doubles)
    return false;

  return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
};

BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
  if (this.precomputed && this.precomputed.doubles)
    return this.precomputed.doubles;

  var doubles = [ this ];
  var acc = this;
  for (var i = 0; i < power; i += step) {
    for (var j = 0; j < step; j++)
      acc = acc.dbl();
    doubles.push(acc);
  }
  return {
    step: step,
    points: doubles
  };
};

BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
  if (this.precomputed && this.precomputed.naf)
    return this.precomputed.naf;

  var res = [ this ];
  var max = (1 << wnd) - 1;
  var dbl = max === 1 ? null : this.dbl();
  for (var i = 1; i < max; i++)
    res[i] = res[i - 1].add(dbl);
  return {
    wnd: wnd,
    points: res
  };
};

BasePoint.prototype._getBeta = function _getBeta() {
  return null;
};

BasePoint.prototype.dblp = function dblp(k) {
  var r = this;
  for (var i = 0; i < k; i++)
    r = r.dbl();
  return r;
};


/***/ }),

/***/ 802246:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(587383);
var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(177852);

var assert = utils.assert;

function EdwardsCurve(conf) {
  // NOTE: Important as we are creating point in Base.call()
  this.twisted = (conf.a | 0) !== 1;
  this.mOneA = this.twisted && (conf.a | 0) === -1;
  this.extended = this.mOneA;

  Base.call(this, 'edwards', conf);

  this.a = new BN(conf.a, 16).umod(this.red.m);
  this.a = this.a.toRed(this.red);
  this.c = new BN(conf.c, 16).toRed(this.red);
  this.c2 = this.c.redSqr();
  this.d = new BN(conf.d, 16).toRed(this.red);
  this.dd = this.d.redAdd(this.d);

  assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
  this.oneC = (conf.c | 0) === 1;
}
inherits(EdwardsCurve, Base);
module.exports = EdwardsCurve;

EdwardsCurve.prototype._mulA = function _mulA(num) {
  if (this.mOneA)
    return num.redNeg();
  else
    return this.a.redMul(num);
};

EdwardsCurve.prototype._mulC = function _mulC(num) {
  if (this.oneC)
    return num;
  else
    return this.c.redMul(num);
};

// Just for compatibility with Short curve
EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
  return this.point(x, y, z, t);
};

EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
  x = new BN(x, 16);
  if (!x.red)
    x = x.toRed(this.red);

  var x2 = x.redSqr();
  var rhs = this.c2.redSub(this.a.redMul(x2));
  var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));

  var y2 = rhs.redMul(lhs.redInvm());
  var y = y2.redSqrt();
  if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  var isOdd = y.fromRed().isOdd();
  if (odd && !isOdd || !odd && isOdd)
    y = y.redNeg();

  return this.point(x, y);
};

EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
  y = new BN(y, 16);
  if (!y.red)
    y = y.toRed(this.red);

  // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)
  var y2 = y.redSqr();
  var lhs = y2.redSub(this.c2);
  var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);
  var x2 = lhs.redMul(rhs.redInvm());

  if (x2.cmp(this.zero) === 0) {
    if (odd)
      throw new Error('invalid point');
    else
      return this.point(this.zero, y);
  }

  var x = x2.redSqrt();
  if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  if (x.fromRed().isOdd() !== odd)
    x = x.redNeg();

  return this.point(x, y);
};

EdwardsCurve.prototype.validate = function validate(point) {
  if (point.isInfinity())
    return true;

  // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
  point.normalize();

  var x2 = point.x.redSqr();
  var y2 = point.y.redSqr();
  var lhs = x2.redMul(this.a).redAdd(y2);
  var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));

  return lhs.cmp(rhs) === 0;
};

function Point(curve, x, y, z, t) {
  Base.BasePoint.call(this, curve, 'projective');
  if (x === null && y === null && z === null) {
    this.x = this.curve.zero;
    this.y = this.curve.one;
    this.z = this.curve.one;
    this.t = this.curve.zero;
    this.zOne = true;
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    this.z = z ? new BN(z, 16) : this.curve.one;
    this.t = t && new BN(t, 16);
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.y.red)
      this.y = this.y.toRed(this.curve.red);
    if (!this.z.red)
      this.z = this.z.toRed(this.curve.red);
    if (this.t && !this.t.red)
      this.t = this.t.toRed(this.curve.red);
    this.zOne = this.z === this.curve.one;

    // Use extended coordinates
    if (this.curve.extended && !this.t) {
      this.t = this.x.redMul(this.y);
      if (!this.zOne)
        this.t = this.t.redMul(this.z.redInvm());
    }
  }
}
inherits(Point, Base.BasePoint);

EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  return Point.fromJSON(this, obj);
};

EdwardsCurve.prototype.point = function point(x, y, z, t) {
  return new Point(this, x, y, z, t);
};

Point.fromJSON = function fromJSON(curve, obj) {
  return new Point(curve, obj[0], obj[1], obj[2]);
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' y: ' + this.y.fromRed().toString(16, 2) +
      ' z: ' + this.z.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.x.cmpn(0) === 0 &&
    (this.y.cmp(this.z) === 0 ||
    (this.zOne && this.y.cmp(this.curve.c) === 0));
};

Point.prototype._extDbl = function _extDbl() {
  // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  //     #doubling-dbl-2008-hwcd
  // 4M + 4S

  // A = X1^2
  var a = this.x.redSqr();
  // B = Y1^2
  var b = this.y.redSqr();
  // C = 2 * Z1^2
  var c = this.z.redSqr();
  c = c.redIAdd(c);
  // D = a * A
  var d = this.curve._mulA(a);
  // E = (X1 + Y1)^2 - A - B
  var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
  // G = D + B
  var g = d.redAdd(b);
  // F = G - C
  var f = g.redSub(c);
  // H = D - B
  var h = d.redSub(b);
  // X3 = E * F
  var nx = e.redMul(f);
  // Y3 = G * H
  var ny = g.redMul(h);
  // T3 = E * H
  var nt = e.redMul(h);
  // Z3 = F * G
  var nz = f.redMul(g);
  return this.curve.point(nx, ny, nz, nt);
};

Point.prototype._projDbl = function _projDbl() {
  // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  //     #doubling-dbl-2008-bbjlp
  //     #doubling-dbl-2007-bl
  // and others
  // Generally 3M + 4S or 2M + 4S

  // B = (X1 + Y1)^2
  var b = this.x.redAdd(this.y).redSqr();
  // C = X1^2
  var c = this.x.redSqr();
  // D = Y1^2
  var d = this.y.redSqr();

  var nx;
  var ny;
  var nz;
  if (this.curve.twisted) {
    // E = a * C
    var e = this.curve._mulA(c);
    // F = E + D
    var f = e.redAdd(d);
    if (this.zOne) {
      // X3 = (B - C - D) * (F - 2)
      nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
      // Y3 = F * (E - D)
      ny = f.redMul(e.redSub(d));
      // Z3 = F^2 - 2 * F
      nz = f.redSqr().redSub(f).redSub(f);
    } else {
      // H = Z1^2
      var h = this.z.redSqr();
      // J = F - 2 * H
      var j = f.redSub(h).redISub(h);
      // X3 = (B-C-D)*J
      nx = b.redSub(c).redISub(d).redMul(j);
      // Y3 = F * (E - D)
      ny = f.redMul(e.redSub(d));
      // Z3 = F * J
      nz = f.redMul(j);
    }
  } else {
    // E = C + D
    var e = c.redAdd(d);
    // H = (c * Z1)^2
    var h = this.curve._mulC(this.z).redSqr();
    // J = E - 2 * H
    var j = e.redSub(h).redSub(h);
    // X3 = c * (B - E) * J
    nx = this.curve._mulC(b.redISub(e)).redMul(j);
    // Y3 = c * E * (C - D)
    ny = this.curve._mulC(e).redMul(c.redISub(d));
    // Z3 = E * J
    nz = e.redMul(j);
  }
  return this.curve.point(nx, ny, nz);
};

Point.prototype.dbl = function dbl() {
  if (this.isInfinity())
    return this;

  // Double in extended coordinates
  if (this.curve.extended)
    return this._extDbl();
  else
    return this._projDbl();
};

Point.prototype._extAdd = function _extAdd(p) {
  // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  //     #addition-add-2008-hwcd-3
  // 8M

  // A = (Y1 - X1) * (Y2 - X2)
  var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
  // B = (Y1 + X1) * (Y2 + X2)
  var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
  // C = T1 * k * T2
  var c = this.t.redMul(this.curve.dd).redMul(p.t);
  // D = Z1 * 2 * Z2
  var d = this.z.redMul(p.z.redAdd(p.z));
  // E = B - A
  var e = b.redSub(a);
  // F = D - C
  var f = d.redSub(c);
  // G = D + C
  var g = d.redAdd(c);
  // H = B + A
  var h = b.redAdd(a);
  // X3 = E * F
  var nx = e.redMul(f);
  // Y3 = G * H
  var ny = g.redMul(h);
  // T3 = E * H
  var nt = e.redMul(h);
  // Z3 = F * G
  var nz = f.redMul(g);
  return this.curve.point(nx, ny, nz, nt);
};

Point.prototype._projAdd = function _projAdd(p) {
  // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  //     #addition-add-2008-bbjlp
  //     #addition-add-2007-bl
  // 10M + 1S

  // A = Z1 * Z2
  var a = this.z.redMul(p.z);
  // B = A^2
  var b = a.redSqr();
  // C = X1 * X2
  var c = this.x.redMul(p.x);
  // D = Y1 * Y2
  var d = this.y.redMul(p.y);
  // E = d * C * D
  var e = this.curve.d.redMul(c).redMul(d);
  // F = B - E
  var f = b.redSub(e);
  // G = B + E
  var g = b.redAdd(e);
  // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
  var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
  var nx = a.redMul(f).redMul(tmp);
  var ny;
  var nz;
  if (this.curve.twisted) {
    // Y3 = A * G * (D - a * C)
    ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
    // Z3 = F * G
    nz = f.redMul(g);
  } else {
    // Y3 = A * G * (D - C)
    ny = a.redMul(g).redMul(d.redSub(c));
    // Z3 = c * F * G
    nz = this.curve._mulC(f).redMul(g);
  }
  return this.curve.point(nx, ny, nz);
};

Point.prototype.add = function add(p) {
  if (this.isInfinity())
    return p;
  if (p.isInfinity())
    return this;

  if (this.curve.extended)
    return this._extAdd(p);
  else
    return this._projAdd(p);
};

Point.prototype.mul = function mul(k) {
  if (this._hasDoubles(k))
    return this.curve._fixedNafMul(this, k);
  else
    return this.curve._wnafMul(this, k);
};

Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
  return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
};

Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
  return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
};

Point.prototype.normalize = function normalize() {
  if (this.zOne)
    return this;

  // Normalize coordinates
  var zi = this.z.redInvm();
  this.x = this.x.redMul(zi);
  this.y = this.y.redMul(zi);
  if (this.t)
    this.t = this.t.redMul(zi);
  this.z = this.curve.one;
  this.zOne = true;
  return this;
};

Point.prototype.neg = function neg() {
  return this.curve.point(this.x.redNeg(),
                          this.y,
                          this.z,
                          this.t && this.t.redNeg());
};

Point.prototype.getX = function getX() {
  this.normalize();
  return this.x.fromRed();
};

Point.prototype.getY = function getY() {
  this.normalize();
  return this.y.fromRed();
};

Point.prototype.eq = function eq(other) {
  return this === other ||
         this.getX().cmp(other.getX()) === 0 &&
         this.getY().cmp(other.getY()) === 0;
};

Point.prototype.eqXToP = function eqXToP(x) {
  var rx = x.toRed(this.curve.red).redMul(this.z);
  if (this.x.cmp(rx) === 0)
    return true;

  var xc = x.clone();
  var t = this.curve.redN.redMul(this.z);
  for (;;) {
    xc.iadd(this.curve.n);
    if (xc.cmp(this.curve.p) >= 0)
      return false;

    rx.redIAdd(t);
    if (this.x.cmp(rx) === 0)
      return true;
  }
};

// Compatibility with BaseCurve
Point.prototype.toP = Point.prototype.normalize;
Point.prototype.mixedAdd = Point.prototype.add;


/***/ }),

/***/ 992116:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var curve = exports;

curve.base = __webpack_require__(177852);
curve.short = __webpack_require__(929770);
curve.mont = __webpack_require__(28051);
curve.edwards = __webpack_require__(802246);


/***/ }),

/***/ 28051:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(177852);

var utils = __webpack_require__(587383);

function MontCurve(conf) {
  Base.call(this, 'mont', conf);

  this.a = new BN(conf.a, 16).toRed(this.red);
  this.b = new BN(conf.b, 16).toRed(this.red);
  this.i4 = new BN(4).toRed(this.red).redInvm();
  this.two = new BN(2).toRed(this.red);
  this.a24 = this.i4.redMul(this.a.redAdd(this.two));
}
inherits(MontCurve, Base);
module.exports = MontCurve;

MontCurve.prototype.validate = function validate(point) {
  var x = point.normalize().x;
  var x2 = x.redSqr();
  var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
  var y = rhs.redSqrt();

  return y.redSqr().cmp(rhs) === 0;
};

function Point(curve, x, z) {
  Base.BasePoint.call(this, curve, 'projective');
  if (x === null && z === null) {
    this.x = this.curve.one;
    this.z = this.curve.zero;
  } else {
    this.x = new BN(x, 16);
    this.z = new BN(z, 16);
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.z.red)
      this.z = this.z.toRed(this.curve.red);
  }
}
inherits(Point, Base.BasePoint);

MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  return this.point(utils.toArray(bytes, enc), 1);
};

MontCurve.prototype.point = function point(x, z) {
  return new Point(this, x, z);
};

MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  return Point.fromJSON(this, obj);
};

Point.prototype.precompute = function precompute() {
  // No-op
};

Point.prototype._encode = function _encode() {
  return this.getX().toArray('be', this.curve.p.byteLength());
};

Point.fromJSON = function fromJSON(curve, obj) {
  return new Point(curve, obj[0], obj[1] || curve.one);
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' z: ' + this.z.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.z.cmpn(0) === 0;
};

Point.prototype.dbl = function dbl() {
  // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
  // 2M + 2S + 4A

  // A = X1 + Z1
  var a = this.x.redAdd(this.z);
  // AA = A^2
  var aa = a.redSqr();
  // B = X1 - Z1
  var b = this.x.redSub(this.z);
  // BB = B^2
  var bb = b.redSqr();
  // C = AA - BB
  var c = aa.redSub(bb);
  // X3 = AA * BB
  var nx = aa.redMul(bb);
  // Z3 = C * (BB + A24 * C)
  var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
  return this.curve.point(nx, nz);
};

Point.prototype.add = function add() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.diffAdd = function diffAdd(p, diff) {
  // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
  // 4M + 2S + 6A

  // A = X2 + Z2
  var a = this.x.redAdd(this.z);
  // B = X2 - Z2
  var b = this.x.redSub(this.z);
  // C = X3 + Z3
  var c = p.x.redAdd(p.z);
  // D = X3 - Z3
  var d = p.x.redSub(p.z);
  // DA = D * A
  var da = d.redMul(a);
  // CB = C * B
  var cb = c.redMul(b);
  // X5 = Z1 * (DA + CB)^2
  var nx = diff.z.redMul(da.redAdd(cb).redSqr());
  // Z5 = X1 * (DA - CB)^2
  var nz = diff.x.redMul(da.redISub(cb).redSqr());
  return this.curve.point(nx, nz);
};

Point.prototype.mul = function mul(k) {
  var t = k.clone();
  var a = this; // (N / 2) * Q + Q
  var b = this.curve.point(null, null); // (N / 2) * Q
  var c = this; // Q

  for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
    bits.push(t.andln(1));

  for (var i = bits.length - 1; i >= 0; i--) {
    if (bits[i] === 0) {
      // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
      a = a.diffAdd(b, c);
      // N * Q = 2 * ((N / 2) * Q + Q))
      b = b.dbl();
    } else {
      // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
      b = a.diffAdd(b, c);
      // N * Q + Q = 2 * ((N / 2) * Q + Q)
      a = a.dbl();
    }
  }
  return b;
};

Point.prototype.mulAdd = function mulAdd() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.jumlAdd = function jumlAdd() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.eq = function eq(other) {
  return this.getX().cmp(other.getX()) === 0;
};

Point.prototype.normalize = function normalize() {
  this.x = this.x.redMul(this.z.redInvm());
  this.z = this.curve.one;
  return this;
};

Point.prototype.getX = function getX() {
  // Normalize coordinates
  this.normalize();

  return this.x.fromRed();
};


/***/ }),

/***/ 929770:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(587383);
var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(177852);

var assert = utils.assert;

function ShortCurve(conf) {
  Base.call(this, 'short', conf);

  this.a = new BN(conf.a, 16).toRed(this.red);
  this.b = new BN(conf.b, 16).toRed(this.red);
  this.tinv = this.two.redInvm();

  this.zeroA = this.a.fromRed().cmpn(0) === 0;
  this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;

  // If the curve is endomorphic, precalculate beta and lambda
  this.endo = this._getEndomorphism(conf);
  this._endoWnafT1 = new Array(4);
  this._endoWnafT2 = new Array(4);
}
inherits(ShortCurve, Base);
module.exports = ShortCurve;

ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
  // No efficient endomorphism
  if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
    return;

  // Compute beta and lambda, that lambda * P = (beta * Px; Py)
  var beta;
  var lambda;
  if (conf.beta) {
    beta = new BN(conf.beta, 16).toRed(this.red);
  } else {
    var betas = this._getEndoRoots(this.p);
    // Choose the smallest beta
    beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
    beta = beta.toRed(this.red);
  }
  if (conf.lambda) {
    lambda = new BN(conf.lambda, 16);
  } else {
    // Choose the lambda that is matching selected beta
    var lambdas = this._getEndoRoots(this.n);
    if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
      lambda = lambdas[0];
    } else {
      lambda = lambdas[1];
      assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
    }
  }

  // Get basis vectors, used for balanced length-two representation
  var basis;
  if (conf.basis) {
    basis = conf.basis.map(function(vec) {
      return {
        a: new BN(vec.a, 16),
        b: new BN(vec.b, 16)
      };
    });
  } else {
    basis = this._getEndoBasis(lambda);
  }

  return {
    beta: beta,
    lambda: lambda,
    basis: basis
  };
};

ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
  // Find roots of for x^2 + x + 1 in F
  // Root = (-1 +- Sqrt(-3)) / 2
  //
  var red = num === this.p ? this.red : BN.mont(num);
  var tinv = new BN(2).toRed(red).redInvm();
  var ntinv = tinv.redNeg();

  var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);

  var l1 = ntinv.redAdd(s).fromRed();
  var l2 = ntinv.redSub(s).fromRed();
  return [ l1, l2 ];
};

ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
  // aprxSqrt >= sqrt(this.n)
  var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));

  // 3.74
  // Run EGCD, until r(L + 1) < aprxSqrt
  var u = lambda;
  var v = this.n.clone();
  var x1 = new BN(1);
  var y1 = new BN(0);
  var x2 = new BN(0);
  var y2 = new BN(1);

  // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
  var a0;
  var b0;
  // First vector
  var a1;
  var b1;
  // Second vector
  var a2;
  var b2;

  var prevR;
  var i = 0;
  var r;
  var x;
  while (u.cmpn(0) !== 0) {
    var q = v.div(u);
    r = v.sub(q.mul(u));
    x = x2.sub(q.mul(x1));
    var y = y2.sub(q.mul(y1));

    if (!a1 && r.cmp(aprxSqrt) < 0) {
      a0 = prevR.neg();
      b0 = x1;
      a1 = r.neg();
      b1 = x;
    } else if (a1 && ++i === 2) {
      break;
    }
    prevR = r;

    v = u;
    u = r;
    x2 = x1;
    x1 = x;
    y2 = y1;
    y1 = y;
  }
  a2 = r.neg();
  b2 = x;

  var len1 = a1.sqr().add(b1.sqr());
  var len2 = a2.sqr().add(b2.sqr());
  if (len2.cmp(len1) >= 0) {
    a2 = a0;
    b2 = b0;
  }

  // Normalize signs
  if (a1.negative) {
    a1 = a1.neg();
    b1 = b1.neg();
  }
  if (a2.negative) {
    a2 = a2.neg();
    b2 = b2.neg();
  }

  return [
    { a: a1, b: b1 },
    { a: a2, b: b2 }
  ];
};

ShortCurve.prototype._endoSplit = function _endoSplit(k) {
  var basis = this.endo.basis;
  var v1 = basis[0];
  var v2 = basis[1];

  var c1 = v2.b.mul(k).divRound(this.n);
  var c2 = v1.b.neg().mul(k).divRound(this.n);

  var p1 = c1.mul(v1.a);
  var p2 = c2.mul(v2.a);
  var q1 = c1.mul(v1.b);
  var q2 = c2.mul(v2.b);

  // Calculate answer
  var k1 = k.sub(p1).sub(p2);
  var k2 = q1.add(q2).neg();
  return { k1: k1, k2: k2 };
};

ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
  x = new BN(x, 16);
  if (!x.red)
    x = x.toRed(this.red);

  var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
  var y = y2.redSqrt();
  if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  // XXX Is there any way to tell if the number is odd without converting it
  // to non-red form?
  var isOdd = y.fromRed().isOdd();
  if (odd && !isOdd || !odd && isOdd)
    y = y.redNeg();

  return this.point(x, y);
};

ShortCurve.prototype.validate = function validate(point) {
  if (point.inf)
    return true;

  var x = point.x;
  var y = point.y;

  var ax = this.a.redMul(x);
  var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
  return y.redSqr().redISub(rhs).cmpn(0) === 0;
};

ShortCurve.prototype._endoWnafMulAdd =
    function _endoWnafMulAdd(points, coeffs, jacobianResult) {
  var npoints = this._endoWnafT1;
  var ncoeffs = this._endoWnafT2;
  for (var i = 0; i < points.length; i++) {
    var split = this._endoSplit(coeffs[i]);
    var p = points[i];
    var beta = p._getBeta();

    if (split.k1.negative) {
      split.k1.ineg();
      p = p.neg(true);
    }
    if (split.k2.negative) {
      split.k2.ineg();
      beta = beta.neg(true);
    }

    npoints[i * 2] = p;
    npoints[i * 2 + 1] = beta;
    ncoeffs[i * 2] = split.k1;
    ncoeffs[i * 2 + 1] = split.k2;
  }
  var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);

  // Clean-up references to points and coefficients
  for (var j = 0; j < i * 2; j++) {
    npoints[j] = null;
    ncoeffs[j] = null;
  }
  return res;
};

function Point(curve, x, y, isRed) {
  Base.BasePoint.call(this, curve, 'affine');
  if (x === null && y === null) {
    this.x = null;
    this.y = null;
    this.inf = true;
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    // Force redgomery representation when loading from JSON
    if (isRed) {
      this.x.forceRed(this.curve.red);
      this.y.forceRed(this.curve.red);
    }
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.y.red)
      this.y = this.y.toRed(this.curve.red);
    this.inf = false;
  }
}
inherits(Point, Base.BasePoint);

ShortCurve.prototype.point = function point(x, y, isRed) {
  return new Point(this, x, y, isRed);
};

ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
  return Point.fromJSON(this, obj, red);
};

Point.prototype._getBeta = function _getBeta() {
  if (!this.curve.endo)
    return;

  var pre = this.precomputed;
  if (pre && pre.beta)
    return pre.beta;

  var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
  if (pre) {
    var curve = this.curve;
    var endoMul = function(p) {
      return curve.point(p.x.redMul(curve.endo.beta), p.y);
    };
    pre.beta = beta;
    beta.precomputed = {
      beta: null,
      naf: pre.naf && {
        wnd: pre.naf.wnd,
        points: pre.naf.points.map(endoMul)
      },
      doubles: pre.doubles && {
        step: pre.doubles.step,
        points: pre.doubles.points.map(endoMul)
      }
    };
  }
  return beta;
};

Point.prototype.toJSON = function toJSON() {
  if (!this.precomputed)
    return [ this.x, this.y ];

  return [ this.x, this.y, this.precomputed && {
    doubles: this.precomputed.doubles && {
      step: this.precomputed.doubles.step,
      points: this.precomputed.doubles.points.slice(1)
    },
    naf: this.precomputed.naf && {
      wnd: this.precomputed.naf.wnd,
      points: this.precomputed.naf.points.slice(1)
    }
  } ];
};

Point.fromJSON = function fromJSON(curve, obj, red) {
  if (typeof obj === 'string')
    obj = JSON.parse(obj);
  var res = curve.point(obj[0], obj[1], red);
  if (!obj[2])
    return res;

  function obj2point(obj) {
    return curve.point(obj[0], obj[1], red);
  }

  var pre = obj[2];
  res.precomputed = {
    beta: null,
    doubles: pre.doubles && {
      step: pre.doubles.step,
      points: [ res ].concat(pre.doubles.points.map(obj2point))
    },
    naf: pre.naf && {
      wnd: pre.naf.wnd,
      points: [ res ].concat(pre.naf.points.map(obj2point))
    }
  };
  return res;
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' y: ' + this.y.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  return this.inf;
};

Point.prototype.add = function add(p) {
  // O + P = P
  if (this.inf)
    return p;

  // P + O = P
  if (p.inf)
    return this;

  // P + P = 2P
  if (this.eq(p))
    return this.dbl();

  // P + (-P) = O
  if (this.neg().eq(p))
    return this.curve.point(null, null);

  // P + Q = O
  if (this.x.cmp(p.x) === 0)
    return this.curve.point(null, null);

  var c = this.y.redSub(p.y);
  if (c.cmpn(0) !== 0)
    c = c.redMul(this.x.redSub(p.x).redInvm());
  var nx = c.redSqr().redISub(this.x).redISub(p.x);
  var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  return this.curve.point(nx, ny);
};

Point.prototype.dbl = function dbl() {
  if (this.inf)
    return this;

  // 2P = O
  var ys1 = this.y.redAdd(this.y);
  if (ys1.cmpn(0) === 0)
    return this.curve.point(null, null);

  var a = this.curve.a;

  var x2 = this.x.redSqr();
  var dyinv = ys1.redInvm();
  var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);

  var nx = c.redSqr().redISub(this.x.redAdd(this.x));
  var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  return this.curve.point(nx, ny);
};

Point.prototype.getX = function getX() {
  return this.x.fromRed();
};

Point.prototype.getY = function getY() {
  return this.y.fromRed();
};

Point.prototype.mul = function mul(k) {
  k = new BN(k, 16);
  if (this.isInfinity())
    return this;
  else if (this._hasDoubles(k))
    return this.curve._fixedNafMul(this, k);
  else if (this.curve.endo)
    return this.curve._endoWnafMulAdd([ this ], [ k ]);
  else
    return this.curve._wnafMul(this, k);
};

Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
  var points = [ this, p2 ];
  var coeffs = [ k1, k2 ];
  if (this.curve.endo)
    return this.curve._endoWnafMulAdd(points, coeffs);
  else
    return this.curve._wnafMulAdd(1, points, coeffs, 2);
};

Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
  var points = [ this, p2 ];
  var coeffs = [ k1, k2 ];
  if (this.curve.endo)
    return this.curve._endoWnafMulAdd(points, coeffs, true);
  else
    return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
};

Point.prototype.eq = function eq(p) {
  return this === p ||
         this.inf === p.inf &&
             (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
};

Point.prototype.neg = function neg(_precompute) {
  if (this.inf)
    return this;

  var res = this.curve.point(this.x, this.y.redNeg());
  if (_precompute && this.precomputed) {
    var pre = this.precomputed;
    var negate = function(p) {
      return p.neg();
    };
    res.precomputed = {
      naf: pre.naf && {
        wnd: pre.naf.wnd,
        points: pre.naf.points.map(negate)
      },
      doubles: pre.doubles && {
        step: pre.doubles.step,
        points: pre.doubles.points.map(negate)
      }
    };
  }
  return res;
};

Point.prototype.toJ = function toJ() {
  if (this.inf)
    return this.curve.jpoint(null, null, null);

  var res = this.curve.jpoint(this.x, this.y, this.curve.one);
  return res;
};

function JPoint(curve, x, y, z) {
  Base.BasePoint.call(this, curve, 'jacobian');
  if (x === null && y === null && z === null) {
    this.x = this.curve.one;
    this.y = this.curve.one;
    this.z = new BN(0);
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    this.z = new BN(z, 16);
  }
  if (!this.x.red)
    this.x = this.x.toRed(this.curve.red);
  if (!this.y.red)
    this.y = this.y.toRed(this.curve.red);
  if (!this.z.red)
    this.z = this.z.toRed(this.curve.red);

  this.zOne = this.z === this.curve.one;
}
inherits(JPoint, Base.BasePoint);

ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
  return new JPoint(this, x, y, z);
};

JPoint.prototype.toP = function toP() {
  if (this.isInfinity())
    return this.curve.point(null, null);

  var zinv = this.z.redInvm();
  var zinv2 = zinv.redSqr();
  var ax = this.x.redMul(zinv2);
  var ay = this.y.redMul(zinv2).redMul(zinv);

  return this.curve.point(ax, ay);
};

JPoint.prototype.neg = function neg() {
  return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
};

JPoint.prototype.add = function add(p) {
  // O + P = P
  if (this.isInfinity())
    return p;

  // P + O = P
  if (p.isInfinity())
    return this;

  // 12M + 4S + 7A
  var pz2 = p.z.redSqr();
  var z2 = this.z.redSqr();
  var u1 = this.x.redMul(pz2);
  var u2 = p.x.redMul(z2);
  var s1 = this.y.redMul(pz2.redMul(p.z));
  var s2 = p.y.redMul(z2.redMul(this.z));

  var h = u1.redSub(u2);
  var r = s1.redSub(s2);
  if (h.cmpn(0) === 0) {
    if (r.cmpn(0) !== 0)
      return this.curve.jpoint(null, null, null);
    else
      return this.dbl();
  }

  var h2 = h.redSqr();
  var h3 = h2.redMul(h);
  var v = u1.redMul(h2);

  var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  var nz = this.z.redMul(p.z).redMul(h);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.mixedAdd = function mixedAdd(p) {
  // O + P = P
  if (this.isInfinity())
    return p.toJ();

  // P + O = P
  if (p.isInfinity())
    return this;

  // 8M + 3S + 7A
  var z2 = this.z.redSqr();
  var u1 = this.x;
  var u2 = p.x.redMul(z2);
  var s1 = this.y;
  var s2 = p.y.redMul(z2).redMul(this.z);

  var h = u1.redSub(u2);
  var r = s1.redSub(s2);
  if (h.cmpn(0) === 0) {
    if (r.cmpn(0) !== 0)
      return this.curve.jpoint(null, null, null);
    else
      return this.dbl();
  }

  var h2 = h.redSqr();
  var h3 = h2.redMul(h);
  var v = u1.redMul(h2);

  var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  var nz = this.z.redMul(h);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.dblp = function dblp(pow) {
  if (pow === 0)
    return this;
  if (this.isInfinity())
    return this;
  if (!pow)
    return this.dbl();

  if (this.curve.zeroA || this.curve.threeA) {
    var r = this;
    for (var i = 0; i < pow; i++)
      r = r.dbl();
    return r;
  }

  // 1M + 2S + 1A + N * (4S + 5M + 8A)
  // N = 1 => 6M + 6S + 9A
  var a = this.curve.a;
  var tinv = this.curve.tinv;

  var jx = this.x;
  var jy = this.y;
  var jz = this.z;
  var jz4 = jz.redSqr().redSqr();

  // Reuse results
  var jyd = jy.redAdd(jy);
  for (var i = 0; i < pow; i++) {
    var jx2 = jx.redSqr();
    var jyd2 = jyd.redSqr();
    var jyd4 = jyd2.redSqr();
    var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));

    var t1 = jx.redMul(jyd2);
    var nx = c.redSqr().redISub(t1.redAdd(t1));
    var t2 = t1.redISub(nx);
    var dny = c.redMul(t2);
    dny = dny.redIAdd(dny).redISub(jyd4);
    var nz = jyd.redMul(jz);
    if (i + 1 < pow)
      jz4 = jz4.redMul(jyd4);

    jx = nx;
    jz = nz;
    jyd = dny;
  }

  return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
};

JPoint.prototype.dbl = function dbl() {
  if (this.isInfinity())
    return this;

  if (this.curve.zeroA)
    return this._zeroDbl();
  else if (this.curve.threeA)
    return this._threeDbl();
  else
    return this._dbl();
};

JPoint.prototype._zeroDbl = function _zeroDbl() {
  var nx;
  var ny;
  var nz;
  // Z = 1
  if (this.zOne) {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
    //     #doubling-mdbl-2007-bl
    // 1M + 5S + 14A

    // XX = X1^2
    var xx = this.x.redSqr();
    // YY = Y1^2
    var yy = this.y.redSqr();
    // YYYY = YY^2
    var yyyy = yy.redSqr();
    // S = 2 * ((X1 + YY)^2 - XX - YYYY)
    var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
    s = s.redIAdd(s);
    // M = 3 * XX + a; a = 0
    var m = xx.redAdd(xx).redIAdd(xx);
    // T = M ^ 2 - 2*S
    var t = m.redSqr().redISub(s).redISub(s);

    // 8 * YYYY
    var yyyy8 = yyyy.redIAdd(yyyy);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    yyyy8 = yyyy8.redIAdd(yyyy8);

    // X3 = T
    nx = t;
    // Y3 = M * (S - T) - 8 * YYYY
    ny = m.redMul(s.redISub(t)).redISub(yyyy8);
    // Z3 = 2*Y1
    nz = this.y.redAdd(this.y);
  } else {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
    //     #doubling-dbl-2009-l
    // 2M + 5S + 13A

    // A = X1^2
    var a = this.x.redSqr();
    // B = Y1^2
    var b = this.y.redSqr();
    // C = B^2
    var c = b.redSqr();
    // D = 2 * ((X1 + B)^2 - A - C)
    var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
    d = d.redIAdd(d);
    // E = 3 * A
    var e = a.redAdd(a).redIAdd(a);
    // F = E^2
    var f = e.redSqr();

    // 8 * C
    var c8 = c.redIAdd(c);
    c8 = c8.redIAdd(c8);
    c8 = c8.redIAdd(c8);

    // X3 = F - 2 * D
    nx = f.redISub(d).redISub(d);
    // Y3 = E * (D - X3) - 8 * C
    ny = e.redMul(d.redISub(nx)).redISub(c8);
    // Z3 = 2 * Y1 * Z1
    nz = this.y.redMul(this.z);
    nz = nz.redIAdd(nz);
  }

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype._threeDbl = function _threeDbl() {
  var nx;
  var ny;
  var nz;
  // Z = 1
  if (this.zOne) {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
    //     #doubling-mdbl-2007-bl
    // 1M + 5S + 15A

    // XX = X1^2
    var xx = this.x.redSqr();
    // YY = Y1^2
    var yy = this.y.redSqr();
    // YYYY = YY^2
    var yyyy = yy.redSqr();
    // S = 2 * ((X1 + YY)^2 - XX - YYYY)
    var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
    s = s.redIAdd(s);
    // M = 3 * XX + a
    var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
    // T = M^2 - 2 * S
    var t = m.redSqr().redISub(s).redISub(s);
    // X3 = T
    nx = t;
    // Y3 = M * (S - T) - 8 * YYYY
    var yyyy8 = yyyy.redIAdd(yyyy);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    ny = m.redMul(s.redISub(t)).redISub(yyyy8);
    // Z3 = 2 * Y1
    nz = this.y.redAdd(this.y);
  } else {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
    // 3M + 5S

    // delta = Z1^2
    var delta = this.z.redSqr();
    // gamma = Y1^2
    var gamma = this.y.redSqr();
    // beta = X1 * gamma
    var beta = this.x.redMul(gamma);
    // alpha = 3 * (X1 - delta) * (X1 + delta)
    var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
    alpha = alpha.redAdd(alpha).redIAdd(alpha);
    // X3 = alpha^2 - 8 * beta
    var beta4 = beta.redIAdd(beta);
    beta4 = beta4.redIAdd(beta4);
    var beta8 = beta4.redAdd(beta4);
    nx = alpha.redSqr().redISub(beta8);
    // Z3 = (Y1 + Z1)^2 - gamma - delta
    nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
    // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
    var ggamma8 = gamma.redSqr();
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
  }

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype._dbl = function _dbl() {
  var a = this.curve.a;

  // 4M + 6S + 10A
  var jx = this.x;
  var jy = this.y;
  var jz = this.z;
  var jz4 = jz.redSqr().redSqr();

  var jx2 = jx.redSqr();
  var jy2 = jy.redSqr();

  var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));

  var jxd4 = jx.redAdd(jx);
  jxd4 = jxd4.redIAdd(jxd4);
  var t1 = jxd4.redMul(jy2);
  var nx = c.redSqr().redISub(t1.redAdd(t1));
  var t2 = t1.redISub(nx);

  var jyd8 = jy2.redSqr();
  jyd8 = jyd8.redIAdd(jyd8);
  jyd8 = jyd8.redIAdd(jyd8);
  jyd8 = jyd8.redIAdd(jyd8);
  var ny = c.redMul(t2).redISub(jyd8);
  var nz = jy.redAdd(jy).redMul(jz);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.trpl = function trpl() {
  if (!this.curve.zeroA)
    return this.dbl().add(this);

  // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
  // 5M + 10S + ...

  // XX = X1^2
  var xx = this.x.redSqr();
  // YY = Y1^2
  var yy = this.y.redSqr();
  // ZZ = Z1^2
  var zz = this.z.redSqr();
  // YYYY = YY^2
  var yyyy = yy.redSqr();
  // M = 3 * XX + a * ZZ2; a = 0
  var m = xx.redAdd(xx).redIAdd(xx);
  // MM = M^2
  var mm = m.redSqr();
  // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
  var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  e = e.redIAdd(e);
  e = e.redAdd(e).redIAdd(e);
  e = e.redISub(mm);
  // EE = E^2
  var ee = e.redSqr();
  // T = 16*YYYY
  var t = yyyy.redIAdd(yyyy);
  t = t.redIAdd(t);
  t = t.redIAdd(t);
  t = t.redIAdd(t);
  // U = (M + E)^2 - MM - EE - T
  var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
  // X3 = 4 * (X1 * EE - 4 * YY * U)
  var yyu4 = yy.redMul(u);
  yyu4 = yyu4.redIAdd(yyu4);
  yyu4 = yyu4.redIAdd(yyu4);
  var nx = this.x.redMul(ee).redISub(yyu4);
  nx = nx.redIAdd(nx);
  nx = nx.redIAdd(nx);
  // Y3 = 8 * Y1 * (U * (T - U) - E * EE)
  var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
  ny = ny.redIAdd(ny);
  ny = ny.redIAdd(ny);
  ny = ny.redIAdd(ny);
  // Z3 = (Z1 + E)^2 - ZZ - EE
  var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.mul = function mul(k, kbase) {
  k = new BN(k, kbase);

  return this.curve._wnafMul(this, k);
};

JPoint.prototype.eq = function eq(p) {
  if (p.type === 'affine')
    return this.eq(p.toJ());

  if (this === p)
    return true;

  // x1 * z2^2 == x2 * z1^2
  var z2 = this.z.redSqr();
  var pz2 = p.z.redSqr();
  if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
    return false;

  // y1 * z2^3 == y2 * z1^3
  var z3 = z2.redMul(this.z);
  var pz3 = pz2.redMul(p.z);
  return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
};

JPoint.prototype.eqXToP = function eqXToP(x) {
  var zs = this.z.redSqr();
  var rx = x.toRed(this.curve.red).redMul(zs);
  if (this.x.cmp(rx) === 0)
    return true;

  var xc = x.clone();
  var t = this.curve.redN.redMul(zs);
  for (;;) {
    xc.iadd(this.curve.n);
    if (xc.cmp(this.curve.p) >= 0)
      return false;

    rx.redIAdd(t);
    if (this.x.cmp(rx) === 0)
      return true;
  }
};

JPoint.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC JPoint Infinity>';
  return '<EC JPoint x: ' + this.x.toString(16, 2) +
      ' y: ' + this.y.toString(16, 2) +
      ' z: ' + this.z.toString(16, 2) + '>';
};

JPoint.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.z.cmpn(0) === 0;
};


/***/ }),

/***/ 456314:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var curves = exports;

var hash = __webpack_require__(633715);
var curve = __webpack_require__(992116);
var utils = __webpack_require__(587383);

var assert = utils.assert;

function PresetCurve(options) {
  if (options.type === 'short')
    this.curve = new curve.short(options);
  else if (options.type === 'edwards')
    this.curve = new curve.edwards(options);
  else
    this.curve = new curve.mont(options);
  this.g = this.curve.g;
  this.n = this.curve.n;
  this.hash = options.hash;

  assert(this.g.validate(), 'Invalid curve');
  assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
}
curves.PresetCurve = PresetCurve;

function defineCurve(name, options) {
  Object.defineProperty(curves, name, {
    configurable: true,
    enumerable: true,
    get: function() {
      var curve = new PresetCurve(options);
      Object.defineProperty(curves, name, {
        configurable: true,
        enumerable: true,
        value: curve
      });
      return curve;
    }
  });
}

defineCurve('p192', {
  type: 'short',
  prime: 'p192',
  p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
  a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
  b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
  n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
  hash: hash.sha256,
  gRed: false,
  g: [
    '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
    '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'
  ]
});

defineCurve('p224', {
  type: 'short',
  prime: 'p224',
  p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
  a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
  b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
  n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
  hash: hash.sha256,
  gRed: false,
  g: [
    'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
    'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'
  ]
});

defineCurve('p256', {
  type: 'short',
  prime: null,
  p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
  a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
  b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
  n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
  hash: hash.sha256,
  gRed: false,
  g: [
    '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
    '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'
  ]
});

defineCurve('p384', {
  type: 'short',
  prime: null,
  p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'fffffffe ffffffff 00000000 00000000 ffffffff',
  a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'fffffffe ffffffff 00000000 00000000 fffffffc',
  b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
     '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
  n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
     'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
  hash: hash.sha384,
  gRed: false,
  g: [
    'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
    '5502f25d bf55296c 3a545e38 72760ab7',
    '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
    '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'
  ]
});

defineCurve('p521', {
  type: 'short',
  prime: null,
  p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff',
  a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff fffffffc',
  b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
     '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
     '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
  n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
     'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
  hash: hash.sha512,
  gRed: false,
  g: [
    '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
    '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
    'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
    '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
    '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
    '3fad0761 353c7086 a272c240 88be9476 9fd16650'
  ]
});

defineCurve('curve25519', {
  type: 'mont',
  prime: 'p25519',
  p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  a: '76d06',
  b: '1',
  n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  hash: hash.sha256,
  gRed: false,
  g: [
    '9'
  ]
});

defineCurve('ed25519', {
  type: 'edwards',
  prime: 'p25519',
  p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  a: '-1',
  c: '1',
  // -121665 * (121666^(-1)) (mod P)
  d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
  n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  hash: hash.sha256,
  gRed: false,
  g: [
    '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',

    // 4/5
    '6666666666666666666666666666666666666666666666666666666666666658'
  ]
});

var pre;
try {
  pre = __webpack_require__(536578);
} catch (e) {
  pre = undefined;
}

defineCurve('secp256k1', {
  type: 'short',
  prime: 'k256',
  p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
  a: '0',
  b: '7',
  n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
  h: '1',
  hash: hash.sha256,

  // Precomputed endomorphism
  beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
  lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
  basis: [
    {
      a: '3086d221a7d46bcde86c90e49284eb15',
      b: '-e4437ed6010e88286f547fa90abfe4c3'
    },
    {
      a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
      b: '3086d221a7d46bcde86c90e49284eb15'
    }
  ],

  gRed: false,
  g: [
    '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
    '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
    pre
  ]
});


/***/ }),

/***/ 86747:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var HmacDRBG = __webpack_require__(302156);
var utils = __webpack_require__(587383);
var curves = __webpack_require__(456314);
var rand = __webpack_require__(929931);
var assert = utils.assert;

var KeyPair = __webpack_require__(15558);
var Signature = __webpack_require__(216798);

function EC(options) {
  if (!(this instanceof EC))
    return new EC(options);

  // Shortcut `elliptic.ec(curve-name)`
  if (typeof options === 'string') {
    assert(curves.hasOwnProperty(options), 'Unknown curve ' + options);

    options = curves[options];
  }

  // Shortcut for `elliptic.ec(elliptic.curves.curveName)`
  if (options instanceof curves.PresetCurve)
    options = { curve: options };

  this.curve = options.curve.curve;
  this.n = this.curve.n;
  this.nh = this.n.ushrn(1);
  this.g = this.curve.g;

  // Point on curve
  this.g = options.curve.g;
  this.g.precompute(options.curve.n.bitLength() + 1);

  // Hash for function for DRBG
  this.hash = options.hash || options.curve.hash;
}
module.exports = EC;

EC.prototype.keyPair = function keyPair(options) {
  return new KeyPair(this, options);
};

EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
  return KeyPair.fromPrivate(this, priv, enc);
};

EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
  return KeyPair.fromPublic(this, pub, enc);
};

EC.prototype.genKeyPair = function genKeyPair(options) {
  if (!options)
    options = {};

  // Instantiate Hmac_DRBG
  var drbg = new HmacDRBG({
    hash: this.hash,
    pers: options.pers,
    persEnc: options.persEnc || 'utf8',
    entropy: options.entropy || rand(this.hash.hmacStrength),
    entropyEnc: options.entropy && options.entropyEnc || 'utf8',
    nonce: this.n.toArray()
  });

  var bytes = this.n.byteLength();
  var ns2 = this.n.sub(new BN(2));
  do {
    var priv = new BN(drbg.generate(bytes));
    if (priv.cmp(ns2) > 0)
      continue;

    priv.iaddn(1);
    return this.keyFromPrivate(priv);
  } while (true);
};

EC.prototype._truncateToN = function truncateToN(msg, truncOnly) {
  var delta = msg.byteLength() * 8 - this.n.bitLength();
  if (delta > 0)
    msg = msg.ushrn(delta);
  if (!truncOnly && msg.cmp(this.n) >= 0)
    return msg.sub(this.n);
  else
    return msg;
};

EC.prototype.sign = function sign(msg, key, enc, options) {
  if (typeof enc === 'object') {
    options = enc;
    enc = null;
  }
  if (!options)
    options = {};

  key = this.keyFromPrivate(key, enc);
  msg = this._truncateToN(new BN(msg, 16));

  // Zero-extend key to provide enough entropy
  var bytes = this.n.byteLength();
  var bkey = key.getPrivate().toArray('be', bytes);

  // Zero-extend nonce to have the same byte size as N
  var nonce = msg.toArray('be', bytes);

  // Instantiate Hmac_DRBG
  var drbg = new HmacDRBG({
    hash: this.hash,
    entropy: bkey,
    nonce: nonce,
    pers: options.pers,
    persEnc: options.persEnc || 'utf8'
  });

  // Number of bytes to generate
  var ns1 = this.n.sub(new BN(1));

  for (var iter = 0; true; iter++) {
    var k = options.k ?
        options.k(iter) :
        new BN(drbg.generate(this.n.byteLength()));
    k = this._truncateToN(k, true);
    if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
      continue;

    var kp = this.g.mul(k);
    if (kp.isInfinity())
      continue;

    var kpX = kp.getX();
    var r = kpX.umod(this.n);
    if (r.cmpn(0) === 0)
      continue;

    var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
    s = s.umod(this.n);
    if (s.cmpn(0) === 0)
      continue;

    var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
                        (kpX.cmp(r) !== 0 ? 2 : 0);

    // Use complement of `s`, if it is > `n / 2`
    if (options.canonical && s.cmp(this.nh) > 0) {
      s = this.n.sub(s);
      recoveryParam ^= 1;
    }

    return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
  }
};

EC.prototype.verify = function verify(msg, signature, key, enc) {
  msg = this._truncateToN(new BN(msg, 16));
  key = this.keyFromPublic(key, enc);
  signature = new Signature(signature, 'hex');

  // Perform primitive values validation
  var r = signature.r;
  var s = signature.s;
  if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
    return false;
  if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
    return false;

  // Validate signature
  var sinv = s.invm(this.n);
  var u1 = sinv.mul(msg).umod(this.n);
  var u2 = sinv.mul(r).umod(this.n);

  if (!this.curve._maxwellTrick) {
    var p = this.g.mulAdd(u1, key.getPublic(), u2);
    if (p.isInfinity())
      return false;

    return p.getX().umod(this.n).cmp(r) === 0;
  }

  // NOTE: Greg Maxwell's trick, inspired by:
  // https://git.io/vad3K

  var p = this.g.jmulAdd(u1, key.getPublic(), u2);
  if (p.isInfinity())
    return false;

  // Compare `p.x` of Jacobian point with `r`,
  // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
  // inverse of `p.z^2`
  return p.eqXToP(r);
};

EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
  assert((3 & j) === j, 'The recovery param is more than two bits');
  signature = new Signature(signature, enc);

  var n = this.n;
  var e = new BN(msg);
  var r = signature.r;
  var s = signature.s;

  // A set LSB signifies that the y-coordinate is odd
  var isYOdd = j & 1;
  var isSecondKey = j >> 1;
  if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
    throw new Error('Unable to find sencond key candinate');

  // 1.1. Let x = r + jn.
  if (isSecondKey)
    r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
  else
    r = this.curve.pointFromX(r, isYOdd);

  var rInv = signature.r.invm(n);
  var s1 = n.sub(e).mul(rInv).umod(n);
  var s2 = s.mul(rInv).umod(n);

  // 1.6.1 Compute Q = r^-1 (sR -  eG)
  //               Q = r^-1 (sR + -eG)
  return this.g.mulAdd(s1, r, s2);
};

EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
  signature = new Signature(signature, enc);
  if (signature.recoveryParam !== null)
    return signature.recoveryParam;

  for (var i = 0; i < 4; i++) {
    var Qprime;
    try {
      Qprime = this.recoverPubKey(e, signature, i);
    } catch (e) {
      continue;
    }

    if (Qprime.eq(Q))
      return i;
  }
  throw new Error('Unable to find valid recovery factor');
};


/***/ }),

/***/ 15558:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(587383);
var assert = utils.assert;

function KeyPair(ec, options) {
  this.ec = ec;
  this.priv = null;
  this.pub = null;

  // KeyPair(ec, { priv: ..., pub: ... })
  if (options.priv)
    this._importPrivate(options.priv, options.privEnc);
  if (options.pub)
    this._importPublic(options.pub, options.pubEnc);
}
module.exports = KeyPair;

KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
  if (pub instanceof KeyPair)
    return pub;

  return new KeyPair(ec, {
    pub: pub,
    pubEnc: enc
  });
};

KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
  if (priv instanceof KeyPair)
    return priv;

  return new KeyPair(ec, {
    priv: priv,
    privEnc: enc
  });
};

KeyPair.prototype.validate = function validate() {
  var pub = this.getPublic();

  if (pub.isInfinity())
    return { result: false, reason: 'Invalid public key' };
  if (!pub.validate())
    return { result: false, reason: 'Public key is not a point' };
  if (!pub.mul(this.ec.curve.n).isInfinity())
    return { result: false, reason: 'Public key * N != O' };

  return { result: true, reason: null };
};

KeyPair.prototype.getPublic = function getPublic(compact, enc) {
  // compact is optional argument
  if (typeof compact === 'string') {
    enc = compact;
    compact = null;
  }

  if (!this.pub)
    this.pub = this.ec.g.mul(this.priv);

  if (!enc)
    return this.pub;

  return this.pub.encode(enc, compact);
};

KeyPair.prototype.getPrivate = function getPrivate(enc) {
  if (enc === 'hex')
    return this.priv.toString(16, 2);
  else
    return this.priv;
};

KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
  this.priv = new BN(key, enc || 16);

  // Ensure that the priv won't be bigger than n, otherwise we may fail
  // in fixed multiplication method
  this.priv = this.priv.umod(this.ec.curve.n);
};

KeyPair.prototype._importPublic = function _importPublic(key, enc) {
  if (key.x || key.y) {
    // Montgomery points only have an `x` coordinate.
    // Weierstrass/Edwards points on the other hand have both `x` and
    // `y` coordinates.
    if (this.ec.curve.type === 'mont') {
      assert(key.x, 'Need x coordinate');
    } else if (this.ec.curve.type === 'short' ||
               this.ec.curve.type === 'edwards') {
      assert(key.x && key.y, 'Need both x and y coordinate');
    }
    this.pub = this.ec.curve.point(key.x, key.y);
    return;
  }
  this.pub = this.ec.curve.decodePoint(key, enc);
};

// ECDH
KeyPair.prototype.derive = function derive(pub) {
  return pub.mul(this.priv).getX();
};

// ECDSA
KeyPair.prototype.sign = function sign(msg, enc, options) {
  return this.ec.sign(msg, this, enc, options);
};

KeyPair.prototype.verify = function verify(msg, signature) {
  return this.ec.verify(msg, signature, this);
};

KeyPair.prototype.inspect = function inspect() {
  return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
         ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
};


/***/ }),

/***/ 216798:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);

var utils = __webpack_require__(587383);
var assert = utils.assert;

function Signature(options, enc) {
  if (options instanceof Signature)
    return options;

  if (this._importDER(options, enc))
    return;

  assert(options.r && options.s, 'Signature without r or s');
  this.r = new BN(options.r, 16);
  this.s = new BN(options.s, 16);
  if (options.recoveryParam === undefined)
    this.recoveryParam = null;
  else
    this.recoveryParam = options.recoveryParam;
}
module.exports = Signature;

function Position() {
  this.place = 0;
}

function getLength(buf, p) {
  var initial = buf[p.place++];
  if (!(initial & 0x80)) {
    return initial;
  }
  var octetLen = initial & 0xf;

  // Indefinite length or overflow
  if (octetLen === 0 || octetLen > 4) {
    return false;
  }

  var val = 0;
  for (var i = 0, off = p.place; i < octetLen; i++, off++) {
    val <<= 8;
    val |= buf[off];
    val >>>= 0;
  }

  // Leading zeroes
  if (val <= 0x7f) {
    return false;
  }

  p.place = off;
  return val;
}

function rmPadding(buf) {
  var i = 0;
  var len = buf.length - 1;
  while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
    i++;
  }
  if (i === 0) {
    return buf;
  }
  return buf.slice(i);
}

Signature.prototype._importDER = function _importDER(data, enc) {
  data = utils.toArray(data, enc);
  var p = new Position();
  if (data[p.place++] !== 0x30) {
    return false;
  }
  var len = getLength(data, p);
  if (len === false) {
    return false;
  }
  if ((len + p.place) !== data.length) {
    return false;
  }
  if (data[p.place++] !== 0x02) {
    return false;
  }
  var rlen = getLength(data, p);
  if (rlen === false) {
    return false;
  }
  var r = data.slice(p.place, rlen + p.place);
  p.place += rlen;
  if (data[p.place++] !== 0x02) {
    return false;
  }
  var slen = getLength(data, p);
  if (slen === false) {
    return false;
  }
  if (data.length !== slen + p.place) {
    return false;
  }
  var s = data.slice(p.place, slen + p.place);
  if (r[0] === 0) {
    if (r[1] & 0x80) {
      r = r.slice(1);
    } else {
      // Leading zeroes
      return false;
    }
  }
  if (s[0] === 0) {
    if (s[1] & 0x80) {
      s = s.slice(1);
    } else {
      // Leading zeroes
      return false;
    }
  }

  this.r = new BN(r);
  this.s = new BN(s);
  this.recoveryParam = null;

  return true;
};

function constructLength(arr, len) {
  if (len < 0x80) {
    arr.push(len);
    return;
  }
  var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
  arr.push(octets | 0x80);
  while (--octets) {
    arr.push((len >>> (octets << 3)) & 0xff);
  }
  arr.push(len);
}

Signature.prototype.toDER = function toDER(enc) {
  var r = this.r.toArray();
  var s = this.s.toArray();

  // Pad values
  if (r[0] & 0x80)
    r = [ 0 ].concat(r);
  // Pad values
  if (s[0] & 0x80)
    s = [ 0 ].concat(s);

  r = rmPadding(r);
  s = rmPadding(s);

  while (!s[0] && !(s[1] & 0x80)) {
    s = s.slice(1);
  }
  var arr = [ 0x02 ];
  constructLength(arr, r.length);
  arr = arr.concat(r);
  arr.push(0x02);
  constructLength(arr, s.length);
  var backHalf = arr.concat(s);
  var res = [ 0x30 ];
  constructLength(res, backHalf.length);
  res = res.concat(backHalf);
  return utils.encode(res, enc);
};


/***/ }),

/***/ 901334:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hash = __webpack_require__(633715);
var curves = __webpack_require__(456314);
var utils = __webpack_require__(587383);
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var KeyPair = __webpack_require__(977707);
var Signature = __webpack_require__(261961);

function EDDSA(curve) {
  assert(curve === 'ed25519', 'only tested with ed25519 so far');

  if (!(this instanceof EDDSA))
    return new EDDSA(curve);

  var curve = curves[curve].curve;
  this.curve = curve;
  this.g = curve.g;
  this.g.precompute(curve.n.bitLength() + 1);

  this.pointClass = curve.point().constructor;
  this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
  this.hash = hash.sha512;
}

module.exports = EDDSA;

/**
* @param {Array|String} message - message bytes
* @param {Array|String|KeyPair} secret - secret bytes or a keypair
* @returns {Signature} - signature
*/
EDDSA.prototype.sign = function sign(message, secret) {
  message = parseBytes(message);
  var key = this.keyFromSecret(secret);
  var r = this.hashInt(key.messagePrefix(), message);
  var R = this.g.mul(r);
  var Rencoded = this.encodePoint(R);
  var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
               .mul(key.priv());
  var S = r.add(s_).umod(this.curve.n);
  return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
};

/**
* @param {Array} message - message bytes
* @param {Array|String|Signature} sig - sig bytes
* @param {Array|String|Point|KeyPair} pub - public key
* @returns {Boolean} - true if public key matches sig of message
*/
EDDSA.prototype.verify = function verify(message, sig, pub) {
  message = parseBytes(message);
  sig = this.makeSignature(sig);
  var key = this.keyFromPublic(pub);
  var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
  var SG = this.g.mul(sig.S());
  var RplusAh = sig.R().add(key.pub().mul(h));
  return RplusAh.eq(SG);
};

EDDSA.prototype.hashInt = function hashInt() {
  var hash = this.hash();
  for (var i = 0; i < arguments.length; i++)
    hash.update(arguments[i]);
  return utils.intFromLE(hash.digest()).umod(this.curve.n);
};

EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
  return KeyPair.fromPublic(this, pub);
};

EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
  return KeyPair.fromSecret(this, secret);
};

EDDSA.prototype.makeSignature = function makeSignature(sig) {
  if (sig instanceof Signature)
    return sig;
  return new Signature(this, sig);
};

/**
* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
*
* EDDSA defines methods for encoding and decoding points and integers. These are
* helper convenience methods, that pass along to utility functions implied
* parameters.
*
*/
EDDSA.prototype.encodePoint = function encodePoint(point) {
  var enc = point.getY().toArray('le', this.encodingLength);
  enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
  return enc;
};

EDDSA.prototype.decodePoint = function decodePoint(bytes) {
  bytes = utils.parseBytes(bytes);

  var lastIx = bytes.length - 1;
  var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
  var xIsOdd = (bytes[lastIx] & 0x80) !== 0;

  var y = utils.intFromLE(normed);
  return this.curve.pointFromY(y, xIsOdd);
};

EDDSA.prototype.encodeInt = function encodeInt(num) {
  return num.toArray('le', this.encodingLength);
};

EDDSA.prototype.decodeInt = function decodeInt(bytes) {
  return utils.intFromLE(bytes);
};

EDDSA.prototype.isPoint = function isPoint(val) {
  return val instanceof this.pointClass;
};


/***/ }),

/***/ 977707:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(587383);
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var cachedProperty = utils.cachedProperty;

/**
* @param {EDDSA} eddsa - instance
* @param {Object} params - public/private key parameters
*
* @param {Array<Byte>} [params.secret] - secret seed bytes
* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
* @param {Array<Byte>} [params.pub] - public key point encoded as bytes
*
*/
function KeyPair(eddsa, params) {
  this.eddsa = eddsa;
  this._secret = parseBytes(params.secret);
  if (eddsa.isPoint(params.pub))
    this._pub = params.pub;
  else
    this._pubBytes = parseBytes(params.pub);
}

KeyPair.fromPublic = function fromPublic(eddsa, pub) {
  if (pub instanceof KeyPair)
    return pub;
  return new KeyPair(eddsa, { pub: pub });
};

KeyPair.fromSecret = function fromSecret(eddsa, secret) {
  if (secret instanceof KeyPair)
    return secret;
  return new KeyPair(eddsa, { secret: secret });
};

KeyPair.prototype.secret = function secret() {
  return this._secret;
};

cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
  return this.eddsa.encodePoint(this.pub());
});

cachedProperty(KeyPair, 'pub', function pub() {
  if (this._pubBytes)
    return this.eddsa.decodePoint(this._pubBytes);
  return this.eddsa.g.mul(this.priv());
});

cachedProperty(KeyPair, 'privBytes', function privBytes() {
  var eddsa = this.eddsa;
  var hash = this.hash();
  var lastIx = eddsa.encodingLength - 1;

  var a = hash.slice(0, eddsa.encodingLength);
  a[0] &= 248;
  a[lastIx] &= 127;
  a[lastIx] |= 64;

  return a;
});

cachedProperty(KeyPair, 'priv', function priv() {
  return this.eddsa.decodeInt(this.privBytes());
});

cachedProperty(KeyPair, 'hash', function hash() {
  return this.eddsa.hash().update(this.secret()).digest();
});

cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
  return this.hash().slice(this.eddsa.encodingLength);
});

KeyPair.prototype.sign = function sign(message) {
  assert(this._secret, 'KeyPair can only verify');
  return this.eddsa.sign(message, this);
};

KeyPair.prototype.verify = function verify(message, sig) {
  return this.eddsa.verify(message, sig, this);
};

KeyPair.prototype.getSecret = function getSecret(enc) {
  assert(this._secret, 'KeyPair is public only');
  return utils.encode(this.secret(), enc);
};

KeyPair.prototype.getPublic = function getPublic(enc) {
  return utils.encode(this.pubBytes(), enc);
};

module.exports = KeyPair;


/***/ }),

/***/ 261961:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(587383);
var assert = utils.assert;
var cachedProperty = utils.cachedProperty;
var parseBytes = utils.parseBytes;

/**
* @param {EDDSA} eddsa - eddsa instance
* @param {Array<Bytes>|Object} sig -
* @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
* @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
* @param {Array<Bytes>} [sig.Rencoded] - R point encoded
* @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
*/
function Signature(eddsa, sig) {
  this.eddsa = eddsa;

  if (typeof sig !== 'object')
    sig = parseBytes(sig);

  if (Array.isArray(sig)) {
    sig = {
      R: sig.slice(0, eddsa.encodingLength),
      S: sig.slice(eddsa.encodingLength)
    };
  }

  assert(sig.R && sig.S, 'Signature without R or S');

  if (eddsa.isPoint(sig.R))
    this._R = sig.R;
  if (sig.S instanceof BN)
    this._S = sig.S;

  this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
  this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
}

cachedProperty(Signature, 'S', function S() {
  return this.eddsa.decodeInt(this.Sencoded());
});

cachedProperty(Signature, 'R', function R() {
  return this.eddsa.decodePoint(this.Rencoded());
});

cachedProperty(Signature, 'Rencoded', function Rencoded() {
  return this.eddsa.encodePoint(this.R());
});

cachedProperty(Signature, 'Sencoded', function Sencoded() {
  return this.eddsa.encodeInt(this.S());
});

Signature.prototype.toBytes = function toBytes() {
  return this.Rencoded().concat(this.Sencoded());
};

Signature.prototype.toHex = function toHex() {
  return utils.encode(this.toBytes(), 'hex').toUpperCase();
};

module.exports = Signature;


/***/ }),

/***/ 536578:
/***/ ((module) => {

module.exports = {
  doubles: {
    step: 4,
    points: [
      [
        'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
        'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'
      ],
      [
        '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
        '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'
      ],
      [
        '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
        'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'
      ],
      [
        '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
        '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'
      ],
      [
        '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
        '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'
      ],
      [
        '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
        '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'
      ],
      [
        'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
        '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'
      ],
      [
        '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
        'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'
      ],
      [
        'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
        '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'
      ],
      [
        'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
        'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'
      ],
      [
        'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
        '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'
      ],
      [
        '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
        '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'
      ],
      [
        '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
        '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'
      ],
      [
        '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
        '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'
      ],
      [
        '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
        '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'
      ],
      [
        '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
        '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'
      ],
      [
        '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
        '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'
      ],
      [
        '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
        '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'
      ],
      [
        '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
        'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'
      ],
      [
        'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
        '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'
      ],
      [
        'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
        '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'
      ],
      [
        '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
        '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'
      ],
      [
        '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
        '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'
      ],
      [
        'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
        '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'
      ],
      [
        '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
        'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'
      ],
      [
        'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
        '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'
      ],
      [
        'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
        'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'
      ],
      [
        'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
        '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'
      ],
      [
        'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
        'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'
      ],
      [
        'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
        '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'
      ],
      [
        '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
        'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'
      ],
      [
        '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
        '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'
      ],
      [
        'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
        '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'
      ],
      [
        '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
        'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'
      ],
      [
        'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
        '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'
      ],
      [
        'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
        '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'
      ],
      [
        'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
        'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'
      ],
      [
        '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
        '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'
      ],
      [
        '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
        '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'
      ],
      [
        '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
        'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'
      ],
      [
        '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
        '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'
      ],
      [
        'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
        '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'
      ],
      [
        '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
        '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'
      ],
      [
        '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
        'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'
      ],
      [
        '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
        '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'
      ],
      [
        'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
        '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'
      ],
      [
        '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
        'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'
      ],
      [
        'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
        'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'
      ],
      [
        'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
        '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'
      ],
      [
        '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
        'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'
      ],
      [
        '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
        'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'
      ],
      [
        'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
        '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'
      ],
      [
        'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
        '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'
      ],
      [
        'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
        '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'
      ],
      [
        '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
        'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'
      ],
      [
        '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
        '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'
      ],
      [
        'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
        'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'
      ],
      [
        '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
        'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'
      ],
      [
        '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
        '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'
      ],
      [
        '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
        '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'
      ],
      [
        'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
        'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'
      ],
      [
        '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
        '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'
      ],
      [
        '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
        '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'
      ],
      [
        'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
        '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'
      ],
      [
        'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
        'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82'
      ]
    ]
  },
  naf: {
    wnd: 7,
    points: [
      [
        'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
        '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'
      ],
      [
        '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
        'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'
      ],
      [
        '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
        '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'
      ],
      [
        'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
        'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'
      ],
      [
        '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
        'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'
      ],
      [
        'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
        'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'
      ],
      [
        'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
        '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'
      ],
      [
        'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
        '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'
      ],
      [
        '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
        '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'
      ],
      [
        '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
        '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'
      ],
      [
        '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
        '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'
      ],
      [
        '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
        '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'
      ],
      [
        'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
        'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'
      ],
      [
        'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
        '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'
      ],
      [
        '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
        'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'
      ],
      [
        '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
        'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'
      ],
      [
        '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
        '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'
      ],
      [
        '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
        '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'
      ],
      [
        '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
        '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'
      ],
      [
        '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
        'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'
      ],
      [
        'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
        'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'
      ],
      [
        '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
        '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'
      ],
      [
        '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
        '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'
      ],
      [
        'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
        'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'
      ],
      [
        '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
        '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'
      ],
      [
        'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
        'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'
      ],
      [
        'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
        'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'
      ],
      [
        '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
        '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'
      ],
      [
        '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
        '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'
      ],
      [
        '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
        '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'
      ],
      [
        'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
        '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'
      ],
      [
        '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
        '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'
      ],
      [
        'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
        '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'
      ],
      [
        '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
        'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'
      ],
      [
        '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
        'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'
      ],
      [
        'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
        'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'
      ],
      [
        '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
        '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'
      ],
      [
        '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
        'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'
      ],
      [
        'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
        'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'
      ],
      [
        '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
        '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'
      ],
      [
        '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
        'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'
      ],
      [
        '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
        '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'
      ],
      [
        '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
        'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'
      ],
      [
        'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
        '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'
      ],
      [
        '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
        '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'
      ],
      [
        '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
        'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'
      ],
      [
        '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
        'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'
      ],
      [
        'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
        'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'
      ],
      [
        'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
        'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'
      ],
      [
        '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
        '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'
      ],
      [
        '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
        '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'
      ],
      [
        'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
        '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'
      ],
      [
        'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
        'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'
      ],
      [
        '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
        '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'
      ],
      [
        '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
        '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'
      ],
      [
        'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
        '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'
      ],
      [
        '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
        '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'
      ],
      [
        'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
        'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'
      ],
      [
        '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
        'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'
      ],
      [
        '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
        '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'
      ],
      [
        'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
        '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'
      ],
      [
        'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
        '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'
      ],
      [
        '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
        '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'
      ],
      [
        '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
        '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'
      ],
      [
        '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
        'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'
      ],
      [
        '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
        'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'
      ],
      [
        '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
        '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'
      ],
      [
        '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
        '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'
      ],
      [
        '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
        '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'
      ],
      [
        '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
        'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'
      ],
      [
        'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
        'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'
      ],
      [
        '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
        'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'
      ],
      [
        'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
        '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'
      ],
      [
        'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
        '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'
      ],
      [
        'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
        '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'
      ],
      [
        'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
        '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'
      ],
      [
        '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
        'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'
      ],
      [
        '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
        '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'
      ],
      [
        '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
        'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'
      ],
      [
        'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
        'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'
      ],
      [
        'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
        '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'
      ],
      [
        'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
        'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'
      ],
      [
        'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
        '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'
      ],
      [
        '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
        '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'
      ],
      [
        'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
        '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'
      ],
      [
        'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
        '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'
      ],
      [
        '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
        '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'
      ],
      [
        '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
        'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'
      ],
      [
        'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
        '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'
      ],
      [
        'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
        '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'
      ],
      [
        'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
        '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'
      ],
      [
        '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
        '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'
      ],
      [
        'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
        'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'
      ],
      [
        '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
        'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'
      ],
      [
        'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
        'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'
      ],
      [
        'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
        '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'
      ],
      [
        '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
        'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'
      ],
      [
        'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
        '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'
      ],
      [
        'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
        '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'
      ],
      [
        'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
        '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'
      ],
      [
        '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
        'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'
      ],
      [
        '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
        'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'
      ],
      [
        'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
        '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'
      ],
      [
        '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
        'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'
      ],
      [
        '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
        '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'
      ],
      [
        '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
        'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'
      ],
      [
        'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
        'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'
      ],
      [
        '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
        'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'
      ],
      [
        '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
        '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'
      ],
      [
        '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
        'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'
      ],
      [
        '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
        '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'
      ],
      [
        'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
        'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'
      ],
      [
        '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
        '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'
      ],
      [
        'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
        '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'
      ],
      [
        '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
        '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'
      ],
      [
        'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
        'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'
      ],
      [
        'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
        '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'
      ],
      [
        'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
        'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'
      ],
      [
        '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
        'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'
      ],
      [
        '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
        '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'
      ],
      [
        '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
        'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'
      ],
      [
        '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
        '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'
      ],
      [
        '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
        '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'
      ],
      [
        '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
        'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'
      ],
      [
        '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
        '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'
      ],
      [
        '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
        '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'
      ],
      [
        '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
        '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9'
      ]
    ]
  }
};


/***/ }),

/***/ 587383:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var utils = exports;
var BN = __webpack_require__(213550);
var minAssert = __webpack_require__(79746);
var minUtils = __webpack_require__(434504);

utils.assert = minAssert;
utils.toArray = minUtils.toArray;
utils.zero2 = minUtils.zero2;
utils.toHex = minUtils.toHex;
utils.encode = minUtils.encode;

// Represent num in a w-NAF form
function getNAF(num, w, bits) {
  var naf = new Array(Math.max(num.bitLength(), bits) + 1);
  naf.fill(0);

  var ws = 1 << (w + 1);
  var k = num.clone();

  for (var i = 0; i < naf.length; i++) {
    var z;
    var mod = k.andln(ws - 1);
    if (k.isOdd()) {
      if (mod > (ws >> 1) - 1)
        z = (ws >> 1) - mod;
      else
        z = mod;
      k.isubn(z);
    } else {
      z = 0;
    }

    naf[i] = z;
    k.iushrn(1);
  }

  return naf;
}
utils.getNAF = getNAF;

// Represent k1, k2 in a Joint Sparse Form
function getJSF(k1, k2) {
  var jsf = [
    [],
    []
  ];

  k1 = k1.clone();
  k2 = k2.clone();
  var d1 = 0;
  var d2 = 0;
  while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {

    // First phase
    var m14 = (k1.andln(3) + d1) & 3;
    var m24 = (k2.andln(3) + d2) & 3;
    if (m14 === 3)
      m14 = -1;
    if (m24 === 3)
      m24 = -1;
    var u1;
    if ((m14 & 1) === 0) {
      u1 = 0;
    } else {
      var m8 = (k1.andln(7) + d1) & 7;
      if ((m8 === 3 || m8 === 5) && m24 === 2)
        u1 = -m14;
      else
        u1 = m14;
    }
    jsf[0].push(u1);

    var u2;
    if ((m24 & 1) === 0) {
      u2 = 0;
    } else {
      var m8 = (k2.andln(7) + d2) & 7;
      if ((m8 === 3 || m8 === 5) && m14 === 2)
        u2 = -m24;
      else
        u2 = m24;
    }
    jsf[1].push(u2);

    // Second phase
    if (2 * d1 === u1 + 1)
      d1 = 1 - d1;
    if (2 * d2 === u2 + 1)
      d2 = 1 - d2;
    k1.iushrn(1);
    k2.iushrn(1);
  }

  return jsf;
}
utils.getJSF = getJSF;

function cachedProperty(obj, name, computer) {
  var key = '_' + name;
  obj.prototype[name] = function cachedProperty() {
    return this[key] !== undefined ? this[key] :
           this[key] = computer.call(this);
  };
}
utils.cachedProperty = cachedProperty;

function parseBytes(bytes) {
  return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
                                     bytes;
}
utils.parseBytes = parseBytes;

function intFromLE(bytes) {
  return new BN(bytes, 'hex', 'le');
}
utils.intFromLE = intFromLE;



/***/ }),

/***/ 636409:
/***/ ((module) => {

"use strict";
module.exports = {"i8":"6.5.3"};

/***/ }),

/***/ 216755:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(371224)(__webpack_require__(719516)(__dirname))


/***/ }),

/***/ 877864:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

try {
  module.exports = __webpack_require__(216755)
} catch (err) {
  module.exports = __webpack_require__(102973)
}


/***/ }),

/***/ 102973:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(371224)(__webpack_require__(966514))


/***/ }),

/***/ 371224:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const createKeccak = __webpack_require__(673867)
const createShake = __webpack_require__(148425)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 673867:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const { Transform } = __webpack_require__(92413)

module.exports = (KeccakState) => class Keccak extends Transform {
  constructor (rate, capacity, delimitedSuffix, hashBitLength, options) {
    super(options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  _transform (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  _flush (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  update (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  digest (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  _resetState () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  _clone () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }
}


/***/ }),

/***/ 148425:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const { Transform } = __webpack_require__(92413)

module.exports = (KeccakState) => class Shake extends Transform {
  constructor (rate, capacity, delimitedSuffix, options) {
    super(options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  _transform (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  _flush () {}

  _read (size) {
    this.push(this.squeeze(size))
  }

  update (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  squeeze (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  _resetState () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  _clone () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }
}


/***/ }),

/***/ 629175:
/***/ ((__unused_webpack_module, exports) => {

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 966514:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const keccakState = __webpack_require__(629175)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (let i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 647984:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const addon = __webpack_require__(719516)(__dirname)
module.exports = __webpack_require__(439203)(new addon.Secp256k1())


/***/ }),

/***/ 753242:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(439203)(__webpack_require__(25166))


/***/ }),

/***/ 383839:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

try {
  module.exports = __webpack_require__(647984)
} catch (err) {
  module.exports = __webpack_require__(753242)
}


/***/ }),

/***/ 25166:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const EC = __webpack_require__(546698).ec

const ec = new EC('secp256k1')
const ecparams = ec.curve

// Hack, we can not use bn.js@5, while elliptic uses bn.js@4
// See https://github.com/indutny/elliptic/issues/191#issuecomment-569888758
const BN = ecparams.n.constructor

function loadCompressedPublicKey (first, xbuf) {
  let x = new BN(xbuf)

  // overflow
  if (x.cmp(ecparams.p) >= 0) return null
  x = x.toRed(ecparams.red)

  // compute corresponding Y
  let y = x.redSqr().redIMul(x).redIAdd(ecparams.b).redSqrt()
  if ((first === 0x03) !== y.isOdd()) y = y.redNeg()

  return ec.keyPair({ pub: { x: x, y: y } })
}

function loadUncompressedPublicKey (first, xbuf, ybuf) {
  let x = new BN(xbuf)
  let y = new BN(ybuf)

  // overflow
  if (x.cmp(ecparams.p) >= 0 || y.cmp(ecparams.p) >= 0) return null

  x = x.toRed(ecparams.red)
  y = y.toRed(ecparams.red)

  // is odd flag
  if ((first === 0x06 || first === 0x07) && y.isOdd() !== (first === 0x07)) return null

  // x*x*x + b = y*y
  const x3 = x.redSqr().redIMul(x)
  if (!y.redSqr().redISub(x3.redIAdd(ecparams.b)).isZero()) return null

  return ec.keyPair({ pub: { x: x, y: y } })
}

function loadPublicKey (pubkey) {
  // length should be validated in interface
  const first = pubkey[0]
  switch (first) {
    case 0x02:
    case 0x03:
      if (pubkey.length !== 33) return null
      return loadCompressedPublicKey(first, pubkey.subarray(1, 33))
    case 0x04:
    case 0x06:
    case 0x07:
      if (pubkey.length !== 65) return null
      return loadUncompressedPublicKey(first, pubkey.subarray(1, 33), pubkey.subarray(33, 65))
    default:
      return null
  }
}

function savePublicKey (output, point) {
  const pubkey = point.encode(null, output.length === 33)
  // Loop should be faster because we do not need create extra Uint8Array
  // output.set(new Uint8Array(pubkey))
  for (let i = 0; i < output.length; ++i) output[i] = pubkey[i]
}

module.exports = {
  contextRandomize () {
    return 0
  },

  privateKeyVerify (seckey) {
    const bn = new BN(seckey)
    return bn.cmp(ecparams.n) < 0 && !bn.isZero() ? 0 : 1
  },

  privateKeyNegate (seckey) {
    const bn = new BN(seckey)
    const negate = ecparams.n.sub(bn).umod(ecparams.n).toArrayLike(Uint8Array, 'be', 32)
    seckey.set(negate)
    return 0
  },

  privateKeyTweakAdd (seckey, tweak) {
    const bn = new BN(tweak)
    if (bn.cmp(ecparams.n) >= 0) return 1

    bn.iadd(new BN(seckey))
    if (bn.cmp(ecparams.n) >= 0) bn.isub(ecparams.n)
    if (bn.isZero()) return 1

    const tweaked = bn.toArrayLike(Uint8Array, 'be', 32)
    seckey.set(tweaked)

    return 0
  },

  privateKeyTweakMul (seckey, tweak) {
    let bn = new BN(tweak)
    if (bn.cmp(ecparams.n) >= 0 || bn.isZero()) return 1

    bn.imul(new BN(seckey))
    if (bn.cmp(ecparams.n) >= 0) bn = bn.umod(ecparams.n)

    const tweaked = bn.toArrayLike(Uint8Array, 'be', 32)
    seckey.set(tweaked)

    return 0
  },

  publicKeyVerify (pubkey) {
    const pair = loadPublicKey(pubkey)
    return pair === null ? 1 : 0
  },

  publicKeyCreate (output, seckey) {
    const bn = new BN(seckey)
    if (bn.cmp(ecparams.n) >= 0 || bn.isZero()) return 1

    const point = ec.keyFromPrivate(seckey).getPublic()
    savePublicKey(output, point)

    return 0
  },

  publicKeyConvert (output, pubkey) {
    const pair = loadPublicKey(pubkey)
    if (pair === null) return 1

    const point = pair.getPublic()
    savePublicKey(output, point)

    return 0
  },

  publicKeyNegate (output, pubkey) {
    const pair = loadPublicKey(pubkey)
    if (pair === null) return 1

    const point = pair.getPublic()
    point.y = point.y.redNeg()
    savePublicKey(output, point)

    return 0
  },

  publicKeyCombine (output, pubkeys) {
    const pairs = new Array(pubkeys.length)
    for (let i = 0; i < pubkeys.length; ++i) {
      pairs[i] = loadPublicKey(pubkeys[i])
      if (pairs[i] === null) return 1
    }

    let point = pairs[0].getPublic()
    for (let i = 1; i < pairs.length; ++i) point = point.add(pairs[i].pub)
    if (point.isInfinity()) return 2

    savePublicKey(output, point)

    return 0
  },

  publicKeyTweakAdd (output, pubkey, tweak) {
    const pair = loadPublicKey(pubkey)
    if (pair === null) return 1

    tweak = new BN(tweak)
    if (tweak.cmp(ecparams.n) >= 0) return 2

    const point = pair.getPublic().add(ecparams.g.mul(tweak))
    if (point.isInfinity()) return 2

    savePublicKey(output, point)

    return 0
  },

  publicKeyTweakMul (output, pubkey, tweak) {
    const pair = loadPublicKey(pubkey)
    if (pair === null) return 1

    tweak = new BN(tweak)
    if (tweak.cmp(ecparams.n) >= 0 || tweak.isZero()) return 2

    const point = pair.getPublic().mul(tweak)
    savePublicKey(output, point)

    return 0
  },

  signatureNormalize (sig) {
    const r = new BN(sig.subarray(0, 32))
    const s = new BN(sig.subarray(32, 64))
    if (r.cmp(ecparams.n) >= 0 || s.cmp(ecparams.n) >= 0) return 1

    if (s.cmp(ec.nh) === 1) {
      sig.set(ecparams.n.sub(s).toArrayLike(Uint8Array, 'be', 32), 32)
    }

    return 0
  },

  // Copied 1-to-1 from https://github.com/bitcoinjs/bip66/blob/master/index.js
  // Adapted for Uint8Array instead Buffer
  signatureExport (obj, sig) {
    const sigR = sig.subarray(0, 32)
    const sigS = sig.subarray(32, 64)
    if (new BN(sigR).cmp(ecparams.n) >= 0) return 1
    if (new BN(sigS).cmp(ecparams.n) >= 0) return 1

    const { output } = obj

    // Prepare R
    let r = output.subarray(4, 4 + 33)
    r[0] = 0x00
    r.set(sigR, 1)

    let lenR = 33
    let posR = 0
    for (; lenR > 1 && r[posR] === 0x00 && !(r[posR + 1] & 0x80); --lenR, ++posR);

    r = r.subarray(posR)
    if (r[0] & 0x80) return 1
    if (lenR > 1 && (r[0] === 0x00) && !(r[1] & 0x80)) return 1

    // Prepare S
    let s = output.subarray(6 + 33, 6 + 33 + 33)
    s[0] = 0x00
    s.set(sigS, 1)

    let lenS = 33
    let posS = 0
    for (; lenS > 1 && s[posS] === 0x00 && !(s[posS + 1] & 0x80); --lenS, ++posS);

    s = s.subarray(posS)
    if (s[0] & 0x80) return 1
    if (lenS > 1 && (s[0] === 0x00) && !(s[1] & 0x80)) return 1

    // Set output length for return
    obj.outputlen = 6 + lenR + lenS

    // Output in specified format
    // 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S]
    output[0] = 0x30
    output[1] = obj.outputlen - 2
    output[2] = 0x02
    output[3] = r.length
    output.set(r, 4)
    output[4 + lenR] = 0x02
    output[5 + lenR] = s.length
    output.set(s, 6 + lenR)

    return 0
  },

  // Copied 1-to-1 from https://github.com/bitcoinjs/bip66/blob/master/index.js
  // Adapted for Uint8Array instead Buffer
  signatureImport (output, sig) {
    if (sig.length < 8) return 1
    if (sig.length > 72) return 1
    if (sig[0] !== 0x30) return 1
    if (sig[1] !== sig.length - 2) return 1
    if (sig[2] !== 0x02) return 1

    const lenR = sig[3]
    if (lenR === 0) return 1
    if (5 + lenR >= sig.length) return 1
    if (sig[4 + lenR] !== 0x02) return 1

    const lenS = sig[5 + lenR]
    if (lenS === 0) return 1
    if ((6 + lenR + lenS) !== sig.length) return 1

    if (sig[4] & 0x80) return 1
    if (lenR > 1 && (sig[4] === 0x00) && !(sig[5] & 0x80)) return 1

    if (sig[lenR + 6] & 0x80) return 1
    if (lenS > 1 && (sig[lenR + 6] === 0x00) && !(sig[lenR + 7] & 0x80)) return 1

    let sigR = sig.subarray(4, 4 + lenR)
    if (sigR.length === 33 && sigR[0] === 0x00) sigR = sigR.subarray(1)
    if (sigR.length > 32) return 1

    let sigS = sig.subarray(6 + lenR)
    if (sigS.length === 33 && sigS[0] === 0x00) sigS = sigS.slice(1)
    if (sigS.length > 32) throw new Error('S length is too long')

    let r = new BN(sigR)
    if (r.cmp(ecparams.n) >= 0) r = new BN(0)

    let s = new BN(sig.subarray(6 + lenR))
    if (s.cmp(ecparams.n) >= 0) s = new BN(0)

    output.set(r.toArrayLike(Uint8Array, 'be', 32), 0)
    output.set(s.toArrayLike(Uint8Array, 'be', 32), 32)

    return 0
  },

  ecdsaSign (obj, message, seckey, data, noncefn) {
    if (noncefn) {
      const _noncefn = noncefn
      noncefn = (counter) => {
        const nonce = _noncefn(message, seckey, null, data, counter)

        const isValid = nonce instanceof Uint8Array && nonce.length === 32
        if (!isValid) throw new Error('This is the way')

        return new BN(nonce)
      }
    }

    const d = new BN(seckey)
    if (d.cmp(ecparams.n) >= 0 || d.isZero()) return 1

    let sig
    try {
      sig = ec.sign(message, seckey, { canonical: true, k: noncefn, pers: data })
    } catch (err) {
      return 1
    }

    obj.signature.set(sig.r.toArrayLike(Uint8Array, 'be', 32), 0)
    obj.signature.set(sig.s.toArrayLike(Uint8Array, 'be', 32), 32)
    obj.recid = sig.recoveryParam

    return 0
  },

  ecdsaVerify (sig, msg32, pubkey) {
    const sigObj = { r: sig.subarray(0, 32), s: sig.subarray(32, 64) }

    const sigr = new BN(sigObj.r)
    const sigs = new BN(sigObj.s)
    if (sigr.cmp(ecparams.n) >= 0 || sigs.cmp(ecparams.n) >= 0) return 1
    if (sigs.cmp(ec.nh) === 1 || sigr.isZero() || sigs.isZero()) return 3

    const pair = loadPublicKey(pubkey)
    if (pair === null) return 2

    const point = pair.getPublic()
    const isValid = ec.verify(msg32, sigObj, point)
    return isValid ? 0 : 3
  },

  ecdsaRecover (output, sig, recid, msg32) {
    const sigObj = { r: sig.slice(0, 32), s: sig.slice(32, 64) }

    const sigr = new BN(sigObj.r)
    const sigs = new BN(sigObj.s)
    if (sigr.cmp(ecparams.n) >= 0 || sigs.cmp(ecparams.n) >= 0) return 1

    if (sigr.isZero() || sigs.isZero()) return 2

    // Can throw `throw new Error('Unable to find sencond key candinate');`
    let point
    try {
      point = ec.recoverPubKey(msg32, sigObj, recid)
    } catch (err) {
      return 2
    }

    savePublicKey(output, point)

    return 0
  },

  ecdh (output, pubkey, seckey, data, hashfn, xbuf, ybuf) {
    const pair = loadPublicKey(pubkey)
    if (pair === null) return 1

    const scalar = new BN(seckey)
    if (scalar.cmp(ecparams.n) >= 0 || scalar.isZero()) return 2

    const point = pair.getPublic().mul(scalar)

    if (hashfn === undefined) {
      const data = point.encode(null, true)
      const sha256 = ec.hash().update(data).digest()
      for (let i = 0; i < 32; ++i) output[i] = sha256[i]
    } else {
      if (!xbuf) xbuf = new Uint8Array(32)
      const x = point.getX().toArray('be', 32)
      for (let i = 0; i < 32; ++i) xbuf[i] = x[i]

      if (!ybuf) ybuf = new Uint8Array(32)
      const y = point.getY().toArray('be', 32)
      for (let i = 0; i < 32; ++i) ybuf[i] = y[i]

      const hash = hashfn(xbuf, ybuf, data)

      const isValid = hash instanceof Uint8Array && hash.length === output.length
      if (!isValid) return 2

      output.set(hash)
    }

    return 0
  }
}


/***/ }),

/***/ 439203:
/***/ ((module) => {

const errors = {
  IMPOSSIBLE_CASE: 'Impossible case. Please create issue.',
  TWEAK_ADD:
    'The tweak was out of range or the resulted private key is invalid',
  TWEAK_MUL: 'The tweak was out of range or equal to zero',
  CONTEXT_RANDOMIZE_UNKNOW: 'Unknow error on context randomization',
  SECKEY_INVALID: 'Private Key is invalid',
  PUBKEY_PARSE: 'Public Key could not be parsed',
  PUBKEY_SERIALIZE: 'Public Key serialization error',
  PUBKEY_COMBINE: 'The sum of the public keys is not valid',
  SIG_PARSE: 'Signature could not be parsed',
  SIGN: 'The nonce generation function failed, or the private key was invalid',
  RECOVER: 'Public key could not be recover',
  ECDH: 'Scalar was invalid (zero or overflow)'
}

function assert (cond, msg) {
  if (!cond) throw new Error(msg)
}

function isUint8Array (name, value, length) {
  assert(value instanceof Uint8Array, `Expected ${name} to be an Uint8Array`)

  if (length !== undefined) {
    if (Array.isArray(length)) {
      const numbers = length.join(', ')
      const msg = `Expected ${name} to be an Uint8Array with length [${numbers}]`
      assert(length.includes(value.length), msg)
    } else {
      const msg = `Expected ${name} to be an Uint8Array with length ${length}`
      assert(value.length === length, msg)
    }
  }
}

function isCompressed (value) {
  assert(toTypeString(value) === 'Boolean', 'Expected compressed to be a Boolean')
}

function getAssertedOutput (output = (len) => new Uint8Array(len), length) {
  if (typeof output === 'function') output = output(length)
  isUint8Array('output', output, length)
  return output
}

function toTypeString (value) {
  return Object.prototype.toString.call(value).slice(8, -1)
}

module.exports = (secp256k1) => {
  return {
    contextRandomize (seed) {
      assert(
        seed === null || seed instanceof Uint8Array,
        'Expected seed to be an Uint8Array or null'
      )
      if (seed !== null) isUint8Array('seed', seed, 32)

      switch (secp256k1.contextRandomize(seed)) {
        case 1:
          throw new Error(errors.CONTEXT_RANDOMIZE_UNKNOW)
      }
    },

    privateKeyVerify (seckey) {
      isUint8Array('private key', seckey, 32)

      return secp256k1.privateKeyVerify(seckey) === 0
    },

    privateKeyNegate (seckey) {
      isUint8Array('private key', seckey, 32)

      switch (secp256k1.privateKeyNegate(seckey)) {
        case 0:
          return seckey
        case 1:
          throw new Error(errors.IMPOSSIBLE_CASE)
      }
    },

    privateKeyTweakAdd (seckey, tweak) {
      isUint8Array('private key', seckey, 32)
      isUint8Array('tweak', tweak, 32)

      switch (secp256k1.privateKeyTweakAdd(seckey, tweak)) {
        case 0:
          return seckey
        case 1:
          throw new Error(errors.TWEAK_ADD)
      }
    },

    privateKeyTweakMul (seckey, tweak) {
      isUint8Array('private key', seckey, 32)
      isUint8Array('tweak', tweak, 32)

      switch (secp256k1.privateKeyTweakMul(seckey, tweak)) {
        case 0:
          return seckey
        case 1:
          throw new Error(errors.TWEAK_MUL)
      }
    },

    publicKeyVerify (pubkey) {
      isUint8Array('public key', pubkey, [33, 65])

      return secp256k1.publicKeyVerify(pubkey) === 0
    },

    publicKeyCreate (seckey, compressed = true, output) {
      isUint8Array('private key', seckey, 32)
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyCreate(output, seckey)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.SECKEY_INVALID)
        case 2:
          throw new Error(errors.PUBKEY_SERIALIZE)
      }
    },

    publicKeyConvert (pubkey, compressed = true, output) {
      isUint8Array('public key', pubkey, [33, 65])
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyConvert(output, pubkey)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.PUBKEY_SERIALIZE)
      }
    },

    publicKeyNegate (pubkey, compressed = true, output) {
      isUint8Array('public key', pubkey, [33, 65])
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyNegate(output, pubkey)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.IMPOSSIBLE_CASE)
        case 3:
          throw new Error(errors.PUBKEY_SERIALIZE)
      }
    },

    publicKeyCombine (pubkeys, compressed = true, output) {
      assert(Array.isArray(pubkeys), 'Expected public keys to be an Array')
      assert(pubkeys.length > 0, 'Expected public keys array will have more than zero items')
      for (const pubkey of pubkeys) {
        isUint8Array('public key', pubkey, [33, 65])
      }
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyCombine(output, pubkeys)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.PUBKEY_COMBINE)
        case 3:
          throw new Error(errors.PUBKEY_SERIALIZE)
      }
    },

    publicKeyTweakAdd (pubkey, tweak, compressed = true, output) {
      isUint8Array('public key', pubkey, [33, 65])
      isUint8Array('tweak', tweak, 32)
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyTweakAdd(output, pubkey, tweak)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.TWEAK_ADD)
      }
    },

    publicKeyTweakMul (pubkey, tweak, compressed = true, output) {
      isUint8Array('public key', pubkey, [33, 65])
      isUint8Array('tweak', tweak, 32)
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.publicKeyTweakMul(output, pubkey, tweak)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.TWEAK_MUL)
      }
    },

    signatureNormalize (sig) {
      isUint8Array('signature', sig, 64)

      switch (secp256k1.signatureNormalize(sig)) {
        case 0:
          return sig
        case 1:
          throw new Error(errors.SIG_PARSE)
      }
    },

    signatureExport (sig, output) {
      isUint8Array('signature', sig, 64)
      output = getAssertedOutput(output, 72)

      const obj = { output, outputlen: 72 }
      switch (secp256k1.signatureExport(obj, sig)) {
        case 0:
          return output.slice(0, obj.outputlen)
        case 1:
          throw new Error(errors.SIG_PARSE)
        case 2:
          throw new Error(errors.IMPOSSIBLE_CASE)
      }
    },

    signatureImport (sig, output) {
      isUint8Array('signature', sig)
      output = getAssertedOutput(output, 64)

      switch (secp256k1.signatureImport(output, sig)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.SIG_PARSE)
        case 2:
          throw new Error(errors.IMPOSSIBLE_CASE)
      }
    },

    ecdsaSign (msg32, seckey, options = {}, output) {
      isUint8Array('message', msg32, 32)
      isUint8Array('private key', seckey, 32)
      assert(toTypeString(options) === 'Object', 'Expected options to be an Object')
      if (options.data !== undefined) isUint8Array('options.data', options.data)
      if (options.noncefn !== undefined) assert(toTypeString(options.noncefn) === 'Function', 'Expected options.noncefn to be a Function')
      output = getAssertedOutput(output, 64)

      const obj = { signature: output, recid: null }
      switch (secp256k1.ecdsaSign(obj, msg32, seckey, options.data, options.noncefn)) {
        case 0:
          return obj
        case 1:
          throw new Error(errors.SIGN)
        case 2:
          throw new Error(errors.IMPOSSIBLE_CASE)
      }
    },

    ecdsaVerify (sig, msg32, pubkey) {
      isUint8Array('signature', sig, 64)
      isUint8Array('message', msg32, 32)
      isUint8Array('public key', pubkey, [33, 65])

      switch (secp256k1.ecdsaVerify(sig, msg32, pubkey)) {
        case 0:
          return true
        case 3:
          return false
        case 1:
          throw new Error(errors.SIG_PARSE)
        case 2:
          throw new Error(errors.PUBKEY_PARSE)
      }
    },

    ecdsaRecover (sig, recid, msg32, compressed = true, output) {
      isUint8Array('signature', sig, 64)
      assert(
        toTypeString(recid) === 'Number' &&
          recid >= 0 &&
          recid <= 3,
        'Expected recovery id to be a Number within interval [0, 3]'
      )
      isUint8Array('message', msg32, 32)
      isCompressed(compressed)
      output = getAssertedOutput(output, compressed ? 33 : 65)

      switch (secp256k1.ecdsaRecover(output, sig, recid, msg32)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.SIG_PARSE)
        case 2:
          throw new Error(errors.RECOVER)
        case 3:
          throw new Error(errors.IMPOSSIBLE_CASE)
      }
    },

    ecdh (pubkey, seckey, options = {}, output) {
      isUint8Array('public key', pubkey, [33, 65])
      isUint8Array('private key', seckey, 32)
      assert(toTypeString(options) === 'Object', 'Expected options to be an Object')
      if (options.data !== undefined) isUint8Array('options.data', options.data)
      if (options.hashfn !== undefined) {
        assert(toTypeString(options.hashfn) === 'Function', 'Expected options.hashfn to be a Function')
        if (options.xbuf !== undefined) isUint8Array('options.xbuf', options.xbuf, 32)
        if (options.ybuf !== undefined) isUint8Array('options.ybuf', options.ybuf, 32)
        isUint8Array('output', output)
      } else {
        output = getAssertedOutput(output, 32)
      }

      switch (secp256k1.ecdh(output, pubkey, seckey, options.data, options.hashfn, options.xbuf, options.ybuf)) {
        case 0:
          return output
        case 1:
          throw new Error(errors.PUBKEY_PARSE)
        case 2:
          throw new Error(errors.ECDH)
      }
    }
  }
}


/***/ }),

/***/ 690472:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var randombytes = __webpack_require__(351353);
function getRandomBytes(bytes) {
    return new Promise(function (resolve, reject) {
        randombytes(bytes, function (err, resp) {
            if (err) {
                reject(err);
                return;
            }
            resolve(resp);
        });
    });
}
exports.getRandomBytes = getRandomBytes;
function getRandomBytesSync(bytes) {
    return randombytes(bytes);
}
exports.getRandomBytesSync = getRandomBytesSync;
//# sourceMappingURL=random.js.map

/***/ }),

/***/ 795053:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1_1 = __webpack_require__(383839);
var random_1 = __webpack_require__(690472);
var SECP256K1_PRIVATE_KEY_SIZE = 32;
function createPrivateKey() {
    return __awaiter(this, void 0, void 0, function () {
        var pk;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (false) {}
                    return [4 /*yield*/, random_1.getRandomBytes(SECP256K1_PRIVATE_KEY_SIZE)];
                case 1:
                    pk = _a.sent();
                    if (secp256k1_1.privateKeyVerify(pk)) {
                        return [2 /*return*/, pk];
                    }
                    return [3 /*break*/, 0];
                case 2: return [2 /*return*/];
            }
        });
    });
}
exports.createPrivateKey = createPrivateKey;
function createPrivateKeySync() {
    while (true) {
        var pk = random_1.getRandomBytesSync(SECP256K1_PRIVATE_KEY_SIZE);
        if (secp256k1_1.privateKeyVerify(pk)) {
            return pk;
        }
    }
}
exports.createPrivateKeySync = createPrivateKeySync;
__export(__webpack_require__(383839));
//# sourceMappingURL=secp256k1.js.map

/***/ }),

/***/ 760662:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var crypto_1 = __webpack_require__(676417);
exports.createHash = crypto_1.createHash;
exports.createHmac = crypto_1.createHmac;
exports.randomBytes = crypto_1.randomBytes;
//# sourceMappingURL=hdkey-crypto.js.map

/***/ }),

/***/ 386454:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __importStar(__webpack_require__(383839));
function privateKeyVerify(privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
}
exports.privateKeyVerify = privateKeyVerify;
function publicKeyCreate(privateKey, compressed) {
    if (compressed === void 0) { compressed = true; }
    return Buffer.from(secp256k1.publicKeyCreate(privateKey, compressed));
}
exports.publicKeyCreate = publicKeyCreate;
function publicKeyVerify(publicKey) {
    return secp256k1.publicKeyVerify(publicKey);
}
exports.publicKeyVerify = publicKeyVerify;
function publicKeyConvert(publicKey, compressed) {
    if (compressed === void 0) { compressed = true; }
    return Buffer.from(secp256k1.publicKeyConvert(publicKey, compressed));
}
exports.publicKeyConvert = publicKeyConvert;
function privateKeyTweakAdd(publicKey, tweak) {
    return Buffer.from(secp256k1.privateKeyTweakAdd(Buffer.from(publicKey), tweak));
}
exports.privateKeyTweakAdd = privateKeyTweakAdd;
function publicKeyTweakAdd(publicKey, tweak, compressed) {
    if (compressed === void 0) { compressed = true; }
    return Buffer.from(secp256k1.publicKeyTweakAdd(Buffer.from(publicKey), tweak, compressed));
}
exports.publicKeyTweakAdd = publicKeyTweakAdd;
function sign(message, privateKey) {
    var ret = secp256k1.ecdsaSign(message, privateKey);
    return { signature: Buffer.from(ret.signature), recovery: ret.recid };
}
exports.sign = sign;
function verify(message, signature, publicKey) {
    return secp256k1.ecdsaVerify(signature, message, publicKey);
}
exports.verify = verify;
//# sourceMappingURL=hdkey-secp256k1v3.js.map

/***/ }),

/***/ 657969:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var assert = _interopDefault(__webpack_require__(742357));
var safeBuffer = _interopDefault(__webpack_require__(289509));
var bs58check = _interopDefault(__webpack_require__(458334));

var cryptoShim = __webpack_require__(760662);

var secp256k1Shim = __webpack_require__(386454);

var Buffer = safeBuffer.Buffer;




var MASTER_SECRET = Buffer.from('Bitcoin seed', 'utf8');
var HARDENED_OFFSET = 0x80000000;
var LEN = 78;

// Bitcoin hardcoded by default, can use package `coininfo` for others
var BITCOIN_VERSIONS = {private: 0x0488ADE4, public: 0x0488B21E};

function HDKey (versions) {
  this.versions = versions || BITCOIN_VERSIONS;
  this.depth = 0;
  this.index = 0;
  this._privateKey = null;
  this._publicKey = null;
  this.chainCode = null;
  this._fingerprint = 0;
  this.parentFingerprint = 0;
}

Object.defineProperty(HDKey.prototype, 'fingerprint', { get: function () { return this._fingerprint } });
Object.defineProperty(HDKey.prototype, 'identifier', { get: function () { return this._identifier } });
Object.defineProperty(HDKey.prototype, 'pubKeyHash', { get: function () { return this.identifier } });

Object.defineProperty(HDKey.prototype, 'privateKey', {
  get: function () {
    return this._privateKey
  },
  set: function (value) {
    assert.equal(value.length, 32, 'Private key must be 32 bytes.');
    assert(secp256k1Shim.privateKeyVerify(value) === true, 'Invalid private key');

    this._privateKey = value;
    this._publicKey = secp256k1Shim.publicKeyCreate(value, true);
    this._identifier = hash160(this.publicKey);
    this._fingerprint = this._identifier.slice(0, 4).readUInt32BE(0);
  }
});

Object.defineProperty(HDKey.prototype, 'publicKey', {
  get: function () {
    return this._publicKey
  },
  set: function (value) {
    assert(value.length === 33 || value.length === 65, 'Public key must be 33 or 65 bytes.');
    assert(secp256k1Shim.publicKeyVerify(value) === true, 'Invalid public key');

    this._publicKey = secp256k1Shim.publicKeyConvert(value, true); // force compressed point
    this._identifier = hash160(this.publicKey);
    this._fingerprint = this._identifier.slice(0, 4).readUInt32BE(0);
    this._privateKey = null;
  }
});

Object.defineProperty(HDKey.prototype, 'privateExtendedKey', {
  get: function () {
    if (this._privateKey) return bs58check.encode(serialize(this, this.versions.private, Buffer.concat([Buffer.alloc(1, 0), this.privateKey])))
    else return null
  }
});

Object.defineProperty(HDKey.prototype, 'publicExtendedKey', {
  get: function () {
    return bs58check.encode(serialize(this, this.versions.public, this.publicKey))
  }
});

HDKey.prototype.derive = function (path) {
  if (path === 'm' || path === 'M' || path === "m'" || path === "M'") {
    return this
  }

  var entries = path.split('/');
  var hdkey = this;
  entries.forEach(function (c, i) {
    if (i === 0) {
      assert(/^[mM]{1}/.test(c), 'Path must start with "m" or "M"');
      return
    }

    var hardened = (c.length > 1) && (c[c.length - 1] === "'");
    var childIndex = parseInt(c, 10); // & (HARDENED_OFFSET - 1)
    assert(childIndex < HARDENED_OFFSET, 'Invalid index');
    if (hardened) childIndex += HARDENED_OFFSET;

    hdkey = hdkey.deriveChild(childIndex);
  });

  return hdkey
};

HDKey.prototype.deriveChild = function (index) {
  var isHardened = index >= HARDENED_OFFSET;
  var indexBuffer = Buffer.allocUnsafe(4);
  indexBuffer.writeUInt32BE(index, 0);

  var data;

  if (isHardened) { // Hardened child
    assert(this.privateKey, 'Could not derive hardened child key');

    var pk = this.privateKey;
    var zb = Buffer.alloc(1, 0);
    pk = Buffer.concat([zb, pk]);

    // data = 0x00 || ser256(kpar) || ser32(index)
    data = Buffer.concat([pk, indexBuffer]);
  } else { // Normal child
    // data = serP(point(kpar)) || ser32(index)
    //      = serP(Kpar) || ser32(index)
    data = Buffer.concat([this.publicKey, indexBuffer]);
  }

  var I = cryptoShim.createHmac('sha512', this.chainCode).update(data).digest();
  var IL = I.slice(0, 32);
  var IR = I.slice(32);

  var hd = new HDKey(this.versions);

  // Private parent key -> private child key
  if (this.privateKey) {
    // ki = parse256(IL) + kpar (mod n)
    try {
      hd.privateKey = secp256k1Shim.privateKeyTweakAdd(this.privateKey, IL);
      // throw if IL >= n || (privateKey + IL) === 0
    } catch (err) {
      // In case parse256(IL) >= n or ki == 0, one should proceed with the next value for i
      return this.deriveChild(index + 1)
    }
  // Public parent key -> public child key
  } else {
    // Ki = point(parse256(IL)) + Kpar
    //    = G*IL + Kpar
    try {
      hd.publicKey = secp256k1Shim.publicKeyTweakAdd(this.publicKey, IL, true);
      // throw if IL >= n || (g**IL + publicKey) is infinity
    } catch (err) {
      // In case parse256(IL) >= n or Ki is the point at infinity, one should proceed with the next value for i
      return this.deriveChild(index + 1)
    }
  }

  hd.chainCode = IR;
  hd.depth = this.depth + 1;
  hd.parentFingerprint = this.fingerprint;// .readUInt32BE(0)
  hd.index = index;

  return hd
};

HDKey.prototype.sign = function (hash) {
  return secp256k1Shim.sign(hash, this.privateKey).signature
};

HDKey.prototype.verify = function (hash, signature) {
  return secp256k1Shim.verify(hash, signature, this.publicKey)
};

HDKey.prototype.wipePrivateData = function () {
  if (this._privateKey) cryptoShim.randomBytes(this._privateKey.length).copy(this._privateKey);
  this._privateKey = null;
  return this
};

HDKey.prototype.toJSON = function () {
  return {
    xpriv: this.privateExtendedKey,
    xpub: this.publicExtendedKey
  }
};

HDKey.fromMasterSeed = function (seedBuffer, versions) {
  var I = cryptoShim.createHmac('sha512', MASTER_SECRET).update(seedBuffer).digest();
  var IL = I.slice(0, 32);
  var IR = I.slice(32);

  var hdkey = new HDKey(versions);
  hdkey.chainCode = IR;
  hdkey.privateKey = IL;

  return hdkey
};

HDKey.fromExtendedKey = function (base58key, versions) {
  // => version(4) || depth(1) || fingerprint(4) || index(4) || chain(32) || key(33)
  versions = versions || BITCOIN_VERSIONS;
  var hdkey = new HDKey(versions);

  var keyBuffer = bs58check.decode(base58key);

  var version = keyBuffer.readUInt32BE(0);
  assert(version === versions.private || version === versions.public, 'Version mismatch: does not match private or public');

  hdkey.depth = keyBuffer.readUInt8(4);
  hdkey.parentFingerprint = keyBuffer.readUInt32BE(5);
  hdkey.index = keyBuffer.readUInt32BE(9);
  hdkey.chainCode = keyBuffer.slice(13, 45);

  var key = keyBuffer.slice(45);
  if (key.readUInt8(0) === 0) { // private
    assert(version === versions.private, 'Version mismatch: version does not match private');
    hdkey.privateKey = key.slice(1); // cut off first 0x0 byte
  } else {
    assert(version === versions.public, 'Version mismatch: version does not match public');
    hdkey.publicKey = key;
  }

  return hdkey
};

HDKey.fromJSON = function (obj) {
  return HDKey.fromExtendedKey(obj.xpriv)
};

function serialize (hdkey, version, key) {
  // => version(4) || depth(1) || fingerprint(4) || index(4) || chain(32) || key(33)
  var buffer = Buffer.allocUnsafe(LEN);

  buffer.writeUInt32BE(version, 0);
  buffer.writeUInt8(hdkey.depth, 4);

  var fingerprint = hdkey.depth ? hdkey.parentFingerprint : 0x00000000;
  buffer.writeUInt32BE(fingerprint, 5);
  buffer.writeUInt32BE(hdkey.index, 9);

  hdkey.chainCode.copy(buffer, 13);
  key.copy(buffer, 45);

  return buffer
}

function hash160 (buf) {
  var sha = cryptoShim.createHash('sha256').update(buf).digest();
  return cryptoShim.createHash('ripemd160').update(sha).digest()
}

HDKey.HARDENED_OFFSET = HARDENED_OFFSET;
var hdkey = HDKey;

module.exports = hdkey;


/***/ }),

/***/ 95789:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var rlp = __webpack_require__(6636);
var ethUtil = __webpack_require__(38290);
var Buffer = __webpack_require__(289509).Buffer;
var Account = /** @class */ (function () {
    function Account(data) {
        var fields = [
            {
                name: 'nonce',
                default: Buffer.alloc(0),
            },
            {
                name: 'balance',
                default: Buffer.alloc(0),
            },
            {
                name: 'stateRoot',
                length: 32,
                default: ethUtil.KECCAK256_RLP,
            },
            {
                name: 'codeHash',
                length: 32,
                default: ethUtil.KECCAK256_NULL,
            },
        ];
        ethUtil.defineProperties(this, fields, data);
    }
    Account.prototype.serialize = function () {
        return rlp.encode([this.nonce, this.balance, this.stateRoot, this.codeHash]);
    };
    Account.prototype.isContract = function () {
        return this.codeHash.toString('hex') !== ethUtil.KECCAK256_NULL_S;
    };
    Account.prototype.getCode = function (trie, cb) {
        if (!this.isContract()) {
            cb(null, Buffer.alloc(0));
            return;
        }
        trie.getRaw(this.codeHash, cb);
    };
    Account.prototype.setCode = function (trie, code, cb) {
        var _this = this;
        this.codeHash = ethUtil.keccak256(code);
        if (this.codeHash.toString('hex') === ethUtil.KECCAK256_NULL_S) {
            cb(null, Buffer.alloc(0));
            return;
        }
        trie.putRaw(this.codeHash, code, function (err) {
            cb(err, _this.codeHash);
        });
    };
    Account.prototype.getStorage = function (trie, key, cb) {
        var t = trie.copy();
        t.root = this.stateRoot;
        t.get(key, cb);
    };
    Account.prototype.setStorage = function (trie, key, val, cb) {
        var _this = this;
        var t = trie.copy();
        t.root = this.stateRoot;
        t.put(key, val, function (err) {
            if (err)
                return cb();
            _this.stateRoot = t.root;
            cb();
        });
    };
    Account.prototype.isEmpty = function () {
        return (this.balance.toString('hex') === '' &&
            this.nonce.toString('hex') === '' &&
            this.stateRoot.toString('hex') === ethUtil.KECCAK256_RLP_S &&
            this.codeHash.toString('hex') === ethUtil.KECCAK256_NULL_S);
    };
    return Account;
}());
exports.default = Account;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 311755:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(231563);
var hash_1 = __webpack_require__(304771);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 231563:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 997366:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 304771:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(652898);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(231563);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 38290:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(997366));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(311755));
/**
 * Hash functions
 */
__export(__webpack_require__(304771));
/**
 * ECDSA signature
 */
__export(__webpack_require__(213281));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(231563));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(73835));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 73835:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(231563);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 213281:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(231563);
var hash_1 = __webpack_require__(304771);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 538056:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(281859)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 652898:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(538056)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(761161)
}


/***/ }),

/***/ 761161:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(281859)(__webpack_require__(787636))


/***/ }),

/***/ 281859:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(705378)
const createShake = __webpack_require__(994371)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 705378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 994371:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 87596:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 787636:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(87596)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 821493:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var LRU = __webpack_require__(39593);
/**
 * Simple LRU Cache that allows for keys of type Buffer
 * @hidden
 */
var Cache = /** @class */ (function () {
    function Cache(opts) {
        this._cache = new LRU(opts);
    }
    Cache.prototype.set = function (key, value) {
        if (key instanceof Buffer) {
            key = key.toString('hex');
        }
        this._cache.set(key, value);
    };
    Cache.prototype.get = function (key) {
        if (key instanceof Buffer) {
            key = key.toString('hex');
        }
        return this._cache.get(key);
    };
    Cache.prototype.del = function (key) {
        if (key instanceof Buffer) {
            key = key.toString('hex');
        }
        this._cache.del(key);
    };
    return Cache;
}());
exports.default = Cache;
//# sourceMappingURL=cache.js.map

/***/ }),

/***/ 989147:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
Object.defineProperty(exports, "__esModule", ({ value: true }));
function callbackifyOnRejected(reason, cb) {
    // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
    // Because `null` is a special error value in callbacks which means "no error
    // occurred", we error-wrap so the callback consumer can distinguish between
    // "the promise rejected with null" or "the promise fulfilled with undefined".
    if (!reason) {
        var newReason = new Error('Promise was rejected with a falsy value');
        newReason.reason = reason;
        reason = newReason;
    }
    return cb(reason);
}
function callbackify(original) {
    if (typeof original !== 'function') {
        throw new TypeError('The "original" argument must be of type Function');
    }
    // We DO NOT return the promise as it gives the user a false sense that
    // the promise is actually somehow related to the callback's execution
    // and that the callback throwing will reject the promise.
    function callbackified() {
        var args = [];
        for (var i = 0; i < arguments.length; i++) {
            args.push(arguments[i]);
        }
        var maybeCb = args.pop();
        if (typeof maybeCb !== 'function') {
            throw new TypeError('The last argument must be of type Function');
        }
        //tslint:disable-next-line no-invalid-this
        var self = this;
        var cb = function () {
            return maybeCb.apply(self, arguments);
        };
        // In true node style we process the callback on `nextTick` with all the
        // implications (stack, `uncaughtException`, `async_hooks`)
        //tslint:disable-next-line no-invalid-this
        original.apply(this, args).then(function (ret) {
            process.nextTick(cb.bind(null, null, ret));
        }, function (rej) {
            process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
        });
    }
    Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
    Object.defineProperties(callbackified, Object.getOwnPropertyDescriptors(original));
    return callbackified;
}
exports.callbackify = callbackify;
//# sourceMappingURL=callbackify.js.map

/***/ }),

/***/ 251454:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var rlp = __webpack_require__(6636);
var cache_1 = __webpack_require__(821493);
var util_1 = __webpack_require__(378156);
var BN = __webpack_require__(213550);
var level = __webpack_require__(277445);
var Block = __webpack_require__(620877);
/**
 * Abstraction over a DB to facilitate storing/fetching blockchain-related
 * data, such as blocks and headers, indices, and the head block.
 * @hidden
 */
var DBManager = /** @class */ (function () {
    function DBManager(db, common) {
        this._db = db;
        this._common = common;
        this._cache = {
            td: new cache_1.default({ max: 1024 }),
            header: new cache_1.default({ max: 512 }),
            body: new cache_1.default({ max: 256 }),
            numberToHash: new cache_1.default({ max: 2048 }),
            hashToNumber: new cache_1.default({ max: 2048 }),
        };
    }
    /**
     * Fetches iterator heads from the db.
     */
    DBManager.prototype.getHeads = function () {
        return this.get(util_1.headsKey, { valueEncoding: 'json' });
    };
    /**
     * Fetches header of the head block.
     */
    DBManager.prototype.getHeadHeader = function () {
        return this.get(util_1.headHeaderKey);
    };
    /**
     * Fetches head block.
     */
    DBManager.prototype.getHeadBlock = function () {
        return this.get(util_1.headBlockKey);
    };
    /**
     * Fetches a block (header and body), given a block tag
     * which can be either its hash or its number.
     */
    DBManager.prototype.getBlock = function (blockTag) {
        return __awaiter(this, void 0, void 0, function () {
            var number, hash, header, body, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        // determine BlockTag type
                        if (typeof blockTag === 'number' && Number.isInteger(blockTag)) {
                            blockTag = new BN(blockTag);
                        }
                        if (!Buffer.isBuffer(blockTag)) return [3 /*break*/, 2];
                        hash = blockTag;
                        return [4 /*yield*/, this.hashToNumber(blockTag)];
                    case 1:
                        number = _a.sent();
                        return [3 /*break*/, 5];
                    case 2:
                        if (!BN.isBN(blockTag)) return [3 /*break*/, 4];
                        number = blockTag;
                        return [4 /*yield*/, this.numberToHash(blockTag)];
                    case 3:
                        hash = _a.sent();
                        return [3 /*break*/, 5];
                    case 4: throw new Error('Unknown blockTag type');
                    case 5: return [4 /*yield*/, this.getHeader(hash, number)];
                    case 6:
                        header = (_a.sent()).raw;
                        _a.label = 7;
                    case 7:
                        _a.trys.push([7, 9, , 10]);
                        return [4 /*yield*/, this.getBody(hash, number)];
                    case 8:
                        body = _a.sent();
                        return [3 /*break*/, 10];
                    case 9:
                        e_1 = _a.sent();
                        body = [[], []];
                        return [3 /*break*/, 10];
                    case 10: return [2 /*return*/, new Block([header].concat(body), { common: this._common })];
                }
            });
        });
    };
    /**
     * Fetches body of a block given its hash and number.
     */
    DBManager.prototype.getBody = function (hash, number) {
        return __awaiter(this, void 0, void 0, function () {
            var key, _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        key = util_1.bodyKey(number, hash);
                        _b = (_a = rlp).decode;
                        return [4 /*yield*/, this.get(key, { cache: 'body' })];
                    case 1: return [2 /*return*/, _b.apply(_a, [_c.sent()])];
                }
            });
        });
    };
    /**
     * Fetches header of a block given its hash and number.
     */
    DBManager.prototype.getHeader = function (hash, number) {
        return __awaiter(this, void 0, void 0, function () {
            var key, encodedHeader;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        key = util_1.headerKey(number, hash);
                        return [4 /*yield*/, this.get(key, { cache: 'header' })];
                    case 1:
                        encodedHeader = _a.sent();
                        return [2 /*return*/, new Block.Header(rlp.decode(encodedHeader), {
                                common: this._common,
                            })];
                }
            });
        });
    };
    /**
     * Fetches total difficulty for a block given its hash and number.
     */
    DBManager.prototype.getTd = function (hash, number) {
        return __awaiter(this, void 0, void 0, function () {
            var key, td;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        key = util_1.tdKey(number, hash);
                        return [4 /*yield*/, this.get(key, { cache: 'td' })];
                    case 1:
                        td = _a.sent();
                        return [2 /*return*/, new BN(rlp.decode(td))];
                }
            });
        });
    };
    /**
     * Performs a block hash to block number lookup.
     */
    DBManager.prototype.hashToNumber = function (hash) {
        return __awaiter(this, void 0, void 0, function () {
            var key, _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        key = util_1.hashToNumberKey(hash);
                        _a = BN.bind;
                        return [4 /*yield*/, this.get(key, { cache: 'hashToNumber' })];
                    case 1: return [2 /*return*/, new (_a.apply(BN, [void 0, _b.sent()]))()];
                }
            });
        });
    };
    /**
     * Performs a block number to block hash lookup.
     */
    DBManager.prototype.numberToHash = function (number) {
        return __awaiter(this, void 0, void 0, function () {
            var key;
            return __generator(this, function (_a) {
                if (number.ltn(0)) {
                    throw new level.errors.NotFoundError();
                }
                key = util_1.numberToHashKey(number);
                return [2 /*return*/, this.get(key, { cache: 'numberToHash' })];
            });
        });
    };
    /**
     * Fetches a key from the db. If `opts.cache` is specified
     * it first tries to load from cache, and on cache miss will
     * try to put the fetched item on cache afterwards.
     */
    DBManager.prototype.get = function (key, opts) {
        if (opts === void 0) { opts = {}; }
        return __awaiter(this, void 0, void 0, function () {
            var dbOpts, value;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        dbOpts = {
                            keyEncoding: opts.keyEncoding || 'binary',
                            valueEncoding: opts.valueEncoding || 'binary',
                        };
                        if (!opts.cache) return [3 /*break*/, 3];
                        if (!this._cache[opts.cache]) {
                            throw new Error("Invalid cache: " + opts.cache);
                        }
                        value = this._cache[opts.cache].get(key);
                        if (!!value) return [3 /*break*/, 2];
                        return [4 /*yield*/, this._db.get(key, dbOpts)];
                    case 1:
                        value = (_a.sent());
                        this._cache[opts.cache].set(key, value);
                        _a.label = 2;
                    case 2: return [2 /*return*/, value];
                    case 3: return [2 /*return*/, this._db.get(key, dbOpts)];
                }
            });
        });
    };
    /**
     * Performs a batch operation on db.
     */
    DBManager.prototype.batch = function (ops) {
        return this._db.batch(ops);
    };
    return DBManager;
}());
exports.default = DBManager;
//# sourceMappingURL=dbManager.js.map

/***/ }),

/***/ 582034:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var async = __webpack_require__(581195);
var ethereumjs_util_1 = __webpack_require__(531406);
var ethereumjs_common_1 = __webpack_require__(265982);
var callbackify_1 = __webpack_require__(989147);
var dbManager_1 = __webpack_require__(251454);
var util_1 = __webpack_require__(378156);
var Block = __webpack_require__(620877);
var Ethash = __webpack_require__(256963);
var Stoplight = __webpack_require__(219679);
var level = __webpack_require__(277445);
var semaphore = __webpack_require__(80045);
/**
 * This class stores and interacts with blocks.
 */
var Blockchain = /** @class */ (function () {
    /**
     * Creates new Blockchain object
     *
     * @param opts - An object with the options that this constructor takes. See [[BlockchainOptions]].
     */
    function Blockchain(opts) {
        if (opts === void 0) { opts = {}; }
        var _this = this;
        /**
         * This field is always `true`. It's here only for backwards compatibility.
         *
         * @deprecated
         */
        this.validate = true;
        if (opts.common) {
            if (opts.chain) {
                throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!');
            }
            this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : null;
            this._common = new ethereumjs_common_1.default(chain, hardfork);
        }
        if (opts.validate !== undefined) {
            if (opts.validatePow !== undefined || opts.validateBlocks !== undefined) {
                throw new Error("opts.validate can't be used at the same time than opts.validatePow nor opts.validateBlocks");
            }
        }
        // defaults
        if (opts.validate !== undefined) {
            this._validatePow = opts.validate;
            this._validateBlocks = opts.validate;
        }
        else {
            this._validatePow = opts.validatePow !== undefined ? opts.validatePow : true;
            this._validateBlocks = opts.validateBlocks !== undefined ? opts.validateBlocks : true;
        }
        this.db = opts.db ? opts.db : level();
        this.dbManager = new dbManager_1.default(this.db, this._common);
        this.ethash = this._validatePow ? new Ethash(this.db) : null;
        this._heads = {};
        this._genesis = null;
        this._headHeader = null;
        this._headBlock = null;
        this._initDone = false;
        this._putSemaphore = semaphore(1);
        this._initLock = new Stoplight();
        this._init(function (err) {
            if (err) {
                throw err;
            }
            _this._initLock.go();
        });
    }
    Object.defineProperty(Blockchain.prototype, "meta", {
        /**
         * Returns an object with metadata about the Blockchain. It's defined for backwards compatibility.
         */
        get: function () {
            return {
                rawHead: this._headHeader,
                heads: this._heads,
                genesis: this._genesis,
            };
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Fetches the meta info about the blockchain from the db. Meta info contains
     * hashes of the headerchain head, blockchain head, genesis block and iterator
     * heads.
     *
     * @hidden
     */
    Blockchain.prototype._init = function (cb) {
        var self = this;
        async.waterfall([function (cb) { return self._numberToHash(new ethereumjs_util_1.BN(0), cb); }, callbackify_1.callbackify(getHeads.bind(this))], function (err) {
            if (err) {
                // if genesis block doesn't exist, create one
                return self._setCanonicalGenesisBlock(function (err) {
                    if (err) {
                        return cb(err);
                    }
                    self._heads = {};
                    self._headHeader = self._genesis;
                    self._headBlock = self._genesis;
                    cb();
                });
            }
            cb();
        });
        function getHeads(genesisHash) {
            return __awaiter(this, void 0, void 0, function () {
                var heads_1, e_1, hash, e_2, e_3;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            self._genesis = genesisHash;
                            _a.label = 1;
                        case 1:
                            _a.trys.push([1, 3, , 4]);
                            return [4 /*yield*/, self.dbManager.getHeads()];
                        case 2:
                            heads_1 = _a.sent();
                            Object.keys(heads_1).forEach(function (key) {
                                heads_1[key] = Buffer.from(heads_1[key]);
                            });
                            self._heads = heads_1;
                            return [3 /*break*/, 4];
                        case 3:
                            e_1 = _a.sent();
                            self._heads = {};
                            return [3 /*break*/, 4];
                        case 4:
                            _a.trys.push([4, 6, , 7]);
                            return [4 /*yield*/, self.dbManager.getHeadHeader()];
                        case 5:
                            hash = _a.sent();
                            self._headHeader = hash;
                            return [3 /*break*/, 7];
                        case 6:
                            e_2 = _a.sent();
                            self._headHeader = genesisHash;
                            return [3 /*break*/, 7];
                        case 7:
                            _a.trys.push([7, 9, , 10]);
                            return [4 /*yield*/, self.dbManager.getHeadBlock()];
                        case 8:
                            hash = _a.sent();
                            self._headBlock = hash;
                            return [3 /*break*/, 10];
                        case 9:
                            e_3 = _a.sent();
                            self._headBlock = genesisHash;
                            return [3 /*break*/, 10];
                        case 10: return [2 /*return*/];
                    }
                });
            });
        }
    };
    /**
     * Sets the default genesis block
     *
     * @hidden
     */
    Blockchain.prototype._setCanonicalGenesisBlock = function (cb) {
        var genesisBlock = new Block(null, { common: this._common });
        genesisBlock.setGenesisParams();
        this._putBlockOrHeader(genesisBlock, cb, true);
    };
    /**
     * Puts the genesis block in the database
     *
     * @param genesis - The genesis block to be added
     * @param cb - The callback. It is given two parameters `err` and the saved `block`
     */
    Blockchain.prototype.putGenesis = function (genesis, cb) {
        this.putBlock(genesis, cb, true);
    };
    /**
     * Returns the specified iterator head.
     *
     * @param name - Optional name of the state root head (default: 'vm')
     * @param cb - The callback. It is given two parameters `err` and the returned `block`
     */
    Blockchain.prototype.getHead = function (name, cb) {
        var _this = this;
        // handle optional args
        if (typeof name === 'function') {
            cb = name;
            name = 'vm';
        }
        // ensure init completed
        this._initLock.await(function () {
            // if the head is not found return the headHeader
            var hash = _this._heads[name] || _this._headBlock;
            if (!hash) {
                return cb(new Error('No head found.'));
            }
            _this.getBlock(hash, cb);
        });
    };
    /**
     * Returns the latest header in the canonical chain.
     *
     * @param cb - The callback. It is given two parameters `err` and the returned `header`
     */
    Blockchain.prototype.getLatestHeader = function (cb) {
        var _this = this;
        // ensure init completed
        this._initLock.await(function () {
            _this.getBlock(_this._headHeader, function (err, block) {
                if (err) {
                    return cb(err);
                }
                cb(null, block.header);
            });
        });
    };
    /**
     * Returns the latest full block in the canonical chain.
     *
     * @param cb - The callback. It is given two parameters `err` and the returned `block`
     */
    Blockchain.prototype.getLatestBlock = function (cb) {
        var _this = this;
        // ensure init completed
        this._initLock.await(function () {
            _this.getBlock(_this._headBlock, cb);
        });
    };
    /**
     * Adds many blocks to the blockchain.
     *
     * @param blocks - The blocks to be added to the blockchain
     * @param cb - The callback. It is given two parameters `err` and the last of the saved `blocks`
     */
    Blockchain.prototype.putBlocks = function (blocks, cb) {
        var _this = this;
        async.eachSeries(blocks, function (block, done) {
            _this.putBlock(block, done);
        }, cb);
    };
    /**
     * Adds a block to the blockchain.
     *
     * @param block - The block to be added to the blockchain
     * @param cb - The callback. It is given two parameters `err` and the saved `block`
     */
    Blockchain.prototype.putBlock = function (block, cb, isGenesis) {
        var _this = this;
        // make sure init has completed
        this._initLock.await(function () {
            // perform put with mutex dance
            _this._lockUnlock(function (done) {
                _this._putBlockOrHeader(block, done, isGenesis);
            }, cb);
        });
    };
    /**
     * Adds many headers to the blockchain.
     *
     * @param headers - The headers to be added to the blockchain
     * @param cb - The callback. It is given two parameters `err` and the last of the saved `headers`
     */
    Blockchain.prototype.putHeaders = function (headers, cb) {
        var _this = this;
        async.eachSeries(headers, function (header, done) {
            _this.putHeader(header, done);
        }, cb);
    };
    /**
     * Adds a header to the blockchain.
     *
     * @param header - The header to be added to the blockchain
     * @param cb - The callback. It is given two parameters `err` and the saved `header`
     */
    Blockchain.prototype.putHeader = function (header, cb) {
        var _this = this;
        // make sure init has completed
        this._initLock.await(function () {
            // perform put with mutex dance
            _this._lockUnlock(function (done) {
                _this._putBlockOrHeader(header, done);
            }, cb);
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._putBlockOrHeader = function (item, cb, isGenesis) {
        var self = this;
        var isHeader = item instanceof Block.Header;
        var block = isHeader ? new Block([item.raw, [], []], { common: item._common }) : item;
        var header = block.header;
        var hash = block.hash();
        var number = new ethereumjs_util_1.BN(header.number);
        var td = new ethereumjs_util_1.BN(header.difficulty);
        var currentTd = { header: null, block: null };
        var dbOps = [];
        if (block.constructor !== Block) {
            block = new Block(block, { common: self._common });
        }
        if (block._common.chainId() !== self._common.chainId()) {
            return cb(new Error('Chain mismatch while trying to put block or header'));
        }
        async.series([
            verify,
            verifyPOW,
            getCurrentTd,
            getBlockTd,
            rebuildInfo,
            function (cb) { return self._batchDbOps(dbOps.concat(self._saveHeadOps()), cb); },
        ], cb);
        function verify(next) {
            if (!self._validateBlocks) {
                return next();
            }
            if (!isGenesis && block.isGenesis()) {
                return next(new Error('already have genesis set'));
            }
            block.validate(self, next);
        }
        function verifyPOW(next) {
            if (!self._validatePow) {
                return next();
            }
            self.ethash.verifyPOW(block, function (valid) {
                next(valid ? null : new Error('invalid POW'));
            });
        }
        function getCurrentTd(next) {
            if (isGenesis) {
                currentTd.header = new ethereumjs_util_1.BN(0);
                currentTd.block = new ethereumjs_util_1.BN(0);
                return next();
            }
            async.parallel([
                function (cb) {
                    return self._getTd(self._headHeader, function (err, td) {
                        currentTd.header = td;
                        cb(err);
                    });
                },
                function (cb) {
                    return self._getTd(self._headBlock, function (err, td) {
                        currentTd.block = td;
                        cb(err);
                    });
                },
            ], next);
        }
        function getBlockTd(next) {
            // calculate the total difficulty of the new block
            if (isGenesis) {
                return next();
            }
            self._getTd(header.parentHash, number.subn(1), function (err, parentTd) {
                if (err) {
                    return next(err);
                }
                td.iadd(parentTd);
                next();
            });
        }
        function rebuildInfo(next) {
            // save block and total difficulty to the database
            var key = util_1.tdKey(number, hash);
            var value = ethereumjs_util_1.rlp.encode(td);
            dbOps.push({
                type: 'put',
                key: key,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: value,
            });
            self.dbManager._cache.td.set(key, value);
            // save header
            key = util_1.headerKey(number, hash);
            value = ethereumjs_util_1.rlp.encode(header.raw);
            dbOps.push({
                type: 'put',
                key: key,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: value,
            });
            self.dbManager._cache.header.set(key, value);
            // store body if it exists
            if (isGenesis || block.transactions.length || block.uncleHeaders.length) {
                var body = block.serialize(false).slice(1);
                key = util_1.bodyKey(number, hash);
                value = ethereumjs_util_1.rlp.encode(body);
                dbOps.push({
                    type: 'put',
                    key: key,
                    keyEncoding: 'binary',
                    valueEncoding: 'binary',
                    value: value,
                });
                self.dbManager._cache.body.set(key, value);
            }
            // if total difficulty is higher than current, add it to canonical chain
            if (block.isGenesis() || td.gt(currentTd.header)) {
                self._headHeader = hash;
                if (!isHeader) {
                    self._headBlock = hash;
                }
                if (block.isGenesis()) {
                    self._genesis = hash;
                }
                // delete higher number assignments and overwrite stale canonical chain
                async.parallel([
                    function (cb) { return self._deleteStaleAssignments(number.addn(1), hash, dbOps, cb); },
                    function (cb) { return self._rebuildCanonical(header, dbOps, cb); },
                ], next);
            }
            else {
                if (td.gt(currentTd.block) && !isHeader) {
                    self._headBlock = hash;
                }
                // save hash to number lookup info even if rebuild not needed
                key = util_1.hashToNumberKey(hash);
                value = util_1.bufBE8(number);
                dbOps.push({
                    type: 'put',
                    key: key,
                    keyEncoding: 'binary',
                    valueEncoding: 'binary',
                    value: value,
                });
                self.dbManager._cache.hashToNumber.set(key, value);
                next();
            }
        }
    };
    /**
     * Gets a block by its hash.
     *
     * @param blockTag - The block's hash or number
     * @param cb - The callback. It is given two parameters `err` and the found `block` (an instance of https://github.com/ethereumjs/ethereumjs-block) if any.
     */
    Blockchain.prototype.getBlock = function (blockTag, cb) {
        var _this = this;
        // ensure init completed
        this._initLock.await(function () {
            _this._getBlock(blockTag, cb);
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._getBlock = function (blockTag, cb) {
        callbackify_1.callbackify(this.dbManager.getBlock.bind(this.dbManager))(blockTag, cb);
    };
    /**
     * Looks up many blocks relative to blockId
     *
     * @param blockId - The block's hash or number
     * @param maxBlocks - Max number of blocks to return
     * @param skip - Number of blocks to skip apart
     * @param reverse - Fetch blocks in reverse
     * @param cb - The callback. It is given two parameters `err` and the found `blocks` if any.
     */
    Blockchain.prototype.getBlocks = function (blockId, maxBlocks, skip, reverse, cb) {
        var self = this;
        var blocks = [];
        var i = -1;
        function nextBlock(blockId) {
            self.getBlock(blockId, function (err, block) {
                i++;
                if (err) {
                    if (err.notFound) {
                        return cb(null, blocks);
                    }
                    else {
                        return cb(err);
                    }
                }
                var nextBlockNumber = new ethereumjs_util_1.BN(block.header.number).addn(reverse ? -1 : 1);
                if (i !== 0 && skip && i % (skip + 1) !== 0) {
                    return nextBlock(nextBlockNumber);
                }
                blocks.push(block);
                if (blocks.length === maxBlocks) {
                    return cb(null, blocks);
                }
                nextBlock(nextBlockNumber);
            });
        }
        nextBlock(blockId);
    };
    /**
     * This method used to return block details by its hash. It's only here for backwards compatibility.
     *
     * @deprecated
     */
    Blockchain.prototype.getDetails = function (_, cb) {
        cb(null, {});
    };
    /**
     * Given an ordered array, returns to the callback an array of hashes that are not in the blockchain yet.
     *
     * @param hashes - Ordered array of hashes
     * @param cb - The callback. It is given two parameters `err` and hashes found.
     */
    Blockchain.prototype.selectNeededHashes = function (hashes, cb) {
        var self = this;
        var max, mid, min;
        max = hashes.length - 1;
        mid = min = 0;
        async.whilst(function test() {
            return max >= min;
        }, function iterate(cb2) {
            self._hashToNumber(hashes[mid], function (err, number) {
                if (!err && number) {
                    min = mid + 1;
                }
                else {
                    max = mid - 1;
                }
                mid = Math.floor((min + max) / 2);
                cb2();
            });
        }, function onDone(err) {
            if (err)
                return cb(err);
            cb(null, hashes.slice(min));
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._saveHeadOps = function () {
        return [
            {
                type: 'put',
                key: 'heads',
                keyEncoding: 'binary',
                valueEncoding: 'json',
                value: this._heads,
            },
            {
                type: 'put',
                key: util_1.headHeaderKey,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: this._headHeader,
            },
            {
                type: 'put',
                key: util_1.headBlockKey,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: this._headBlock,
            },
        ];
    };
    /**
     * @hidden
     */
    Blockchain.prototype._saveHeads = function (cb) {
        this._batchDbOps(this._saveHeadOps(), cb);
    };
    /**
     * Delete canonical number assignments for specified number and above
     *
     * @hidden
     */
    Blockchain.prototype._deleteStaleAssignments = function (number, headHash, ops, cb) {
        var _this = this;
        var key = util_1.numberToHashKey(number);
        this._numberToHash(number, function (err, hash) {
            if (err) {
                return cb();
            }
            ops.push({
                type: 'del',
                key: key,
                keyEncoding: 'binary',
            });
            _this.dbManager._cache.numberToHash.del(key);
            // reset stale iterator heads to current canonical head
            Object.keys(_this._heads).forEach(function (name) {
                if (_this._heads[name].equals(hash)) {
                    _this._heads[name] = headHash;
                }
            });
            // reset stale headBlock to current canonical
            if (_this._headBlock.equals(hash)) {
                _this._headBlock = headHash;
            }
            _this._deleteStaleAssignments(number.addn(1), headHash, ops, cb);
        });
    };
    /**
     * Overwrites stale canonical number assignments.
     *
     * @hidden
     */
    Blockchain.prototype._rebuildCanonical = function (header, ops, cb) {
        var self = this;
        var hash = header.hash();
        var number = new ethereumjs_util_1.BN(header.number);
        function saveLookups(hash, number) {
            var key = util_1.numberToHashKey(number);
            var value;
            ops.push({
                type: 'put',
                key: key,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: hash,
            });
            self.dbManager._cache.numberToHash.set(key, hash);
            key = util_1.hashToNumberKey(hash);
            value = util_1.bufBE8(number);
            ops.push({
                type: 'put',
                key: key,
                keyEncoding: 'binary',
                valueEncoding: 'binary',
                value: value,
            });
            self.dbManager._cache.hashToNumber.set(key, value);
        }
        // handle genesis block
        if (number.cmpn(0) === 0) {
            saveLookups(hash, number);
            return cb();
        }
        self._numberToHash(number, function (err, staleHash) {
            if (err) {
                staleHash = null;
            }
            if (!staleHash || !hash.equals(staleHash)) {
                saveLookups(hash, number);
                // flag stale head for reset
                Object.keys(self._heads).forEach(function (name) {
                    if (staleHash && self._heads[name].equals(staleHash)) {
                        self._staleHeads = self._staleHeads || [];
                        self._staleHeads.push(name);
                    }
                });
                // flag stale headBlock for reset
                if (staleHash && self._headBlock.equals(staleHash)) {
                    self._staleHeadBlock = true;
                }
                self._getHeader(header.parentHash, number.subn(1), function (err, header) {
                    if (err) {
                        delete self._staleHeads;
                        return cb(err);
                    }
                    self._rebuildCanonical(header, ops, cb);
                });
            }
            else {
                // set stale heads to last previously valid canonical block
                ;
                (self._staleHeads || []).forEach(function (name) {
                    self._heads[name] = hash;
                });
                delete self._staleHeads;
                // set stale headBlock to last previously valid canonical block
                if (self._staleHeadBlock) {
                    self._headBlock = hash;
                    delete self._staleHeadBlock;
                }
                cb();
            }
        });
    };
    /**
     * Deletes a block from the blockchain. All child blocks in the chain are deleted and any
     * encountered heads are set to the parent block.
     *
     * @param blockHash - The hash of the block to be deleted
     * @param cb - A callback.
     */
    Blockchain.prototype.delBlock = function (blockHash, cb) {
        var _this = this;
        // make sure init has completed
        this._initLock.await(function () {
            // perform put with mutex dance
            _this._lockUnlock(function (done) {
                _this._delBlock(blockHash, done);
            }, cb);
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._delBlock = function (blockHash, cb) {
        var self = this;
        var dbOps = [];
        var blockHeader = null;
        var blockNumber = null;
        var parentHash = null;
        var inCanonical = null;
        if (!Buffer.isBuffer(blockHash)) {
            blockHash = blockHash.hash();
        }
        async.series([
            getHeader,
            checkCanonical,
            buildDBops,
            deleteStaleAssignments,
            function (cb) { return self._batchDbOps(dbOps, cb); },
        ], cb);
        function getHeader(cb2) {
            self._getHeader(blockHash, function (err, header) {
                if (err)
                    return cb2(err);
                blockHeader = header;
                blockNumber = new ethereumjs_util_1.BN(blockHeader.number);
                parentHash = blockHeader.parentHash;
                cb2();
            });
        }
        // check if block is in the canonical chain
        function checkCanonical(cb2) {
            self._numberToHash(blockNumber, function (err, hash) {
                inCanonical = !err && hash.equals(blockHash);
                cb2();
            });
        }
        // delete the block, and if block is in the canonical chain, delete all
        // children as well
        function buildDBops(cb2) {
            self._delChild(blockHash, blockNumber, inCanonical ? parentHash : null, dbOps, cb2);
        }
        // delete all number to hash mappings for deleted block number and above
        function deleteStaleAssignments(cb2) {
            if (inCanonical) {
                self._deleteStaleAssignments(blockNumber, parentHash, dbOps, cb2);
            }
            else {
                cb2();
            }
        }
    };
    /**
     * @hidden
     */
    Blockchain.prototype._delChild = function (hash, number, headHash, ops, cb) {
        var self = this;
        // delete header, body, hash to number mapping and td
        ops.push({
            type: 'del',
            key: util_1.headerKey(number, hash),
            keyEncoding: 'binary',
        });
        self.dbManager._cache.header.del(util_1.headerKey(number, hash));
        ops.push({
            type: 'del',
            key: util_1.bodyKey(number, hash),
            keyEncoding: 'binary',
        });
        self.dbManager._cache.body.del(util_1.bodyKey(number, hash));
        ops.push({
            type: 'del',
            key: util_1.hashToNumberKey(hash),
            keyEncoding: 'binary',
        });
        self.dbManager._cache.hashToNumber.del(util_1.hashToNumberKey(hash));
        ops.push({
            type: 'del',
            key: util_1.tdKey(number, hash),
            keyEncoding: 'binary',
        });
        self.dbManager._cache.td.del(util_1.tdKey(number, hash));
        if (!headHash) {
            return cb();
        }
        if (hash.equals(self._headHeader)) {
            self._headHeader = headHash;
        }
        if (hash.equals(self._headBlock)) {
            self._headBlock = headHash;
        }
        self._getCanonicalHeader(number.addn(1), function (err, childHeader) {
            if (err) {
                return cb();
            }
            self._delChild(childHeader.hash(), new ethereumjs_util_1.BN(childHeader.number), headHash, ops, cb);
        });
    };
    /**
     * Iterates through blocks starting at the specified iterator head and calls the onBlock function
     * on each block. The current location of an iterator head can be retrieved using the `getHead()`
     * method.
     *
     * @param name - Name of the state root head
     * @param onBlock - Function called on each block with params (block, reorg, cb)
     * @param cb - A callback function
     */
    Blockchain.prototype.iterator = function (name, onBlock, cb) {
        var _this = this;
        // ensure init completed
        this._initLock.await(function () {
            _this._iterator(name, onBlock, cb);
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._iterator = function (name, func, cb) {
        var self = this;
        var blockHash = self._heads[name] || self._genesis;
        var blockNumber;
        var lastBlock;
        if (!blockHash) {
            return cb();
        }
        self._hashToNumber(blockHash, function (err, number) {
            if (err)
                return cb(err);
            blockNumber = number.addn(1);
            async.whilst(function () { return blockNumber; }, run, function (err) { return (err ? cb(err) : self._saveHeads(cb)); });
        });
        function run(cb2) {
            var block;
            async.series([getBlock, runFunc], function (err) {
                if (!err) {
                    blockNumber.iaddn(1);
                }
                else {
                    blockNumber = false;
                    // No more blocks, return
                    if (err.type === 'NotFoundError') {
                        return cb2();
                    }
                }
                cb2(err);
            });
            function getBlock(cb3) {
                self.getBlock(blockNumber, function (err, b) {
                    block = b;
                    if (block) {
                        self._heads[name] = block.hash();
                    }
                    cb3(err);
                });
            }
            function runFunc(cb3) {
                var reorg = lastBlock ? lastBlock.hash().equals(block.header.parentHash) : false;
                lastBlock = block;
                func(block, reorg, cb3);
            }
        }
    };
    /**
     * Executes multiple db operations in a single batch call
     *
     * @hidden
     */
    Blockchain.prototype._batchDbOps = function (dbOps, cb) {
        callbackify_1.callbackify(this.dbManager.batch.bind(this.dbManager))(dbOps, cb);
    };
    /**
     * Performs a block hash to block number lookup
     *
     * @hidden
     */
    Blockchain.prototype._hashToNumber = function (hash, cb) {
        callbackify_1.callbackify(this.dbManager.hashToNumber.bind(this.dbManager))(hash, cb);
    };
    /**
     * Performs a block number to block hash lookup
     *
     * @hidden
     */
    Blockchain.prototype._numberToHash = function (number, cb) {
        callbackify_1.callbackify(this.dbManager.numberToHash.bind(this.dbManager))(number, cb);
    };
    /**
     * Helper function to lookup a block by either hash only or a hash and number
     *
     * @hidden
     */
    Blockchain.prototype._lookupByHashNumber = function (hash, number, cb, next) {
        if (typeof number === 'function') {
            cb = number;
            return this._hashToNumber(hash, function (err, number) {
                if (err) {
                    return next(err, hash, null, cb);
                }
                next(null, hash, number, cb);
            });
        }
        next(null, hash, number, cb);
    };
    /**
     * Gets a header by hash and number. Header can exist outside the canonical chain
     *
     * @hidden
     */
    Blockchain.prototype._getHeader = function (hash, number, cb) {
        var _this = this;
        this._lookupByHashNumber(hash, number, cb, function (err, hash, number, cb) {
            if (err) {
                return cb(err);
            }
            callbackify_1.callbackify(_this.dbManager.getHeader.bind(_this.dbManager))(hash, number, cb);
        });
    };
    /**
     * Gets a header by number. Header must be in the canonical chain
     *
     * @hidden
     */
    Blockchain.prototype._getCanonicalHeader = function (number, cb) {
        var _this = this;
        this._numberToHash(number, function (err, hash) {
            if (err) {
                return cb(err);
            }
            _this._getHeader(hash, number, cb);
        });
    };
    /**
     * Gets total difficulty for a block specified by hash and number
     *
     * @hidden
     */
    Blockchain.prototype._getTd = function (hash, number, cb) {
        var _this = this;
        this._lookupByHashNumber(hash, number, cb, function (err, hash, number, cb) {
            if (err) {
                return cb(err);
            }
            callbackify_1.callbackify(_this.dbManager.getTd.bind(_this.dbManager))(hash, number, cb);
        });
    };
    /**
     * @hidden
     */
    Blockchain.prototype._lockUnlock = function (fn, cb) {
        var self = this;
        this._putSemaphore.take(function () {
            fn(after);
            function after() {
                self._putSemaphore.leave();
                cb.apply(null, arguments);
            }
        });
    };
    return Blockchain;
}());
exports.default = Blockchain;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 378156:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
// Geth compatible DB keys
var headsKey = 'heads';
exports.headsKey = headsKey;
/**
 * Current canonical head for light sync
 */
var headHeaderKey = 'LastHeader';
exports.headHeaderKey = headHeaderKey;
/**
 * Current canonical head for full sync
 */
var headBlockKey = 'LastBlock';
exports.headBlockKey = headBlockKey;
/**
 * headerPrefix + number + hash -> header
 */
var headerPrefix = Buffer.from('h');
/**
 * headerPrefix + number + hash + tdSuffix -> td
 */
var tdSuffix = Buffer.from('t');
/**
 * headerPrefix + number + numSuffix -> hash
 */
var numSuffix = Buffer.from('n');
/**
 * blockHashPrefix + hash -> number
 */
var blockHashPrefix = Buffer.from('H');
/**
 * bodyPrefix + number + hash -> block body
 */
var bodyPrefix = Buffer.from('b');
// Utility functions
/**
 * Convert BN to big endian Buffer
 */
var bufBE8 = function (n) { return n.toArrayLike(Buffer, 'be', 8); };
exports.bufBE8 = bufBE8;
var tdKey = function (n, hash) { return Buffer.concat([headerPrefix, bufBE8(n), hash, tdSuffix]); };
exports.tdKey = tdKey;
var headerKey = function (n, hash) { return Buffer.concat([headerPrefix, bufBE8(n), hash]); };
exports.headerKey = headerKey;
var bodyKey = function (n, hash) { return Buffer.concat([bodyPrefix, bufBE8(n), hash]); };
exports.bodyKey = bodyKey;
var numberToHashKey = function (n) { return Buffer.concat([headerPrefix, bufBE8(n), numSuffix]); };
exports.numberToHashKey = numberToHashKey;
var hashToNumberKey = function (hash) { return Buffer.concat([blockHashPrefix, hash]); };
exports.hashToNumberKey = hashToNumberKey;
//# sourceMappingURL=util.js.map

/***/ }),

/***/ 614473:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Common = __webpack_require__(265982).default
const utils = __webpack_require__(636132)
const BN = utils.BN
  /**
   * An object that repersents the block header
   * @constructor
   * @param {Array} data raw data, deserialized
   * @param {Array} opts Options
   * @param {String|Number} opts.chain The chain for the block header [default: 'mainnet']
   * @param {String} opts.hardfork Hardfork for the block header [default: null, block number-based behaviour]
   * @param {Object} opts.common Alternatively pass a Common instance instead of setting chain/hardfork directly
   * @prop {Buffer} parentHash the blocks' parent's hash
   * @prop {Buffer} uncleHash sha3(rlp_encode(uncle_list))
   * @prop {Buffer} coinbase the miner address
   * @prop {Buffer} stateRoot The root of a Merkle Patricia tree
   * @prop {Buffer} transactionTrie the root of a Trie containing the transactions
   * @prop {Buffer} receiptTrie the root of a Trie containing the transaction Reciept
   * @prop {Buffer} bloom
   * @prop {Buffer} difficulty
   * @prop {Buffer} number the block's height
   * @prop {Buffer} gasLimit
   * @prop {Buffer} gasUsed
   * @prop {Buffer} timestamp
   * @prop {Buffer} extraData
   * @prop {Array.<Buffer>} raw an array of buffers containing the raw blocks.
   */
var BlockHeader = module.exports = function (data, opts) {
  opts = opts || {}

  if (opts.common) {
    if (opts.chain) {
      throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!')
    }
    this._common = opts.common
  } else {
    let chain = opts.chain ? opts.chain : 'mainnet'
    let hardfork = opts.hardfork ? opts.hardfork : null
    this._common = new Common(chain, hardfork)
  }

  var fields = [{
    name: 'parentHash',
    length: 32,
    default: utils.zeros(32)
  }, {
    name: 'uncleHash',
    default: utils.SHA3_RLP_ARRAY
  }, {
    name: 'coinbase',
    length: 20,
    default: utils.zeros(20)
  }, {
    name: 'stateRoot',
    length: 32,
    default: utils.zeros(32)
  }, {
    name: 'transactionsTrie',
    length: 32,
    default: utils.SHA3_RLP
  }, {
    name: 'receiptTrie',
    length: 32,
    default: utils.SHA3_RLP
  }, {
    name: 'bloom',
    default: utils.zeros(256)
  }, {
    name: 'difficulty',
    default: Buffer.from([])
  }, {
    name: 'number',
    // TODO: params.homeSteadForkNumber.v left for legacy reasons, replace on future release
    default: utils.intToBuffer(1150000)
  }, {
    name: 'gasLimit',
    default: Buffer.from('ffffffffffffff', 'hex')
  }, {
    name: 'gasUsed',
    empty: true,
    default: Buffer.from([])
  }, {
    name: 'timestamp',
    default: Buffer.from([])
  }, {
    name: 'extraData',
    allowZero: true,
    empty: true,
    default: Buffer.from([])
  }, {
    name: 'mixHash',
    default: utils.zeros(32)
      // length: 32
  }, {
    name: 'nonce',
    default: utils.zeros(8) // sha3(42)
  }]
  utils.defineProperties(this, fields, data)
}

/**
 * Returns the canoncical difficulty of the block
 * @method canonicalDifficulty
 * @param {Block} parentBlock the parent `Block` of the this header
 * @return {BN}
 */
BlockHeader.prototype.canonicalDifficulty = function (parentBlock) {
  const hardfork = this._common.hardfork() || this._common.activeHardfork(utils.bufferToInt(this.number))
  const blockTs = new BN(this.timestamp)
  const parentTs = new BN(parentBlock.header.timestamp)
  const parentDif = new BN(parentBlock.header.difficulty)
  const minimumDifficulty = new BN(this._common.param('pow', 'minimumDifficulty', hardfork))
  var offset = parentDif.div(new BN(this._common.param('pow', 'difficultyBoundDivisor', hardfork)))
  var num = new BN(this.number)
  var a
  var cutoff
  var dif

  if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) {
    // max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99) (EIP100)
    var uncleAddend = parentBlock.header.uncleHash.equals(utils.SHA3_RLP_ARRAY) ? 1 : 2
    a = blockTs.sub(parentTs).idivn(9).ineg().iaddn(uncleAddend)
    cutoff = new BN(-99)
    // MAX(cutoff, a)
    if (cutoff.cmp(a) === 1) {
      a = cutoff
    }
    dif = parentDif.add(offset.mul(a))
  }

  if (this._common.hardforkGteHardfork(hardfork, 'muirGlacier')) {
    // Istanbul/Berlin difficulty bomb delay (EIP2384)
    num.isubn(9000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'constantinople')) {
    // Constantinople difficulty bomb delay (EIP1234)
    num.isubn(5000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) {
    // Byzantium difficulty bomb delay (EIP649)
    num.isubn(3000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'homestead')) {
    // 1 - (block_timestamp - parent_timestamp) // 10
    a = blockTs.sub(parentTs).idivn(10).ineg().iaddn(1)
    cutoff = new BN(-99)
    // MAX(cutoff, a)
    if (cutoff.cmp(a) === 1) {
      a = cutoff
    }
    dif = parentDif.add(offset.mul(a))
  } else {
    // pre-homestead
    if (parentTs.addn(this._common.param('pow', 'durationLimit', hardfork)).cmp(blockTs) === 1) {
      dif = offset.add(parentDif)
    } else {
      dif = parentDif.sub(offset)
    }
  }

  var exp = num.idivn(100000).isubn(2)
  if (!exp.isNeg()) {
    dif.iadd(new BN(2).pow(exp))
  }

  if (dif.cmp(minimumDifficulty) === -1) {
    dif = minimumDifficulty
  }

  return dif
}

/**
 * checks that the block's `difficuly` matches the canonical difficulty
 * @method validateDifficulty
 * @param {Block} parentBlock this block's parent
 * @return {Boolean}
 */
BlockHeader.prototype.validateDifficulty = function (parentBlock) {
  const dif = this.canonicalDifficulty(parentBlock)
  return dif.cmp(new BN(this.difficulty)) === 0
}

/**
 * Validates the gasLimit
 * @method validateGasLimit
 * @param {Block} parentBlock this block's parent
 * @returns {Boolean}
 */
BlockHeader.prototype.validateGasLimit = function (parentBlock) {
  const pGasLimit = new BN(parentBlock.header.gasLimit)
  const gasLimit = new BN(this.gasLimit)
  const hardfork = this._common.hardfork() ? this._common.hardfork() : this._common.activeHardfork(this.number)
  const a = pGasLimit.div(new BN(this._common.param('gasConfig', 'gasLimitBoundDivisor', hardfork)))
  const maxGasLimit = pGasLimit.add(a)
  const minGasLimit = pGasLimit.sub(a)

  return gasLimit.lt(maxGasLimit) && gasLimit.gt(minGasLimit) && gasLimit.gte(this._common.param('gasConfig', 'minGasLimit', hardfork))
}

/**
 * Validates the entire block header
 * @method validate
 * @param {Blockchain} blockChain the blockchain that this block is validating against
 * @param {Bignum} [height] if this is an uncle header, this is the height of the block that is including it
 * @param {Function} cb the callback function. The callback is given an `error` if the block is invalid
 */
BlockHeader.prototype.validate = function (blockchain, height, cb) {
  var self = this
  if (arguments.length === 2) {
    cb = height
    height = false
  }

  if (this.isGenesis()) {
    return cb()
  }

  // find the blocks parent
  blockchain.getBlock(self.parentHash, function (err, parentBlock) {
    if (err) {
      return cb('could not find parent block')
    }

    self.parentBlock = parentBlock

    var number = new BN(self.number)
    if (number.cmp(new BN(parentBlock.header.number).iaddn(1)) !== 0) {
      return cb('invalid number')
    }

    if (height) {
      var dif = height.sub(new BN(parentBlock.header.number))
      if (!(dif.cmpn(8) === -1 && dif.cmpn(1) === 1)) {
        return cb('uncle block has a parent that is too old or to young')
      }
    }

    if (!self.validateDifficulty(parentBlock)) {
      return cb('invalid Difficulty')
    }

    if (!self.validateGasLimit(parentBlock)) {
      return cb('invalid gas limit')
    }

    if (utils.bufferToInt(parentBlock.header.number) + 1 !== utils.bufferToInt(self.number)) {
      return cb('invalid heigth')
    }

    if (utils.bufferToInt(self.timestamp) <= utils.bufferToInt(parentBlock.header.timestamp)) {
      return cb('invalid timestamp')
    }

    const hardfork = self._common.hardfork() ? self._common.hardfork() : self._common.activeHardfork(height)
    if (self.extraData.length > self._common.param('vm', 'maxExtraDataSize', hardfork)) {
      return cb('invalid amount of extra data')
    }

    cb()
  })
}

/**
 * Returns the sha3 hash of the blockheader
 * @method hash
 * @return {Buffer}
 */
BlockHeader.prototype.hash = function () {
  return utils.rlphash(this.raw)
}

/**
 * checks if the blockheader is a genesis header
 * @method isGenesis
 * @return {Boolean}
 */
BlockHeader.prototype.isGenesis = function () {
  return this.number.toString('hex') === ''
}

/**
 * turns the header into the canonical genesis block header
 * @method setGenesisParams
 */
BlockHeader.prototype.setGenesisParams = function () {
  this.timestamp = this._common.genesis().timestamp
  this.gasLimit = this._common.genesis().gasLimit
  this.difficulty = this._common.genesis().difficulty
  this.extraData = this._common.genesis().extraData
  this.nonce = this._common.genesis().nonce
  this.stateRoot = this._common.genesis().stateRoot
  this.number = Buffer.from([])
}


/***/ }),

/***/ 620877:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Common = __webpack_require__(265982).default
const ethUtil = __webpack_require__(636132)
const { Transaction } = __webpack_require__(537474)
const Trie = __webpack_require__(472171)
const BN = ethUtil.BN
const rlp = ethUtil.rlp
const async = __webpack_require__(581195)
const BlockHeader = __webpack_require__(614473)

/**
 * Creates a new block object
 * @constructor the raw serialized or the deserialized block.
 * @param {Array|Buffer|Object} data
 * @param {Array} opts Options
 * @param {String|Number} opts.chain The chain for the block [default: 'mainnet']
 * @param {String} opts.hardfork Hardfork for the block [default: null, block number-based behaviour]
 * @param {Object} opts.common Alternatively pass a Common instance (ethereumjs-common) instead of setting chain/hardfork directly
 * @prop {Header} header the block's header
 * @prop {Array.<Header>} uncleList an array of uncle headers
 * @prop {Array.<Buffer>} raw an array of buffers containing the raw blocks.
 */
var Block = module.exports = function (data, opts) {
  opts = opts || {}

  if (opts.common) {
    if (opts.chain) {
      throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!')
    }
    this._common = opts.common
  } else {
    let chain = opts.chain ? opts.chain : 'mainnet'
    let hardfork = opts.hardfork ? opts.hardfork : null
    this._common = new Common(chain, hardfork)
  }

  this.transactions = []
  this.uncleHeaders = []
  this._inBlockChain = false
  this.txTrie = new Trie()

  Object.defineProperty(this, 'raw', {
    get: function () {
      return this.serialize(false)
    }
  })

  var rawTransactions, rawUncleHeaders

  // defaults
  if (!data) {
    data = [[], [], []]
  }

  if (Buffer.isBuffer(data)) {
    data = rlp.decode(data)
  }

  if (Array.isArray(data)) {
    this.header = new BlockHeader(data[0], opts)
    rawTransactions = data[1]
    rawUncleHeaders = data[2]
  } else {
    this.header = new BlockHeader(data.header, opts)
    rawTransactions = data.transactions || []
    rawUncleHeaders = data.uncleHeaders || []
  }

  // parse uncle headers
  for (var i = 0; i < rawUncleHeaders.length; i++) {
    this.uncleHeaders.push(new BlockHeader(rawUncleHeaders[i], opts))
  }

  // parse transactions
  for (i = 0; i < rawTransactions.length; i++) {
    var tx = new Transaction(rawTransactions[i], opts)
    tx._homestead = true
    this.transactions.push(tx)
  }
}

Block.Header = BlockHeader

/**
 * Produces a hash the RLP of the block
 * @method hash
 */
Block.prototype.hash = function () {
  return this.header.hash()
}

/**
 * Determines if a given block is the genesis block
 * @method isGenisis
 * @return Boolean
 */
Block.prototype.isGenesis = function () {
  return this.header.isGenesis()
}

/**
 * turns the block into the canonical genesis block
 * @method setGenesisParams
 */
Block.prototype.setGenesisParams = function () {
  this.header.setGenesisParams()
}

/**
 * Produces a serialization of the block.
 * @method serialize
 * @param {Boolean} rlpEncode whether to rlp encode the block or not
 */
Block.prototype.serialize = function (rlpEncode) {
  var raw = [this.header.raw, [],
    []
  ]

  // rlpEnode defaults to true
  if (typeof rlpEncode === 'undefined') {
    rlpEncode = true
  }

  this.transactions.forEach(function (tx) {
    raw[1].push(tx.raw)
  })

  this.uncleHeaders.forEach(function (uncle) {
    raw[2].push(uncle.raw)
  })

  return rlpEncode ? rlp.encode(raw) : raw
}

/**
 * Generate transaction trie. The tx trie must be generated before the transaction trie can
 * be validated with `validateTransactionTrie`
 * @method genTxTrie
 * @param {Function} cb the callback
 */
Block.prototype.genTxTrie = function (cb) {
  var i = 0
  var self = this

  async.eachSeries(this.transactions, function (tx, done) {
    self.txTrie.put(rlp.encode(i), tx.serialize(), done)
    i++
  }, cb)
}

/**
 * Validates the transaction trie
 * @method validateTransactionTrie
 * @return {Boolean}
 */
Block.prototype.validateTransactionsTrie = function () {
  var txT = this.header.transactionsTrie.toString('hex')
  if (this.transactions.length) {
    return txT === this.txTrie.root.toString('hex')
  } else {
    return txT === ethUtil.SHA3_RLP.toString('hex')
  }
}

/**
 * Validates the transactions
 * @method validateTransactions
 * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean
 * @return {Boolean}
 */
Block.prototype.validateTransactions = function (stringError) {
  var errors = []

  this.transactions.forEach(function (tx, i) {
    var error = tx.validate(true)
    if (error) {
      errors.push(error + ' at tx ' + i)
    }
  })

  if (stringError === undefined || stringError === false) {
    return errors.length === 0
  } else {
    return arrayToString(errors)
  }
}

/**
 * Validates the entire block. Returns a string to the callback if block is invalid
 * @method validate
 * @param {BlockChain} blockChain the blockchain that this block wants to be part of
 * @param {Function} cb the callback which is given a `String` if the block is not valid
 */
Block.prototype.validate = function (blockChain, cb) {
  var self = this
  var errors = []

  async.parallel([
    // validate uncles
    self.validateUncles.bind(self, blockChain),
    // validate block
    self.header.validate.bind(self.header, blockChain),
    // generate the transaction trie
    self.genTxTrie.bind(self)
  ], function (err) {
    if (err) {
      errors.push(err)
    }

    if (!self.validateTransactionsTrie()) {
      errors.push('invalid transaction trie')
    }

    var txErrors = self.validateTransactions(true)
    if (txErrors !== '') {
      errors.push(txErrors)
    }

    if (!self.validateUnclesHash()) {
      errors.push('invalid uncle hash')
    }

    cb(arrayToString(errors))
  })
}

/**
 * Validates the uncle's hash
 * @method validateUncleHash
 * @return {Boolean}
 */
Block.prototype.validateUnclesHash = function () {
  var raw = []
  this.uncleHeaders.forEach(function (uncle) {
    raw.push(uncle.raw)
  })

  raw = rlp.encode(raw)
  return ethUtil.sha3(raw).toString('hex') === this.header.uncleHash.toString('hex')
}

/**
 * Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid
 * @method validateUncles
 * @param {Blockchain} blockChaina an instance of the Blockchain
 * @param {Function} cb the callback
 */
Block.prototype.validateUncles = function (blockChain, cb) {
  if (this.isGenesis()) {
    return cb()
  }

  var self = this

  if (self.uncleHeaders.length > 2) {
    return cb('too many uncle headers')
  }

  var uncleHashes = self.uncleHeaders.map(function (header) {
    return header.hash().toString('hex')
  })

  if (!((new Set(uncleHashes)).size === uncleHashes.length)) {
    return cb('duplicate uncles')
  }

  async.each(self.uncleHeaders, function (uncle, cb2) {
    var height = new BN(self.header.number)
    async.parallel([
      uncle.validate.bind(uncle, blockChain, height),
      // check to make sure the uncle is not already in the blockchain
      function (cb3) {
        blockChain.getDetails(uncle.hash(), function (err, blockInfo) {
          // TODO: remove uncles from BC
          if (blockInfo && blockInfo.isUncle) {
            cb3(err || 'uncle already included')
          } else {
            cb3()
          }
        })
      }
    ], cb2)
  }, cb)
}

/**
 * Converts the block toJSON
 * @method toJSON
 * @param {Bool} labeled whether to create an labeled object or an array
 * @return {Object}
 */
Block.prototype.toJSON = function (labeled) {
  if (labeled) {
    var obj = {
      header: this.header.toJSON(true),
      transactions: [],
      uncleHeaders: []
    }

    this.transactions.forEach(function (tx) {
      obj.transactions.push(tx.toJSON(labeled))
    })

    this.uncleHeaders.forEach(function (uh) {
      obj.uncleHeaders.push(uh.toJSON())
    })
    return obj
  } else {
    return ethUtil.baToJSON(this.raw)
  }
}

function arrayToString (array) {
  try {
    return array.reduce(function (str, err) {
      if (str) {
        str += ' '
      }
      return str + err
    })
  } catch (e) {
    return ''
  }
}


/***/ }),

/***/ 636132:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var createKeccakHash = __webpack_require__(465221);
var secp256k1 = __webpack_require__(907972);
var assert = __webpack_require__(742357);
var rlp = __webpack_require__(6636);
var BN = __webpack_require__(213550);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
Object.assign(exports, __webpack_require__(180884));

/**
 * the max integer that this VM can handle (a ```BN```)
 * @var {BN} MAX_INTEGER
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);

/**
 * 2^256 (a ```BN```)
 * @var {BN} TWO_POW256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);

/**
 * Keccak-256 hash of null (a ```String```)
 * @var {String} KECCAK256_NULL_S
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
exports.SHA3_NULL_S = exports.KECCAK256_NULL_S;

/**
 * Keccak-256 hash of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_NULL
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
exports.SHA3_NULL = exports.KECCAK256_NULL;

/**
 * Keccak-256 of an RLP of an empty array (a ```String```)
 * @var {String} KECCAK256_RLP_ARRAY_S
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S;

/**
 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP_ARRAY
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY;

/**
 * Keccak-256 hash of the RLP of null  (a ```String```)
 * @var {String} KECCAK256_RLP_S
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
exports.SHA3_RLP_S = exports.KECCAK256_RLP_S;

/**
 * Keccak-256 hash of the RLP of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
exports.SHA3_RLP = exports.KECCAK256_RLP;

/**
 * [`BN`](https://github.com/indutny/bn.js)
 * @var {Function}
 */
exports.BN = BN;

/**
 * [`rlp`](https://github.com/ethereumjs/rlp)
 * @var {Function}
 */
exports.rlp = rlp;

/**
 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
 * @var {Object}
 */
exports.secp256k1 = secp256k1;

/**
 * Returns a buffer filled with 0s
 * @method zeros
 * @param {Number} bytes  the number of bytes the buffer should be
 * @return {Buffer}
 */
exports.zeros = function (bytes) {
  return Buffer.allocUnsafe(bytes).fill(0);
};

/**
  * Returns a zero address
  * @method zeroAddress
  * @return {String}
  */
exports.zeroAddress = function () {
  var addressLength = 20;
  var zeroAddress = exports.zeros(addressLength);
  return exports.bufferToHex(zeroAddress);
};

/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @method lsetLength
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @param {Boolean} [right=false] whether to start padding form the left or right
 * @return {Buffer|Array}
 */
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
  var buf = exports.zeros(length);
  msg = exports.toBuffer(msg);
  if (right) {
    if (msg.length < length) {
      msg.copy(buf);
      return buf;
    }
    return msg.slice(0, length);
  } else {
    if (msg.length < length) {
      msg.copy(buf, length - msg.length);
      return buf;
    }
    return msg.slice(-length);
  }
};

/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @return {Buffer|Array}
 */
exports.setLengthRight = function (msg, length) {
  return exports.setLength(msg, length, true);
};

/**
 * Trims leading zeros from a `Buffer` or an `Array`
 * @param {Buffer|Array|String} a
 * @return {Buffer|Array|String}
 */
exports.unpad = exports.stripZeros = function (a) {
  a = exports.stripHexPrefix(a);
  var first = a[0];
  while (a.length > 0 && first.toString() === '0') {
    a = a.slice(1);
    first = a[0];
  }
  return a;
};
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param {*} v the value
 */
exports.toBuffer = function (v) {
  if (!Buffer.isBuffer(v)) {
    if (Array.isArray(v)) {
      v = Buffer.from(v);
    } else if (typeof v === 'string') {
      if (exports.isHexString(v)) {
        v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (typeof v === 'number') {
      v = exports.intToBuffer(v);
    } else if (v === null || v === undefined) {
      v = Buffer.allocUnsafe(0);
    } else if (BN.isBN(v)) {
      v = v.toArrayLike(Buffer);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type');
    }
  }
  return v;
};

/**
 * Converts a `Buffer` to a `Number`
 * @param {Buffer} buf
 * @return {Number}
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
  return new BN(exports.toBuffer(buf)).toNumber();
};

/**
 * Converts a `Buffer` into a hex `String`
 * @param {Buffer} buf
 * @return {String}
 */
exports.bufferToHex = function (buf) {
  buf = exports.toBuffer(buf);
  return '0x' + buf.toString('hex');
};

/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param {Buffer} num
 * @return {BN}
 */
exports.fromSigned = function (num) {
  return new BN(num).fromTwos(256);
};

/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param {BN} num
 * @return {Buffer}
 */
exports.toUnsigned = function (num) {
  return Buffer.from(num.toTwos(256).toArray());
};

/**
 * Creates Keccak hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the Keccak width
 * @return {Buffer}
 */
exports.keccak = function (a, bits) {
  a = exports.toBuffer(a);
  if (!bits) bits = 256;

  return createKeccakHash('keccak' + bits).update(a).digest();
};

/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.keccak256 = function (a) {
  return exports.keccak(a);
};

/**
 * Creates SHA-3 (Keccak) hash of the input [OBSOLETE]
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the SHA-3 width
 * @return {Buffer}
 */
exports.sha3 = exports.keccak;

/**
 * Creates SHA256 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.sha256 = function (a) {
  a = exports.toBuffer(a);
  return createHash('sha256').update(a).digest();
};

/**
 * Creates RIPEMD160 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Boolean} padded whether it should be padded to 256 bits or not
 * @return {Buffer}
 */
exports.ripemd160 = function (a, padded) {
  a = exports.toBuffer(a);
  var hash = createHash('rmd160').update(a).digest();
  if (padded === true) {
    return exports.setLength(hash, 32);
  } else {
    return hash;
  }
};

/**
 * Creates SHA-3 hash of the RLP encoded version of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.rlphash = function (a) {
  return exports.keccak(rlp.encode(a));
};

/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 * @param {Buffer} privateKey
 * @return {Boolean}
 */
exports.isValidPrivate = function (privateKey) {
  return secp256k1.privateKeyVerify(privateKey);
};

/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Boolean}
 */
exports.isValidPublic = function (publicKey, sanitize) {
  if (publicKey.length === 64) {
    // Convert to SEC1 for secp256k1
    return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
  }

  if (!sanitize) {
    return false;
  }

  return secp256k1.publicKeyVerify(publicKey);
};

/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Buffer}
 */
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
  pubKey = exports.toBuffer(pubKey);
  if (sanitize && pubKey.length !== 64) {
    pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
  }
  assert(pubKey.length === 64);
  // Only take the lower 160bits of the hash
  return exports.keccak(pubKey).slice(-20);
};

/**
 * Returns the ethereum public key of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
var privateToPublic = exports.privateToPublic = function (privateKey) {
  privateKey = exports.toBuffer(privateKey);
  // skip the type flag and use the X, Y points
  return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};

/**
 * Converts a public key to the Ethereum format.
 * @param {Buffer} publicKey
 * @return {Buffer}
 */
exports.importPublic = function (publicKey) {
  publicKey = exports.toBuffer(publicKey);
  if (publicKey.length !== 64) {
    publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
  }
  return publicKey;
};

/**
 * ECDSA sign
 * @param {Buffer} msgHash
 * @param {Buffer} privateKey
 * @return {Object}
 */
exports.ecsign = function (msgHash, privateKey) {
  var sig = secp256k1.sign(msgHash, privateKey);

  var ret = {};
  ret.r = sig.signature.slice(0, 32);
  ret.s = sig.signature.slice(32, 64);
  ret.v = sig.recovery + 27;
  return ret;
};

/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 * @param message
 * @returns {Buffer} hash
 */
exports.hashPersonalMessage = function (message) {
  var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString());
  return exports.keccak(Buffer.concat([prefix, message]));
};

/**
 * ECDSA public key recovery from signature
 * @param {Buffer} msgHash
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {Buffer} publicKey
 */
exports.ecrecover = function (msgHash, v, r, s) {
  var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
  var recovery = v - 27;
  if (recovery !== 0 && recovery !== 1) {
    throw new Error('Invalid signature v value');
  }
  var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
  return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};

/**
 * Convert signature parameters into the format of `eth_sign` RPC method
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {String} sig
 */
exports.toRpcSig = function (v, r, s) {
  // NOTE: with potential introduction of chainId this might need to be updated
  if (v !== 27 && v !== 28) {
    throw new Error('Invalid recovery id');
  }

  // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
  // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
  return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)]));
};

/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 * @param {String} sig
 * @return {Object}
 */
exports.fromRpcSig = function (sig) {
  sig = exports.toBuffer(sig);

  // NOTE: with potential introduction of chainId this might need to be updated
  if (sig.length !== 65) {
    throw new Error('Invalid signature length');
  }

  var v = sig[64];
  // support both versions of `eth_sign` responses
  if (v < 27) {
    v += 27;
  }

  return {
    v: v,
    r: sig.slice(0, 32),
    s: sig.slice(32, 64)
  };
};

/**
 * Returns the ethereum address of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
exports.privateToAddress = function (privateKey) {
  return exports.publicToAddress(privateToPublic(privateKey));
};

/**
 * Checks if the address is a valid. Accepts checksummed addresses too
 * @param {String} address
 * @return {Boolean}
 */
exports.isValidAddress = function (address) {
  return (/^0x[0-9a-fA-F]{40}$/.test(address)
  );
};

/**
  * Checks if a given address is a zero address
  * @method isZeroAddress
  * @param {String} address
  * @return {Boolean}
  */
exports.isZeroAddress = function (address) {
  var zeroAddress = exports.zeroAddress();
  return zeroAddress === exports.addHexPrefix(address);
};

/**
 * Returns a checksummed address
 * @param {String} address
 * @return {String}
 */
exports.toChecksumAddress = function (address) {
  address = exports.stripHexPrefix(address).toLowerCase();
  var hash = exports.keccak(address).toString('hex');
  var ret = '0x';

  for (var i = 0; i < address.length; i++) {
    if (parseInt(hash[i], 16) >= 8) {
      ret += address[i].toUpperCase();
    } else {
      ret += address[i];
    }
  }

  return ret;
};

/**
 * Checks if the address is a valid checksummed address
 * @param {Buffer} address
 * @return {Boolean}
 */
exports.isValidChecksumAddress = function (address) {
  return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};

/**
 * Generates an address of a newly created contract
 * @param {Buffer} from the address which is creating this new address
 * @param {Buffer} nonce the nonce of the from account
 * @return {Buffer}
 */
exports.generateAddress = function (from, nonce) {
  from = exports.toBuffer(from);
  nonce = new BN(nonce);

  if (nonce.isZero()) {
    // in RLP we want to encode null in the case of zero nonce
    // read the RLP documentation for an answer if you dare
    nonce = null;
  } else {
    nonce = Buffer.from(nonce.toArray());
  }

  // Only take the lower 160bits of the hash
  return exports.rlphash([from, nonce]).slice(-20);
};

/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
 * @param {Buffer|String} address
 * @return {Boolean}
 */
exports.isPrecompiled = function (address) {
  var a = exports.unpad(address);
  return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};

/**
 * Adds "0x" to a given `String` if it does not already start with "0x"
 * @param {String} str
 * @return {String}
 */
exports.addHexPrefix = function (str) {
  if (typeof str !== 'string') {
    return str;
  }

  return exports.isHexPrefixed(str) ? str : '0x' + str;
};

/**
 * Validate ECDSA signature
 * @method isValidSignature
 * @param {Buffer} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @param {Boolean} [homestead=true]
 * @return {Boolean}
 */

exports.isValidSignature = function (v, r, s, homestead) {
  var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
  var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);

  if (r.length !== 32 || s.length !== 32) {
    return false;
  }

  if (v !== 27 && v !== 28) {
    return false;
  }

  r = new BN(r);
  s = new BN(s);

  if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
    return false;
  }

  if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) {
    return false;
  }

  return true;
};

/**
 * Converts a `Buffer` or `Array` to JSON
 * @param {Buffer|Array} ba
 * @return {Array|String|null}
 */
exports.baToJSON = function (ba) {
  if (Buffer.isBuffer(ba)) {
    return '0x' + ba.toString('hex');
  } else if (ba instanceof Array) {
    var array = [];
    for (var i = 0; i < ba.length; i++) {
      array.push(exports.baToJSON(ba[i]));
    }
    return array;
  }
};

/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param {Object} self the `Object` to define properties on
 * @param {Array} fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param {*} data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
  self.raw = [];
  self._fields = [];

  // attach the `toJSON`
  self.toJSON = function (label) {
    if (label) {
      var obj = {};
      self._fields.forEach(function (field) {
        obj[field] = '0x' + self[field].toString('hex');
      });
      return obj;
    }
    return exports.baToJSON(this.raw);
  };

  self.serialize = function serialize() {
    return rlp.encode(self.raw);
  };

  fields.forEach(function (field, i) {
    self._fields.push(field.name);
    function getter() {
      return self.raw[i];
    }
    function setter(v) {
      v = exports.toBuffer(v);

      if (v.toString('hex') === '00' && !field.allowZero) {
        v = Buffer.allocUnsafe(0);
      }

      if (field.allowLess && field.length) {
        v = exports.stripZeros(v);
        assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes');
      } else if (!(field.allowZero && v.length === 0) && field.length) {
        assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length);
      }

      self.raw[i] = v;
    }

    Object.defineProperty(self, field.name, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter
    });

    if (field.default) {
      self[field.name] = field.default;
    }

    // attach alias
    if (field.alias) {
      Object.defineProperty(self, field.alias, {
        enumerable: false,
        configurable: true,
        set: setter,
        get: getter
      });
    }
  });

  // if the constuctor is passed data
  if (data) {
    if (typeof data === 'string') {
      data = Buffer.from(exports.stripHexPrefix(data), 'hex');
    }

    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }

    if (Array.isArray(data)) {
      if (data.length > self._fields.length) {
        throw new Error('wrong number of fields in data');
      }

      // make sure all the items are buffers
      data.forEach(function (d, i) {
        self[self._fields[i]] = exports.toBuffer(d);
      });
    } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
      var keys = Object.keys(data);
      fields.forEach(function (field) {
        if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name];
        if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias];
      });
    } else {
      throw new Error('invalid data');
    }
  }
};

/***/ }),

/***/ 697900:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(882009);
var buffer_1 = __webpack_require__(764293);
var transaction_1 = __webpack_require__(818723);
/**
 * Creates a new transaction object that doesn't need to be signed.
 *
 * @param data - A transaction can be initialized with its rlp representation, an array containing
 * the value of its fields in order, or an object containing them by name.
 *
 * @param opts - The transaction's options, used to indicate the chain and hardfork the
 * transactions belongs to.
 *
 * @see Transaction
 */
var FakeTransaction = /** @class */ (function (_super) {
    __extends(FakeTransaction, _super);
    function FakeTransaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        var _this = _super.call(this, data, opts) || this;
        Object.defineProperty(_this, 'from', {
            enumerable: true,
            configurable: true,
            get: function () { return _this.getSenderAddress(); },
            set: function (val) {
                if (val) {
                    _this._from = ethereumjs_util_1.toBuffer(val);
                }
            },
        });
        var txData = data;
        if (txData.from) {
            _this.from = ethereumjs_util_1.toBuffer(txData.from);
        }
        return _this;
    }
    /**
     * Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake
     * signature.
     *
     * @param includeSignature - Whether or not to include the signature
     */
    FakeTransaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        if (includeSignature && this._from && this._from.toString('hex') !== '') {
            // include a fake signature using the from address as a private key
            var fakeKey = buffer_1.Buffer.concat([this._from, this._from.slice(0, 12)]);
            this.sign(fakeKey);
        }
        return _super.prototype.hash.call(this, includeSignature);
    };
    return FakeTransaction;
}(transaction_1.default));
exports.default = FakeTransaction;
//# sourceMappingURL=fake.js.map

/***/ }),

/***/ 537474:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var transaction_1 = __webpack_require__(818723);
exports.Transaction = transaction_1.default;
var fake_1 = __webpack_require__(697900);
exports.FakeTransaction = fake_1.default;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 818723:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(882009);
var ethereumjs_common_1 = __webpack_require__(265982);
var buffer_1 = __webpack_require__(764293);
// secp256k1n/2
var N_DIV_2 = new ethereumjs_util_1.BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
/**
 * An Ethereum transaction.
 */
var Transaction = /** @class */ (function () {
    /**
     * Creates a new transaction from an object with its fields' values.
     *
     * @param data - A transaction can be initialized with its rlp representation, an array containing
     * the value of its fields in order, or an object containing them by name.
     *
     * @param opts - The transaction's options, used to indicate the chain and hardfork the
     * transactions belongs to.
     *
     * @note Transaction objects implement EIP155 by default. To disable it, use the constructor's
     * second parameter to set a chain and hardfork before EIP155 activation (i.e. before Spurious
     * Dragon.)
     *
     * @example
     * ```js
     * const txData = {
     *   nonce: '0x00',
     *   gasPrice: '0x09184e72a000',
     *   gasLimit: '0x2710',
     *   to: '0x0000000000000000000000000000000000000000',
     *   value: '0x00',
     *   data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
     *   v: '0x1c',
     *   r: '0x5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
     *   s: '0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13'
     * };
     * const tx = new Transaction(txData);
     * ```
     */
    function Transaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        // instantiate Common class instance based on passed options
        if (opts.common) {
            if (opts.chain || opts.hardfork) {
                throw new Error('Instantiation with both opts.common, and opts.chain and opts.hardfork parameter not allowed!');
            }
            this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : 'petersburg';
            this._common = new ethereumjs_common_1.default(chain, hardfork);
        }
        // Define Properties
        var fields = [
            {
                name: 'nonce',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasPrice',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasLimit',
                alias: 'gas',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'to',
                allowZero: true,
                length: 20,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'value',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'data',
                alias: 'input',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'v',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'r',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 's',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
        ];
        // attached serialize
        ethereumjs_util_1.defineProperties(this, fields, data);
        /**
         * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters.
         * @name from
         * @memberof Transaction
         */
        Object.defineProperty(this, 'from', {
            enumerable: true,
            configurable: true,
            get: this.getSenderAddress.bind(this),
        });
        this._validateV(this.v);
        this._overrideVSetterWithValidation();
    }
    /**
     * If the tx's `to` is to the creation address
     */
    Transaction.prototype.toCreationAddress = function () {
        return this.to.toString('hex') === '';
    };
    /**
     * Computes a sha3-256 hash of the serialized tx
     * @param includeSignature - Whether or not to include the signature
     */
    Transaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        var items;
        if (includeSignature) {
            items = this.raw;
        }
        else {
            if (this._implementsEIP155()) {
                items = this.raw.slice(0, 6).concat([
                    ethereumjs_util_1.toBuffer(this.getChainId()),
                    // TODO: stripping zeros should probably be a responsibility of the rlp module
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                ]);
            }
            else {
                items = this.raw.slice(0, 6);
            }
        }
        // create hash
        return ethereumjs_util_1.rlphash(items);
    };
    /**
     * returns chain ID
     */
    Transaction.prototype.getChainId = function () {
        return this._common.chainId();
    };
    /**
     * returns the sender's address
     */
    Transaction.prototype.getSenderAddress = function () {
        if (this._from) {
            return this._from;
        }
        var pubkey = this.getSenderPublicKey();
        this._from = ethereumjs_util_1.publicToAddress(pubkey);
        return this._from;
    };
    /**
     * returns the public key of the sender
     */
    Transaction.prototype.getSenderPublicKey = function () {
        if (!this.verifySignature()) {
            throw new Error('Invalid Signature');
        }
        // If the signature was verified successfully the _senderPubKey field is defined
        return this._senderPubKey;
    };
    /**
     * Determines if the signature is valid
     */
    Transaction.prototype.verifySignature = function () {
        var msgHash = this.hash(false);
        // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
        if (this._common.gteHardfork('homestead') && new ethereumjs_util_1.BN(this.s).cmp(N_DIV_2) === 1) {
            return false;
        }
        try {
            var v = ethereumjs_util_1.bufferToInt(this.v);
            var useChainIdWhileRecoveringPubKey = v >= this.getChainId() * 2 + 35 && this._common.gteHardfork('spuriousDragon');
            this._senderPubKey = ethereumjs_util_1.ecrecover(msgHash, v, this.r, this.s, useChainIdWhileRecoveringPubKey ? this.getChainId() : undefined);
        }
        catch (e) {
            return false;
        }
        return !!this._senderPubKey;
    };
    /**
     * sign a transaction with a given private key
     * @param privateKey - Must be 32 bytes in length
     */
    Transaction.prototype.sign = function (privateKey) {
        // We clear any previous signature before signing it. Otherwise, _implementsEIP155's can give
        // different results if this tx was already signed.
        this.v = new buffer_1.Buffer([]);
        this.s = new buffer_1.Buffer([]);
        this.r = new buffer_1.Buffer([]);
        var msgHash = this.hash(false);
        var sig = ethereumjs_util_1.ecsign(msgHash, privateKey);
        if (this._implementsEIP155()) {
            sig.v += this.getChainId() * 2 + 8;
        }
        Object.assign(this, sig);
    };
    /**
     * The amount of gas paid for the data in this tx
     */
    Transaction.prototype.getDataFee = function () {
        var data = this.raw[5];
        var cost = new ethereumjs_util_1.BN(0);
        for (var i = 0; i < data.length; i++) {
            data[i] === 0
                ? cost.iaddn(this._common.param('gasPrices', 'txDataZero'))
                : cost.iaddn(this._common.param('gasPrices', 'txDataNonZero'));
        }
        return cost;
    };
    /**
     * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)
     */
    Transaction.prototype.getBaseFee = function () {
        var fee = this.getDataFee().iaddn(this._common.param('gasPrices', 'tx'));
        if (this._common.gteHardfork('homestead') && this.toCreationAddress()) {
            fee.iaddn(this._common.param('gasPrices', 'txCreation'));
        }
        return fee;
    };
    /**
     * the up front amount that an account must have for this transaction to be valid
     */
    Transaction.prototype.getUpfrontCost = function () {
        return new ethereumjs_util_1.BN(this.gasLimit).imul(new ethereumjs_util_1.BN(this.gasPrice)).iadd(new ethereumjs_util_1.BN(this.value));
    };
    Transaction.prototype.validate = function (stringError) {
        if (stringError === void 0) { stringError = false; }
        var errors = [];
        if (!this.verifySignature()) {
            errors.push('Invalid Signature');
        }
        if (this.getBaseFee().cmp(new ethereumjs_util_1.BN(this.gasLimit)) > 0) {
            errors.push(["gas limit is too low. Need at least " + this.getBaseFee()]);
        }
        if (stringError === false) {
            return errors.length === 0;
        }
        else {
            return errors.join(' ');
        }
    };
    /**
     * Returns the rlp encoding of the transaction
     */
    Transaction.prototype.serialize = function () {
        // Note: This never gets executed, defineProperties overwrites it.
        return ethereumjs_util_1.rlp.encode(this.raw);
    };
    /**
     * Returns the transaction in JSON format
     * @see {@link https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md#defineproperties|ethereumjs-util}
     */
    Transaction.prototype.toJSON = function (labels) {
        if (labels === void 0) { labels = false; }
        // Note: This never gets executed, defineProperties overwrites it.
        return {};
    };
    Transaction.prototype._validateV = function (v) {
        if (v === undefined || v.length === 0) {
            return;
        }
        if (!this._common.gteHardfork('spuriousDragon')) {
            return;
        }
        var vInt = ethereumjs_util_1.bufferToInt(v);
        if (vInt === 27 || vInt === 28) {
            return;
        }
        var isValidEIP155V = vInt === this.getChainId() * 2 + 35 || vInt === this.getChainId() * 2 + 36;
        if (!isValidEIP155V) {
            throw new Error("Incompatible EIP155-based V " + vInt + " and chain id " + this.getChainId() + ". See the second parameter of the Transaction constructor to set the chain id.");
        }
    };
    Transaction.prototype._isSigned = function () {
        return this.v.length > 0 && this.r.length > 0 && this.s.length > 0;
    };
    Transaction.prototype._overrideVSetterWithValidation = function () {
        var _this = this;
        var vDescriptor = Object.getOwnPropertyDescriptor(this, 'v');
        Object.defineProperty(this, 'v', __assign({}, vDescriptor, { set: function (v) {
                if (v !== undefined) {
                    _this._validateV(ethereumjs_util_1.toBuffer(v));
                }
                vDescriptor.set(v);
            } }));
    };
    Transaction.prototype._implementsEIP155 = function () {
        var onEIP155BlockOrLater = this._common.gteHardfork('spuriousDragon');
        if (!this._isSigned()) {
            // We sign with EIP155 all unsigned transactions after spuriousDragon
            return onEIP155BlockOrLater;
        }
        // EIP155 spec:
        // If block.number >= 2,675,000 and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing
        // the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six
        // elements (i.e. nonce, gasprice, startgas, to, value, data), hash nine elements, with v replaced by
        // CHAIN_ID, r = 0 and s = 0.
        var v = ethereumjs_util_1.bufferToInt(this.v);
        var vAndChainIdMeetEIP155Conditions = v === this.getChainId() * 2 + 35 || v === this.getChainId() * 2 + 36;
        return vAndChainIdMeetEIP155Conditions && onEIP155BlockOrLater;
    };
    return Transaction;
}());
exports.default = Transaction;
//# sourceMappingURL=transaction.js.map

/***/ }),

/***/ 341520:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(747015);
var hash_1 = __webpack_require__(709359);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 747015:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 684289:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 709359:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(355988);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(747015);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 882009:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(684289));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(341520));
/**
 * Hash functions
 */
__export(__webpack_require__(709359));
/**
 * ECDSA signature
 */
__export(__webpack_require__(437424));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(747015));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(806007));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 806007:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(747015);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 437424:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(747015);
var hash_1 = __webpack_require__(709359);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 333407:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(952348)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 355988:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(333407)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(714161)
}


/***/ }),

/***/ 714161:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(952348)(__webpack_require__(506333))


/***/ }),

/***/ 952348:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(131777)
const createShake = __webpack_require__(471020)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 131777:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 471020:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 366458:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 506333:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(366458)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 531406:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
var createKeccakHash = __webpack_require__(465221);
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var assert = __webpack_require__(742357);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
var ethjsUtil = __webpack_require__(180884);
Object.assign(exports, ethjsUtil);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = exports.zeros(addressLength);
    return exports.bufferToHex(addr);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (exports.isHexString(v)) {
                v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
            }
            else {
                v = Buffer.from(v);
            }
        }
        else if (typeof v === 'number') {
            v = exports.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number)
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    a = exports.toBuffer(a);
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = exports.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = exports.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return exports.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = exports.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return exports.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = exports.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = exports.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = exports.toBuffer("\u0019Ethereum Signed Message:\n" + message.length.toString());
    return exports.keccak(Buffer.concat([prefix, message]));
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = exports.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === exports.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 */
exports.toChecksumAddress = function (address) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var hash = exports.keccak(address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 */
exports.isValidChecksumAddress = function (address) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = exports.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return exports.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return exports.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = exports.toBuffer(from);
    var saltBuf = exports.toBuffer(salt);
    var initCodeBuf = exports.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = exports.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, exports.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = exports.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return exports.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = exports.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = exports.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = exports.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 81616:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"0x0000000000000000000000000000000000000000\":\"0x1\",\"0x0000000000000000000000000000000000000001\":\"0x1\",\"0x0000000000000000000000000000000000000002\":\"0x1\",\"0x0000000000000000000000000000000000000003\":\"0x1\",\"0x0000000000000000000000000000000000000004\":\"0x1\",\"0x0000000000000000000000000000000000000005\":\"0x1\",\"0x0000000000000000000000000000000000000006\":\"0x1\",\"0x0000000000000000000000000000000000000007\":\"0x1\",\"0x0000000000000000000000000000000000000008\":\"0x1\",\"0x0000000000000000000000000000000000000009\":\"0x1\",\"0x000000000000000000000000000000000000000a\":\"0x1\",\"0x000000000000000000000000000000000000000b\":\"0x1\",\"0x000000000000000000000000000000000000000c\":\"0x1\",\"0x000000000000000000000000000000000000000d\":\"0x1\",\"0x000000000000000000000000000000000000000e\":\"0x1\",\"0x000000000000000000000000000000000000000f\":\"0x1\",\"0x0000000000000000000000000000000000000010\":\"0x1\",\"0x0000000000000000000000000000000000000011\":\"0x1\",\"0x0000000000000000000000000000000000000012\":\"0x1\",\"0x0000000000000000000000000000000000000013\":\"0x1\",\"0x0000000000000000000000000000000000000014\":\"0x1\",\"0x0000000000000000000000000000000000000015\":\"0x1\",\"0x0000000000000000000000000000000000000016\":\"0x1\",\"0x0000000000000000000000000000000000000017\":\"0x1\",\"0x0000000000000000000000000000000000000018\":\"0x1\",\"0x0000000000000000000000000000000000000019\":\"0x1\",\"0x000000000000000000000000000000000000001a\":\"0x1\",\"0x000000000000000000000000000000000000001b\":\"0x1\",\"0x000000000000000000000000000000000000001c\":\"0x1\",\"0x000000000000000000000000000000000000001d\":\"0x1\",\"0x000000000000000000000000000000000000001e\":\"0x1\",\"0x000000000000000000000000000000000000001f\":\"0x1\",\"0x0000000000000000000000000000000000000020\":\"0x1\",\"0x0000000000000000000000000000000000000021\":\"0x1\",\"0x0000000000000000000000000000000000000022\":\"0x1\",\"0x0000000000000000000000000000000000000023\":\"0x1\",\"0x0000000000000000000000000000000000000024\":\"0x1\",\"0x0000000000000000000000000000000000000025\":\"0x1\",\"0x0000000000000000000000000000000000000026\":\"0x1\",\"0x0000000000000000000000000000000000000027\":\"0x1\",\"0x0000000000000000000000000000000000000028\":\"0x1\",\"0x0000000000000000000000000000000000000029\":\"0x1\",\"0x000000000000000000000000000000000000002a\":\"0x1\",\"0x000000000000000000000000000000000000002b\":\"0x1\",\"0x000000000000000000000000000000000000002c\":\"0x1\",\"0x000000000000000000000000000000000000002d\":\"0x1\",\"0x000000000000000000000000000000000000002e\":\"0x1\",\"0x000000000000000000000000000000000000002f\":\"0x1\",\"0x0000000000000000000000000000000000000030\":\"0x1\",\"0x0000000000000000000000000000000000000031\":\"0x1\",\"0x0000000000000000000000000000000000000032\":\"0x1\",\"0x0000000000000000000000000000000000000033\":\"0x1\",\"0x0000000000000000000000000000000000000034\":\"0x1\",\"0x0000000000000000000000000000000000000035\":\"0x1\",\"0x0000000000000000000000000000000000000036\":\"0x1\",\"0x0000000000000000000000000000000000000037\":\"0x1\",\"0x0000000000000000000000000000000000000038\":\"0x1\",\"0x0000000000000000000000000000000000000039\":\"0x1\",\"0x000000000000000000000000000000000000003a\":\"0x1\",\"0x000000000000000000000000000000000000003b\":\"0x1\",\"0x000000000000000000000000000000000000003c\":\"0x1\",\"0x000000000000000000000000000000000000003d\":\"0x1\",\"0x000000000000000000000000000000000000003e\":\"0x1\",\"0x000000000000000000000000000000000000003f\":\"0x1\",\"0x0000000000000000000000000000000000000040\":\"0x1\",\"0x0000000000000000000000000000000000000041\":\"0x1\",\"0x0000000000000000000000000000000000000042\":\"0x1\",\"0x0000000000000000000000000000000000000043\":\"0x1\",\"0x0000000000000000000000000000000000000044\":\"0x1\",\"0x0000000000000000000000000000000000000045\":\"0x1\",\"0x0000000000000000000000000000000000000046\":\"0x1\",\"0x0000000000000000000000000000000000000047\":\"0x1\",\"0x0000000000000000000000000000000000000048\":\"0x1\",\"0x0000000000000000000000000000000000000049\":\"0x1\",\"0x000000000000000000000000000000000000004a\":\"0x1\",\"0x000000000000000000000000000000000000004b\":\"0x1\",\"0x000000000000000000000000000000000000004c\":\"0x1\",\"0x000000000000000000000000000000000000004d\":\"0x1\",\"0x000000000000000000000000000000000000004e\":\"0x1\",\"0x000000000000000000000000000000000000004f\":\"0x1\",\"0x0000000000000000000000000000000000000050\":\"0x1\",\"0x0000000000000000000000000000000000000051\":\"0x1\",\"0x0000000000000000000000000000000000000052\":\"0x1\",\"0x0000000000000000000000000000000000000053\":\"0x1\",\"0x0000000000000000000000000000000000000054\":\"0x1\",\"0x0000000000000000000000000000000000000055\":\"0x1\",\"0x0000000000000000000000000000000000000056\":\"0x1\",\"0x0000000000000000000000000000000000000057\":\"0x1\",\"0x0000000000000000000000000000000000000058\":\"0x1\",\"0x0000000000000000000000000000000000000059\":\"0x1\",\"0x000000000000000000000000000000000000005a\":\"0x1\",\"0x000000000000000000000000000000000000005b\":\"0x1\",\"0x000000000000000000000000000000000000005c\":\"0x1\",\"0x000000000000000000000000000000000000005d\":\"0x1\",\"0x000000000000000000000000000000000000005e\":\"0x1\",\"0x000000000000000000000000000000000000005f\":\"0x1\",\"0x0000000000000000000000000000000000000060\":\"0x1\",\"0x0000000000000000000000000000000000000061\":\"0x1\",\"0x0000000000000000000000000000000000000062\":\"0x1\",\"0x0000000000000000000000000000000000000063\":\"0x1\",\"0x0000000000000000000000000000000000000064\":\"0x1\",\"0x0000000000000000000000000000000000000065\":\"0x1\",\"0x0000000000000000000000000000000000000066\":\"0x1\",\"0x0000000000000000000000000000000000000067\":\"0x1\",\"0x0000000000000000000000000000000000000068\":\"0x1\",\"0x0000000000000000000000000000000000000069\":\"0x1\",\"0x000000000000000000000000000000000000006a\":\"0x1\",\"0x000000000000000000000000000000000000006b\":\"0x1\",\"0x000000000000000000000000000000000000006c\":\"0x1\",\"0x000000000000000000000000000000000000006d\":\"0x1\",\"0x000000000000000000000000000000000000006e\":\"0x1\",\"0x000000000000000000000000000000000000006f\":\"0x1\",\"0x0000000000000000000000000000000000000070\":\"0x1\",\"0x0000000000000000000000000000000000000071\":\"0x1\",\"0x0000000000000000000000000000000000000072\":\"0x1\",\"0x0000000000000000000000000000000000000073\":\"0x1\",\"0x0000000000000000000000000000000000000074\":\"0x1\",\"0x0000000000000000000000000000000000000075\":\"0x1\",\"0x0000000000000000000000000000000000000076\":\"0x1\",\"0x0000000000000000000000000000000000000077\":\"0x1\",\"0x0000000000000000000000000000000000000078\":\"0x1\",\"0x0000000000000000000000000000000000000079\":\"0x1\",\"0x000000000000000000000000000000000000007a\":\"0x1\",\"0x000000000000000000000000000000000000007b\":\"0x1\",\"0x000000000000000000000000000000000000007c\":\"0x1\",\"0x000000000000000000000000000000000000007d\":\"0x1\",\"0x000000000000000000000000000000000000007e\":\"0x1\",\"0x000000000000000000000000000000000000007f\":\"0x1\",\"0x0000000000000000000000000000000000000080\":\"0x1\",\"0x0000000000000000000000000000000000000081\":\"0x1\",\"0x0000000000000000000000000000000000000082\":\"0x1\",\"0x0000000000000000000000000000000000000083\":\"0x1\",\"0x0000000000000000000000000000000000000084\":\"0x1\",\"0x0000000000000000000000000000000000000085\":\"0x1\",\"0x0000000000000000000000000000000000000086\":\"0x1\",\"0x0000000000000000000000000000000000000087\":\"0x1\",\"0x0000000000000000000000000000000000000088\":\"0x1\",\"0x0000000000000000000000000000000000000089\":\"0x1\",\"0x000000000000000000000000000000000000008a\":\"0x1\",\"0x000000000000000000000000000000000000008b\":\"0x1\",\"0x000000000000000000000000000000000000008c\":\"0x1\",\"0x000000000000000000000000000000000000008d\":\"0x1\",\"0x000000000000000000000000000000000000008e\":\"0x1\",\"0x000000000000000000000000000000000000008f\":\"0x1\",\"0x0000000000000000000000000000000000000090\":\"0x1\",\"0x0000000000000000000000000000000000000091\":\"0x1\",\"0x0000000000000000000000000000000000000092\":\"0x1\",\"0x0000000000000000000000000000000000000093\":\"0x1\",\"0x0000000000000000000000000000000000000094\":\"0x1\",\"0x0000000000000000000000000000000000000095\":\"0x1\",\"0x0000000000000000000000000000000000000096\":\"0x1\",\"0x0000000000000000000000000000000000000097\":\"0x1\",\"0x0000000000000000000000000000000000000098\":\"0x1\",\"0x0000000000000000000000000000000000000099\":\"0x1\",\"0x000000000000000000000000000000000000009a\":\"0x1\",\"0x000000000000000000000000000000000000009b\":\"0x1\",\"0x000000000000000000000000000000000000009c\":\"0x1\",\"0x000000000000000000000000000000000000009d\":\"0x1\",\"0x000000000000000000000000000000000000009e\":\"0x1\",\"0x000000000000000000000000000000000000009f\":\"0x1\",\"0x00000000000000000000000000000000000000a0\":\"0x1\",\"0x00000000000000000000000000000000000000a1\":\"0x1\",\"0x00000000000000000000000000000000000000a2\":\"0x1\",\"0x00000000000000000000000000000000000000a3\":\"0x1\",\"0x00000000000000000000000000000000000000a4\":\"0x1\",\"0x00000000000000000000000000000000000000a5\":\"0x1\",\"0x00000000000000000000000000000000000000a6\":\"0x1\",\"0x00000000000000000000000000000000000000a7\":\"0x1\",\"0x00000000000000000000000000000000000000a8\":\"0x1\",\"0x00000000000000000000000000000000000000a9\":\"0x1\",\"0x00000000000000000000000000000000000000aa\":\"0x1\",\"0x00000000000000000000000000000000000000ab\":\"0x1\",\"0x00000000000000000000000000000000000000ac\":\"0x1\",\"0x00000000000000000000000000000000000000ad\":\"0x1\",\"0x00000000000000000000000000000000000000ae\":\"0x1\",\"0x00000000000000000000000000000000000000af\":\"0x1\",\"0x00000000000000000000000000000000000000b0\":\"0x1\",\"0x00000000000000000000000000000000000000b1\":\"0x1\",\"0x00000000000000000000000000000000000000b2\":\"0x1\",\"0x00000000000000000000000000000000000000b3\":\"0x1\",\"0x00000000000000000000000000000000000000b4\":\"0x1\",\"0x00000000000000000000000000000000000000b5\":\"0x1\",\"0x00000000000000000000000000000000000000b6\":\"0x1\",\"0x00000000000000000000000000000000000000b7\":\"0x1\",\"0x00000000000000000000000000000000000000b8\":\"0x1\",\"0x00000000000000000000000000000000000000b9\":\"0x1\",\"0x00000000000000000000000000000000000000ba\":\"0x1\",\"0x00000000000000000000000000000000000000bb\":\"0x1\",\"0x00000000000000000000000000000000000000bc\":\"0x1\",\"0x00000000000000000000000000000000000000bd\":\"0x1\",\"0x00000000000000000000000000000000000000be\":\"0x1\",\"0x00000000000000000000000000000000000000bf\":\"0x1\",\"0x00000000000000000000000000000000000000c0\":\"0x1\",\"0x00000000000000000000000000000000000000c1\":\"0x1\",\"0x00000000000000000000000000000000000000c2\":\"0x1\",\"0x00000000000000000000000000000000000000c3\":\"0x1\",\"0x00000000000000000000000000000000000000c4\":\"0x1\",\"0x00000000000000000000000000000000000000c5\":\"0x1\",\"0x00000000000000000000000000000000000000c6\":\"0x1\",\"0x00000000000000000000000000000000000000c7\":\"0x1\",\"0x00000000000000000000000000000000000000c8\":\"0x1\",\"0x00000000000000000000000000000000000000c9\":\"0x1\",\"0x00000000000000000000000000000000000000ca\":\"0x1\",\"0x00000000000000000000000000000000000000cb\":\"0x1\",\"0x00000000000000000000000000000000000000cc\":\"0x1\",\"0x00000000000000000000000000000000000000cd\":\"0x1\",\"0x00000000000000000000000000000000000000ce\":\"0x1\",\"0x00000000000000000000000000000000000000cf\":\"0x1\",\"0x00000000000000000000000000000000000000d0\":\"0x1\",\"0x00000000000000000000000000000000000000d1\":\"0x1\",\"0x00000000000000000000000000000000000000d2\":\"0x1\",\"0x00000000000000000000000000000000000000d3\":\"0x1\",\"0x00000000000000000000000000000000000000d4\":\"0x1\",\"0x00000000000000000000000000000000000000d5\":\"0x1\",\"0x00000000000000000000000000000000000000d6\":\"0x1\",\"0x00000000000000000000000000000000000000d7\":\"0x1\",\"0x00000000000000000000000000000000000000d8\":\"0x1\",\"0x00000000000000000000000000000000000000d9\":\"0x1\",\"0x00000000000000000000000000000000000000da\":\"0x1\",\"0x00000000000000000000000000000000000000db\":\"0x1\",\"0x00000000000000000000000000000000000000dc\":\"0x1\",\"0x00000000000000000000000000000000000000dd\":\"0x1\",\"0x00000000000000000000000000000000000000de\":\"0x1\",\"0x00000000000000000000000000000000000000df\":\"0x1\",\"0x00000000000000000000000000000000000000e0\":\"0x1\",\"0x00000000000000000000000000000000000000e1\":\"0x1\",\"0x00000000000000000000000000000000000000e2\":\"0x1\",\"0x00000000000000000000000000000000000000e3\":\"0x1\",\"0x00000000000000000000000000000000000000e4\":\"0x1\",\"0x00000000000000000000000000000000000000e5\":\"0x1\",\"0x00000000000000000000000000000000000000e6\":\"0x1\",\"0x00000000000000000000000000000000000000e7\":\"0x1\",\"0x00000000000000000000000000000000000000e8\":\"0x1\",\"0x00000000000000000000000000000000000000e9\":\"0x1\",\"0x00000000000000000000000000000000000000ea\":\"0x1\",\"0x00000000000000000000000000000000000000eb\":\"0x1\",\"0x00000000000000000000000000000000000000ec\":\"0x1\",\"0x00000000000000000000000000000000000000ed\":\"0x1\",\"0x00000000000000000000000000000000000000ee\":\"0x1\",\"0x00000000000000000000000000000000000000ef\":\"0x1\",\"0x00000000000000000000000000000000000000f0\":\"0x1\",\"0x00000000000000000000000000000000000000f1\":\"0x1\",\"0x00000000000000000000000000000000000000f2\":\"0x1\",\"0x00000000000000000000000000000000000000f3\":\"0x1\",\"0x00000000000000000000000000000000000000f4\":\"0x1\",\"0x00000000000000000000000000000000000000f5\":\"0x1\",\"0x00000000000000000000000000000000000000f6\":\"0x1\",\"0x00000000000000000000000000000000000000f7\":\"0x1\",\"0x00000000000000000000000000000000000000f8\":\"0x1\",\"0x00000000000000000000000000000000000000f9\":\"0x1\",\"0x00000000000000000000000000000000000000fa\":\"0x1\",\"0x00000000000000000000000000000000000000fb\":\"0x1\",\"0x00000000000000000000000000000000000000fc\":\"0x1\",\"0x00000000000000000000000000000000000000fd\":\"0x1\",\"0x00000000000000000000000000000000000000fe\":\"0x1\",\"0x00000000000000000000000000000000000000ff\":\"0x1\",\"0x4c2ae482593505f0163cdefc073e81c63cda4107\":\"0x152d02c7e14af6800000\",\"0xa8e8f14732658e4b51e8711931053a8a69baf2b1\":\"0x152d02c7e14af6800000\",\"0xd9a5179f091d85051d3c982785efd1455cec8699\":\"0x84595161401484a000000\",\"0xe0a2bd4258d2768837baa26a28fe71dc079f84c7\":\"0x4a47e3c12448f4ad000000\"}");

/***/ }),

/***/ 916140:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var genesisStates = {
    names: {
        '1': 'mainnet',
        '3': 'ropsten',
        '4': 'rinkeby',
        '42': 'kovan',
        '6284': 'goerli',
    },
    mainnet: __webpack_require__(194936),
    ropsten: __webpack_require__(638923),
    rinkeby: __webpack_require__(706139),
    kovan: __webpack_require__(94527),
    goerli: __webpack_require__(81616),
};
/**
 * Returns the genesis state by network ID
 * @param id ID of the network (e.g. 1)
 * @returns Dictionary with genesis accounts
 */
function genesisStateById(id) {
    return genesisStates[genesisStates['names'][id]];
}
exports.genesisStateById = genesisStateById;
/**
 * Returns the genesis state by network name
 * @param name Name of the network (e.g. 'mainnet')
 * @returns Dictionary with genesis accounts
 */
function genesisStateByName(name) {
    return genesisStates[name];
}
exports.genesisStateByName = genesisStateByName;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 94527:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"0x0000000000000000000000000000000000000001\":\"0x1\",\"0x0000000000000000000000000000000000000002\":\"0x1\",\"0x0000000000000000000000000000000000000003\":\"0x1\",\"0x0000000000000000000000000000000000000004\":\"0x1\",\"0x00521965e7bd230323c423d96c657db5b79d099f\":\"0x100000000000000000000000000000000000000000000000000\"}");

/***/ }),

/***/ 194936:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"0x000d836201318ec6899a67540690382780743280\":\"0xad78ebc5ac6200000\",\"0x001762430ea9c3a26e5749afdb70da5f78ddbb8c\":\"0xad78ebc5ac6200000\",\"0x001d14804b399c6ef80e64576f657660804fec0b\":\"0xe3aeb5737240a00000\",\"0x0032403587947b9f15622a68d104d54d33dbd1cd\":\"0x433874f632cc60000\",\"0x00497e92cdc0e0b963d752b2296acb87da828b24\":\"0xa8f649fe7c6180000\",\"0x004bfbe1546bc6c65b5c7eaa55304b38bbfec6d3\":\"0x6c6b935b8bbd400000\",\"0x005a9c03f69d17d66cbb8ad721008a9ebbb836fb\":\"0x6c6b935b8bbd400000\",\"0x005d0ee8155ec0a6ff6808552ca5f16bb5be323a\":\"0xaadec983fcff40000\",\"0x007622d84a234bb8b078230fcf84b67ae9a8acae\":\"0x25e1cc519952f80000\",\"0x007b9fc31905b4994b04c9e2cfdc5e2770503f42\":\"0x6c5db2a4d815dc0000\",\"0x007f4a23ca00cd043d25c2888c1aa5688f81a344\":\"0x29f0a95bfbf7290000\",\"0x008639dabbe3aeac887b5dc0e43e13bcd287d76c\":\"0x10d0e3c87d6e2c0000\",\"0x0089508679abf8c71bf6781687120e3e6a84584d\":\"0x6194049f30f7200000\",\"0x008fc7cbadffbd0d7fe44f8dfd60a79d721a1c9c\":\"0x3635c9adc5dea00000\",\"0x009560a3de627868f91fa8bfe1c1b7afaf08186b\":\"0x1c67f5f7baa0b00000\",\"0x00969747f7a5b30645fe00e44901435ace24cc37\":\"0x5c283d410394100000\",\"0x009a6d7db326679b77c90391a7476d238f3ba33e\":\"0xada55474b81340000\",\"0x009eef0a0886056e3f69211853b9b7457f3782e4\":\"0xa2a878069b28e00000\",\"0x009fdbf44e1f4a6362b769c39a475f95a96c2bc7\":\"0x1e931283ccc8500000\",\"0x00a5797f52c9d58f189f36b1d45d1bf6041f2f6b\":\"0x127d1b3461acd1a0000\",\"0x00aa5381b2138ebeffc191d5d8c391753b7098d2\":\"0x35abb09ffedeb68000\",\"0x00aada25ea2286709abb422d41923fd380cd04c7\":\"0x233df3299f61720000\",\"0x00acbfb2f25a5485c739ef70a44eeeeb7c65a66f\":\"0x56bc75e2d63100000\",\"0x00acc6f082a442828764d11f58d6894ae408f073\":\"0xcb49b44ba602d800000\",\"0x00b277b099a8e866ca0ec65bcb87284fd142a582\":\"0x6acb3df27e1f880000\",\"0x00bdd4013aa31c04616c2bc9785f2788f915679b\":\"0xb9f65d00f63c0000\",\"0x00c27d63fde24b92ee8a1e7ed5d26d8dc5c83b03\":\"0x6c6b935b8bbd400000\",\"0x00c40fe2095423509b9fd9b754323158af2310f3\":\"0x0\",\"0x00d75ed60c774f8b3a5a5173fb1833ad7105a2d9\":\"0x6cb7e74867d5e60000\",\"0x00d78d89b35f472716eceafebf600527d3a1f969\":\"0x5e0549c9632e1d80000\",\"0x00dae27b350bae20c5652124af5d8b5cba001ec1\":\"0x22b1c8c1227a00000\",\"0x00dc01cbf44978a42e8de8e436edf94205cfb6ec\":\"0x4f0febbcda8cb40000\",\"0x00e681bc2d10db62de85848324492250348e90bf\":\"0x43c33c1937564800000\",\"0x00f463e137dcf625fbf3bca39eca98d2b968cf7f\":\"0x14061b9d77a5e980000\",\"0x010007394b8b7565a1658af88ce463499135d6b7\":\"0x56bc75e2d63100000\",\"0x010df1df4bed23760d2d1c03781586ddf7918e54\":\"0x340aad21b3b700000\",\"0x010f4a98dfa1d9799bf5c796fb550efbe7ecd877\":\"0x1b2f292236292c70000\",\"0x01155057002f6b0d18acb9388d3bc8129f8f7a20\":\"0x48a43c54602f700000\",\"0x01226e0ad8d62277b162621c62c928e96e0b9a8c\":\"0x6c6b935b8bbd400000\",\"0x0126e12ebc17035f35c0e9d11dd148393c405d7a\":\"0x6c660645aa47180000\",\"0x012f396a2b5eb83559bac515e5210df2c8c362ba\":\"0xad78ebc5ac6200000\",\"0x0134ff38155fabae94fd35c4ffe1d79de7ef9c59\":\"0x35659ef93f0fc40000\",\"0x0136a5af6c3299c6b5f005fdaddb148c070b299b\":\"0x11aa9ac15f1280000\",\"0x01488ad3da603c4cdd6cb0b7a1e30d2a30c8fc38\":\"0xad78ebc5ac6200000\",\"0x014974a1f46bf204944a853111e52f1602617def\":\"0x6c6b935b8bbd400000\",\"0x014b7f67b14f5d983d87014f570c8b993b9872b5\":\"0xad78ebc5ac6200000\",\"0x0151fa5d17a2dce2d7f1eb39ef7fe2ad213d5d89\":\"0xd8d726b7177a800000\",\"0x01577afd4e50890247c9b10d44af73229aec884f\":\"0x24dce54d34a1a00000\",\"0x015f097d9acddcddafaf2a107eb93a40fc94b04c\":\"0x43c33c1937564800000\",\"0x0169c1c210eae845e56840412e1f65993ea90fb4\":\"0x6c6b935b8bbd400000\",\"0x016b60bb6d67928c29fd0313c666da8f1698d9c5\":\"0x6c6b935b8bbd400000\",\"0x016c85e1613b900fa357b8283b120e65aefcdd08\":\"0x2b5d9784a97cd50000\",\"0x018492488ba1a292342247b31855a55905fef269\":\"0x796e3ea3f8ab00000\",\"0x018f20a27b27ec441af723fd9099f2cbb79d6263\":\"0x75792a8abdef7c0000\",\"0x0191eb547e7bf6976b9b1b577546761de65622e2\":\"0x6c6b4c4da6ddbe0000\",\"0x019d709579ff4bc09fdcdde431dc1447d2c260bc\":\"0x1158e460913d00000\",\"0x01a25a5f5af0169b30864c3be4d7563ccd44f09e\":\"0x4d853c8f8908980000\",\"0x01a7d9fa7d0eb1185c67e54da83c2e75db69e39f\":\"0x19d4addd0d8bc960000\",\"0x01a818135a414210c37c62b625aca1a54611ac36\":\"0xe18398e7601900000\",\"0x01b1cae91a3b9559afb33cdc6d689442fdbfe037\":\"0xad78ebc5ac6200000\",\"0x01b5b5bc5a117fa08b34ed1db9440608597ac548\":\"0xad78ebc5ac6200000\",\"0x01bbc14f67af0639aab1441e6a08d4ce7162090f\":\"0x46fcf68ff8be060000\",\"0x01d03815c61f416b71a2610a2daba59ff6a6de5b\":\"0x205dfe50b81c82e0000\",\"0x01d599ee0d5f8c38ab2d392e2c65b74c3ce31820\":\"0x1ba5abf9e779380000\",\"0x01e40521122530d9ac91113c06a0190b6d63850b\":\"0x487a9a304539440000\",\"0x01e6415d587b065490f1ed7f21d6e0f386ee6747\":\"0x6c6b935b8bbd400000\",\"0x01e864d354741b423e6f42851724468c74f5aa9c\":\"0x43c33c1937564800000\",\"0x01ed5fba8d2eab673aec042d30e4e8a611d8c55a\":\"0x6c6b935b8bbd400000\",\"0x01fb8ec12425a04f813e46c54c05748ca6b29aa9\":\"0xe15730385467c0000\",\"0x01ff1eb1dead50a7f2f9638fdee6eccf3a7b2ac8\":\"0x2086ac351052600000\",\"0x020362c3ade878ca90d6b2d889a4cc5510eed5f3\":\"0x3888e8b311adb38000\",\"0x0203ae01d4c41cae1865e04b1f5b53cdfaecae31\":\"0x3689cdceb28cd70000\",\"0x02089361a3fe7451fb1f87f01a2d866653dc0b07\":\"0x22ac74832b5040000\",\"0x021f69043de88c4917ca10f1842897eec0589c7c\":\"0x6b44cfb81487f40000\",\"0x02290fb5f9a517f82845acdeca0fc846039be233\":\"0x6c6b935b8bbd400000\",\"0x0239b4f21f8e05cd01512b2be7a0e18a6d974607\":\"0x3635c9adc5dea00000\",\"0x02477212ffdd75e5155651b76506b1646671a1eb\":\"0x5f68e8131ecf800000\",\"0x024a098ae702bef5406c9c22b78bd4eb2cc7a293\":\"0xd8d726b7177a800000\",\"0x024bdd2c7bfd500ee7404f7fb3e9fb31dd20fbd1\":\"0x9c2007651b2500000\",\"0x025367960304beee34591118e9ac2d1358d8021a\":\"0x6c6b935b8bbd400000\",\"0x0256149f5b5063bea14e15661ffb58f9b459a957\":\"0x2629f66e0c53000000\",\"0x02603d7a3bb297c67c877e5d34fbd5b913d4c63a\":\"0x1158e460913d00000\",\"0x0261ad3a172abf1315f0ffec3270986a8409cb25\":\"0xb08213bcf8ffe0000\",\"0x026432af37dc5113f1f46d480a4de0b28052237e\":\"0x1349b786e40bfc0000\",\"0x0266ab1c6b0216230b9395443d5fa75e684568c6\":\"0x3635c9adc5dea00000\",\"0x02751dc68cb5bd737027abf7ddb77390cd77c16b\":\"0x1158e460913d00000\",\"0x02778e390fa17510a3428af2870c4273547d386c\":\"0x36c3c66170c0d720000\",\"0x02ade5db22f8b758ee1443626c64ec2f32aa0a15\":\"0x43c33c1937564800000\",\"0x02af2459a93d0b3f4d062636236cd4b29e3bcecf\":\"0x678a932062e4180000\",\"0x02b1af72339b2a2256389fd64607de24f0de600a\":\"0x6c6b935b8bbd400000\",\"0x02b643d6fabd437a851accbe79abb7fde126dccf\":\"0x18650127cc3dc800000\",\"0x02b6d65cb00b7b36e1fb5ed3632c4cb20a894130\":\"0x43c33c1937564800000\",\"0x02b7b1d6b34ce053a40eb65cd4a4f7dddd0e9f30\":\"0x252248deb6e6940000\",\"0x02c9f7940a7b8b7a410bf83dc9c22333d4275dd3\":\"0x10f0cf064dd59200000\",\"0x02d4a30968a39e2b3498c3a6a4ed45c1c6646822\":\"0x6c6b935b8bbd400000\",\"0x02dfcb17a1b87441036374b762a5d3418b1cb4d4\":\"0x48b02ba9d1ba460000\",\"0x02e4cb22be46258a40e16d4338d802fffd00c151\":\"0x149696eaceba810000\",\"0x02e816afc1b5c0f39852131959d946eb3b07b5ad\":\"0x3635c9adc5dea00000\",\"0x02f7f67209b16a17550c694c72583819c80b54ad\":\"0x5559306a78a700000\",\"0x030973807b2f426914ad00181270acd27b8ff61f\":\"0x121ea68c114e5100000\",\"0x03097923ba155e16d82f3ad3f6b815540884b92c\":\"0x62a992e53a0af00000\",\"0x030fb3401f72bd3418b7d1da75bf8c519dd707dc\":\"0xa2a15d09519be00000\",\"0x031e25db516b0f099faebfd94f890cf96660836b\":\"0x6c6b935b8bbd400000\",\"0x0328510c09dbcd85194a98d67c33ac49f2f94d60\":\"0x2544faa778090e00000\",\"0x0329188f080657ab3a2afa522467178279832085\":\"0xbbf510ddfcb260000\",\"0x03317826d1f70aa4bddfa09be0c4105552d2358b\":\"0x21a754a6dc5280000\",\"0x03337012ae1d7ff3ee7f697c403e7780188bf0ef\":\"0xad78ebc5ac6200000\",\"0x03377c0e556b640103289a6189e1aeae63493467\":\"0x43c33c1937564800000\",\"0x0349634dc2a9e80c3f7721ee2b5046aeaaedfbb5\":\"0xd8d726b7177a800000\",\"0x0355bcacbd21441e95adeedc30c17218c8a408ce\":\"0x15af1d78b58c400000\",\"0x036eeff5ba90a6879a14dff4c5043b18ca0460c9\":\"0x56bc75e2d63100000\",\"0x03714b41d2a6f751008ef8dd4d2b29aecab8f36e\":\"0x14542ba12a337c00000\",\"0x0372e852582e0934344a0fed2178304df25d4628\":\"0x43c33c1937564800000\",\"0x0372ee5508bf8163ed284e5eef94ce4d7367e522\":\"0x56bc75e2d63100000\",\"0x037dd056e7fdbd641db5b6bea2a8780a83fae180\":\"0x796e3ea3f8ab00000\",\"0x038323b184cff7a82ae2e1bda7793fe4319ca0bf\":\"0x43c33c1937564800000\",\"0x038779ca2dbe663e63db3fe75683ea0ec62e2383\":\"0x5a87e7d7f5f6580000\",\"0x038e45eadd3d88b87fe4dab066680522f0dfc8f9\":\"0x21e19e0c9bab2400000\",\"0x0392549a727f81655429cb928b529f25df4d1385\":\"0x16c43a0eea0740000\",\"0x0394b90fadb8604f86f43fc1e35d3124b32a5989\":\"0x296aa140278e700000\",\"0x039e7a4ebc284e2ccd42b1bdd60bd6511c0f7706\":\"0xf015f25736420000\",\"0x039ef1ce52fe7963f166d5a275c4b1069fe3a832\":\"0x15af39e4aab2740000\",\"0x03a26cfc4c18316f70d59e9e1a79ee3e8b962f4c\":\"0x6c6b935b8bbd400000\",\"0x03aa622881236dd0f4940c24c324ff8b7b7e2186\":\"0xad78ebc5ac62000000\",\"0x03af7ad9d5223cf7c8c13f20df67ebe5ffc5bb41\":\"0xad78ebc5ac6200000\",\"0x03b0f17cd4469ddccfb7da697e82a91a5f9e7774\":\"0x1158e460913d00000\",\"0x03b41b51f41df20dd279bae18c12775f77ad771c\":\"0x3635c9adc5dea00000\",\"0x03be5b4629aefbbcab9de26d39576cb7f691d764\":\"0xadf30ba70c8970000\",\"0x03c647a9f929b0781fe9ae01caa3e183e876777e\":\"0x182ab7c20ce5240000\",\"0x03c91d92943603e752203e05340e566013b90045\":\"0x2b7cc2e9c3225c0000\",\"0x03cb4c4f4516c4ff79a1b6244fbf572e1c7fea79\":\"0x9489237adb9a500000\",\"0x03cb98d7acd817de9d886d22fab3f1b57d92a608\":\"0x56bc75e2d631000000\",\"0x03cc9d2d21f86b84ac8ceaf971dba78a90e62570\":\"0x57473d05dabae80000\",\"0x03d1724fd00e54aabcd2de2a91e8462b1049dd3a\":\"0x8f1d5c1cae37400000\",\"0x03dedfcd0b3c2e17c705da248790ef98a6bd5751\":\"0x487a9a304539440000\",\"0x03e8b084537557e709eae2e1e1a5a6bce1ef8314\":\"0x1158e460913d00000\",\"0x03ea6d26d080e57aee3926b18e8ed73a4e5b2826\":\"0xad78ebc5ac6200000\",\"0x03eb3cb860f6028da554d344a2bb5a500ae8b86f\":\"0x6c6b935b8bbd400000\",\"0x03ebc63fda6660a465045e235fbe6e5cf195735f\":\"0x7b06ce87fdd680000\",\"0x03ef6ad20ff7bd4f002bac58d47544cf879ae728\":\"0x175c758d0b96e5c0000\",\"0x03f7b92008813ae0a676eb212814afab35221069\":\"0x6c6b935b8bbd400000\",\"0x041170f581de80e58b2a045c8f7c1493b001b7cb\":\"0x303c74a1a336940000\",\"0x0413d0cf78c001898a378b918cd6e498ea773c4d\":\"0xf2dc7d47f15600000\",\"0x04241b41ecbd0bfdf1295e9d4fa59ea09e6c6186\":\"0x655f769450bc780000\",\"0x043707071e2ae21eed977891dc79cd5d8ee1c2da\":\"0x6c6b935b8bbd400000\",\"0x044e853144e3364495e7a69fa1d46abea3ac0964\":\"0x2ab2254b1dc9a8000\",\"0x0455dcec8a7fc4461bfd7f37456fce3f4c3caac7\":\"0x15af1d78b58c400000\",\"0x045ed7f6d9ee9f252e073268db022c6326adfc5b\":\"0x56bc75e2d63100000\",\"0x046377f864b0143f282174a892a73d3ec8ec6132\":\"0xa5aa85009e39c0000\",\"0x0469e8c440450b0e512626fe817e6754a8152830\":\"0x6c6b935b8bbd400000\",\"0x046d274b1af615fb505a764ad8dda770b1db2f3d\":\"0x6c6b935b8bbd400000\",\"0x047d5a26d7ad8f8e70600f70a398ddaa1c2db26f\":\"0x14542ba12a337c00000\",\"0x047e87c8f7d1fce3b01353a85862a948ac049f3e\":\"0x50c5e761a444080000\",\"0x047f9bf1529daf87d407175e6f171b5e59e9ff3e\":\"0x233c8fe42703e80000\",\"0x04852732b4c652f6c2e58eb36587e60a62da14db\":\"0x43c33c1937564800000\",\"0x048a8970ea4145c64d5517b8de5b46d0595aad06\":\"0x43c33c1937564800000\",\"0x049c5d4bc6f25d4e456c697b52a07811ccd19fb1\":\"0x104400a2470e680000\",\"0x04a1cada1cc751082ff8da928e3cfa000820a9e9\":\"0x22b1c8c1227a00000\",\"0x04a80afad53ef1f84165cfd852b0fdf1b1c24ba8\":\"0x324e964b3eca80000\",\"0x04aafc8ae5ce6f4903c89d7fac9cb19512224777\":\"0x1b1ae4d6e2ef500000\",\"0x04ba4bb87140022c214a6fac42db5a16dd954045\":\"0x3635c9adc5dea00000\",\"0x04ba8a3f03f08b895095994dda619edaacee3e7a\":\"0x6c6b935b8bbd400000\",\"0x04c2c64bb54c3eccd05585e10ec6f99a0cdb01a3\":\"0x56bc75e2d63100000\",\"0x04ce45f600db18a9d0851b29d9393ebdaafe3dc5\":\"0x1158e460913d00000\",\"0x04d6b8d4da867407bb997749debbcdc0b358538a\":\"0x3635c9adc5dea00000\",\"0x04d73896cf6593a691972a13a6e4871ff2c42b13\":\"0x6c6b935b8bbd400000\",\"0x04d82af9e01a936d97f8f85940b970f9d4db9936\":\"0xad78ebc5ac6200000\",\"0x04e5f5bc7c923fd1e31735e72ef968fd67110c6e\":\"0x57551dbc8e624c0000\",\"0x04eca501630abce35218b174956b891ba25efb23\":\"0x36369ed7747d260000\",\"0x0505a08e22a109015a22f685305354662a5531d5\":\"0x8cf23f909c0fa00000\",\"0x0514954c3c2fb657f9a06f510ea22748f027cdd3\":\"0x15af1d78b58c400000\",\"0x051633080d07a557adde319261b074997f14692d\":\"0x13a6b2b564871a00000\",\"0x0517448dada761cc5ba4033ee881c83037036400\":\"0x6c4fd1ee246e780000\",\"0x051d424276b21239665186133d653bb8b1862f89\":\"0x3635c9adc5dea00000\",\"0x0521bc3a9f8711fecb10f50797d71083e341eb9d\":\"0x1158e460913d00000\",\"0x05236d4c90d065f9e3938358aaffd777b86aec49\":\"0x1b1ae4d6e2ef500000\",\"0x052a58e035f1fe9cdd169bcf20970345d12b9c51\":\"0x50c5e761a444080000\",\"0x052eab1f61b6d45517283f41d1441824878749d0\":\"0xd8d726b7177a800000\",\"0x05336e9a722728d963e7a1cf2759fd0274530fca\":\"0x31a2443f888a798000\",\"0x053471cd9a41925b3904a5a8ffca3659e034be23\":\"0xad201a6794ff80000\",\"0x05361d8eb6941d4e90fb7e1418a95a32d5257732\":\"0x1158e460913d00000\",\"0x05423a54c8d0f9707e704173d923b946edc8e700\":\"0x6ea03c2bf8ba58000\",\"0x05440c5b073b529b4829209dff88090e07c4f6f5\":\"0x45d29737e22f200000\",\"0x055ab658c6f0ed4f875ed6742e4bc7292d1abbf0\":\"0x486cb9799191e0000\",\"0x055bd02caf19d6202bbcdc836d187bd1c01cf261\":\"0x56bc75e2d63100000\",\"0x055eac4f1ad3f58f0bd024d68ea60dbe01c6afb3\":\"0x56bc75e2d63100000\",\"0x05665155cc49cbf6aabdd5ae92cbfaad82b8c0c1\":\"0x15af1d78b58c400000\",\"0x056686078fb6bcf9ba0a8a8dc63a906f5feac0ea\":\"0x1b181e4bf2343c0000\",\"0x05696b73916bd3033e05521e3211dfec026e98e4\":\"0x6c6b935b8bbd400000\",\"0x056b1546894f9a85e203fb336db569b16c25e04f\":\"0x92edb09ff08d88000\",\"0x057949e1ca0570469e4ce3c690ae613a6b01c559\":\"0xad78ebc5ac6200000\",\"0x057dd29f2d19aa3da42327ea50bce86ff5c911d9\":\"0xd8d726b7177a800000\",\"0x057f7f81cd7a406fc45994408b5049912c566463\":\"0x5c283d410394100000\",\"0x05915d4e225a668162aee7d6c25fcfc6ed18db03\":\"0x398c37279259e0000\",\"0x0596a27dc3ee115fce2f94b481bc207a9e261525\":\"0x3635c9adc5dea00000\",\"0x05a830724302bc0f6ebdaa1ebeeeb46e6ce00b39\":\"0x556f64c1fe7fa0000\",\"0x05ae7fd4bbcc80ca11a90a1ec7a301f7cccc83db\":\"0x3154c9729d05780000\",\"0x05bb64a916be66f460f5e3b64332110d209e19ae\":\"0xe3aeb5737240a00000\",\"0x05bf4fcfe772e45b826443852e6c351350ce72a2\":\"0x1b1ae4d6e2ef5000000\",\"0x05c64004a9a826e94e5e4ee267fa2a7632dd4e6f\":\"0x36dc42ebff90b7f8000\",\"0x05c736d365aa37b5c0be9c12c8ad5cd903c32cf9\":\"0x1455e7b800a86880000\",\"0x05cb6c3b0072d3116761b532b218443b53e8f6c5\":\"0x1e02c3d7fca9b6280000\",\"0x05d0f4d728ebe82e84bf597515ad41b60bf28b39\":\"0xe3aeb5737240a00000\",\"0x05d68dad61d3bbdfb3f779265c49474aff3fcd30\":\"0x222c55dc1519d8000\",\"0x05e671de55afec964b074de574d5158d5d21b0a3\":\"0xd5967be4fc3f100000\",\"0x05e97b09492cd68f63b12b892ed1d11d152c0eca\":\"0x3708baed3d68900000\",\"0x05f3631f5664bdad5d0132c8388d36d7d8920918\":\"0x1158e460913d00000\",\"0x0609d83a6ce1ffc9b690f3e9a81e983e8bdc4d9d\":\"0xed2b525841adfc00000\",\"0x061ea4877cd08944eb64c2966e9db8dedcfec06b\":\"0x3635c9adc5dea00000\",\"0x0625d06056968b002206ff91980140242bfaa499\":\"0x3635c9adc5dea00000\",\"0x0628bfbe5535782fb588406bc96660a49b011af5\":\"0x52663ccab1e1c00000\",\"0x0631d18bbbbd30d9e1732bf36edae2ce8901ab80\":\"0xa3f98855ec39900000\",\"0x0631dc40d74e5095e3729eddf49544ecd4396f67\":\"0x8ac7230489e800000\",\"0x063759dd1c4e362eb19398951ff9f8fad1d31068\":\"0x21e19e0c9bab2400000\",\"0x065ff575fd9c16d3cb6fd68ffc8f483fc32ec835\":\"0xad78ebc5ac6200000\",\"0x06618e9d5762df62028601a81d4487d6a0ecb80e\":\"0x487a9a304539440000\",\"0x066647cfc85d23d37605573d208ca154b244d76c\":\"0x21e19e0c9bab2400000\",\"0x0678654ac6761db904a2f7e8595ec1eaac734308\":\"0x2f98b29c2818f80000\",\"0x06860a93525955ff624940fadcffb8e149fd599c\":\"0x6c68ccd09b022c0000\",\"0x068ce8bd6e902a45cb83b51541b40f39c4469712\":\"0x11c0f9bad4a46e00000\",\"0x068e29b3f191c812a6393918f71ab933ae6847f2\":\"0x6c6acc67d7b1d40000\",\"0x068e655766b944fb263619658740b850c94afa31\":\"0x1e87f85809dc00000\",\"0x06964e2d17e9189f88a8203936b40ac96e533c06\":\"0xfc936392801c0000\",\"0x06994cd83aa2640a97b2600b41339d1e0d3ede6c\":\"0xd8d726b7177a80000\",\"0x069ed0ab7aa77de571f16106051d92afe195f2d0\":\"0xad78ebc5ac6200000\",\"0x06ac26ad92cb859bd5905ddce4266aa0ec50a9c5\":\"0x2a034919dfbfbc0000\",\"0x06b0c1e37f5a5ec4bbf50840548f9d3ac0288897\":\"0xd8d882e1928e7d0000\",\"0x06b0ff834073cce1cbc9ea557ea87b605963e8b4\":\"0x1043561a8829300000\",\"0x06b106649aa8c421ddcd1b8c32cd0418cf30da1f\":\"0x878678326eac9000000\",\"0x06b5ede6fdf1d6e9a34721379aeaa17c713dd82a\":\"0x6c6b935b8bbd400000\",\"0x06cbfa08cdd4fba737bac407be8224f4eef35828\":\"0x202be5e8382e8b8000\",\"0x06d6cb308481c336a6e1a225a912f6e6355940a1\":\"0x5f68e8131ecf800000\",\"0x06dc7f18cee7edab5b795337b1df6a9e8bd8ae59\":\"0x15af1d78b58c400000\",\"0x06f68de3d739db41121eacf779aada3de8762107\":\"0x18493fba64ef00000\",\"0x06f7dc8d1b9462cef6feb13368a7e3974b097f9f\":\"0x6c6b935b8bbd400000\",\"0x0701f9f147ec486856f5e1b71de9f117e99e2105\":\"0x965da717fd5b80000\",\"0x070d5d364cb7bbf822fc2ca91a35bdd441b215d5\":\"0x6c6b935b8bbd400000\",\"0x071dd90d14d41f4ff7c413c24238d3359cd61a07\":\"0x7b53f79e888dac00000\",\"0x0726c42e00f45404836eb1e280d073e7059687f5\":\"0x58003e3fb947a38000\",\"0x0727be0a2a00212048b5520fbefb953ebc9d54a0\":\"0x21e19e0c9bab2400000\",\"0x0729a8a4a5ba23f579d0025b1ad0f8a0d35cdfd2\":\"0x20dd68aaf3289100000\",\"0x0729b4b47c09eb16158464c8aa7fd9690b438839\":\"0x6c68ccd09b022c0000\",\"0x0734a0a81c9562f4d9e9e10a8503da15db46d76e\":\"0xfc936392801c0000\",\"0x073c67e09b5c713c5221c8a0c7f3f74466c347b0\":\"0x41bad155e6512200000\",\"0x073f1ed1c9c3e9c52a9b0249a5c1caa0571fdf05\":\"0x3d0ff0b013b800000\",\"0x0748713145ef83c3f0ef4d31d823786f7e9cc689\":\"0xf3f20b8dfa69d00000\",\"0x075d15e2d33d8b4fa7dba8b9e607f04a261e340b\":\"0x678a932062e4180000\",\"0x076561a856455d7ef86e63f87c73dbb628a55f45\":\"0x30ca024f987b900000\",\"0x076ee99d3548623a03b5f99859d2d785a1778d48\":\"0xad78ebc5ac6200000\",\"0x0770b43dbae4b1f35a927b4fa8124d3866caf97b\":\"0x37193ea7ef5b470000\",\"0x0770c61be78772230cb5a3bb2429a72614a0b336\":\"0x16ee0a299b713418000\",\"0x07723e3c30e8b731ee456a291ee0e798b0204a77\":\"0x6c6b935b8bbd400000\",\"0x0773eeacc050f74720b4a1bd57895b1cceeb495d\":\"0x21e19e0c9bab2400000\",\"0x07800d2f8068e448c79a4f69b1f15ef682aae5f6\":\"0x41bad155e6512200000\",\"0x07a8dadec142571a7d53a4297051786d072cba55\":\"0x13b6da1139bda8000\",\"0x07af938c1237a27c9030094dcf240750246e3d2c\":\"0x1b1ae4d6e2ef500000\",\"0x07b1a306cb4312df66482c2cae72d1e061400fcd\":\"0x43c33c1937564800000\",\"0x07b7a57033f8f11330e4665e185d234e83ec140b\":\"0xea7ee92a0c9a0b8000\",\"0x07bc2cc8eedc01970700efc9c4fb36735e98cd71\":\"0xd8d726b7177a800000\",\"0x07d41217badca5e0e60327d845a3464f0f27f84a\":\"0xd8d726b7177a800000\",\"0x07d4334ec385e8aa54eedaeadb30022f0cdfa4ab\":\"0x8e91d520f2eb790000\",\"0x07dae622630d1136381933d2ad6b22b839d82102\":\"0xad78ebc5ac6200000\",\"0x07dc2bf83bc6af19a842ffea661af5b41b67fda1\":\"0x5150ae84a8cdf00000\",\"0x07dc8c8b927adbedfa8f5d639b4352351f2f36d2\":\"0x110aed3b5530db0000\",\"0x07ddd0422c86ef65bf0c7fc3452862b1228b08b8\":\"0x6ff5d2aa8f9fcf0000\",\"0x07e1162ceae3cf21a3f62d105990302e307f4e3b\":\"0x52f103edb66ba80000\",\"0x07e2b4cdeed9d087b12e556d9e770c13c099615f\":\"0x243d4d18229ca20000\",\"0x07feef54c136850829badc4b49c3f2a73c89fb9e\":\"0x6685ac1bfe32c0000\",\"0x080546508a3d2682c8b9884f13637b8847b44db3\":\"0x6c6b935b8bbd400000\",\"0x08090876baadfee65c3d363ba55312748cfa873d\":\"0x5c2a99371cffe10000\",\"0x08166f02313feae18bb044e7877c808b55b5bf58\":\"0x6acb3df27e1f880000\",\"0x0829d0f7bb7c446cfbb0deadb2394d9db7249a87\":\"0x22ca3587cf4eb0000\",\"0x08306de51981e7aca1856859b7c778696a6b69f9\":\"0xad78ebc5ac62000000\",\"0x0837539b5f6a522a482cdcd3a9bb7043af39bdd2\":\"0x14542ba12a337c00000\",\"0x0838a7768d9c2aca8ba279adfee4b1f491e326f1\":\"0xad78ebc5ac6200000\",\"0x08411652c871713609af0062a8a1281bf1bbcfd9\":\"0x4be4e7267b6ae00000\",\"0x084d103254759b343cb2b9c2d8ff9e1ac5f14596\":\"0x19bff2ff57968c00000\",\"0x08504f05643fab5919f5eea55925d7a3ed7d807a\":\"0x1158e460913d00000\",\"0x085b4ab75d8362d914435cedee1daa2b1ee1a23b\":\"0xd255d112e103a00000\",\"0x085ba65febe23eefc2c802666ab1262382cfc494\":\"0x15af1d78b58c400000\",\"0x087498c0464668f31150f4d3c4bcdda5221ba102\":\"0x1158e460913d00000\",\"0x0877eeaeab78d5c00e83c32b2d98fa79ad51482f\":\"0x17d22d71da62260000\",\"0x08936a37df85b3a158cafd9de021f58137681347\":\"0xfc936392801c0000\",\"0x08a9a44e1f41de3dbba7a363a3ab412c124cd15e\":\"0xad78ebc5ac6200000\",\"0x08b7bdcf944d5570838be70460243a8694485858\":\"0x6c6b935b8bbd400000\",\"0x08b84536b74c8c01543da88b84d78bb95747d822\":\"0xad78ebc5ac6200000\",\"0x08c2f236ac4adcd3fda9fbc6e4532253f9da3bec\":\"0x1158e460913d00000\",\"0x08c802f87758349fa03e6bc2e2fd0791197eea9a\":\"0x6c6b935b8bbd400000\",\"0x08c9f1bfb689fdf804d769f82123360215aff93b\":\"0x6acb3df27e1f880000\",\"0x08cac8952641d8fc526ec1ab4f2df826a5e7710f\":\"0x1043561a8829300000\",\"0x08ccda50e4b26a0ffc0ef92e9205310706bec2c7\":\"0x149756c3857c6000000\",\"0x08d0864dc32f9acb36bf4ea447e8dd6726906a15\":\"0x6c6e59e67c78540000\",\"0x08d4267feb15da9700f7ccc3c84a8918bf17cfde\":\"0x61093d7c2c6d380000\",\"0x08d4311c9c1bbaf87fabe1a1d01463828d5d98ce\":\"0x130ee8e7179044400000\",\"0x08d54e83ad486a934cfaeae283a33efd227c0e99\":\"0x38530583245edc0000\",\"0x08d97eadfcb7b064e1ccd9c8979fbee5e77a9719\":\"0xe6c5da8d67ac18000\",\"0x08da3a7a0f452161cfbcec311bb68ebfdee17e88\":\"0x6c6b935b8bbd400000\",\"0x08e38ee0ce48c9ca645c1019f73b5355581c56e6\":\"0x56bc75e2d631000000\",\"0x08ef3fa4c43ccdc57b22a4b9b2331a82e53818f2\":\"0xd8d726b7177a800000\",\"0x0909648c18a3ce5bae7a047ec2f868d24cdda81d\":\"0xcf152640c5c8300000\",\"0x090cd67b60e81d54e7b5f6078f3e021ba65b9a1e\":\"0x3635c9adc5dea00000\",\"0x090cebef292c3eb081a05fd8aaf7d39bf07b89d4\":\"0xd8d726b7177a800000\",\"0x090fa9367bda57d0d3253a0a8ff76ce0b8e19a73\":\"0x3635c9adc5dea00000\",\"0x09146ea3885176f07782e1fe30dce3ce24c49e1f\":\"0x1158e460913d00000\",\"0x0921605f99164e3bcc28f31caece78973182561d\":\"0x2b07692a9065a80000\",\"0x09261f9acb451c3788844f0c1451a35bad5098e3\":\"0x1d5ad27502920600000\",\"0x0927220492194b2eda9fc4bbe38f25d681dfd36c\":\"0x14542ba12a337c00000\",\"0x092acb624b08c05510189bbbe21e6524d644ccad\":\"0xfc936392801c0000\",\"0x092e815558402d67f90d6bfe6da0b2fffa91455a\":\"0x340aad21b3b700000\",\"0x095030e4b82692dcf8b8d0912494b9b378ec9328\":\"0x48a43c54602f700000\",\"0x095270cc42141dd998ad2862dbd1fe9b44e7e650\":\"0x410d586a20a4c00000\",\"0x095457f8ef8e2bdc362196b9a9125da09c67e3ab\":\"0xad78ebc5ac6200000\",\"0x0954a8cb5d321fc3351a7523a617d0f58da676a7\":\"0x87d9bc7aa498e80000\",\"0x095b0ea2b218d82e0aea7c2889238a39c9bf9077\":\"0x43c33c1937564800000\",\"0x095b949de3333a377d5019d893754a5e4656ff97\":\"0x126e72a69a50d00000\",\"0x095e0174829f34c3781be1a5e38d1541ea439b7f\":\"0x14542ba12a337c00000\",\"0x095f5a51d06f6340d80b6d29ea2e88118ad730fe\":\"0x6c6e59e67c78540000\",\"0x0968ee5a378f8cadb3bafdbed1d19aaacf936711\":\"0x3635c9adc5dea00000\",\"0x0977bfba038a44fb49b03970d8d8cf2cb61f8b25\":\"0x16c4abbebea0100000\",\"0x097da12cfc1f7c1a2464def08c29bed5e2f851e9\":\"0x1158e460913d00000\",\"0x097ecda22567c2d91cb03f8c5215c22e9dcda949\":\"0x11651ac3e7a758000\",\"0x0989c200440b878991b69d6095dfe69e33a22e70\":\"0x678a932062e4180000\",\"0x0990e81cd785599ea236bd1966cf526302c35b9c\":\"0x3635c9adc5dea00000\",\"0x0998d8273115b56af43c505e087aff0676ed3659\":\"0xd8d6eddf2d2e180000\",\"0x09a025316f967fa8b9a1d60700063f5a68001caa\":\"0x21221a99b93ec0000\",\"0x09a928d528ec1b3e25ffc83e218c1e0afe8928c7\":\"0xfc936392801c0000\",\"0x09ae49e37f121df5dc158cfde806f173a06b0c7f\":\"0xd8309e26aba1d00000\",\"0x09afa73bc047ef46b977fd9763f87286a6be68c6\":\"0x1b2fb5e8f06a660000\",\"0x09b4668696f86a080f8bebb91db8e6f87015915a\":\"0x238ff7b34f60010000\",\"0x09b59b8698a7fbd3d2f8c73a008988de3e406b2b\":\"0x878678326eac9000000\",\"0x09b7a988d13ff89186736f03fdf46175b53d16e0\":\"0x14542ba12a337c00000\",\"0x09c177f1ae442411ddacf187d46db956148360e7\":\"0x1e52e336cde22180000\",\"0x09c88f917e4d6ad473fa12e98ea3c4472a5ed6da\":\"0x21e19e0c9bab2400000\",\"0x09d0b8cd077c69d9f32d9cca43b3c208a21ed48b\":\"0x821d221b5291f8000\",\"0x09d6cefd75b0c4b3f8f1d687a522c96123f1f539\":\"0x14542ba12a337c00000\",\"0x09e437d448861228a232b62ee8d37965a904ed9c\":\"0x498cf401df8842e8000\",\"0x09ee12b1b42b05af9cf207d5fcac255b2ec411f2\":\"0x331cddd47e0fe8000\",\"0x09f3f601f605441140586ce0656fa24aa5b1d9ae\":\"0x5373776fe8c4540000\",\"0x09f9575be57d004793c7a4eb84b71587f97cbb6a\":\"0xad78ebc5ac6200000\",\"0x0a0650861f785ed8e4bf1005c450bbd06eb48fb6\":\"0xa6413b79144e7e0000\",\"0x0a06fad7dcd7a492cbc053eeabde6934b39d8637\":\"0x1158e460913d00000\",\"0x0a077db13ffeb09484c217709d5886b8bf9c5a8b\":\"0xd8d726b7177a800000\",\"0x0a0ecda6636f7716ef1973614687fd89a820a706\":\"0x155bd9307f9fe80000\",\"0x0a29a8a4d5fd950075ffb34d77afeb2d823bd689\":\"0xad78ebc5ac6200000\",\"0x0a2ade95b2e8c66d8ae6f0ba64ca57d783be6d44\":\"0xd8d726b7177a800000\",\"0x0a2b4fc5d81ace67dc4bba03f7b455413d46fe3d\":\"0xaadec983fcff40000\",\"0x0a2dcb7a671701dbb8f495728088265873356c8e\":\"0x83f16ce08a06c0000\",\"0x0a3de155d5ecd8e81c1ff9bbf0378301f8d4c623\":\"0xd8d726b7177a800000\",\"0x0a47ad9059a249fc936b2662353da6905f75c2b9\":\"0x6c6b935b8bbd400000\",\"0x0a48296f7631708c95d2b74975bc4ab88ac1392a\":\"0x10f0cf064dd59200000\",\"0x0a4a011995c681bc999fdd79754e9a324ae3b379\":\"0x8c19ab06eb89af60000\",\"0x0a58fddd71898de773a74fdae45e7bd84ef43646\":\"0x1158e460913d00000\",\"0x0a5b79d8f23b6483dbe2bdaa62b1064cc76366ae\":\"0x6ac882100952c78000\",\"0x0a652e2a8b77bd97a790d0e91361c98890dbb04e\":\"0x3635c9adc5dea00000\",\"0x0a6ebe723b6ed1f9a86a69ddda68dc47465c2b1b\":\"0x403d2db599d5e40000\",\"0x0a77e7f72b437b574f00128b21f2ac265133528c\":\"0x6c6b935b8bbd400000\",\"0x0a917f3b5cb0b883047fd9b6593dbcd557f453b9\":\"0x3635c9adc5dea00000\",\"0x0a931b449ea8f12cdbd5e2c8cc76bad2c27c0639\":\"0x13f9e8c79fe058000\",\"0x0a9804137803ba6868d93a55f9985fcd540451e4\":\"0xb98bc829a6f90000\",\"0x0a9ab2638b1cfd654d25dab018a0aebddf85fd55\":\"0x12e8cb5fe4c4a8000\",\"0x0ab366e6e7d5abbce6b44a438d69a1cabb90d133\":\"0x1158e460913d000000\",\"0x0ab4281ebb318590abb89a81df07fa3af904258a\":\"0x1b1ae4d6e2ef500000\",\"0x0ab59d390702c9c059db148eb4f3fcfa7d04c7e7\":\"0xfc936392801c0000\",\"0x0abfb39b11486d79572866195ba26c630b6784db\":\"0x19ba8737f96928f00000\",\"0x0aca9a5626913b08cfc9a66d40508dce52b60f87\":\"0x678a932062e4180000\",\"0x0ad3e44d3c001fa290b393617030544108ac6eb9\":\"0x6abda0bc30b2df8000\",\"0x0aec2e426ed6cc0cf3c249c1897eac47a7faa9bd\":\"0xad78ebc5ac6200000\",\"0x0af65f14784e55a6f95667fd73252a1c94072d2a\":\"0xa763b8e02d44f8000\",\"0x0af6c8d539c96d50259e1ba6719e9c8060f388c2\":\"0x3635c9adc5dea00000\",\"0x0b06390f2437b20ec4a3d3431b3279c6583e5ed7\":\"0xa844a7424d9c80000\",\"0x0b0b3862112aeec3a03492b1b05f440eca54256e\":\"0xd8d726b7177a800000\",\"0x0b0e055b28cbd03dc5ff44aa64f3dce04f5e63fb\":\"0x6c6b935b8bbd400000\",\"0x0b119df99c6b8de58a1e2c3f297a6744bf552277\":\"0x6c6b935b8bbd400000\",\"0x0b14891999a65c9ef73308efe3100ca1b20e8192\":\"0x2b5e3af16b18800000\",\"0x0b2113504534642a1daf102eee10b9ebde76e261\":\"0x942cdd7c95f2bd8000\",\"0x0b288a5a8b75f3dc4191eb0457e1c83dbd204d25\":\"0x10714e77bb43ab40000\",\"0x0b369e002e1b4c7913fcf00f2d5e19c58165478f\":\"0x37f6516288c340000\",\"0x0b43bd2391025581d8956ce42a072579cbbfcb14\":\"0x104e70464b1580000\",\"0x0b507cf553568daaf65504ae4eaa17a8ea3cdbf5\":\"0x6c6b935b8bbd400000\",\"0x0b5d66b13c87b392e94d91d5f76c0d450a552843\":\"0x6c6b935b8bbd400000\",\"0x0b5e2011ebc25a007f21362960498afb8af280fb\":\"0x6c6b935b8bbd400000\",\"0x0b649da3b96a102cdc6db652a0c07d65b1e443e6\":\"0x6c6b935b8bbd400000\",\"0x0b6920a64b363b8d5d90802494cf564b547c430d\":\"0x410d586a20a4c00000\",\"0x0b701101a4109f9cb360dc57b77442673d5e5983\":\"0x6c6b935b8bbd400000\",\"0x0b71f554122469ef978e2f1fefd7cbb410982772\":\"0xd255d112e103a00000\",\"0x0b7bb342f01bc9888e6a9af4a887cbf4c2dd2caf\":\"0x3635c9adc5dea000000\",\"0x0b7d339371e5be6727e6e331b5821fa24bdb9d5a\":\"0x2e7f81868262010000\",\"0x0b7fc9ddf70576f6330669eaaa71b6a831e99528\":\"0x796e3ea3f8ab00000\",\"0x0b80fc70282cbdd5fde35bf78984db3bdb120188\":\"0x3638021cecdab00000\",\"0x0b924df007e9c0878417cfe63b976ea1a382a897\":\"0x22b1c8c1227a00000\",\"0x0b93fca4a4f09cac20db60e065edcccc11e0a5b6\":\"0xad78ebc5ac6200000\",\"0x0b9df80fbe232009dacf0aa8cac59376e2476203\":\"0x6c6b935b8bbd400000\",\"0x0ba6e46af25a13f57169255a34a4dac7ce12be04\":\"0x1b1ae4d6e2ef500000\",\"0x0ba8705bf55cf219c0956b5e3fc01c4474a6cdc1\":\"0x525e0595d4d6b8000\",\"0x0baf6ecdb91acb3606a8357c0bc4f45cfd2d7e6f\":\"0x3635c9adc5dea00000\",\"0x0bb05f7224bb5804856556c07eeadbed87ba8f7c\":\"0x15be6174e1912e0000\",\"0x0bb0c12682a2f15c9b5741b2385cbe41f034068e\":\"0x5150ae84a8cdf00000\",\"0x0bb25ca7d188e71e4d693d7b170717d6f8f0a70a\":\"0x124302a82fadd70000\",\"0x0bb2650ea01aca755bc0c017b64b1ab5a66d82e3\":\"0x487a9a304539440000\",\"0x0bb54c72fd6610bfa4363397e020384b022b0c49\":\"0x487a9a304539440000\",\"0x0bb7160aba293762f8734f3e0326ffc9a4cac190\":\"0x3635c9adc5dea00000\",\"0x0bc95cb32dbb574c832fa8174a81356d38bc92ac\":\"0x6c6b935b8bbd400000\",\"0x0bd67dbde07a856ebd893b5edc4f3a5be4202616\":\"0x6c6b935b8bbd400000\",\"0x0bdbc54cc8bdbbb402a08911e2232a5460ce866b\":\"0xa2a15d09519be00000\",\"0x0bdd58b96e7c916dd2fb30356f2aebfaaf1d8630\":\"0x6c6b935b8bbd400000\",\"0x0be1bcb90343fae5303173f461bd914a4839056c\":\"0x14542ba12a337c00000\",\"0x0be1fdf626ee6189102d70d13b31012c95cd1cd6\":\"0x6c6b935b8bbd400000\",\"0x0be2b94ad950a2a62640c35bfccd6c67dae450f6\":\"0x692ae8897081d00000\",\"0x0be6a09e4307fe48d412b8d1a1a8284dce486261\":\"0x40fbff85c0138300000\",\"0x0befb54707f61b2c9fb04715ab026e1bb72042bd\":\"0xd8d726b7177a800000\",\"0x0bf064428f83626722a7b5b26a9ab20421a7723e\":\"0x73f75d1a085ba0000\",\"0x0bfbb6925dc75e52cf2684224bbe0550fea685d3\":\"0x6acb3df27e1f880000\",\"0x0c088006c64b30c4ddafbc36cb5f05469eb62834\":\"0x6c6b935b8bbd400000\",\"0x0c2073ba44d3ddbdb639c04e191039a71716237f\":\"0x4d853c8f8908980000\",\"0x0c222c7c41c9b048efcce0a232434362e12d673b\":\"0x21e8359697677380000\",\"0x0c2808b951ed9e872d7b32790fcc5994ae41ffdc\":\"0x15996e5b3cd6b3c00000\",\"0x0c28847e4f09dfce5f9b25af7c4e530f59c880fe\":\"0x3635c9adc5dea00000\",\"0x0c2d5c920538e953caaf24f0737f554cc6927742\":\"0x3635c9adc5dea00000\",\"0x0c30cacc3f72269f8b4f04cf073d2b05a83d9ad1\":\"0x6c7974123f64a40000\",\"0x0c3239e2e841242db989a61518c22247e8c55208\":\"0xe4af6471734640000\",\"0x0c480de9f7461002908b49f60fc61e2b62d3140b\":\"0x21e19e0c9bab2400000\",\"0x0c48ae62d1539788eba013d75ea60b64eeba4e80\":\"0x77fbdc43e030998000\",\"0x0c5589a7a89b9ad15b02751930415948a875fbef\":\"0x6d499ec6c63380000\",\"0x0c67033dd8ee7f0c8ae534d42a51f7d9d4f7978f\":\"0xad78ebc5ac6200000\",\"0x0c6845bf41d5ee273c3ee6b5b0d69f6fd5eabbf7\":\"0xa2a1b9682e58090000\",\"0x0c7f869f8e90d53fdc03e8b2819b016b9d18eb26\":\"0x43c33c1937564800000\",\"0x0c8692eeff2a53d6d1688ed56a9ddbbd68dabba1\":\"0x6c6b935b8bbd400000\",\"0x0c8f66c6017bce5b20347204b602b743bad78d60\":\"0x6c6b935b8bbd400000\",\"0x0c8fd7775e54a6d9c9a3bf890e761f6577693ff0\":\"0x215f835bc769da80000\",\"0x0c925ad5eb352c8ef76d0c222d115b0791b962a1\":\"0xac635d7fa34e300000\",\"0x0c967e3061b87a753e84507eb60986782c8f3013\":\"0x56bc75e2d63100000\",\"0x0ca12ab0b9666cf0cec6671a15292f2653476ab2\":\"0x2c7827c42d22d07c0000\",\"0x0ca670eb2c8b96cba379217f5929c2b892f39ef6\":\"0x6c6b935b8bbd400000\",\"0x0cae108e6db99b9e637876b064c6303eda8a65c8\":\"0xa2a15d09519be00000\",\"0x0cbd921dbe121563b98a6871fecb14f1cc7e88d7\":\"0xad78ebc5ac6200000\",\"0x0cbf8770f0d1082e5c20c5aead34e5fca9ae7ae2\":\"0x3635c9adc5dea00000\",\"0x0cc67f8273e1bae0867fd42e8b8193d72679dbf8\":\"0x1b1ae4d6e2ef500000\",\"0x0cd6a141918d126b106d9f2ebf69e102de4d3277\":\"0x1158e460913d00000\",\"0x0cda12bf72d461bbc479eb92e6491d057e6b5ad1\":\"0x21e19e0c9bab2400000\",\"0x0cdc960b998c141998160dc179b36c15d28470ed\":\"0x1b1b6bd7af64c70000\",\"0x0cfb172335b16c87d519cd1475530d20577f5e0e\":\"0x152d02c7e14af6800000\",\"0x0d1f2a57713ebc6e94de29846e8844d376665763\":\"0x10f0cf064dd59200000\",\"0x0d3265d3e7bdb93d5e8e8b1ca47f210a793ecc8e\":\"0xad78ebc5ac6200000\",\"0x0d35408f226566116fb8acdaa9e2c9d59b76683f\":\"0x32f51edbaaa3300000\",\"0x0d551ec1a2133c981d5fc6a8c8173f9e7c4f47af\":\"0x6c6b935b8bbd400000\",\"0x0d5d98565c647ca5f177a2adb9d3022fac287f21\":\"0xad78ebc5ac6200000\",\"0x0d658014a199061cf6b39433140303c20ffd4e5a\":\"0x1bc85dc2a89bb200000\",\"0x0d678706d037187f3e22e6f69b99a592d11ebc59\":\"0x55a6e79ccd1d300000\",\"0x0d69100c395ce6c5eaadf95d05d872837ededd21\":\"0x15af1d78b58c400000\",\"0x0d747ee5969bf79d57381d6fe3a2406cd0d8ce27\":\"0x152d02c7e14af6800000\",\"0x0d8023929d917234ae40512b1aabb5e8a4512771\":\"0x805e99fdcc5d00000\",\"0x0d8aab8f74ea862cdf766805009d3f3e42d8d00b\":\"0x13b80b99c5185700000\",\"0x0d8c40a79e18994ff99ec251ee10d088c3912e80\":\"0x63664fcd2bbc40000\",\"0x0d8ed7d0d15638330ed7e4eaccab8a458d75737e\":\"0x6c6b935b8bbd400000\",\"0x0d92582fdba05eabc3e51538c56db8813785b328\":\"0xa5aa85009e39c0000\",\"0x0d9443a79468a5bbf7c13c6e225d1de91aee07df\":\"0x3cb71f51fc5580000\",\"0x0d9a825ff2bcd397cbad5b711d9dcc95f1cc112d\":\"0x2b5e3af16b188000000\",\"0x0d9d3f9bc4a4c6efbd59679b69826bc1f63d9916\":\"0x2086ac351052600000\",\"0x0da532c910e3ac0dfb14db61cd739a93353fd05f\":\"0x4878be1ffaf95d0000\",\"0x0da7401262384e2e8b4b26dd154799b55145efa0\":\"0x1043561a8829300000\",\"0x0dae3ee5b915b36487f9161f19846d101433318a\":\"0x678a932062e4180000\",\"0x0dbd417c372b8b0d01bcd944706bd32e60ae28d1\":\"0x126e72a69a50d00000\",\"0x0dc100b107011c7fc0a1339612a16ccec3285208\":\"0x6c6b935b8bbd400000\",\"0x0dcf9d8c9804459f647c14138ed50fad563b4154\":\"0x960db77681e940000\",\"0x0dcfe837ea1cf28c65fccec3bef1f84e59d150c0\":\"0xad78ebc5ac6200000\",\"0x0dd4e674bbadb1b0dc824498713dce3b5156da29\":\"0x93739534d28680000\",\"0x0dfbd4817050d91d9d625c02053cf61a3ee28572\":\"0x126e72a69a50d00000\",\"0x0e024e7f029c6aaf3a8b910f5e080873b85795aa\":\"0x3635c9adc5dea00000\",\"0x0e09646c99af438e99fa274cb2f9c856cb65f736\":\"0x678a932062e4180000\",\"0x0e0c9d005ea016c295cd795cc9213e87febc33eb\":\"0xabbcd4ef377580000\",\"0x0e0d6633db1e0c7f234a6df163a10e0ab39c200f\":\"0xad78ebc5ac6200000\",\"0x0e11d77a8977fac30d268445e531149b31541a24\":\"0x6c6b935b8bbd400000\",\"0x0e123d7da6d1e6fac2dcadd27029240bb39052fe\":\"0x3635c9adc5dea00000\",\"0x0e1801e70b6262861b1134ccbc391f568afc92f7\":\"0xd8d726b7177a800000\",\"0x0e2094ac1654a46ba1c4d3a40bb8c17da7f39688\":\"0x13683f7f3c15d80000\",\"0x0e21af1b8dbf27fcf63f37e047b87a825cbe7c27\":\"0xa2a15d09519be00000\",\"0x0e2e504a2d1122b5a9feee5cb1451bf4c2ace87b\":\"0xd5967be4fc3f100000\",\"0x0e2f8e28a681f77c583bd0ecde16634bdd7e00cd\":\"0x52738f659bca20000\",\"0x0e320219838e859b2f9f18b72e3d4073ca50b37d\":\"0x6c6b935b8bbd400000\",\"0x0e33fcbbc003510be35785b52a9c5d216bc005f4\":\"0x65ea3db75546600000\",\"0x0e3696cf1f4217b163d1bc12a5ea730f1c32a14a\":\"0xd8d726b7177a800000\",\"0x0e390f44053ddfcef0d608b35e4d9c2cbe9871bb\":\"0x6acb3df27e1f880000\",\"0x0e3a28c1dfafb0505bdce19fe025f506a6d01ceb\":\"0x6c6b935b8bbd400000\",\"0x0e3dd7d4e429fe3930a6414035f52bdc599d784d\":\"0x22ca3587cf4eb0000\",\"0x0e4765790352656bc656682c24fc5ef3e76a23c7\":\"0x286d7fc0cb4f50000\",\"0x0e498800447177b8c8afc3fdfa7f69f4051bb629\":\"0x7405b69b8de5610000\",\"0x0e6baaa3deb989f289620076668618e9ac332865\":\"0xad78ebc5ac6200000\",\"0x0e6cd664ad9c1ed64bf98749f40644b626e3792c\":\"0xcb49b44ba602d800000\",\"0x0e6dfd553b2e873d2aec15bd5fbb3f8472d8d394\":\"0x28a857425466f800000\",\"0x0e6ec313376271dff55423ab5422cc3a8b06b22b\":\"0xd8d726b7177a800000\",\"0x0e6ece99111cad1961c748ed3df51edd69d2a3b1\":\"0x152d02c7e14af6800000\",\"0x0e83b850481ab44d49e0a229a2e464902c69539b\":\"0x56bc75e2d63100000\",\"0x0e89eddd3fa0d71d8ab0ff8da5580686e3d4f74f\":\"0x6c6b935b8bbd400000\",\"0x0e9096d343c060db581a120112b278607ec6e52b\":\"0x1158e460913d00000\",\"0x0e9c511864a177f49be78202773f60489fe04e52\":\"0x14542ba12a337c00000\",\"0x0ea2a210312b3e867ee0d1cc682ce1d666f18ed5\":\"0x21e19e0c9bab2400000\",\"0x0eb189ef2c2d5762a963d6b7bdf9698ea8e7b48a\":\"0x487a9a304539440000\",\"0x0eb5b662a1c718608fd52f0c25f9378830178519\":\"0x14a37281a612e740000\",\"0x0ec46696ffac1f58005fa8439824f08eed1df89b\":\"0x21e19e0c9bab2400000\",\"0x0ec50aa823f465b9464b0bc0c4a57724a555f5d6\":\"0xc83d1426ac7b1f00000\",\"0x0ec5308b31282e218fc9e759d4fec5db3708cec4\":\"0x3643aa647986040000\",\"0x0eccf617844fd61fba62cb0e445b7ac68bcc1fbe\":\"0x14fe4fe63565c60000\",\"0x0ed3bb3a4eb554cfca97947d575507cdfd6d21d8\":\"0x1db3205fcc23d58000\",\"0x0ed76c2c3b5d50ff8fb50b3eeacd681590be1c2d\":\"0x56bc75e2d63100000\",\"0x0eda80f4ed074aea697aeddf283b63dbca3dc4da\":\"0x6c6b935b8bbd400000\",\"0x0edd4b580ff10fe06c4a03116239ef96622bae35\":\"0xaadec983fcff40000\",\"0x0ee391f03c765b11d69026fd1ab35395dc3802a0\":\"0xad78ebc5ac6200000\",\"0x0ee414940487fd24e390378285c5d7b9334d8b65\":\"0x914878a8c05ee00000\",\"0x0ef54ac7264d2254abbb5f8b41adde875157db7c\":\"0x22b1c8c1227a00000\",\"0x0ef85b49d08a75198692914eddb4b22cf5fa4450\":\"0x6cae30621d47200000\",\"0x0efd1789eb1244a3dede0f5de582d8963cb1f39f\":\"0x5150ae84a8cdf00000\",\"0x0f042c9c2fb18766f836bb59f735f27dc329fe3c\":\"0x21e19e0c9bab2400000\",\"0x0f049a8bdfd761de8ec02cee2829c4005b23c06b\":\"0xda933d8d8c6700000\",\"0x0f05f120c89e9fbc93d4ab0c5e2b4a0df092b424\":\"0x65a4da25d3016c00000\",\"0x0f127bbf8e311caea2ba502a33feced3f730ba42\":\"0xa31062beeed700000\",\"0x0f1c249cd962b00fd114a9349f6a6cc778d76c4d\":\"0x6c6b935b8bbd400000\",\"0x0f206e1a1da7207ea518b112418baa8b06260328\":\"0x2086ac351052600000\",\"0x0f24105abbdaa03fa6309ef6c188e51f714a6e59\":\"0xad78ebc5ac6200000\",\"0x0f26480a150961b8e30750713a94ee6f2e47fc00\":\"0x3635c9adc5dea00000\",\"0x0f2d8daf04b5414a0261f549ff6477b80f2f1d07\":\"0x2a5a058fc295ed000000\",\"0x0f2fb884c8aaff6f543ac6228bd08e4f60b0a5fd\":\"0xaa7da485136b840000\",\"0x0f32d9cb4d0fdaa0150656bb608dcc43ed7d9301\":\"0x28df8bf440db790000\",\"0x0f3665d48e9f1419cd984fc7fa92788710c8f2e4\":\"0x6c6b935b8bbd400000\",\"0x0f3a1023cac04dbf44f5a5fa6a9cf8508cd4fddf\":\"0x62a992e53a0af00000\",\"0x0f4073c1b99df60a1549d69789c7318d9403a814\":\"0x43c33c1937564800000\",\"0x0f46c81db780c1674ac73d314f06539ee56ebc83\":\"0x215f835bc769da80000\",\"0x0f4f94b9191bb7bb556aaad7c74ddb288417a50b\":\"0x4be4e7267b6ae00000\",\"0x0f6000de1578619320aba5e392706b131fb1de6f\":\"0x1b1ab319f5ec750000\",\"0x0f6e840a3f2a24647d8e43e09d45c7c335df4248\":\"0x878678326eac900000\",\"0x0f7515ff0e808f695e0c20485ff96ed2f7b79310\":\"0x3638221660a5aa8000\",\"0x0f789e30397c53bf256fc364e6ef39f853504114\":\"0xc55325ca7415e00000\",\"0x0f7b61c59b016322e8226cafaee9d9e76d50a1b3\":\"0xd8d726b7177a800000\",\"0x0f7bea4ef3f73ae0233df1e100718cbe29310bb0\":\"0x6c6b935b8bbd400000\",\"0x0f7bf6373f771a4601762c4dae5fbbf4fedd9cc9\":\"0x6c6b935b8bbd400000\",\"0x0f832a93df9d7f74cd0fb8546b7198bf5377d925\":\"0x7c0860e5a80dc0000\",\"0x0f83461ba224bb1e8fdd9dae535172b735acb4e0\":\"0xad78ebc5ac6200000\",\"0x0f85e42b1df321a4b3e835b50c00b06173968436\":\"0x35659ef93f0fc40000\",\"0x0f88aac9346cb0e7347fba70905475ba8b3e5ece\":\"0x21e19e0c9bab2400000\",\"0x0f929cf895db017af79f3ead2216b1bd69c37dc7\":\"0x6c6b935b8bbd400000\",\"0x0fa010ce0c731d3b628e36b91f571300e49dbeab\":\"0x36330322d5238c0000\",\"0x0fa5d8c5b3f294efd495ab69d768f81872508548\":\"0x6c6b935b8bbd400000\",\"0x0fa6c7b0973d0bae2940540e247d3627e37ca347\":\"0x3635c9adc5dea00000\",\"0x0fad05507cdc8f24b2be4cb7fa5d927ddb911b88\":\"0xa2df13f441f0098000\",\"0x0fb5d2c673bfb1ddca141b9894fd6d3f05da6720\":\"0x56bc75e2d63100000\",\"0x0fc9a0e34145fbfdd2c9d2a499b617d7a02969b9\":\"0x9c2007651b2500000\",\"0x0fcfc4065008cfd323305f6286b57a4dd7eee23b\":\"0x43c33c1937564800000\",\"0x0fdd65402395df9bd19fee4507ef5345f745104c\":\"0x10f0cf064dd59200000\",\"0x0fec4ee0d7ca180290b6bd20f9992342f60ff68d\":\"0x12207f0edce9718000\",\"0x0fee81ac331efd8f81161c57382bb4507bb9ebec\":\"0x15af880d8cdb830000\",\"0x0ffea06d7113fb6aec2869f4a9dfb09007facef4\":\"0xc384681b1e1740000\",\"0x10097198b4e7ee91ff82cc2f3bd95fed73c540c0\":\"0x6c6b935b8bbd400000\",\"0x100b4d0977fcbad4debd5e64a0497aeae5168fab\":\"0x110c9073b5245a0000\",\"0x101a0a64f9afcc448a8a130d4dfcbee89537d854\":\"0x337fe5feaf2d1800000\",\"0x102c477d69aadba9a0b0f62b7459e17fbb1c1561\":\"0x6c6b935b8bbd400000\",\"0x1031e0ecb54985ae21af1793950dc811888fde7c\":\"0x1158e460913d00000\",\"0x10346414bec6d3dcc44e50e54d54c2b8c3734e3e\":\"0xd8d726b7177a800000\",\"0x10389858b800e8c0ec32f51ed61a355946cc409b\":\"0xad78ebc5ac6200000\",\"0x1059cbc63e36c43e88f30008aca7ce058eeaa096\":\"0x152d02c7e14af6800000\",\"0x106ed5c719b5261477890425ae7551dc59bd255c\":\"0x2896a58c95be5880000\",\"0x10711c3dda32317885f0a2fd8ae92e82069b0d0b\":\"0xd8d726b7177a800000\",\"0x107379d4c467464f235bc18e55938aad3e688ad7\":\"0x2b5e3af16b1880000\",\"0x1076212d4f758c8ec7121c1c7d74254926459284\":\"0x7695b59b5c17b4c0000\",\"0x1078d7f61b0e56c74ee6635b2e1819ef1e3d8785\":\"0x3635c9adc5dea00000\",\"0x107a03cf0842dbdeb0618fb587ca69189ec92ff5\":\"0x6acb3df27e1f880000\",\"0x1080c1d8358a15bc84dac8253c6883319020df2c\":\"0x90f534608a72880000\",\"0x108a2b7c336f784779d8b54d02a8d31d9a139c0a\":\"0x21e19e0c9bab2400000\",\"0x108ba7c2895c50e072dc6f964932d50c282d3034\":\"0x1b1ae4d6e2ef500000\",\"0x108fe8ee2a13da487b22c6ab6d582ea71064d98c\":\"0x15ac56edc4d12c0000\",\"0x1091176be19b9964a8f72e0ece6bf8e3cfad6e9c\":\"0x21f2f6f0fc3c6100000\",\"0x1098c774c20ca1daac5ddb620365316d353f109c\":\"0x56bc75e2d63100000\",\"0x1098cc20ef84bad5146639c4cd1ca6c3996cb99b\":\"0xfc936392801c0000\",\"0x10a1c42dc1ba746986b985a522a73c93eae64c63\":\"0x3635c9adc5dea00000\",\"0x10a93457496f1108cd98e140a1ecdbae5e6de171\":\"0x15a99062d416180000\",\"0x10b5b34d1248fcf017f8c8ffc408ce899ceef92f\":\"0xe7eeba3410b740000\",\"0x10cf560964ff83c1c9674c783c0f73fcd89943fc\":\"0x878678326eac9000000\",\"0x10d32416722ca4e648630548ead91edd79c06aff\":\"0x56bc75e2d63100000\",\"0x10d945334ecde47beb9ca3816c173dfbbd0b5333\":\"0x4be4e7267b6ae00000\",\"0x10df681506e34930ac7a5c67a54c3e89ce92b981\":\"0x74c1fab8adb4540000\",\"0x10e1e3377885c42d7df218522ee7766887c05e6a\":\"0x1043c43cde1d398000\",\"0x10e390ad2ba33d82b37388d09c4544c6b0225de5\":\"0xad78ebc5ac6200000\",\"0x10f4bff0caa5027c0a6a2dcfc952824de2940909\":\"0x6c6b935b8bbd400000\",\"0x11001b89ed873e3aaec1155634b4681643986323\":\"0x3635c9adc5dea00000\",\"0x110237cf9117e767922fc4a1b78d7964da82df20\":\"0xd5967be4fc3f100000\",\"0x1111e5dbf45e6f906d62866f1708101788ddd571\":\"0x467be6533ec2e40000\",\"0x11172b278ddd44eea2fdf4cb1d16962391c453d9\":\"0xc62f3d9bfd4895f00000\",\"0x112634b4ec30ff786e024159f796a57939ea144e\":\"0x6c6acc67d7b1d40000\",\"0x11306c7d57588637780fc9fde8e98ecb008f0164\":\"0x6c6acc67d7b1d40000\",\"0x113612bc3ba0ee4898b49dd20233905f2f458f62\":\"0x2f6f10780d22cc00000\",\"0x11415fab61e0dfd4b90676141a557a869ba0bde9\":\"0x6f05b59d3b20000000\",\"0x114cbbbf6fb52ac414be7ec61f7bb71495ce1dfa\":\"0xa2a15d09519be00000\",\"0x114cfefe50170dd97ae08f0a44544978c599548d\":\"0x2ec887e7a14a1c0000\",\"0x116108c12084612eeda7a93ddcf8d2602e279e5c\":\"0x6c6b935b8bbd400000\",\"0x1164caaa8cc5977afe1fad8a7d6028ce2d57299b\":\"0x15af1d78b58c400000\",\"0x11675a25554607a3b6c92a9ee8f36f75edd3e336\":\"0x8a9aba557e36c0000\",\"0x116a09df66cb150e97578e297fb06e13040c893c\":\"0x6c6b935b8bbd400000\",\"0x116fef5e601642c918cb89160fc2293ba71da936\":\"0x2b7cc2e9c3225c0000\",\"0x1178501ff94add1c5881fe886136f6dfdbe61a94\":\"0x890b0c2e14fb80000\",\"0x1179c60dbd068b150b074da4be23033b20c68558\":\"0x24dce54d34a1a00000\",\"0x117d9aa3c4d13bee12c7500f09f5dd1c66c46504\":\"0xb2ad30490b2780000\",\"0x117db836377fe15455e02c2ebda40b1ceb551b19\":\"0x14542ba12a337c00000\",\"0x118c18b2dce170e8f445753ba5d7513cb7636d2d\":\"0x1dd0c885f9a0d800000\",\"0x118fbd753b9792395aef7a4d78d263cdcaabd4f7\":\"0x36330322d5238c0000\",\"0x11928378d27d55c520ceedf24ceb1e822d890df0\":\"0x1b1ae4d6e2ef5000000\",\"0x119aa64d5b7d181dae9d3cb449955c89c1f963fa\":\"0x25f273933db5700000\",\"0x11c0358aa6479de21866fe21071924b65e70f8b9\":\"0x7b53f79e888dac00000\",\"0x11d2247a221e70c2d66d17ee138d38c55ffb8640\":\"0x21e19e0c9bab2400000\",\"0x11d7844a471ef89a8d877555583ceebd1439ea26\":\"0x22369e6ba80c6880000\",\"0x11dd6185d9a8d73ddfdaa71e9b7774431c4dfec2\":\"0x3635c9adc5dea00000\",\"0x11e7997edd904503d77da6038ab0a4c834bbd563\":\"0x150894e849b3900000\",\"0x11ec00f849b6319cf51aa8dd8f66b35529c0be77\":\"0x6c6b935b8bbd400000\",\"0x11efb8a20451161b644a8ccebbc1d343a3bbcb52\":\"0xad78ebc5ac62000000\",\"0x11fefb5dc1a4598aa712640c517775dfa1d91f8c\":\"0x21e19e0c9bab2400000\",\"0x120f9de6e0af7ec02a07c609ca8447f157e6344c\":\"0xe7eeba3410b740000\",\"0x1210f80bdb826c175462ab0716e69e46c24ad076\":\"0x56bc75e2d63100000\",\"0x12134e7f6b017bf48e855a399ca58e2e892fa5c8\":\"0x3635c9adc5dea00000\",\"0x12173074980153aeaa4b0dcbc7132eadcec21b64\":\"0xd02ab486cedc00000\",\"0x121f855b70149ac83473b9706fb44d47828b983b\":\"0x4be4e7267b6ae00000\",\"0x1227e10a4dbf9caca31b1780239f557615fc35c1\":\"0xad78ebc5ac6200000\",\"0x122dcfd81addb97d1a0e4925c4b549806e9f3beb\":\"0x522035cc6e01210000\",\"0x122f56122549d168a5c5e267f52662e5c5cce5c8\":\"0xa076407d3f7440000\",\"0x12316fc7f178eac22eb2b25aedeadf3d75d00177\":\"0x43c33be05f6bfb98000\",\"0x123759f333e13e3069e2034b4f05398918119d36\":\"0x43c33c1937564800000\",\"0x125cc5e4d56b2bcc2ee1c709fb9e68fb177440bd\":\"0x6c6b935b8bbd400000\",\"0x12632388b2765ee4452b50161d1fffd91ab81f4a\":\"0x281d901f4fdd100000\",\"0x126897a311a14ad43b78e0920100c4426bfd6bdd\":\"0x34c726893f2d948000\",\"0x126d91f7ad86debb0557c612ca276eb7f96d00a1\":\"0x56bc75e2d63100000\",\"0x127d3fc5003bf63c0d83e93957836515fd279045\":\"0x610c9222e6e750000\",\"0x127db1cadf1b771cbd7475e1b272690f558c8565\":\"0x2f6f10780d22cc00000\",\"0x1284f0cee9d2ff2989b65574d06ffd9ab0f7b805\":\"0x15af1d78b58c400000\",\"0x128b908fe743a434203de294c441c7e20a86ea67\":\"0x26ab14e0c0e13c0000\",\"0x1293c78c7d6a443b9d74b0ba5ee7bb47fd418588\":\"0x16a6502f15a1e540000\",\"0x1296acded1e063af39fe8ba0b4b63df789f70517\":\"0x56bf91b1a65eb0000\",\"0x12aa7d86ddfbad301692feac8a08f841cb215c37\":\"0x76d41c62494840000\",\"0x12afbcba1427a6a39e7ba4849f7ab1c4358ac31b\":\"0x43c33c1937564800000\",\"0x12b5e28945bb2969f9c64c63cc05b6f1f8d6f4d5\":\"0x1a29e86913b74050000\",\"0x12cf8b0e465213211a5b53dfb0dd271a282c12c9\":\"0xd2f13f7789f00000\",\"0x12d20790b7d3dbd88c81a279b812039e8a603bd0\":\"0x56f985d38644b80000\",\"0x12d60d65b7d9fc48840be5f891c745ce76ee501e\":\"0x485e5388d0c76840000\",\"0x12d91a92d74fc861a729646db192a125b79f5374\":\"0xfc936392801c0000\",\"0x12e9a4ad2ad57484dd700565bddb46423bd9bd31\":\"0x43c30fb0884a96c0000\",\"0x12f32c0a1f2daab676fe69abd9e018352d4ccd45\":\"0x2b5e3af16b1880000\",\"0x12f460ae646cd2780fd35c50a6af4b9accfa85c6\":\"0x3635c9adc5dea00000\",\"0x12ffc1128605cb0c13709a7290506f2690977193\":\"0xb50fcfafebecb00000\",\"0x13032446e7d610aa00ec8c56c9b574d36ca1c016\":\"0x6c6b935b8bbd400000\",\"0x131c792c197d18bd045d7024937c1f84b60f4438\":\"0xd8d726b7177a800000\",\"0x131df8d330eb7cc7147d0a55576f05de8d26a8b7\":\"0xa31062beeed700000\",\"0x131faed12561bb7aee04e5185af802b1c3438d9b\":\"0xbdf3c4bb0328c0000\",\"0x1321b605026f4ffb296a3e0edcb390c9c85608b7\":\"0x6c6b935b8bbd400000\",\"0x1321ccf29739b974e5a516f18f3a843671e39642\":\"0xd8d726b7177a800000\",\"0x1327d759d56e0ab87af37ecf63fe01f310be100a\":\"0x23bc3cdb68a1800000\",\"0x1329dd19cd4baa9fc64310efeceab22117251f12\":\"0xad78ebc5ac6200000\",\"0x13371f92a56ea8381e43059a95128bdc4d43c5a6\":\"0x3635c9adc5dea00000\",\"0x133c490fa5bf7f372888e607d958fab7f955bae1\":\"0x55a6e79ccd1d300000\",\"0x133e4f15e1e39c53435930aaedf3e0fe56fde843\":\"0x1158e460913d00000\",\"0x134163be9fbbe1c5696ee255e90b13254395c318\":\"0xad78ebc5ac6200000\",\"0x135cecd955e5798370769230159303d9b1839f66\":\"0x10f0cf064dd59200000\",\"0x135d1719bf03e3f866312479fe338118cd387e70\":\"0x6c6b935b8bbd400000\",\"0x135eb8c0e9e101deedec11f2ecdb66ae1aae8867\":\"0x43c33c1937564800000\",\"0x1360e87df24c69ee6d51c76e73767ffe19a2131c\":\"0x4fcc1a89027f00000\",\"0x136c834bf111326d207395295b2e583ea7f33572\":\"0x56bc75e2d63100000\",\"0x136d4b662bbd1080cfe4445b0fa213864435b7f1\":\"0xd8d726b7177a800000\",\"0x136f4907cab41e27084b9845069ff2fd0c9ade79\":\"0xd8d726b7177a800000\",\"0x1374facd7b3f8d68649d60d4550ee69ff0484133\":\"0xe9ed6e11172da0000\",\"0x137cf341e8516c815814ebcd73e6569af14cf7bc\":\"0x3635c9adc5dea00000\",\"0x13848b46ea75beb7eaa85f59d866d77fd24cf21a\":\"0xa968163f0a57b400000\",\"0x139d3531c9922ad56269f6309aa789fb2485f98c\":\"0xd8d726b7177a800000\",\"0x139e479764b499d666208c4a8a047a97043163dd\":\"0x2077212aff6df00000\",\"0x13a5eecb38305df94971ef2d9e179ae6cebab337\":\"0x11e3ab8395c6e80000\",\"0x13acada8980affc7504921be84eb4944c8fbb2bd\":\"0x56d2aa3a5c09a00000\",\"0x13b9b10715714c09cfd610cf9c9846051cb1d513\":\"0x6acb3df27e1f880000\",\"0x13ce332dff65a6ab933897588aa23e000980fa82\":\"0xe020536f028f00000\",\"0x13d67a7e25f2b12cdb85585009f8acc49b967301\":\"0x6c6acc67d7b1d40000\",\"0x13dee03e3799952d0738843d4be8fc0a803fb20e\":\"0x6c6b935b8bbd400000\",\"0x13e02fb448d6c84ae17db310ad286d056160da95\":\"0x6c6b935b8bbd400000\",\"0x13e321728c9c57628058e93fc866a032dd0bda90\":\"0x26bcca23fe2ea20000\",\"0x13ec812284026e409bc066dfebf9d5a4a2bf801e\":\"0x57473d05dabae80000\",\"0x140129eaa766b5a29f5b3af2574e4409f8f6d3f1\":\"0x15af1d78b58c4000000\",\"0x140518a3194bad1350b8949e650565debe6db315\":\"0x6c6b935b8bbd400000\",\"0x1406854d149e081ac09cb4ca560da463f3123059\":\"0x487a9a304539440000\",\"0x140ca28ff33b9f66d7f1fc0078f8c1eef69a1bc0\":\"0x56bc75e2d631000000\",\"0x140fba58dbc04803d84c2130f01978f9e0c73129\":\"0x15af1d78b58c400000\",\"0x141a5e39ee2f680a600fbf6fa297de90f3225cdd\":\"0x21e19e0c9bab2400000\",\"0x14254ea126b52d0142da0a7e188ce255d8c47178\":\"0x2a034919dfbfbc0000\",\"0x142b87c5043ffb5a91df18c2e109ced6fe4a71db\":\"0xad78ebc5ac6200000\",\"0x143c639752caeecf6a997d39709fc8f19878c7e8\":\"0x6acb3df27e1f880000\",\"0x143d536b8b1cb84f56a39e0bc81fd5442bcacce1\":\"0x56bc75e2d63100000\",\"0x143f5f1658d9e578f4f3d95f80c0b1bd3933cbda\":\"0x50c5e761a444080000\",\"0x14410fb310711be074a80883c635d0ef6afb2539\":\"0x6c6b935b8bbd400000\",\"0x144b19f1f66cbe318347e48d84b14039466c5909\":\"0x6c6b935b8bbd400000\",\"0x145250b06e4fa7cb2749422eb817bdda8b54de5f\":\"0xbdf3c4bb0328c0000\",\"0x145e0600e2a927b2dd8d379356b45a2e7d51d3ae\":\"0x8a02ab400bb2cb8000\",\"0x145e1de0147911ccd880875fbbea61f6a142d11d\":\"0xd8d726b7177a800000\",\"0x1463a873555bc0397e575c2471cf77fa9db146e0\":\"0x21e19e0c9bab2400000\",\"0x1479a9ec7480b74b5db8fc499be352da7f84ee9c\":\"0x3635c9adc5dea00000\",\"0x147af46ae9ccd18bb35ca01b353b51990e49dce1\":\"0xd8d726b7177a800000\",\"0x147f4210ab5804940a0b7db8c14c28396b62a6bf\":\"0x6c6b935b8bbd400000\",\"0x14830704e99aaad5c55e1f502b27b22c12c91933\":\"0x219c3a7b1966300000\",\"0x149b6dbde632c19f5af47cb493114bebd9b03c1f\":\"0x28a857425466f800000\",\"0x149ba10f0da2725dc704733e87f5a524ca88515e\":\"0x1ab2cf7c9f87e200000\",\"0x14a7352066364404db50f0d0d78d754a22198ef4\":\"0x65ea3db75546600000\",\"0x14ab164b3b524c82d6abfbc0de831126ae8d1375\":\"0x6c6b935b8bbd400000\",\"0x14b1603ec62b20022033eec4d6d6655ac24a015a\":\"0x2b5e3af16b1880000\",\"0x14c63ba2dcb1dd4df33ddab11c4f0007fa96a62d\":\"0x34841b6057afab00000\",\"0x14cdddbc8b09e6675a9e9e05091cb92238c39e1e\":\"0x11478b7c30abc300000\",\"0x14d00aad39a0a7d19ca05350f7b03727f08dd82e\":\"0x1b1ae4d6e2ef500000\",\"0x14eec09bf03e352bd6ff1b1e876be664ceffd0cf\":\"0x116dc3a8994b30000\",\"0x14f221159518783bc4a706676fc4f3c5ee405829\":\"0xad78ebc5ac6200000\",\"0x14fcd1391e7d732f41766cdacd84fa1deb9ffdd2\":\"0x6c6b935b8bbd400000\",\"0x150e3dbcbcfc84ccf89b73427763a565c23e60d0\":\"0x22b1c8c1227a00000\",\"0x1518627b88351fede796d3f3083364fbd4887b0c\":\"0x3635c9adc5dea000000\",\"0x15224ad1c0face46f9f556e4774a3025ad06bd52\":\"0xb98bc829a6f90000\",\"0x152f2bd229ddf3cb0fdaf455c183209c0e1e39a2\":\"0x6c6b935b8bbd400000\",\"0x152f4e860ef3ee806a502777a1b8dbc91a907668\":\"0x2086ac351052600000\",\"0x153c08aa8b96a611ef63c0253e2a4334829e579d\":\"0x155bd9307f9fe80000\",\"0x153cf2842cb9de876c276fa64767d1a8ecf573bb\":\"0x6c6b935b8bbd400000\",\"0x153ef58a1e2e7a3eb6b459a80ab2a547c94182a2\":\"0x14542ba12a337c000000\",\"0x154459fa2f21318e3434449789d826cdc1570ce5\":\"0x6c6b935b8bbd400000\",\"0x1547b9bf7ad66274f3413827231ba405ee8c88c1\":\"0x3a9d5baa4abf1d00000\",\"0x1548b770a5118ede87dba2f690337f616de683ab\":\"0x1c995685e0bf870000\",\"0x15528350e0d9670a2ea27f7b4a33b9c0f9621d21\":\"0xd8d8583fa2d52f0000\",\"0x155b3779bb6d56342e2fda817b5b2d81c7f41327\":\"0x2b8aa3a076c9c0000\",\"0x1565af837ef3b0bd4e2b23568d5023cd34b16498\":\"0x1551e9724ac4ba0000\",\"0x15669180dee29598869b08a721c7d24c4c0ee63f\":\"0x3635c9adc5dea00000\",\"0x1572cdfab72a01ce968e78f5b5448da29853fbdd\":\"0x112626c49060fa60000\",\"0x157559adc55764cc6df79323092534e3d6645a66\":\"0x14542ba12a337c00000\",\"0x1578bdbc371b4d243845330556fff2d5ef4dff67\":\"0x56bc75e2d63100000\",\"0x157eb3d3113bd3b597714d3a954edd018982a5cb\":\"0x6c6b935b8bbd400000\",\"0x1584a2c066b7a455dbd6ae2807a7334e83c35fa5\":\"0x70c1cc73b00c80000\",\"0x15874686b6733d10d703c9f9bec6c52eb8628d67\":\"0x6c6b935b8bbd400000\",\"0x158a0d619253bf4432b5cd02c7b862f7c2b75636\":\"0x75bac7c5b12188000\",\"0x1598127982f2f8ad3b6b8fc3cf27bf617801ba2b\":\"0x960db77681e940000\",\"0x159adce27aa10b47236429a34a5ac42cad5b6416\":\"0x6bf90a96edbfa718000\",\"0x15a0aec37ff9ff3d5409f2a4f0c1212aaccb0296\":\"0x3635c9adc5dea00000\",\"0x15aa530dc36958b4edb38eee6dd9e3c77d4c9145\":\"0x6c6b935b8bbd400000\",\"0x15acb61568ec4af7ea2819386181b116a6c5ee70\":\"0x690836c0af5f5600000\",\"0x15b96f30c23b8664e7490651066b00c4391fbf84\":\"0x1642e9df4876290000\",\"0x15c7edb8118ee27b342285eb5926b47a855bc7a5\":\"0x1158e460913d00000\",\"0x15d99468507aa0413fb60dca2adc7f569cb36b54\":\"0x6c6b935b8bbd400000\",\"0x15dbb48c98309764f99ced3692dcca35ee306bac\":\"0x1fc3842bd1f071c00000\",\"0x15dcafcc2bace7b55b54c01a1c514626bf61ebd8\":\"0x1fd933494aa5fe00000\",\"0x15e3b584056b62c973cf5eb096f1733e54c15c91\":\"0x32c75a0223ddf30000\",\"0x15ebd1c7cad2aff19275c657c4d808d010efa0f5\":\"0xadf30ba70c8970000\",\"0x15ee0fc63ebf1b1fc49d7bb38f8863823a2e17d2\":\"0x678a932062e4180000\",\"0x15f1b352110d68901d8f67aac46a6cfafe031477\":\"0xad78ebc5ac6200000\",\"0x15f2b7b16432ee50a5f55b41232f6334ed58bdc0\":\"0x15af1d78b58c400000\",\"0x16019a4dafab43f4d9bf4163fae0847d848afca2\":\"0x15bc70139f74a0000\",\"0x160226efe7b53a8af462d117a0108089bdecc2d1\":\"0xadf30ba70c8970000\",\"0x160ceb6f980e04315f53c4fc988b2bf69e284d7d\":\"0x10910d4cdc9f60000\",\"0x161caf5a972ace8379a6d0a04ae6e163fe21df2b\":\"0x152d02c7e14af6800000\",\"0x161d26ef6759ba5b9f20fdcd66f16132c352415e\":\"0x6c6b935b8bbd400000\",\"0x162110f29eac5f7d02b543d8dcd5bb59a5e33b73\":\"0x6c6b935b8bbd400000\",\"0x162ba503276214b509f97586bd842110d103d517\":\"0x1e7ffd8895c22680000\",\"0x162d76c2e6514a3afb6fe3d3cb93a35c5ae783f1\":\"0x6c6b935b8bbd400000\",\"0x163bad4a122b457d64e8150a413eae4d07023e6b\":\"0x104e70464b1580000\",\"0x163cc8be227646cb09719159f28ed09c5dc0dce0\":\"0x487a9a304539440000\",\"0x163dca73d7d6ea3f3e6062322a8734180c0b78ef\":\"0x9f742003cb7dfc0000\",\"0x164d7aac3eecbaeca1ad5191b753f173fe12ec33\":\"0x285652b8a468690000\",\"0x16526c9edf943efa4f6d0f0bae81e18b31c54079\":\"0x35659ef93f0fc40000\",\"0x165305b787322e25dc6ad0cefe6c6f334678d569\":\"0x6c6b935b8bbd400000\",\"0x1665ab1739d71119ee6132abbd926a279fe67948\":\"0x56bc75e2d63100000\",\"0x166bf6dab22d841b486c38e7ba6ab33a1487ed8c\":\"0x43c33c1937564800000\",\"0x167699f48a78c615512515739958993312574f07\":\"0x21d3bd55e803c0000\",\"0x1678c5f2a522393225196361894f53cc752fe2f3\":\"0x68f365aea1e4400000\",\"0x167ce7de65e84708595a525497a3eb5e5a665073\":\"0x1f314773666fc40000\",\"0x167e3e3ae2003348459392f7dfce44af7c21ad59\":\"0x1b1ae4d6e2ef500000\",\"0x1680cec5021ee93050f8ae127251839e74c1f1fd\":\"0x2c61461e5d743d68000\",\"0x16816aac0ede0d2d3cd442da79e063880f0f1d67\":\"0x6c6b935b8bbd400000\",\"0x168b5019b818691644835fe69bf229e17112d52c\":\"0x5ede20f01a459800000\",\"0x168bdec818eafc6d2992e5ef54aa0e1601e3c561\":\"0x3637507a30abeb0000\",\"0x168d30e53fa681092b52e9bae15a0dcb41a8c9bb\":\"0x56bc75e2d63100000\",\"0x169bbefc41cfd7d7cbb8dfc63020e9fb06d49546\":\"0x6c6b935b8bbd400000\",\"0x16a58e985dccd707a594d193e7cca78b5d027849\":\"0x49b9ca9a6943400000\",\"0x16a9e9b73ae98b864d1728798b8766dbc6ea8d12\":\"0x33e7b44b0db5040000\",\"0x16aa52cb0b554723e7060f21f327b0a68315fea3\":\"0xd8d726b7177a80000\",\"0x16abb8b021a710bdc78ea53494b20614ff4eafe8\":\"0x890b0c2e14fb80000\",\"0x16afa787fc9f94bdff6976b1a42f430a8bf6fb0f\":\"0x6c6b935b8bbd400000\",\"0x16bae5d24eff91778cd98b4d3a1cc3162f44aa77\":\"0x15be6174e1912e0000\",\"0x16bc40215abbd9ae5d280b95b8010b4514ff1292\":\"0xad78ebc5ac6200000\",\"0x16be75e98a995a395222d00bd79ff4b6e638e191\":\"0x79f905c6fd34e800000\",\"0x16c1bf5b7dc9c83c179efacbcf2eb174e3561cb3\":\"0x3635c9adc5dea00000\",\"0x16c7b31e8c376282ac2271728c31c95e35d952c3\":\"0x6c6b935b8bbd400000\",\"0x16f313cf8ad000914a0a176dc6a4342b79ec2538\":\"0x6c6b935b8bbd400000\",\"0x16ffac84032940f0121a09668b858a7e79ffa3bb\":\"0xd24ada6e1087110000\",\"0x1703b4b292b8a9deddede81bb25d89179f6446b6\":\"0x42b65a455e8b1680000\",\"0x17049311101d817efb1d65910f663662a699c98c\":\"0x6c68ccd09b022c0000\",\"0x1704cefcfb1331ec7a78388b29393e85c1af7916\":\"0x15af1d78b58c400000\",\"0x170a88a8997f92d238370f1affdee6347050b013\":\"0xa2ac77351488300000\",\"0x17108dab2c50f99de110e1b3b3b4cd82f5df28e7\":\"0x35203b67bccad00000\",\"0x17125b59ac51cee029e4bd78d7f5947d1ea49bb2\":\"0x4a89f54ef0121c00000\",\"0x171ad9a04bedc8b861e8ed4bddf5717813b1bb48\":\"0x15af1d78b58c400000\",\"0x171ca02a8b6d62bf4ca47e906914079861972cb2\":\"0xad78ebc5ac6200000\",\"0x1722c4cbe70a94b6559d425084caeed4d6e66e21\":\"0xd8d726b7177a800000\",\"0x17580b766f7453525ca4c6a88b01b50570ea088c\":\"0x56bc75e2d63100000\",\"0x17589a6c006a54cad70103123aae0a82135fdeb4\":\"0xd8d726b7177a800000\",\"0x175a183a3a235ffbb03ba835675267229417a091\":\"0x3635c9adc5dea000000\",\"0x175feeea2aa4e0efda12e1588d2f483290ede81a\":\"0xad78ebc5ac6200000\",\"0x1765361c2ec2f83616ce8363aae21025f2566f40\":\"0x10f0cf064dd59200000\",\"0x1767525c5f5a22ed80e9d4d7710f0362d29efa33\":\"0x15af1d78b58c400000\",\"0x17762560e82a93b3f522e0e524adb8612c3a7470\":\"0x3635c9adc5dea00000\",\"0x177dae78bc0113d8d39c4402f2a641ae2a105ab8\":\"0x6292425620b4480000\",\"0x1784948bf99848c89e445638504dd698271b5924\":\"0x1474c410d87baee0000\",\"0x1788da9b57fd05edc4ff99e7fef301519c8a0a1e\":\"0x6c6b935b8bbd400000\",\"0x178eaf6b8554c45dfde16b78ce0c157f2ee31351\":\"0x1158e460913d000000\",\"0x17961d633bcf20a7b029a7d94b7df4da2ec5427f\":\"0xc6ff070f1938b8000\",\"0x1796bcc97b8abc717f4b4a7c6b1036ea2182639f\":\"0x1341f91cd8e3510000\",\"0x17993d312aa1106957868f6a55a5e8f12f77c843\":\"0x1865e814f4142e8000\",\"0x179a825e0f1f6e985309668465cffed436f6aea9\":\"0x1158e460913d00000\",\"0x17b2d6cf65c6f4a347ddc6572655354d8a412b29\":\"0x6c6b935b8bbd400000\",\"0x17b807afa3ddd647e723542e7b52fee39527f306\":\"0x15af40ffa7fc010000\",\"0x17c0478657e1d3d17aaa331dd429cecf91f8ae5d\":\"0x3634fb9f1489a70000\",\"0x17c0fef6986cfb2e4041f9979d9940b69dff3de2\":\"0xd8d726b7177a800000\",\"0x17d4918dfac15d77c47f9ed400a850190d64f151\":\"0x6c6b935b8bbd400000\",\"0x17d521a8d9779023f7164d233c3b6420ffd223ed\":\"0x1158e460913d00000\",\"0x17d931d4c56294dcbe77c8655be4695f006d4a3c\":\"0x6c6b935b8bbd400000\",\"0x17df49518d73b129f0da36b1c9b40cb66420fdc7\":\"0x21e19e0c9bab2400000\",\"0x17e4a0e52bac3ee44efe0954e753d4b85d644e05\":\"0x6c6b935b8bbd400000\",\"0x17e584e810e567702c61d55d434b34cdb5ee30f6\":\"0x10f0cf064dd59200000\",\"0x17e82e7078dc4fd9e879fb8a50667f53a5c54591\":\"0xad78ebc5ac6200000\",\"0x17e86f3b5b30c0ba59f2b2e858425ba89f0a10b0\":\"0x6c6b935b8bbd400000\",\"0x17ee9f54d4ddc84d670eff11e54a659fd72f4455\":\"0x3635c9adc5dea000000\",\"0x17ef4acc1bf147e326749d10e677dcffd76f9e06\":\"0x87751f4e0e1b5300000\",\"0x17f14632a7e2820be6e8f6df823558283dadab2d\":\"0x6c6b935b8bbd400000\",\"0x17f523f117bc9fe978aa481eb4f5561711371bc8\":\"0x6c69f73e29134e0000\",\"0x17fd9b551a98cb61c2e07fbf41d3e8c9a530cba5\":\"0x1768c308193048000\",\"0x180478a655d78d0f3b0c4f202b61485bc4002fd5\":\"0x6c6b935b8bbd400000\",\"0x18136c9df167aa17b6f18e22a702c88f4bc28245\":\"0xd8d726b7177a800000\",\"0x1815279dff9952da3be8f77249dbe22243377be7\":\"0x1017cb76e7b26640000\",\"0x181fbba852a7f50178b1c7f03ed9e58d54162929\":\"0x241a9b4f617a280000\",\"0x1827039f09570294088fddf047165c33e696a492\":\"0x205b4dfa1ee74780000\",\"0x182db85293f606e88988c3704cb3f0c0bbbfca5a\":\"0x73f75d1a085ba0000\",\"0x1848003c25bfd4aa90e7fcb5d7b16bcd0cffc0d8\":\"0x3635c9adc5dea00000\",\"0x184a4f0beb71ffd558a6b6e8f228b78796c4cf3e\":\"0x28a857425466f800000\",\"0x184d86f3466ae6683b19729982e7a7e1a48347b2\":\"0x21e19e0c9bab2400000\",\"0x1851a063ccdb30549077f1d139e72de7971197d5\":\"0x6c6b935b8bbd400000\",\"0x185546e8768d506873818ac9751c1f12116a3bef\":\"0xad78ebc5ac6200000\",\"0x1858cf11aea79f5398ad2bb22267b5a3c952ea74\":\"0x215f835bc769da80000\",\"0x185a7fc4ace368d233e620b2a45935661292bdf2\":\"0x43c33c1937564800000\",\"0x1864a3c7b48155448c54c88c708f166709736d31\":\"0x73f75d1a085ba0000\",\"0x186afdc085f2a3dce4615edffbadf71a11780f50\":\"0xad78ebc5ac6200000\",\"0x186b95f8e5effddcc94f1a315bf0295d3b1ea588\":\"0x6c6acc67d7b1d40000\",\"0x187d9f0c07f8eb74faaad15ebc7b80447417f782\":\"0x1158e460913d00000\",\"0x1895a0eb4a4372722fcbc5afe6936f289c88a419\":\"0x3154c9729d05780000\",\"0x1899f69f653b05a5a6e81f480711d09bbf97588c\":\"0x69fb133df750ac0000\",\"0x18a6d2fc52be73084023c91802f05bc24a4be09f\":\"0x6c6b935b8bbd400000\",\"0x18b0407cdad4ce52600623bd5e1f6a81ab61f026\":\"0x1151ccf0c654c68000\",\"0x18b8bcf98321da61fb4e3eacc1ec5417272dc27e\":\"0x2fb474098f67c00000\",\"0x18c6723a6753299cb914477d04a3bd218df8c775\":\"0x3635c9adc5dea00000\",\"0x18e113d8177c691a61be785852fa5bb47aeebdaf\":\"0x487a9a304539440000\",\"0x18e4ce47483b53040adbab35172c01ef64506e0c\":\"0x1e7e4171bf4d3a00000\",\"0x18e53243981aabc8767da10c73449f1391560eaa\":\"0x14542ba12a337c00000\",\"0x18fa8625c9dc843c78c7ab259ff87c9599e07f10\":\"0x3635c9adc5dea00000\",\"0x18fb09188f27f1038e654031924f628a2106703d\":\"0x6c6b935b8bbd400000\",\"0x18fccf62d2c3395453b7587b9e26f5cff9eb7482\":\"0x3635c9adc5dea00000\",\"0x191313525238a21c767457a91374f02200c55448\":\"0x64f5fdf494f780000\",\"0x1914f1eb95d1277e93b6e61b668b7d77f13a11a1\":\"0x34957444b840e80000\",\"0x1923cfc68b13ea7e2055803645c1e320156bd88d\":\"0x487a9a304539440000\",\"0x19336a236ded755872411f2e0491d83e3e00159e\":\"0x32f51edbaaa3300000\",\"0x1933e334c40f3acbad0c0b851158206924beca3a\":\"0x1995eaf01b896188000\",\"0x1937c5c515057553ccbd46d5866455ce66290284\":\"0xd3c21bcecceda1000000\",\"0x193ac65183651800e23580f8f0ead3bb597eb8a4\":\"0x2b62abcfb910a0000\",\"0x193d37ed347d1c2f4e35350d9a444bc57ca4db43\":\"0x340aad21b3b700000\",\"0x1940dc9364a852165f47414e27f5002445a4f143\":\"0x24c2dff6a3c7c480000\",\"0x1945fe377fe6d4b71e3e791f6f17db243c9b8b0f\":\"0x7679e7beb988360000\",\"0x194a6bb302b8aba7a5b579df93e0df1574967625\":\"0x1b1ae4d6e2ef500000\",\"0x194cebb4929882bf3b4bf9864c2b1b0f62c283f9\":\"0x1ef861531f74aa0000\",\"0x194ff44aefc17bd20efd7a204c47d1620c86db5d\":\"0xa29909687f6aa40000\",\"0x194ffe78bbf5d20dd18a1f01da552e00b7b11db1\":\"0x17b7883c06916600000\",\"0x1953313e2ad746239cb2270f48af34d8bb9c4465\":\"0x6c6b935b8bbd400000\",\"0x19571a2b8f81c6bcf66ab3a10083295617150003\":\"0x1ab2cf7c9f87e20000\",\"0x19687daa39c368139b6e7be60dc1753a9f0cbea3\":\"0x1b1ae4d6e2ef5000000\",\"0x196c02210a450ab0b36370655f717aa87bd1c004\":\"0xe10ace157dbc00000\",\"0x196e85df7e732b4a8f0ed03623f4db9db0b8fa31\":\"0x125b92f5cef248000\",\"0x19732bf973055dbd91a4533adaa2149a91d38380\":\"0x6c6b935b8bbd400000\",\"0x197672fd39d6f246ce66a790d13aa922d70ea109\":\"0x3635c9adc5dea00000\",\"0x19798cbda715ea9a9b9d6aab942c55121e98bf91\":\"0x410d586a20a4c00000\",\"0x198bfcf1b07ae308fa2c02069ac9dafe7135fb47\":\"0x1158e460913d00000\",\"0x198ef1ec325a96cc354c7266a038be8b5c558f67\":\"0x80d1e4373e7f21da0000\",\"0x19918aa09e7d494e98ffa5db50350892f7156ac6\":\"0x21e19e0c9bab2400000\",\"0x19b36b0c87ea664ed80318dc77b688dde87d95a5\":\"0x699f499802303d0000\",\"0x19df9445a81c1b3d804aeaeb6f6e204e4236663f\":\"0x206d94e6a49878000\",\"0x19e5dea3370a2c746aae34a37c531f41da264e83\":\"0xad78ebc5ac6200000\",\"0x19e7f3eb7bf67f3599209ebe08b62ad3327f8cde\":\"0x6c6b935b8bbd400000\",\"0x19e94e620050aad766b9e1bad931238312d4bf49\":\"0x81e32df972abf00000\",\"0x19ecf2abf40c9e857b252fe1dbfd3d4c5d8f816e\":\"0x6c6b935b8bbd400000\",\"0x19f5caf4c40e6908813c0745b0aea9586d9dd931\":\"0x23fed9e1fa2b600000\",\"0x19f643e1a8fa04ae16006028138333a59a96de87\":\"0x1158e460913d00000\",\"0x19f99f2c0b46ce8906875dc9f90ae104dae35594\":\"0xf4575a5d4d162a0000\",\"0x19ff244fcfe3d4fa2f4fd99f87e55bb315b81eb6\":\"0xad78ebc5ac6200000\",\"0x1a04cec420ad432215246d77fe178d339ed0b595\":\"0x11216185c29f700000\",\"0x1a04d5389eb006f9ce880c30d15353f8d11c4b31\":\"0x39d84b2186dc9100000\",\"0x1a0841b92a7f7075569dc4627e6b76cab05ade91\":\"0x52663ccab1e1c00000\",\"0x1a085d43ec92414ea27b914fe767b6d46b1eef44\":\"0x641e8a13563d8f80000\",\"0x1a09fdc2c7a20e23574b97c69e93deba67d37220\":\"0x6c4fd1ee246e780000\",\"0x1a0a1ddfb031e5c8cc1d46cf05842d50fddc7130\":\"0x3635c9adc5dea00000\",\"0x1a1c9a26e0e02418a5cf687da75a275c622c9440\":\"0x10f0cf064dd59200000\",\"0x1a201b4327cea7f399046246a3c87e6e03a3cda8\":\"0x3635c9adc5dea00000\",\"0x1a2434cc774422d48d53d59c5d562cce8407c94b\":\"0x1a055690d9db80000\",\"0x1a25e1c5bc7e5f50ec16f8885f210ea1b938800e\":\"0xd8d726b7177a800000\",\"0x1a2694ec07cf5e4d68ba40f3e7a14c53f3038c6e\":\"0x3636cd06e2db3a8000\",\"0x1a3520453582c718a21c42375bc50773255253e1\":\"0x2ad373ce668e980000\",\"0x1a376e1b2d2f590769bb858d4575320d4e149970\":\"0x106712576391d180000\",\"0x1a3a330e4fcb69dbef5e6901783bf50fd1c15342\":\"0xe3aeb5737240a00000\",\"0x1a4ec6a0ae7f5a9427d23db9724c0d0cffb2ab2f\":\"0x9b41fbf9e0aec0000\",\"0x1a505e62a74e87e577473e4f3afa16bedd3cfa52\":\"0x1b1ae4d6e2ef500000\",\"0x1a5ee533acbfb3a2d76d5b685277b796c56a052b\":\"0x6c6b935b8bbd400000\",\"0x1a644a50cbc2aee823bd2bf243e825be4d47df02\":\"0x56be03ca3e47d8000\",\"0x1a7044e2383f8708305b495bd1176b92e7ef043a\":\"0xad78ebc5ac6200000\",\"0x1a79c7f4039c67a39d7513884cdc0e2c34222490\":\"0x1158e460913d00000\",\"0x1a89899cbebdbb64bb26a195a63c08491fcd9eee\":\"0x6c6b935b8bbd400000\",\"0x1a8a5ce414de9cd172937e37f2d59cff71ce57a0\":\"0x21e19e0c9bab2400000\",\"0x1a95a8a8082e4652e4170df9271cb4bb4305f0b2\":\"0x2b5e3af16b1880000\",\"0x1a95c9b7546b5d1786c3858fb1236446bc0ca4ce\":\"0x6acb3df27e1f880000\",\"0x1a987e3f83de75a42f1bde7c997c19217b4a5f24\":\"0x6c6b935b8bbd400000\",\"0x1a9e702f385dcd105e8b9fa428eea21c57ff528a\":\"0x4be4e7267b6ae00000\",\"0x1aa1021f550af158c747668dd13b463160f95a40\":\"0x4fb0591b9b30380000\",\"0x1aa27699cada8dc3a76f7933aa66c71919040e88\":\"0x15af1d78b58c400000\",\"0x1aa40270d21e5cde86b6316d1ac3c533494b79ed\":\"0x1158e460913d00000\",\"0x1ab53a11bcc63ddfaa40a02b9e186496cdbb8aff\":\"0x6c3f2aac800c000000\",\"0x1abc4e253b080aeb437984ab05bca0979aa43e1c\":\"0x3635c9adc5dea00000\",\"0x1ac089c3bc4d82f06a20051a9d732dc0e734cb61\":\"0x25f69d63a6ce0e0000\",\"0x1ad4563ea5786be1159935abb0f1d5879c3e7372\":\"0x14542ba12a337c00000\",\"0x1ad72d20a76e7fcc6b764058f48d417d496fa6cd\":\"0x6c6b935b8bbd400000\",\"0x1adaf4abfa867db17f99af6abebf707a3cf55df6\":\"0x14542ba12a337c00000\",\"0x1af60343360e0b2d75255210375720df21db5c7d\":\"0x3635c9adc5dea00000\",\"0x1afcc585896cd0ede129ee2de5c19ea811540b64\":\"0xaf2aba0c8e5bef8000\",\"0x1b05ea6a6ac8af7cb6a8b911a8cce8fe1a2acfc8\":\"0x6c6b935b8bbd400000\",\"0x1b0b31afff4b6df3653a94d7c87978ae35f34aae\":\"0x133910453fa9840000\",\"0x1b0d076817e8d68ee2df4e1da1c1142d198c4435\":\"0x54069233bf7f780000\",\"0x1b130d6fa51d5c48ec8d1d52dc8a227be8735c8a\":\"0x6c6b935b8bbd400000\",\"0x1b23cb8663554871fbbe0d9e60397efb6faedc3e\":\"0xad78ebc5ac6200000\",\"0x1b2639588b55c344b023e8de5fd4087b1f040361\":\"0x5150ae84a8cdf00000\",\"0x1b3920d001c43e72b24e7ca46f0fd6e0c20a5ff2\":\"0x6c6b935b8bbd400000\",\"0x1b3cb81e51011b549d78bf720b0d924ac763a7c2\":\"0x7695a92c20d6fe000000\",\"0x1b43232ccd4880d6f46fa751a96cd82473315841\":\"0x4563918244f400000\",\"0x1b4bbcb18165211b265b280716cb3f1f212176e8\":\"0x199ad37d03d0608000\",\"0x1b4d07acd38183a61bb2783d2b7b178dd502ac8d\":\"0xad78ebc5ac6200000\",\"0x1b636b7a496f044d7359596e353a104616436f6b\":\"0x1388ea95c33f1d0000\",\"0x1b6495891240e64e594493c2662171db5e30ce13\":\"0x95887d695ed580000\",\"0x1b6610fb68bad6ed1cfaa0bbe33a24eb2e96fafb\":\"0x83d6c7aab63600000\",\"0x1b799033ef6dc7127822f74542bb22dbfc09a308\":\"0x56bc75e2d63100000\",\"0x1b7ed974b6e234ce81247498429a5bd4a0a2d139\":\"0x6c6b935b8bbd400000\",\"0x1b826fb3c012b0d159e294ba5b8a499ff3c0e03c\":\"0x6c6b935b8bbd400000\",\"0x1b8aa0160cd79f005f88510a714913d70ad3be33\":\"0xaeffb83079ad00000\",\"0x1b8bd6d2eca20185a78e7d98e8e185678dac4830\":\"0x3894f0e6f9b9f700000\",\"0x1b9b2dc2960e4cb9408f7405827c9b59071612fd\":\"0x3635c9adc5dea00000\",\"0x1ba9228d388727f389150ea03b73c82de8eb2e09\":\"0x18974fbe177c9280000\",\"0x1ba9f7997e5387b6b2aa0135ac2452fe36b4c20d\":\"0x2e141ea081ca080000\",\"0x1bba03ff6b4ad5bf18184acb21b188a399e9eb4a\":\"0x61093d7c2c6d380000\",\"0x1bbc199e586790be87afedc849c04726745c5d7b\":\"0xd8d726b7177a800000\",\"0x1bbc60bcc80e5cdc35c5416a1f0a40a83dae867b\":\"0x6c6b935b8bbd400000\",\"0x1bc44c8761231ba1f11f5faa40fa669a013e12ce\":\"0xb0952c45aeaad0000\",\"0x1bcf3441a866bdbe963009ce33c81cbb0261b02c\":\"0x9ddc1e3b901180000\",\"0x1bd28cd5c78aee51357c95c1ef9235e7c18bc854\":\"0x6c6b935b8bbd400000\",\"0x1bd8ebaa7674bb18e19198db244f570313075f43\":\"0x821ab0d4414980000\",\"0x1bd909ac0d4a1102ec98dcf2cca96a0adcd7a951\":\"0x11651ac3e7a758000\",\"0x1be3542c3613687465f15a70aeeb81662b65cca8\":\"0x6c6b935b8bbd400000\",\"0x1bea4df5122fafdeb3607eddda1ea4ffdb9abf2a\":\"0x12c1b6eed03d280000\",\"0x1bec4d02ce85fc48feb62489841d85b170586a9b\":\"0x821ab0d44149800000\",\"0x1bf974d9904f45ce81a845e11ef4cbcf27af719e\":\"0x56bc75e2d63100000\",\"0x1c045649cd53dc23541f8ed4d341812808d5dd9c\":\"0x17b7883c06916600000\",\"0x1c128bd6cda5fca27575e4b43b3253c8c4172afe\":\"0x6c6b935b8bbd400000\",\"0x1c13d38637b9a47ce79d37a86f50fb409c060728\":\"0x487a9a304539440000\",\"0x1c2010bd662df417f2a271879afb13ef4c88a3ae\":\"0xd8d726b7177a800000\",\"0x1c257ad4a55105ea3b58ed374b198da266c85f63\":\"0x21e19e0c9bab2400000\",\"0x1c2e3607e127caca0fbd5c5948adad7dd830b285\":\"0x42bf06b78ed3b500000\",\"0x1c356cfdb95febb714633b28d5c132dd84a9b436\":\"0x15af1d78b58c40000\",\"0x1c35aab688a0cd8ef82e76541ba7ac39527f743b\":\"0x1b1ae4d6e2ef500000\",\"0x1c3ef05dae9dcbd489f3024408669de244c52a02\":\"0x43c33c1937564800000\",\"0x1c4af0e863d2656c8635bc6ffec8dd9928908cb5\":\"0x6c6b935b8bbd400000\",\"0x1c601993789207f965bb865cbb4cd657cce76fc0\":\"0x5541a7037503f0000\",\"0x1c63fa9e2cbbf23c49fcdef1cbabfe6e0d1e14c1\":\"0x3635c9adc5dea00000\",\"0x1c6702b3b05a5114bdbcaeca25531aeeb34835f4\":\"0x58556bead45dcae0000\",\"0x1c68a66138783a63c98cc675a9ec77af4598d35e\":\"0x2b746f48f0f120000\",\"0x1c73d00b6e25d8eb9c1ff4ad827b6b9e9cf6d20c\":\"0xad78ebc5ac6200000\",\"0x1c751e7f24df9d94a637a5dedeffc58277b5db19\":\"0xae8e7a0bb575d00000\",\"0x1c7cb2fe6bf3e09cbcdc187af38fa8f5053a70b6\":\"0x21c84f742d0cead8000\",\"0x1c89060f987c518fa079ec2c0a5ebfa30f5d20f7\":\"0x80bfbefcb5f0bc00000\",\"0x1c94d636e684eb155895ce6db4a2588fba1d001b\":\"0x6c6b935b8bbd400000\",\"0x1c99fe9bb6c6d1066d912099547fd1f4809eacd9\":\"0x6c6b935b8bbd400000\",\"0x1cb450920078aab2317c7db3b38af7dd298b2d41\":\"0x126e72a69a50d00000\",\"0x1cb5f33b4d488936d13e3161da33a1da7df70d1b\":\"0xad78ebc5ac6200000\",\"0x1cb6b2d7cfc559b7f41e6f56ab95c7c958cd0e4c\":\"0x487a9a304539440000\",\"0x1cc1d3c14f0fb8640e36724dc43229d2ea7a1e48\":\"0x5c283d410394100000\",\"0x1cc90876004109cd79a3dea866cb840ac364ba1b\":\"0x6c6b935b8bbd400000\",\"0x1cd1f0a314cbb200de0a0cb1ef97e920709d97c2\":\"0x6c6b935b8bbd400000\",\"0x1cda411bd5163baeca1e558563601ce720e24ee1\":\"0xfc936392801c0000\",\"0x1ce81d31a7923022e125bf48a3e03693b98dc9dd\":\"0x6c6b935b8bbd400000\",\"0x1cebf0985d7f680aaa915c44cc62edb49eab269e\":\"0x3635c9adc5dea00000\",\"0x1ced6715f862b1ff86058201fcce5082b36e62b2\":\"0x16a5e60bee273b10000\",\"0x1cf04cb14380059efd3f238b65d5beb86afa14d8\":\"0x1158e460913d00000\",\"0x1cf105ab23023b554c583e86d7921179ee83169f\":\"0x6acb3df27e1f880000\",\"0x1cf2eb7a8ccac2adeaef0ee87347d535d3b94058\":\"0x6c6b935b8bbd400000\",\"0x1cfcf7517f0c08459720942b647ad192aa9c8828\":\"0x2b5e3af16b18800000\",\"0x1d09ad2412691cc581c1ab36b6f9434cd4f08b54\":\"0x17b7883c06916600000\",\"0x1d157c5876c5cad553c912caf6ce2d5277e05c73\":\"0x6c6b935b8bbd400000\",\"0x1d2615f8b6ca5012b663bdd094b0c5137c778ddf\":\"0x21e19e0c9bab2400000\",\"0x1d29c7aab42b2048d2b25225d498dba67a03fbb2\":\"0xad78ebc5ac6200000\",\"0x1d341fa5a3a1bd051f7db807b6db2fc7ba4f9b45\":\"0xfc936392801c0000\",\"0x1d344e962567cb27e44db9f2fac7b68df1c1e6f7\":\"0x692ae8897081d00000\",\"0x1d36683063b7e9eb99462dabd569bddce71686f2\":\"0x3635c9adc5dea00000\",\"0x1d37616b793f94911838ac8e19ee9449df921ec4\":\"0x5150ae84a8cdf00000\",\"0x1d395b30adda1cf21f091a4f4a7b753371189441\":\"0x152d02c7e14af6800000\",\"0x1d45586eb803ca2190650bf748a2b174312bb507\":\"0x4be4e7267b6ae00000\",\"0x1d572edd2d87ca271a6714c15a3b37761dcca005\":\"0x6ebd52a8ddd390000\",\"0x1d633097a85225a1ff4321b12988fdd55c2b3844\":\"0xd8d726b7177a800000\",\"0x1d69c83d28ff0474ceebeacb3ad227a144ece7a3\":\"0x128cc03920a62d28000\",\"0x1d96bcd58457bbf1d3c2a46ffaf16dbf7d836859\":\"0x9497209d8467e8000\",\"0x1d9e6aaf8019a05f230e5def05af5d889bd4d0f2\":\"0x73f75d1a085ba0000\",\"0x1dab172effa6fbee534c94b17e794edac54f55f8\":\"0x6acb3df27e1f880000\",\"0x1db9ac9a9eaeec0a523757050c71f47278c72d50\":\"0x487a9a304539440000\",\"0x1dbe8e1c2b8a009f85f1ad3ce80d2e05350ee39c\":\"0x7570d6e9ebbe40000\",\"0x1dc7f7dad85df53f1271152403f4e1e4fdb3afa0\":\"0xad78ebc5ac6200000\",\"0x1dcebcb7656df5dcaa3368a055d22f9ed6cdd940\":\"0x1b181e4bf2343c0000\",\"0x1dd77441844afe9cc18f15d8c77bccfb655ee034\":\"0x106eb45579944880000\",\"0x1ddefefd35ab8f658b2471e54790bc17af98dea4\":\"0x3635c9adc5dea00000\",\"0x1deec01abe5c0d952de9106c3dc30639d85005d6\":\"0x6c6b935b8bbd400000\",\"0x1df6911672679bb0ef3509038c0c27e394fdfe30\":\"0x1d460162f516f00000\",\"0x1dfaee077212f1beaf0e6f2f1840537ae154ad86\":\"0x3635c9adc5dea00000\",\"0x1e060dc6c5f1cb8cc7e1452e02ee167508b56542\":\"0x2b14f02c864c77e0000\",\"0x1e13ec51142cebb7a26083412c3ce35144ba56a1\":\"0x10f0cf064dd59200000\",\"0x1e1a4828119be309bd88236e4d482b504dc55711\":\"0xa030dcebbd2f4c0000\",\"0x1e1aed85b86c6562cb8fa1eb6f8f3bc9dcae6e79\":\"0xf4d2dd84259b240000\",\"0x1e1c6351776ac31091397ecf16002d979a1b2d51\":\"0x4be4e7267b6ae00000\",\"0x1e1d7a5f2468b94ea826982dbf2125793c6e4a5a\":\"0x3634f48417401a0000\",\"0x1e210e7047886daa52aaf70f4b991dac68e3025e\":\"0xad78ebc5ac6200000\",\"0x1e2bf4ba8e5ef18d37de6d6ad636c4cae489d0cc\":\"0x6c6b935b8bbd400000\",\"0x1e2fe4e4a77d141ff49a0c7fbc95b0a2b283eeeb\":\"0x6c6b935b8bbd400000\",\"0x1e33d1c2fb5e084f2f1d54bc5267727fec3f985d\":\"0x1b1ae4d6e2ef500000\",\"0x1e381adcf801a3bf9fd7bfac9ccc2b8482ad5e66\":\"0x208972c0010d740000\",\"0x1e3badb1b6e1380e27039c576ae6222e963a5b53\":\"0x43c33c1937564800000\",\"0x1e484d0621f0f5331b35d5408d9aae4eb1acf21e\":\"0x1158e460913d00000\",\"0x1e5800227d4dcf75e30f5595c5bed3f72e341e3b\":\"0xd75dace73417e0000\",\"0x1e596a81b357c6f24970cc313df6dbdaabd0d09e\":\"0x6c6b935b8bbd400000\",\"0x1e6915ebd9a19c81b692ad99b1218a592c1ac7b1\":\"0xd8d726b7177a800000\",\"0x1e6e0153fc161bc05e656bbb144c7187bf4fe84d\":\"0x6c6b935b8bbd400000\",\"0x1e706655e284dcf0bb37fe075d613a18dc12ff4a\":\"0xed43bf1eee82ac0000\",\"0x1e783e522ab7df0acaac9eeed3593039e5ac7579\":\"0x2b1446dd6aefe41c0000\",\"0x1e7b5e4d1f572becf2c00fc90cb4767b4a6e33d4\":\"0x61fc6107593e10000\",\"0x1e8e689b02917cdc29245d0c9c68b094b41a9ed6\":\"0x6c6b935b8bbd400000\",\"0x1ea334b5750807ea74aac5ab8694ec5f28aa77cf\":\"0x1ab2cf7c9f87e20000\",\"0x1ea4715504c6af107b0194f4f7b1cb6fcccd6f4b\":\"0x20043197e0b0270000\",\"0x1ea492bce1ad107e337f4bd4a7ac9a7babcccdab\":\"0x56bc75e2d63100000\",\"0x1ea6bf2f15ae9c1dbc64daa7f8ea4d0d81aad3eb\":\"0xe3aeb5737240a00000\",\"0x1eb4bf73156a82a0a6822080c6edf49c469af8b9\":\"0x678a932062e4180000\",\"0x1ebacb7844fdc322f805904fbf1962802db1537c\":\"0x21e19e0c9bab2400000\",\"0x1ec4ec4b77bf19d091a868e6f49154180541f90e\":\"0x6c6b935b8bbd400000\",\"0x1ed06ee51662a86c634588fb62dc43c8f27e7c17\":\"0xad78ebc5ac6200000\",\"0x1ed8bb3f06778b039e9961d81cb71a73e6787c8e\":\"0x6c6b935b8bbd400000\",\"0x1eda084e796500ba14c5121c0d90846f66e4be62\":\"0x1cfdd7468216e80000\",\"0x1eee6cbee4fe96ad615a9cf5857a647940df8c78\":\"0x10d3aa536e2940000\",\"0x1ef2dcbfe0a500411d956eb8c8939c3d6cfe669d\":\"0x2a1129d09367200000\",\"0x1ef5c9c73650cfbbde5c885531d427c7c3fe5544\":\"0x14542ba12a337c00000\",\"0x1f0412bfedcd964e837d092c71a5fcbaf30126e2\":\"0x1158e460913d00000\",\"0x1f174f40a0447234e66653914d75bc003e5690dc\":\"0x8ac7230489e800000\",\"0x1f2186ded23e0cf9521694e4e164593e690a9685\":\"0x1043561a8829300000\",\"0x1f2afc0aed11bfc71e77a907657b36ea76e3fb99\":\"0xd8d726b7177a800000\",\"0x1f3959fc291110e88232c36b7667fc78a379613f\":\"0xfc936392801c0000\",\"0x1f3da68fe87eaf43a829ab6d7ec5a6e009b204fb\":\"0x1e1601758c2c7e0000\",\"0x1f49b86d0d3945590698a6aaf1673c37755ca80d\":\"0x25f273933db5700000\",\"0x1f5f3b34bd134b2781afe5a0424ac5846cdefd11\":\"0x55de6a779bbac0000\",\"0x1f6f0030349752061c96072bc3d6eb3549208d6b\":\"0x14b8de1eb88db8000\",\"0x1f7d8e86d6eeb02545aad90e91327bd369d7d2f3\":\"0x1158e460913d00000\",\"0x1f8116bd0af5570eaf0c56c49c7ab5e37a580458\":\"0x6c6b935b8bbd400000\",\"0x1f88f8a1338fc7c10976abcd3fb8d38554b5ec9c\":\"0xb9f65d00f63c0000\",\"0x1f9c3268458da301a2be5ab08257f77bb5a98aa4\":\"0xad78ebc5ac6200000\",\"0x1fa2319fed8c2d462adf2e17feec6a6f30516e95\":\"0x6cae30621d4720000\",\"0x1fb463a0389983df7d593f7bdd6d78497fed8879\":\"0x1158e460913d00000\",\"0x1fb7bd310d95f2a6d9baaf8a8a430a9a04453a8b\":\"0xa2a15d09519be00000\",\"0x1fcc7ce6a8485895a3199e16481f72e1f762defe\":\"0x3635c9adc5dea00000\",\"0x1fcfd1d57f872290560cb62d600e1defbefccc1c\":\"0x50c5e761a444080000\",\"0x1fd296be03ad737c92f9c6869e8d80a71c5714aa\":\"0xb98bc829a6f90000\",\"0x1fddd85fc98be9c4045961f40f93805ecc4549e5\":\"0x8e3f50b173c100000\",\"0x2001bef77b66f51e1599b02fb110194a0099b78d\":\"0x6c6b935b8bbd400000\",\"0x200264a09f8c68e3e6629795280f56254f8640d0\":\"0x1158e460913d00000\",\"0x2003717907a72560f4307f1beecc5436f43d21e7\":\"0x1b1ae4d6e2ef500000\",\"0x200dfc0b71e359b2b465440a36a6cdc352773007\":\"0x5150ae84a8cdf00000\",\"0x20134cbff88bfadc466b52eceaa79857891d831e\":\"0x3635c9adc5dea00000\",\"0x2014261f01089f53795630ba9dd24f9a34c2d942\":\"0x487a9a304539440000\",\"0x2016895df32c8ed5478269468423aea7b7fbce50\":\"0x1158e460913d00000\",\"0x20181c4b41f6f972b66958215f19f570c15ddff1\":\"0x56bc75e2d631000000\",\"0x201864a8f784c2277b0b7c9ee734f7b377eab648\":\"0xf2281400d1d5ec0000\",\"0x2020b81ae53926ace9f7d7415a050c031d585f20\":\"0x127f19e83eb3480000\",\"0x203c6283f20df7bc86542fdfb4e763ecdbbbeef5\":\"0x54b40b1f852bda00000\",\"0x204ac98867a7c9c7ed711cb82f28a878caf69b48\":\"0x14542ba12a337c00000\",\"0x205237c4be146fba99478f3a7dad17b09138da95\":\"0x6c6b935b8bbd400000\",\"0x2053ac97548a0c4e8b80bc72590cd6a098fe7516\":\"0xa2325753b460c0000\",\"0x205f5166f12440d85762c967d3ae86184f8f4d98\":\"0x177224aa844c720000\",\"0x205fc843e19a4913d1881eb69b69c0fa3be5c50b\":\"0x20dd68aaf3289100000\",\"0x206482ee6f138a778fe1ad62b180ce856fbb23e6\":\"0x6c6b935b8bbd400000\",\"0x2066774d822793ff25f1760909479cf62491bf88\":\"0xbae3ac685cb72e00000\",\"0x206d55d5792a514ec108e090599f2a065e501185\":\"0xadf30ba70c8970000\",\"0x20707e425d2a11d2c89f391b2b809f556c592421\":\"0x6c6b935b8bbd400000\",\"0x207ef80b5d60b6fbffc51f3a64b8c72036a5abbd\":\"0x16a6502f15a1e540000\",\"0x20824ba1dbebbef9846ef3d0f6c1b017e6912ec4\":\"0x184b26e4daf1d350000\",\"0x2084fce505d97bebf1ad8c5ff6826fc645371fb2\":\"0x1a055690d9db80000\",\"0x208c45732c0a378f17ac8324926d459ba8b658b4\":\"0xa030dcebbd2f4c0000\",\"0x209377b6ad3fe101c9685b3576545c6b1684e73c\":\"0x62a992e53a0af00000\",\"0x209e8e29d33beae8fb6baa783d133e1d9ec1bc0b\":\"0x2d43f3ebfafb2c0000\",\"0x20a15256d50ce058bf0eac43aa533aa16ec9b380\":\"0x1158e460913d00000\",\"0x20a29c5079e26b3f18318bb2e50e8e8b346e5be8\":\"0x1b1ab319f5ec750000\",\"0x20a81680e465f88790f0074f60b4f35f5d1e6aa5\":\"0x456180278f0c778000\",\"0x20b9a9e6bd8880d9994ae00dd0b9282a0beab816\":\"0x1b1ae4d6e2ef500000\",\"0x20c284ba10a20830fc3d699ec97d2dfa27e1b95e\":\"0x6c6b935b8bbd400000\",\"0x20d1417f99c569e3beb095856530fe12d0fceaaa\":\"0x4015f94b1183698000\",\"0x20dd8fcbb46ea46fe381a68b8ca0ea5be21fe9a5\":\"0x6c6b935b8bbd400000\",\"0x20ff3ede8cadb5c37b48cb14580fb65e23090a7b\":\"0x8e4d316827686400000\",\"0x2100381d60a5b54adc09d19683a8f6d5bb4bfbcb\":\"0x21e19e0c9bab2400000\",\"0x2118c116ab0cdf6fd11d54a4309307b477c3fc0f\":\"0x21e19e0c9bab2400000\",\"0x211b29cefc79ae976744fdebcebd3cbb32c51303\":\"0x2f6f10780d22cc00000\",\"0x21206ce22ea480e85940d31314e0d64f4e4d3a04\":\"0x3635c9adc5dea00000\",\"0x2132c0516a2e17174ac547c43b7b0020d1eb4c59\":\"0x35659ef93f0fc40000\",\"0x21408b4d7a2c0e6eca4143f2cacdbbccba121bd8\":\"0x43c33c1937564800000\",\"0x214b743955a512de6e0d886a8cbd0282bee6d2a2\":\"0x6c6b935b8bbd400000\",\"0x214c89c5bd8e7d22bc574bb35e48950211c6f776\":\"0x10654f258fd358000\",\"0x21546914dfd3af2add41b0ff3e83ffda7414e1e0\":\"0x14395e7385a502e0000\",\"0x21582e99e502cbf3d3c23bdffb76e901ac6d56b2\":\"0x56bc75e2d63100000\",\"0x2159240813a73095a7ebf7c3b3743e8028ae5f09\":\"0x6c6b935b8bbd400000\",\"0x2160b4c02cac0a81de9108de434590a8bfe68735\":\"0x6acb3df27e1f880000\",\"0x216e41864ef98f060da08ecae19ad1166a17d036\":\"0x1369fb96128ac480000\",\"0x21846f2fdf5a41ed8df36e5ed8544df75988ece3\":\"0x6c6acc67d7b1d40000\",\"0x21a6db6527467bc6dad54bc16e9fe2953b6794ed\":\"0x2f6f10780d22cc00000\",\"0x21a6feb6ab11c766fdd977f8df4121155f47a1c0\":\"0x319cf38f100580000\",\"0x21b182f2da2b384493cf5f35f83d9d1ee14f2a21\":\"0x6c6b935b8bbd400000\",\"0x21bfe1b45cacde6274fd8608d9a178bf3eeb6edc\":\"0x6cee06ddbe15ec0000\",\"0x21c07380484f6cbc8724ad32bc864c3b5ad500b7\":\"0x3635c9adc5dea00000\",\"0x21c3a8bba267c8cca27b1a9afabad86f607af708\":\"0x1e4a36c49d998300000\",\"0x21ce6d5b9018cec04ad6967944bea39e8030b6b8\":\"0x1158e460913d00000\",\"0x21d02705f3f64905d80ed9147913ea8c7307d695\":\"0x49edb1c09887360000\",\"0x21d13f0c4024e967d9470791b50f22de3afecf1b\":\"0xf15ad35e2e31e50000\",\"0x21dbdb817a0d8404c6bdd61504374e9c43c9210e\":\"0x21e18b9e9ab45e48000\",\"0x21df1ec24b4e4bfe79b0c095cebae198f291fbd1\":\"0x43c33c1937564800000\",\"0x21df2dcdaf74b2bf803404dd4de6a35eabec1bbd\":\"0x177224aa844c7200000\",\"0x21e219c89ca8ac14ae4cba6130eeb77d9e6d3962\":\"0x2acd9faaa038ee0000\",\"0x21e5d2bae995ccfd08a5c16bb524e1f630448f82\":\"0x97c9ce4cf6d5c00000\",\"0x21e5d77320304c201c1e53b261a123d0a1063e81\":\"0x4b6fa9d33dd460000\",\"0x21eae6feffa9fbf4cd874f4739ace530ccbe5937\":\"0x10f0cf064dd59200000\",\"0x21ecb2dfa65779c7592d041cd2105a81f4fd4e46\":\"0x3635c9adc5dea00000\",\"0x21efbca09b3580b98e73f5b2f7f4dc0bf02c529c\":\"0x6c6b935b8bbd400000\",\"0x21fd0bade5f4ef7474d058b7f3d854cb1300524e\":\"0x1158e460913d00000\",\"0x21fd47c5256012198fa5abf131c06d6aa1965f75\":\"0x1ab2cf7c9f87e200000\",\"0x21fd6c5d97f9c600b76821ddd4e776350fce2be0\":\"0x6c6ad382d4fb610000\",\"0x220dc68df019b6b0ccbffb784b5a5ab4b15d4060\":\"0xd5967be4fc3f100000\",\"0x220e2b92c0f6c902b513d9f1e6fab6a8b0def3d7\":\"0x2b5e3af16b18800000\",\"0x22561c5931143536309c17e832587b625c390b9a\":\"0xd8d726b7177a800000\",\"0x2257fca16a6e5c2a647c3c29f36ce229ab93b17e\":\"0xd8d726b7177a800000\",\"0x225d35faedb391c7bc2db7fa9071160405996d00\":\"0x91854fc1862630000\",\"0x225f9eb3fb6ff3e9e3c8447e14a66e8d4f3779f6\":\"0x6c6b935b8bbd400000\",\"0x2272186ef27dcbe2f5fc373050fdae7f2ace2316\":\"0x368c8623a8b4d100000\",\"0x2273bad7bc4e487622d175ef7a66988b6a93c4ee\":\"0x1158e460913d00000\",\"0x2276264bec8526c0c0f270677abaf4f0e441e167\":\"0x3635c9adc5dea00000\",\"0x228242f8336eecd8242e1f000f41937e71dffbbf\":\"0x10f0cf064dd59200000\",\"0x22842ab830da509913f81dd1f04f10af9edd1c55\":\"0x6c6b935b8bbd400000\",\"0x22944fbca9b57963084eb84df7c85fb9bcdfb856\":\"0xfc118fef90ba388000\",\"0x229cc4711b62755ea296445ac3b77fc633821cf2\":\"0x223e8b05219328000\",\"0x229e430de2b74f442651ddcdb70176bc054cad54\":\"0xbbf981bc4aaa8000\",\"0x229f4f1a2a4f540774505b4707a81de44410255b\":\"0x6c6b935b8bbd400000\",\"0x229ff80bf5708009a9f739e0f8b560914016d5a6\":\"0x1211ecb56d13488000\",\"0x22a25812ab56dcc423175ed1d8adacce33cd1810\":\"0x6449e84e47a8a80000\",\"0x22b96ab2cad55db100b53001f9e4db378104c807\":\"0x21e19e0c9bab2400000\",\"0x22bdffc240a88ff7431af3bff50e14da37d5183e\":\"0x3635c9adc5dea00000\",\"0x22ce349159eeb144ef06ff2636588aef79f62832\":\"0xa31062beeed700000\",\"0x22db559f2c3c1475a2e6ffe83a5979599196a7fa\":\"0x3635c9adc5dea00000\",\"0x22e15158b5ee3e86eb0332e3e6a9ac6cd9b55ecd\":\"0x8ac7230489e800000\",\"0x22e2488e2da26a49ae84c01bd54b21f2947891c6\":\"0x5dc892aa1131c80000\",\"0x22e512149a18d369b73c71efa43e86c9edabaf1d\":\"0x4ee02e6714615c0000\",\"0x22eb7db0ba56b0f8b816ccb206e615d929185b0d\":\"0x45d29737e22f20000\",\"0x22eed327f8eb1d1338a3cb7b0f8a4baa5907cd95\":\"0x1455d5f4877088000\",\"0x22f004df8de9e6ebf523ccace457accb26f97281\":\"0x21e19e0c9bab2400000\",\"0x22f2dcff5ad78c3eb6850b5cb951127b659522e6\":\"0xbe202d6a0eda0000\",\"0x22f3c779dd79023ea92a78b65c1a1780f62d5c4a\":\"0x6acb3df27e1f880000\",\"0x22fe884d9037291b4d52e6285ae68dea0be9ffb5\":\"0x6c6b935b8bbd400000\",\"0x2306df931a940d58c01665fa4d0800802c02edfe\":\"0x3635c9adc5dea00000\",\"0x2309d34091445b3232590bd70f4f10025b2c9509\":\"0x21e19e0c9bab2400000\",\"0x23120046f6832102a752a76656691c863e17e59c\":\"0x11e0e4f8a50bd40000\",\"0x231a15acc199c89fa9cb22441cc70330bdcce617\":\"0x1b1ae4d6e2ef500000\",\"0x231d94155dbcfe2a93a319b6171f63b20bd2b6fa\":\"0xcf147bb906e2f80000\",\"0x232832cd5977e00a4c30d0163f2e24f088a6cb09\":\"0xa2a15d09519be00000\",\"0x232c6d03b5b6e6711efff190e49c28eef36c82b0\":\"0x487a9a304539440000\",\"0x232cb1cd49993c144a3f88b3611e233569a86bd6\":\"0x34c606c42d0ac600000\",\"0x232ce782506225fd9860a2edc14a7a3047736da2\":\"0x1158e460913d00000\",\"0x232f525d55859b7d4e608d20487faadb00293135\":\"0xd8d726b7177a800000\",\"0x2334c590c7a48769103045c5b6534c8a3469f44a\":\"0x3b199073df72dc00000\",\"0x23376ecabf746ce53321cf42c86649b92b67b2ff\":\"0x6c6b935b8bbd400000\",\"0x23378f42926d0184b793b0c827a6dd3e3d334fcd\":\"0x30927f74c9de00000\",\"0x233842b1d0692fd11140cf5acda4bf9630bae5f8\":\"0x6c6b935b8bbd400000\",\"0x2339e9492870afea2537f389ac2f838302a33c06\":\"0x6c6b935b8bbd400000\",\"0x233bdddd5da94852f4ade8d212885682d9076bc6\":\"0xd8d726b7177a800000\",\"0x234f46bab73fe45d31bf87f0a1e0466199f2ebac\":\"0x1a4aba225c20740000\",\"0x23551f56975fe92b31fa469c49ea66ee6662f41e\":\"0x678a932062e4180000\",\"0x23569542c97d566018c907acfcf391d14067e87e\":\"0x6c6b935b8bbd400000\",\"0x235fa66c025ef5540070ebcf0d372d8177c467ab\":\"0x7129e1cdf373ee00000\",\"0x2372c4c1c9939f7aaf6cfac04090f00474840a09\":\"0x21e19e0c9bab2400000\",\"0x23730c357a91026e44b1d0e2fc2a51d071d8d77b\":\"0xd8d726b7177a800000\",\"0x2376ada90333b1d181084c97e645e810aa5b76f1\":\"0x28a857425466f80000\",\"0x2378fd4382511e968ed192106737d324f454b535\":\"0x3635c9adc5dea00000\",\"0x2382a9d48ec83ea3652890fd0ee79c907b5b2dc1\":\"0x73f75d1a085ba0000\",\"0x2383c222e67e969190d3219ef14da37850e26c55\":\"0x6c6b935b8bbd400000\",\"0x238a6b7635252f5244486c0af0a73a207385e039\":\"0x4a4491bd6dcd280000\",\"0x239a733e6b855ac592d663156186a8a174d2449e\":\"0x58be3758b241f60000\",\"0x23ab09e73f87aa0f3be0139df0c8eb6be5634f95\":\"0x1b1ae4d6e2ef5000000\",\"0x23abd9e93e7957e5b636be6579051c15e5ce0b0e\":\"0x3a3c8f7cbf42c380000\",\"0x23b1c4917fbd93ee3d48389306957384a5496cbf\":\"0xd8d8583fa2d52f0000\",\"0x23ba3864da583dab56f420873c37679690e02f00\":\"0x21342520d5fec200000\",\"0x23c55aeb5739876f0ac8d7ebea13be729685f000\":\"0x487a9a304539440000\",\"0x23c99ba087448e19c9701df66e0cab52368331fa\":\"0x6c6b935b8bbd400000\",\"0x23ccc3c6acd85c2e460c4ffdd82bc75dc849ea14\":\"0xd8d726b7177a800000\",\"0x23cd2598a20e149ead2ad69379576ecedb60e38e\":\"0x6c6b935b8bbd400000\",\"0x23df8f48ee009256ea797e1fa369beebcf6bc663\":\"0x7cd3fac26d19818000\",\"0x23e2c6a8be8e0acfa5c4df5e36058bb7cbac5a81\":\"0x6c6b935b8bbd400000\",\"0x23ea669e3564819a83b0c26c00a16d9e826f6c46\":\"0x4d8d6ca968ca130000\",\"0x23eb6fd85671a9063ab7678ebe265a20f61a02b3\":\"0x6c6b935b8bbd400000\",\"0x23f9ecf3e5dddca38815d3e59ed34b5b90b4a353\":\"0xb1781a3f0bb200000\",\"0x23fa7eb51a48229598f97e762be0869652dffc66\":\"0x3635c9adc5dea00000\",\"0x240305727313d01e73542c775ff59d11cd35f819\":\"0x141885666807f5c8000\",\"0x24046b91da9b61b629cb8b8ec0c351a07e0703e4\":\"0x6c6b935b8bbd400000\",\"0x240e559e274aaef0c258998c979f671d1173b88b\":\"0xd8d726b7177a800000\",\"0x241361559feef80ef137302153bd9ed2f25db3ef\":\"0x43c33c1937564800000\",\"0x243b3bca6a299359e886ce33a30341fafe4d573d\":\"0x43c33c1937564800000\",\"0x243c84d12420570cc4ef3baba1c959c283249520\":\"0x7f1f6993a853040000\",\"0x24434a3e32e54ecf272fe3470b5f6f512f675520\":\"0x14061b9d77a5e980000\",\"0x2448596f91c09baa30bc96106a2d37b5705e5d28\":\"0x6c6b935b8bbd400000\",\"0x24586ec5451735eeaaeb470dc8736aae752f82e5\":\"0xf43fc2c04ee00000\",\"0x2458d6555ff98a129cce4037953d00206eff4287\":\"0xaadec983fcff40000\",\"0x246291165b59332df5f18ce5c98856fae95897d6\":\"0x5c283d410394100000\",\"0x2467c6a5c696ede9a1e542bf1ad06bcc4b06aca0\":\"0x100bd33fb98ba0000\",\"0x2476b2bb751ce748e1a4c4ff7b230be0c15d2245\":\"0xd8d726b7177a800000\",\"0x247a0a11c57f0383b949de540b66dee68604b0a1\":\"0x39fbae8d042dd00000\",\"0x2487c3c4be86a2723d917c06b458550170c3edba\":\"0x3635c9adc5dea00000\",\"0x2489ac126934d4d6a94df08743da7b7691e9798e\":\"0x3635c9adc5dea00000\",\"0x249db29dbc19d1235da7298a04081c315742e9ac\":\"0x61acff81a78ad40000\",\"0x24a4eb36a7e498c36f99975c1a8d729fd6b305d7\":\"0xdfc78210eb2c80000\",\"0x24a750eae5874711116dd7d47b7186ce990d3103\":\"0xad78ebc5ac6200000\",\"0x24aa1151bb765fa3a89ca50eb6e1b1c706417fd4\":\"0xa80d24677efef00000\",\"0x24aca08d5be85ebb9f3132dfc1b620824edfedf9\":\"0xfc936392801c0000\",\"0x24b2be118b16d8b2174769d17b4cf84f07ca946d\":\"0x6c6b935b8bbd400000\",\"0x24b8b446debd1947955dd084f2c544933346d3ad\":\"0xea696d904039bd8000\",\"0x24b95ebef79500baa0eda72e77f877415df75c33\":\"0x3154c9729d05780000\",\"0x24b9e6644f6ba4cde126270d81f6ab60f286dff4\":\"0x73f75d1a085ba0000\",\"0x24bd5904059091d2f9e12d6a26a010ca22ab14e8\":\"0x65ea3db75546600000\",\"0x24c0c88b54a3544709828ab4ab06840559f6c5e2\":\"0x90f534608a72880000\",\"0x24c117d1d2b3a97ab11a4679c99a774a9eade8d1\":\"0x3635c9adc5dea00000\",\"0x24cff0e9336a9f80f9b1cb968caf6b1d1c4932a4\":\"0xada55474b81340000\",\"0x24daaaddf7b06bbcea9b80590085a88567682b4e\":\"0x114b2015d2bbd00000\",\"0x24dcc24bd9c7210ceacfb30da98ae04a4d7b8ab9\":\"0x3635c9adc5dea00000\",\"0x24f7450ddbf18b020feb1a2032d9d54b633edf37\":\"0x2b5e3af16b1880000\",\"0x24fc73d20793098e09ddab5798506224fa1e1850\":\"0xad78ebc5ac6200000\",\"0x24fd9a6c874c2fab3ff36e9afbf8ce0d32c7de92\":\"0x487a9a304539440000\",\"0x250a40cef3202397f240469548beb5626af4f23c\":\"0x503b203e9fba20000\",\"0x250a69430776f6347703f9529783955a6197b682\":\"0x692ae8897081d00000\",\"0x250eb7c66f869ddf49da85f3393e980c029aa434\":\"0xd8d726b7177a800000\",\"0x25106ab6755df86d6b63a187703b0cfea0e594a0\":\"0x17c405ad41db40000\",\"0x25185f325acf2d64500698f65c769ddf68301602\":\"0x10f0cf064dd59200000\",\"0x251c12722c6879227992a304eb3576cd18434ea5\":\"0x6c6b935b8bbd400000\",\"0x251e6838f7cec5b383c1d90146341274daf8e502\":\"0x7ff1ccb7561df0000\",\"0x25259d975a21d83ae30e33f800f53f37dfa01938\":\"0x1158e460913d00000\",\"0x25287b815f5c82380a73b0b13fbaf982be24c4d3\":\"0x22b1c8c1227a00000\",\"0x252b6555afdc80f2d96d972d17db84ea5ad521ac\":\"0x1ab2cf7c9f87e200000\",\"0x2538532936813c91e653284f017c80c3b8f8a36f\":\"0x6c8754c8f30c080000\",\"0x253e32b74ea4490ab92606fda0aa257bf23dcb8b\":\"0x21e19e0c9bab2400000\",\"0x253f1e742a2cec86b0d7b306e5eacb6ccb2f8554\":\"0x43e5ede1f878c200000\",\"0x2541314a0b408e95a694444977712a50713591ab\":\"0x589e1a5df4d7b50000\",\"0x254c1ecc630c2877de8095f0a8dba1e8bf1f550c\":\"0x5c283d410394100000\",\"0x255abc8d08a096a88f3d6ab55fbc7352bddcb9ce\":\"0x4743682313ede8000\",\"0x255bdd6474cc8262f26a22c38f45940e1ceea69b\":\"0xd8d726b7177a800000\",\"0x2560b09b89a4ae6849ed5a3c9958426631714466\":\"0x5c283d410394100000\",\"0x2561a138dcf83bd813e0e7f108642be3de3d6f05\":\"0x3634f48417401a0000\",\"0x2561ec0f379218fe5ed4e028a3f744aa41754c72\":\"0xb98bc829a6f90000\",\"0x256292a191bdda34c4da6b6bd69147bf75e2a9ab\":\"0xc2ff2e0dfb038000\",\"0x25697ef20cccaa70d32d376f8272d9c1070c3d78\":\"0xad78ebc5ac6200000\",\"0x256fa150cc87b5056a07d004efc84524739e62b5\":\"0xad78ebc5ac6200000\",\"0x25721c87b0dc21377c7200e524b14a22f0af69fb\":\"0xd8d726b7177a800000\",\"0x258939bbf00c9de9af5338f5d714abf6d0c1c671\":\"0x54069233bf7f780000\",\"0x2590126870e0bde8a663ab040a72a5573d8d41c2\":\"0x10f0cf064dd59200000\",\"0x259ec4d265f3ab536b7c70fa97aca142692c13fc\":\"0x11b1b5bea89f80000\",\"0x25a500eeec7a662a841552b5168b707b0de21e9e\":\"0x21f2f6f0fc3c6100000\",\"0x25a5a44d38a2f44c6a9db9cdbc6b1e2e97abb509\":\"0x39992648a23c8a00000\",\"0x25a74c2ac75dc8baa8b31a9c7cb4b7829b2456da\":\"0x6c6b935b8bbd400000\",\"0x25adb8f96f39492c9bb47c5edc88624e46075697\":\"0x5a9940bc56879500000\",\"0x25aee68d09afb71d8817f3f184ec562f7897b734\":\"0x6c6b935b8bbd400000\",\"0x25b0533b81d02a617b9229c7ec5d6f2f672e5b5a\":\"0x3635c9adc5dea00000\",\"0x25b78c9fad85b43343f0bfcd0fac11c9949ca5eb\":\"0x6c6b935b8bbd400000\",\"0x25bc49ef288cd165e525c661a812cf84fbec8f33\":\"0x125921aebda9d00000\",\"0x25bdfa3ee26f3849617b230062588a97e3cae701\":\"0x3635e619bb04d40000\",\"0x25c1a37ee5f08265a1e10d3d90d5472955f97806\":\"0x62a992e53a0af00000\",\"0x25c6e74ff1d928df98137af4df8430df24f07cd7\":\"0x15245655b102580000\",\"0x25cfc4e25c35c13b69f7e77dbfb08baf58756b8d\":\"0x878678326eac9000000\",\"0x25dad495a11a86b9eeece1eeec805e57f157faff\":\"0x3635c9adc5dea000000\",\"0x25e037f00a18270ba5ec3420229ddb0a2ce38fa2\":\"0x21e19e0c9bab2400000\",\"0x25e661c939863acc044e6f17b5698cce379ec3cc\":\"0x4a4491bd6dcd280000\",\"0x26048fe84d9b010a62e731627e49bc2eb73f408f\":\"0xd8d726b7177a800000\",\"0x2606c3b3b4ca1b091498602cb1978bf3b95221c0\":\"0x15af1d78b58c400000\",\"0x260a230e4465077e0b14ee4442a482d5b0c914bf\":\"0x5af606a06b5b118000\",\"0x260df8943a8c9a5dba7945327fd7e0837c11ad07\":\"0xad78ebc5ac6200000\",\"0x2614f42d5da844377578e6b448dc24305bef2b03\":\"0x6c6b935b8bbd400000\",\"0x2615100ea7e25bba9bca746058afbbb4ffbe4244\":\"0x1b1ae4d6e2ef500000\",\"0x261575e9cf59c8226fa7aaf91de86fb70f5ac3ae\":\"0x1043a4436a523f0000\",\"0x261e0fa64c51137465eecf5b90f197f7937fdb05\":\"0x3cfc82e37e9a7400000\",\"0x262a8bfd7d9dc5dd3ad78161b6bb560824373655\":\"0x3f6a8384072b760000\",\"0x262aed4bc0f4a4b2c6fb35793e835a49189cdfec\":\"0x21e19e0c9bab2400000\",\"0x262dc1364ccf6df85c43268ee182554dae692e29\":\"0x10b202fec74ced80000\",\"0x263814309de4e635cf585e0d365477fc40e66cf7\":\"0x7ea28327577080000\",\"0x2639eee9873ceec26fcc9454b548b9e7c54aa65c\":\"0x3635c9adc5dea00000\",\"0x263e57dacbe0149f82fe65a2664898866ff5b463\":\"0x80bfbefcb5f0bc00000\",\"0x26475419c06d5f147aa597248eb46cf7befa64a5\":\"0x58e7926ee858a00000\",\"0x264cc8086a8710f91b21720905912cd7964ae868\":\"0x1731790534df20000\",\"0x265383d68b52d034161bfab01ae1b047942fbc32\":\"0x47271dee20d745c0000\",\"0x2659facb1e83436553b5b42989adb8075f9953ed\":\"0x1976576771a5e0000\",\"0x266f2da7f0085ef3f3fa09baee232b93c744db2e\":\"0xcb49b44ba602d800000\",\"0x267148fd72c54f620a592fb92799319cc4532b5c\":\"0x1639e49bba16280000\",\"0x26784ade91c8a83a8e39658c8d8277413ccc9954\":\"0x14542ba12a337c00000\",\"0x267a7e6e82e1b91d51deddb644f0e96dbb1f7f7e\":\"0x1158e460913d00000\",\"0x2680713d40808e2a50ed013150a2a694b96a7f1d\":\"0x61093d7c2c6d380000\",\"0x2697b339813b0c2d964b2471eb1c606f4ecb9616\":\"0x3e8ef795d890c80000\",\"0x26a68eab905a8b3dce00e317308225dab1b9f6b8\":\"0x6b56051582a9700000\",\"0x26b11d066588ce74a572a85a6328739212aa8b40\":\"0x6c6b935b8bbd400000\",\"0x26babf42b267fdcf3861fdd4236a5e474848b358\":\"0x3635c9adc5dea00000\",\"0x26c0054b700d3a7c2dcbe275689d4f4cad16a335\":\"0x6c6b935b8bbd400000\",\"0x26c2ffc30efdc5273e76183a16c2698d6e531286\":\"0x2a1129d09367200000\",\"0x26c99f8849c9802b83c861217fd07a9e84cdb79d\":\"0x1043561a8829300000\",\"0x26cfffd052152bb3f957b478d5f98b233a7c2b92\":\"0xd8d726b7177a800000\",\"0x26d4a16891f52922789217fcd886f7fce296d400\":\"0x6c6b935b8bbd400000\",\"0x26d4ec17d5ceb2c894bdc59d0a6a695dad2b43cc\":\"0x9f1f78761d341a0000\",\"0x26e801b62c827191dd68d31a011990947fd0ebe0\":\"0x1158e460913d00000\",\"0x26e9e2ad729702626417ef25de0dc800f7a779b3\":\"0x3635c9adc5dea00000\",\"0x26f9f7cefd7e394b9d3924412bf2c2831faf1f85\":\"0xd8d726b7177a800000\",\"0x26fe174cbf526650e0cd009bd6126502ce8e684d\":\"0x277017338a30ae00000\",\"0x26ff0a51e7cece8400276978dbd6236ef162c0e6\":\"0x152e185627540a500000\",\"0x27101a0f56d39a88c5a84f9b324cdde33e5cb68c\":\"0x6c6b935b8bbd400000\",\"0x27144ca9a7771a836ad50f803f64d869b2ae2b20\":\"0xd8d726b7177a800000\",\"0x27146913563aa745e2588430d9348e86ea7c3510\":\"0x15af1d78b58c400000\",\"0x271d3d481cb88e7671ad216949b6365e06303de0\":\"0xd8d726b7177a800000\",\"0x2720f9ca426ef2f2cbd2fecd39920c4f1a89e16d\":\"0x6c6b935b8bbd400000\",\"0x272a131a5a656a7a3aca35c8bd202222a7592258\":\"0x90f534608a72880000\",\"0x2744ff67464121e35afc2922177164fa2fcb0267\":\"0x56bc75e2d63100000\",\"0x274a3d771a3d709796fbc4d5f48fce2fe38c79d6\":\"0x1158e460913d00000\",\"0x274d69170fe7141401882b886ac4618c6ae40edb\":\"0x33c5499031720c0000\",\"0x27521deb3b6ef1416ea4c781a2e5d7b36ee81c61\":\"0x6c6b935b8bbd400000\",\"0x275875ff4fbb0cf3a430213127487f7608d04cba\":\"0x1b1c010e766d580000\",\"0x276a006e3028ecd44cdb62ba0a77ce94ebd9f10f\":\"0x6194049f30f7200000\",\"0x276b0521b0e68b277df0bb32f3fd48326350bfb2\":\"0x2b5e3af16b1880000\",\"0x276fd7d24f8f883f5a7a28295bf17151c7a84b03\":\"0x6c6b935b8bbd400000\",\"0x2770f14efb165ddeba79c10bb0af31c31e59334c\":\"0xa2a15d09519be00000\",\"0x277677aba1e52c3b53bfa2071d4e859a0af7e8e1\":\"0x3635c9adc5dea00000\",\"0x27824666d278d70423f03dfe1dc7a3f02f43e2b5\":\"0x3636c25e66ece70000\",\"0x27830c5f6023afaaf79745676c204a0faccda0ba\":\"0xd02ab486cedc00000\",\"0x2784903f1d7c1b5cd901f8875d14a79b3cbe2a56\":\"0x4bda7e9d74ad5500000\",\"0x278c0bde630ec393b1e7267fc9d7d97019e4145b\":\"0x6c6b935b8bbd400000\",\"0x27987110221a880826adb2e7ab5eca78c6e31aec\":\"0xd8d726b7177a800000\",\"0x27ac073be79ce657a93aa693ee43bf0fa41fef04\":\"0xa968163f0a57b400000\",\"0x27b1694eafa165ebd7cc7bc99e74814a951419dc\":\"0x2b5e3af16b18800000\",\"0x27b62816e1e3b8d19b79d1513d5dfa855b0c3a2a\":\"0x56af5c1fd69508000\",\"0x27bf943c1633fe32f8bcccdb6302b407a5724e44\":\"0x32f84c6df408c08000\",\"0x27bf9f44ba7d05c33540c3a53bb02cbbffe7c3c6\":\"0x6c6b935b8bbd400000\",\"0x27c2d7ca504daa3d9066dc09137dc42f3aaab452\":\"0x2086ac351052600000\",\"0x27d158ac3d3e1109ab6e570e90e85d3892cd7680\":\"0x56bc75e2d63100000\",\"0x27e63989ca1e903bc620cf1b9c3f67b9e2ae6581\":\"0x487a9a304539440000\",\"0x27f03cf1abc5e1b51dbc444b289e542c9ddfb0e6\":\"0x10f0cf064dd59200000\",\"0x27fc85a49cff90dbcfdadc9ddd40d6b9a2210a6c\":\"0x56bc75e2d63100000\",\"0x2805415e1d7fdec6dedfb89e521d10592d743c10\":\"0x56bc75e2d63100000\",\"0x28073efc17d05cab3195c2db332b61984777a612\":\"0x3635c9adc5dea00000\",\"0x281250a29121270a4ee5d78d24feafe82c70ba3a\":\"0x3635c9adc5dea00000\",\"0x2813d263fc5ff2479e970595d6b6b560f8d6d6d1\":\"0x6c6b935b8bbd400000\",\"0x282e80a554875a56799fa0a97f5510e795974c4e\":\"0x3635c9adc5dea00000\",\"0x283396ce3cac398bcbe7227f323e78ff96d08767\":\"0x15af1d78b58c400000\",\"0x28349f7ef974ea55fe36a1583b34cec3c45065f0\":\"0xcb633d49e65590000\",\"0x2836123046b284e5ef102bfd22b1765e508116ad\":\"0x1653fbb5c427e40000\",\"0x283c2314283c92d4b064f0aef9bb5246a7007f39\":\"0xad78ebc5ac6200000\",\"0x283e11203749b1fa4f32febb71e49d135919382a\":\"0x3635c9adc5dea00000\",\"0x283e6252b4efcf4654391acb75f903c59b78c5fb\":\"0x28a857425466f800000\",\"0x28510e6eff1fc829b6576f4328bc3938ec7a6580\":\"0x21e19e0c9bab2400000\",\"0x2858acacaf21ea81cab7598fdbd86b452e9e8e15\":\"0x241a9b4f617a280000\",\"0x285ae51b9500c58d541365d97569f14bb2a3709b\":\"0x6c6b935b8bbd400000\",\"0x2866b81decb02ee70ae250cee5cdc77b59d7b679\":\"0x6c6b935b8bbd400000\",\"0x286906b6bd4972e3c71655e04baf36260c7cb153\":\"0x126e72a69a50d00000\",\"0x286b186d61ea1fd78d9930fe12b06537b05c3d51\":\"0x3635c9adc5dea00000\",\"0x2874f3e2985d5f7b406627e17baa772b01abcc9e\":\"0x146050410765f380000\",\"0x287cf9d0902ef819a7a5f149445bf1775ee8c47c\":\"0x3635c9adc5dea000000\",\"0x28818e18b610001321b31df6fe7d2815cdadc9f5\":\"0x3635c9adc5dea00000\",\"0x28868324337e11ba106cb481da962f3a8453808d\":\"0x6c6b935b8bbd400000\",\"0x28904bb7c4302943b709b14d7970e42b8324e1a1\":\"0x21f97846a072d7e0000\",\"0x2895e80999d406ad592e2b262737d35f7db4b699\":\"0x692ae8897081d00000\",\"0x28967280214e218a120c5dda37041b111ea36d74\":\"0xad78ebc5ac6200000\",\"0x28a3da09a8194819ae199f2e6d9d1304817e28a5\":\"0x6c6b935b8bbd400000\",\"0x28ab165ffb69eda0c549ae38e9826f5f7f92f853\":\"0x464df6d7c844590000\",\"0x28b77585cb3d55a199ab291d3a18c68fe89a848a\":\"0x6a4076cf7995a00000\",\"0x28d4ebf41e3d3c451e943bdd7e1f175fae932a3d\":\"0x14542ba12a337c00000\",\"0x28d7e5866f1d85fd1ceb32bfbe1dfc36db434566\":\"0x1864231c610351c0000\",\"0x28d8c35fb7eea622582135e3ad47a227c9a663bd\":\"0xfc936392801c0000\",\"0x28e4af30cd93f686a122ad7bb19f8a8785eee342\":\"0x71e53b706cc7b40000\",\"0x28eaea78cd4d95faecfb68836eafe83520f3bbb7\":\"0xad78ebc5ac6200000\",\"0x28efae6356509edface89fc61a7fdcdb39eea8e5\":\"0x121ea68c114e5100000\",\"0x28fa2580f9ebe420f3e5eefdd371638e3b7af499\":\"0x14542ba12a337c00000\",\"0x2901f8077f34190bb47a8e227fa29b30ce113b31\":\"0x56bc75e2d63100000\",\"0x2905b192e83ce659aa355b9d0c204e3e95f9bb9a\":\"0x75235c1d00393e8000\",\"0x290a56d41f6e9efbdcea0342e0b7929a8cdfcb05\":\"0x12a5f58168ee600000\",\"0x2915624bcb679137b8dae9ab57d11b4905eaee4b\":\"0x1158e460913d00000\",\"0x291efe0081dce8c14799f7b2a43619c0c3b3fc1f\":\"0x410d586a20a4c00000\",\"0x291f929ca59b54f8443e3d4d75d95dee243cef78\":\"0x1b1a089237073d0000\",\"0x29298ccbdff689f87fe41aa6e98fdfb53deaf37a\":\"0x4315c32d71a9e600000\",\"0x292f228b0a94748c8eec612d246f989363e08f08\":\"0xa076407d3f7440000\",\"0x293384c42b6f8f2905ce52b7205c2274376c612b\":\"0x4be4e7267b6ae00000\",\"0x2934c0df7bbc172b6c186b0b72547ace8bf75454\":\"0x340aad21b3b700000\",\"0x293c2306df3604ae4fda0d207aba736f67de0792\":\"0xad78ebc5ac6200000\",\"0x2949fd1def5c76a286b3872424809a07db3966f3\":\"0x11bd906daa0c9438000\",\"0x294f494b3f2e143c2ffc9738cbfd9501850b874e\":\"0x796e3ea3f8ab000000\",\"0x2955c357fd8f75d5159a3dfa69c5b87a359dea8c\":\"0x6c6b935b8bbd400000\",\"0x2961fb391c61957cb5c9e407dda29338d3b92c80\":\"0x3634fb9f1489a70000\",\"0x29681d9912ddd07eaabb88d05d90f766e862417d\":\"0x3635c9adc5dea00000\",\"0x296b71c0015819c242a7861e6ff7eded8a5f71e3\":\"0x6c68ccd09b022c0000\",\"0x296d66b521571a4e4103a7f562c511e6aa732d81\":\"0x243d4d18229ca20000\",\"0x296f00de1dc3bb01d47a8ccd1e5d1dd9a1eb7791\":\"0x3635c9adc5dea00000\",\"0x297385e88634465685c231a314a0d5dcd146af01\":\"0x54069233bf7f780000\",\"0x29763dd6da9a7c161173888321eba6b63c8fb845\":\"0x11c7ea162e78200000\",\"0x2979741174a8c1ea0b7f9edf658177859417f512\":\"0x1901966c8496838000\",\"0x297a88921b5fca10e5bb9ded60025437ae221694\":\"0xad78ebc5ac6200000\",\"0x297d5dbe222f2fb52531acbd0b013dc446ac7368\":\"0x43c33c1937564800000\",\"0x29824e94cc4348bc963279dcdf47391715324cd3\":\"0x692ae8897081d00000\",\"0x2982d76a15f847dd41f1922af368fe678d0e681e\":\"0x56bc75e2d63100000\",\"0x298887bab57c5ba4f0615229d7525fa113b7ea89\":\"0x22b1c8c1227a00000\",\"0x298ec76b440d8807b3f78b5f90979bee42ed43db\":\"0x65a4da25d3016c00000\",\"0x299368609042a858d1ecdf1fc0ada5eaceca29cf\":\"0x6c6b935b8bbd400000\",\"0x299e0bca55e069de8504e89aca6eca21d38a9a5d\":\"0x302379bf2ca2e0000\",\"0x29ac2b458454a36c7e96c73a8667222a12242c71\":\"0xd8d726b7177a800000\",\"0x29adcf83b6b20ac6a434abb1993cbd05c60ea2e4\":\"0x21e19e0c9bab2400000\",\"0x29aef48de8c9fbad4b9e4ca970797a5533eb722d\":\"0x21e19e0c9bab2400000\",\"0x29b3f561ee7a6e25941e98a5325b78adc79785f3\":\"0x56bc75e2d63100000\",\"0x29bdc4f28de0180f433c2694eb74f5504ce94337\":\"0x6c6b935b8bbd400000\",\"0x29cc804d922be91f5909f348b0aaa5d21b607830\":\"0xd8d726b7177a800000\",\"0x29da3e35b23bb1f72f8e2258cf7f553359d24bac\":\"0x43c33c1937564800000\",\"0x29e67990e1b6d52e1055ffe049c53195a81542cf\":\"0x43c33c1937564800000\",\"0x29eaae82761762f4d2db53a9c68b0f6b0b6d4e66\":\"0x6c6b935b8bbd400000\",\"0x29eb7eefdae9feb449c63ff5f279d67510eb1422\":\"0x10d3aa536e2940000\",\"0x29f0edc60338e7112085a1d114da8c42ce8f55d6\":\"0xa05a7f0fd825780000\",\"0x29f8fba4c30772b057edbbe62ae7420c390572e1\":\"0x3635c9adc5dea00000\",\"0x29f9286c0e738d1721a691c6b95ab3d9a797ede8\":\"0x2a5a058fc295ed000000\",\"0x2a085e25b64862f5e68d768e2b0f7a8529858eee\":\"0x6b883acd5766cd0000\",\"0x2a2ab6b74c7af1d9476bb5bcb4524797bedc3552\":\"0x3635c9adc5dea00000\",\"0x2a39190a4fde83dfb3ddcb4c5fbb83ac6c49755c\":\"0x3635c9adc5dea00000\",\"0x2a400dff8594de7228b4fd15c32322b75bb87da8\":\"0x531a17f607a2d0000\",\"0x2a44a7218fe44d65a1b4b7a7d9b1c2c52c8c3e34\":\"0xd2d06c305a1eb578000\",\"0x2a46d353777176ff8e83ffa8001f4f70f9733aa5\":\"0x5bf0ba6634f680000\",\"0x2a595f16eee4cb0c17d9a2d939b3c10f6c677243\":\"0x3ba1910bf341b00000\",\"0x2a59e47ea5d8f0e7c028a3e8e093a49c1b50b9a3\":\"0x6c6b935b8bbd400000\",\"0x2a5ba9e34cd58da54c9a2712663a3be274c8e47b\":\"0xaadec983fcff40000\",\"0x2a5e3a40d2cd0325766de73a3d671896b362c73b\":\"0x152d02c7e14af6800000\",\"0x2a63590efe9986c3fee09b0a0a338b15bed91f21\":\"0x15e1c4e05ee26d00000\",\"0x2a67660a1368efcd626ef36b2b1b601980941c05\":\"0x73f75d1a085ba0000\",\"0x2a742b8910941e0932830a1d9692cfd28494cf40\":\"0x1b1ab319f5ec750000\",\"0x2a746cd44027af3ebd37c378c85ef7f754ab5f28\":\"0x155bd9307f9fe80000\",\"0x2a81d27cb6d4770ff4f3c4a3ba18e5e57f07517c\":\"0x6c6b935b8bbd400000\",\"0x2a91a9fed41b7d0e5cd2d83158d3e8a41a9a2d71\":\"0x692ae8897081d00000\",\"0x2a9c57fe7b6b138a920d676f3c76b6c2a0eef699\":\"0x1fd933494aa5fe00000\",\"0x2a9c96c19151ffcbe29a4616d0c52b3933b4659f\":\"0x3c1379b8765e18000\",\"0x2aa192777ca5b978b6b2c2ff800ac1860f753f47\":\"0x12290f15180bdc0000\",\"0x2aaa35274d742546670b7426264521032af4f4c3\":\"0x21e19e0c9bab2400000\",\"0x2aaea1f1046f30f109faec1c63ef5c7594eb08da\":\"0xd8d726b7177a800000\",\"0x2ab97e8d59eee648ab6caf8696f89937143864d6\":\"0xcf152640c5c8300000\",\"0x2abce1808940cd4ef5b5e05285f82df7a9ab5e03\":\"0x21342520d5fec200000\",\"0x2abdf1a637ef6c42a7e2fe217773d677e804ebdd\":\"0x10f0cf064dd59200000\",\"0x2ac1f8d7bf721f3cfe74d20fea9b87a28aaa982c\":\"0x8ba52e6fc45e40000\",\"0x2acc9c1a32240b4d5b2f777a2ea052b42fc1271c\":\"0x8d807ee14d836100000\",\"0x2ad6c9d10c261819a1a0ca2c48d8c7b2a71728df\":\"0x3635c9adc5dea00000\",\"0x2ae53866fc2d14d572ab73b4a065a1188267f527\":\"0x1b1ae4d6e2ef5000000\",\"0x2ae73a79aea0278533accf21070922b1613f8f32\":\"0xa7e94bbeae701a8000\",\"0x2ae82dab92a66389eea1abb901d1d57f5a7cca0b\":\"0x6c6b935b8bbd400000\",\"0x2aec809df9325b9f483996e99f7331097f08aa0e\":\"0xd8d726b7177a800000\",\"0x2aed2ce531c056b0097efc3c6de10c4762004ed9\":\"0x2356953ab7ddc380000\",\"0x2afb058c3d31032b353bf24f09ae20d54de57dbe\":\"0x3ba1910bf341b00000\",\"0x2b0362633614bfcb583569438ecc4ea57b1d337e\":\"0x43c33c1937564800000\",\"0x2b101e822cd962962a06800a2c08d3b15d82b735\":\"0x83d6c7aab63600000\",\"0x2b129c26b75dde127f8320bd0f63410c92a9f876\":\"0x77432217e683600000\",\"0x2b241f037337eb4acc61849bd272ac133f7cdf4b\":\"0x500b6bca962ab8400000\",\"0x2b3a68db6b0cae8a7c7a476bdfcfbd6205e10687\":\"0x821ab0d44149800000\",\"0x2b3cf97311ff30f460945a9d8099f4a88e26d456\":\"0x6c6b935b8bbd400000\",\"0x2b49fba29830360fcdb6da23bbfea5c0bbac5281\":\"0x1158e460913d00000\",\"0x2b4f4507bb6b9817942ce433781b708fbcd166fd\":\"0xfc936392801c0000\",\"0x2b5016e2457387956562587115aa8759d8695fdf\":\"0x2a5a058fc295ed000000\",\"0x2b5c60e84535eeb4d580de127a12eb2677ccb392\":\"0x43c33c1937564800000\",\"0x2b5ced9987c0765f900e49cf9da2d9f9c1138855\":\"0x15af1d78b58c400000\",\"0x2b5f4b3f1e11707a227aa5e69fa49dded33fb321\":\"0x14542ba12a337c00000\",\"0x2b68306ba7f8daaf73f4c644ef7d2743c0f26856\":\"0x2ee182ca17ddd00000\",\"0x2b6ed29a95753c3ad948348e3e7b1a251080ffb9\":\"0x34f086f3b33b68400000\",\"0x2b701d16c0d3cc1e4cd85445e6ad02eea4ac012d\":\"0x2086ac351052600000\",\"0x2b717cd432a323a4659039848d3b87de26fc9546\":\"0x69e10de76676d0800000\",\"0x2b74c373d04bfb0fd60a18a01a88fbe84770e58c\":\"0x22b1c8c1227a00000\",\"0x2b77a4d88c0d56a3dbe3bae04a05f4fcd1b757e1\":\"0x1043561a8829300000\",\"0x2b8488bd2d3c197a3d26151815b5a798d27168dc\":\"0x16a1f9f5fd7d9600000\",\"0x2b8a0dee5cb0e1e97e15cfca6e19ad21f995efad\":\"0x1b55438d9a249b0000\",\"0x2b8fe4166e23d11963c0932b8ade8e0145ea0770\":\"0x92896529baddc880000\",\"0x2b99b42e4f42619ee36baa7e4af2d65eacfcba35\":\"0x878678326eac9000000\",\"0x2bab0fbe28d58420b52036770a12f9952aea6911\":\"0xcf152640c5c8300000\",\"0x2bade91d154517620fd4b439ac97157a4102a9f7\":\"0xd8d726b7177a800000\",\"0x2baf8d6e221174124820ee492b9459ec4fadafbb\":\"0x6c6b935b8bbd400000\",\"0x2bafbf9e9ed2c219f7f2791374e7d05cb06777e7\":\"0xbed1d0263d9f00000\",\"0x2bb366b9edcb0da680f0e10b3b6e28748190d6c3\":\"0x13a62d7b57640640000\",\"0x2bb6f578adfbe7b2a116b3554facf9969813c319\":\"0x19127a1391ea2a00000\",\"0x2bbe62eac80ca7f4d6fdee7e7d8e28b63acf770e\":\"0x81e32df972abf00000\",\"0x2bbe672a1857508f630f2a5edb563d9e9de92815\":\"0x6c6b935b8bbd400000\",\"0x2bc429d618a66a4cf82dbb2d824e9356effa126a\":\"0x6c6acc67d7b1d40000\",\"0x2bd252e0d732ff1d7c78f0a02e6cb25423cf1b1a\":\"0x90f534608a72880000\",\"0x2bdd03bebbee273b6ca1059b34999a5bbd61bb79\":\"0x1158e460913d00000\",\"0x2c04115c3e52961b0dc0b0bf31fba4546f5966fd\":\"0xad78ebc5ac6200000\",\"0x2c06dd922b61514aafedd84488c0c28e6dcf0e99\":\"0x152d02c7e14af6800000\",\"0x2c0cc3f951482cc8a2925815684eb9f94e060200\":\"0x14542ba12a337c00000\",\"0x2c0ee134d8b36145b47beee7af8d2738dbda08e8\":\"0xae56f730e6d840000\",\"0x2c0f5b9df43625798e7e03c1a5fd6a6d091af82b\":\"0x1b0fcaab200300000\",\"0x2c128c95d957215101f043dd8fc582456d41016d\":\"0x2d43f3ebfafb2c0000\",\"0x2c1800f35fa02d3eb6ff5b25285f5e4add13b38d\":\"0x3122d3adafde100000\",\"0x2c1c19114e3d6de27851484b8d2715e50f8a1065\":\"0x56bc75e2d63100000\",\"0x2c1cc6e18c152488ba11c2cc1bcefa2df306abd1\":\"0x5a87e7d7f5f6580000\",\"0x2c1df8a76f48f6b54bcf9caf56f0ee1cf57ab33d\":\"0x2247f750089da580000\",\"0x2c2147947ae33fb098b489a5c16bfff9abcd4e2a\":\"0xad78ebc5ac6200000\",\"0x2c234f505ca8dcc77d9b7e01d257c318cc19396d\":\"0x56bc75e2d63100000\",\"0x2c2428e4a66974edc822d5dbfb241b2728075158\":\"0x6c6b935b8bbd400000\",\"0x2c2d15ff39561c1b72eda1cc027ffef23743a144\":\"0xd480ed9ef32b400000\",\"0x2c2db28c3309375eea3c6d72cd6d0eec145afcc0\":\"0x6c6b935b8bbd400000\",\"0x2c424ee47f583cdce07ae318b6fad462381d4d2b\":\"0xd8d726b7177a800000\",\"0x2c4b470307a059854055d91ec3794d80b53d0f4a\":\"0x43c33c1937564800000\",\"0x2c52c984102ee0cd3e31821b84d408930efa1ac7\":\"0x6c6b935b8bbd400000\",\"0x2c5a2d0abda03bbe215781b4ff296c8c61bdbaf6\":\"0x1a8e56f48c0228000\",\"0x2c5b7d7b195a371bf9abddb42fe04f2f1d9a9910\":\"0xad78ebc5ac6200000\",\"0x2c5df866666a194b26cebb407e4a1fd73e208d5e\":\"0x3635c9adc5dea00000\",\"0x2c603ff0fe93616c43573ef279bfea40888d6ae7\":\"0x100f4b6d66757900000\",\"0x2c6846a1aa999a2246a287056000ba4dcba8e63d\":\"0x21f2f6f0fc3c6100000\",\"0x2c6afcd4037c1ed14fa74ff6758e0945a185a8e8\":\"0xf43fc2c04ee00000\",\"0x2c6b699d9ead349f067f45711a074a641db6a897\":\"0x1158e460913d00000\",\"0x2c6f5c124cc789f8bb398e3f889751bc4b602d9e\":\"0x159f20bed00f00000\",\"0x2c83aeb02fcf067d65a47082fd977833ab1cec91\":\"0x8273823258ac00000\",\"0x2c89f5fdca3d155409b638b98a742e55eb4652b7\":\"0x14dbb2195ca228900000\",\"0x2c964849b1f69cc7cea4442538ed87fdf16cfc8f\":\"0x6c6b935b8bbd400000\",\"0x2c9fa72c95f37d08e9a36009e7a4b07f29bad41a\":\"0xdf6eb0b2d3ca0000\",\"0x2caf6bf4ec7d5a19c5e0897a5eeb011dcece4210\":\"0x7934835a031160000\",\"0x2cb4c3c16bb1c55e7c6b7a19b127a1ac9390cc09\":\"0xb82794a9244f0c8000\",\"0x2cb5495a505336c2465410d1cae095b8e1ba5cdd\":\"0x43c33c1937564800000\",\"0x2cb615073a40dcdb99faa848572e987b3b056efb\":\"0x2b58addb89a2580000\",\"0x2cba6d5d0dc204ea8a25ada2e26f5675bd5f2fdc\":\"0x4823ef7ddb9af38000\",\"0x2cbb0c73df91b91740b6693b774a7d05177e8e58\":\"0x6449e84e47a8a80000\",\"0x2ccb66494d0af689abf9483d365d782444e7dead\":\"0x3635c9adc5dea00000\",\"0x2ccc1f1cb5f4a8002e186b20885d9dbc030c0894\":\"0x6c6b935b8bbd400000\",\"0x2ccf80e21898125eb4e807cd82e09b9d28592f6e\":\"0x6c6b935b8bbd400000\",\"0x2cd19694d1926a0fa9189edebafc671cf1b2caa5\":\"0x3635c9adc5dea00000\",\"0x2cd39334ac7eac797257abe3736195f5b4b5ce0f\":\"0x56b47785e37260000\",\"0x2cd79eb52027b12c18828e3eaab2969bfcd287e9\":\"0x1158e460913d00000\",\"0x2cd87866568dd81ad47d9d3ad0846e5a65507373\":\"0x15af1d78b58c400000\",\"0x2cdb3944650616e47cb182e060322fa1487978ce\":\"0x62a992e53a0af00000\",\"0x2ce11a92fad024ff2b3e87e3b542e6c60dcbd996\":\"0xd8d726b7177a800000\",\"0x2d0326b23f0409c0c0e9236863a133075a94ba18\":\"0xb679be75be6ae0000\",\"0x2d0dec51a6e87330a6a8fa2a0f65d88d4abcdf73\":\"0xa076407d3f7440000\",\"0x2d23766b6f6b05737dad80a419c40eda4d77103e\":\"0xcf152640c5c8300000\",\"0x2d2b032359b363964fc11a518263bfd05431e867\":\"0x81c1df7629e700000\",\"0x2d3480bf0865074a72c7759ee5137b4d70c51ce9\":\"0xad78ebc5ac6200000\",\"0x2d35a9df62757f7ffad1049afb06ca4afc464c51\":\"0x1158e460913d00000\",\"0x2d40558b06f90a3923145592123b6774e46e31f4\":\"0x3635c9adc5dea00000\",\"0x2d426912d059fad9740b2e390a2eeac0546ff01b\":\"0x4be4e7267b6ae00000\",\"0x2d532df4c63911d1ce91f6d1fcbff7960f78a885\":\"0x5a85968a5878da8000\",\"0x2d5391e938b34858cf965b840531d5efda410b09\":\"0x4be4e7267b6ae00000\",\"0x2d5b42fc59ebda0dfd66ae914bc28c1b0a6ef83a\":\"0x2bc8b59fdcd836638000\",\"0x2d5d7335acb0362b47dfa3a8a4d3f5949544d380\":\"0xad78ebc5ac6200000\",\"0x2d61bfc56873923c2b00095dc3eaa0f590d8ae0f\":\"0x46566dff8ce55600000\",\"0x2d6511fd7a3800b26854c7ec39c0dcb5f4c4e8e8\":\"0x15adddba2f9e770000\",\"0x2d7d5c40ddafc450b04a74a4dabc2bb5d665002e\":\"0x6c6b935b8bbd400000\",\"0x2d89a8006a4f137a20dc2bec46fe2eb312ea9654\":\"0xad78ebc5ac6200000\",\"0x2d8c52329f38d2a2fa9cbaf5c583daf1490bb11c\":\"0x1158e460913d00000\",\"0x2d8e061892a5dcce21966ae1bb0788fd3e8ba059\":\"0xd8e5ce617f2d50000\",\"0x2d8e5bb8d3521695c77e7c834e0291bfacee7408\":\"0x6acb3df27e1f880000\",\"0x2d90b415a38e2e19cdd02ff3ad81a97af7cbf672\":\"0x5f3c7f64131e40000\",\"0x2d9bad6f1ee02a70f1f13def5cccb27a9a274031\":\"0x61093d7c2c6d380000\",\"0x2d9c5fecd2b44fbb6a1ec732ea059f4f1f9d2b5c\":\"0x36ca32661d1aa70000\",\"0x2da617695009cc57d26ad490b32a5dfbeb934e5e\":\"0x43c33c1937564800000\",\"0x2da76b7c39b420e388ba2c1020b0856b0270648a\":\"0x6c6b935b8bbd400000\",\"0x2dc79d6e7f55bce2e2d0c02ad07ceca8bb529354\":\"0x55a6e79ccd1d300000\",\"0x2dca0e449ab646dbdfd393a96662960bcab5ae1e\":\"0x878678326eac9000000\",\"0x2dd325fdffb97b19995284afa5abdb574a1df16a\":\"0x1b1ae4d6e2ef500000\",\"0x2dd578f7407dfbd548d05e95ccc39c485429626a\":\"0xe3aeb5737240a00000\",\"0x2dd8eeef87194abc2ce7585da1e35b7cea780cb7\":\"0x3635c6204739d98000\",\"0x2ddf40905769bcc426cb2c2938ffe077e1e89d98\":\"0xa2a15d09519be00000\",\"0x2de0964400c282bdd78a919c6bf77c6b5f796179\":\"0xad78ebc5ac6200000\",\"0x2de31afd189a13a76ff6fe73ead9f74bb5c4a629\":\"0x14542ba12a337c00000\",\"0x2dec98329d1f96c3a59caa7981755452d4da49d5\":\"0xad78ebc5ac6200000\",\"0x2dee90a28f192d676a8773232b56f18f239e2fad\":\"0x3efa7e747b6d1ad0000\",\"0x2e0880a34596230720f05ac8f065af8681dcb6c2\":\"0x152d02c7e14af6800000\",\"0x2e0c57b47150f95aa6a7e16ab9b1cbf54328979a\":\"0x56bc75e2d63100000\",\"0x2e10910ba6e0bc17e055556614cb87090f4d7e5b\":\"0xad78ebc5ac6200000\",\"0x2e24b597873bb141bdb237ea8a5ab747799af02d\":\"0x43c33c1937564800000\",\"0x2e2810dee44ae4dff3d86342ab126657d653c336\":\"0xad78ebc5ac6200000\",\"0x2e2cbd7ad82547b4f5ff8b3ab56f942a6445a3b0\":\"0xad78ebc5ac6200000\",\"0x2e2d7ea66b9f47d8cc52c01c52b6e191bc7d4786\":\"0xd8d4602c26bf6c0000\",\"0x2e439348df8a4277b22a768457d1158e97c40904\":\"0x2a1e9ff26fbf410000\",\"0x2e46fcee6a3bb145b594a243a3913fce5dad6fba\":\"0x21e19e0c9bab2400000\",\"0x2e47f287f498233713850d3126823cc67dcee255\":\"0xca9d9ea558b40000\",\"0x2e4ee1ae996aa0a1d92428d06652a6bea6d2d15d\":\"0x6c6b935b8bbd400000\",\"0x2e52912bc10ea39d54e293f7aed6b99a0f4c73be\":\"0x15af1d78b58c400000\",\"0x2e619f57abc1e987aa936ae3a2264962e7eb2d9a\":\"0x28fb9b8a8a53500000\",\"0x2e64a8d71111a22f4c5de1e039b336f68d398a7c\":\"0x6c6b935b8bbd400000\",\"0x2e6933543d4f2cc00b5350bd8068ba9243d6beb0\":\"0x6c6b935b8bbd400000\",\"0x2e7e05e29edda7e4ae25c5173543efd71f6d3d80\":\"0x14542ba12a337c00000\",\"0x2e7f465520ec35cc23d68e75651bb6689544a196\":\"0x38ec5b721a1a268000\",\"0x2e8eb30a716e5fe15c74233e039bfb1106e81d12\":\"0x56bc75e2d63100000\",\"0x2e9824b5c132111bca24ddfba7e575a5cd7296c1\":\"0x3a484516e6d7ffe0000\",\"0x2ea5fee63f337a376e4b918ea82148f94d48a626\":\"0x650f8e0dd293c50000\",\"0x2eaf4e2a46b789ccc288c8d1d9294e3fb0853896\":\"0x6c6b935b8bbd400000\",\"0x2eaff9f8f8113064d3957ac6d6e11eee42c8195d\":\"0x6acb3df27e1f880000\",\"0x2eba0c6ee5a1145c1c573984963a605d880a7a20\":\"0x1b1ae4d6e2ef500000\",\"0x2ec95822eb887bc113b4712a4dfd7f13b097b5e7\":\"0x3635c9adc5dea00000\",\"0x2eca6a3c5d9f449d0956bd43fa7b4d7be8435958\":\"0x6c6bda69709cc20000\",\"0x2ecac504b233866eb5a4a99e7bd2901359e43b3d\":\"0x43c33c1937564800000\",\"0x2eebf59432b52892f9380bd140aa99dcf8ad0c0f\":\"0x83d6c7aab63600000\",\"0x2eeed50471a1a2bf53ee30b1232e6e9d80ef866d\":\"0x1158e460913d00000\",\"0x2eef6b1417d7b10ecfc19b123a8a89e73e526c58\":\"0x2086ac351052600000\",\"0x2ef869f0350b57d53478d701e3fee529bc911c75\":\"0x2b5e3af16b1880000\",\"0x2ef9e465716acacfb8c8252fa8e7bc7969ebf6e4\":\"0x959eb1c0e4ae200000\",\"0x2efc4c647dac6acac35577ad221758fef6616faa\":\"0x1b1ae4d6e2ef5000000\",\"0x2f13657526b177cad547c3908c840eff647b45d9\":\"0x3f76849cf1ee2c8000\",\"0x2f187d5a704d5a338c5b2876a090dce964284e29\":\"0xd8d726b7177a800000\",\"0x2f2523cc834f0086052402626296675186a8e582\":\"0x3635c9adc5dea000000\",\"0x2f282abbb6d4a3c3cd3b5ca812f7643e80305f06\":\"0x6449e84e47a8a80000\",\"0x2f2bba1b1796821a766fce64b84f28ec68f15aea\":\"0x1158e460913d00000\",\"0x2f315d9016e8ee5f536681202f9084b032544d4d\":\"0x383cd12b9e863c0000\",\"0x2f4da753430fc09e73acbccdcde9da647f2b5d37\":\"0xad78ebc5ac6200000\",\"0x2f5080b83f7e2dc0a1dd11b092ad042bff788f4c\":\"0xb4f8fb79231d2b8000\",\"0x2f61efa5819d705f2b1e4ee754aeb8a819506a75\":\"0x4f2591f896a6500000\",\"0x2f66bfbf2262efcc8d2bd0444fc5b0696298ff1e\":\"0x21ad935f79f76d00000\",\"0x2f6dce1330c59ef921602154572d4d4bacbd048a\":\"0x3635c9adc5dea00000\",\"0x2f7d3290851be5c6b4b43f7d4574329f61a792c3\":\"0x56bc75e2d63100000\",\"0x2f853817afd3b8f3b86e9f60ee77b5d97773c0e3\":\"0x4eaeea44e368b90000\",\"0x2fa491fb5920a6574ebd289f39c1b2430d2d9a6a\":\"0x6c6b935b8bbd400000\",\"0x2fb566c94bbba4e3cb67cdda7d5fad7131539102\":\"0x6c6b935b8bbd400000\",\"0x2fbb504a5dc527d3e3eb0085e2fc3c7dd538cb7a\":\"0x43c2b18aec3c0a8000\",\"0x2fbc85798a583598b522166d6e9dda121d627dbc\":\"0xad78ebc5ac6200000\",\"0x2fbcef3384d420e4bf61a0669990bc7054f1a5af\":\"0x6c6b935b8bbd400000\",\"0x2fc82ef076932341264f617a0c80dd571e6ae939\":\"0x18424f5f0b1b4e00000\",\"0x2fdd9b79df8df530ad63c20e62af431ae99216b8\":\"0x1236efcbcbb340000\",\"0x2fe0023f5722650f3a8ac01009125e74e3f82e9b\":\"0xa2a15d09519be00000\",\"0x2fe0cc424b53a31f0916be08ec81c50bf8eab0c1\":\"0x2086ac351052600000\",\"0x2fe13a8d0785de8758a5e41876c36e916cf75074\":\"0xd8d726b7177a800000\",\"0x2fea1b2f834f02fc54333f8a809f0438e5870aa9\":\"0x11854d0f9cee40000\",\"0x2fee36a49ee50ecf716f1047915646779f8ba03f\":\"0x394222c4da86d70000\",\"0x2fef81478a4b2e8098db5ff387ba2153f4e22b79\":\"0x3627e8f712373c0000\",\"0x2ff160c44f72a299b5ec2d71e28ce5446d2fcbaf\":\"0x138400eca364a00000\",\"0x2ff1ca55fd9cec1b1fe9f0a9abb74c513c1e2aaa\":\"0xa2a15d09519be00000\",\"0x2ff5cab12c0d957fd333f382eeb75107a64cb8e8\":\"0x21e19e0c9bab2400000\",\"0x2ff830cf55fb00d5a0e03514fecd44314bd6d9f1\":\"0x21e19e0c9bab2400000\",\"0x2ffe93ec1a5636e9ee34af70dff52682e6ff7079\":\"0x6c6b935b8bbd400000\",\"0x30037988702671acbe892c03fe5788aa98af287a\":\"0x97c9ce4cf6d5c00000\",\"0x30248d58e414b20fed3a6c482b59d9d8f5a4b7e2\":\"0x340aad21b3b700000\",\"0x303139bc596403d5d3931f774c66c4ba467454db\":\"0x5c25e14aea283f0000\",\"0x30380087786965149e81423b15e313ba32c5c783\":\"0xfc936392801c0000\",\"0x303a30ac4286ae17cf483dad7b870c6bd64d7b4a\":\"0x1b1ae4d6e2ef500000\",\"0x303fbaebbe46b35b6e5b74946a5f99bc1585cae7\":\"0x2f9ac0695f5bba0000\",\"0x3041445a33ba158741160d9c344eb88e5c306f94\":\"0x340aad21b3b700000\",\"0x30480164bcd84974ebc0d90c9b9afab626cd1c73\":\"0x2b5e3af16b18800000\",\"0x304ec69a74545721d7316aef4dcfb41ac59ee2f0\":\"0xad78ebc5ac6200000\",\"0x30511832918d8034a7bee72ef2bfee440ecbbcf6\":\"0x368c8623a8b4d100000\",\"0x30513fca9f36fd788cfea7a340e86df98294a244\":\"0x183b5f03b1479c0000\",\"0x3055efd26029e0d11b930df4f53b162c8c3fd2ce\":\"0x1b1a089237073d0000\",\"0x305d26c10bdc103f6b9c21272eb7cb2d9108c47e\":\"0x1b1ae4d6e2ef500000\",\"0x305f78d618b990b4295bac8a2dfa262884f804ea\":\"0xd8d726b7177a800000\",\"0x3064899a963c4779cbf613cd6980846af1e6ec65\":\"0x17b773ce6e5df0a0000\",\"0x30730466b8eb6dc90d5496aa76a3472d7dbe0bbe\":\"0x6c68ccd09b022c0000\",\"0x30742ccdf4abbcd005681f8159345c9e79054b1a\":\"0x243d4d18229ca20000\",\"0x3083ef0ed4c4401196774a95cf4edc83edc1484f\":\"0x23ffb7ed6565d6400000\",\"0x308dd21cebe755126704b48c0f0dc234c60ba9b1\":\"0xad78ebc5ac6200000\",\"0x3090f8130ec44466afadb36ed3c926133963677b\":\"0xd8d726b7177a800000\",\"0x309544b6232c3dd737f945a03193d19b5f3f65b9\":\"0x3af342f67ef6c80000\",\"0x3096dca34108085bcf04ae72b94574a13e1a3e1d\":\"0xad78ebc5ac6200000\",\"0x3098b65db93ecacaf7353c48808390a223d57684\":\"0x186484cf7bb6a48000\",\"0x30a9da72574c51e7ee0904ba1f73a6b7b83b9b9d\":\"0x11854d0f9cee40000\",\"0x30acd858875fa24eef0d572fc7d62aad0ebddc35\":\"0x15af1d78b58c400000\",\"0x30b66150f1a63457023fdd45d0cc6cb54e0c0f06\":\"0x3635c9adc5dea00000\",\"0x30bb4357cd6910c86d2238bf727cbe8156680e62\":\"0x56bf91b1a65eb0000\",\"0x30bf61b2d877fe10635126326fa189e4b0b1c3b0\":\"0x37b48985a5d7e60000\",\"0x30c01142907acb1565f70438b9980ae731818738\":\"0x6c6b935b8bbd400000\",\"0x30c26a8e971baa1855d633ba703f028cc7873140\":\"0x21e19e0c9bab2400000\",\"0x30db6b9b107e62102f434a9dd0960c2021f5ce4c\":\"0x2083179b6e42530000\",\"0x30e33358fc21c85006e40f32357dc8895940aaf0\":\"0x678a932062e4180000\",\"0x30e60900cacc7203f314dc604347255167fc2a0f\":\"0x6c6b935b8bbd400000\",\"0x30e789b3d2465e946e6210fa5b35de4e8c93085f\":\"0x6c6b935b8bbd400000\",\"0x30e9698cf1e08a9d048bd8d8048f28be7ed9409f\":\"0x16a6502f15a1e540000\",\"0x30e9d5a0088f1ddb2fd380e2a049192266c51cbf\":\"0xaacacd9b9e22b0000\",\"0x30eac740e4f02cb56eef0526e5d300322600d03e\":\"0x6acb3df27e1f880000\",\"0x30ec9392244a2108c987bc5cdde0ed9f837a817b\":\"0x549925f6c9c5250000\",\"0x30ed11b77bc17e5e6694c8bc5b6e4798f68d9ca7\":\"0x1e6fb3421fe0299e0000\",\"0x30f7d025d16f7bee105580486f9f561c7bae3fef\":\"0x1b1ae4d6e2ef500000\",\"0x30fbe5885f9fcce9ea5edb82ed4a1196dd259aed\":\"0x119e47f21381f400000\",\"0x31047d703f63b93424fbbd6e2f1f9e74de13e709\":\"0x9a8166f7e6b2a78000\",\"0x31313ffd635bf2f3324841a88c07ed146144ceeb\":\"0x6acb3df27e1f880000\",\"0x3159e90c48a915904adfe292b22fa5fd5e72796b\":\"0x36afe98f2606100000\",\"0x315db7439fa1d5b423afa7dd7198c1cf74c918bc\":\"0x2086ac351052600000\",\"0x315ef2da620fd330d12ee55de5f329a696e0a968\":\"0x821ab0d4414980000\",\"0x316e92a91bbda68b9e2f98b3c048934e3cc0b416\":\"0x6c6b935b8bbd400000\",\"0x316eb4e47df71b42e16d6fe46825b7327baf3124\":\"0xd8d726b7177a800000\",\"0x3171877e9d820cc618fc0919b29efd333fda4934\":\"0x3635c9adc5dea00000\",\"0x317cf4a23cb191cdc56312c29d15e210b3b9b784\":\"0x7ce66c50e28400000\",\"0x318b2ea5f0aaa879c4d5e548ac9d92a0c67487b7\":\"0xad78ebc5ac6200000\",\"0x318c76ecfd8af68d70555352e1f601e35988042d\":\"0x1b31192e68c7f00000\",\"0x318f1f8bd220b0558b95fb33100ffdbb640d7ca6\":\"0xd8d726b7177a800000\",\"0x31aa3b1ebe8c4dbcb6a708b1d74831e60e497660\":\"0x15af1d78b58c400000\",\"0x31ab088966ecc7229258f6098fce68cf39b38485\":\"0x3635c9adc5dea00000\",\"0x31ad4d9946ef09d8e988d946b1227f9141901736\":\"0x4d853c8f89089800000\",\"0x31b43b015d0081643c6cda46a7073a6dfdbca825\":\"0xa97916520cd18e80000\",\"0x31ccc616b3118268e75d9ab8996c8858ebd7f3c3\":\"0x15ae0f771ca1520000\",\"0x31d81d526c195e3f10b5c6db52b5e59afbe0a995\":\"0xe4fbc69449f200000\",\"0x31e9c00f0c206a4e4e7e0522170dc81e88f3eb70\":\"0x918ddc3a42a3d40000\",\"0x31ea12d49a35a740780ddeeaece84c0835b26270\":\"0xad78ebc5ac6200000\",\"0x31ea6eab19d00764e9a95e183f2b1b22fc7dc40f\":\"0x1158e460913d00000\",\"0x31eb123c95c82bf685ace7a75a1881a289efca10\":\"0x31e009607371bd0000\",\"0x31ed858788bda4d5270992221cc04206ec62610d\":\"0x3fc0474948f3600000\",\"0x31f006f3494ed6c16eb92aaf9044fa8abb5fd5a3\":\"0x1b1ae4d6e2ef500000\",\"0x3201259caf734ad7581c561051ba0bca7fd6946b\":\"0x261dd1ce2f2088800000\",\"0x32034e8581d9484e8af42a28df190132ec29c466\":\"0xbb9125542263900000\",\"0x322021022678a0166d204b3aaa7ad4ec4b88b7d0\":\"0x15af1d78b58c400000\",\"0x3225c1ca5f2a9c88156bb7d9cdc44a326653c214\":\"0x15af1d78b58c400000\",\"0x322788b5e29bf4f5f55ae1ddb32085fda91b8ebe\":\"0xad78ebc5ac6200000\",\"0x322d6f9a140d213f4c80cd051afe25c620bf4c7d\":\"0x1158e460913d00000\",\"0x322e5c43b0f524389655a9b3ff24f2d4db3da10f\":\"0xfc13b69b3e7e680000\",\"0x323486ca64b375474fb2b759a9e7a135859bd9f6\":\"0x15af1d78b58c400000\",\"0x323749a3b971959e46c8b4822dcafaf7aaf9bd6e\":\"0x11671a5b245700000\",\"0x323aad41df4b6fc8fece8c93958aa901fa680843\":\"0x34957444b840e80000\",\"0x323b3cfe3ee62bbde2a261e53cb3ecc05810f2c6\":\"0x2eb8eb1a172dcb80000\",\"0x323fca5ed77f699f9d9930f5ceeff8e56f59f03c\":\"0x487a9a304539440000\",\"0x32485c818728c197fea487fbb6e829159eba8370\":\"0x3921b413bc4ec08000\",\"0x3250e3e858c26adeccadf36a5663c22aa84c4170\":\"0x10f0cf064dd59200000\",\"0x3259bd2fddfbbc6fbad3b6e874f0bbc02cda18b5\":\"0x2846056495b0d188000\",\"0x3275496fd4dd8931fd69fb0a0b04c4d1ff879ef5\":\"0x182d7e4cfda0380000\",\"0x327bb49e754f6fb4f733c6e06f3989b4f65d4bee\":\"0x1158e460913d00000\",\"0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d\":\"0x487a9a304539440000\",\"0x3283eb7f9137dd39bed55ffe6b8dc845f3e1a079\":\"0x3970ae92155780000\",\"0x32860997d730b2d83b73241a25d3667d51c908ef\":\"0x1b1a089237073d0000\",\"0x3286d1bc657a312c8847d93cb3cb7950f2b0c6e3\":\"0x43c33c1937564800000\",\"0x32a20d028e2c6218b9d95b445c771524636a22ef\":\"0x202fefbf2d7c2f00000\",\"0x32a70691255c9fc9791a4f75c8b81f388e0a2503\":\"0x35659ef93f0fc40000\",\"0x32b7feebc5c59bf65e861c4c0be42a7611a5541a\":\"0x77e9aaa8525c100000\",\"0x32ba9a7d0423e03a525fe2ebeb661d2085778bd8\":\"0x43c33c1937564800000\",\"0x32bb2e9693e4e085344d2f0dbd46a283e3a087fd\":\"0x15af1d78b58c400000\",\"0x32c2fde2b6aabb80e5aea2b949a217f3cb092283\":\"0x1306160afdf20378000\",\"0x32d950d5e93ea1d5b48db4714f867b0320b31c0f\":\"0x3708baed3d68900000\",\"0x32dbb6716c54e83165829a4abb36757849b6e47d\":\"0x3635c9adc5dea00000\",\"0x32eb64be1b5dede408c6bdefbe6e405c16b7ed02\":\"0x6acb3df27e1f880000\",\"0x32ef5cdc671df5562a901aee5db716b9be76dcf6\":\"0x6c6b935b8bbd400000\",\"0x32f29e8727a74c6b4301e3ffff0687c1b870dae9\":\"0x3635c9adc5dea00000\",\"0x32fa0e86cd087dd68d693190f32d93310909ed53\":\"0xd8d726b7177a800000\",\"0x32fbeed6f626fcdfd51acafb730b9eeff612f564\":\"0x6c6b935b8bbd400000\",\"0x3300fb149aded65bcba6c04e9cd6b7a03b893bb1\":\"0xfc936392801c0000\",\"0x3301d9ca2f3bfe026279cd6819f79a293d98156e\":\"0xa968163f0a57b400000\",\"0x3308b03466c27a17dfe1aafceb81e16d2934566f\":\"0x39992648a23c8a00000\",\"0x331a1c26cc6994cdd3c14bece276ffff4b9df77c\":\"0xfa7aeddf4f068000\",\"0x3326b88de806184454c40b27f309d9dd6dcfb978\":\"0x3ca5c66d9bc44300000\",\"0x3329eb3baf4345d600ced40e6e9975656f113742\":\"0x10f08eda8e555098000\",\"0x33320dd90f2baa110dd334872a998f148426453c\":\"0x36356633ebd8ea0000\",\"0x3336c3ef6e8b50ee90e037b164b7a8ea5faac65d\":\"0xec8a3a71c22540000\",\"0x33380c6fff5acd2651309629db9a71bf3f20c5ba\":\"0x368c8623a8b4d100000\",\"0x333ad1596401e05aea2d36ca47318ef4cd2cb3df\":\"0x9dc05cce28c2b80000\",\"0x334340ee4b9cdc81f850a75116d50ee9b69825bf\":\"0x6c6b935b8bbd400000\",\"0x33481e856ebed48ea708a27426ef28e867f57cd1\":\"0xad78ebc5ac6200000\",\"0x33565ba9da2c03e778ce12294f081dfe81064d24\":\"0x3635c9adc5dea000000\",\"0x33581cee233088c0860d944e0cf1ceabb8261c2e\":\"0xb98bc829a6f90000\",\"0x335858f749f169cabcfe52b796e3c11ec47ea3c2\":\"0xad78ebc5ac6200000\",\"0x335e22025b7a77c3a074c78b8e3dfe071341946e\":\"0x227ca730ab3f6ac0000\",\"0x33629bd52f0e107bc071176c64df108f64777d49\":\"0x1cfdd7468216e8000\",\"0x337b3bdf86d713dbd07b5dbfcc022b7a7b1946ae\":\"0xd7c198710e66b00000\",\"0x337cfe1157a5c6912010dd561533791769c2b6a6\":\"0x3635c9adc5dea00000\",\"0x33b336f5ba5edb7b1ccc7eb1a0d984c1231d0edc\":\"0x6c6b935b8bbd400000\",\"0x33c407133b84b3ca4c3ded1f4658900c38101624\":\"0x97c9ce4cf6d5c00000\",\"0x33d172ab075c51db1cd40a8ca8dbff0d93b843bb\":\"0x136780510d12de38000\",\"0x33e9b71823952e1f66958c278fc28b1196a6c5a4\":\"0x56bc75e2d63100000\",\"0x33ea6b7855e05b07ab80dab1e14de9b649e99b6c\":\"0x1cd6fbad57dbd00000\",\"0x33f15223310d44de8b6636685f3a4c3d9c5655a5\":\"0xd9462c6cb4b5a0000\",\"0x33f4a6471eb1bca6a9f85b3b4872e10755c82be1\":\"0x6c6b935b8bbd400000\",\"0x33fb577a4d214fe010d32cca7c3eeda63f87ceef\":\"0x3635c9adc5dea00000\",\"0x33fd718f0b91b5cec88a5dc15eecf0ecefa4ef3d\":\"0x177224aa844c720000\",\"0x341480cc8cb476f8d01ff30812e7c70e05afaf5d\":\"0x6c6b935b8bbd400000\",\"0x34272d5e7574315dcae9abbd317bac90289d4765\":\"0x62a992e53a0af00000\",\"0x3430a16381f869f6ea5423915855e800883525a9\":\"0x3ca5c66d9bc44300000\",\"0x34318625818ec13f11835ae97353ce377d6f590a\":\"0x52663ccab1e1c00000\",\"0x34393c5d91b9de597203e75bac4309b5fa3d28c3\":\"0xa844a7424d9c80000\",\"0x3439998b247cb4bf8bc80a6d2b3527f1dfe9a6d2\":\"0x796e3ea3f8ab00000\",\"0x34437d1465640b136cb5841c3f934f9ba0b7097d\":\"0x960db77681e940000\",\"0x344a8db086faed4efc37131b3a22b0782dad7095\":\"0x1b1ae4d6e2ef500000\",\"0x34664d220fa7f37958024a3332d684bcc6d4c8bd\":\"0x21e19e0c9bab2400000\",\"0x3466f67e39636c01f43b3a21a0e8529325c08624\":\"0x2db1167650acd80000\",\"0x3485361ee6bf06ef6508ccd23d94641f814d3e2f\":\"0x6c6b935b8bbd400000\",\"0x3485f621256433b98a4200dad857efe55937ec98\":\"0x6c6b935b8bbd400000\",\"0x34958a46d30e30b273ecc6e5d358a212e5307e8c\":\"0x6c6b935b8bbd400000\",\"0x3497dd66fd118071a78c2cb36e40b6651cc82598\":\"0x5f1016b5076d00000\",\"0x349a816b17ab3d27bbc0ae0051f6a070be1ff29d\":\"0x21e19e0c9bab2400000\",\"0x349d2c918fd09e2807318e66ce432909176bd50b\":\"0x3cb71f51fc55800000\",\"0x34a0431fff5ead927f3c69649616dc6e97945f6f\":\"0x15af1d78b58c400000\",\"0x34a85d6d243fb1dfb7d1d2d44f536e947a4cee9e\":\"0x43c33c1937564800000\",\"0x34a901a69f036bcf9f7843c0ba01b426e8c3dc2b\":\"0xd8d726b7177a800000\",\"0x34b454416e9fb4274e6addf853428a0198d62ee1\":\"0x161042779f1ffc0000\",\"0x34c8e5f1330fcb4b14ca75cb2580a4b93d204e36\":\"0x6c6b935b8bbd400000\",\"0x34e2849bea583ab0cc37975190f322b395055582\":\"0x1a5c5e857fdf2b20000\",\"0x34fa7792bad8bbd7ff64056214a33eb6600c1ea8\":\"0x2b5e3af16b1880000\",\"0x34ff26eb60a8d1a95a489fae136ee91d4e58084c\":\"0x2086ac351052600000\",\"0x34ff582952ff24458f7b13d51f0b4f987022c1fe\":\"0x9806de3da6e9780000\",\"0x35106ba94e8563d4b3cb3c5c692c10e604b7ced8\":\"0x6c6b935b8bbd400000\",\"0x35145f620397c69cb8e00962961f0f4886643989\":\"0x14542ba12a337c00000\",\"0x35147430c3106500e79fa2f502462e94703c23b1\":\"0x6c6acc67d7b1d40000\",\"0x351787843505f8e4eff46566cce6a59f4d1c5fe7\":\"0x1f5718987664b480000\",\"0x351f16e5e0735af56751b0e225b2421171394090\":\"0x2d4ca05e2b43ca80000\",\"0x3524a000234ebaaf0789a134a2a417383ce5282a\":\"0x1317955947d8e2c0000\",\"0x3526eece1a6bdc3ee7b400fe935b48463f31bed7\":\"0x477879b6d14300000\",\"0x352a785f4a921632504ce5d015f83c49aa838d6d\":\"0xe9e7e0fb35b7780000\",\"0x352d29a26e8a41818181746467f582e6e84012e0\":\"0x14542ba12a337c00000\",\"0x352e77c861696ef96ad54934f894aa8ea35151dd\":\"0x3635c9adc5dea00000\",\"0x352f25babf4a690673e35195efa8f79d05848aad\":\"0xe253c39be6e7dc00000\",\"0x3536453322c1466cb905af5c335ca8db74bff1e6\":\"0x183b5f03b1479c0000\",\"0x353dbec42f92b50f975129b93c4c997375f09073\":\"0x6c5db2a4d815dc0000\",\"0x3540c7bd7a8442d5bee21a2180a1c4edff1649e0\":\"0x432eac4c6f05b98000\",\"0x3549bd40bbbc2b30095cac8be2c07a0588e0aed6\":\"0x1158e460913d00000\",\"0x3552a496eba67f12be6eedab360cd13661dc7480\":\"0x1043561a8829300000\",\"0x3554947b7b947b0040da52ca180925c6d3b88ffe\":\"0x39fbae8d042dd0000\",\"0x355c0c39f5d5700b41d375b3f17851dcd52401f9\":\"0xd7b3b7ba5abf4c0000\",\"0x355ccfe0e77d557b971be1a558bc02df9eee0594\":\"0x5f5cb1afc865280000\",\"0x3571cf7ad304ecaee595792f4bbfa484418549d6\":\"0x13bcd0d892d9e160000\",\"0x3575c770668a9d179f1ef768c293f80166e2aa3d\":\"0x19b21248a3ef280000\",\"0x357a02c0a9dfe287de447fb67a70ec5b62366647\":\"0x1731790534df20000\",\"0x35855ec641ab9e081ed0c2a6dcd81354d0244a87\":\"0x4127abe993a7aa8000\",\"0x3588895ac9fbafec012092dc05c0c302d90740fa\":\"0xa2a15d09519be00000\",\"0x3599493ce65772cf93e98af1195ec0955dc98002\":\"0x5151590c67b3280000\",\"0x35a08081799173e001cc5bd46a02406dc95d1787\":\"0x21e19e0c9bab2400000\",\"0x35a549e8fd6c368d6dcca6d2e7d18e4db95f5284\":\"0x1b1a089237073d0000\",\"0x35a6885083c899dabbf530ed6c12f4dd3a204cf5\":\"0xad78ebc5ac6200000\",\"0x35aaa0465d1c260c420fa30e2629869fb6559207\":\"0x263781e0e087c80000\",\"0x35ac1d3ed7464fa3db14e7729213ceaa378c095e\":\"0x52663ccab1e1c00000\",\"0x35af040a0cc2337a76af288154c7561e1a233349\":\"0x3635c9adc5dea00000\",\"0x35b03ea4245736f57b85d2eb79628f036ddcd705\":\"0xd8d726b7177a800000\",\"0x35bd246865fab490ac087ac1f1d4f2c10d0cda03\":\"0x15af1d78b58c400000\",\"0x35bf6688522f35467a7f75302314c02ba176800e\":\"0x3af418202d954e00000\",\"0x35c8adc11125432b3b77acd64625fe58ebee9d66\":\"0x6c6b935b8bbd400000\",\"0x35d2970f49dcc81ea9ee707e9c8a0ab2a8bb7463\":\"0x4e1003b28d92800000\",\"0x35e096120deaa5c1ecb1645e2ccb8b4edbd9299a\":\"0x1b1ae4d6e2ef500000\",\"0x35ea2163a38cdf9a123f82a5ec00258dae0bc767\":\"0xd8d726b7177a800000\",\"0x35f1da127b83376f1b88c82a3359f67a5e67dd50\":\"0x678a932062e4180000\",\"0x35f2949cf78bc219bb4f01907cf3b4b3d3865482\":\"0xfb5c86c92e4340000\",\"0x35f5860149e4bbc04b8ac5b272be55ad1aca58e0\":\"0xad78ebc5ac6200000\",\"0x3602458da86f6d6a9d9eb03daf97fe5619d442fa\":\"0x6c6b935b8bbd400000\",\"0x3605372d93a9010988018f9f315d032ed1880fa1\":\"0x1b1bcf51896a7d0000\",\"0x3616d448985f5d32aefa8b93a993e094bd854986\":\"0xb227f63be813c0000\",\"0x3616fb46c81578c9c8eb4d3bf880451a88379d7d\":\"0xad78ebc5ac6200000\",\"0x361c75931696bc3d427d93e76c77fd13b241f6f4\":\"0x1dc5d8fc266dd60000\",\"0x361d9ed80b5bd27cf9f1226f26753258ee5f9b3f\":\"0xbf6914ba7d72c20000\",\"0x361f3ba9ed956b770f257d3672fe1ff9f7b0240c\":\"0x2086ac351052600000\",\"0x36227cdfa0fd3b9d7e6a744685f5be9aa366a7f0\":\"0xac2730ee9c6c18000\",\"0x362fbcb10662370a068fc2652602a2577937cce6\":\"0xad78ebc5ac6200000\",\"0x3630c5e565ceaa8a0f0ffe32875eae2a6ce63c19\":\"0x937722b3774d00000\",\"0x36339f84a5c2b44ce53dfdb6d4f97df78212a7df\":\"0x116f18b81715a00000\",\"0x36343aeca07b6ed58a0e62fa4ecb498a124fc971\":\"0x1043561a8829300000\",\"0x366175403481e0ab15bb514615cbb989ebc68f82\":\"0x6c6b935b8bbd400000\",\"0x36726f3b885a24f92996da81625ec8ad16d8cbe6\":\"0x53af75d18148578000\",\"0x3673954399f6dfbe671818259bb278e2e92ee315\":\"0x2a5a058fc295ed000000\",\"0x36758e049cd98bcea12277a676f9297362890023\":\"0xd8d726b7177a800000\",\"0x367f59cc82795329384e41e1283115e791f26a01\":\"0x6c6b935b8bbd400000\",\"0x36810ff9d213a271eda2b8aa798be654fa4bbe06\":\"0x6c6b935b8bbd400000\",\"0x368c5414b56b8455171fbf076220c1cba4b5ca31\":\"0x1e3ef911e83d720000\",\"0x3690246ba3c80679e22eac4412a1aefce6d7cd82\":\"0x43c33c1937564800000\",\"0x36928b55bc861509d51c8cf1d546bfec6e3e90af\":\"0x6acb3df27e1f880000\",\"0x369822f5578b40dd1f4471706b22cd971352da6b\":\"0x12c1b6eed03d280000\",\"0x369ef761195f3a373e24ece6cd22520fe0b9e86e\":\"0x1cffafc94db2088000\",\"0x36a08fd6fd1ac17ce15ed57eefb12a2be28188bf\":\"0x487a9a304539440000\",\"0x36a0e61e1be47fa87e30d32888ee0330901ca991\":\"0x1158e460913d00000\",\"0x36b2c85e3aeeebb70d63c4a4730ce2e8e88a3624\":\"0x21e19e0c9bab2400000\",\"0x36bf43ff35df90908824336c9b31ce33067e2f50\":\"0x49721510c1c1e9480000\",\"0x36bfe1fa3b7b70c172eb042f6819a8972595413e\":\"0x3635c9adc5dea00000\",\"0x36c510bf8d6e569bf2f37d47265dbcb502ff2bce\":\"0x65a4da25d3016c00000\",\"0x36d85dc3683156e63bf880a9fab7788cf8143a27\":\"0x43c33c1937564800000\",\"0x36df8f883c1273ec8a171f7a33cfd649b1fe6075\":\"0xc52484ac416890000\",\"0x36e156610cd8ff64e780d89d0054385ca76755aa\":\"0x2f6f10780d22cc00000\",\"0x36fec62c2c425e219b18448ad757009d8c54026f\":\"0x15af1d78b58c400000\",\"0x3700e3027424d939dbde5d42fb78f6c4dbec1a8f\":\"0x22b1c8c1227a00000\",\"0x3702e704cc21617439ad4ea27a5714f2fda1e932\":\"0x3635c9adc5dea00000\",\"0x3703350c4d6fe337342cddc65bf1e2386bf3f9b2\":\"0x6d8121a194d1100000\",\"0x3708e59de6b4055088782902e0579c7201a8bf50\":\"0x2a5a058fc295ed000000\",\"0x3712367e5e55a96d5a19168f6eb2bc7e9971f869\":\"0x3635c9adc5dea00000\",\"0x37195a635dcc62f56a718049d47e8f9f96832891\":\"0x6acb3df27e1f880000\",\"0x3727341f26c12001e378405ee38b2d8464ec7140\":\"0x6c6b935b8bbd400000\",\"0x372e453a6b629f27678cc8aeb5e57ce85ec0aef9\":\"0xad78ebc5ac6200000\",\"0x3734cb187491ede713ae5b3b2d12284af46b8101\":\"0xa2a15d09519be00000\",\"0x3737216ee91f177732fb58fa4097267207e2cf55\":\"0x52663ccab1e1c00000\",\"0x373c547e0cb5ce632e1c5ad66155720c01c40995\":\"0xfe54dcdce6c55a0000\",\"0x376cd7577383e902951b60a2017ba7ea29e33576\":\"0x6c6b935b8bbd400000\",\"0x378ea1dc8edc19bae82638029ea8752ce98bcfcd\":\"0x6c6b935b8bbd400000\",\"0x378f37243f3ff0bef5e1dc85eb4308d9340c29f9\":\"0x6c6e59e67c78540000\",\"0x37959c20b7e9931d72f5a8ae869dafddad3b6d5c\":\"0xad78ebc5ac6200000\",\"0x379a7f755a81a17edb7daaa28afc665dfa6be63a\":\"0x15af1d78b58c40000\",\"0x379c7166849bc24a02d6535e2def13daeef8aa8d\":\"0x56bc75e2d63100000\",\"0x37a05aceb9395c8635a39a7c5d266ae610d10bf2\":\"0x65a4da25d3016c00000\",\"0x37a10451f36166cf643dd2de6c1cbba8a011cfa3\":\"0x14998f32ac78700000\",\"0x37a7a6ff4ea3d60ec307ca516a48d3053bb79cbb\":\"0x6c6b935b8bbd400000\",\"0x37ab66083a4fa23848b886f9e66d79cdc150cc70\":\"0x12be22ffb5ec00380000\",\"0x37ac29bda93f497bc4aeaab935452c431510341e\":\"0x35659ef93f0fc40000\",\"0x37b8beac7b1ca38829d61ab552c766f48a10c32f\":\"0x15af1d78b58c400000\",\"0x37bbc47212d82fcb5ee08f5225ecc2041ad2da7d\":\"0xb1cf24ddd0b1400000\",\"0x37cb868d2c3f95b257611eb34a4188d58b749802\":\"0x6c6b935b8bbd400000\",\"0x37d980a12ee3bf23cc5cdb63b4ae45691f74c837\":\"0x6c6b935b8bbd400000\",\"0x37e169a93808d8035698f815c7235613c1e659f2\":\"0x3635c9adc5dea00000\",\"0x37eada93c475ded2f7e15e7787d400470fa52062\":\"0xad78ebc5ac6200000\",\"0x37fac1e6bc122e936dfb84de0c4bef6e0d60c2d7\":\"0x6c6b935b8bbd400000\",\"0x3807eff43aa97c76910a19752dd715ee0182d94e\":\"0xd90156f6fc2fb0000\",\"0x3815b0743f94fc8cc8654fd9d597ed7d8b77c57e\":\"0x2809d429d896750000\",\"0x381db4c8465df446a4ce15bf81d47e2f17c980bf\":\"0x6c6b935b8bbd4000000\",\"0x38202c5cd7078d4f887673ab07109ad8ada89720\":\"0x3635c9adc5dea00000\",\"0x3821862493242c0aeb84b90de05d250c1e50c074\":\"0x11776c58e946dc0000\",\"0x382591e7217b435e8e884cdbf415fe377a6fe29e\":\"0x1b2df9d219f57980000\",\"0x382ba76db41b75606dd48a48f0137e9174e031b6\":\"0x1158e460913d00000\",\"0x3831757eae7557cb8a37a4b10644b63e4d3b3c75\":\"0xad78ebc5ac6200000\",\"0x383304dd7a5720b29c1a10f60342219f48032f80\":\"0x12f939c99edab800000\",\"0x383a7c899ee18bc214969870bc7482f6d8f3570e\":\"0x21e19e0c9bab2400000\",\"0x38430e931d93be01b4c3ef0dc535f1e0a9610063\":\"0x21e19e0c9bab2400000\",\"0x38439aaa24e3636f3a18e020ea1da7e145160d86\":\"0x8cf23f909c0fa00000\",\"0x38458e0685573cb4d28f53098829904570179266\":\"0x22b1c8c1227a00000\",\"0x3847667038f33b01c1cc795d8daf5475eff5a0d4\":\"0x277b9bf4246c410000\",\"0x38643babea6011316cc797d9b093c897a17bdae7\":\"0x1220bb7445daa00000\",\"0x38695fc7e1367ceb163ebb053751f9f68ddb07a0\":\"0x6c6b935b8bbd400000\",\"0x3872f48dc5e3f817bc6b2ad2d030fc5e0471193d\":\"0xd8d726b7177a800000\",\"0x387eeafd6b4009deaf8bd5b85a72983a8dcc3487\":\"0xd8d726b7177a800000\",\"0x3881defae1c07b3ce04c78abe26b0cdc8d73f010\":\"0xad78ebc5ac6200000\",\"0x3883becc08b9be68ad3b0836aac3b620dc0017ef\":\"0x6c6b935b8bbd400000\",\"0x3885fee67107dc3a3c741ee290c98918c9b99397\":\"0x1158e460913d00000\",\"0x3887192c7f705006b630091276b39ac680448d6b\":\"0x340aad21b3b700000\",\"0x38898bbb4553e00bbfd0cf268b2fc464d154add5\":\"0x1158e460913d000000\",\"0x388bdcdae794fc44082e667501344118ea96cd96\":\"0x5a87e7d7f5f6580000\",\"0x388c85a9b9207d8146033fe38143f6d34b595c47\":\"0xad78ebc5ac6200000\",\"0x3896ad743579d38e2302454d1fb6e2ab69e01bfd\":\"0x65ea3db75546600000\",\"0x38a3dccf2fcfe0c91a2624bd0cbf88ee4a076c33\":\"0x6c6b935b8bbd400000\",\"0x38a744efa6d5c2137defef8ef9187b649eee1c78\":\"0xd8d726b7177a800000\",\"0x38ac664ee8e0795e4275cb852bcba6a479ad9c8d\":\"0x1158e460913d00000\",\"0x38b2197106123387a0d4de368431a8bacdda30e2\":\"0x1158e460913d00000\",\"0x38b3965c21fa893931079beacfffaf153678b6eb\":\"0x93c6a0a51e2670000\",\"0x38b403fb1fb7c14559a2d6f6564a5552bca39aff\":\"0x6c6b935b8bbd400000\",\"0x38b50146e71916a5448de12a4d742135dcf39833\":\"0x6d190c475169a200000\",\"0x38bf2a1f7a69de0e2546adb808b36335645da9ff\":\"0x6c700439d9b5600000\",\"0x38c10b90c859cbb7815692f99dae520ab5febf5e\":\"0x2c9e4966fa5cf240000\",\"0x38c7851f5ffd4cee98df30f3b25597af8a6ca263\":\"0x8ead3a2f7d7e180000\",\"0x38d2e9154964b41c8d50a7487d391e7ee2c3d3c2\":\"0xbdbc41e0348b300000\",\"0x38da1ba2de9e2c954b092dd9d81204fd016ba016\":\"0x2268ed01f34b3300000\",\"0x38df0c4abe7ded5fe068eadf154ac691774324a4\":\"0x61093d7c2c6d380000\",\"0x38e2af73393ea98a1d993a74df5cd754b98d529a\":\"0x61093d7c2c6d380000\",\"0x38e46de4453c38e941e7930f43304f94bb7b2be8\":\"0x6cb7e74867d5e60000\",\"0x38e7dba8fd4f1f850dbc2649d8e84f0952e3eb3c\":\"0x2b5e3af16b1880000\",\"0x38e8a31af2d265e31a9fff2d8f46286d1245a467\":\"0x1158e460913d00000\",\"0x38ea6f5b5a7b88417551b4123dc127dfe9342da6\":\"0x15af1d78b58c400000\",\"0x38eec6e217f4d41aa920e424b9525197041cd4c6\":\"0xf00d25eb922e670000\",\"0x38f387e1a4ed4a73106ef2b462e474e2e3143ad0\":\"0x14542ba12a337c00000\",\"0x391161b0e43c302066e8a68d2ce7e199ecdb1d57\":\"0xd8d726b7177a800000\",\"0x3915eab5ab2e5977d075dec47d96b68b4b5cf515\":\"0xd07018185120f400000\",\"0x391a77405c09a72b5e8436237aaaf95d68da1709\":\"0x2a9264af3d1b90000\",\"0x391f20176d12360d724d51470a90703675594a4d\":\"0x56bc75e2d631000000\",\"0x392433d2ce83d3fb4a7602cca3faca4ec140a4b0\":\"0x2c3c465ca58ec0000\",\"0x393f783b5cdb86221bf0294fb714959c7b45899c\":\"0x14061b9d77a5e980000\",\"0x393ff4255e5c658f2e7f10ecbd292572671bc2d2\":\"0x6c6b935b8bbd400000\",\"0x394132600f4155e07f4d45bc3eb8d9fb72dcd784\":\"0x9f6e92edea07d40000\",\"0x3951e48e3c869e6b72a143b6a45068cdb9d466d0\":\"0x1158e460913d00000\",\"0x3954bdfe0bf587c695a305d9244c3d5bdddac9bb\":\"0x410278327f985608000\",\"0x395d6d255520a8db29abc47d83a5db8a1a7df087\":\"0x56bc75e2d63100000\",\"0x39636b25811b176abfcfeeca64bc87452f1fdff4\":\"0x15af1d78b58c400000\",\"0x3969b4f71bb8751ede43c016363a7a614f76118e\":\"0x6c6b935b8bbd400000\",\"0x39782ffe06ac78822a3c3a8afe305e50a56188ce\":\"0x21e19e0c9bab2400000\",\"0x397a6ef8763a18f00fac217e055c0d3094101011\":\"0x6c6b935b8bbd400000\",\"0x397cdb8c80c67950b18d654229610e93bfa6ee1a\":\"0x3f95c8e08215210000\",\"0x39824f8bced176fd3ea22ec6a493d0ccc33fc147\":\"0xd8d726b7177a800000\",\"0x39936c2719450b9420cc2522cf91db01f227c1c1\":\"0x1b1ae4d6e2ef500000\",\"0x3995e096b08a5a726800fcd17d9c64c64e088d2b\":\"0xad78ebc5ac6200000\",\"0x399aa6f5d078cb0970882bc9992006f8fbdf3471\":\"0x3635c9adc5dea00000\",\"0x39aa05e56d7d32385421cf9336e90d3d15a9f859\":\"0x168d28e3f00280000\",\"0x39aaf0854db6eb39bc7b2e43846a76171c0445de\":\"0x6449e84e47a8a80000\",\"0x39b1c471ae94e12164452e811fbbe2b3cd7275ac\":\"0x6c6b935b8bbd400000\",\"0x39b299327490d72f9a9edff11b83afd0e9d3c450\":\"0xad78ebc5ac6200000\",\"0x39bac68d947859f59e9226089c96d62e9fbe3cde\":\"0x22b1c8c1227a00000\",\"0x39bfd978689bec048fc776aa15247f5e1d7c39a2\":\"0x43c33c1937564800000\",\"0x39c773367c8825d3596c686f42bf0d14319e3f84\":\"0x73f75d1a085ba0000\",\"0x39d4a931402c0c79c457186f24df8729cf957031\":\"0xd8d726b7177a800000\",\"0x39d6caca22bccd6a72f87ee7d6b59e0bde21d719\":\"0x6c8754c8f30c080000\",\"0x39e0db4d60568c800b8c5500026c2594f5768960\":\"0x3635c9adc5dea00000\",\"0x39ee4fe00fbced647068d4f57c01cb22a80bccd1\":\"0x14542ba12a337c00000\",\"0x39f198331e4b21c1b760a3155f4ab2fe00a74619\":\"0x6c6b935b8bbd400000\",\"0x39f44663d92561091b82a70dcf593d754005973a\":\"0xad78b2edc21598000\",\"0x3a035594c747476d42d1ee966c36224cdd224993\":\"0x134af74569f9c50000\",\"0x3a04572847d31e81f7765ca5bfc9d557159f3683\":\"0x7362d0dabeafd8000\",\"0x3a06e3bb1edcfd0c44c3074de0bb606b049894a2\":\"0x21e19e0c9bab2400000\",\"0x3a10888b7e149cae272c01302c327d0af01a0b24\":\"0xebec21ee1da40000\",\"0x3a3108c1e680a33b336c21131334409d97e5adec\":\"0x1158e460913d00000\",\"0x3a368efe4ad786e26395ec9fc6ad698cae29fe01\":\"0x2245899675f9f40000\",\"0x3a3dd104cd7eb04f21932fd433ea7affd39369f5\":\"0x13614f23e242260000\",\"0x3a4297da3c555e46c073669d0478fce75f2f790e\":\"0x6ac5c62d9486070000\",\"0x3a476bd2c9e664c63ab266aa4c6e4a4825f516c3\":\"0xad78ebc5ac6200000\",\"0x3a48e0a7098b06a905802b87545731118e89f439\":\"0x6c6b935b8bbd400000\",\"0x3a4da78dce05aeb87de9aead9185726da1926798\":\"0xad78ebc5ac6200000\",\"0x3a59a08246a8206f8d58f70bb1f0d35c5bcc71bd\":\"0xa076407d3f7440000\",\"0x3a72d635aadeee4382349db98a1813a4cfeb3df1\":\"0x2a5a058fc295ed000000\",\"0x3a7db224acae17de7798797d82cdf8253017dfa8\":\"0x10f0cf064dd59200000\",\"0x3a805fa0f7387f73055b7858ca8519edd93d634f\":\"0x6449e84e47a8a80000\",\"0x3a84e950ed410e51b7e8801049ab2634b285fea1\":\"0x3f52fdaa822d2c80000\",\"0x3a86ee94862b743dd34f410969d94e2c5652d4ad\":\"0xaede69ad30e810000\",\"0x3a9132b7093d3ec42e1e4fb8cb31ecdd43ae773c\":\"0x6c6b935b8bbd400000\",\"0x3a9960266df6492063538a99f487c950a3a5ec9e\":\"0x5150ae84a8cdf000000\",\"0x3a9b111029ce1f20c9109c7a74eeeef34f4f2eb2\":\"0xd8d726b7177a800000\",\"0x3a9e5441d44b243be55b75027a1ceb9eacf50df2\":\"0x3635c9adc5dea00000\",\"0x3aa07a34a1afc8967d3d1383b96b62cf96d5fa90\":\"0x43c33c1937564800000\",\"0x3aa42c21b9b31c3e27ccd17e099af679cdf56907\":\"0x1b1ae4d6e2ef5000000\",\"0x3aa948ea02397755effb2f9dc9392df1058f7e33\":\"0x2e141ea081ca080000\",\"0x3aadf98b61e5c896e7d100a3391d3250225d61df\":\"0xcaf67003701680000\",\"0x3aae4872fd9093cbcad1406f1e8078bab50359e2\":\"0x222c8eb3ff6640000\",\"0x3abb8adfc604f48d5984811d7f1d52fef6758270\":\"0xf29719b66f110c0000\",\"0x3ac2f0ff1612e4a1c346d53382abf6d8a25baa53\":\"0x6c6b935b8bbd400000\",\"0x3ac9dc7a436ae98fd01c7a9621aa8e9d0b8b531d\":\"0x61093d7c2c6d380000\",\"0x3ad06149b21c55ff867cc3fb9740d2bcc7101231\":\"0x29b76432b94451200000\",\"0x3ad70243d88bf0400f57c8c1fd57811848af162a\":\"0x2e9ee5c38653f00000\",\"0x3ad915d550b723415620f5a9b5b88a85f382f035\":\"0x3635c9adc5dea00000\",\"0x3ae160e3cd60ae31b9d6742d68e14e76bd96c517\":\"0x1a055690d9db80000\",\"0x3ae62bd271a760637fad79c31c94ff62b4cd12f7\":\"0x6c6b935b8bbd400000\",\"0x3aea4e82d2400248f99871a41ca257060d3a221b\":\"0x3635c9adc5dea00000\",\"0x3af65b3e28895a4a001153391d1e69c31fb9db39\":\"0xd5967be4fc3f100000\",\"0x3b07db5a357f5af2484cbc9d77d73b1fd0519fc7\":\"0x1b1ae4d6e2ef500000\",\"0x3b0accaf4b607cfe61d17334c214b75cdefdbd89\":\"0x6c6b935b8bbd400000\",\"0x3b13631a1b89cb566548899a1d60915cdcc4205b\":\"0x6c6b935b8bbd400000\",\"0x3b159099075207c6807663b1f0f7eda54ac8cce3\":\"0x6ac4e65b69f92d8000\",\"0x3b1937d5e793b89b63fb8eb5f1b1c9ca6ba0fa8e\":\"0x6c6b935b8bbd400000\",\"0x3b22da2a0271c8efe102532773636a69b1c17e09\":\"0x1b36a6444a3e180000\",\"0x3b22dea3c25f1b59c7bd27bb91d3a3eaecef3984\":\"0x56bc75e2d63100000\",\"0x3b2367f8494b5fe18d683c055d89999c9f3d1b34\":\"0x21e19e0c9bab2400000\",\"0x3b2c45990e21474451cf4f59f01955b331c7d7c9\":\"0x6c6b935b8bbd400000\",\"0x3b4100e30a73b0c734b18ffa8426d19b19312f1a\":\"0xbb5d1aa700afd900000\",\"0x3b42a66d979f582834747a8b60428e9b4eeccd23\":\"0x21a1c790fadc580000\",\"0x3b4768fd71e2db2cbe7fa050483c27b4eb931df3\":\"0x6c6b935b8bbd400000\",\"0x3b566a8afad19682dc2ce8679a3ce444a5b0fd4f\":\"0x6c6b935b8bbd400000\",\"0x3b5c251d7fd7893ba209fe541cecd0ce253a990d\":\"0x65a4da25d3016c00000\",\"0x3b5e8b3c77f792decb7a8985df916efb490aac23\":\"0x6c6b935b8bbd400000\",\"0x3b6e814f770748a7c3997806347605480a3fd509\":\"0x6c6b935b8bbd400000\",\"0x3b7b4f53c45655f3dc5f017edc23b16f9bc536fa\":\"0x56bc75e2d63100000\",\"0x3b7b8e27de33d3ce7961b98d19a52fe79f6c25be\":\"0x152d02c7e14af6800000\",\"0x3b7c77dbe95dc2602ce3269a9545d04965fefdbd\":\"0x6c6b935b8bbd400000\",\"0x3b8098533f7d9bdcd307dbb23e1777ca18418936\":\"0x6c6b935b8bbd400000\",\"0x3b93b16136f11eaf10996c95990d3b2739ccea5f\":\"0x21e19e0c9bab2400000\",\"0x3bab4b01a7c84ba13feea9b0bb191b77a3aadca3\":\"0xad78ebc5ac6200000\",\"0x3bb53598cc20e2055dc553b049404ac9b7dd1e83\":\"0x21571df77c00be0000\",\"0x3bbc13d04accc0707aebdcaef087d0b87e0b5ee3\":\"0xbed1d0263d9f000000\",\"0x3bc6e3ee7a56ce8f14a37532590f63716b9966e8\":\"0x6c6b935b8bbd400000\",\"0x3bc85d6c735b9cda4bba5f48b24b13e70630307b\":\"0x6acb3df27e1f880000\",\"0x3bd624b548cb659736907ed8aa3c0c705e24b575\":\"0x6c6b935b8bbd400000\",\"0x3bd9a06d1bd36c4edd27fc0d1f5b088ddae3c72a\":\"0x1b1a7a420ba00d0000\",\"0x3bddbc8134f77d55597fc97c26d26698090604eb\":\"0xbe202d6a0eda0000\",\"0x3bf86ed8a3153ec933786a02ac090301855e576b\":\"0x5f4a8c8375d155400000\",\"0x3bfbd3847c17a61cf3f17b52f8eba1b960b3f39f\":\"0xa2a15d09519be00000\",\"0x3c03bbc023e1e93fa3a3a6e428cf0cd8f95e1ec6\":\"0x52663ccab1e1c00000\",\"0x3c0c3defac9cea7acc319a96c30b8e1fedab4574\":\"0x692ae8897081d00000\",\"0x3c15b3511df6f0342e7348cc89af39a168b7730f\":\"0x3635c9adc5dea00000\",\"0x3c1f91f301f4b565bca24751aa1f761322709ddd\":\"0x61093d7c2c6d380000\",\"0x3c286cfb30146e5fd790c2c8541552578de334d8\":\"0x2291b11aa306e8c0000\",\"0x3c322e611fdb820d47c6f8fc64b6fad74ca95f5e\":\"0xd258ece1b13150000\",\"0x3c5a241459c6abbf630239c98a30d20b8b3ac561\":\"0x88b23acffd9900000\",\"0x3c79c863c3d372b3ff0c6f452734a7f97042d706\":\"0x98a7d9b8314c00000\",\"0x3c83c1701db0388b68210d00f5717cd9bd322c6a\":\"0x65a4da25d3016c00000\",\"0x3c860e2e663f46db53427b29fe3ea5e5bf62bbcc\":\"0x556f64c1fe7fa0000\",\"0x3c869c09696523ced824a070414605bb76231ff2\":\"0x3635c9adc5dea00000\",\"0x3c925619c9b33144463f0537d896358706c520b0\":\"0x6c6b935b8bbd400000\",\"0x3c98594bf68b57351e8814ae9e6dfd2d254aa06f\":\"0x1043561a8829300000\",\"0x3cadeb3d3eed3f62311d52553e70df4afce56f23\":\"0xd8d726b7177a800000\",\"0x3caedb5319fe806543c56e5021d372f71be9062e\":\"0x878678326eac9000000\",\"0x3cafaf5e62505615068af8eb22a13ad8a9e55070\":\"0x6c660645aa47180000\",\"0x3cb179cb4801a99b95c3b0c324a2bdc101a65360\":\"0x168d28e3f00280000\",\"0x3cb561ce86424b359891e364ec925ffeff277df7\":\"0xad78ebc5ac6200000\",\"0x3ccb71aa6880cb0b84012d90e60740ec06acd78f\":\"0x6c6b935b8bbd400000\",\"0x3ccef88679573947e94997798a1e327e08603a65\":\"0x2bc916d69f3b020000\",\"0x3cd1d9731bd548c1dd6fcea61beb75d91754f7d3\":\"0x1161d01b215cae48000\",\"0x3cd3a6e93579c56d494171fc533e7a90e6f59464\":\"0x6c6b935b8bbd400000\",\"0x3cd6b7593cbee77830a8b19d0801958fcd4bc57a\":\"0x1b1ae4d6e2ef500000\",\"0x3cd7f7c7c2353780cde081eeec45822b25f2860c\":\"0xad78ebc5ac6200000\",\"0x3ce1dc97fcd7b7c4d3a18a49d6f2a5c1b1a906d7\":\"0xad78ebc5ac6200000\",\"0x3cea302a472a940379dd398a24eafdbadf88ad79\":\"0xa2a15d09519be00000\",\"0x3ceca96bb1cdc214029cbc5e181d398ab94d3d41\":\"0x10f0cf064dd592000000\",\"0x3cf484524fbdfadae26dc185e32b2b630fd2e726\":\"0x185452cb2a91c30000\",\"0x3cf9a1d465e78b7039e3694478e2627b36fcd141\":\"0x4a60532ad51bf00000\",\"0x3cfbf066565970639e130df2a7d16b0e14d6091c\":\"0x5c283d410394100000\",\"0x3d09688d93ad07f3abe68c722723cd680990435e\":\"0x65a4ce99f769e6e0000\",\"0x3d31587b5fd5869845788725a663290a49d3678c\":\"0x1b1ae4d6e2ef500000\",\"0x3d3fad49c9e5d2759c8e8e5a7a4d60a0dd135692\":\"0x1158e460913d00000\",\"0x3d574fcf00fae1d98cc8bf9ddfa1b3953b9741bc\":\"0x6acb3df27e1f880000\",\"0x3d5a8b2b80be8b35d8ecf789b5ed7a0775c5076c\":\"0x1158e460913d00000\",\"0x3d66cd4bd64d5c8c1b5eea281e106d1c5aad2373\":\"0x69c4f3a8a110a60000\",\"0x3d6ae053fcbc318d6fd0fbc353b8bf542e680d27\":\"0xc673ce3c40160000\",\"0x3d6ff82c9377059fb30d9215723f60c775c891fe\":\"0xd8e5ce617f2d50000\",\"0x3d79a853d71be0621b44e29759656ca075fdf409\":\"0x6c6b935b8bbd400000\",\"0x3d7ea5bf03528100ed8af8aed2653e921b6e6725\":\"0x3635c9adc5dea00000\",\"0x3d813ff2b6ed57b937dabf2b381d148a411fa085\":\"0x56bc75e2d63100000\",\"0x3d881433f04a7d0d27f84944e08a512da3555287\":\"0x410d586a20a4c00000\",\"0x3d89e505cb46e211a53f32f167a877bec87f4b0a\":\"0x15b3557f1937f8000\",\"0x3d8d0723721e73a6c0d860aa0557abd14c1ee362\":\"0x10f0cf064dd59200000\",\"0x3d8f39881b9edfe91227c33fa4cdd91e678544b0\":\"0x4ab07ba43ada98000\",\"0x3d9d6be57ff83e065985664f12564483f2e600b2\":\"0x6eace43f23bd800000\",\"0x3da39ce3ef4a7a3966b32ee7ea4ebc2335a8f11f\":\"0x6c6b935b8bbd400000\",\"0x3daa01ceb70eaf9591fa521ba4a27ea9fb8ede4a\":\"0x5a63d2c9bc76540000\",\"0x3db5fe6a68bd3612ac15a99a61e555928eeceaf3\":\"0x55a6e79ccd1d300000\",\"0x3db9ed7f024c7e26372feacf2b050803445e3810\":\"0x45b148b4996a300000\",\"0x3dbf0dbfd77890800533f09dea8301b9f025d2a6\":\"0x3635c9adc5dea00000\",\"0x3dcef19c868b15d34eda426ec7e04b18b6017002\":\"0x6c68ccd09b022c0000\",\"0x3dd12e556a603736feba4a6fa8bd4ac45d662a04\":\"0x23757b9183e078280000\",\"0x3dde8b15b3ccbaa5780112c3d674f313bba68026\":\"0x601d515a3e4f940000\",\"0x3ddedbe48923fbf9e536bf9ffb0747c9cdd39eef\":\"0x368c8623a8b4d100000\",\"0x3deae43327913f62808faa1b6276a2bd6368ead9\":\"0x6c6b935b8bbd400000\",\"0x3df762049eda8ac6927d904c7af42f94e5519601\":\"0x6c6b935b8bbd400000\",\"0x3e040d40cb80ba0125f3b15fdefcc83f3005da1b\":\"0x384524cc70b7780000\",\"0x3e0b8ed86ed669e12723af7572fbacfe829b1e16\":\"0x514de7f9b812dc0000\",\"0x3e0cbe6a6dcb61f110c45ba2aa361d7fcad3da73\":\"0x1b2df9d219f57980000\",\"0x3e194b4ecef8bb711ea2ff24fec4e87bd032f7d1\":\"0x8b9dc1bc1a036a8000\",\"0x3e1b2230afbbd310b4926a4c776d5ae7819c661d\":\"0x65a4da25d3016c00000\",\"0x3e1c53300e4c168912163c7e99b95da268ad280a\":\"0x3662325cd18fe00000\",\"0x3e1c962063e0d5295941f210dca3ab531eec8809\":\"0xa2a15d09519be00000\",\"0x3e2ca0d234baf607ad466a1b85f4a6488ef00ae7\":\"0x4da21a3483d568000\",\"0x3e2f26235e137a7324e4dc154b5df5af46ea1a49\":\"0x137aad8032db90000\",\"0x3e3161f1ea2fbf126e79da1801da9512b37988c9\":\"0xa6dd90cae5114480000\",\"0x3e36c17253c11cf38974ed0db1b759160da63783\":\"0x17b7883c06916600000\",\"0x3e3cd3bec06591d6346f254b621eb41c89008d31\":\"0x35dfbeda9f37340000\",\"0x3e45bd55db9060eced923bb9cb733cb3573fb531\":\"0x58e7926ee858a00000\",\"0x3e4d13c55a84e46ed7e9cb90fd355e8ad991e38f\":\"0x3635c9adc5dea00000\",\"0x3e4e9265223c9738324cf20bd06006d0073edb8c\":\"0x73f75d1a085ba0000\",\"0x3e4fbd661015f6461ed6735cefef01f31445de3a\":\"0x36e342998b8b0200000\",\"0x3e53ff2107a8debe3328493a92a586a7e1f49758\":\"0x4e69c2a71a405ab0000\",\"0x3e5a39fdda70df1126ab0dc49a7378311a537a1f\":\"0x821ab0d44149800000\",\"0x3e5abd09ce5af7ba8487c359e0f2a93a986b0b18\":\"0x21e19e0c9bab2400000\",\"0x3e5cb8928c417825c03a3bfcc52183e5c91e42d7\":\"0xe731d9c52c962f0000\",\"0x3e5e93fb4c9c9d1246f8f247358e22c3c5d17b6a\":\"0x821ab0d4414980000\",\"0x3e618350fa01657ab0ef3ebac8e37012f8fc2b6f\":\"0x9806de3da6e9780000\",\"0x3e63ce3b24ca2865b4c5a687b7aea3597ef6e548\":\"0x6c6b935b8bbd400000\",\"0x3e66b84769566ab67945d5fa81373556bcc3a1fa\":\"0x83d6c7aab63600000\",\"0x3e76a62db187aa74f63817533b306cead0e8cebe\":\"0x69b5afac750bb800000\",\"0x3e7a966b5dc357ffb07e9fe067c45791fd8e3049\":\"0x3342d60dff1960000\",\"0x3e81772175237eb4cbe0fe2dcafdadffeb6a1999\":\"0x1dd0c885f9a0d800000\",\"0x3e8349b67f5745449f659367d9ad4712db5b895a\":\"0x62a992e53a0af00000\",\"0x3e83544f0082552572c782bee5d218f1ef064a9d\":\"0x56cd55fc64dfe0000\",\"0x3e84b35c5b2265507061d30b6f12da033fe6f8b9\":\"0x61093d7c2c6d380000\",\"0x3e8641d43c42003f0a33c929f711079deb2b9e46\":\"0x1b1ae4d6e2ef500000\",\"0x3e8745ba322f5fd6cb50124ec46688c7a69a7fae\":\"0x10afc1ade3b4ed40000\",\"0x3e914e3018ac00449341c49da71d04dfeeed6221\":\"0xd8d726b7177a800000\",\"0x3e9410d3b9a87ed5e451a6b91bb8923fe90fb2b5\":\"0xad78ebc5ac6200000\",\"0x3e94df5313fa520570ef232bc3311d5f622ff183\":\"0x6c6b935b8bbd400000\",\"0x3e9b34a57f3375ae59c0a75e19c4b641228d9700\":\"0xf8699329677e0000\",\"0x3eada8c92f56067e1bb73ce378da56dc2cdfd365\":\"0x77cde93aeb0d480000\",\"0x3eaf0879b5b6db159b589f84578b6a74f6c10357\":\"0x18938b671fa65a28000\",\"0x3eaf316b87615d88f7adc77c58e712ed4d77966b\":\"0x56dbc4cee24648000\",\"0x3eb8b33b21d23cda86d8288884ab470e164691b5\":\"0x1b1ae4d6e2ef500000\",\"0x3eb9ef06d0c259040319947e8c7a6812aa0253d8\":\"0x90d972f32323c0000\",\"0x3ecc8e1668dde995dc570fe414f44211c534a615\":\"0x6c6b935b8bbd400000\",\"0x3ecdb532e397579662b2a46141e78f8235936a5f\":\"0x39fbae8d042dd0000\",\"0x3eee6f1e96360b7689b3069adaf9af8eb60ce481\":\"0x3635c9adc5dea00000\",\"0x3f08d9ad894f813e8e2148c160d24b353a8e74b0\":\"0xcb49b44ba602d800000\",\"0x3f0c83aac5717962734e5ceaeaecd39b28ad06be\":\"0x6c6b935b8bbd400000\",\"0x3f10800282d1b7ddc78fa92d8230074e1bf6aeae\":\"0x10afc1ade3b4ed40000\",\"0x3f1233714f204de9de4ee96d073b368d8197989f\":\"0x217c41074e6bb0000\",\"0x3f173aa6edf469d185e59bd26ae4236b92b4d8e1\":\"0x1158e460913d000000\",\"0x3f1bc420c53c002c9e90037c44fe6a8ef4ddc962\":\"0x960db77681e940000\",\"0x3f236108eec72289bac3a65cd283f95e041d144c\":\"0x3634bf39ab98788000\",\"0x3f2da093bb16eb064f8bfa9e30b929d15f8e1c4c\":\"0x6c6b935b8bbd400000\",\"0x3f2dd55db7eab0ebee65b33ed8202c1e992e958b\":\"0x2c73c937742c500000\",\"0x3f2f381491797cc5c0d48296c14fd0cd00cdfa2d\":\"0x2b95bdcc39b6100000\",\"0x3f30d3bc9f602232bc724288ca46cd0b0788f715\":\"0xd8d726b7177a800000\",\"0x3f3c8e61e5604cef0605d436dd22accd862217fc\":\"0x487a9a304539440000\",\"0x3f3f46b75cabe37bfacc8760281f4341ca7f463d\":\"0x20ac448235fae88000\",\"0x3f472963197883bbda5a9b7dfcb22db11440ad31\":\"0x1a19643cb1eff08000\",\"0x3f4cd1399f8a34eddb9a17a471fc922b5870aafc\":\"0xad78ebc5ac6200000\",\"0x3f551ba93cd54693c183fb9ad60d65e1609673c9\":\"0x6c6b935b8bbd400000\",\"0x3f627a769e6a950eb87017a7cd9ca20871136831\":\"0x2eb8eb1a172dcb80000\",\"0x3f6dd3650ee428dcb7759553b017a96a94286ac9\":\"0x487a9a304539440000\",\"0x3f747237806fed3f828a6852eb0867f79027af89\":\"0x5150ae84a8cdf00000\",\"0x3f75ae61cc1d8042653b5baec4443e051c5e7abd\":\"0x52d542804f1ce0000\",\"0x3fb7d197b3ba4fe045efc23d50a14585f558d9b2\":\"0x1158e460913d00000\",\"0x3fbc1e4518d73400c6d046359439fb68ea1a49f4\":\"0x3790bb8551376400000\",\"0x3fbed6e7e0ca9c84fbe9ebcf9d4ef9bb49428165\":\"0x6c6b935b8bbd400000\",\"0x3fd0bb47798cf44cdfbe4d333de637df4a00e45c\":\"0x56c5579f722140000\",\"0x3fe40fbd919aad2818df01ee4df46c46842ac539\":\"0x14542ba12a337c00000\",\"0x3fe801e61335c5140dc7eda2ef5204460a501230\":\"0x6c6b935b8bbd400000\",\"0x3ff836b6f57b901b440c30e4dbd065cf37d3d48c\":\"0xad78ebc5ac6200000\",\"0x3ffcb870d4023d255d5167d8a507cefc366b68ba\":\"0x23343c4354d2ac0000\",\"0x401354a297952fa972ad383ca07a0a2811d74a71\":\"0xc249fdd327780000\",\"0x4030a925706b2c101c8c5cb9bd05fbb4f6759b18\":\"0xd8d726b7177a800000\",\"0x403145cb4ae7489fcc90cd985c6dc782b3cc4e44\":\"0x1453ff387b27cac0000\",\"0x403220600a36f73f24e190d1edb2d61be3f41354\":\"0x107ad8f556c6c00000\",\"0x4039bd50a2bde15ffe37191f410390962a2b8886\":\"0xad78ebc5ac6200000\",\"0x403c64896a75cad816a9105e18d8aa5bf80f238e\":\"0x35659ef93f0fc40000\",\"0x403d53cf620f0922b417848dee96c190b5bc8271\":\"0x215f835bc769da80000\",\"0x404100db4c5d0eec557823b58343758bcc2c8083\":\"0x1158e460913d00000\",\"0x4041374b0feef4792e4b33691fb86897a4ff560c\":\"0x13c9647e25a9940000\",\"0x40467d80e74c35407b7db51789234615fea66818\":\"0x150894e849b3900000\",\"0x40585200683a403901372912a89834aadcb55fdb\":\"0x6c6b935b8bbd400000\",\"0x4058808816fdaa3a5fc98ed47cfae6c18315422e\":\"0xad4c8316a0b0c0000\",\"0x405f596b94b947344c033ce2dcbff12e25b79784\":\"0x6c6b935b8bbd400000\",\"0x40630024bd2c58d248edd8465617b2bf1647da0e\":\"0x3635c9adc5dea00000\",\"0x40652360d6716dc55cf9aab21f3482f816cc2cbd\":\"0x21e19e0c9bab2400000\",\"0x407295ebd94b48269c2d569c9b9af9aa05e83e5e\":\"0x21e19e0c9bab2400000\",\"0x4073fa49b87117cb908cf1ab512da754a932d477\":\"0x6acb3df27e1f880000\",\"0x408a69a40715e1b313e1354e600800a1e6dc02a5\":\"0x1e7b891cc92540000\",\"0x409bd75085821c1de70cdc3b11ffc3d923c74010\":\"0xd8d726b7177a800000\",\"0x409d5a962edeeebea178018c0f38b9cdb213f289\":\"0x1158e460913d00000\",\"0x40a331195b977325c2aa28fa2f42cb25ec3c253c\":\"0x6c6b935b8bbd400000\",\"0x40a7f72867a7dc86770b162b7557a434ed50cce9\":\"0x3635c9adc5dea00000\",\"0x40ab0a3e83d0c8ac9366910520eab1772bac3b1a\":\"0x34f10c2dc05e7c0000\",\"0x40ab66fe213ea56c3afb12c75be33f8e32fd085d\":\"0xd8d726b7177a800000\",\"0x40ad74bc0bce2a45e52f36c3debb1b3ada1b7619\":\"0x170162de109c6580000\",\"0x40cf890591eae4a18f812a2954cb295f633327e6\":\"0x29bf736fc591a0000\",\"0x40cf90ef5b768c5da585002ccbe6617650d8e837\":\"0x36330322d5238c0000\",\"0x40d45d9d7625d15156c932b771ca7b0527130958\":\"0x152d02c7e14af6800000\",\"0x40db1ba585ce34531edec5494849391381e6ccd3\":\"0x61093d7c2c6d380000\",\"0x40df495ecf3f8b4cef2a6c189957248fe884bc2b\":\"0x28a857425466f800000\",\"0x40e0dbf3efef9084ea1cd7e503f40b3b4a8443f6\":\"0xd8d726b7177a800000\",\"0x40e2440ae142c880366a12c6d4102f4b8434b62a\":\"0x3635c9adc5dea00000\",\"0x40e3c283f7e24de0410c121bee60a5607f3e29a6\":\"0x3635c9adc5dea00000\",\"0x40ea5044b204b23076b1a5803bf1d30c0f88871a\":\"0x2f6f10780d22cc00000\",\"0x40eddb448d690ed72e05c225d34fc8350fa1e4c5\":\"0x17b7883c06916600000\",\"0x40f4f4c06c732cd35b119b893b127e7d9d0771e4\":\"0x21e19e0c9bab2400000\",\"0x41010fc8baf8437d17a04369809a168a17ca56fb\":\"0x56bc75e2d63100000\",\"0x4103299671d46763978fa4aa19ee34b1fc952784\":\"0xad78ebc5ac6200000\",\"0x41033c1b6d05e1ca89b0948fc64453fbe87ab25e\":\"0x487a9a304539440000\",\"0x41098a81452317c19e3eef0bd123bbe178e9e9ca\":\"0x97c9ce4cf6d5c00000\",\"0x411610b178d5617dfab934d293f512a93e5c10e1\":\"0x93739534d28680000\",\"0x411c831cc6f44f1965ec5757ab4e5b3ca4cffd1f\":\"0x170a0f5040e5040000\",\"0x412a68f6c645559cc977fc4964047a201d1bb0e2\":\"0xa968163f0a57b400000\",\"0x413f4b02669ccff6806bc826fcb7deca3b0ea9bc\":\"0x1158e460913d00000\",\"0x414599092e879ae25372a84d735af5c4e510cd6d\":\"0x15af1d78b58c400000\",\"0x41485612d03446ec4c05e5244e563f1cbae0f197\":\"0x34957444b840e80000\",\"0x415d096ab06293183f3c033d25f6cf7178ac3bc7\":\"0x22b1c8c1227a00000\",\"0x4166fc08ca85f766fde831460e9dc93c0e21aa6c\":\"0x3635c9adc5dea00000\",\"0x416784af609630b070d49a8bcd12235c6428a408\":\"0x43c33c1937564800000\",\"0x4167cd48e733418e8f99ffd134121c4a4ab278c4\":\"0xc55325ca7415e00000\",\"0x416c86b72083d1f8907d84efd2d2d783dffa3efb\":\"0x6c6acc67d7b1d40000\",\"0x4173419d5c9f6329551dc4d3d0ceac1b701b869e\":\"0x4c53ecdc18a600000\",\"0x4174fa1bc12a3b7183cbabb77a0b59557ba5f1db\":\"0x6c6b935b8bbd400000\",\"0x41786a10d447f484d33244ccb7facd8b427b5b8c\":\"0x3635c9adc5dea00000\",\"0x417a3cd19496530a6d4204c3b5a17ce0f207b1a5\":\"0x1b1ae4d6e2ef5000000\",\"0x417e4e2688b1fd66d821529e46ed4f42f8b3db3d\":\"0x6c6b935b8bbd400000\",\"0x419a71a36c11d105e0f2aef5a3e598078e85c80b\":\"0x10f0cf064dd59200000\",\"0x419bde7316cc1ed295c885ace342c79bf7ee33ea\":\"0x14542ba12a337c00000\",\"0x41a2f2e6ecb86394ec0e338c0fc97e9c5583ded2\":\"0x6cee06ddbe15ec0000\",\"0x41a8c2830081b102df6e0131657c07ab635b54ce\":\"0x6c6acc67d7b1d40000\",\"0x41a8e236a30e6d63c1ff644d132aa25c89537e01\":\"0x1158e460913d00000\",\"0x41a9a404fc9f5bfee48ec265b12523338e29a8bf\":\"0x150894e849b3900000\",\"0x41ad369f758fef38a19aa3149379832c818ef2a0\":\"0x36369ed7747d260000\",\"0x41b2d34fde0b1029262b4172c81c1590405b03ae\":\"0x3635c9adc5dea00000\",\"0x41b2dbd79dda9b864f6a7030275419c39d3efd3b\":\"0xad78ebc5ac62000000\",\"0x41c3c2367534d13ba2b33f185cdbe6ac43c2fa31\":\"0xd8d726b7177a800000\",\"0x41cb9896445f70a10a14215296daf614e32cf4d5\":\"0x678a932062e4180000\",\"0x41ce79950935cff55bf78e4ccec2fe631785db95\":\"0x6c6b935b8bbd400000\",\"0x41d3b731a326e76858baa5f4bd89b57b36932343\":\"0x155bd9307f9fe80000\",\"0x41e4a20275e39bdcefeb655c0322744b765140c2\":\"0x21e19e0c9bab2400000\",\"0x41ed2d8e7081482c919fc23d8f0091b3c82c4685\":\"0x463a1e765bd78a0000\",\"0x41f27e744bd29de2b0598f02a0bb9f98e681eaa4\":\"0x1a4aba225c207400000\",\"0x41f489a1ec747bc29c3e5f9d8db97877d4d1b4e9\":\"0x73f75d1a085ba0000\",\"0x420fb86e7d2b51401fc5e8c72015decb4ef8fc2e\":\"0x3635c9adc5dea00000\",\"0x421684baa9c0b4b5f55338e6f6e7c8e146d41cb7\":\"0x5150ae84a8cdf00000\",\"0x42399659aca6a5a863ea2245c933fe9a35b7880e\":\"0x6ece32c26c82700000\",\"0x423bca47abc00c7057e3ad34fca63e375fbd8b4a\":\"0x3cfc82e37e9a7400000\",\"0x423c3107f4bace414e499c64390a51f74615ca5e\":\"0x6c6b935b8bbd400000\",\"0x423cc4594cf4abb6368de59fd2b1230734612143\":\"0x6c6b935b8bbd400000\",\"0x4244f1331158b9ce26bbe0b9236b9203ca351434\":\"0x21e19e0c9bab2400000\",\"0x425177eb74ad0a9d9a5752228147ee6d6356a6e6\":\"0xb98bc829a6f90000\",\"0x425725c0f08f0811f5f006eec91c5c5c126b12ae\":\"0x821ab0d4414980000\",\"0x4258fd662fc4ce3295f0d4ed8f7bb1449600a0a9\":\"0x16c452ed6088ad80000\",\"0x425c1816868f7777cc2ba6c6d28c9e1e796c52b3\":\"0x21e19e0c9bab2400000\",\"0x425c338a1325e3a1578efa299e57d986eb474f81\":\"0x6c6b935b8bbd400000\",\"0x426259b0a756701a8b663528522156c0288f0f24\":\"0x218ae196b8d4f300000\",\"0x426d15f407a01135b13a6b72f8f2520b3531e302\":\"0x1158e460913d00000\",\"0x426f78f70db259ac8534145b2934f4ef1098b5d8\":\"0x138400eca364a00000\",\"0x42732d8ef49ffda04b19780fd3c18469fb374106\":\"0x170b00e5e4a9be0000\",\"0x427417bd16b1b3d22dbb902d8f9657016f24a61c\":\"0x6c6b935b8bbd400000\",\"0x42746aeea14f27beff0c0da64253f1e7971890a0\":\"0x54069233bf7f780000\",\"0x427b462ab84e5091f48a46eb0cdc92ddcb26e078\":\"0x6c6b935b8bbd400000\",\"0x427e4751c3babe78cff8830886febc10f9908d74\":\"0x6acb3df27e1f880000\",\"0x427ec668ac9404e895cc861511d1620a4912be98\":\"0x878678326eac9000000\",\"0x4280a58f8bb10b9440de94f42b4f592120820191\":\"0x6c6b935b8bbd400000\",\"0x428a1ee0ed331d7952ccbe1c7974b2852bd1938a\":\"0x77b74a4e8de5650000\",\"0x429c06b487e8546abdfc958a25a3f0fba53f6f00\":\"0xbb644af542198000\",\"0x42a98bf16027ce589c4ed2c95831e2724205064e\":\"0x21e19e0c9bab2400000\",\"0x42c6edc515d35557808d13cd44dcc4400b2504e4\":\"0xaba14c59ba7320000\",\"0x42cecfd2921079c2d7df3f08b07aa3beee5e219a\":\"0x3635c9adc5dea00000\",\"0x42d1a6399b3016a8597f8b640927b8afbce4b215\":\"0xa18bcec34888100000\",\"0x42d34940edd2e7005d46e2188e4cfece8311d74d\":\"0x890b0c2e14fb80000\",\"0x42d3a5a901f2f6bd9356f112a70180e5a1550b60\":\"0x3224f42723d4540000\",\"0x42d6b263d9e9f4116c411424fc9955783c763030\":\"0x6c6b935b8bbd400000\",\"0x42db0b902559e04087dd5c441bc7611934184b89\":\"0x6d33b17d253a620000\",\"0x42ddd014dc52bfbcc555325a40b516f4866a1dd3\":\"0x6c6b935b8bbd400000\",\"0x4319263f75402c0b5325f263be4a5080651087f0\":\"0x354b0f14631bab0000\",\"0x431f2c19e316b044a4b3e61a0c6ff8c104a1a12f\":\"0x3635c9adc5dea00000\",\"0x43227d65334e691cf231b4a4e1d339b95d598afb\":\"0x21e19e0c9bab2400000\",\"0x432809a2390f07c665921ff37d547d12f1c9966a\":\"0x65a4da25d3016c00000\",\"0x4329fc0931cbeb033880fe4c9398ca45b0e2d11a\":\"0x6c7120716d33680000\",\"0x432d884bd69db1acc0d89c64ade4cb4fc3a88b7a\":\"0x869a8c10808eec0000\",\"0x4331ab3747d35720a9d8ca25165cd285acd4bda8\":\"0x6c6b935b8bbd400000\",\"0x433a3b68e56b0df1862b90586bbd39c840ff1936\":\"0x6c6b935b8bbd400000\",\"0x433e3ba1c51b810fc467d5ba4dea42f7a9885e69\":\"0x878678326eac9000000\",\"0x433eb94a339086ed12d9bde9cd1d458603c97dd6\":\"0x152d02c7e14af6800000\",\"0x4349225a62f70aea480a029915a01e5379e64fa5\":\"0x8cd67e2334c0d80000\",\"0x4354221e62dc09e6406436163a185ef06d114a81\":\"0x6c6b935b8bbd400000\",\"0x435443b81dfdb9bd8c6787bc2518e2d47e57c15f\":\"0x1438d9397881ef20000\",\"0x4361d4846fafb377b6c0ee49a596a78ddf3516a3\":\"0xc2127af858da700000\",\"0x4364309a9fa07095600f79edc65120cdcd23dc64\":\"0x21e19e0c9bab2400000\",\"0x4367ae4b0ce964f4a54afd4b5c368496db169e9a\":\"0x6c6b935b8bbd400000\",\"0x43748928e8c3ec4436a1d092fbe43ac749be1251\":\"0x15af1d78b58c400000\",\"0x43767bf7fd2af95b72e9312da9443cb1688e4343\":\"0x1043561a8829300000\",\"0x437983388ab59a4ffc215f8e8269461029c3f1c1\":\"0x43c33c1937564800000\",\"0x43898c49a34d509bfed4f76041ee91caf3aa6aa5\":\"0x1043561a8829300000\",\"0x438c2f54ff8e629bab36b1442b760b12a88f02ae\":\"0x6c6b935b8bbd400000\",\"0x4398628ea6632d393e929cbd928464c568aa4a0c\":\"0x4be4e7267b6ae00000\",\"0x439d2f2f5110a4d58b1757935015408740fec7f8\":\"0xcfa5c5150f4c888000\",\"0x439dee3f7679ff1030733f9340c096686b49390b\":\"0x6c6b935b8bbd400000\",\"0x43b079baf0727999e66bf743d5bcbf776c3b0922\":\"0x6c6b935b8bbd400000\",\"0x43bc2d4ddcd6583be2c7bc094b28fb72e62ba83b\":\"0x6c6b935b8bbd400000\",\"0x43c7ebc5b3e7af16f47dc5617ab10e0f39b4afbb\":\"0x678a932062e4180000\",\"0x43cb9652818c6f4d6796b0e89409306c79db6349\":\"0x6c6b935b8bbd400000\",\"0x43cc08d0732aa58adef7619bed46558ad7774173\":\"0xf0e7dcb0122a8f0000\",\"0x43d5a71ce8b8f8ae02b2eaf8eaf2ca2840b93fb6\":\"0x14542ba12a337c00000\",\"0x43db7ff95a086d28ebbfb82fb8fb5f230a5ebccd\":\"0xdf6eb0b2d3ca0000\",\"0x43e7ec846358d7d0f937ad1c350ba069d7bf72bf\":\"0x670ae629214680000\",\"0x43f16f1e75c3c06a9478e8c597a40a3cb0bf04cc\":\"0x9df7dfa8f760480000\",\"0x43f470ed659e2991c375957e5ddec5bd1d382231\":\"0x56bc75e2d63100000\",\"0x43f7e86e381ec51ec4906d1476cba97a3db584e4\":\"0x3635c9adc5dea00000\",\"0x43ff38743ed0cd43308c066509cc8e7e72c862aa\":\"0x692ae8897081d00000\",\"0x43ff8853e98ed8406b95000ada848362d6a0392a\":\"0x4ae0b1c4d2e84d00000\",\"0x44098866a69b68c0b6bc168229b9603587058967\":\"0xa31062beeed700000\",\"0x4419ac618d5dea7cdc6077206fb07dbdd71c1702\":\"0xd8d726b7177a800000\",\"0x441a52001661fac718b2d7b351b7c6fb521a7afd\":\"0x15af1d78b58c400000\",\"0x441aca82631324acbfa2468bda325bbd78477bbf\":\"0x14542ba12a337c00000\",\"0x441f37e8a029fd02482f289c49b5d06d00e408a4\":\"0x1211ecb56d13488000\",\"0x4420aa35465be617ad2498f370de0a3cc4d230af\":\"0x6c6b935b8bbd400000\",\"0x44232ff66ddad1fd841266380036afd7cf7d7f42\":\"0xad78ebc5ac6200000\",\"0x44250d476e062484e9080a3967bf3a4a732ad73f\":\"0x1158e460913d00000\",\"0x4429a29fee198450672c0c1d073162250bec6474\":\"0x362aaf8202f2500000\",\"0x44355253b27748e3f34fe9cae1fb718c8f249529\":\"0xad78ebc5ac6200000\",\"0x4438e880cb2766b0c1ceaec9d2418fceb952a044\":\"0x73fa073903f080000\",\"0x444caf79b71338ee9aa7c733b02acaa7dc025948\":\"0x22b1c8c1227a00000\",\"0x445cb8de5e3df520b499efc980f52bff40f55c76\":\"0x6c6b935b8bbd400000\",\"0x446a8039cecf9dce4879cbcaf3493bf545a88610\":\"0x17b7883c06916600000\",\"0x4474299d0ee090dc90789a1486489c3d0d645e6d\":\"0x3635c9adc5dea00000\",\"0x448bf410ad9bbc2fecc4508d87a7fc2e4b8561ad\":\"0xad6eedd17cf3b8000\",\"0x44901e0d0e08ac3d5e95b8ec9d5e0ff5f12e0393\":\"0x16a1f9f5fd7d960000\",\"0x4493123c021ece3b33b1a452c9268de14007f9d3\":\"0x16a6502f15a1e540000\",\"0x449ac4fbe383e36738855e364a57f471b2bfa131\":\"0x29b76432b94451200000\",\"0x44a01fb04ac0db2cce5dbe281e1c46e28b39d878\":\"0x6c6acc67d7b1d40000\",\"0x44a63d18424587b9b307bfc3c364ae10cd04c713\":\"0x1158e460913d00000\",\"0x44a8989e32308121f72466978db395d1f76c3a4b\":\"0x18850299f42b06a0000\",\"0x44c1110b18870ec81178d93d215838c551d48e64\":\"0xad6f98593bd8f0000\",\"0x44c14765127cde11fab46c5d2cf4d4b2890023fd\":\"0x6c6b935b8bbd400000\",\"0x44c54eaa8ac940f9e80f1e74e82fc14f1676856a\":\"0x1ab2cf7c9f87e200000\",\"0x44cd77535a893fa7c4d5eb3a240e79d099a72d2d\":\"0x2c73c937742c500000\",\"0x44dfba50b829becc5f4f14d1b04aab3320a295e5\":\"0x3635c9adc5dea00000\",\"0x44e2fdc679e6bee01e93ef4a3ab1bcce012abc7c\":\"0x163d194900c5458000\",\"0x44f62f2aaabc29ad3a6b04e1ff6f9ce452d1c140\":\"0x39992648a23c8a00000\",\"0x44fff37be01a3888d3b8b8e18880a7ddefeeead3\":\"0xe0c5bfc7dae9a8000\",\"0x4506fe19fa4b006baa3984529d8516db2b2b50ab\":\"0x6c6b935b8bbd400000\",\"0x451b3699475bed5d7905f8905aa3456f1ed788fc\":\"0x8ac7230489e8000000\",\"0x451b7070259bdba27100e36e23428a53dfe304e9\":\"0xb98bc829a6f90000\",\"0x45272b8f62e9f9fa8ce04420e1aea3eba9686eac\":\"0xd8d726b7177a800000\",\"0x452b64db8ef7d6df87c788639c2290be8482d575\":\"0x1b1ae4d6e2ef5000000\",\"0x453e359a3397944c5a275ab1a2f70a5e5a3f6989\":\"0xd02ab486cedc00000\",\"0x4549b15979255f7e65e99b0d5604db98dfcac8bf\":\"0xd8d726b7177a800000\",\"0x454b61b344c0ef965179238155f277c3829d0b38\":\"0x6c6b935b8bbd400000\",\"0x454f0141d721d33cbdc41018bd01119aa4784818\":\"0x14542ba12a337c00000\",\"0x45533390e340fe0de3b3cf5fb9fc8ea552e29e62\":\"0x4f2591f896a6500000\",\"0x455396a4bbd9bae8af9fb7c4d64d471db9c24505\":\"0x8ba52e6fc45e40000\",\"0x455b9296921a74d1fc41617f43b8303e6f3ed76c\":\"0xe3aeb5737240a00000\",\"0x455cb8ee39ffbc752331e5aefc588ef0ee593454\":\"0x3635463a780def8000\",\"0x456ae0aca48ebcfae166060250525f63965e760f\":\"0x1043561a8829300000\",\"0x456f8d746682b224679349064d1b368c7c05b176\":\"0xc893d09c8f51500000\",\"0x457029c469c4548d168cec3e65872e4428d42b67\":\"0x6c6b935b8bbd400000\",\"0x4571de672b9904bad8743692c21c4fdcea4c2e01\":\"0xd8d726b7177a800000\",\"0x45781bbe7714a1c8f73b1c747921df4f84278b70\":\"0x6c6b935b8bbd400000\",\"0x457bcef37dd3d60b2dd019e3fe61d46b3f1e7252\":\"0x1158e460913d00000\",\"0x458e3cc99e947844a18e6a42918fef7e7f5f5eb3\":\"0x7b53f79e888dac00000\",\"0x459393d63a063ef3721e16bd9fde45ee9dbd77fb\":\"0x6abad6a3c153050000\",\"0x45a570dcc2090c86a6b3ea29a60863dde41f13b5\":\"0xc9a95ee2986520000\",\"0x45a820a0672f17dc74a08112bc643fd1167736c3\":\"0xad6c43b2815ed8000\",\"0x45b47105fe42c4712dce6e2a21c05bffd5ea47a9\":\"0x6c6b935b8bbd400000\",\"0x45bb829652d8bfb58b8527f0ecb621c29e212ec3\":\"0x6c6b935b8bbd400000\",\"0x45c0d19f0b8e054f9e893836d5ecae7901af2812\":\"0x10f0cf064dd59200000\",\"0x45c4ecb4ee891ea984a7c5cefd8dfb00310b2850\":\"0x6b56051582a9700000\",\"0x45ca8d956608f9e00a2f9974028640888465668f\":\"0x6c6b935b8bbd400000\",\"0x45ca9862003b4e40a3171fb5cafa9028cac8de19\":\"0x2eb8eb1a172dcb80000\",\"0x45d1c9eedf7cab41a779057b79395f5428d80528\":\"0x6c6b935b8bbd400000\",\"0x45d4b54d37a8cf599821235f062fa9d170ede8a4\":\"0x1190673b5fda900000\",\"0x45db03bccfd6a5f4d0266b82a22a368792c77d83\":\"0x1b1ae4d6e2ef5000000\",\"0x45e3a93e72144ada860cbc56ff85145ada38c6da\":\"0x57473d05dabae80000\",\"0x45e68db8dbbaba5fc2cb337c62bcd0d61b059189\":\"0x6c6b935b8bbd400000\",\"0x45e68db94c7d0ab7ac41857a71d67147870f4e71\":\"0x54b40b1f852bda000000\",\"0x45f4fc60f08eaca10598f0336329801e3c92cb46\":\"0xad78ebc5ac6200000\",\"0x460d5355b2ceeb6e62107d81e51270b26bf45620\":\"0x6cb7e74867d5e60000\",\"0x46224f32f4ece5c8867090d4409d55e50b18432d\":\"0x14542ba12a337c00000\",\"0x4627c606842671abde8295ee5dd94c7f549534f4\":\"0xf895fbd8732f40000\",\"0x462b678b51b584f3ed7ada070b5cd99c0bf7b87f\":\"0x56bc75e2d63100000\",\"0x464d9c89cce484df000277198ed8075fa63572d1\":\"0x1158e460913d00000\",\"0x46504e6a215ac83bccf956befc82ab5a679371c8\":\"0x1c212805c2b4a50000\",\"0x4651dc420e08c3293b27d2497890eb50223ae2f4\":\"0x43c33c1937564800000\",\"0x46531e8b1bde097fdf849d6d119885608a008df7\":\"0xad78ebc5ac6200000\",\"0x466292f0e80d43a78774277590a9eb45961214f4\":\"0x34957444b840e80000\",\"0x4662a1765ee921842ddc88898d1dc8627597bd7e\":\"0x21e19e0c9bab2400000\",\"0x4665e47396c7db97eb2a03d90863d5d4ba319a94\":\"0x2086ac351052600000\",\"0x466fda6b9b58c5532750306a10a2a8c768103b07\":\"0xad6eedd17cf3b8000\",\"0x467124ae7f452f26b3d574f6088894fa5d1cfb3b\":\"0x925e06eec972b00000\",\"0x46722a36a01e841d03f780935e917d85d5a67abd\":\"0xcec76f0e71520000\",\"0x46779a5656ff00d73eac3ad0c38b6c853094fb40\":\"0xc8253c96c6af00000\",\"0x4677b04e0343a32131fd6abb39b1b6156bba3d5b\":\"0xad78ebc5ac6200000\",\"0x467d5988249a68614716659840ed0ae6f6f457bc\":\"0x1501a48cefdfde0000\",\"0x467e0ed54f3b76ae0636176e07420815a021736e\":\"0x6c6b935b8bbd400000\",\"0x467ea10445827ef1e502daf76b928a209e0d4032\":\"0x6c6b935b8bbd400000\",\"0x467fbf41441600757fe15830c8cd5f4ffbbbd560\":\"0x21e19e0c9bab2400000\",\"0x469358709332c82b887e20bcddd0220f8edba7d0\":\"0x3a9d5baa4abf1d00000\",\"0x4697baaf9ccb603fd30430689d435445e9c98bf5\":\"0xad201a6794ff80000\",\"0x46a30b8a808931217445c3f5a93e882c0345b426\":\"0xd8db5ebd7b2638000\",\"0x46a430a2d4a894a0d8aa3feac615361415c3f81f\":\"0x6c6b935b8bbd400000\",\"0x46aa501870677e7f0a504876b4e8801a0ad01c46\":\"0x2b5e3af16b18800000\",\"0x46bfc5b207eb2013e2e60f775fecd71810c5990c\":\"0x54069233bf7f780000\",\"0x46c1aa2244b9c8a957ca8fac431b0595a3b86824\":\"0xd8d726b7177a800000\",\"0x46d80631284203f6288ecd4e5758bb9d41d05dbe\":\"0x6c6b935b8bbd400000\",\"0x470ac5d1f3efe28f3802af925b571e63868b397d\":\"0x6c6b935b8bbd400000\",\"0x471010da492f4018833b088d9872901e06129174\":\"0x1b1ae4d6e2ef500000\",\"0x4712540265cbeec3847022c59f1b318d43400a9e\":\"0xbdbc41e0348b300000\",\"0x4714cfa4f46bd6bd70737d75878197e08f88e631\":\"0x27f3edfb34e6e400000\",\"0x472048cc609aeb242165eaaa8705850cf3125de0\":\"0x3635c9adc5dea00000\",\"0x47219229e8cd56659a65c2a943e2dd9a8f4bfd89\":\"0x52663ccab1e1c00000\",\"0x4737d042dc6ae73ec73ae2517acea2fdd96487c5\":\"0x3635c9adc5dea00000\",\"0x474158a1a9dc693c133f65e47b5c3ae2f773a86f\":\"0xada55474b81340000\",\"0x4745ab181a36aa8cbf2289d0c45165bc7ebe2381\":\"0x222c8eb3ff6640000\",\"0x475066f9ad26655196d5535327bbeb9b7929cb04\":\"0xa4cc799563c3800000\",\"0x4752218e54de423f86c0501933917aea08c8fed5\":\"0x43c33c1937564800000\",\"0x475a6193572d4a4e59d7be09cb960ddd8c530e2f\":\"0x242cf78cdf07ff8000\",\"0x47648bed01f3cd3249084e635d14daa9e7ec3c8a\":\"0xa844a7424d9c80000\",\"0x47688410ff25d654d72eb2bc06e4ad24f833b094\":\"0x8b28d61f3d3ac0000\",\"0x476b5599089a3fb6f29c6c72e49b2e4740ea808d\":\"0x97c9ce4cf6d5c00000\",\"0x47730f5f8ebf89ac72ef80e46c12195038ecdc49\":\"0xab4dcf399a3a600000\",\"0x477b24eee8839e4fd19d1250bd0b6645794a61ca\":\"0x1b1ae4d6e2ef5000000\",\"0x4781a10a4df5eebc82f4cfe107ba1d8a7640bd66\":\"0x61093d7c2c6d380000\",\"0x47885ababedf4d928e1c3c71d7ca40d563ed595f\":\"0x62a992e53a0af00000\",\"0x478dc09a1311377c093f9cc8ae74111f65f82f39\":\"0xd8d726b7177a800000\",\"0x478e524ef2a381d70c82588a93ca7a5fa9d51cbf\":\"0x35fa97226f8899700000\",\"0x479298a9de147e63a1c7d6d2fce089c7e64083bd\":\"0x21e19dd3c3c0d798000\",\"0x479abf2da4d58716fd973a0d13a75f530150260a\":\"0x1158e460913d00000\",\"0x47a281dff64167197855bf6e705eb9f2cef632ea\":\"0x3636c9796436740000\",\"0x47beb20f759100542aa93d41118b3211d664920e\":\"0x6c6b935b8bbd400000\",\"0x47c247f53b9fbeb17bba0703a00c009fdb0f6eae\":\"0x43c33c1937564800000\",\"0x47c7e5efb48b3aed4b7c6e824b435f357df4c723\":\"0xfc936392801c0000\",\"0x47cf9cdaf92fc999cc5efbb7203c61e4f1cdd4c3\":\"0x71f8a93d01e540000\",\"0x47d20e6ae4cad3f829eac07e5ac97b66fdd56cf5\":\"0x3635c9adc5dea00000\",\"0x47d792a756779aedf1343e8883a6619c6c281184\":\"0x6c6b935b8bbd400000\",\"0x47e25df8822538a8596b28c637896b4d143c351d\":\"0x110be9eb24b881500000\",\"0x47f4696bd462b20da09fb83ed2039818d77625b3\":\"0x813ca56906d340000\",\"0x47fef58584465248a0810d60463ee93e5a6ee8d3\":\"0xf58cd3e1269160000\",\"0x47ff6feb43212060bb1503d7a397fc08f4e70352\":\"0x6c6b935b8bbd400000\",\"0x47fff42c678551d141eb75a6ee398117df3e4a8d\":\"0x56beae51fd2d10000\",\"0x48010ef3b8e95e3f308f30a8cb7f4eb4bf60d965\":\"0x6c6b935b8bbd400000\",\"0x480af52076009ca73781b70e43b95916a62203ab\":\"0x321972f4083d878000\",\"0x480f31b989311e4124c6a7465f5a44094d36f9d0\":\"0x3790bb855137640000\",\"0x481115296ab7db52492ff7b647d63329fb5cbc6b\":\"0x368c8623a8b4d100000\",\"0x481e3a91bfdc2f1c8428a0119d03a41601417e1c\":\"0x3635c9adc5dea00000\",\"0x4828e4cbe34e1510afb72c2beeac8a4513eaebd9\":\"0xd5967be4fc3f100000\",\"0x482982ac1f1c6d1721feecd9b9c96cd949805055\":\"0x21e19e0c9bab2400000\",\"0x48302c311ef8e5dc664158dd583c81194d6e0d58\":\"0xb6676ce0bccb5c0000\",\"0x483ba99034e900e3aedf61499d3b2bce39beb7aa\":\"0x35659ef93f0fc40000\",\"0x48548b4ba62bcb2f0d34a88dc69a680e539cf046\":\"0x56cf1cbbb74320000\",\"0x4863849739265a63b0a2bf236a5913e6f959ce15\":\"0x52663ccab1e1c00000\",\"0x48659d8f8c9a2fd44f68daa55d23a608fbe500dc\":\"0x6c6b935b8bbd400000\",\"0x48669eb5a801d8b75fb6aa58c3451b7058c243bf\":\"0x68d42c138dab9f00000\",\"0x486a6c8583a84484e3df43a123837f8c7e2317d0\":\"0x1187c571ab80450000\",\"0x487adf7d70a6740f8d51cbdd68bb3f91c4a5ce68\":\"0x39fbae8d042dd0000\",\"0x487e108502b0b189ef9c8c6da4d0db6261eec6c0\":\"0x678a932062e4180000\",\"0x4888fb25cd50dbb9e048f41ca47d78b78a27c7d9\":\"0x3a9d5baa4abf1d00000\",\"0x489334c2b695c8ee0794bd864217fb9fd8f8b135\":\"0xfc936392801c0000\",\"0x48a30de1c919d3fd3180e97d5f2b2a9dbd964d2d\":\"0x2629f66e0c5300000\",\"0x48bf14d7b1fc84ebf3c96be12f7bce01aa69b03e\":\"0x68155a43676e00000\",\"0x48c2ee91a50756d8ce9abeeb7589d22c6fee5dfb\":\"0xae8e7a0bb575d00000\",\"0x48c5c6970b9161bb1c7b7adfed9cdede8a1ba864\":\"0xd8d726b7177a800000\",\"0x48d2434b7a7dbbff08223b6387b05da2e5093126\":\"0x3cfc82e37e9a7400000\",\"0x48d4f2468f963fd79a006198bb67895d2d5aa4d3\":\"0x4be4e7267b6ae00000\",\"0x48e0cbd67f18acdb7a6291e1254db32e0972737f\":\"0x56be03ca3e47d8000\",\"0x48f60a35484fe7792bcc8a7b6393d0dda1f6b717\":\"0xc328093e61ee400000\",\"0x48f883e567b436a27bb5a3124dbc84dec775a800\":\"0x29d76e869dcd800000\",\"0x490145afa8b54522bb21f352f06da5a788fa8f1d\":\"0x1f46c62901a03fb0000\",\"0x4909b31998ead414b8fb0e846bd5cbde393935be\":\"0xd8d726b7177a800000\",\"0x4912d902931676ff39fc34fe3c3cc8fb2182fa7a\":\"0x1158e460913d00000\",\"0x49136fe6e28b7453fcb16b6bbbe9aaacba8337fd\":\"0x6c6b935b8bbd400000\",\"0x491561db8b6fafb9007e62d050c282e92c4b6bc8\":\"0x65a4da25d3016c00000\",\"0x49185dd7c23632f46c759473ebae966008cd3598\":\"0xdc55fdb17647b0000\",\"0x492cb5f861b187f9df21cd4485bed90b50ffe22d\":\"0x1b19e50b44977c0000\",\"0x492de46aaf8f1d708d59d79af1d03ad2cb60902f\":\"0x6c6b935b8bbd400000\",\"0x492e70f04d18408cb41e25603730506b35a2876b\":\"0x222c8eb3ff6640000\",\"0x493a67fe23decc63b10dda75f3287695a81bd5ab\":\"0x2fb474098f67c00000\",\"0x493d48bda015a9bfcf1603936eab68024ce551e0\":\"0x138a388a43c000000\",\"0x494256e99b0f9cd6e5ebca3899863252900165c8\":\"0x2f6f10780d22cc00000\",\"0x494dec4d5ee88a2771a815f1ee7264942fb58b28\":\"0x6c6b935b8bbd400000\",\"0x495b641b1cdea362c3b4cbbd0f5cc50b1e176b9c\":\"0x3635c9adc5dea00000\",\"0x4968a2cedb457555a139295aea28776e54003c87\":\"0x2231aefc9a6628f0000\",\"0x496d365534530a5fc1577c0a5241cb88c4da7072\":\"0x61093d7c2c6d380000\",\"0x496e319592b341eaccd778dda7c8196d54cac775\":\"0x1f5718987664b480000\",\"0x496f5843f6d24cd98d255e4c23d1e1f023227545\":\"0x5f179fd4a6ee098000\",\"0x4970d3acf72b5b1f32a7003cf102c64ee0547941\":\"0x1da56a4b0835bf800000\",\"0x4977a7939d0939689455ce2639d0ee5a4cd910ed\":\"0x62a992e53a0af00000\",\"0x4979194ec9e97db9bee8343b7c77d9d7f3f1dc9f\":\"0x1158e460913d00000\",\"0x49793463e1681083d6abd6e725d5bba745dccde8\":\"0x1d98e94c4e471f0000\",\"0x4981c5ff66cc4e9680251fc4cd2ff907cb327865\":\"0x28a857425466f80000\",\"0x49897fe932bbb3154c95d3bce6d93b6d732904dd\":\"0xd8d726b7177a800000\",\"0x4989e1ab5e7cd00746b3938ef0f0d064a2025ba5\":\"0x6c6b935b8bbd400000\",\"0x498abdeb14c26b7b7234d70fceaef361a76dff72\":\"0xa2a15d09519be00000\",\"0x49a645e0667dfd7b32d075cc2467dd8c680907c4\":\"0x70601958fcb9c0000\",\"0x49b74e169265f01a89ec4c9072c5a4cd72e4e835\":\"0x368c8623a8b4d100000\",\"0x49bdbc7ba5abebb6389e91a3285220d3451bd253\":\"0x3635c9adc5dea00000\",\"0x49c941e0e5018726b7290fc473b471d41dae80d1\":\"0x1b1ae4d6e2ef500000\",\"0x49c9771fca19d5b9d245c891f8158fe49f47a062\":\"0x21e19e0c9bab2400000\",\"0x49cf1e54be363106b920729d2d0ba46f0867989a\":\"0xe873f44133cb00000\",\"0x49d2c28ee9bc545eaaf7fd14c27c4073b4bb5f1a\":\"0x4fe9b806b40daf0000\",\"0x49ddee902e1d0c99d1b11af3cc8a96f78e4dcf1a\":\"0xacea5e4c18c530000\",\"0x49f028395b5a86c9e07f7778630e4c2e3d373a77\":\"0x6a74a5038db918000\",\"0x4a192035e2619b24b0709d56590e9183ccf2c1d9\":\"0x21e19e0c9bab2400000\",\"0x4a4053b31d0ee5dbafb1d06bd7ac7ff3222c47d6\":\"0x4be4e7267b6ae00000\",\"0x4a430170152de5172633dd8262d107a0afd96a0f\":\"0xab4dcf399a3a600000\",\"0x4a47fc3e177f567a1e3893e000e36bba23520ab8\":\"0x6c6b935b8bbd400000\",\"0x4a52bad20357228faa1e996bed790c93674ba7d0\":\"0x487a9a304539440000\",\"0x4a53dcdb56ce4cdce9f82ec0eb13d67352e7c88b\":\"0xe3aeb5737240a00000\",\"0x4a5fae3b0372c230c125d6d470140337ab915656\":\"0x56bc75e2d631000000\",\"0x4a719061f5285495b37b9d7ef8a51b07d6e6acac\":\"0xad4c8316a0b0c0000\",\"0x4a73389298031b8816cca946421c199e18b343d6\":\"0x223868b879146f0000\",\"0x4a735d224792376d331367c093d31c8794341582\":\"0x66ffcbfd5e5a300000\",\"0x4a7494cce44855cc80582842be958a0d1c0072ee\":\"0x821ab0d44149800000\",\"0x4a75c3d4fa6fccbd5dd5a703c15379a1e783e9b7\":\"0x62a992e53a0af00000\",\"0x4a81abe4984c7c6bef63d69820e55743c61f201c\":\"0x36401004e9aa3470000\",\"0x4a82694fa29d9e213202a1a209285df6e745c209\":\"0xd8d726b7177a800000\",\"0x4a835c25824c47ecbfc79439bf3f5c3481aa75cd\":\"0x4be4e7267b6ae00000\",\"0x4a918032439159bb315b6725b6830dc83697739f\":\"0x12a32ef678334c0000\",\"0x4a97e8fcf4635ea7fc5e96ee51752ec388716b60\":\"0x1d9945ab2b03480000\",\"0x4a9a26fd0a8ba10f977da4f77c31908dab4a8016\":\"0x61093d7c2c6d380000\",\"0x4aa148c2c33401e66a2b586e6577c4b292d3f240\":\"0xbb860b285f7740000\",\"0x4aa693b122f314482a47b11cc77c68a497876162\":\"0x6acb3df27e1f880000\",\"0x4ab2d34f04834fbf7479649cab923d2c4725c553\":\"0xbed1d0263d9f000000\",\"0x4ac07673e42f64c1a25ec2fa2d86e5aa2b34e039\":\"0x6c6b935b8bbd400000\",\"0x4ac5acad000b8877214cb1ae00eac9a37d59a0fd\":\"0xd8d726b7177a800000\",\"0x4ac9905a4cb6ab1cfd62546ee5917300b87c4fde\":\"0x3708baed3d68900000\",\"0x4acfa9d94eda6625c9dfa5f9f4f5d107c4031fdf\":\"0x222c8eb3ff6640000\",\"0x4ad047fae67ef162fe68fedbc27d3b65caf10c36\":\"0x6acb3df27e1f880000\",\"0x4ad95d188d6464709add2555fb4d97fe1ebf311f\":\"0x12c1b6eed03d280000\",\"0x4adbf4aae0e3ef44f7dd4d8985cfaf096ec48e98\":\"0x821ab0d4414980000\",\"0x4ae2a04d3909ef454e544ccfd614bfefa71089ae\":\"0x1801159df1eef80000\",\"0x4ae93082e45187c26160e66792f57fad3551c73a\":\"0x4961520daff82280000\",\"0x4af0db077bb9ba5e443e21e148e59f379105c592\":\"0x2086ac351052600000\",\"0x4b0619d9d8aa313a9531ac7dbe04ca0d6a5ad1b6\":\"0x6c6b935b8bbd400000\",\"0x4b0bd8acfcbc53a6010b40d4d08ddd2d9d69622d\":\"0x243d4d18229ca20000\",\"0x4b19eb0c354bc1393960eb06063b83926f0d67b2\":\"0x19274b259f6540000\",\"0x4b29437c97b4a844be71cca3b648d4ca0fdd9ba4\":\"0x824719834cfac0000\",\"0x4b31bf41abc75c9ae2cd8f7f35163b6e2b745054\":\"0x14b550a013c7380000\",\"0x4b3a7cc3a7d7b00ed5282221a60259f25bf6538a\":\"0x3635c9adc5dea00000\",\"0x4b3aab335ebbfaa870cc4d605e7d2e74c668369f\":\"0xcb49b44ba602d800000\",\"0x4b3c7388cc76da3d62d40067dabccd7ef0433d23\":\"0x56cd55fc64dfe0000\",\"0x4b3dfbdb454be5279a3b8addfd0ed1cd37a9420d\":\"0x6c6b935b8bbd400000\",\"0x4b470f7ba030bc7cfcf338d4bf0432a91e2ea5ff\":\"0x6c6b935b8bbd400000\",\"0x4b53ae59c784b6b5c43616b9a0809558e684e10c\":\"0x410d586a20a4c00000\",\"0x4b58101f44f7e389e12d471d1635b71614fdd605\":\"0x8ac7230489e800000\",\"0x4b5cdb1e428c91dd7cb54a6aed4571da054bfe52\":\"0x4c53ecdc18a600000\",\"0x4b60a3e253bf38c8d5662010bb93a473c965c3e5\":\"0x50c5e761a444080000\",\"0x4b74f5e58e2edf76daf70151964a0b8f1de0663c\":\"0x1190ae4944ba120000\",\"0x4b762166dd1118e84369f804c75f9cd657bf730c\":\"0x1b1ae4d6e2ef500000\",\"0x4b792e29683eb586e394bb33526c6001b397999e\":\"0x2086ac351052600000\",\"0x4b904e934bd0cc8b20705f879e905b93ea0ccc30\":\"0x6c6b935b8bbd400000\",\"0x4b9206ba6b549a1a7f969e1d5dba867539d1fa67\":\"0x1ab2cf7c9f87e200000\",\"0x4b984ef26c576e815a2eaed2f5177f07dbb1c476\":\"0x54915956c409600000\",\"0x4b9e068fc4680976e61504912985fd5ce94bab0d\":\"0x243d4d18229ca20000\",\"0x4ba0d9e89601772b496847a2bb4340186787d265\":\"0x3635c9adc5dea00000\",\"0x4ba53ab549e2016dfa223c9ed5a38fad91288d07\":\"0x4be4e7267b6ae00000\",\"0x4ba8e0117fc0b6a3e56b24a3a58fe6cef442ff98\":\"0x131beb925ffd3200000\",\"0x4bac846af4169f1d95431b341d8800b22180af1a\":\"0x1158e460913d00000\",\"0x4bb6d86b8314c22d8d37ea516d0019f156aae12d\":\"0x3635c9adc5dea00000\",\"0x4bb9655cfb2a36ea7c637a7b859b4a3154e26ebe\":\"0x3635c9adc5dea000000\",\"0x4bbcbf38b3c90163a84b1cd2a93b58b2a3348d87\":\"0x1b1ae4d6e2ef5000000\",\"0x4bd6dd0cff23400e1730ba7b894504577d14e74a\":\"0x2ba0ccddd0df73b00000\",\"0x4be8628a8154874e048d80c142181022b180bcc1\":\"0x340aad21b3b700000\",\"0x4be90d412129d5a4d0424361d6649d4e47a62316\":\"0x3708baed3d68900000\",\"0x4bea288eea42c4955eb9faad2a9faf4783cbddac\":\"0x618be1663c4af490000\",\"0x4bf4479799ef82eea20943374f56a1bf54001e5e\":\"0xd5967be4fc3f100000\",\"0x4bf8bf1d35a231315764fc8001809a949294fc49\":\"0x39fbae8d042dd0000\",\"0x4bf8e26f4c2790da6533a2ac9abac3c69a199433\":\"0xad78ebc5ac6200000\",\"0x4c0aca508b3caf5ee028bc707dd1e800b838f453\":\"0xfc936392801c0000\",\"0x4c0b1515dfced7a13e13ee12c0f523ae504f032b\":\"0xa968163f0a57b400000\",\"0x4c13980c32dcf3920b78a4a7903312907c1b123f\":\"0x3410015faae0c0000\",\"0x4c1579af3312e4f88ae93c68e9449c2e9a68d9c4\":\"0x6c6b935b8bbd400000\",\"0x4c23b370fc992bb67cec06e26715b62f0b3a4ac3\":\"0x21e19e0c9bab2400000\",\"0x4c24b78baf2bafc7fcc69016426be973e20a50b2\":\"0xa2a15d09519be00000\",\"0x4c2f1afef7c5868c44832fc77cb03b55f89e6d6e\":\"0x43c33c1937564800000\",\"0x4c377bb03ab52c4cb79befa1dd114982924c4ae9\":\"0x631603ccd38dd70000\",\"0x4c3e95cc3957d252ce0bf0c87d5b4f2234672e70\":\"0x878678326eac900000\",\"0x4c423c76930d07f93c47a5cc4f615745c45a9d72\":\"0x56bc75e2d63100000\",\"0x4c45d4c9a725d11112bfcbca00bf31186ccaadb7\":\"0x15af1d78b58c400000\",\"0x4c4e6f13fb5e3f70c3760262a03e317982691d10\":\"0x56bc75e2d63100000\",\"0x4c5afe40f18ffc48d3a1aec41fc29de179f4d297\":\"0x6c6b935b8bbd400000\",\"0x4c5b3dc0e2b9360f91289b1fe13ce12c0fbda3e1\":\"0x6c6b935b8bbd400000\",\"0x4c666b86f1c5ee8ca41285f5bde4f79052081406\":\"0x1b1ae4d6e2ef500000\",\"0x4c696be99f3a690440c3436a59a7d7e937d6ba0d\":\"0xbb9125542263900000\",\"0x4c6a248fc97d705def495ca20759169ef0d36471\":\"0x29331e6558f0e00000\",\"0x4c6a9dc2cab10abb2e7c137006f08fecb5b779e1\":\"0x1b0d04202f47ec0000\",\"0x4c6b93a3bec16349540cbfcae96c9621d6645010\":\"0x6c6b935b8bbd400000\",\"0x4c759813ad1386bed27ffae9e4815e3630cca312\":\"0x6c6b935b8bbd400000\",\"0x4c760cd9e195ee4f2d6bce2500ff96da7c43ee91\":\"0xcb49b44ba602d800000\",\"0x4c767b65fd91161f4fbdcc6a69e2f6ad711bb918\":\"0x270801d946c9400000\",\"0x4c7e2e2b77ad0cd6f44acb2861f0fb8b28750ef9\":\"0x1158e460913d00000\",\"0x4c85ed362f24f6b9f04cdfccd022ae535147cbb9\":\"0x5150ae84a8cdf00000\",\"0x4c935bb250778b3c4c7f7e07fc251fa630314aab\":\"0x5150ae84a8cdf00000\",\"0x4c997992036c5b433ac33d25a8ea1dc3d4e4e6d8\":\"0x1953b3d4ab1680000\",\"0x4c99dae96481e807c1f99f8b7fbde29b7547c5bf\":\"0x821ab0d4414980000\",\"0x4c9a862ad115d6c8274ed0b944bdd6a5500510a7\":\"0x56bc75e2d63100000\",\"0x4ca783b556e5bf53aa13c8116613d65782c9b642\":\"0x5561840b4ad83c00000\",\"0x4ca7b717d9bc8793b04e051a8d23e1640f5ba5e3\":\"0x43b514549ecf620000\",\"0x4ca8db4a5efefc80f4cd9bbcccb03265931332b6\":\"0xad78ebc5ac6200000\",\"0x4cac91fb83a147d2f76c3267984b910a79933348\":\"0x75792a8abdef7c0000\",\"0x4cadf573ce4ceec78b8e1b21b0ed78eb113b2c0e\":\"0x6c6b935b8bbd400000\",\"0x4cb5c6cd713ca447b848ae2f56b761ca14d7ad57\":\"0xe7eeba3410b740000\",\"0x4cc22c9bc9ad05d875a397dbe847ed221c920c67\":\"0x6c6b935b8bbd400000\",\"0x4cd0b0a6436362595ceade052ebc9b929fb6c6c0\":\"0x6c6b935b8bbd400000\",\"0x4cda41dd533991290794e22ae324143e309b3d3d\":\"0x821ab0d44149800000\",\"0x4cee901b4ac8b156c5e2f8a6f1bef572a7dceb7e\":\"0x3635c9adc5dea00000\",\"0x4cefbe2398e47d52e78db4334c8b697675f193ae\":\"0xd96fce90cfabcc0000\",\"0x4cf5537b85842f89cfee359eae500fc449d2118f\":\"0x3635c9adc5dea00000\",\"0x4d08471d68007aff2ae279bc5e3fe4156fbbe3de\":\"0x878678326eac9000000\",\"0x4d200110124008d56f76981256420c946a6ff45c\":\"0xad6eedd17cf3b8000\",\"0x4d24b7ac47d2f27de90974ba3de5ead203544bcd\":\"0x56bc75e2d63100000\",\"0x4d29fc523a2c1629532121da9998e9b5ab9d1b45\":\"0xdb44e049bb2c0000\",\"0x4d38d90f83f4515c03cc78326a154d358bd882b7\":\"0xa076407d3f7440000\",\"0x4d4cf5807429615e30cdface1e5aae4dad3055e6\":\"0x2086ac351052600000\",\"0x4d57e716876c0c95ef5eaebd35c8f41b069b6bfe\":\"0x6c6b935b8bbd400000\",\"0x4d67f2ab8599fef5fc413999aa01fd7fce70b43d\":\"0x21e19e0c9bab2400000\",\"0x4d6e8fe109ccd2158e4db114132fe75fecc8be5b\":\"0x15b3557f1937f8000\",\"0x4d71a6eb3d7f327e1834278e280b039eddd31c2f\":\"0x14542ba12a337c00000\",\"0x4d7cfaa84cb33106800a8c802fb8aa463896c599\":\"0x61093d7c2c6d380000\",\"0x4d801093c19ca9b8f342e33cc9c77bbd4c8312cf\":\"0x12b3e7fb95cda48000\",\"0x4d828894752f6f25175daf2177094487954b6f9f\":\"0x4f212bc2c49c838000\",\"0x4d82d7700c123bb919419bbaf046799c6b0e2c66\":\"0x43c33c1937564800000\",\"0x4d836d9d3b0e2cbd4de050596faa490cffb60d5d\":\"0x1043561a8829300000\",\"0x4d8697af0fbf2ca36e8768f4af22133570685a60\":\"0x1158e460913d00000\",\"0x4d9279962029a8bd45639737e98b511eff074c21\":\"0x487a9a304539440000\",\"0x4d93696fa24859f5d2939aebfa54b4b51ae1dccc\":\"0x10910d4cdc9f60000\",\"0x4d9c77d0750c5e6fbc247f2fd79274686cb353d6\":\"0x1158e460913d00000\",\"0x4da5edc688b0cb62e1403d1700d9dcb99ffe3fd3\":\"0x6c6b935b8bbd400000\",\"0x4da8030769844bc34186b85cd4c7348849ff49e9\":\"0x21e19e0c9bab2400000\",\"0x4db1c43a0f834d7d0478b8960767ec1ac44c9aeb\":\"0x2f5181305627370000\",\"0x4db21284bcd4f787a7556500d6d7d8f36623cf35\":\"0x6928374f77a3630000\",\"0x4dc3da13b2b4afd44f5d0d3189f444d4ddf91b1b\":\"0x6c6b935b8bbd400000\",\"0x4dc4bf5e7589c47b28378d7503cf96488061dbbd\":\"0x5f68e8131ecf800000\",\"0x4dc9d5bb4b19cecd94f19ec25d200ea72f25d7ed\":\"0x6c6b935b8bbd400000\",\"0x4dcd11815818ae29b85d01367349a8a7fb12d06b\":\"0x1ac4286100191f00000\",\"0x4dcf62a3de3f061db91498fd61060f1f6398ff73\":\"0x6c6acc67d7b1d40000\",\"0x4dd131c74a068a37c90aded4f309c2409f6478d3\":\"0x15af39e4aab2740000\",\"0x4ddda7586b2237b053a7f3289cf460dc57d37a09\":\"0x21e19e0c9bab2400000\",\"0x4de3fe34a6fbf634c051997f47cc7f48791f5824\":\"0x6c5db2a4d815dc0000\",\"0x4df140ba796585dd5489315bca4bba680adbb818\":\"0x90f534608a72880000\",\"0x4e020779b5ddd3df228a00cb48c2fc979da6ae38\":\"0x6c6b935b8bbd400000\",\"0x4e0bd32473c4c51bf25654def69f797c6b29a232\":\"0x56c95de8e8ca1d0000\",\"0x4e2225a1bb59bc88a2316674d333b9b0afca6655\":\"0x8670e9ec6598c0000\",\"0x4e2310191ead8d3bc6489873a5f0c2ec6b87e1be\":\"0x3635c9adc5dea00000\",\"0x4e232d53b3e6be8f895361d31c34d4762b12c82e\":\"0x5f68e8131ecf800000\",\"0x4e2bfa4a466f82671b800eee426ad00c071ba170\":\"0xd8d726b7177a800000\",\"0x4e3edad4864dab64cae4c5417a76774053dc6432\":\"0x2008fb478cbfa98000\",\"0x4e4318f5e13e824a54edfe30a7ed4f26cd3da504\":\"0x6c6b935b8bbd400000\",\"0x4e5b77f9066159e615933f2dda7477fa4e47d648\":\"0xad78ebc5ac6200000\",\"0x4e6600806289454acda330a2a3556010dfacade6\":\"0x14542ba12a337c00000\",\"0x4e73cf2379f124860f73d6d91bf59acc5cfc845b\":\"0x22ca3587cf4eb0000\",\"0x4e7aa67e12183ef9d7468ea28ad239c2eef71b76\":\"0x10afc1ade3b4ed40000\",\"0x4e7b54474d01fefd388dfcd53b9f662624418a05\":\"0x1b1ae4d6e2ef5000000\",\"0x4e892e8081bf36e488fddb3b2630f3f1e8da30d2\":\"0x28aba30752451fc0000\",\"0x4e8a6d63489ccc10a57f885f96eb04ecbb546024\":\"0x3eae3130ecc96900000\",\"0x4e8e47ae3b1ef50c9d54a38e14208c1abd3603c2\":\"0x7928db1276660c0000\",\"0x4e90ccb13258acaa9f4febc0a34292f95991e230\":\"0xdb44e049bb2c0000\",\"0x4ea56e1112641c038d0565a9c296c463afefc17e\":\"0x9ddc1e3b901180000\",\"0x4ea70f04313fae65c3ff224a055c3d2dab28dddf\":\"0x43c30fb0884a96c0000\",\"0x4eb1454b573805c8aca37edec7149a41f61202f4\":\"0x1043561a8829300000\",\"0x4eb87ba8788eba0df87e5b9bd50a8e45368091c1\":\"0x1158e460913d00000\",\"0x4ebc5629f9a6a66b2cf3363ac4895c0348e8bf87\":\"0x3637096c4bcc690000\",\"0x4ec768295eeabafc42958415e22be216cde77618\":\"0x33b1dbc39c5480000\",\"0x4ecc19948dd9cd87b4c7201ab48e758f28e7cc76\":\"0x1b1dab61d3aa640000\",\"0x4ed14d81b60b23fb25054d8925dfa573dcae6168\":\"0x126e72a69a50d00000\",\"0x4ee13c0d41200b46d19dee5c4bcec71d82bb8e38\":\"0x1abee13ccbeefaf8000\",\"0x4eead40aad8c73ef08fc84bc0a92c9092f6a36bf\":\"0x1731790534df20000\",\"0x4eebe80cb6f3ae5904f6f4b28d907f907189fcab\":\"0x6c6acc67d7b1d40000\",\"0x4eebf1205d0cc20cee6c7f8ff3115f56d48fba26\":\"0x10d3aa536e2940000\",\"0x4ef1c214633ad9c0703b4e2374a2e33e3e429291\":\"0x487a9a304539440000\",\"0x4efcd9c79fb4334ca6247b0a33bd9cc33208e272\":\"0x487a9a304539440000\",\"0x4f06246b8d4bd29661f43e93762201d286935ab1\":\"0x105394ffc4636110000\",\"0x4f152b2fb8659d43776ebb1e81673aa84169be96\":\"0x6c6b935b8bbd400000\",\"0x4f177f9d56953ded71a5611f393322c30279895c\":\"0xd55ef90a2da180000\",\"0x4f1a2da54a4c6da19d142412e56e815741db2325\":\"0x56bc75e2d63100000\",\"0x4f23b6b817ffa5c664acdad79bb7b726d30af0f9\":\"0x5f68e8131ecf800000\",\"0x4f26690c992b7a312ab12e1385d94acd58288e7b\":\"0x2f6f10780d22cc00000\",\"0x4f2b47e2775a1fa7178dad92985a5bbe493ba6d6\":\"0xad78ebc5ac6200000\",\"0x4f3a4854911145ea01c644044bdb2e5a960a982f\":\"0xd8d726b7177a800000\",\"0x4f3f2c673069ac97c2023607152981f5cd6063a0\":\"0x2086ac351052600000\",\"0x4f4a9be10cd5d3fb5de48c17be296f895690645b\":\"0x878678326eac9000000\",\"0x4f52ad6170d25b2a2e850eadbb52413ff2303e7f\":\"0xa4cc799563c3800000\",\"0x4f5801b1eb30b712d8a0575a9a71ff965d4f34eb\":\"0x1043561a8829300000\",\"0x4f5df5b94357de948604c51b7893cddf6076baad\":\"0xcbd47b6eaa8cc00000\",\"0x4f64a85e8e9a40498c0c75fceb0337fb49083e5e\":\"0x3635c9adc5dea00000\",\"0x4f67396d2553f998785f704e07a639197dd1948d\":\"0x104472521ba7380000\",\"0x4f6d4737d7a940382487264886697cf7637f8015\":\"0x5a87e7d7f5f6580000\",\"0x4f7330096f79ed264ee0127f5d30d2f73c52b3d8\":\"0x1b1a7a420ba00d0000\",\"0x4f767bc8794aef9a0a38fea5c81f14694ff21a13\":\"0x1bc433f23f83140000\",\"0x4f85bc1fc5cbc9c001e8f1372e07505370d8c71f\":\"0x32f51edbaaa3300000\",\"0x4f88dfd01091a45a9e2676021e64286cd36b8d34\":\"0x3635c9adc5dea00000\",\"0x4f8972838f70c903c9b6c6c46162e99d6216d451\":\"0xf9e89a0f2c56c80000\",\"0x4f8ae80238e60008557075ab6afe0a7f2e74d729\":\"0x56bc75e2d63100000\",\"0x4f8e8d274fb22a3fd36a47fe72980471544b3434\":\"0xad78ebc5ac6200000\",\"0x4f9ce2af9b8c5e42c6808a3870ec576f313545d1\":\"0x21e19e0c9bab2400000\",\"0x4fa3f32ef4086448b344d5f0a9890d1ce4d617c3\":\"0x5150ae84a8cdf00000\",\"0x4fa554ab955c249217386a4d3263bbf72895434e\":\"0x1154e53217ddb0000\",\"0x4fa983bb5e3073a8edb557effeb4f9fb1d60ef86\":\"0x56b9af57e575ec0000\",\"0x4faf90b76ecfb9631bf9022176032d8b2c207009\":\"0x36363b5d9a77700000\",\"0x4fc46c396e674869ad9481638f0013630c87caac\":\"0x3635c9adc5dea00000\",\"0x4fcc19ea9f4c57dcbce893193cfb166aa914edc5\":\"0x17b8baa7f19546a0000\",\"0x4fce8429ba49caa0369d1e494db57e89eab2ad39\":\"0x2a5a058fc295ed000000\",\"0x4fdac1aa517007e0089430b3316a1badd12c01c7\":\"0x1b1ae4d6e2ef500000\",\"0x4fe56ab3bae1b0a44433458333c4b05a248f8241\":\"0x762d93d1dd6f900000\",\"0x4feb846be43041fd6b34202897943e3f21cb7f04\":\"0x482fe260cbca90000\",\"0x4fee50c5f988206b09a573469fb1d0b42ebb6dce\":\"0x6cee06ddbe15ec0000\",\"0x4ff676e27f681a982d8fd9d20e648b3dce05e945\":\"0x97c9ce4cf6d5c00000\",\"0x4ff67fb87f6efba9279930cfbd1b7a343c79fade\":\"0x15af1d78b58c400000\",\"0x5006fe4c22173980f00c74342b39cd231c653129\":\"0x6c6b935b8bbd400000\",\"0x500c16352e901d48ba8d04e2c767121772790b02\":\"0x1a3a6824973098000\",\"0x500c902958f6421594d1b6ded712490d52ed6c44\":\"0x6acb3df27e1f880000\",\"0x500e34cde5bd9e2b71bb92d7cf55eee188d5fa0c\":\"0x121ea68c114e5100000\",\"0x5032e4bcf7932b49fdba377b6f1499636513cfc3\":\"0x56bc75e2d63100000\",\"0x50378af7ef54043f892ab7ce97d647793511b108\":\"0x11164759ffb320000\",\"0x503bdbd8bc421c32a443032deb2e3e4cd5ba8b4e\":\"0x6c6b935b8bbd400000\",\"0x504666ce8931175e11a5ed11c1dcaa06e57f4e66\":\"0x27f3edfb34e6e400000\",\"0x50584d9206a46ce15c301117ee28f15c30e60e75\":\"0xb9f65d00f63c0000\",\"0x505a33a18634dd4800693c67f48a1d693d4833f8\":\"0x18921b79941dcd00000\",\"0x505e4f7c275588c533a20ebd2ac13b409bbdea3c\":\"0xf43fc2c04ee00000\",\"0x5062e5134c612f12694dbd0e131d4ce197d1b6a4\":\"0x3635c9adc5dea00000\",\"0x506411fd79003480f6f2b6aac26b7ba792f094b2\":\"0x1b1ae4d6e2ef500000\",\"0x5067f4549afbfe884c59cbc12b96934923d45db0\":\"0x3635c9adc5dea00000\",\"0x50763add868fd7361178342fc055eaa2b95f6846\":\"0x39f9046e0898f0000\",\"0x508cf19119db70aa86454253da764a2cb1b2be1a\":\"0x3635c9adc5dea00000\",\"0x509982f56237ee458951047e0a2230f804e2e895\":\"0x3b4ad496106b7f00000\",\"0x509a20bc48e72be1cdaf9569c711e8648d957334\":\"0x6c6b935b8bbd400000\",\"0x509c8668036d143fb8ae70b11995631f3dfcad87\":\"0x3635c9adc5dea00000\",\"0x50ad187ab21167c2b6e78be0153f44504a07945e\":\"0x56cd55fc64dfe0000\",\"0x50b9fef0a1329b02d16506255f5a2db71ec92d1f\":\"0x47da821564085c0000\",\"0x50bb67c8b8d8bd0f63c4760904f2d333f400aace\":\"0x6c6b935b8bbd400000\",\"0x50bef2756248f9a7a380f91b051ba3be28a649ed\":\"0x6c69f73e29134e0000\",\"0x50ca86b5eb1d01874df8e5f34945d49c6c1ab848\":\"0x3635c9adc5dea00000\",\"0x50cd97e9378b5cf18f173963236c9951ef7438a5\":\"0x4be4e7267b6ae00000\",\"0x50dcbc27bcad984093a212a9b4178eabe9017561\":\"0x7e362790b5ca40000\",\"0x50e13023bd9ca96ad4c53fdfd410cb6b1f420bdf\":\"0xad78ebc5ac6200000\",\"0x50e1c8ec98415bef442618708799437b86e6c205\":\"0x14542ba12a337c00000\",\"0x50f8fa4bb9e2677c990a4ee8ce70dd1523251e4f\":\"0x1693d23164f6b0000\",\"0x50fb36c27107ee2ca9a3236e2746cca19ace6b49\":\"0x6c6b935b8bbd400000\",\"0x50fef296955588caae74c62ec32a23a454e09ab8\":\"0x411dffabc507380000\",\"0x5102a4a42077e11c58df4773e3ac944623a66d9f\":\"0x6c7015fd52ed408000\",\"0x51039377eed0c573f986c5e8a95fb99a59e9330f\":\"0x6acb3df27e1f880000\",\"0x5103bc09933e9921fd53dc536f11f05d0d47107d\":\"0xd8d726b7177a800000\",\"0x5104ecc0e330dd1f81b58ac9dbb1a9fbf88a3c85\":\"0x152d02c7e14af6800000\",\"0x510d8159cc945768c7450790ba073ec0d9f89e30\":\"0x8ac7230489e8000000\",\"0x510eda5601499a0d5e1a006bfffd833672f2e267\":\"0x6c6b935b8bbd400000\",\"0x51126446ab3d8032557e8eba65597d75fadc815c\":\"0x1174a5cdf88bc80000\",\"0x5118557d600d05c2fcbf3806ffbd93d02025d730\":\"0x267d3ab6423f5800000\",\"0x511e0efb04ac4e3ff2e6550e498295bfcd56ffd5\":\"0x243d4d18229ca20000\",\"0x512116817ba9aaf843d1507c65a5ea640a7b9eec\":\"0x2b5e3af16b1880000\",\"0x5126460d692c71c9af6f05574d93998368a23799\":\"0x2d1a51c7e00500000\",\"0x51277fe7c81eebd252a03df69a6b9f326e272207\":\"0x3402e79cab44c8000\",\"0x51296f5044270d17707646129c86aad1645eadc1\":\"0x487c72b310d4648000\",\"0x512b91bbfaa9e581ef683fc90d9db22a8f49f48b\":\"0x41a522386d9b95c00000\",\"0x5135fb8757600cf474546252f74dc0746d06262c\":\"0x6c6b935b8bbd400000\",\"0x514632efbd642c04de6ca342315d40dd90a2dba6\":\"0x90f534608a72880000\",\"0x514b7512c9ae5ea63cbf11715b63f21e18d296c1\":\"0x6c6acc67d7b1d40000\",\"0x5153a0c3c8912881bf1c3501bf64b45649e48222\":\"0xd8d726b7177a800000\",\"0x515651d6db4faf9ecd103a921bbbbe6ae970fdd4\":\"0x43c33c1937564800000\",\"0x515f30bc90cdf4577ee47d65d785fbe2e837c6bc\":\"0x2271b5e018ba0580000\",\"0x5160ed612e1b48e73f3fc15bc4321b8f23b8a24b\":\"0x1e826b422865d80000\",\"0x5161fd49e847f67455f1c8bb7abb36e985260d03\":\"0x410d586a20a4c00000\",\"0x516954025fca2608f47da81c215eedfd844a09ff\":\"0x14b550a013c7380000\",\"0x5169c60aee4ceed1849ab36d664cff97061e8ea8\":\"0xa2a15d09519be00000\",\"0x517c75430de401c341032686112790f46d4d369e\":\"0x150894e849b3900000\",\"0x517cd7608e5d0d83a26b717f3603dac2277dc3a4\":\"0x6c6b935b8bbd400000\",\"0x51865db148881951f51251710e82b9be0d7eadb2\":\"0x6c6b935b8bbd400000\",\"0x51891b2ccdd2f5a44b2a8bc49a5d9bca6477251c\":\"0x10ce1d3d8cb3180000\",\"0x518cef27b10582b6d14f69483ddaa0dd3c87bb5c\":\"0x2086ac351052600000\",\"0x51a6d627f66a8923d88d6094c4715380d3057cb6\":\"0x3e73d27a35941e0000\",\"0x51a8c2163602a32ee24cf4aa97fd9ea414516941\":\"0x368f7e6b8672c0000\",\"0x51b4758e9e1450e7af4268c3c7b1e7bd6f5c7550\":\"0x3635c9adc5dea00000\",\"0x51ca8bd4dc644fac47af675563d5804a0da21eeb\":\"0x2ab7b260ff3fd00000\",\"0x51d24bc3736f88dd63b7222026886630b6eb878d\":\"0x6c6b935b8bbd400000\",\"0x51d78b178d707e396e8710965c4f41b1a1d9179d\":\"0x5fee222041e340000\",\"0x51e32f14f4ca5e287cdac057a7795ea9e0439953\":\"0x1b1ae4d6e2ef500000\",\"0x51e43fe0d25c782860af81ea89dd793c13f0cbb1\":\"0x340aad21b3b700000\",\"0x51e7b55c2f9820eed73884361b5066a59b6f45c6\":\"0x6c6b935b8bbd400000\",\"0x51ea1c0934e3d04022ed9c95a087a150ef705e81\":\"0x1547081e7224d200000\",\"0x51ee0cca3bcb10cd3e983722ced8493d926c0866\":\"0x36356633ebd8ea0000\",\"0x51f4663ab44ff79345f427a0f6f8a6c8a53ff234\":\"0x43c33c1937564800000\",\"0x51f55ef47e6456a418ab32b9221ed27dba6608ee\":\"0xe3aeb5737240a00000\",\"0x51f9c432a4e59ac86282d6adab4c2eb8919160eb\":\"0x703b5b89c3a6e7400000\",\"0x520f66a0e2657ff0ac4195f2f064cf2fa4b24250\":\"0x22b1c8c1227a00000\",\"0x52102354a6aca95d8a2e86d5debda6de69346076\":\"0x6c6b935b8bbd400000\",\"0x5213f459e078ad3ab95a0920239fcf1633dc04ca\":\"0x8cf2187c2afb188000\",\"0x5215183b8f80a9bc03d26ce91207832a0d39e620\":\"0x3635c9adc5dea00000\",\"0x52214378b54004056a7cc08c891327798ac6b248\":\"0x337fe5feaf2d1800000\",\"0x522323aad71dbc96d85af90f084b99c3f09decb7\":\"0x14542ba12a337c00000\",\"0x523e140dc811b186dee5d6c88bf68e90b8e096fd\":\"0x6c6b935b8bbd400000\",\"0x523f6d64690fdacd942853591bb0ff20d3656d95\":\"0x62a992e53a0af00000\",\"0x524fb210522c5e23bb67dfbf8c26aa616da49955\":\"0x363562a66d34238000\",\"0x5255dc69155a45b970c604d30047e2f530690e7f\":\"0x1158e460913d00000\",\"0x5260dc51ee07bddaababb9ee744b393c7f4793a6\":\"0x1d8665fa5fa4c0000\",\"0x5267f4d41292f370863c90d793296903843625c7\":\"0x4be4e7267b6ae00000\",\"0x526bb533b76e20c8ee1ebf123f1e9ff4148e40be\":\"0xaadec983fcff40000\",\"0x526cb09ce3ada3672eec1deb46205be89a4b563e\":\"0x85ca615bf9c0100000\",\"0x52738c90d860e04cb12f498d96fdb5bf36fc340e\":\"0x1a055690d9db80000\",\"0x527a8ca1268633a6c939c5de1b929aee92aeac8d\":\"0x30ca024f987b900000\",\"0x528101ce46b720a2214dcdae6618a53177ffa377\":\"0x1b9612b9dc01ae0000\",\"0x5281733473e00d87f11e9955e589b59f4ac28e7a\":\"0x8bd62ff4eec559200000\",\"0x5298ab182a19359ffcecafd7d1b5fa212dede6dd\":\"0x1158e460913d00000\",\"0x529aa002c6962a3a8545027fd8b05f22b5bf9564\":\"0x5a87e7d7f5f6580000\",\"0x529e824fa072582b4032683ac7eecc1c04b4cac1\":\"0x6c6b935b8bbd400000\",\"0x52a5e4de4393eeccf0581ac11b52c683c76ea15d\":\"0x43c30fb0884a96c0000\",\"0x52b4257cf41b6e28878d50d57b99914ffa89873a\":\"0xd50dc9aa2c41770000\",\"0x52b8a9592634f7300b7c5c59a3345b835f01b95c\":\"0x6c6b935b8bbd400000\",\"0x52bdd9af5978850bc24110718b3723759b437e59\":\"0x5dc892aa1131c80000\",\"0x52cd20403ba7eda6bc307a3d63b5911b817c1263\":\"0x1158e460913d00000\",\"0x52d380511df19d5ec2807bbcb676581b67fd37a3\":\"0xb9f65d00f63c0000\",\"0x52e1731350f983cc2c4189842fde0613fad50ce1\":\"0x277017338a30ae00000\",\"0x52e46783329a769301b175009d346768f4c87ee4\":\"0x6c6b935b8bbd400000\",\"0x52f058d46147e9006d29bf2c09304ad1cddd6e15\":\"0x5150ae84a8cdf00000\",\"0x52f15423323c24f19ae2ab673717229d3f747d9b\":\"0x37a034cbe8e3f38000\",\"0x52f8b509fee1a874ab6f9d87367fbeaf15ac137f\":\"0x3635c9adc5dea00000\",\"0x52fb46ac5d00c3518b2c3a1c177d442f8165555f\":\"0x5150ae84a8cdf00000\",\"0x530077c9f7b907ff9cec0c77a41a70e9029add4a\":\"0x6c6b935b8bbd400000\",\"0x530319db0a8f93e5bb7d4dbf4816314fbed8361b\":\"0x6c6b935b8bbd400000\",\"0x53047dc8ac9083d90672e8b3473c100ccd278323\":\"0x22b1c8c1227a00000\",\"0x530b61e42f39426d2408d40852b9e34ab5ebebc5\":\"0xe7eeba3410b740000\",\"0x530ffac3bc3412e2ec0ea47b7981c770f5bb2f35\":\"0x73f75d1a085ba0000\",\"0x5317ecb023052ca7f5652be2fa854cfe4563df4d\":\"0x1b1ab319f5ec750000\",\"0x53194d8afa3e883502767edbc30586af33b114d3\":\"0x6c6b935b8bbd400000\",\"0x532a7da0a5ad7407468d3be8e07e69c7dd64e861\":\"0x1b1ae4d6e2ef500000\",\"0x532d32b00f305bcc24dcef56817d622f34fb2c24\":\"0x6194049f30f7200000\",\"0x533444584082eba654e1ad30e149735c6f7ba922\":\"0x5dc892aa1131c80000\",\"0x5338ef70eac9dd9af5a0503b5efad1039e67e725\":\"0x90f534608a72880000\",\"0x53396f4a26c2b4604496306c5442e7fcba272e36\":\"0x43f2f08d40e5afc0000\",\"0x533a73a4a2228eee05c4ffd718bbf3f9c1b129a7\":\"0x14542ba12a337c00000\",\"0x533c06928f19d0a956cc28866bf6c8d8f4191a94\":\"0xfd8c14338e6300000\",\"0x534065361cb854fac42bfb5c9fcde0604ac919da\":\"0x6c6b935b8bbd400000\",\"0x53437fecf34ab9d435f4deb8ca181519e2592035\":\"0xa31062beeed700000\",\"0x535201a0a1d73422801f55ded4dfaee4fbaa6e3b\":\"0x226211f7915428000\",\"0x53608105ce4b9e11f86bf497ffca3b78967b5f96\":\"0x43c33c1937564800000\",\"0x536e4d8029b73f5579dca33e70b24eba89e11d7e\":\"0x6acb3df27e1f880000\",\"0x53700d53254d430f22781a4a76a463933b5d6b08\":\"0x6acb3df27e1f880000\",\"0x537f9d4d31ef70839d84b0d9cdb72b9afedbdf35\":\"0xed2b525841adfc00000\",\"0x5381448503c0c702542b1de7cc5fb5f6ab1cf6a5\":\"0x1b1ae4d6e2ef5000000\",\"0x53942e7949d6788bb780a7e8a0792781b1614b84\":\"0x35deb46684f10c80000\",\"0x5395a4455d95d178b4532aa4725b193ffe512961\":\"0x3635c9adc5dea00000\",\"0x53989ed330563fd57dfec9bd343c3760b0799390\":\"0x150894e849b39000000\",\"0x53a244672895480f4a2b1cdf7da5e5a242ec4dbc\":\"0x3635c9adc5dea00000\",\"0x53a714f99fa00fef758e23a2e746326dad247ca7\":\"0x50c5e761a444080000\",\"0x53af32c22fef99803f178cf90b802fb571c61cb9\":\"0xd255d112e103a00000\",\"0x53c0bb7fc88ea422d2ef7e540e2d8f28b1bb8183\":\"0x1158e460913d00000\",\"0x53c5fe0119e1e848640cee30adea96940f2a5d8b\":\"0x49ada5fa8c10c880000\",\"0x53c9eca40973f63bb5927be0bc6a8a8be1951f74\":\"0x6c6b935b8bbd400000\",\"0x53ce88e66c5af2f29bbd8f592a56a3d15f206c32\":\"0x7a28c31cc36040000\",\"0x53cec6c88092f756efe56f7db11228a2db45b122\":\"0xd8d726b7177a800000\",\"0x53e35b12231f19c3fd774c88fec8cbeedf1408b2\":\"0x1bc16d674ec8000000\",\"0x53e4d9696dcb3f4d7b3f70dcaa4eecb71782ff5c\":\"0xad78ebc5ac6200000\",\"0x53faf165be031ec18330d9fce5bd1281a1af08db\":\"0x796e3ea3f8ab00000\",\"0x540a1819bd7c35861e791804e5fbb3bc97c9abb1\":\"0x4ed7dac64230200000\",\"0x540c072802014ef0d561345aec481e8e11cb3570\":\"0x1b1ae4d6e2ef5000000\",\"0x540cf23dd95c4d558a279d778d2b3735b3164191\":\"0x21e19e0c9bab2400000\",\"0x541060fc58c750c40512f83369c0a63340c122b6\":\"0x6acb3df27e1f880000\",\"0x5413c97ffa4a6e2a7bba8961dc9fce8530a787d7\":\"0x3635c9adc5dea00000\",\"0x541db20a80cf3b17f1621f1b3ff79b882f50def3\":\"0x3635c9adc5dea00000\",\"0x542e8096bafb88162606002e8c8a3ed19814aeac\":\"0x6c6b935b8bbd400000\",\"0x54310b3aa88703a725dfa57de6e646935164802c\":\"0x678a932062e4180000\",\"0x5431b1d18751b98fc9e2888ac7759f1535a2db47\":\"0x6c6b935b8bbd400000\",\"0x5431ca427e6165a644bae326bd09750a178c650d\":\"0x6c6b935b8bbd400000\",\"0x5435c6c1793317d32ce13bba4c4ffeb973b78adc\":\"0xd8e6b1c1285ef0000\",\"0x543629c95cdef428ad37d453ca9538a9f90900ac\":\"0x92896529baddc880000\",\"0x54391b4d176d476cea164e5fb535c69700cb2535\":\"0x56cd55fc64dfe0000\",\"0x543a8c0efb8bcd15c543e2a6a4f807597631adef\":\"0x13f80e7e14f2d440000\",\"0x543f8c674e2462d8d5daa0e80195a8708e11a29e\":\"0x37758833b3a7a0000\",\"0x544b5b351d1bc82e9297439948cf4861dac9ae11\":\"0x4a89f54ef0121c00000\",\"0x544dda421dc1eb73bb24e3e56a248013b87c0f44\":\"0x6acb3df27e1f880000\",\"0x54575c3114751e3c631971da6a2a02fd3ffbfcc8\":\"0x692ae8897081d00000\",\"0x545bb070e781172eb1608af7fc2895d6cb87197e\":\"0x79a5c17ec748900000\",\"0x5475d7f174bdb1f789017c7c1705989646079d49\":\"0x1fd933494aa5fe00000\",\"0x548558d08cfcb101181dac1eb6094b4e1a896fa6\":\"0x6c6acc67d7b1d40000\",\"0x54939ff08921b467cf2946751d856378296c63ed\":\"0x3635c9adc5dea00000\",\"0x549b47649cfad993e4064d2636a4baa0623305cc\":\"0x209d922f5259c50000\",\"0x549d51af29f724c967f59423b85b2681e7b15136\":\"0xcbd47b6eaa8cc00000\",\"0x54a1370116fe22099e015d07cd2669dd291cc9d1\":\"0x1158e460913d00000\",\"0x54a62bf9233e146ffec3876e45f20ee8414adeba\":\"0x21e19e0c9bab2400000\",\"0x54b4429b182f0377be7e626939c5db6440f75d7a\":\"0x6acb3df27e1f880000\",\"0x54bcb8e7f73cda3d73f4d38b2d0847e600ba0df8\":\"0x3a70415882df180000\",\"0x54c93e03a9b2e8e4c3672835a9ee76f9615bc14e\":\"0x10d3aa536e2940000\",\"0x54ce88275956def5f9458e3b95decacd484021a0\":\"0x6c6b935b8bbd400000\",\"0x54db5e06b4815d31cb56a8719ba33af2d73e7252\":\"0x24521e2a3017b80000\",\"0x54e01283cc8b384538dd646770b357c960d6cacd\":\"0x10f0cf064dd59200000\",\"0x54ec7300b81ac84333ed1b033cd5d7a33972e234\":\"0xad78ebc5ac6200000\",\"0x54febcce20fe7a9098a755bd90988602a48c089e\":\"0x22b1c8c1227a000000\",\"0x550aadae1221b07afea39fba2ed62e05e5b7b5f9\":\"0x1158e460913d00000\",\"0x550c306f81ef5d9580c06cb1ab201b95c748a691\":\"0x2417d4c470bf140000\",\"0x551999ddd205563327b9b530785acff9bc73a4ba\":\"0x14542ba12a337c00000\",\"0x551e7784778ef8e048e495df49f2614f84a4f1dc\":\"0x2086ac351052600000\",\"0x5529830a61c1f13c197e550beddfd6bd195c9d02\":\"0x21e19e0c9bab2400000\",\"0x552987f0651b915b2e1e5328c121960d4bdd6af4\":\"0x61093d7c2c6d380000\",\"0x553b6b1c57050e88cf0c31067b8d4cd1ff80cb09\":\"0x15af1d78b58c400000\",\"0x553f37d92466550e9fd775ae74362df030179132\":\"0x6c6b935b8bbd400000\",\"0x554336ee4ea155f9f24f87bca9ca72e253e12cd2\":\"0x56bc75e2d63100000\",\"0x5543dd6d169eec8a213bbf7a8af9ffd15d4ff759\":\"0xfc936392801c0000\",\"0x5547fdb4ae11953e01292b7807fa9223d0e4606a\":\"0x55d117dcb1d260000\",\"0x5552f4b3ed3e1da79a2f78bb13e8ae5a68a9df3b\":\"0x3635c9adc5dea00000\",\"0x555ca9f05cc134ab54ae9bea1c3ff87aa85198ca\":\"0x56bc75e2d63100000\",\"0x555d8d3ce1798aca902754f164b8be2a02329c6c\":\"0x21e19e0c9bab2400000\",\"0x555df19390c16d01298772bae8bc3a1152199cbd\":\"0xad78ebc5ac6200000\",\"0x555ebe84daa42ba256ea789105cec4b693f12f18\":\"0x56bc75e2d63100000\",\"0x557f5e65e0da33998219ad4e99570545b2a9d511\":\"0x2559cbb985842400000\",\"0x558360206883dd1b6d4a59639e5629d0f0c675d0\":\"0x6c6b935b8bbd400000\",\"0x5584423050e3c2051f0bbd8f44bd6dbc27ecb62c\":\"0xa2a15d09519be00000\",\"0x55852943492970f8d629a15366cdda06a94f4513\":\"0x6c6b935b8bbd400000\",\"0x55866486ec168f79dbe0e1abb18864d98991ae2c\":\"0xdf6eb0b2d3ca0000\",\"0x558c54649a8a6e94722bd6d21d14714f71780534\":\"0x6c6b935b8bbd400000\",\"0x559194304f14b1b93afe444f0624e053c23a0009\":\"0x15af1d78b58c400000\",\"0x5593c9d4b664730fd93ca60151c25c2eaed93c3b\":\"0xad78ebc5ac6200000\",\"0x559706c332d20779c45f8a6d046a699159b74921\":\"0x149b442e85a3cf8000\",\"0x5598b3a79a48f32b1f5fc915b87b645d805d1afe\":\"0x1b1ae4d6e2ef500000\",\"0x55a3df57b7aaec16a162fd5316f35bec082821cf\":\"0x6acb3df27e1f880000\",\"0x55a4cac0cb8b582d9fef38c5c9fff9bd53093d1f\":\"0x6acb3df27e1f880000\",\"0x55a61b109480b5b2c4fcfdef92d90584160c0d35\":\"0x26c564d2b53f60000\",\"0x55aa5d313ebb084da0e7801091e29e92c5dec3aa\":\"0x6c6b935b8bbd400000\",\"0x55ab99b0e0e55d7bb874b7cfe834de631c97ec23\":\"0x37e98ce36899e40000\",\"0x55af092f94ba6a79918b0cf939eab3f01b3f51c7\":\"0x820d5e39576120000\",\"0x55c564664166a1edf3913e0169f1cd451fdb5d0c\":\"0x8217ea49508e6c0000\",\"0x55ca6abe79ea2497f46fdbb830346010fe469cbe\":\"0x1369fb96128ac480000\",\"0x55caff4bba04d220c9a5d2018672ec85e31ef83e\":\"0x6c6b935b8bbd400000\",\"0x55d057bcc04bd0f4af9642513aa5090bb3ff93fe\":\"0x3bfe452c8edd4c0000\",\"0x55d42eb495bf46a634997b5f2ea362814918e2b0\":\"0x5c0d265b5b2a80000\",\"0x55da9dcdca61cbfe1f133c7bcefc867b9c8122f9\":\"0x2fb474098f67c00000\",\"0x55e220876262c218af4f56784798c7e55da09e91\":\"0x73d99c15645d30000\",\"0x55fd08d18064bd202c0ec3d2cce0ce0b9d169c4d\":\"0x6acb3df27e1f880000\",\"0x5600730a55f6b20ebd24811faa3de96d1662abab\":\"0x65ea3db75546600000\",\"0x5603241eb8f08f721e348c9d9ad92f48e390aa24\":\"0xad78ebc5ac6200000\",\"0x560536794a9e2b0049d10233c41adc5f418a264a\":\"0x3635c9adc5dea00000\",\"0x5607590059a9fec1881149a44b36949aef85d560\":\"0x6c6b935b8bbd400000\",\"0x560becdf52b71f3d8827d927610f1a980f33716f\":\"0x17474d705f56d08000\",\"0x560da37e956d862f81a75fd580a7135c1b246352\":\"0x21e19e0c9bab2400000\",\"0x560fc08d079f047ed8d7df75551aa53501f57013\":\"0x19bff2ff57968c00000\",\"0x561be9299b3e6b3e63b79b09169d1a948ae6db01\":\"0x1b1ae4d6e2ef500000\",\"0x562020e3ed792d2f1835fe5f55417d5111460c6a\":\"0x43c33c1937564800000\",\"0x5620f46d1451c2353d6243a5d4b427130be2d407\":\"0x340aad21b3b700000\",\"0x562105e82b099735de49f62692cc87cd38a8edcd\":\"0x14542ba12a337c00000\",\"0x562a8dcbbeeef7b360685d27303bd69e094accf6\":\"0x21e19e0c9bab2400000\",\"0x562bced38ab2ab6c080f3b0541b8456e70824b3f\":\"0x22ca3587cf4eb00000\",\"0x562be95aba17c5371fe2ba828799b1f55d2177d6\":\"0x816d37e87b9d1e00000\",\"0x562f16d79abfcec3943e34b20f05f97bdfcda605\":\"0xd8d726b7177a800000\",\"0x56373daab46316fd7e1576c61e6affcb6559ddd7\":\"0xbac715d146c9e0000\",\"0x56397638bb3cebf1f62062794b5eb942f916171d\":\"0x6c6b935b8bbd400000\",\"0x563a03ab9c56b600f6d25b660c21e16335517a75\":\"0x3635c9adc5dea00000\",\"0x563cb8803c1d32a25b27b64114852bd04d9c20cd\":\"0xb149ead0ad9d80000\",\"0x56586391040c57eec6f5affd8cd4abde10b50acc\":\"0xd8d726b7177a800000\",\"0x566c10d638e8b88b47d6e6a414497afdd00600d4\":\"0x56b394263a40c0000\",\"0x566c28e34c3808d9766fe8421ebf4f2b1c4f7d77\":\"0x6acb3df27e1f880000\",\"0x568df31856699bb5acfc1fe1d680df9960ca4359\":\"0x4acf5552f3b2498000\",\"0x5691dd2f6745f20e22d2e1d1b955aa2903d65656\":\"0x6ac5c62d9486070000\",\"0x56a1d60d40f57f308eebf087dee3b37f1e7c2cba\":\"0x3edcaec82d06f80000\",\"0x56ac20d63bd803595cec036da7ed1dc66e0a9e07\":\"0x3772a53ccdc658000\",\"0x56b6c23dd2ec90b4728f3bb2e764c3c50c85f144\":\"0x3635c9adc5dea00000\",\"0x56df05bad46c3f00ae476ecf017bb8c877383ff1\":\"0xab15daaef70400000\",\"0x56ee197f4bbf9f1b0662e41c2bbd9aa1f799e846\":\"0x3635c9adc5dea00000\",\"0x56f493a3d108aaa2d18d98922f8efe1662cfb73d\":\"0x6d8121a194d1100000\",\"0x56fc1a7bad4047237ce116146296238e078f93ad\":\"0x9a63f08ea63880000\",\"0x56febf9e1003af15b1bd4907ec089a4a1b91d268\":\"0xad78ebc5ac6200000\",\"0x5717cc9301511d4a81b9f583148beed3d3cc8309\":\"0x8cf23f909c0fa00000\",\"0x5717f2d8f18ffcc0e5fe247d3a4219037c3a649c\":\"0xd8bb6549b02bb80000\",\"0x571950ea2c90c1427d939d61b4f2de4cf1cfbfb0\":\"0x1158e460913d00000\",\"0x5719f49b720da68856f4b9e708f25645bdbc4b41\":\"0x22b1c8c1227a000000\",\"0x572ac1aba0de23ae41a7cae1dc0842d8abfc103b\":\"0x678a932062e4180000\",\"0x572dd8cd3fe399d1d0ec281231b7cefc20b9e4bb\":\"0x233c8fe42703e800000\",\"0x574921838cc77d6c98b17d903a3ae0ee0da95bd0\":\"0xb5328178ad0f2a00000\",\"0x574ad9355390e4889ef42acd138b2a27e78c00ae\":\"0x5467b732a913340000\",\"0x574de1b3f38d915846ae3718564a5ada20c2f3ed\":\"0xd8d726b7177a800000\",\"0x575c00c2818210c28555a0ff29010289d3f82309\":\"0x21e19e0c9bab2400000\",\"0x5773b6026721a1dd04b7828cd62b591bfb34534c\":\"0x5b7ac4553de7ae00000\",\"0x5777441c83e03f0be8dd340bde636850847c620b\":\"0x21e19e0c9bab2400000\",\"0x5778ffdc9b94c5a59e224eb965b6de90f222d170\":\"0x122d7ff36603fc0000\",\"0x577aeee8d4bc08fc97ab156ed57fb970925366be\":\"0x120df1147258bf0000\",\"0x577b2d073c590c50306f5b1195a4b2ba9ecda625\":\"0x1440bdd49515f00000\",\"0x577bfe64e3a1e3800e94db1c6c184d8dc8aafc66\":\"0x5134ed17417f280000\",\"0x57825aeb09076caa477887fbc9ae37e8b27cc962\":\"0x56bc75e2d63100000\",\"0x57883010b4ac857fedac03eab2551723a8447ffb\":\"0x3635c9adc5dea00000\",\"0x5789d01db12c816ac268e9af19dc0dd6d99f15df\":\"0xad78ebc5ac6200000\",\"0x5792814f59a33a1843faa01baa089eb02ffb5cf1\":\"0x1b1ab319f5ec750000\",\"0x5793abe6f1533311fd51536891783b3f9625ef1c\":\"0x2cd8a656f23fda0000\",\"0x5797b60fd2894ab3c2f4aede86daf2e788d745ad\":\"0x14542ba12a337c00000\",\"0x57a852fdb9b1405bf53ccf9508f83299d3206c52\":\"0x6c6b935b8bbd400000\",\"0x57b23d6a1adc06c652a779c6a7fb6b95b9fead66\":\"0xad78ebc5ac6200000\",\"0x57bc20e2d62b3d19663cdb4c309d5b4f2fc2db8f\":\"0x56bc75e2d63100000\",\"0x57bddf078834009c89d88e6282759dc45335b470\":\"0x74717cfb6883100000\",\"0x57beea716cbd81700a73d67f9ff039529c2d9025\":\"0xad78ebc5ac6200000\",\"0x57d032a43d164e71aa2ef3ffd8491b0a4ef1ea5b\":\"0x6c6b935b8bbd400000\",\"0x57d3df804f2beee6ef53ab94cb3ee9cf524a18d3\":\"0x1556616b9606670000\",\"0x57d5fd0e3d3049330ffcdcd020456917657ba2da\":\"0x6bf20195f554d40000\",\"0x57dd9471cbfa262709f5f486bcb774c5f527b8f8\":\"0xaadec983fcff40000\",\"0x57df23bebdc65eb75feb9cb2fad1c073692b2baf\":\"0xd8d726b7177a800000\",\"0x5800cd8130839e94495d2d8415a8ea2c90e0c5cb\":\"0xad78ebc5ac6200000\",\"0x5803e68b34da121aef08b602badbafb4d12481ca\":\"0x3cfc82e37e9a7400000\",\"0x5816c2687777b6d7d2a2432d59a41fa059e3a406\":\"0x1c4fe43adb0a5e900000\",\"0x581a3af297efa4436a29af0072929abf9826f58b\":\"0x6c6b935b8bbd400000\",\"0x581b9fd6eae372f3501f42eb9619eec820b78a84\":\"0x42be2c00ca53b8d8000\",\"0x581bdf1bb276dbdd86aedcdb397a01efc0e00c5b\":\"0x3635c9adc5dea00000\",\"0x581f34b523e5b41c09c87c298e299cbc0e29d066\":\"0x3d5833aafd39758000\",\"0x5824a7e22838277134308c5f4b50dab65e43bb31\":\"0x14542ba12a337c00000\",\"0x582b70669c97aab7d68148d8d4e90411e2810d56\":\"0x36356633ebd8ea0000\",\"0x582e7cc46f1d7b4e6e9d95868bfd370573178f4c\":\"0x6c6b935b8bbd400000\",\"0x583e83ba55e67e13e0e76f8392d873cd21fbf798\":\"0x1158e460913d00000\",\"0x5869fb867d71f1387f863b698d09fdfb87c49b5c\":\"0xc6bbf858b316080000\",\"0x587d6849b168f6c3332b7abae7eb6c42c37f48bf\":\"0x2fb474098f67c00000\",\"0x5887dc6a33dfed5ac1edefe35ef91a216231ac96\":\"0xd8d726b7177a80000\",\"0x588ed990a2aff44a94105d58c305257735c868ac\":\"0x368c8623a8b4d100000\",\"0x58ae2ddc5f4c8ada97e06c0086171767c423f5d7\":\"0x57473d05dabae80000\",\"0x58aed6674affd9f64233272a578dd9386b99c263\":\"0xb8507a820728200000\",\"0x58b808a65b51e6338969afb95ec70735e451d526\":\"0x8784bc1b9837a380000\",\"0x58b8ae8f63ef35ed0762f0b6233d4ac14e64b64d\":\"0x6c6b935b8bbd400000\",\"0x58ba1569650e5bbbb21d35d3e175c0d6b0c651a9\":\"0x1b1ae4d6e2ef500000\",\"0x58c555bc293cdb16c6362ed97ae9550b92ea180e\":\"0x1158e460913d00000\",\"0x58c650ced40bb65641b8e8a924a039def46854df\":\"0x100bd33fb98ba0000\",\"0x58c90754d2f20a1cb1dd330625e04b45fa619d5c\":\"0x6c6b935b8bbd400000\",\"0x58e2f11223fc8237f69d99c6289c148c0604f742\":\"0x5150ae84a8cdf000000\",\"0x58e554af3d87629620da61d538c7f5b4b54c4afe\":\"0x46509d694534728000\",\"0x58e5c9e344c806650dacfc904d33edba5107b0de\":\"0x10910d4cdc9f60000\",\"0x58e661d0ba73d6cf24099a5562b808f7b3673b68\":\"0x6c6b935b8bbd400000\",\"0x58f05b262560503ca761c61890a4035f4c737280\":\"0x1b1ae4d6e2ef5000000\",\"0x58fb947364e7695765361ebb1e801ffb8b95e6d0\":\"0xad78ebc5ac6200000\",\"0x590181d445007bd0875aaf061c8d51153900836a\":\"0x6c6b935b8bbd400000\",\"0x5902e44af769a87246a21e079c08bf36b06efeb3\":\"0x3635c9adc5dea00000\",\"0x590acbda37290c0d3ec84fc2000d7697f9a4b15d\":\"0x1b1ae4d6e2ef500000\",\"0x590ccb5911cf78f6f622f535c474375f4a12cfcf\":\"0x43c33c1937564800000\",\"0x5910106debd291a1cd80b0fbbb8d8d9e93a7cc1e\":\"0x6c6b935b8bbd400000\",\"0x59161749fedcf1c721f2202d13ade2abcf460b3d\":\"0x6c6b935b8bbd400000\",\"0x591bef3171d1c5957717a4e98d17eb142c214e56\":\"0x43c33c1937564800000\",\"0x59203cc37599b648312a7cc9e06dacb589a9ae6a\":\"0x80f7971b6400e8000\",\"0x59268171b833e0aa13c54b52ccc0422e4fa03aeb\":\"0xa2a15d09519be00000\",\"0x592777261e3bd852c48eca95b3a44c5b7f2d422c\":\"0x43c33c1937564800000\",\"0x593044670faeff00a55b5ae051eb7be870b11694\":\"0x73f75d1a085ba0000\",\"0x593b45a1864ac5c7e8f0caaeba0d873cd5d113b2\":\"0x14542ba12a337c00000\",\"0x593c48935beaff0fde19b04d309cd530a28e52ce\":\"0xd8d726b7177a800000\",\"0x59473cd300fffae240f5785626c65dfec792b9af\":\"0x1158e460913d00000\",\"0x5948bc3650ed519bf891a572679fd992f8780c57\":\"0xaadec983fcff40000\",\"0x594a76f06935388dde5e234696a0668bc20d2ddc\":\"0x97c9ce4cf6d5c00000\",\"0x59569a21d28fba4bda37753405a081f2063da150\":\"0xd8d726b7177a800000\",\"0x5956b28ec7890b76fc061a1feb52d82ae81fb635\":\"0x6c6b935b8bbd400000\",\"0x595e23d788a2d4bb85a15df7136d264a635511b3\":\"0xd5967be4fc3f100000\",\"0x597038ff91a0900cbbab488af483c790e6ec00a0\":\"0x21e19e0c9bab2400000\",\"0x5970fb1b144dd751e4ce2eca7caa20e363dc4da3\":\"0x21e19e0c9bab2400000\",\"0x5975b9528f23af1f0e2ec08ac8ebaa786a2cb8e0\":\"0x12bf50503ae3038000\",\"0x5975d78d974ee5bb9e4d4ca2ae77c84b9c3b4b82\":\"0x4a4491bd6dcd280000\",\"0x5985c59a449dfc5da787d8244e746c6d70caa55f\":\"0x56bc75e2d63100000\",\"0x598aaabae9ed833d7bc222e91fcaa0647b77580b\":\"0x6194049f30f7200000\",\"0x5992624c54cdec60a5ae938033af8be0c50cbb0a\":\"0xc454e0f8870f2b0000\",\"0x599728a78618d1a17b9e34e0fed8e857d5c40622\":\"0x2f6f10780d22cc00000\",\"0x5997ffefb3c1d9d10f1ae2ac8ac3c8e2d2292783\":\"0x3635c9adc5dea00000\",\"0x59a087b9351ca42f58f36e021927a22988284f38\":\"0x100bd33fb98ba0000\",\"0x59a12df2e3ef857aceff9306b309f6a500f70134\":\"0x3635c9adc5dea00000\",\"0x59b96deb8784885d8d3b4a166143cc435d2555a1\":\"0x487a9a304539440000\",\"0x59b9e733cba4be00429b4bd9dfa64732053a7d55\":\"0x1158e460913d00000\",\"0x59c5d06b170ee4d26eb0a0eb46cb7d90c1c91019\":\"0x21e19e0c9bab2400000\",\"0x59c7f785c93160e5807ed34e5e534bc6188647a7\":\"0x22b1c8c1227a000000\",\"0x59d139e2e40c7b97239d23dfaca33858f602d22b\":\"0x6c6b935b8bbd400000\",\"0x59f6247b0d582aaa25e5114765e4bf3c774f43c2\":\"0x2b5e3af16b1880000\",\"0x59fe00696dbd87b7976b29d1156c8842a2e17914\":\"0x6c6b935b8bbd400000\",\"0x5a0d609aae2332b137ab3b2f26615a808f37e433\":\"0x21e19e0c9bab24000000\",\"0x5a192b964afd80773e5f5eda6a56f14e25e0c6f3\":\"0x1b1ae4d6e2ef500000\",\"0x5a1a336962d6e0c63031cc83c6a5c6a6f4478ecb\":\"0x3635c9adc5dea00000\",\"0x5a1d2d2d1d520304b6208849570437eb3091bb9f\":\"0x6acb3df27e1f880000\",\"0x5a267331facb262daaecd9dd63a9700c5f5259df\":\"0x56bc75e2d63100000\",\"0x5a285755391e914e58025faa48cc685f4fd4f5b8\":\"0x581767ba6189c400000\",\"0x5a2916b8d2e8cc12e207ab464d433e2370d823d9\":\"0x6c6b935b8bbd400000\",\"0x5a2b1c853aeb28c45539af76a00ac2d8a8242896\":\"0x15af1d78b58c40000\",\"0x5a2daab25c31a61a92a4c82c9925a1d2ef58585e\":\"0xc380da9c7950c0000\",\"0x5a30feac37ac9f72d7b4af0f2bc73952c74fd5c3\":\"0x6c6b935b8bbd400000\",\"0x5a5468fa5ca226c7532ecf06e1bc1c45225d7ec9\":\"0x678a932062e4180000\",\"0x5a565285374a49eedd504c957d510874d00455bc\":\"0x56bc75e2d63100000\",\"0x5a5ee8e9bb0e8ab2fecb4b33d29478be50bbd44b\":\"0x2a1129d09367200000\",\"0x5a5f8508da0ebebb90be9033bd4d9e274105ae00\":\"0x16a6502f15a1e540000\",\"0x5a6071bcebfcba4ab57f4db96fc7a68bece2ba5b\":\"0x6c6b935b8bbd400000\",\"0x5a60c924162873fc7ea4da7f972e350167376031\":\"0x487f277a885798000\",\"0x5a6686b0f17e07edfc59b759c77d5bef164d3879\":\"0x50c5e761a444080000\",\"0x5a70106f20d63f875265e48e0d35f00e17d02bc9\":\"0x1158e460913d00000\",\"0x5a74ba62e7c81a3474e27d894fed33dd24ad95fe\":\"0xfc936392801c0000\",\"0x5a7735007d70b06844da9901cdfadb11a2582c2f\":\"0x14542ba12a337c00000\",\"0x5a82f96cd4b7e2d93d10f3185dc8f43d4b75aa69\":\"0x6c633fbab98c040000\",\"0x5a87f034e6f68f4e74ffe60c64819436036cf7d7\":\"0x1158e460913d00000\",\"0x5a891155f50e42074374c739baadf7df2651153a\":\"0x102da6fd0f73a3c0000\",\"0x5a9c8b69fc614d69564999b00dcb42db67f97e90\":\"0xb9e615abad3a778000\",\"0x5aaf1c31254a6e005fba7f5ab0ec79d7fc2b630e\":\"0x14061b9d77a5e980000\",\"0x5ab1a5615348001c7c775dc75748669b8be4de14\":\"0x256a72fb29e69c0000\",\"0x5abfec25f74cd88437631a7731906932776356f9\":\"0x9d83cc0dfa11177ff8000\",\"0x5ac2908b0f398c0df5bac2cb13ca7314fba8fa3d\":\"0xad4c8316a0b0c0000\",\"0x5ac99ad7816ae9020ff8adf79fa9869b7cea6601\":\"0x472698b413b43200000\",\"0x5ad12c5ed4fa827e2150cfa0d68c0aa37b1769b8\":\"0x2b5e3af16b18800000\",\"0x5ad5e420755613886f35aa56ac403eebdfe4b0d0\":\"0x10f0cf064dd592000000\",\"0x5ade77fd81c25c0af713b10702768c1eb2f975e7\":\"0x1158e460913d00000\",\"0x5ae64e853ba0a51282cb8db52e41615e7c9f733f\":\"0x6c6b935b8bbd400000\",\"0x5aed0e6cfe95f9d680c76472a81a2b680a7f93e2\":\"0xaadec983fcff40000\",\"0x5aef16a226dd68071f2483e1da42598319f69b2c\":\"0x6c6b935b8bbd400000\",\"0x5af46a25ac09cb73616b53b14fb42ff0a51cddb2\":\"0xd8d726b7177a800000\",\"0x5af7c072b2c5acd71c76addcce535cf7f8f93585\":\"0x1158e460913d00000\",\"0x5afda9405c8e9736514574da928de67456010918\":\"0x145b8b0239a46920000\",\"0x5b06d1e6930c1054692b79e3dbe6ecce53966420\":\"0xb227f63be813c0000\",\"0x5b25cae86dcafa2a60e7723631fc5fa49c1ad87d\":\"0x870c58510e85200000\",\"0x5b287c7e734299e727626f93fb1187a60d5057fe\":\"0x57cd934a914cb0000\",\"0x5b290c01967c812e4dc4c90b174c1b4015bae71e\":\"0x820eb348d52b90000\",\"0x5b2b64e9c058e382a8b299224eecaa16e09c8d92\":\"0x8ba52e6fc45e40000\",\"0x5b2e2f1618552eab0db98add55637c2951f1fb19\":\"0x28a857425466f800000\",\"0x5b30608c678e1ac464a8994c3b33e5cdf3497112\":\"0x15af1d78b58c400000\",\"0x5b333696e04cca1692e71986579c920d6b2916f9\":\"0x1b1ae4d6e2ef500000\",\"0x5b430d779696a3653fc60e74fbcbacf6b9c2baf1\":\"0x2f6f10780d22cc00000\",\"0x5b437365ae3a9a2ff97c68e6f90a7620188c7d19\":\"0x6c8754c8f30c080000\",\"0x5b49afcd75447838f6e7ceda8d21777d4fc1c3c0\":\"0xd8d726b7177a800000\",\"0x5b4c0c60f10ed2894bdb42d9dd1d210587810a0d\":\"0x1b1ae4d6e2ef500000\",\"0x5b4ea16db6809b0352d4b6e81c3913f76a51bb32\":\"0x15af1d78b58c400000\",\"0x5b5be0d8c67276baabd8edb30d48ea75640b8b29\":\"0x2cb1f55fb7be100000\",\"0x5b5d517029321562111b43086d0b043591109a70\":\"0x8cf23f909c0fa00000\",\"0x5b5d8c8eed6c85ac215661de026676823faa0a0c\":\"0x43c33c1937564800000\",\"0x5b6d55f6712967405c659129f4b1de09acf2cb7b\":\"0xe7eeba3410b740000\",\"0x5b70c49cc98b3df3fbe2b1597f5c1b6347a388b7\":\"0x34957444b840e80000\",\"0x5b736eb18353629bde9676dadd165034ce5ecc68\":\"0x6acb3df27e1f880000\",\"0x5b759fa110a31c88469f54d44ba303d57dd3e10f\":\"0x5b46dd2f0ea3b80000\",\"0x5b7784caea01799ca30227827667ce207c5cbc76\":\"0x6c6b935b8bbd400000\",\"0x5b78eca27fbdea6f26befba8972b295e7814364b\":\"0x6c6b935b8bbd400000\",\"0x5b800bfd1b3ed4a57d875aed26d42f1a7708d72a\":\"0x15a82d1d5bb88e00000\",\"0x5b85e60e2af0544f2f01c64e2032900ebd38a3c7\":\"0x6c6b935b8bbd400000\",\"0x5ba2c6c35dfaec296826591904d544464aeabd5e\":\"0x1158e460913d00000\",\"0x5baf6d749620803e8348af3710e5c4fbf20fc894\":\"0x10f4002615dfe900000\",\"0x5bc1f95507b1018642e45cd9c0e22733b9b1a326\":\"0x56bc75e2d63100000\",\"0x5bd23547477f6d09d7b2a005c5ee650c510c56d7\":\"0x21e19e0c9bab2400000\",\"0x5bd24aac3612b20c609eb46779bf95698407c57c\":\"0x6acb3df27e1f880000\",\"0x5bd6862d517d4de4559d4eec0a06cad05e2f946e\":\"0xad78ebc5ac6200000\",\"0x5be045512a026e3f1cebfd5a7ec0cfc36f2dc16b\":\"0x68155a43676e00000\",\"0x5bf9f2226e5aeacf1d80ae0a59c6e38038bc8db5\":\"0x14542ba12a337c00000\",\"0x5bfafe97b1dd1d712be86d41df79895345875a87\":\"0x1b1ae4d6e2ef500000\",\"0x5c0f2e51378f6b0d7bab617331580b6e39ad3ca5\":\"0x2086ac3510526000000\",\"0x5c29f9e9a523c1f8669448b55c48cbd47c25e610\":\"0x3446a0dad04cb00000\",\"0x5c308bac4857d33baea074f3956d3621d9fa28e1\":\"0x10f08eda8e555098000\",\"0x5c312a56c784b122099b764d059c21ece95e84ca\":\"0x52663ccab1e1c0000\",\"0x5c31996dcac015f9be985b611f468730ef244d90\":\"0xad78ebc5ac6200000\",\"0x5c323457e187761a8276e359b7b7af3f3b6e3df6\":\"0x21e19e0c9bab2400000\",\"0x5c3c1c645b917543113b3e6c1c054da1fe742b9a\":\"0x2b5e3af16b18800000\",\"0x5c3d19441d196cb443662020fcad7fbb79b29e78\":\"0xc673ce3c40160000\",\"0x5c3f567faff7bad1b5120022e8cbcaa82b4917b3\":\"0x6c6b935b8bbd400000\",\"0x5c4368918ace6409c79eca80cdaae4391d2b624e\":\"0xd8d726b7177a800000\",\"0x5c464197791c8a3da3c925436f277ab13bf2faa2\":\"0x1b1ae4d6e2ef5000000\",\"0x5c4881165cb42bb82e97396c8ef44adbf173fb99\":\"0x5fee222041e340000\",\"0x5c4892907a0720df6fd3413e63ff767d6b398023\":\"0x2cb009fd3b5790f8000\",\"0x5c4f24e994ed8f850ea7818f471c8fac3bcf0452\":\"0x5d80688d9e31c00000\",\"0x5c5419565c3aad4e714e0739328e3521c98f05cc\":\"0x1c9f78d2893e400000\",\"0x5c6136e218de0a61a137b2b3962d2a6112b809d7\":\"0xff3dbb65ff4868000\",\"0x5c61ab79b408dd3229f662593705d72f1e147bb8\":\"0x4d0243d3498cd840000\",\"0x5c6d041da7af4487b9dc48e8e1f60766d0a56dbc\":\"0x4f070a003e9c740000\",\"0x5c6f36af90ab1a656c6ec8c7d521512762bba3e1\":\"0x6c68ccd09b022c0000\",\"0x5c7b9ec7a2438d1e3c7698b545b9c3fd77b7cd55\":\"0x3635c9adc5dea00000\",\"0x5c936f3b9d22c403db5e730ff177d74eef42dbbf\":\"0x410d586a20a4c0000\",\"0x5cb731160d2e8965670bde925d9de5510935347d\":\"0x22b1c8c1227a00000\",\"0x5cb953a0e42f5030812226217fffc3ce230457e4\":\"0x56bc75e2d63100000\",\"0x5cbd8daf27ddf704cdd0d909a789ba36ed4f37b2\":\"0xb9f65d00f63c0000\",\"0x5cc4cba621f220637742057f6055b80dffd77e13\":\"0x878477b7d253b660000\",\"0x5cc7d3066d45d27621f78bb4b339473e442a860f\":\"0x21e1899f0377aea0000\",\"0x5cccf1508bfd35c20530aa642500c10dee65eaed\":\"0x2e141ea081ca080000\",\"0x5cce72d068c7c3f55b1d2819545e77317cae8240\":\"0x692ae8897081d00000\",\"0x5cd0e475b54421bdfc0c12ea8e082bd7a5af0a6a\":\"0x332ca1b67940c0000\",\"0x5cd588a14ec648ccf64729f9167aa7bf8be6eb3d\":\"0x3635c9adc5dea00000\",\"0x5cd8af60de65f24dc3ce5730ba92653022dc5963\":\"0x61093d7c2c6d380000\",\"0x5cdc4708f14f40dcc15a795f7dc8cb0b7faa9e6e\":\"0x1d1c5f3eda20c40000\",\"0x5ce0b6862cce9162e87e0849e387cb5df4f9118c\":\"0x5a87e7d7f5f6580000\",\"0x5ce2e7ceaaa18af0f8aafa7fbad74cc89e3cd436\":\"0x43c33c1937564800000\",\"0x5ce44068b8f4a3fe799e6a8311dbfdeda29dee0e\":\"0x6c6b935b8bbd400000\",\"0x5cebe30b2a95f4aefda665651dc0cf7ef5758199\":\"0xfc936392801c0000\",\"0x5cf18fa7c8a7c0a2b3d5efd1990f64ddc569242c\":\"0x3635c9adc5dea00000\",\"0x5cf44e10540d65716423b1bcb542d21ff83a94cd\":\"0x21e19e0c9bab2400000\",\"0x5cf8c03eb3e872e50f7cfd0c2f8d3b3f2cb5183a\":\"0xad78ebc5ac6200000\",\"0x5cfa8d568575658ca4c1a593ac4c5d0e44c60745\":\"0xfc66fae3746ac0000\",\"0x5cfa9877f719c79d9e494a08d1e41cf103fc87c9\":\"0xad78ebc5ac6200000\",\"0x5d1dc3387b47b8451e55106c0cc67d6dc72b7f0b\":\"0x6c6b935b8bbd400000\",\"0x5d231a70c1dfeb360abd97f616e2d10d39f3cab5\":\"0x15af1d78b58c400000\",\"0x5d24bdbc1c47f0eb83d128cae48ac33c4817e91f\":\"0x3635c9adc5dea00000\",\"0x5d2819e8d57821922ee445650ccaec7d40544a8d\":\"0xad78ebc5ac6200000\",\"0x5d2f7f0b04ba4be161e19cb6f112ce7a5e7d7fe4\":\"0x1e87f85809dc00000\",\"0x5d32f6f86e787ff78e63d78b0ef95fe6071852b8\":\"0x15be6174e1912e0000\",\"0x5d39ef9ea6bdfff15d11fe91f561a6f9e31f5da5\":\"0x6c6b935b8bbd400000\",\"0x5d3f3b1f7130b0bb21a0fd32396239179a25657f\":\"0xd3ab8ea5e8fd9e80000\",\"0x5d5751819b4f3d26ed0c1ac571552735271dbefa\":\"0x3635c9adc5dea00000\",\"0x5d5c2c1099bbeefb267e74b58880b444d94449e0\":\"0xdbf0bd181e2e70000\",\"0x5d5cdbe25b2a044b7b9be383bcaa5807b06d3c6b\":\"0x6c6b935b8bbd400000\",\"0x5d5d6e821c6eef96810c83c491468560ef70bfb5\":\"0x6c6b935b8bbd400000\",\"0x5d68324bcb776d3ffd0bf9fea91d9f037fd6ab0f\":\"0x6c6b935b8bbd400000\",\"0x5d6ae8cbd6b3393c22d16254100d0238e808147c\":\"0x2707e56d51a30c0000\",\"0x5d6c5c720d66a6abca8397142e63d26818eaab54\":\"0x22b1c8c1227a00000\",\"0x5d6ccf806738091042ad97a6e095fe8c36aa79c5\":\"0xa31062beeed700000\",\"0x5d71799c8df3bccb7ee446df50b8312bc4eb71c5\":\"0xad78ebc5ac6200000\",\"0x5d822d9b3ef4b502627407da272f67814a6becd4\":\"0x1158e460913d00000\",\"0x5d83b21bd2712360436b67a597ee3378db3e7ae4\":\"0x6c6b935b8bbd400000\",\"0x5d872b122e994ef27c71d7deb457bf65429eca6c\":\"0x1b1aded81d394108000\",\"0x5d8d31faa864e22159cd6f5175ccecc53fa54d72\":\"0x5b696b70dd567100000\",\"0x5d958a9bd189c2985f86c58a8c69a7a78806e8da\":\"0x228f16f861578600000\",\"0x5da2a9a4c2c0a4a924cbe0a53ab9d0c627a1cfa0\":\"0x27bf38c6544df50000\",\"0x5da4ca88935c27f55c311048840e589e04a8a049\":\"0x4563918244f400000\",\"0x5da54785c9bd30575c89deb59d2041d20a39e17b\":\"0x6aa209f0b91d658000\",\"0x5db69fe93e6fb6fbd450966b97238b110ad8279a\":\"0x878678326eac9000000\",\"0x5db7bba1f9573f24115d8c8c62e9ce8895068e9f\":\"0x2b5aad72c65200000\",\"0x5db84400570069a9573cab04b4e6b69535e202b8\":\"0x20dd68aaf3289100000\",\"0x5dc36de5359450a1ec09cb0c44cf2bb42b3ae435\":\"0x3c946d893b33060000\",\"0x5dc6f45fef26b06e3302313f884daf48e2746fb9\":\"0x1b1ae4d6e2ef500000\",\"0x5dcdb6b87a503c6d8a3c65c2cf9a9aa883479a1e\":\"0x1f2bba5d84f99c00000\",\"0x5dd112f368c0e6ceff77a9df02a5481651a02fb7\":\"0x93472c85c6d540000\",\"0x5dd53ae897526b167d39f1744ef7c3da5b37a293\":\"0x1b1ae4d6e2ef5000000\",\"0x5dded049a6e1f329dc4b971e722c9c1f2ade83f0\":\"0x3635c9adc5dea00000\",\"0x5de598aba344378cab4431555b4f79992dc290c6\":\"0x487a9a304539440000\",\"0x5de9e7d5d1b667d095dd34099c85b0421a0bc681\":\"0x1158e460913d00000\",\"0x5df3277ca85936c7a0d2c0795605ad25095e7159\":\"0x6c6b935b8bbd400000\",\"0x5dff811dad819ece3ba602c383fb5dc64c0a3a48\":\"0xa1544be879ea80000\",\"0x5e031b0a724471d476f3bcd2eb078338bf67fbef\":\"0xfc936392801c0000\",\"0x5e0785532c7723e4c0af9357d5274b73bdddddde\":\"0x54b41ea9bdb61dc0000\",\"0x5e11ecf69d551d7f4f84df128046b3a13240a328\":\"0x1158e460913d00000\",\"0x5e1fbd4e58e2312b3c78d7aaaafa10bf9c3189e3\":\"0x878678326eac9000000\",\"0x5e32c72191b8392c55f510d8e3326e3a60501d62\":\"0x9513ea9de0243800000\",\"0x5e51b8a3bb09d303ea7c86051582fd600fb3dc1a\":\"0x1158e460913d00000\",\"0x5e58e255fc19870a04305ff2a04631f2ff294bb1\":\"0xf43fc2c04ee00000\",\"0x5e5a441974a83d74c687ebdc633fb1a49e7b1ad7\":\"0xa2a15d09519be00000\",\"0x5e65458be964ae449f71773704979766f8898761\":\"0x1ca7cc735b6f7c0000\",\"0x5e67df8969101adabd91accd6bb1991274af8df2\":\"0x1b1ae4d6e2ef500000\",\"0x5e6e9747e162f8b45c656e0f6cae7a84bac80e4e\":\"0x6c6b935b8bbd400000\",\"0x5e731b55ced452bb3f3fe871ddc3ed7ee6510a8f\":\"0xa2a15d09519be00000\",\"0x5e74ed80e9655788e1bb269752319667fe754e5a\":\"0x30927f74c9de00000\",\"0x5e772e27f28800c50dda973bb33e10762e6eea20\":\"0x61093d7c2c6d380000\",\"0x5e7b8c54dc57b0402062719dee7ef5e37ea35d62\":\"0x9bf9810fd05c840000\",\"0x5e7f70378775589fc66a81d3f653e954f55560eb\":\"0x83f289181d84c80000\",\"0x5e806e845730f8073e6cc9018ee90f5c05f909a3\":\"0x201e96dacceaf200000\",\"0x5e8e4df18cf0af770978a8df8dac90931510a679\":\"0x6c6b935b8bbd400000\",\"0x5e90c85877198756b0366c0e17b28e52b446505a\":\"0x144a4a18efeb680000\",\"0x5e95fe5ffcf998f9f9ac0e9a81dab83ead77003d\":\"0x1d42c20d32797f0000\",\"0x5ead29037a12896478b1296ab714e9cb95428c81\":\"0x3e043072d406e0000\",\"0x5eb371c407406c427b3b7de271ad3c1e04269579\":\"0xa2a15d09519be00000\",\"0x5ecdbaeab9106ffe5d7b519696609a05baeb85ad\":\"0x1158e460913d00000\",\"0x5ed0d6338559ef44dc7a61edeb893fa5d83fa1b5\":\"0xbed1d0263d9f00000\",\"0x5ed3bbc05240e0d399eb6ddfe60f62de4d9509af\":\"0x2914c02475f9d6d30000\",\"0x5ed3f1ebe2ae6756b5d8dc19cad02c419aa5778b\":\"0x0\",\"0x5ed56115bd6505a88273df5c56839470d24a2db7\":\"0x38e6591ee56668000\",\"0x5ef8c96186b37984cbfe04c598406e3b0ac3171f\":\"0x1fd933494aa5fe00000\",\"0x5efbdfe5389999633c26605a5bfc2c1bb5959393\":\"0x3c057c95cd9080000\",\"0x5f13154631466dcb1353c890932a7c97e0878e90\":\"0x14542ba12a337c00000\",\"0x5f167aa242bc4c189adecb3ac4a7c452cf192fcf\":\"0x6c6b4c4da6ddbe0000\",\"0x5f1c8a04c90d735b8a152909aeae636fb0ce1665\":\"0x17b7827618c5a370000\",\"0x5f23ba1f37a96c45bc490259538a54c28ba3b0d5\":\"0x410d586a20a4c00000\",\"0x5f26cf34599bc36ea67b9e7a9f9b4330c9d542a3\":\"0x3635c9adc5dea00000\",\"0x5f29c9de765dde25852af07d33f2ce468fd20982\":\"0x6c6b935b8bbd400000\",\"0x5f2f07d2d697e8c567fcfdfe020f49f360be2139\":\"0x6c6b935b8bbd400000\",\"0x5f321b3daaa296cadf29439f9dab062a4bffedd6\":\"0x47025903ea7ae0000\",\"0x5f333a3b2310765a0d1832b9be4c0a03704c1c09\":\"0x3635c9adc5dea00000\",\"0x5f344b01c7191a32d0762ac188f0ec2dd460911d\":\"0x3635c9adc5dea00000\",\"0x5f363e0ab747e02d1b3b66abb69ea53c7baf523a\":\"0x277017338a30ae00000\",\"0x5f375b86600c40cca8b2676b7a1a1d1644c5f52c\":\"0x44618d74c623f0000\",\"0x5f3e1e6739b0c62200e00a003691d9efb238d89f\":\"0xa2a15d09519be00000\",\"0x5f483ffb8f680aedf2a38f7833afdcde59b61e4b\":\"0x6c6b935b8bbd400000\",\"0x5f4ace4c1cc13391e01f00b198e1f20b5f91cbf5\":\"0x10f0fa8b9d3811a0000\",\"0x5f521282e9b278dc8c034c72af53ee29e5443d78\":\"0x161732d2f8f3ae00000\",\"0x5f68a24c7eb4117667737b33393fb3c2148a53b6\":\"0x2cede918d453c0000\",\"0x5f708eaf39d823946c51b3a3e9b7b3c003e26341\":\"0x62a992e53a0af00000\",\"0x5f742e487e3ab81af2f94afdbe1b9b8f5ccc81bc\":\"0x75c445d41163e60000\",\"0x5f74ed0e24ff80d9b2c4a44baa9975428cd6b935\":\"0xa18bcec34888100000\",\"0x5f76f0a306269c78306b3d650dc3e9c37084db61\":\"0x821ab0d44149800000\",\"0x5f77a107ab1226b3f95f10ee83aefc6c5dff3edc\":\"0x1b1ae4d6e2ef500000\",\"0x5f7b3bbac16dab831a4a0fc53b0c549dc36c31ca\":\"0x692ae8897081d00000\",\"0x5f93ff832774db5114c55bb4bf44ccf3b58f903f\":\"0x28a9c91a263458290000\",\"0x5f9616c47b4a67f406b95a14fe6fc268396f1721\":\"0xad78ebc5ac6200000\",\"0x5f981039fcf50225e2adf762752112d1cc26b6e3\":\"0x1b1a416a2153a50000\",\"0x5f99dc8e49e61d57daef606acdd91b4d7007326a\":\"0xa2a15d09519be00000\",\"0x5fa61f152de6123516c751242979285f796ac791\":\"0xb0f11972963b00000\",\"0x5fa7bfe043886127d4011d8356a47e947963aca8\":\"0x62a992e53a0af00000\",\"0x5fa8a54e68176c4fe2c01cf671c515bfbdd528a8\":\"0x45e155fa0110fa400000\",\"0x5fad960f6b2c84569c9f4d47bf1985fcb2c65da6\":\"0x36356633ebd8ea0000\",\"0x5fc6c11426b4a1eae7e51dd512ad1090c6f1a85b\":\"0x93fe5c57d710680000\",\"0x5fcd84546896dd081db1a320bd4d8c1dd1528c4c\":\"0x1158e460913d00000\",\"0x5fcda847aaf8d7fa8bca08029ca2849166aa15a3\":\"0x21cab81259a3bf0000\",\"0x5fd1c3e31778276cb42ea740f5eae9c641dbc701\":\"0xa844a7424d9c80000\",\"0x5fd3d6777ec2620ae83a05528ed425072d3ca8fd\":\"0x6c6b935b8bbd400000\",\"0x5fd973af366aa5157c54659bcfb27cbfa5ac15d6\":\"0xd8d726b7177a800000\",\"0x5fe77703808f823e6c399352108bdb2c527cb87c\":\"0x6a4076cf7995a00000\",\"0x5fec49c665e64ee89dd441ee74056e1f01e92870\":\"0x1569b9e733474c00000\",\"0x5ff326cd60fd136b245e29e9087a6ad3a6527f0d\":\"0x65ea3db75546600000\",\"0x5ff93de6ee054cad459b2d5eb0f6870389dfcb74\":\"0xbed1d0263d9f00000\",\"0x6006e36d929bf45d8f16231b126a011ae283d925\":\"0x98a7d9b8314c00000\",\"0x6021e85a8814fce1e82a41abd1d3b2dad2faefe0\":\"0x6c6b935b8bbd400000\",\"0x6038740ae28d66ba93b0be08482b3205a0f7a07b\":\"0x11216185c29f700000\",\"0x603f2fab7afb6e017b94766069a4b43b38964923\":\"0x59d2db2414da990000\",\"0x6042276df2983fe2bc4759dc1943e18fdbc34f77\":\"0x6acb3df27e1f880000\",\"0x6042c644bae2b96f25f94d31f678c90dc96690db\":\"0x6c6b935b8bbd400000\",\"0x604cdf18628dbfa8329194d478dd5201eecc4be7\":\"0x13f306a2409fc0000\",\"0x604e9477ebf4727c745bcabbedcb6ccf29994022\":\"0x36369ed7747d260000\",\"0x60676d1fa21fca052297e24bf96389c5b12a70d7\":\"0xd177c5a7a68d60000\",\"0x60676e92d18b000509c61de540e6c5ddb676d509\":\"0x410d586a20a4c00000\",\"0x606f177121f7855c21a5062330c8762264a97b31\":\"0xd8d726b7177a800000\",\"0x60864236930d04d8402b5dcbeb807f3caf611ea2\":\"0xd8d726b7177a800000\",\"0x60ab71cd26ea6d6e59a7a0f627ee079c885ebbf6\":\"0x1731790534df20000\",\"0x60af0ee118443c9b37d2fead77f5e521debe1573\":\"0x678a932062e4180000\",\"0x60b358cb3dbefa37f47df2d7365840da8e3bc98c\":\"0x1158e460913d00000\",\"0x60b8d6b73b79534fb08bb8cbcefac7f393c57bfe\":\"0x5f68e8131ecf800000\",\"0x60be6f953f2a4d25b6256ffd2423ac1438252e4e\":\"0x821ab0d4414980000\",\"0x60c3714fdddb634659e4a2b1ea42c4728cc7b8ba\":\"0xb98bc829a6f90000\",\"0x60cc3d445ebdf76a7d7ae571c6971dff68cc8585\":\"0x3635c9adc5dea00000\",\"0x60d5667140d12614b21c8e5e8a33082e32dfcf23\":\"0x43c33c1937564800000\",\"0x60de22a1507432a47b01cc68c52a0bf8a2e0d098\":\"0x10910d4cdc9f60000\",\"0x60e0bdd0a259bb9cb09d3f37e5cd8b9daceabf8a\":\"0x4a4491bd6dcd280000\",\"0x60e3cc43bcdb026aad759c7066f555bbf2ac66f5\":\"0x6c6b935b8bbd400000\",\"0x61042b80fd6095d1b87be2f00f109fabafd157a6\":\"0x56bc75e2d63100000\",\"0x6107d71dd6d0eefb11d4c916404cb98c753e117d\":\"0x6c6b935b8bbd400000\",\"0x610fd6ee4eebab10a8c55d0b4bd2e7d6ef817156\":\"0x1159561065d5d0000\",\"0x6114b0eae5576903f80bfb98842d24ed92237f1e\":\"0x56bc75e2d63100000\",\"0x6121af398a5b2da69f65c6381aec88ce9cc6441f\":\"0x22b1c8c1227a000000\",\"0x612667f172135b950b2cd1de10afdece6857b873\":\"0x3635c9adc5dea00000\",\"0x612ced8dc0dc9e899ee46f7962333315f3f55e44\":\"0x125e35f9cd3d9b0000\",\"0x6134d942f037f2cc3d424a230c603d67abd3edf7\":\"0x6c6b935b8bbd400000\",\"0x613ac53be565d46536b820715b9b8d3ae68a4b95\":\"0xcbd47b6eaa8cc00000\",\"0x613fab44b16bbe554d44afd178ab1d02f37aeaa5\":\"0x6c6b935b8bbd400000\",\"0x614e8bef3dd2c59b59a4145674401018351884ea\":\"0x1158e460913d00000\",\"0x61518464fdd8b73c1bb6ac6db600654938dbf17a\":\"0xad78ebc5ac6200000\",\"0x61547d376e5369bcf978fc162c3c56ae453547e8\":\"0xad78ebc5ac6200000\",\"0x6158e107c5eb54cb7604e0cd8dc1e07500d91c3c\":\"0x2b5e3af16b1880000\",\"0x615a6f36777f40d6617eb5819896186983fd3731\":\"0x14061b9d77a5e980000\",\"0x615f82365c5101f071e7d2cb6af14f7aad2c16c6\":\"0x1158e460913d00000\",\"0x6170dd0687bd55ca88b87adef51cfdc55c4dd458\":\"0x6cb32f5c34fe440000\",\"0x61733947fab820dbd351efd67855ea0e881373a0\":\"0x1158e460913d00000\",\"0x6179979907fe7f037e4c38029d60bcbab832b3d6\":\"0x57473d05dabae80000\",\"0x617f20894fa70e94a86a49cd74e03238f64d3cd9\":\"0x10f0dbae61009528000\",\"0x617ff2cc803e31c9082233b825d025be3f7b1056\":\"0x6acb3df27e1f880000\",\"0x6191ddc9b64a8e0890b4323709d7a07c48b92a64\":\"0x2a034919dfbfbc0000\",\"0x6196c3d3c0908d254366b7bca55745222d9d4db1\":\"0xd8d726b7177a800000\",\"0x619f171445d42b02e2e07004ad8afe694fa53d6a\":\"0x1158e460913d00000\",\"0x61adf5929a5e2981684ea243baa01f7d1f5e148a\":\"0x5fabf6c984f230000\",\"0x61b1b8c012cd4c78f698e470f90256e6a30f48dd\":\"0xad78ebc5ac6200000\",\"0x61b3df2e9e9fd968131f1e88f0a0eb5bd765464d\":\"0xd8d726b7177a800000\",\"0x61b902c5a673885826820d1fe14549e4865fbdc2\":\"0x1224efed2ae1918000\",\"0x61b905de663fc17386523b3a28e2f7d037a655cd\":\"0x1b1ae4d6e2ef500000\",\"0x61ba87c77e9b596de7ba0e326fddfeec2163ef66\":\"0xad78ebc5ac6200000\",\"0x61bf84d5ab026f58c873f86ff0dfca82b55733ae\":\"0x6c6b935b8bbd400000\",\"0x61c4ee7c864c4d6b5e37ea1331c203739e826b2f\":\"0x1a1353b382a918000\",\"0x61c830f1654718f075ccaba316faacb85b7d120b\":\"0x15af1d78b58c400000\",\"0x61c8f1fa43bf846999ecf47b2b324dfb6b63fe3a\":\"0x2b5e3af16b18800000\",\"0x61c9dce8b2981cb40e98b0402bc3eb28348f03ac\":\"0xaacacd9b9e22b0000\",\"0x61cea71fa464d62a07063f920b0cc917539733d8\":\"0x5a87e7d7f5f6580000\",\"0x61d101a033ee0e2ebb3100ede766df1ad0244954\":\"0x1b1ae4d6e2ef500000\",\"0x61ed5596c697207f3d55b2a51aa7d50f07fa09e8\":\"0x6c6b935b8bbd400000\",\"0x61ff8e67b34d9ee6f78eb36ffea1b9f7c15787af\":\"0x58e7926ee858a00000\",\"0x6205c2d5647470848a3840f3887e9b015d34755c\":\"0x6194049f30f7200000\",\"0x6228ade95e8bb17d1ae23bfb0518414d497e0eb8\":\"0x15af1d78b58c400000\",\"0x6229dcc203b1edccfdf06e87910c452a1f4d7a72\":\"0x6e1d41a8f9ec3500000\",\"0x622be4b45495fcd93143efc412d699d6cdc23dc5\":\"0xf015f25736420000\",\"0x62331df2a3cbee3520e911dea9f73e905f892505\":\"0x6c6b935b8bbd400000\",\"0x625644c95a873ef8c06cdb9e9f6d8d7680043d62\":\"0x6194049f30f7200000\",\"0x6265b2e7730f36b776b52d0c9d02ada55d8e3cb6\":\"0x3635c9adc5dea00000\",\"0x62680a15f8ccb8bdc02f7360c25ad8cfb57b8ccd\":\"0x3635c9adc5dea00000\",\"0x6294eae6e420a3d5600a39c4141f838ff8e7cc48\":\"0xa030dcebbd2f4c0000\",\"0x62971bf2634cee0be3c9890f51a56099dbb9519b\":\"0x238fd42c5cf0400000\",\"0x629be7ab126a5398edd6da9f18447e78c692a4fd\":\"0x6c6b935b8bbd400000\",\"0x62b4a9226e61683c72c183254690daf511b4117a\":\"0xe18398e7601900000\",\"0x62b9081e7710345e38e02e16449ace1b85bcfc4e\":\"0x3154c9729d05780000\",\"0x62c37c52b97f4b040b1aa391d6dec152893c4707\":\"0x3635c9adc5dea00000\",\"0x62c9b271ffd5b770a5eee4edc9787b5cdc709714\":\"0x6c6b935b8bbd400000\",\"0x62d5cc7117e18500ac2f9e3c26c86b0a94b0de15\":\"0x5b12aefafa8040000\",\"0x62dc72729024375fc37cbb9c7c2393d10233330f\":\"0x6c6b935b8bbd400000\",\"0x62e6b2f5eb94fa7a43831fc87e254a3fe3bf8f89\":\"0xd8d726b7177a80000\",\"0x62f2e5ccecd52cc4b95e0597df27cc079715608c\":\"0x7c0860e5a80dc0000\",\"0x62fb8bd1f0e66b90533e071e6cbe6111fef0bc63\":\"0x3ba1910bf341b000000\",\"0x630a913a9031c9492abd4c41dbb15054cfec4416\":\"0x13458db67af35e00000\",\"0x630c5273126d517ce67101811cab16b8534cf9a8\":\"0x1feccc62573bbd38000\",\"0x631030a5b27b07288a45696f189e1114f12a81c0\":\"0x1b1a7a420ba00d0000\",\"0x6310b020fd98044957995092090f17f04e52cdfd\":\"0x55a6e79ccd1d300000\",\"0x632b9149d70178a7333634275e82d5953f27967b\":\"0x25f273933db5700000\",\"0x632cecb10cfcf38ec986b43b8770adece9200221\":\"0x1158e460913d00000\",\"0x6331028cbb5a21485bc51b565142993bdb2582a9\":\"0x1cfdd7468216e80000\",\"0x63334fcf1745840e4b094a3bb40bb76f9604c04c\":\"0xd7a5d703a717e80000\",\"0x63340a57716bfa63eb6cd133721202575bf796f0\":\"0xb61e0a20c12718000\",\"0x634efc24371107b4cbf03f79a93dfd93e431d5fd\":\"0x423582e08edc5c8000\",\"0x635c00fdf035bca15fa3610df3384e0fb79068b1\":\"0x1e7e4171bf4d3a00000\",\"0x63612e7862c27b587cfb6daf9912cb051f030a9f\":\"0x25b19d4bfe8ed0000\",\"0x63666755bd41b5986997783c13043008242b3cb5\":\"0x1b1ae4d6e2ef500000\",\"0x637be71b3aa815ff453d5642f73074450b64c82a\":\"0x6c6b935b8bbd400000\",\"0x637d67d87f586f0a5a479e20ee13ea310a10b647\":\"0xa3a5926afa1e7300000\",\"0x637f5869d6e4695f0eb9e27311c4878aff333380\":\"0x6ac04e68aaec860000\",\"0x63977cad7d0dcdc52b9ac9f2ffa136e8642882b8\":\"0x410d586a20a4c0000\",\"0x63a61dc30a8e3b30a763c4213c801cbf98738178\":\"0x3635c9adc5dea00000\",\"0x63ac545c991243fa18aec41d4f6f598e555015dc\":\"0x2086ac351052600000\",\"0x63b9754d75d12d384039ec69063c0be210d5e0e3\":\"0x920b860cc8ecfd8000\",\"0x63bb664f9117037628594da7e3c5089fd618b5b5\":\"0x1158e460913d00000\",\"0x63c2a3d235e5eeabd0d4a6afdb89d94627396495\":\"0x434ef05b9d84820000\",\"0x63c8dfde0b8e01dadc2e748c824cc0369df090b3\":\"0xd255d112e103a00000\",\"0x63d55ad99b9137fd1b20cc2b4f03d42cbaddf334\":\"0x15af1d78b58c400000\",\"0x63d80048877596e0c28489e650cd4ac180096a49\":\"0xf2dc7d47f15600000\",\"0x63e414603e80d4e5a0f5c18774204642258208e4\":\"0x10f0cf064dd59200000\",\"0x63e88e2e539ffb450386b4e46789b223f5476c45\":\"0x155170a778e25d00000\",\"0x63ef2fbc3daf5edaf4a295629ccf31bcdf4038e5\":\"0x4f2591f896a6500000\",\"0x63f0e5a752f79f67124eed633ad3fd2705a397d4\":\"0xd5967be4fc3f100000\",\"0x63f5b53d79bf2e411489526530223845fac6f601\":\"0x65a4da25d3016c00000\",\"0x63fc93001305adfbc9b85d29d9291a05f8f1410b\":\"0x3635c9adc5dea00000\",\"0x63fe6bcc4b8a9850abbe75803730c932251f145b\":\"0xfc936392801c0000\",\"0x6403d062549690c8e8b63eae41d6c109476e2588\":\"0x6c6b935b8bbd400000\",\"0x64042ba68b12d4c151651ca2813b7352bd56f08e\":\"0x2086ac351052600000\",\"0x6405dd13e93abcff377e700e3c1a0086eca27d29\":\"0xfc936392801c0000\",\"0x640aba6de984d94517377803705eaea7095f4a11\":\"0x21e19e0c9bab2400000\",\"0x640bf87415e0cf407301e5599a68366da09bbac8\":\"0x1abc9f416098158000\",\"0x6420f8bcc8164a6152a99d6b99693005ccf7e053\":\"0x36356633ebd8ea0000\",\"0x64241a7844290e0ab855f1d4aa75b55345032224\":\"0x56bc75e2d631000000\",\"0x64264aedd52dcae918a012fbcd0c030ee6f71821\":\"0x3635c9adc5dea00000\",\"0x64370e87202645125a35b207af1231fb6072f9a7\":\"0xad78ebc5ac6200000\",\"0x643d9aeed4b180947ed2b9207cce4c3ddc55e1f7\":\"0xad78ebc5ac6200000\",\"0x6443b8ae639de91cf73c5ae763eeeed3ddbb9253\":\"0x6c6b935b8bbd400000\",\"0x64457fa33b0832506c4f7d1180dce48f46f3e0ff\":\"0x6c6b935b8bbd400000\",\"0x64464a6805b462412a901d2db8174b06c22deea6\":\"0x19c846a029c7c80000\",\"0x644ba6c61082e989109f5c11d4b40e991660d403\":\"0xd8d726b7177a800000\",\"0x64628c6fb8ec743adbd87ce5e018d531d9210437\":\"0x1731790534df20000\",\"0x6463f715d594a1a4ace4bb9c3b288a74decf294d\":\"0x6acb3df27e1f880000\",\"0x646628a53c2c4193da88359ce718dadd92b7a48d\":\"0xad8006c2f5ef00000\",\"0x64672da3ab052821a0243d1ce4b6e0a36517b8eb\":\"0xad78ebc5ac6200000\",\"0x646afba71d849e80c0ed59cac519b278e7f7abe4\":\"0x3635c9adc5dea00000\",\"0x646e043d0597a664948fbb0dc15475a3a4f3a6ed\":\"0x1158e460913d00000\",\"0x6470a4f92ec6b0fccd01234fa59023e9ff1f3aac\":\"0xa2a15d09519be00000\",\"0x647b85044df2cf0b4ed4882e88819fe22ae5f793\":\"0x36363b5d9a77700000\",\"0x6485470e61db110aebdbafd536769e3c599cc908\":\"0x2086ac351052600000\",\"0x648f5bd2a2ae8902db37847d1cb0db9390b06248\":\"0x1a535ecf0760a048000\",\"0x649a2b9879cd8fb736e6703b0c7747849796f10f\":\"0x18ee22da01ad34f0000\",\"0x649a85b93653075fa6562c409a565d087ba3e1ba\":\"0x6c6b935b8bbd400000\",\"0x64adcceec53dd9d9dd15c8cc1a9e736de4241d2c\":\"0x30927f74c9de00000\",\"0x64cf0935bf19d2cebbecd8780d27d2e2b2c34166\":\"0x6acb3df27e1f880000\",\"0x64d80c3b8ba68282290b75e65d8978a15a87782c\":\"0x6acb3df27e1f880000\",\"0x64dba2d6615b8bd7571836dc75bc79d314f5ecee\":\"0x21e19e0c9bab2400000\",\"0x64e0217a5b38aa40583625967fa9883690388b6f\":\"0xad78ebc5ac6200000\",\"0x64e02abb016cc23a2934f6bcddb681905021d563\":\"0x3635c9adc5dea00000\",\"0x64e03ef070a54703b7184e48276c5c0077ef4b34\":\"0x1158e460913d000000\",\"0x64e2de21200b1899c3a0c0653b5040136d0dc842\":\"0x43c33c1937564800000\",\"0x64ec8a5b743f3479e707dae9ee20ddaa4f40f1d9\":\"0xad78ebc5ac6200000\",\"0x6503860b191008c15583bfc88158099301762828\":\"0x3635c9adc5dea00000\",\"0x65053191319e067a25e6361d47f37f6318f83419\":\"0x155bd9307f9fe80000\",\"0x65093b239bbfba23c7775ca7da5a8648a9f54cf7\":\"0x15af1d78b58c400000\",\"0x6509eeb1347e842ffb413e37155e2cbc738273fd\":\"0x6c6b935b8bbd400000\",\"0x650b425555e4e4c51718146836a2c1ee77a5b421\":\"0x43c33c1937564800000\",\"0x650cf67db060cce17568d5f2a423687c49647609\":\"0x56bc75e2d63100000\",\"0x6510df42a599bcb0a519cca961b488759a6f6777\":\"0x6c6b935b8bbd400000\",\"0x653675b842d7d8b461f722b4117cb81dac8e639d\":\"0x1ae361fc1451c0000\",\"0x654b7e808799a83d7287c67706f2abf49a496404\":\"0x6acb3df27e1f880000\",\"0x654f524847b3a6acc0d3d5f1f362b603edf65f96\":\"0x1b1ae4d6e2ef5000000\",\"0x655934da8e744eaa3de34dbbc0894c4eda0b61f2\":\"0xad78ebc5ac6200000\",\"0x655d5cd7489629e2413c2105b5a172d933c27af8\":\"0xdb03186cd840a60000\",\"0x656018584130db83ab0591a8128d9381666a8d0e\":\"0x3779f912019fc0000\",\"0x6560941328ff587cbc56c38c78238a7bb5f442f6\":\"0x2861906b59c47a0000\",\"0x656579daedd29370d9b737ee3f5cd9d84bc2b342\":\"0x4d853c8f8908980000\",\"0x657473774f63ac3d6279fd0743d5790c4f161503\":\"0xad78ebc5ac6200000\",\"0x6580b1bc94390f04b397bd73e95d96ef11eaf3a8\":\"0x1158e460913d00000\",\"0x65849be1af20100eb8a3ba5a5be4d3ae8db5a70e\":\"0x15af1d78b58c400000\",\"0x659c0a72c767a3a65ced0e1ca885a4c51fd9b779\":\"0x6c6b935b8bbd400000\",\"0x65a52141f56bef98991724c6e7053381da8b5925\":\"0x3429c335d57fe0000\",\"0x65a9dad42e1632ba3e4e49623fab62a17e4d3611\":\"0x50c4cb2a10c600000\",\"0x65af8d8b5b1d1eedfa77bcbc96c1b133f83306df\":\"0x55005f0c614480000\",\"0x65af9087e05167715497c9a5a749189489004def\":\"0x2d43f3ebfafb2c0000\",\"0x65b42faecc1edfb14283ca979af545f63b30e60c\":\"0xfc936392801c0000\",\"0x65d33eb39cda6453b19e61c1fe4db93170ef9d34\":\"0xb98bc829a6f90000\",\"0x65d8dd4e251cbc021f05b010f2d5dc520c3872e0\":\"0x2d43579a36a90e0000\",\"0x65ea26eabbe2f64ccccfe06829c25d4637520225\":\"0x25f273933db5700000\",\"0x65ea67ad3fb56ad5fb94387dd38eb383001d7c68\":\"0x56bc75e2d63100000\",\"0x65ebaed27edb9dcc1957aee5f452ac2105a65c0e\":\"0x937dfadae25e29b8000\",\"0x65ee20b06d9ad589a7e7ce04b9f5f795f402aece\":\"0x6c6b935b8bbd400000\",\"0x65f534346d2ffb787fa9cf185d745ba42986bd6e\":\"0x1b1ae4d6e2ef500000\",\"0x65f5870f26bce089677dfc23b5001ee492483428\":\"0x112b1f155aa32a30000\",\"0x65fd02d704a12a4dace9471b0645f962a89671c8\":\"0x18d1ce6e427cd8000\",\"0x65ff874fafce4da318d6c93d57e2c38a0d73e820\":\"0x3638021cecdab00000\",\"0x660557bb43f4be3a1b8b85e7df7b3c5bcd548057\":\"0x14542ba12a337c00000\",\"0x66082c75a8de31a53913bbd44de3a0374f7faa41\":\"0x4f2591f896a6500000\",\"0x6611ce59a98b072ae959dc49ad511daaaaa19d6b\":\"0xad78ebc5ac6200000\",\"0x66201bd227ae6dc6bdfed5fbde811fecfe5e9dd9\":\"0x203e9e8492788c0000\",\"0x662334814724935b7931ddca6100e00d467727cd\":\"0x2288269d0783d40000\",\"0x66274fea82cd30b6c29b23350e4f4f3d310a5899\":\"0x70370550ab82980000\",\"0x662cfa038fab37a01745a364e1b98127c503746d\":\"0xd5967be4fc3f100000\",\"0x6635b46f711d2da6f0e16370cd8ee43efb2c2d52\":\"0x6c6b935b8bbd400000\",\"0x663604b0503046e624cd26a8b6fb4742dce02a6f\":\"0x38b9b797ef68c0000\",\"0x6636d7ac637a48f61d38b14cfd4865d36d142805\":\"0x1b1ae4d6e2ef500000\",\"0x6640ccf053555c130ae2b656647ea6e31637b9ab\":\"0x6acb3df27e1f880000\",\"0x66424bd8785b8cb461102a900283c35dfa07ef6a\":\"0x22e2db26666fc8000\",\"0x664cd67dccc9ac8228b45c55db8d76550b659cdc\":\"0x155bd9307f9fe80000\",\"0x664e43119870af107a448db1278b044838ffcdaf\":\"0x15af1d78b58c400000\",\"0x6651736fb59b91fee9c93aa0bd6ea2f7b2506180\":\"0x1b1ae4d6e2ef500000\",\"0x665b000f0b772750cc3c217a5ef429a92bf1ccbb\":\"0xd8d726b7177a800000\",\"0x66662006015c1f8e3ccfcaebc8ee6807ee196303\":\"0x1b1b3a1ac261ec0000\",\"0x666746fb93d1935c5a3c684e725010c4fad0b1d8\":\"0x1158e460913d00000\",\"0x666b4f37d55d63b7d056b615bb74c96b3b01991a\":\"0xd8d726b7177a800000\",\"0x66719c0682b2ac7f9e27abebec7edf8decf0ae0d\":\"0x1158e460913d00000\",\"0x6671b182c9f741a0cd3c356c73c23126d4f9e6f4\":\"0xad78ebc5ac6200000\",\"0x6679aeecd87a57a73f3356811d2cf49d0c4d96dc\":\"0x2086ac351052600000\",\"0x667b61c03bb937a9f5d0fc5a09f1ea3363c77035\":\"0xe664992288f2280000\",\"0x6685fd2e2544702c360b8bb9ee78f130dad16da5\":\"0x6c6b935b8bbd400000\",\"0x668b6ba8ab08eace39c502ef672bd5ccb6a67a20\":\"0x697d95d4201333c0000\",\"0x66925de3e43f4b41bf9dadde27d5488ef569ea0d\":\"0x222c8eb3ff6640000\",\"0x66b0c100c49149935d14c0dc202cce907cea1a3d\":\"0x6acb3df27e1f880000\",\"0x66b1a63da4dcd9f81fe54f5e3fcb4055ef7ec54f\":\"0xaeb272adf9cfa0000\",\"0x66b39837cb3cac8a802afe3f12a258bbca62dacd\":\"0x15af1d78b58c400000\",\"0x66c8331efe7198e98b2d32b938688e3241d0e24f\":\"0x2098051970e39d00000\",\"0x66cc8ab23c00d1b82acd7d73f38c99e0d05a4fa6\":\"0x56bc75e2d63100000\",\"0x66dcc5fb4ee7fee046e141819aa968799d644491\":\"0x487a9a304539440000\",\"0x66e09427c1e63deed7e12b8c55a6a19320ef4b6a\":\"0x93739534d28680000\",\"0x66ec16ee9caab411c55a6629e318de6ee216491d\":\"0x2ee449550898e40000\",\"0x66f50406eb1b11a946cab45927cca37470e5a208\":\"0x6c6b935b8bbd400000\",\"0x66fdc9fee351fa1538eb0d87d819fcf09e7c106a\":\"0x14627b5d93781b20000\",\"0x67048f3a12a4dd1f626c64264cb1d7971de2ca38\":\"0x9c2007651b2500000\",\"0x6704f169e0d0b36b57bbc39f3c45437b5ee3d28d\":\"0x155bd9307f9fe80000\",\"0x671015b97670b10d5e583f3d62a61c1c79c5143f\":\"0x15af1d78b58c400000\",\"0x6710c2c03c65992b2e774be52d3ab4a6ba217ef7\":\"0x274d656ac90e3400000\",\"0x671110d96aaff11523cc546bf9940eedffb2faf7\":\"0xd8d726b7177a800000\",\"0x6715c14035fb57bb3d667f7b707498c41074b855\":\"0x25f273933db5700000\",\"0x671bbca099ff899bab07ea1cf86965c3054c8960\":\"0x2b5e3af16b1880000\",\"0x6727daf5b9d68efcab489fedec96d7f7325dd423\":\"0x6c6b935b8bbd400000\",\"0x672cbca8440a8577097b19aff593a2ad9d28a756\":\"0x4563918244f400000\",\"0x672ec42faa8cd69aaa71b32cc7b404881d52ff91\":\"0x21e19e0c9bab2400000\",\"0x672fa0a019088db3166f6119438d07a99f8ba224\":\"0x2d4ca05e2b43ca80000\",\"0x673144f0ec142e770f4834fee0ee311832f3087b\":\"0x1b1b6bd7af64c70000\",\"0x67350b5331926f5e28f3c1e986f96443809c8b8c\":\"0x1314fb370629800000\",\"0x673706b1b0e4dc7a949a7a796258a5b83bb5aa83\":\"0x368c8623a8b4d100000\",\"0x6742a2cfce8d79a2c4a51b77747498912245cd6a\":\"0xdfd5b80b7e4680000\",\"0x674adb21df4c98c7a347ac4c3c24266757dd7039\":\"0x6c6b935b8bbd400000\",\"0x67518e5d02b205180f0463a32004471f753c523e\":\"0x6b918aac494b168000\",\"0x675d5caa609bf70a18aca580465d8fb7310d1bbb\":\"0x43c33c1937564800000\",\"0x67632046dcb25a54936928a96f423f3320cbed92\":\"0x6c6b935b8bbd400000\",\"0x6765df25280e8e4f38d4b1cf446fc5d7eb659e34\":\"0x56bc75e2d63100000\",\"0x6776e133d9dc354c12a951087b639650f539a433\":\"0x68155a43676e00000\",\"0x6785513cf732e47e87670770b5419be10cd1fc74\":\"0x6c6b935b8bbd400000\",\"0x679437eacf437878dc293d48a39c87b7421a216c\":\"0x37f81821db2680000\",\"0x679b9a109930517e8999099ccf2a914c4c8dd934\":\"0x340aad21b3b700000\",\"0x67a80e0190721f94390d6802729dd12c31a895ad\":\"0x6c6b1375bc91560000\",\"0x67b8a6e90fdf0a1cac441793301e8750a9fa7957\":\"0x30849ebe16369c0000\",\"0x67bc85e87dc34c4e80aafa066ba8d29dbb8e438e\":\"0x15d1cf4176aeba0000\",\"0x67c926093e9b8927933810d98222d62e2b8206bb\":\"0x678a932062e4180000\",\"0x67cfda6e70bf7657d39059b59790e5145afdbe61\":\"0x23050d095866580000\",\"0x67d682a282ef73fb8d6e9071e2614f47ab1d0f5e\":\"0x3635c9adc5dea00000\",\"0x67d6a8aa1bf8d6eaf7384e993dfdf10f0af68a61\":\"0xabcbb5718974b8000\",\"0x67da922effa472a6b124e84ea8f86b24e0f515aa\":\"0x1158e460913d00000\",\"0x67df242d240dd4b8071d72f8fcf35bb3809d71e8\":\"0xd8d726b7177a800000\",\"0x67ee406ea4a7ae6a3a381eb4edd2f09f174b4928\":\"0x3829635f0968b00000\",\"0x67f2bb78b8d3e11f7c458a10b5c8e0a1d374467d\":\"0x61093d7c2c6d380000\",\"0x67fc527dce1785f0fb8bc7e518b1c669f7ecdfb5\":\"0xd02ab486cedc00000\",\"0x68027d19558ed7339a08aee8de3559be063ec2ea\":\"0x6c6b935b8bbd400000\",\"0x680640838bd07a447b168d6d923b90cf6c43cdca\":\"0x5dc892aa1131c80000\",\"0x6807ddc88db489b033e6b2f9a81553571ab3c805\":\"0x19f8e7559924c0000\",\"0x680d5911ed8dd9eec45c060c223f89a7f620bbd5\":\"0x43c33c1937564800000\",\"0x6811b54cd19663b11b94da1de2448285cd9f68d9\":\"0x3ba1910bf341b00000\",\"0x68190ca885da4231874c1cfb42b1580a21737f38\":\"0xcf152640c5c8300000\",\"0x682897bc4f8e89029120fcffb787c01a93e64184\":\"0x21e19e0c9bab2400000\",\"0x68295e8ea5afd9093fc0a465d157922b5d2ae234\":\"0x1154e53217ddb0000\",\"0x682e96276f518d31d7e56e30dfb009c1218201bd\":\"0x1158e460913d00000\",\"0x6835c8e8b74a2ca2ae3f4a8d0f6b954a3e2a8392\":\"0x3429c335d57fe0000\",\"0x683633010a88686bea5a98ea53e87997cbf73e69\":\"0x56b394263a40c0000\",\"0x683dba36f7e94f40ea6aea0d79b8f521de55076e\":\"0x796e3ea3f8ab00000\",\"0x68419c6dd2d3ce6fcbb3c73e2fa079f06051bde6\":\"0x6acb3df27e1f880000\",\"0x68473b7a7d965904bedba556dfbc17136cd5d434\":\"0x56bc75e2d63100000\",\"0x6847825bdee8240e28042c83cad642f286a3bddc\":\"0x5150ae84a8cdf00000\",\"0x684a44c069339d08e19a75668bdba303be855332\":\"0xed2b525841adfc00000\",\"0x68531f4dda808f5320767a03113428ca0ce2f389\":\"0x10d3aa536e2940000\",\"0x687927e3048bb5162ae7c15cf76bd124f9497b9e\":\"0x6c6b935b8bbd400000\",\"0x68809af5d532a11c1a4d6e32aac75c4c52b08ead\":\"0x21e19e0c9bab2400000\",\"0x6886ada7bbb0617bda842191c68c922ea3a8ac82\":\"0x3ee23bde0e7d200000\",\"0x68883e152e5660fee59626e7e3b4f05110e6222f\":\"0xb94633be975a62a0000\",\"0x688a569e965524eb1d0ac3d3733eab909fb3d61e\":\"0x478eae0e571ba00000\",\"0x688eb3853bbcc50ecfee0fa87f0ab693cabdef02\":\"0x6b10a18400647c00000\",\"0x68a7425fe09eb28cf86eb1793e41b211e57bd68d\":\"0x243d4d18229ca20000\",\"0x68a86c402388fddc59028fec7021e98cbf830eac\":\"0x10910d4cdc9f60000\",\"0x68acdaa9fb17d3c309911a77b05f5391fa034ee9\":\"0x1e52e336cde22180000\",\"0x68addf019d6b9cab70acb13f0b3117999f062e12\":\"0x2b51212e6b7c88000\",\"0x68b31836a30a016ada157b638ac15da73f18cfde\":\"0x168d28e3f00280000\",\"0x68b6854788a7c6496cdbf5f84b9ec5ef392b78bb\":\"0x42bf06b78ed3b500000\",\"0x68c08490c89bf0d6b6f320b1aca95c8312c00608\":\"0xd8d726b7177a800000\",\"0x68c7d1711b011a33f16f1f55b5c902cce970bdd7\":\"0x83d6c7aab63600000\",\"0x68c8791dc342c373769ea61fb7b510f251d32088\":\"0x3635c9adc5dea00000\",\"0x68df947c495bebaeb8e889b3f953d533874bf106\":\"0x1d9945ab2b03480000\",\"0x68e8022740f4af29eb48db32bcecddfd148d3de3\":\"0x3635c9adc5dea00000\",\"0x68ec79d5be7155716c40941c79d78d17de9ef803\":\"0x1b233877b5208c0000\",\"0x68eec1e288ac31b6eaba7e1fbd4f04ad579a6b5d\":\"0x6c6b935b8bbd400000\",\"0x68f525921dc11c329b754fbf3e529fc723c834cd\":\"0x57473d05dabae80000\",\"0x68f719ae342bd7fef18a05cbb02f705ad38ed5b2\":\"0x38ebad5cdc90280000\",\"0x68f7573cd457e14c03fea43e302d30347c10705c\":\"0x10f0cf064dd59200000\",\"0x68f8f45155e98c5029a4ebc5b527a92e9fa83120\":\"0xf07b44b40793208000\",\"0x68fe1357218d095849cd579842c4aa02ff888d93\":\"0x6c6b935b8bbd400000\",\"0x690228e4bb12a8d4b5e0a797b0c5cf2a7509131e\":\"0x65ea3db75546600000\",\"0x690594d306613cd3e2fd24bca9994ad98a3d73f8\":\"0x6c6b935b8bbd400000\",\"0x69073269729e6414b26ec8dc0fd935c73b579f1e\":\"0x65a4da25d3016c00000\",\"0x6919dd5e5dfb1afa404703b9faea8cee35d00d70\":\"0x14061b9d77a5e980000\",\"0x693492a5c51396a482881669ccf6d8d779f00951\":\"0x12bf50503ae3038000\",\"0x693d83be09459ef8390b2e30d7f7c28de4b4284e\":\"0x6c6b935b8bbd400000\",\"0x69517083e303d4fbb6c2114514215d69bc46a299\":\"0x56bc75e2d63100000\",\"0x695550656cbf90b75d92ad9122d90d23ca68ca4d\":\"0x3635c9adc5dea00000\",\"0x6958f83bb2fdfb27ce0409cd03f9c5edbf4cbedd\":\"0x43c33c1937564800000\",\"0x695b0f5242753701b264a67071a2dc880836b8db\":\"0xe398811bec680000\",\"0x695b4cce085856d9e1f9ff3e79942023359e5fbc\":\"0x10f0cf064dd59200000\",\"0x6966063aa5de1db5c671f3dd699d5abe213ee902\":\"0x1b1ae4d6e2ef5000000\",\"0x6974c8a414ceaefd3c2e4dfdbef430568d9a960b\":\"0x121ea68c114e510000\",\"0x6978696d5150a9a263513f8f74c696f8b1397cab\":\"0x167f482d3c5b1c00000\",\"0x69797bfb12c9bed682b91fbc593591d5e4023728\":\"0x21e19e0c9bab2400000\",\"0x697f55536bf85ada51841f0287623a9f0ed09a17\":\"0x21e19e0c9bab2400000\",\"0x6982fe8a867e93eb4a0bd051589399f2ec9a5292\":\"0x6c6b935b8bbd400000\",\"0x698a8a6f01f9ab682f637c7969be885f6c5302bf\":\"0x10d3aa536e2940000\",\"0x698ab9a2f33381e07c0c47433d0d21d6f336b127\":\"0x1158e460913d00000\",\"0x6994fb3231d7e41d491a9d68d1fa4cae2cc15960\":\"0xd8d726b7177a800000\",\"0x699c9ee47195511f35f862ca4c22fd35ae8ffbf4\":\"0x4563918244f400000\",\"0x699fc6d68a4775573c1dcdaec830fefd50397c4e\":\"0x340aad21b3b700000\",\"0x69af28b0746cac0da17084b9398c5e36bb3a0df2\":\"0x3677036edf0af60000\",\"0x69b80ed90f84834afa3ff82eb964703b560977d6\":\"0x1731790534df20000\",\"0x69b81d5981141ec7a7141060dfcf8f3599ffc63e\":\"0x10f0cf064dd59200000\",\"0x69bcfc1d43b4ba19de7b274bdffb35139412d3d7\":\"0x35659ef93f0fc40000\",\"0x69bd25ade1a3346c59c4e930db2a9d715ef0a27a\":\"0xd8d726b7177a800000\",\"0x69c08d744754de709ce96e15ae0d1d395b3a2263\":\"0x3635c9adc5dea00000\",\"0x69c2d835f13ee90580408e6a3283c8cca6a434a2\":\"0x238fd42c5cf0400000\",\"0x69c94e07c4a9be3384d95dfa3cb9290051873b7b\":\"0x3cb71f51fc5580000\",\"0x69cb3e2153998d86e5ee20c1fcd1a6baeeb2863f\":\"0xd8d726b7177a800000\",\"0x69d39d510889e552a396135bfcdb06e37e387633\":\"0xd8d726b7177a800000\",\"0x69d98f38a3ba3dbc01fa5c2c1427d862832f2f70\":\"0x152d02c7e14af6800000\",\"0x69e2e2e704307ccc5b5ca3f164fece2ea7b2e512\":\"0x17b7883c06916600000\",\"0x69ff429074cb9b6c63bc914284bce5f0c8fbf7d0\":\"0x1b1ae4d6e2ef500000\",\"0x69ff8901b541763f817c5f2998f02dcfc1df2997\":\"0x22b1c8c1227a00000\",\"0x6a023af57d584d845e698736f130db9db40dfa9a\":\"0x55b201c8900980000\",\"0x6a04f5d53fc0f515be942b8f12a9cb7ab0f39778\":\"0xa9aab3459be1940000\",\"0x6a05b21c4f17f9d73f5fb2b0cb89ff5356a6cc7e\":\"0x5150ae84a8cdf00000\",\"0x6a0f056066c2d56628850273d7ecb7f8e6e9129e\":\"0x10f0d293cc7a5880000\",\"0x6a13d5e32c1fd26d7e91ff6e053160a89b2c8aad\":\"0x2e62f20a69be40000\",\"0x6a2e86469a5bf37cee82e88b4c3863895d28fcaf\":\"0x1c229266385bbc0000\",\"0x6a3694424c7cc6b8bcd9bccaba540cc1f5df18d7\":\"0x6c6b935b8bbd400000\",\"0x6a42ca971c6578d5ade295c3e7f4ad331dd3424e\":\"0x14542ba12a337c00000\",\"0x6a44af96b3f032ae641beb67f4b6c83342d37c5d\":\"0x19274b259f6540000\",\"0x6a4c8907b600248057b1e46354b19bdc859c991a\":\"0x1158e460913d00000\",\"0x6a514e6242f6b68c137e97fea1e78eb555a7e5f7\":\"0x1158e460913d00000\",\"0x6a53d41ae4a752b21abed5374649953a513de5e5\":\"0x6c6b935b8bbd400000\",\"0x6a6159074ab573e0ee581f0f3df2d6a594629b74\":\"0x10ce1d3d8cb3180000\",\"0x6a6337833f8f6a6bf10ca7ec21aa810ed444f4cb\":\"0x37bd24345ce8a40000\",\"0x6a6353b971589f18f2955cba28abe8acce6a5761\":\"0xa2a15d09519be00000\",\"0x6a63fc89abc7f36e282d80787b7b04afd6553e71\":\"0x8ac7230489e800000\",\"0x6a679e378fdce6bfd97fe62f043c6f6405d79e99\":\"0xd8d726b7177a800000\",\"0x6a686bf220b593deb9b7324615fb9144ded3f39d\":\"0x4f2591f896a6500000\",\"0x6a6b18a45a76467e2e5d5a2ef911c3e12929857b\":\"0x115d3a99a9614f400000\",\"0x6a74844d8e9cb5581c45079a2e94462a6cee8821\":\"0x3ab53a552dd4c90000\",\"0x6a7b2e0d88867ff15d207c222bebf94fa6ce8397\":\"0xcb49b44ba602d800000\",\"0x6a7c252042e7468a3ff773d6450bba85efa26391\":\"0x1b1ae4d6e2ef500000\",\"0x6a8a4317c45faa0554ccdb482548183e295a24b9\":\"0x3635c9adc5dea00000\",\"0x6a8cea2de84a8df997fd3f84e3083d93de57cda9\":\"0x56be03ca3e47d8000\",\"0x6a9758743b603eea3aa0524b42889723c4153948\":\"0x22385a827e815500000\",\"0x6aa5732f3b86fb8c81efbe6b5b47b563730b06c8\":\"0x3635c9adc5dea00000\",\"0x6ab323ae5056ed0a453072c5abe2e42fcf5d7139\":\"0x2fb474098f67c00000\",\"0x6ab5b4c41cddb829690c2fda7f20c85e629dd5d5\":\"0x64d4af714c32900000\",\"0x6ac40f532dfee5118117d2ad352da77d4f6da2c8\":\"0x15af1d78b58c400000\",\"0x6ac4d4be2db0d99da3faaaf7525af282051d6a90\":\"0x458ca58a962b28000\",\"0x6acddca3cd2b4990e25cd65c24149d0912099e79\":\"0xa2a1e07c9f6c908000\",\"0x6ad90be252d9cd464d998125fab693060ba8e429\":\"0xd8d726b7177a800000\",\"0x6add932193cd38494aa3f03aeccc4b7ab7fabca2\":\"0x4db73254763000000\",\"0x6ae57f27917c562a132a4d1bf7ec0ac785832926\":\"0x14542ba12a337c00000\",\"0x6aeb9f74742ea491813dbbf0d6fcde1a131d4db3\":\"0x17e554308aa0300000\",\"0x6af235d2bbe050e6291615b71ca5829658810142\":\"0xa2a15d09519be00000\",\"0x6af6c7ee99df271ba15bf384c0b764adcb4da182\":\"0x36356633ebd8ea0000\",\"0x6af8e55969682c715f48ad4fc0fbb67eb59795a3\":\"0x6c6b935b8bbd400000\",\"0x6af940f63ec9b8d876272aca96fef65cdacecdea\":\"0xa2a15d09519be00000\",\"0x6af9f0dfeeaebb5f64bf91ab771669bf05295553\":\"0x15af1d78b58c400000\",\"0x6aff1466c2623675e3cb0e75e423d37a25e442eb\":\"0x5dc892aa1131c80000\",\"0x6b0da25af267d7836c226bcae8d872d2ce52c941\":\"0x14542ba12a337c00000\",\"0x6b10f8f8b3e3b60de90aa12d155f9ff5ffb22c50\":\"0x6c6b935b8bbd400000\",\"0x6b17598a8ef54f797ae515ccb6517d1859bf8011\":\"0x56bc75e2d63100000\",\"0x6b20c080606a79c73bd8e75b11717a4e8db3f1c3\":\"0x103f735803f0140000\",\"0x6b2284440221ce16a8382de5ff0229472269deec\":\"0x3635c9adc5dea00000\",\"0x6b30f1823910b86d3acb5a6afc9defb6f3a30bf8\":\"0xe3aeb5737240a00000\",\"0x6b38de841fad7f53fe02da115bd86aaf662466bd\":\"0x5dc892aa1131c80000\",\"0x6b4b99cb3fa9f7b74ce3a48317b1cd13090a1a7a\":\"0x31b327e695de20000\",\"0x6b5ae7bf78ec75e90cb503c778ccd3b24b4f1aaf\":\"0x2b5e3af16b18800000\",\"0x6b63a2dfb2bcd0caec0022b88be30c1451ea56aa\":\"0x2bdb6bf91f7f4c8000\",\"0x6b6577f3909a4d6de0f411522d4570386400345c\":\"0x65ea3db75546600000\",\"0x6b72a8f061cfe6996ad447d3c72c28c0c08ab3a7\":\"0xe78c6ac79912620000\",\"0x6b760d4877e6a627c1c967bee451a8507ddddbab\":\"0x3154c9729d05780000\",\"0x6b83bae7b565244558555bcf4ba8da2011891c17\":\"0x6c6b935b8bbd400000\",\"0x6b925dd5d8ed6132ab6d0860b82c44e1a51f1fee\":\"0x503b203e9fba200000\",\"0x6b94615db750656ac38c7e1cf29a9d13677f4e15\":\"0x28a857425466f800000\",\"0x6b951a43274eeafc8a0903b0af2ec92bf1efc839\":\"0x56bc75e2d63100000\",\"0x6b992521ec852370848ad697cc2df64e63cc06ff\":\"0x3635c9adc5dea00000\",\"0x6ba8f7e25fc2d871618e24e40184199137f9f6aa\":\"0x15af64869a6bc20000\",\"0x6ba9b21b35106be159d1c1c2657ac56cd29ffd44\":\"0xf2dc7d47f156000000\",\"0x6baf7a2a02ae78801e8904ad7ac05108fc56cff6\":\"0x3635c9adc5dea00000\",\"0x6bb2aca23fa1626d18efd6777fb97db02d8e0ae4\":\"0x878678326eac9000000\",\"0x6bb4a661a33a71d424d49bb5df28622ed4dffcf4\":\"0x222c8eb3ff66400000\",\"0x6bb50813146a9add42ee22038c9f1f7469d47f47\":\"0xada55474b81340000\",\"0x6bbc3f358a668dd1a11f0380f3f73108426abd4a\":\"0xd8d726b7177a800000\",\"0x6bbd1e719390e6b91043f8b6b9df898ea8001b34\":\"0x6c6c4fa6c3da588000\",\"0x6bc85acd5928722ef5095331ee88f484b8cf8357\":\"0x9c2007651b2500000\",\"0x6bd3e59f239fafe4776bb9bddd6bee83ba5d9d9f\":\"0x3635c9adc5dea00000\",\"0x6bd457ade051795df3f2465c3839aed3c5dee978\":\"0x3634bf39ab98788000\",\"0x6be16313643ebc91ff9bb1a2e116b854ea933a45\":\"0x1b1ae4d6e2ef500000\",\"0x6be7595ea0f068489a2701ec4649158ddc43e178\":\"0x6c6b935b8bbd400000\",\"0x6be9030ee6e2fbc491aca3de4022d301772b7b7d\":\"0x1731790534df20000\",\"0x6bec311ad05008b4af353c958c40bd06739a3ff3\":\"0x377f62a0f0a62700000\",\"0x6bf7b3c065f2c1e7c6eb092ba0d15066f393d1b8\":\"0x15af1d78b58c400000\",\"0x6bf86f1e2f2b8032a95c4d7738a109d3d0ed8104\":\"0x62a992e53a0af00000\",\"0x6c05e34e5ef2f42ed09deff1026cd66bcb6960bb\":\"0x6c6b935b8bbd400000\",\"0x6c08a6dc0173c7342955d1d3f2c065d62f83aec7\":\"0x1158e460913d00000\",\"0x6c0ae9f043c834d44271f13406593dfe094f389f\":\"0x52442ae133b62a8000\",\"0x6c0cc917cbee7d7c099763f14e64df7d34e2bf09\":\"0xd8d726b7177a80000\",\"0x6c0e712f405c59725fe829e9774bf4df7f4dd965\":\"0xc2868889ca68a440000\",\"0x6c101205b323d77544d6dc52af37aca3cec6f7f1\":\"0x21e19e0c9bab2400000\",\"0x6c15ec3520bf8ebbc820bd0ff19778375494cf9d\":\"0x6cb7e74867d5e60000\",\"0x6c1ddd33c81966dc8621776071a4129482f2c65f\":\"0x878678326eac9000000\",\"0x6c25327f8dcbb2f45e561e86e35d8850e53ab059\":\"0x3bcdf9bafef2f00000\",\"0x6c2e9be6d4ab450fd12531f33f028c614674f197\":\"0xc2127af858da700000\",\"0x6c359e58a13d4578a9338e335c67e7639f5fb4d7\":\"0xbd15b94fc8b280000\",\"0x6c3d18704126aa99ee3342ce60f5d4c85f1867cd\":\"0x2b5e3af16b1880000\",\"0x6c474bc66a54780066aa4f512eefa773abf919c7\":\"0x5188315f776b80000\",\"0x6c4e426e8dc005dfa3516cb8a680b02eea95ae8e\":\"0x487a9a304539440000\",\"0x6c52cf0895bb35e656161e4dc46ae0e96dd3e62c\":\"0xd8d8583fa2d52f0000\",\"0x6c5422fb4b14e6d98b6091fdec71f1f08640419d\":\"0x15af1d78b58c400000\",\"0x6c5c3a54cda7c2f118edba434ed81e6ebb11dd7a\":\"0xad78ebc5ac6200000\",\"0x6c63f84556d290bfcd99e434ee9997bfd779577a\":\"0x6c6b935b8bbd400000\",\"0x6c63fc85029a2654d79b2bea4de349e4524577c5\":\"0x23c757072b8dd00000\",\"0x6c6564e5c9c24eaaa744c9c7c968c9e2c9f1fbae\":\"0x499b42a21139640000\",\"0x6c67d6db1d03516c128b8ff234bf3d49b26d2941\":\"0x152d02c7e14af6800000\",\"0x6c67e0d7b62e2a08506945a5dfe38263339f1f22\":\"0x6acb3df27e1f880000\",\"0x6c6aa0d30b64721990b9504a863fa0bfb5e57da7\":\"0x925e06eec972b00000\",\"0x6c714a58fff6e97d14b8a5e305eb244065688bbd\":\"0xd8d726b7177a800000\",\"0x6c800d4b49ba07250460f993b8cbe00b266a2553\":\"0x1ab2cf7c9f87e20000\",\"0x6c808cabb8ff5fbb6312d9c8e84af8cf12ef0875\":\"0xd8d8583fa2d52f0000\",\"0x6c822029218ac8e98a260c1e064029348839875b\":\"0x10f97b787e1e3080000\",\"0x6c84cba77c6db4f7f90ef13d5ee21e8cfc7f8314\":\"0x6c6b935b8bbd400000\",\"0x6c8687e3417710bb8a93559021a1469e6a86bc77\":\"0x25b2da278d96b7b8000\",\"0x6c882c27732cef5c7c13a686f0a2ea77555ac289\":\"0x152d02c7e14af6800000\",\"0x6ca5de00817de0cedce5fd000128dede12648b3c\":\"0x1158e460913d00000\",\"0x6ca6a132ce1cd288bee30ec7cfeffb85c1f50a54\":\"0x6c6b935b8bbd400000\",\"0x6cb11ecb32d3ce829601310636f5a10cf7cf9b5f\":\"0x43fe8949c3801f50000\",\"0x6cc1c878fa6cde8a9a0b8311247e741e4642fe6d\":\"0x35659ef93f0fc40000\",\"0x6ccb03acf7f53ce87aadcc21a9932de915f89804\":\"0x1b1ae4d6e2ef5000000\",\"0x6cd212aee04e013f3d2abad2a023606bfb5c6ac7\":\"0x6c6acc67d7b1d40000\",\"0x6cd228dc712169307fe27ceb7477b48cfc8272e5\":\"0x434ea94db8a500000\",\"0x6ce1b0f6adc47051e8ab38b39edb4186b03babcc\":\"0x41799794cd24cc0000\",\"0x6ceae3733d8fa43d6cd80c1a96e8eb93109c83b7\":\"0x102794ad20da680000\",\"0x6d0569e5558fc7df2766f2ba15dc8aeffc5beb75\":\"0xd8e6001e6c302b0000\",\"0x6d120f0caae44fd94bcafe55e2e279ef96ba5c7a\":\"0xd8d726b7177a800000\",\"0x6d1456fff0104ee844a3314737843338d24cd66c\":\"0x7b06ce87fdd680000\",\"0x6d20ef9704670a500bb269b5832e859802049f01\":\"0x70c1cc73b00c80000\",\"0x6d2f976734b9d0070d1883cf7acab8b3e4920fc1\":\"0x21e19e0c9bab2400000\",\"0x6d39a9e98f81f769d73aad2cead276ac1387babe\":\"0x155bd9307f9fe80000\",\"0x6d3b7836a2b9d899721a4d237b522385dce8dfcd\":\"0x3636c25e66ece70000\",\"0x6d3f2ba856ccbb0237fa7661156b14b013f21240\":\"0x3635c9adc5dea00000\",\"0x6d4008b4a888a826f248ee6a0b0dfde9f93210b9\":\"0x127fcb8afae20d00000\",\"0x6d40ca27826d97731b3e86effcd7b92a4161fe89\":\"0x6c6b935b8bbd400000\",\"0x6d44974a31d187eda16ddd47b9c7ec5002d61fbe\":\"0x32f51edbaaa3300000\",\"0x6d4b5c05d06a20957e1748ab6df206f343f92f01\":\"0x21f360699bf825f8000\",\"0x6d4cbf3d8284833ae99344303e08b4d614bfda3b\":\"0x28a857425466f800000\",\"0x6d59b21cd0e2748804d9abe064eac2bef0c95f27\":\"0x6c6b935b8bbd400000\",\"0x6d63d38ee8b90e0e6ed8f192eda051b2d6a58bfd\":\"0x1a055690d9db80000\",\"0x6d6634b5b8a40195d949027af4828802092ceeb6\":\"0xa2a15d09519be00000\",\"0x6d7d1c949511f88303808c60c5ea0640fcc02683\":\"0x21e19e0c9bab2400000\",\"0x6d846dc12657e91af25008519c3e857f51707dd6\":\"0xf8d30bc92342f80000\",\"0x6d9193996b194617211106d1635eb26cc4b66c6c\":\"0x15aa1e7e9dd51c0000\",\"0x6d9997509882027ea947231424bedede2965d0ba\":\"0x6c81c7b31195e00000\",\"0x6da0ed8f1d69339f059f2a0e02471cb44fb8c3bb\":\"0x32bc38bb63a8160000\",\"0x6db72bfd43fef465ca5632b45aab7261404e13bf\":\"0x6c6b935b8bbd400000\",\"0x6dbe8abfa1742806263981371bf3d35590806b6e\":\"0x43c33c1937564800000\",\"0x6dc3f92baa1d21dab7382b893261a0356fa7c187\":\"0x5dc892aa1131c80000\",\"0x6dc7053a718616cfc78bee6382ee51add0c70330\":\"0x6c6b935b8bbd400000\",\"0x6dcc7e64fcafcbc2dc6c0e5e662cb347bffcd702\":\"0x43c33c1937564800000\",\"0x6dda5f788a6c688ddf921fa3852eb6d6c6c62966\":\"0x22b1c8c1227a00000\",\"0x6ddb6092779d5842ead378e21e8120fd4c6bc132\":\"0x6c6b935b8bbd400000\",\"0x6ddfef639155daab0a5cb4953aa8c5afaa880453\":\"0x62a992e53a0af00000\",\"0x6de02f2dd67efdb7393402fa9eaacbcf589d2e56\":\"0x40138b917edfb80000\",\"0x6de4b581385cf7fc9fe8c77d131fe2ee7724c76a\":\"0x7d2997733dcce40000\",\"0x6de4d15219182faf3aa2c5d4d2595ff23091a727\":\"0x55a6e79ccd1d300000\",\"0x6dedf62e743f4d2c2a4b87a787f5424a7aeb393c\":\"0x9c2007651b2500000\",\"0x6df24f6685a62f791ba337bf3ff67e91f3d4bc3a\":\"0x756b49d40a48180000\",\"0x6df5c84f7b909aab3e61fe0ecb1b3bf260222ad2\":\"0xd8d726b7177a800000\",\"0x6dff90e6dc359d2590882b1483edbcf887c0e423\":\"0x3635c9adc5dea00000\",\"0x6e01e4ad569c95d007ada30d5e2db12888492294\":\"0xd8d726b7177a800000\",\"0x6e073b66d1b8c66744d88096a8dd99ec7e0228da\":\"0xd8d726b7177a800000\",\"0x6e0ee70612c976287d499ddfa6c0dcc12c06deea\":\"0x70bd5b95621460000\",\"0x6e12b51e225b4a4372e59ad7a2a1a13ea3d3a137\":\"0x30046c8cc775f040000\",\"0x6e1a046caf5b4a57f4fd4bc173622126b4e2fd86\":\"0x61093d7c2c6d380000\",\"0x6e1ea4b183e252c9bb7767a006d4b43696cb8ae9\":\"0xff3783c85eed08000\",\"0x6e255b700ae7138a4bacf22888a9e2c00a285eec\":\"0xd8d726b7177a800000\",\"0x6e270ad529f1f0b8d9cb6d2427ec1b7e2dc64a74\":\"0xad78ebc5ac6200000\",\"0x6e2eab85dc89fe29dc0aa1853247dab43a523d56\":\"0x4563918244f400000\",\"0x6e3a51db743d334d2fe88224b5fe7c008e80e624\":\"0x5bf0ba6634f680000\",\"0x6e4c2ab7db026939dbd3bc68384af660a61816b2\":\"0x90d972f32323c0000\",\"0x6e4d2e39c8836629e5b487b1918a669aebdd9536\":\"0x3635c9adc5dea00000\",\"0x6e5c2d9b1c546a86eefd5d0a5120c9e4e730190e\":\"0xad201a6794ff80000\",\"0x6e60aee1a78f8eda8b424c73e353354ae67c3042\":\"0xbd35a48d9919e60000\",\"0x6e64e6129f224e378c0e6e736a7e7a06c211e9ec\":\"0x3635c9adc5dea00000\",\"0x6e6d5bbbb9053b89d744a27316c2a7b8c09b547d\":\"0x3152710a023e6d8000\",\"0x6e72b2a1186a8e2916543b1cb36a68870ea5d197\":\"0xa1544be879ea80000\",\"0x6e761eaa0f345f777b5441b73a0fa5b56b85f22d\":\"0x6c6b935b8bbd400000\",\"0x6e79edd4845b076e4cd88d188b6e432dd93f35aa\":\"0x33c5499031720c0000\",\"0x6e8212b722afd408a7a73ed3e2395ee6454a0330\":\"0x89e917994f71c0000\",\"0x6e84876dbb95c40b6656e42ba9aea08a993b54dc\":\"0x3bbc60e3b6cbbe0000\",\"0x6e84c2fd18d8095714a96817189ca21cca62bab1\":\"0x127b6c702621cd8000\",\"0x6e866d032d405abdd65cf651411d803796c22311\":\"0x6c6b935b8bbd400000\",\"0x6e899e59a9b41ab7ea41df7517860f2acb59f4fd\":\"0x43c33c1937564800000\",\"0x6e89c51ea6de13e06cdc748b67c4410fe9bcab03\":\"0xd8d726b7177a800000\",\"0x6e8a26689f7a2fdefd009cbaaa5310253450daba\":\"0x6f213717bad8d30000\",\"0x6e96faeda3054302c45f58f161324c99a3eebb62\":\"0x1158e460913d00000\",\"0x6eb0a5a9ae96d22cf01d8fd6483b9f38f08c2c8b\":\"0xd8d726b7177a800000\",\"0x6eb3819617404058268f0c3cff3596bfe9148c1c\":\"0x5a87e7d7f5f6580000\",\"0x6eb5578a6bb7c32153195b0d8020a6914852c059\":\"0x8bc2abf40221f4800000\",\"0x6ebb5e6957aa821ef659b6018a393a504cae4450\":\"0x6c6b935b8bbd400000\",\"0x6ebcf9957f5fc5e985add475223b04b8c14a7aed\":\"0x5dc892aa1131c80000\",\"0x6ec3659571b11f889dd439bcd4d67510a25be57e\":\"0x6aaf7c8516d0c0000\",\"0x6ec89b39f9f5276a553e8da30e6ec17aa47eefc7\":\"0x18424f5f0b1b4e0000\",\"0x6ec96d13bdb24dc7a557293f029e02dd74b97a55\":\"0xd8d726b7177a800000\",\"0x6ecaefa6fc3ee534626db02c6f85a0c395571e77\":\"0x2086ac351052600000\",\"0x6ed2a12b02f8c688c7b5d3a6ea14d63687dab3b6\":\"0x6c6b935b8bbd400000\",\"0x6ed884459f809dfa1016e770edaf3e9fef46fa30\":\"0xb852d6782093f10000\",\"0x6edf7f5283725c953ee64317f66188af1184b033\":\"0x1b464311d45a6880000\",\"0x6ee8aad7e0a065d8852d7c3b9a6e5fdc4bf50c00\":\"0x1158e460913d00000\",\"0x6eefdc850e87b715c72791773c0316c3559b58a4\":\"0xd8d726b7177a800000\",\"0x6ef9e8c9b6217d56769af97dbb1c8e1b8be799d2\":\"0x9ddc1e3b901180000\",\"0x6efba8fb2ac5b6730729a972ec224426a287c3ad\":\"0xf5985fbcbe1680000\",\"0x6efd90b535e00bbd889fda7e9c3184f879a151db\":\"0x22385a827e815500000\",\"0x6f051666cb4f7bd2b1907221b829b555d7a3db74\":\"0x5f68e8131ecf800000\",\"0x6f0edd23bcd85f6015f9289c28841fe04c83efeb\":\"0x10910d4cdc9f60000\",\"0x6f137a71a6f197df2cbbf010dcbd3c444ef5c925\":\"0x6c6b935b8bbd400000\",\"0x6f176065e88e3c6fe626267d18a088aaa4db80bc\":\"0xbed1d0263d9f000000\",\"0x6f18ec767e320508195f1374500e3f2e125689ff\":\"0x3635c9adc5dea00000\",\"0x6f1f4907b8f61f0c51568d692806b382f50324f5\":\"0x6c6b935b8bbd400000\",\"0x6f24c9af2b763480515d1b0951bb77a540f1e3f9\":\"0x6acb3df27e1f880000\",\"0x6f2576da4de283bbe8e3ee69ddd66e5e711db3f5\":\"0x44591d67fecc800000\",\"0x6f29bb375be5ed34ed999bb830ee2957dde76d16\":\"0x6c6b935b8bbd400000\",\"0x6f2a31900e240395b19f159c1d00dfe4d898ebdf\":\"0x6c660645aa47180000\",\"0x6f2a42e6e033d01061131929f7a6ee1538021e52\":\"0x6c6b935b8bbd400000\",\"0x6f39cc37caaa2ddc9b610f6131e0619fae772a3c\":\"0x1b1ae4d6e2ef500000\",\"0x6f44ca09f0c6a8294cbd519cdc594ad42c67579f\":\"0x2b5e3af16b1880000\",\"0x6f50929777824c291a49c46dc854f379a6bea080\":\"0x138400eca364a00000\",\"0x6f6cf20649a9e973177ac67dbadee4ebe5c7bdda\":\"0x11363297d01a8600000\",\"0x6f791d359bc3536a315d6382b88311af8ed6da47\":\"0x4fcc1a89027f00000\",\"0x6f794dbdf623daa6e0d00774ad6962737c921ea4\":\"0x6c6b935b8bbd400000\",\"0x6f7ac681d45e418fce8b3a1db5bc3be6f06c9849\":\"0x6c6b935b8bbd400000\",\"0x6f81f3abb1f933b1df396b8e9cc723a89b7c9806\":\"0xf2dc7d47f15600000\",\"0x6f8f0d15cc96fb7fe94f1065bc6940f8d12957b2\":\"0x3635c9adc5dea00000\",\"0x6f92d6e4548c78996509ee684b2ee29ba3c532b4\":\"0x3635c9adc5dea00000\",\"0x6fa60df818a5446418b1bbd62826e0b9825e1318\":\"0x2cb92cc8f6714400000\",\"0x6fa6388d402b30afe59934c3b9e13d1186476018\":\"0x24521e2a3017b80000\",\"0x6fa72015fa78696efd9a86174f7f1f21019286b1\":\"0x487a9a304539440000\",\"0x6fc25e7e00ca4f60a9fe6f28d1fde3542e2d1079\":\"0x2aef353bcddd600000\",\"0x6fc53662371dca587b59850de78606e2359df383\":\"0x9c2007651b2500000\",\"0x6fcc2c732bdd934af6ccd16846fb26ef89b2aa9b\":\"0x21e2b1d42261d490000\",\"0x6fd4e0f3f32bee6d3767fdbc9d353a6d3aab7899\":\"0x25b064a875ea940000\",\"0x6fd947d5a73b175008ae6ee8228163da289b167d\":\"0x65a4da25d3016c00000\",\"0x6fd98e563d12ce0fd60f4f1f850ae396a9823c02\":\"0x445be3f2ef87940000\",\"0x6fddbd9bca66e28765c2162c8433548c1052ed11\":\"0x1184429b82a818800000\",\"0x6ff5d361b52ad0b68b1588607ec304ae5665fc98\":\"0x692ae8897081d00000\",\"0x6ff6cc90d649de4e96cffee1077a5b302a848dcb\":\"0x18ce79c78802c0000\",\"0x6ffe5cf82cc9ea5e36cad7c2974ce7249f3749e6\":\"0x692ae8897081d00000\",\"0x7005a772282b1f62afda63f89b5dc6ab64c84cb9\":\"0x3cfc82e37e9a7400000\",\"0x700711e311bb947355f755b579250ca7fd765a3e\":\"0x61093d7c2c6d380000\",\"0x7010be2df57bd0ab9ae8196cd50ab0c521aba9f9\":\"0x6acb3df27e1f880000\",\"0x7023c70956e04a92d70025aad297b539af355869\":\"0x6c6b935b8bbd400000\",\"0x7025965d2b88da197d4459be3dc9386344cc1f31\":\"0x6cb7e74867d5e60000\",\"0x702802f36d00250fab53adbcd696f0176f638a49\":\"0x6c6b935b8bbd400000\",\"0x704819d2e44d6ed1da25bfce84c49fcca25613e5\":\"0x15af1d78b58c400000\",\"0x704a6eb41ba34f13addde7d2db7df04915c7a221\":\"0x62a992e53a0af00000\",\"0x704ab1150d5e10f5e3499508f0bf70650f028d4b\":\"0xd8d726b7177a800000\",\"0x704ae21d762d6e1dde28c235d13104597236db1a\":\"0x6c6b935b8bbd400000\",\"0x704d243c2978e46c2c86adbecd246e3b295ff633\":\"0x6d121bebf795f00000\",\"0x704d5de4846d39b53cd21d1c49f096db5c19ba29\":\"0x83d6c7aab63600000\",\"0x705ddd38355482b8c7d3b515bda1500dd7d7a817\":\"0x15af1d78b58c400000\",\"0x70616e2892fa269705b2046b8fe3e72fa55816d3\":\"0x43c33c1937564800000\",\"0x70670fbb05d33014444b8d1e8e7700258b8caa6d\":\"0x6c6b935b8bbd400000\",\"0x7081fa6baad6cfb7f51b2cca16fb8970991a64ba\":\"0xcaec005f6c0f68000\",\"0x7085ae7e7e4d932197b5c7858c00a3674626b7a5\":\"0x14542ba12a337c00000\",\"0x7086b4bde3e35d4aeb24b825f1a215f99d85f745\":\"0x6c68ccd09b022c0000\",\"0x708a2af425ceb01e87ffc1be54c0f532b20eacd6\":\"0x745d483b1f5a18000\",\"0x708ea707bae4357f1ebea959c3a250acd6aa21b3\":\"0x1b1ae4d6e2ef500000\",\"0x708fa11fe33d85ad1befcbae3818acb71f6a7d7e\":\"0xfc936392801c0000\",\"0x7091303116d5f2389b23238b4d656a8596d984d3\":\"0x3b4e7e80aa58330000\",\"0x7099d12f6ec656899b049a7657065d62996892c8\":\"0x15af1d78b58c400000\",\"0x709fe9d2c1f1ce42207c9585044a60899f35942f\":\"0x6c6b935b8bbd400000\",\"0x70a03549aa6168e97e88a508330a5a0bea74711a\":\"0x487a9a304539440000\",\"0x70a4067d448cc25dc8e70e651cea7cf84e92109e\":\"0x98a7d9b8314c00000\",\"0x70ab34bc17b66f9c3b63f151274f2a727c539263\":\"0x6c6b935b8bbd400000\",\"0x70c213488a020c3cfb39014ef5ba6404724bcaa3\":\"0x692ae8897081d00000\",\"0x70d25ed2c8ada59c088cf70dd22bf2db93acc18a\":\"0x39474545e4adbc0000\",\"0x70e5e9da735ff077249dcb9aaf3db2a48d9498c0\":\"0x3635c9adc5dea00000\",\"0x70fee08b00c6c2c04a3c625c1ff77caf1c32df01\":\"0xad78ebc5ac6200000\",\"0x7101bd799e411cde14bdfac25b067ac890eab8e8\":\"0x4e9b8aae48de470000\",\"0x7109dd011d15f3122d9d3a27588c10d77744508b\":\"0x6c6b935b8bbd400000\",\"0x710b0274d712c77e08a5707d6f3e70c0ce3d92cf\":\"0x15af1d78b58c4000000\",\"0x710be8fd5e2918468be2aabea80d828435d79612\":\"0xf43fc2c04ee00000\",\"0x71135d8f05963c905a4a07922909235a896a52ea\":\"0xa2a15d09519be00000\",\"0x711ecf77d71b3d0ea95ce4758afecdb9c131079d\":\"0x29331e6558f0e00000\",\"0x71213fca313404204ecba87197741aa9dfe96338\":\"0x340aad21b3b700000\",\"0x712b76510214dc620f6c3a1dd29aa22bf6d214fb\":\"0x14542ba12a337c00000\",\"0x712ff7370a13ed360973fedc9ff5d2c93a505e9e\":\"0xd5967be4fc3f100000\",\"0x7133843a78d939c69d4486e10ebc7b602a349ff7\":\"0x11d5cacce21f840000\",\"0x7148aef33261d8031fac3f7182ff35928daf54d9\":\"0xde42ee1544dd900000\",\"0x7163758cbb6c4c525e0414a40a049dcccce919bb\":\"0xad78ebc5ac6200000\",\"0x7168b3bb8c167321d9bdb023a6e9fd11afc9afd9\":\"0x61093d7c2c6d380000\",\"0x7169724ee72271c534cad6420fb04ee644cb86fe\":\"0x163c2b40dba5520000\",\"0x716ad3c33a9b9a0a18967357969b94ee7d2abc10\":\"0x1a2117fe412a480000\",\"0x716ba01ead2a91270635f95f25bfaf2dd610ca23\":\"0x979e7012056aa780000\",\"0x716d50cca01e938500e6421cc070c3507c67d387\":\"0x6c6b935b8bbd400000\",\"0x71762c63678c18d1c6378ce068e666381315147e\":\"0x6c6b935b8bbd400000\",\"0x71784c105117c1f68935797fe159abc74e43d16a\":\"0x6c81c7b31195e00000\",\"0x7179726f5c71ae1b6d16a68428174e6b34b23646\":\"0x18ea250097cbaf60000\",\"0x717cf9beab3638308ded7e195e0c86132d163fed\":\"0x3326ee6f865f4220000\",\"0x7180b83ee5574317f21c8072b191d895d46153c3\":\"0x18efc84ad0c7b00000\",\"0x71946b7117fc915ed107385f42d99ddac63249c2\":\"0x6c6b935b8bbd400000\",\"0x719e891fbcc0a33e19c12dc0f02039ca05b801df\":\"0x14f5538463a1b540000\",\"0x71c7230a1d35bdd6819ed4b9a88e94a0eb0786dd\":\"0xeca08b353d24140000\",\"0x71d2cc6d02578c65f73c575e76ce8fbcfadcf356\":\"0x3ecc078688a480000\",\"0x71d9494e50c5dd59c599dba3810ba1755e6537f0\":\"0xd8d726b7177a800000\",\"0x71e38ff545f30fe14ca863d4f5297fd48c73a5ce\":\"0xc2127af858da700000\",\"0x71ea5b11ad8d29b1a4cb67bf58ca6c9f9c338c16\":\"0x56bc75e2d631000000\",\"0x71ec3aec3f8f9221f9149fede06903a0f9a232f2\":\"0xad78ebc5ac6200000\",\"0x71f2cdd1b046e2da2fbb5a26723422b8325e25a3\":\"0x56b394263a40c0000\",\"0x71fa22cc6d33206b7d701a163a0dab31ae4d31d6\":\"0x57473d05dabae80000\",\"0x7201d1c06920cd397ae8ad869bcda6e47ffb1b5a\":\"0x1158e460913d00000\",\"0x72072a0ef1cff3d567cdd260e708ddc11cbc9a31\":\"0x56bc75e2d63100000\",\"0x72094f3951ffc9771dced23ada080bcaf9c7cca7\":\"0x14542ba12a337c00000\",\"0x720994dbe56a3a95929774e20e1fe525cf3704e4\":\"0x1b1ae4d6e2ef5000000\",\"0x720e6b22bf430966fa32b6acb9a506eebf662c61\":\"0x83d6c7aab63600000\",\"0x721158be5762b119cc9b2035e88ee4ee78f29b82\":\"0x21e19e0c9bab2400000\",\"0x721f9d17e5a0e74205947aeb9bc6a7938961038f\":\"0x2d041d705a2c60000\",\"0x7222fec7711781d26eaa4e8485f7aa3fac442483\":\"0x18b84570022a200000\",\"0x72393d37b451effb9e1ff3b8552712e2a970d8c2\":\"0x35659ef93f0fc40000\",\"0x723d8baa2551d2addc43c21b45e8af4ca2bfb2c2\":\"0x5f68e8131ecf800000\",\"0x72402300e81d146c2e644e2bbda1da163ca3fb56\":\"0x17b7883c06916600000\",\"0x72480bede81ad96423f2228b5c61be44fb523100\":\"0x15af1d78b58c4000000\",\"0x724ce858857ec5481c86bd906e83a04882e5821d\":\"0xa2a15d09519be00000\",\"0x726a14c90e3f84144c765cffacba3e0df11b48be\":\"0x21e19e0c9bab2400000\",\"0x7283cd4675da58c496556151dafd80c7f995d318\":\"0x29331e6558f0e00000\",\"0x7286e89cd9de8f7a8a00c86ffdb53992dd9251d1\":\"0x692ae8897081d00000\",\"0x728f9ab080157db3073156dbca1a169ef3179407\":\"0x1b1ae4d6e2ef500000\",\"0x7294c918b1aefb4d25927ef9d799e71f93a28e85\":\"0xaadec983fcff40000\",\"0x7294ec9da310bc6b4bbdf543b0ef45abfc3e1b4d\":\"0x4a89f54ef0121c00000\",\"0x729aad4627744e53f5d66309aa74448b3acdf46f\":\"0x6c6b935b8bbd400000\",\"0x72a2fc8675feb972fa41b50dffdbbae7fa2adfb7\":\"0x9ab4fc67b528c80000\",\"0x72a8260826294726a75bf39cd9aa9e07a3ea14cd\":\"0x6c6b935b8bbd400000\",\"0x72b05962fb2ad589d65ad16a22559eba1458f387\":\"0x73f75d1a085ba0000\",\"0x72b5633fe477fe542e742facfd690c137854f216\":\"0x5a87e7d7f5f6580000\",\"0x72b7a03dda14ca9c661a1d469fd33736f673c8e8\":\"0x6c6b935b8bbd400000\",\"0x72b904440e90e720d6ac1c2ad79c321dcc1c1a86\":\"0x54069233bf7f780000\",\"0x72b90a4dc097239492c5b9777dcd1e52ba2be2c2\":\"0x14542ba12a337c00000\",\"0x72bb27cb99f3e2c2cf90a98f707d30e4a201a071\":\"0x58e7926ee858a00000\",\"0x72c083beadbdc227c5fb43881597e32e83c26056\":\"0x43c33c1937564800000\",\"0x72cd048a110574482983492dfb1bd27942a696ba\":\"0x6c6b935b8bbd400000\",\"0x72d03d4dfab3500cf89b86866f15d4528e14a195\":\"0xf34b82fd8e91200000\",\"0x72dabb5b6eed9e99be915888f6568056381608f8\":\"0xb4c96c52cb4fe8000\",\"0x72fb49c29d23a18950c4b2dc0ddf410f532d6f53\":\"0x6c6b935b8bbd400000\",\"0x72feaf124579523954645b7fafff0378d1c8242e\":\"0x3635c9adc5dea00000\",\"0x7301dc4cf26d7186f2a11bf8b08bf229463f64a3\":\"0x6c6b935b8bbd400000\",\"0x730447f97ce9b25f22ba1afb36df27f9586beb9b\":\"0x2c73c937742c500000\",\"0x7306de0e288b56cfdf987ef0d3cc29660793f6dd\":\"0x1b8abfb62ec8f60000\",\"0x730d8763c6a4fd824ab8b859161ef7e3a96a1200\":\"0x43c33c1937564800000\",\"0x73128173489528012e76b41a5e28c68ba4e3a9d4\":\"0x3635c9adc5dea00000\",\"0x7313461208455455465445a459b06c3773b0eb30\":\"0x6c6b935b8bbd400000\",\"0x732fead60f7bfdd6a9dec48125e3735db1b6654f\":\"0x1158e460913d00000\",\"0x734223d27ff23e5906caed22595701bb34830ca1\":\"0x6c6b935b8bbd400000\",\"0x73473e72115110d0c3f11708f86e77be2bb0983c\":\"0x1158e460913d00000\",\"0x7352586d021ad0cf77e0e928404a59f374ff4582\":\"0xb8507a820728200000\",\"0x73550beb732ba9ddafda7ae406e18f7feb0f8bb2\":\"0x97c9ce4cf6d5c00000\",\"0x735b97f2fc1bd24b12076efaf3d1288073d20c8c\":\"0x1158e460913d00000\",\"0x735e328666ed5637142b3306b77ccc5460e72c3d\":\"0x6ab8f37879c9910000\",\"0x7363cd90fbab5bb8c49ac20fc62c398fe6fb744c\":\"0x6c6b935b8bbd400000\",\"0x736b44503dd2f6dd5469ff4c5b2db8ea4fec65d0\":\"0x1104ee759f21e30000\",\"0x736bf1402c83800f893e583192582a134eb532e9\":\"0x21e19d293c01f260000\",\"0x738ca94db7ce8be1c3056cd6988eb376359f3353\":\"0x5665b96cf35acf00000\",\"0x73914b22fc2f131584247d82be4fecbf978ad4ba\":\"0x6c6b935b8bbd400000\",\"0x73932709a97f02c98e51b091312865122385ae8e\":\"0x4d853c8f8908980000\",\"0x7393cbe7f9ba2165e5a7553500b6e75da3c33abf\":\"0x56bc75e2d63100000\",\"0x73b4d499de3f38bf35aaf769a6e318bc6d123692\":\"0x6c6b935b8bbd400000\",\"0x73bedd6fda7ba3272185087b6351fc133d484e37\":\"0x11226bf9dce59780000\",\"0x73bfe7710f31cab949b7a2604fbf5239cee79015\":\"0x6c6b935b8bbd400000\",\"0x73cf80ae9688e1580e68e782cd0811f7aa494d2c\":\"0x1a4aba225c207400000\",\"0x73d7269ff06c9ffd33754ce588f74a966abbbbba\":\"0x165c96647b38a200000\",\"0x73d8fee3cb864dce22bb26ca9c2f086d5e95e63b\":\"0x3635c9adc5dea00000\",\"0x73df3c3e7955f4f2d859831be38000b1076b3884\":\"0x6acb3df27e1f880000\",\"0x73e4a2b60cf48e8baf2b777e175a5b1e4d0c2d8f\":\"0x56bc75e2d63100000\",\"0x740af1eefd3365d78ba7b12cb1a673e06a077246\":\"0x42bf06b78ed3b500000\",\"0x740bfd52e01667a3419b029a1b8e45576a86a2db\":\"0x38ebad5cdc902800000\",\"0x740f641614779dcfa88ed1d425d60db42a060ca6\":\"0x3622c6760810570000\",\"0x7412c9bc30b4df439f023100e63924066afd53af\":\"0x1b1ae4d6e2ef500000\",\"0x741693c30376508513082020cc2b63e9fa92131b\":\"0x410d586a20a4c00000\",\"0x7421ce5be381738ddc83f02621974ff0686c79b8\":\"0x58788cb94b1d800000\",\"0x74316adf25378c10f576d5b41a6f47fa98fce33d\":\"0x1238131e5c7ad50000\",\"0x743651b55ef8429df50cf81938c2508de5c8870f\":\"0x6c6b935b8bbd400000\",\"0x743de50026ca67c94df54f066260e1d14acc11ac\":\"0x6c6b935b8bbd400000\",\"0x7445202f0c74297a004eb3726aa6a82dd7c02fa1\":\"0x6c6b935b8bbd400000\",\"0x744b03bba8582ae5498e2dc22d19949467ab53fc\":\"0x1b1ae4d6e2ef500000\",\"0x744c0c77ba7f236920d1e434de5da33e48ebf02c\":\"0x6acb3df27e1f880000\",\"0x7450ff7f99eaa9116275deac68e428df5bbcd8b9\":\"0x6c6b935b8bbd400000\",\"0x7456c5b2c5436e3e571008933f1805ccfe34e9ec\":\"0x3635c9adc5dea00000\",\"0x745ad3abc6eeeb2471689b539e789ce2b8268306\":\"0x3d4194bea011928000\",\"0x745aecbaf9bb39b74a67ea1ce623de368481baa6\":\"0x21e19e0c9bab2400000\",\"0x745ccf2d819edbbddea8117b5c49ed3c2a066e93\":\"0xd8d726b7177a800000\",\"0x7462c89caa9d8d7891b2545def216f7464d5bb21\":\"0x5eaed54a28b310000\",\"0x74648caac748dd135cd91ea14c28e1bd4d7ff6ae\":\"0xa80d24677efef00000\",\"0x7471f72eeb300624eb282eab4d03723c649b1b58\":\"0x1b1ae4d6e2ef5000000\",\"0x747abc9649056d3926044d28c3ad09ed17b67d70\":\"0x10f0dbae61009528000\",\"0x747ff7943b71dc4dcdb1668078f83dd7cc4520c2\":\"0x340aad21b3b700000\",\"0x7480de62254f2ba82b578219c07ba5be430dc3cb\":\"0x17da3a04c7b3e000000\",\"0x7484d26becc1eea8c6315ec3ee0a450117dc86a0\":\"0x28a857425466f800000\",\"0x74863acec75d03d53e860e64002f2c165e538377\":\"0x3635c9adc5dea00000\",\"0x7489cc8abe75cda4ef0d01cef2605e47eda67ab1\":\"0x73f75d1a085ba0000\",\"0x748c285ef1233fe4d31c8fb1378333721c12e27a\":\"0x6c6b935b8bbd400000\",\"0x749087ac0f5a97c6fad021538bf1d6cda18e0daa\":\"0x3635c9adc5dea00000\",\"0x7495ae78c0d90261e2140ef2063104731a60d1ed\":\"0x1db50718925210000\",\"0x749a4a768b5f237248938a12c623847bd4e688dc\":\"0x3e733628714200000\",\"0x749ad6f2b5706bbe2f689a44c4b640b58e96b992\":\"0x56bc75e2d63100000\",\"0x74a17f064b344e84db6365da9591ff1628257643\":\"0x1158e460913d00000\",\"0x74aeec915de01cc69b2cb5a6356feea14658c6c5\":\"0xc9a95ee2986520000\",\"0x74afe54902d615782576f8baac13ac970c050f6e\":\"0x9a1aaa3a9fba70000\",\"0x74b7e0228baed65957aebb4d916d333aae164f0e\":\"0x6c6b935b8bbd400000\",\"0x74bc4a5e2045f4ff8db184cf3a9b0c065ad807d2\":\"0x6c6b935b8bbd400000\",\"0x74bce9ec38362d6c94ccac26d5c0e13a8b3b1d40\":\"0x363526410442f50000\",\"0x74bf7a5ab59293149b5c60cf364263e5ebf1aa0d\":\"0x6470c3e771e3c0000\",\"0x74c73c90528a157336f1e7ea20620ae53fd24728\":\"0x1e63a2e538f16e30000\",\"0x74d1a4d0c7524e018d4e06ed3b648092b5b6af2c\":\"0x2b5e3af16b1880000\",\"0x74d366b07b2f56477d7c7077ac6fe497e0eb6559\":\"0x10f0cf064dd59200000\",\"0x74d37a51747bf8b771bfbf43943933d100d21483\":\"0x3635c9adc5dea00000\",\"0x74d671d99cbea1ab57906375b63ff42b50451d17\":\"0x3635c9adc5dea00000\",\"0x74ebf4425646e6cf81b109ce7bf4a2a63d84815f\":\"0x22b1c8c1227a00000\",\"0x74ed33acf43f35b98c9230b9e6642ecb5330839e\":\"0x24f6dffb498d280000\",\"0x74ef2869cbe608856045d8c2041118579f2236ea\":\"0x33cd64591956e0000\",\"0x74fc5a99c0c5460503a13b0509459da19ce7cd90\":\"0xad78ebc5ac6200000\",\"0x750bbb8c06bbbf240843cc75782ee02f08a97453\":\"0x2d43f3ebfafb2c0000\",\"0x7514adbdc63f483f304d8e94b67ff3309f180b82\":\"0x21c4a06e2d13598000\",\"0x7517f16c28d132bb40e3ba36c6aef131c462da17\":\"0xfc936392801c0000\",\"0x751a2ca34e7187c163d28e3618db28b13c196d26\":\"0x1b1ae4d6e2ef500000\",\"0x751abcb6cc033059911815c96fd191360ab0442d\":\"0x1b1ae4d6e2ef5000000\",\"0x7526e482529f0a14eec98871dddd0e721b0cd9a2\":\"0x1158e460913d00000\",\"0x7529f3797bb6a20f7ea6492419c84c867641d81c\":\"0x6c6b935b8bbd400000\",\"0x752a5ee232612cd3005fb26e5b597de19f776be6\":\"0x127fcb8afae20d00000\",\"0x752c9febf42f66c4787bfa7eb17cf5333bba5070\":\"0x6a99f2b54fdd580000\",\"0x7539333046deb1ef3c4daf50619993f444e1de68\":\"0x40138b917edfb80000\",\"0x7553aa23b68aa5f57e135fe39fdc235eaca8c98c\":\"0x3635c9adc5dea00000\",\"0x755a60bf522fbd8fff9723446b7e343a7068567e\":\"0x43c33c1937564800000\",\"0x755f587e5efff773a220726a13d0f2130d9f896b\":\"0x3635c9adc5dea00000\",\"0x75621865b6591365606ed378308c2d1def4f222c\":\"0xa80d24677efef00000\",\"0x75636cdb109050e43d5d6ec47e359e218e857eca\":\"0x4d8b2276c8962280000\",\"0x7566496162ba584377be040a4f87777a707acaeb\":\"0xd8d726b7177a800000\",\"0x756b84eb85fcc1f4fcdcc2b08db6a86e135fbc25\":\"0xae8e7a0bb575d00000\",\"0x756f45e3fa69347a9a973a725e3c98bc4db0b5a0\":\"0xad78ebc5ac6200000\",\"0x757b65876dbf29bf911d4f0692a2c9beb1139808\":\"0xdf93a59337d6dd8000\",\"0x757fa55446c460968bb74b5ebca96c4ef2c709c5\":\"0x3708baed3d68900000\",\"0x75804aac64b4199083982902994d9c5ed8828f11\":\"0x1e3d07b0a620e40000\",\"0x7592c69d067b51b6cc639d1164d5578c60d2d244\":\"0x1158e460913d00000\",\"0x75abe5270f3a78ce007cf37f8fbc045d489b7bb1\":\"0x6c6acc67d7b1d40000\",\"0x75ac547017134c04ae1e11d60e63ec04d18db4ef\":\"0x14542ba12a337c00000\",\"0x75b0e9c942a4f0f6f86d3f95ff998022fa67963b\":\"0x50c5e761a444080000\",\"0x75b95696e8ec4510d56868a7c1a735c68b244890\":\"0x15af1d78b58c4000000\",\"0x75be8ff65e5788aec6b2a52d5fa7b1e7a03ba675\":\"0x3abcdc5343d740000\",\"0x75c11d024d12ae486c1095b7a7b9c4af3e8edeb9\":\"0x1158e460913d00000\",\"0x75c1ad23d23f24b384d0c3149177e86697610d21\":\"0x15c5bcd6c288bbd0000\",\"0x75c2ffa1bef54919d2097f7a142d2e14f9b04a58\":\"0x90f358504032a10000\",\"0x75d67ce14e8d29e8c2ffe381917b930b1aff1a87\":\"0xa2a15d09519be00000\",\"0x75de7e9352e90b13a59a5878ffecc7831cac4d82\":\"0x9489237adb9a500000\",\"0x75f7539d309e9039989efe2e8b2dbd865a0df088\":\"0x855b5ba65c84f00000\",\"0x7608f437b31f18bc0b64d381ae86fd978ed7b31f\":\"0x2b5e3af16b1880000\",\"0x760ff3354e0fde938d0fb5b82cef5ba15c3d2916\":\"0x21e19e0c9bab2400000\",\"0x761a6e362c97fbbd7c5977acba2da74687365f49\":\"0x9f74ae1f953d00000\",\"0x761e6caec189c230a162ec006530193e67cf9d19\":\"0x6c6b935b8bbd400000\",\"0x761f8a3a2af0a8bdbe1da009321fb29764eb62a1\":\"0x21e19e0c9bab2400000\",\"0x762998e1d75227fced7a70be109a4c0b4ed86414\":\"0x1158e460913d00000\",\"0x762d6f30dab99135e4eca51d5243d6c8621102d5\":\"0xf498941e664280000\",\"0x76331e30796ce664b2700e0d4153700edc869777\":\"0x6c6b935b8bbd400000\",\"0x763886e333c56feff85be3951ab0b889ce262e95\":\"0x6c6b935b8bbd400000\",\"0x763a7cbab70d7a64d0a7e52980f681472593490c\":\"0x2086ac351052600000\",\"0x763eece0b08ac89e32bfa4bece769514d8cb5b85\":\"0xd8d726b7177a800000\",\"0x7640a37f8052981515bce078da93afa4789b5734\":\"0x6c6b935b8bbd400000\",\"0x7641f7d26a86cddb2be13081810e01c9c83c4b20\":\"0xb98bc829a6f90000\",\"0x764692cccb33405dd0ab0c3379b49caf8e6221ba\":\"0x1158e460913d00000\",\"0x764d5212263aff4a2a14f031f04ec749dc883e45\":\"0x6449e84e47a8a80000\",\"0x764fc46d428b6dbc228a0f5f55c9508c772eab9f\":\"0x581767ba6189c400000\",\"0x76506eb4a780c951c74a06b03d3b8362f0999d71\":\"0x1b1ae4d6e2ef500000\",\"0x765be2e12f629e6349b97d21b62a17b7c830edab\":\"0x14542ba12a337c00000\",\"0x76628150e2995b5b279fc83e0dd5f102a671dd1c\":\"0x878678326eac9000000\",\"0x766b3759e8794e926dac473d913a8fb61ad0c2c9\":\"0x4b06dbbb40f4a0000\",\"0x7670b02f2c3cf8fd4f4730f3381a71ea431c33c7\":\"0xe7eeba3410b740000\",\"0x767a03655af360841e810d83f5e61fb40f4cd113\":\"0x35659ef93f0fc40000\",\"0x767ac690791c2e23451089fe6c7083fe55deb62b\":\"0x2c73c937742c500000\",\"0x767fd7797d5169a05f7364321c19843a8c348e1e\":\"0x104e70464b1580000\",\"0x76846f0de03b5a76971ead298cdd08843a4bc6c6\":\"0xd71b0fe0a28e0000\",\"0x768498934e37e905f1d0e77b44b574bcf3ec4ae8\":\"0x43c33c1937564800000\",\"0x768ce0daa029b7ded022e5fc574d11cde3ecb517\":\"0x1174a5cdf88bc80000\",\"0x7693bdeb6fc82b5bca721355223175d47a084b4d\":\"0x4a89f54ef0121c00000\",\"0x76aaf8c1ac012f8752d4c09bb46607b6651d5ca8\":\"0x1158e460913d00000\",\"0x76ab87dd5a05ad839a4e2fc8c85aa6ba05641730\":\"0x6c6b935b8bbd400000\",\"0x76afc225f4fa307de484552bbe1d9d3f15074c4a\":\"0xa290b5c7ad39680000\",\"0x76becae4a31d36f3cb577f2a43594fb1abc1bb96\":\"0x543a9ce0e1332f00000\",\"0x76c27535bcb59ce1fa2d8c919cabeb4a6bba01d1\":\"0x6c6b935b8bbd400000\",\"0x76ca22bcb8799e5327c4aa2a7d0949a1fcce5f29\":\"0x52a03f228c5ae20000\",\"0x76cac488111a4fd595f568ae3a858770fc915d5f\":\"0xad78ebc5ac6200000\",\"0x76cb9c8b69f4387675c48253e234cb7e0d74a426\":\"0x190f4482eb91dae0000\",\"0x76f83ac3da30f7092628c7339f208bfc142cb1ee\":\"0x9a18ffe7427d640000\",\"0x76f9ad3d9bbd04ae055c1477c0c35e7592cb2a20\":\"0x8833f11e3458f200000\",\"0x76ffc157ad6bf8d56d9a1a7fddbc0fea010aabf4\":\"0x3635c9adc5dea00000\",\"0x77028e409cc43a3bd33d21a9fc53ec606e94910e\":\"0xd255d112e103a00000\",\"0x770c2fb2c4a81753ac0182ea460ec09c90a516f8\":\"0x1158e460913d00000\",\"0x770d98d31b4353fceee8560c4ccf803e88c0c4e0\":\"0x2086ac351052600000\",\"0x7713ab8037411c09ba687f6f9364f0d3239fac28\":\"0x21e19e0c9bab2400000\",\"0x771507aeee6a255dc2cd9df55154062d0897b297\":\"0x121ea68c114e510000\",\"0x7719888795ad745924c75760ddb1827dffd8cda8\":\"0x6c6b4c4da6ddbe0000\",\"0x7727af101f0aaba4d23a1cafe17c6eb5dab1c6dc\":\"0x6c6b935b8bbd400000\",\"0x772c297f0ad194482ee8c3f036bdeb01c201d5cc\":\"0xad78ebc5ac6200000\",\"0x77306ffe2e4a8f3ca826c1a249f7212da43aeffd\":\"0x43c33c1937564800000\",\"0x773141127d8cf318aebf88365add3d5527d85b6a\":\"0x3636d7af5ec98e0000\",\"0x7746b6c6699c8f34ca2768a820f1ffa4c207fe05\":\"0xd8d8583fa2d52f0000\",\"0x7751f363a0a7fd0533190809ddaf9340d8d11291\":\"0x1158e460913d00000\",\"0x7757a4b9cc3d0247ccaaeb9909a0e56e1dd6dcc2\":\"0x1158e460913d00000\",\"0x775c10c93e0db7205b2643458233c64fc33fd75b\":\"0x6c6b935b8bbd400000\",\"0x77617ebc4bebc5f5ddeb1b7a70cdeb6ae2ffa024\":\"0x6acb3df27e1f880000\",\"0x776943ffb2ef5cdd35b83c28bc046bd4f4677098\":\"0xa2a15d09519be00000\",\"0x77701e2c493da47c1b58f421b5495dee45bea39b\":\"0x148f649cf6142a58000\",\"0x77798f201257b9c35204957057b54674aefa51df\":\"0x813ca56906d340000\",\"0x778c43d11afe3b586ff374192d96a7f23d2b9b7f\":\"0x8bb4fcfa3b7d6b8000\",\"0x778c79f4de1953ebce98fe8006d53a81fb514012\":\"0x36330322d5238c0000\",\"0x779274bf1803a336e4d3b00ddd93f2d4f5f4a62e\":\"0x3635c9adc5dea00000\",\"0x77a17122fa31b98f1711d32a99f03ec326f33d08\":\"0x5c283d410394100000\",\"0x77a34907f305a54c85db09c363fde3c47e6ae21f\":\"0x35659ef93f0fc40000\",\"0x77a769fafdecf4a638762d5ba3969df63120a41d\":\"0x6c6b935b8bbd400000\",\"0x77be6b64d7c733a436adec5e14bf9ad7402b1b46\":\"0x3635c9adc5dea00000\",\"0x77bfe93ccda750847e41a1affee6b2da96e7214e\":\"0x1043561a8829300000\",\"0x77c4a697e603d42b12056cbba761e7f51d0443f5\":\"0x24dce54d34a1a00000\",\"0x77cc02f623a9cf98530997ea67d95c3b491859ae\":\"0x497303c36ea0c20000\",\"0x77d43fa7b481dbf3db530cfbf5fdced0e6571831\":\"0x6c6b935b8bbd400000\",\"0x77da5e6c72fb36bce1d9798f7bcdf1d18f459c2e\":\"0x13695bb6cf93e0000\",\"0x77f4e3bdf056883cc87280dbe640a18a0d02a207\":\"0xa81993a2bfb5b0000\",\"0x77f609ca8720a023262c55c46f2d26fb3930ac69\":\"0xf015f25736420000\",\"0x77f81b1b26fc84d6de97ef8b9fbd72a33130cc4a\":\"0x3635c9adc5dea00000\",\"0x7819b0458e314e2b53bfe00c38495fd4b9fdf8d6\":\"0x1158e460913d00000\",\"0x781b1501647a2e06c0ed43ff197fccec35e1700b\":\"0xa2a15d09519be00000\",\"0x782f52f0a676c77716d574c81ec4684f9a020a97\":\"0x2e14e206b730ad8000\",\"0x78355df0a230f83d032c703154414de3eedab557\":\"0x6c6b935b8bbd400000\",\"0x7836f7ef6bc7bd0ff3acaf449c84dd6b1e2c939f\":\"0xe08de7a92cd97c0000\",\"0x7837fcb876da00d1eb3b88feb3df3fa4042fac82\":\"0x5f68e8131ecf800000\",\"0x783eec8aa5dac77b2e6623ed5198a431abbaee07\":\"0x17da3a04c7b3e00000\",\"0x785c8ea774d73044a734fa790a1b1e743e77ed7c\":\"0xcf152640c5c830000\",\"0x7860a3de38df382ae4a4dce18c0c07b98bce3dfa\":\"0x3635c9adc5dea00000\",\"0x78634371e17304cbf339b1452a4ce438dc764cce\":\"0x21e19e0c9bab2400000\",\"0x7864dc999fe4f8e003c0f43decc39aae1522dc0f\":\"0x51e102bd8ece00000\",\"0x78746a958dced4c764f876508c414a68342cecb9\":\"0x2be374fe8e2c40000\",\"0x787d313fd36b053eeeaedbce74b9fb0678333289\":\"0x5c058b7842719600000\",\"0x78859c5b548b700d9284cee4b6633c2f52e529c2\":\"0xa030dcebbd2f4c0000\",\"0x788e809741a3b14a22a4b1d937c82cfea489eebe\":\"0x17b7883c06916600000\",\"0x78a1e254409fb1b55a7cb4dd8eba3b30c8bad9ef\":\"0x56bc75e2d63100000\",\"0x78a5e89900bd3f81dd71ba869d25fec65261df15\":\"0xafd812fee03d5700000\",\"0x78b978a9d7e91ee529ea4fc4b76feaf8762f698c\":\"0x6c6b935b8bbd4000000\",\"0x78ce3e3d474a8a047b92c41542242d0a08c70f99\":\"0x21e19e0c9bab2400000\",\"0x78cf8336b328db3d87813a472b9e89b75e0cf3bc\":\"0x3635c9adc5dea00000\",\"0x78d4f8c71c1e68a69a98f52fcb45da8af56ea1a0\":\"0x6c6b935b8bbd400000\",\"0x78df2681d6d602e22142d54116dea15d454957aa\":\"0x102794ad20da680000\",\"0x78e08bc533413c26e291b3143ffa7cc9afb97b78\":\"0xad78ebc5ac6200000\",\"0x78e83f80b3678c7a0a4e3e8c84dccde064426277\":\"0x61093d7c2c6d380000\",\"0x78f5c74785c5668a838072048bf8b453594ddaab\":\"0x15af1d78b58c400000\",\"0x790f91bd5d1c5cc4739ae91300db89e1c1303c93\":\"0x6c6b935b8bbd400000\",\"0x7917e5bd82a9790fd650d043cdd930f7799633db\":\"0xd8d4602c26bf6c0000\",\"0x7919e7627f9b7d54ea3b14bb4dd4649f4f39dee0\":\"0x5a87e7d7f5f6580000\",\"0x791f6040b4e3e50dcf3553f182cd97a90630b75d\":\"0xd8d726b7177a800000\",\"0x7930c2d9cbfa87f510f8f98777ff8a8448ca5629\":\"0xad6eedd17cf3b8000\",\"0x794529d09d017271359730027075b87ad83dae6e\":\"0x10ce1d3d8cb3180000\",\"0x794b51c39e53d9e762b0613b829a44b472f4fff3\":\"0x2435e0647841cc8000\",\"0x79551cede376f747e3716c8d79400d766d2e0195\":\"0x9cb37afa4ff78680000\",\"0x795ebc2626fc39b0c86294e0e837dcf523553090\":\"0x3635c9adc5dea00000\",\"0x796ebbf49b3e36d67694ad79f8ff36767ac6fab0\":\"0x34bc4fdde27c00000\",\"0x796f87ba617a2930b1670be92ed1281fb0b346e1\":\"0x6f5e86fb528280000\",\"0x797427e3dbf0feae7a2506f12df1dc40326e8505\":\"0x3635c9adc5dea00000\",\"0x797510e386f56393ced8f477378a444c484f7dad\":\"0x3635c9adc5dea00000\",\"0x797bb7f157d9feaa17f76da4f704b74dc1038341\":\"0xb50fcfafebecb00000\",\"0x7988901331e387f713faceb9005cb9b65136eb14\":\"0x6acb3df27e1f880000\",\"0x7989d09f3826c3e5af8c752a8115723a84d80970\":\"0x1686f8614cf0ad0000\",\"0x7995bd8ce2e0c67bf1c7a531d477bca1b2b97561\":\"0x14248d617829ece0000\",\"0x79aeb34566b974c35a5881dec020927da7df5d25\":\"0x6c6b935b8bbd400000\",\"0x79b120eb8806732321288f675a27a9225f1cd2eb\":\"0x85a0bf37dec9e40000\",\"0x79b48d2d6137c3854d611c01ea42427a0f597bb7\":\"0xa5aa85009e39c0000\",\"0x79b8aad879dd30567e8778d2d231c8f37ab8734e\":\"0x6c6b935b8bbd400000\",\"0x79bf2f7b6e328aaf26e0bb093fa22da29ef2f471\":\"0x61093d7c2c6d380000\",\"0x79c130c762b8765b19d2abc9a083ab8f3aad7940\":\"0xd5967be4fc3f100000\",\"0x79c1be19711f73bee4e6316ae7549459aacea2e0\":\"0x15af1d78b58c400000\",\"0x79c6002f8452ca157f1317e80a2faf24475559b7\":\"0x1158e460913d00000\",\"0x79cac6494f11ef2798748cb53285bd8e22f97cda\":\"0x6c6b935b8bbd400000\",\"0x79cfa9780ae6d87b2c31883f09276986c89a6735\":\"0x3635c9adc5dea00000\",\"0x79dba256472db4e058f2e4cdc3ea4e8a42773833\":\"0x4f2591f896a6500000\",\"0x79ed10cf1f6db48206b50919b9b697081fbdaaf3\":\"0x6c6b935b8bbd400000\",\"0x79f08e01ce0988e63c7f8f2908fade43c7f9f5c9\":\"0xfc936392801c0000\",\"0x79fd6d48315066c204f9651869c1096c14fc9781\":\"0x6c6b935b8bbd400000\",\"0x79ffb4ac13812a0b78c4a37b8275223e176bfda5\":\"0xf015f25736420000\",\"0x7a0589b143a8e5e107c9ac66a9f9f8597ab3e7ab\":\"0x51e932d76e8f7b0000\",\"0x7a0a78a9cc393f91c3d9e39a6b8c069f075e6bf5\":\"0x487a9a304539440000\",\"0x7a1370a742ec2687e761a19ac5a794329ee67404\":\"0xa2a1326761e2920000\",\"0x7a2dfc770e24368131b7847795f203f3d50d5b56\":\"0x269fec7f0361d200000\",\"0x7a33834e8583733e2d52aead589bd1affb1dd256\":\"0x3635c9adc5dea00000\",\"0x7a36aba5c31ea0ca7e277baa32ec46ce93cf7506\":\"0x43c33c1937564800000\",\"0x7a381122bada791a7ab1f6037dac80432753baad\":\"0x21e19e0c9bab2400000\",\"0x7a48d877b63a8f8f9383e9d01e53e80c528e955f\":\"0x1b1ae4d6e2ef5000000\",\"0x7a4f9b850690c7c94600dbee0ca4b0a411e9c221\":\"0x678a932062e4180000\",\"0x7a63869fc767a4c6b1cd0e0649f3634cb121d24b\":\"0x433874f632cc60000\",\"0x7a67dd043a504fc2f2fc7194e9becf484cecb1fb\":\"0xd8d726b7177a80000\",\"0x7a6b26f438d9a352449155b8876cbd17c9d99b64\":\"0x14542ba12a337c00000\",\"0x7a6d781c77c4ba1fcadf687341c1e31799e93d27\":\"0xeda838c4929080000\",\"0x7a7068e1c3375c0e599db1fbe6b2ea23b8f407d2\":\"0x6c6b935b8bbd400000\",\"0x7a74cee4fa0f6370a7894f116cd00c1147b83e59\":\"0x2b5e3af16b18800000\",\"0x7a79e30ff057f70a3d0191f7f53f761537af7dff\":\"0x15af1d78b58c400000\",\"0x7a7a4f807357a4bbe68e1aa806393210c411ccb3\":\"0x65a4da25d3016c00000\",\"0x7a8563867901206f3f2bf0fa3e1c8109cabccd85\":\"0x76d41c62494840000\",\"0x7a8797690ab77b5470bf7c0c1bba612508e1ac7d\":\"0x1e09296c3378de40000\",\"0x7a8c89c014509d56d7b68130668ff6a3ecec7370\":\"0x1043561a8829300000\",\"0x7a94b19992ceb8ce63bc92ee4b5aded10c4d9725\":\"0x38d1a8064bb64c80000\",\"0x7aa79ac04316cc8d08f20065baa6d4142897d54e\":\"0x4be4e7267b6ae00000\",\"0x7aad4dbcd3acf997df93586956f72b64d8ad94ee\":\"0xd8d726b7177a800000\",\"0x7ab256b204800af20137fabcc916a23258752501\":\"0x43c33c1937564800000\",\"0x7aba56f63a48bc0817d6b97039039a7ad62fae2e\":\"0x2086ac351052600000\",\"0x7abb10f5bd9bc33b8ec1a82d64b55b6b18777541\":\"0x43c33c1937564800000\",\"0x7ac48d40c664cc9a6d89f1c5f5c80a1c70e744e6\":\"0xa31062beeed7000000\",\"0x7ac58f6ffc4f8107ae6e30378e4e9f99c57fbb24\":\"0x22b1c8c1227a00000\",\"0x7ad3f307616f19dcb143e6444dab9c3c33611f52\":\"0x2b5e3af16b1880000\",\"0x7ad82caea1a8b4ed05319b9c9870173c814e06ee\":\"0x2164b7a04ac8a00000\",\"0x7ade5d66b944bb860c0efdc86276d58f4653f711\":\"0x6c6b935b8bbd400000\",\"0x7adfedb06d91f3cc7390450b85550270883c7bb7\":\"0x1178fa40515db40000\",\"0x7ae1c19e53c71cee4c73fae2d7fc73bf9ab5e392\":\"0x3635c9adc5dea00000\",\"0x7ae659eb3bc46852fa86fac4e21c768d50388945\":\"0xf810c1cb501b80000\",\"0x7aea25d42b2612286e99c53697c6bc4100e2dbbf\":\"0x6c6b935b8bbd400000\",\"0x7aef7b551f0b9c46e755c0f38e5b3a73fe1199f5\":\"0x50c5e761a444080000\",\"0x7b0b31ff6e24745ead8ed9bb85fc0bf2fe1d55d4\":\"0x2b5e3af16b18800000\",\"0x7b0fea1176d52159333a143c294943da36bbddb4\":\"0x1fc7da64ea14c100000\",\"0x7b11673cc019626b290cbdce26046f7e6d141e21\":\"0x1b1ae4d6e2ef500000\",\"0x7b122162c913e7146cad0b7ed37affc92a0bf27f\":\"0x51af096b2301d18000\",\"0x7b1bf53a9cbe83a7dea434579fe72aac8d2a0cd0\":\"0xad4c8316a0b0c0000\",\"0x7b1daf14891b8a1e1bd429d8b36b9a4aa1d9afbf\":\"0x1b1ae4d6e2ef500000\",\"0x7b1fe1ab4dfd0088cdd7f60163ef59ec2aee06f5\":\"0x6c6b935b8bbd400000\",\"0x7b25bb9ca8e702217e9333225250e53c36804d48\":\"0x65ea3db75546600000\",\"0x7b27d0d1f3dd3c140294d0488b783ebf4015277d\":\"0x15af1d78b58c400000\",\"0x7b4007c45e5a573fdbb6f8bd746bf94ad04a3c26\":\"0x33821f5135d259a0000\",\"0x7b43c7eea8d62355b0a8a81da081c6446b33e9e0\":\"0xd8d726b7177a800000\",\"0x7b4d2a38269069c18557770d591d24c5121f5e83\":\"0x25f273933db5700000\",\"0x7b6175ec9befc738249535ddde34688cd36edf25\":\"0x21e19e0c9bab2400000\",\"0x7b66126879844dfa34fe65c9f288117fefb449ad\":\"0x14542ba12a337c00000\",\"0x7b6a84718dd86e63338429ac811d7c8a860f21f1\":\"0x61093d7c2c6d380000\",\"0x7b712c7af11676006a66d2fc5c1ab4c479ce6037\":\"0x1b1ae4d6e2ef5000000\",\"0x7b73242d75ca9ad558d650290df17692d54cd8b8\":\"0x6c6e59e67c78540000\",\"0x7b761feb7fcfa7ded1f0eb058f4a600bf3a708cb\":\"0xf95dd2ec27cce00000\",\"0x7b827cae7ff4740918f2e030ab26cb98c4f46cf5\":\"0x194684c0b39de100000\",\"0x7b893286427e72db219a21fc4dcd5fbf59283c31\":\"0x21e19e0c9bab2400000\",\"0x7b9226d46fe751940bc416a798b69ccf0dfab667\":\"0xe3aeb5737240a00000\",\"0x7b98e23cb96beee80a168069ebba8f20edd55ccf\":\"0xba0c91587c14a0000\",\"0x7bb0fdf5a663b5fba28d9c902af0c811e252f298\":\"0xad78ebc5ac6200000\",\"0x7bb9571f394b0b1a8eba5664e9d8b5e840677bea\":\"0x11164759ffb320000\",\"0x7bb984c6dbb9e279966afafda59c01d02627c804\":\"0x1b464311d45a6880000\",\"0x7bbbec5e70bdead8bb32b42805988e9648c0aa97\":\"0x3636d7af5ec98e0000\",\"0x7bca1da6c80a66baa5db5ac98541c4be276b447d\":\"0x24cf049680fa3c0000\",\"0x7bddb2ee98de19ee4c91f661ee8e67a91d054b97\":\"0x3635c9adc5dea00000\",\"0x7be2f7680c802da6154c92c0194ae732517a7169\":\"0xfc936392801c0000\",\"0x7be7f2456971883b9a8dbe4c91dec08ac34e8862\":\"0xa2a15d09519be00000\",\"0x7be8ccb4f11b66ca6e1d57c0b5396221a31ba53a\":\"0x1158e460913d00000\",\"0x7beb81fb2f5e91526b2ac9795e76c69bcff04bc0\":\"0xeb22e794f0a8d600000\",\"0x7c0883054c2d02bc7a852b1f86c42777d0d5c856\":\"0x1b1ae4d6e2ef500000\",\"0x7c0f5e072043c9ee740242197e78cc4b98cdf960\":\"0xad78ebc5ac6200000\",\"0x7c1df24a4f7fb2c7b472e0bb006cb27dcd164156\":\"0x3635c9adc5dea00000\",\"0x7c29d47d57a733f56b9b217063b513dc3b315923\":\"0xd8d726b7177a800000\",\"0x7c2b9603884a4f2e464eceb97d17938d828bc02c\":\"0xa2a15d09519be00000\",\"0x7c382c0296612e4e97e440e02d3871273b55f53b\":\"0xab640391201300000\",\"0x7c3eb713c4c9e0381cd8154c7c9a7db8645cde17\":\"0xad78ebc5ac6200000\",\"0x7c4401ae98f12ef6de39ae24cf9fc51f80eba16b\":\"0xad78ebc5ac6200000\",\"0x7c45f0f8442a56dbd39dbf159995415c52ed479b\":\"0x6c6b935b8bbd400000\",\"0x7c532db9e0c06c26fd40acc56ac55c1ee92d3c3a\":\"0x3f870857a3e0e3800000\",\"0x7c60a05f7a4a5f8cf2784391362e755a8341ef59\":\"0x6694f0182a37ae0000\",\"0x7c60e51f0be228e4d56fdd2992c814da7740c6bc\":\"0xad78ebc5ac6200000\",\"0x7c6924d07c3ef5891966fe0a7856c87bef9d2034\":\"0x6c6b935b8bbd400000\",\"0x7c8bb65a6fbb49bd413396a9d7e31053bbb37aa9\":\"0x14542ba12a337c00000\",\"0x7c9a110cb11f2598b2b20e2ca400325e41e9db33\":\"0x581767ba6189c400000\",\"0x7cbca88fca6a0060b960985c9aa1b02534dc2208\":\"0x19127a1391ea2a0000\",\"0x7cbeb99932e97e6e02058cfc62d0b26bc7cca52b\":\"0x6c6b935b8bbd400000\",\"0x7cc24a6a958c20c7d1249660f7586226950b0d9a\":\"0x6acb3df27e1f880000\",\"0x7cd20eccb518b60cab095b720f571570caaa447e\":\"0x1b1ae4d6e2ef500000\",\"0x7cd5d81eab37e11e6276a3a1091251607e0d7e38\":\"0x3684d5ef981f40000\",\"0x7cdf74213945953db39ad0e8a9781add792e4d1d\":\"0x6c6b935b8bbd400000\",\"0x7ce4686446f1949ebed67215eb0d5a1dd72c11b8\":\"0x7839d321b81ab80000\",\"0x7cef4d43aa417f9ef8b787f8b99d53f1fea1ee88\":\"0x678a932062e4180000\",\"0x7d0350e40b338dda736661872be33f1f9752d755\":\"0x2b4f5a6f191948000\",\"0x7d04d2edc058a1afc761d9c99ae4fc5c85d4c8a6\":\"0x42a9c4675c9467d00000\",\"0x7d0b255efb57e10f7008aa22d40e9752dfcf0378\":\"0x19f8e7559924c0000\",\"0x7d13d6705884ab2157dd8dcc7046caf58ee94be4\":\"0x1d0da07cbb3ee9c00000\",\"0x7d273e637ef1eac481119413b91c989dc5eac122\":\"0x1b1ae4d6e2ef500000\",\"0x7d2a52a7cf0c8436a8e007976b6c26b7229d1e15\":\"0x17bf06b32a241c0000\",\"0x7d34803569e00bd6b59fff081dfa5c0ab4197a62\":\"0x5cd87cb7b9fb860000\",\"0x7d34ff59ae840a7413c6ba4c5bb2ba2c75eab018\":\"0xa2a15d09519be00000\",\"0x7d392852f3abd92ff4bb5bb26cb60874f2be6795\":\"0x3636c25e66ece70000\",\"0x7d445267c59ab8d2a2d9e709990e09682580c49f\":\"0x3635c9adc5dea00000\",\"0x7d551397f79a2988b064afd0efebee802c7721bc\":\"0x857e0d6f1da76a00000\",\"0x7d5aa33fc14b51841a06906edb2bb49c2a117269\":\"0x104400a2470e680000\",\"0x7d5d2f73949dadda0856b206989df0078d51a1e5\":\"0x23c757072b8dd000000\",\"0x7d6e990daa7105de2526339833f77b5c0b85d84f\":\"0x43c33c1937564800000\",\"0x7d73863038ccca22f96affda10496e51e1e6cd48\":\"0x1158e460913d00000\",\"0x7d7dd5ee614dbb6fbfbcd26305247a058c41faa1\":\"0x6c6b935b8bbd400000\",\"0x7d7e7c61779adb7706c94d32409a2bb4e994bf60\":\"0x2ef20d9fc71a140000\",\"0x7d82e523cc2dc591da3954e8b6bb2caf6461e69c\":\"0x7d8dc2efffb1a90000\",\"0x7d858493f07415e0912d05793c972113eae8ae88\":\"0x628dd177d2bc280000\",\"0x7d901b28bf7f88ef73d8f73cca97564913ea8a24\":\"0x33c5499031720c0000\",\"0x7d980f4b566bb045517e4c14c87750de9346744b\":\"0x487a9a304539440000\",\"0x7d9c59631e2ba2e8e82891f3979922aaa3b567a1\":\"0x1b1ae4d6e2ef5000000\",\"0x7d9d221a3df89ddd7b5f61c1468c6787d6b333e6\":\"0x77b227cd83be80000\",\"0x7da7613445a21299aa74f0ad71431ec43fbb1be9\":\"0x3afb087b876900000\",\"0x7db4c7d5b797e9296e6382f203693db409449d62\":\"0x15af1d78b58c400000\",\"0x7db9eacc52e429dc83b461c5f4d86010e5383a28\":\"0x3635c9adc5dea00000\",\"0x7dd46da677e161825e12e80dc446f58276e1127c\":\"0x2c73c937742c500000\",\"0x7dd8d7a1a34fa1f8e73ccb005fc2a03a15b8229c\":\"0xad78ebc5ac6200000\",\"0x7ddd57165c87a2707f025dcfc2508c09834759bc\":\"0x4be4e7267b6ae00000\",\"0x7de442c82386154d2e993cbd1280bb7ca6b12ada\":\"0xd8f2e8247ec9480000\",\"0x7de7fe419cc61f91f408d234cc80d5ca3d054d99\":\"0x1158e460913d00000\",\"0x7dece6998ae1900dd3770cf4b93812bad84f0322\":\"0x56bc75e2d63100000\",\"0x7dfc342dffcf45dfee74f84c0995397bd1a63172\":\"0xd8d726b7177a80000\",\"0x7dfd2962b575bcbeee97f49142d63c30ab009f66\":\"0xd8d726b7177a800000\",\"0x7e1e29721d6cb91057f6c4042d8a0bbc644afe73\":\"0x8a9aba557e36c0000\",\"0x7e236666b2d06e63ea4e2ab84357e2dfc977e50e\":\"0x36356633ebd8ea0000\",\"0x7e24d9e22ce1da3ce19f219ccee523376873f367\":\"0x13fd9079caa60ff0000\",\"0x7e24fbdad290175eb2df6d180a19b9a9f41370be\":\"0x3635c9adc5dea00000\",\"0x7e268f131ddf687cc325c412f78ba961205e9112\":\"0x36364ee7d301b3c0000\",\"0x7e29290038493559194e946d4e460b96fc38a156\":\"0x10c13c527763880000\",\"0x7e2ba86da52e785d8625334f3397ba1c4bf2e8d1\":\"0xaadec983fcff40000\",\"0x7e3f63e13129a221ba1ab06326342cd98b5126ae\":\"0x56a02659a523340000\",\"0x7e47637e97c14622882be057bea229386f4052e5\":\"0x17da3a04c7b3e00000\",\"0x7e4e9409704121d1d77997026ff06ea9b19a8b90\":\"0x8d16549ed58fa40000\",\"0x7e59dc60be8b2fc19abd0a5782c52c28400bce97\":\"0x3635c9adc5dea00000\",\"0x7e5b19ae1be94ff4dee635492a1b012d14db0213\":\"0x56bc75e2d63100000\",\"0x7e5d9993104e4cb545e179a2a3f971f744f98482\":\"0x6c6b935b8bbd400000\",\"0x7e71171f2949fa0c3ac254254b1f0440e5e6a038\":\"0x22b1c8c1227a00000\",\"0x7e7c1e9a61a08a83984835c70ec31d34d3eaa87f\":\"0xa5aa85009e39c0000\",\"0x7e7f18a02eccaa5d61ab8fbf030343c434a25ef7\":\"0x39fbae8d042dd0000\",\"0x7e81f6449a03374191f3b7cb05d938b72e090dff\":\"0x56bc75e2d63100000\",\"0x7e8649e690fc8c1bfda1b5e186581f649b50fe33\":\"0x556f64c1fe7fa0000\",\"0x7e87863ec43a481df04d017762edcb5caa629b5a\":\"0x222c8eb3ff6640000\",\"0x7e8f96cc29f57b0975120cb593b7dd833d606b53\":\"0xaadec983fcff40000\",\"0x7e972a8a7c2a44c93b21436c38d21b9252c345fe\":\"0x61093d7c2c6d380000\",\"0x7e99dfbe989d3ba529d19751b7f4317f8953a3e2\":\"0x15af1d78b58c400000\",\"0x7ea0f96ee0a573a330b56897761f3d4c0130a8e3\":\"0x487a9a304539440000\",\"0x7ea791ebab0445a00efdfc4e4a8e9a7e7565136d\":\"0xfc936392801c0000\",\"0x7eaba035e2af3793fd74674b102540cf190addb9\":\"0x45026c835b60440000\",\"0x7eb4b0185c92b6439a08e7322168cb353c8a774a\":\"0x227196ca04983ca0000\",\"0x7ebd95e9c470f7283583dc6e9d2c4dce0bea8f84\":\"0x2f6f10780d22cc00000\",\"0x7ed0a5a847bef9a9da7cba1d6411f5c316312619\":\"0x228eb37e8751d0000\",\"0x7edafba8984baf631a820b6b92bbc2c53655f6bd\":\"0x6c6b935b8bbd400000\",\"0x7edb02c61a227287611ad950696369cc4e647a68\":\"0xeda838c4929080000\",\"0x7ee5ca805dce23af89c2d444e7e40766c54c7404\":\"0xd0bd412edbd820000\",\"0x7ee604c7a9dc2909ce321de6b9b24f5767577555\":\"0x12bf9c7985cf62d8000\",\"0x7ef16fd8d15b378a0fba306b8d03dd98fc92619f\":\"0x25f273933db5700000\",\"0x7ef98b52bee953bef992f305fda027f8911c5851\":\"0x1be722206996bc8000\",\"0x7efc90766a00bc52372cac97fabd8a3c831f8ecd\":\"0x890b0c2e14fb80000\",\"0x7efec0c6253caf397f71287c1c07f6c9582b5b86\":\"0x1a2cbcb84f30d58000\",\"0x7f01dc7c3747ca608f983dfc8c9b39e755a3b914\":\"0xb386cad5f7a5a0000\",\"0x7f0662b410298c99f311d3a1454a1eedba2fea76\":\"0xad78ebc5ac6200000\",\"0x7f06c89d59807fa60bc60136fcf814cbaf2543bd\":\"0x21e19e0c9bab2400000\",\"0x7f0b90a1fdd48f27b268feb38382e55ddb50ef0f\":\"0x32f51edbaaa3300000\",\"0x7f0ec3db804692d4d1ea3245365aab0590075bc4\":\"0xd8d726b7177a800000\",\"0x7f0f04fcf37a53a4e24ede6e93104e78be1d3c9e\":\"0x6c6b935b8bbd400000\",\"0x7f13d760498d7193ca6859bc95c901386423d76c\":\"0x10f0cf064dd59200000\",\"0x7f150afb1a77c2b45928c268c1e9bdb4641d47d8\":\"0x6c6b935b8bbd400000\",\"0x7f1619988f3715e94ff1d253262dc5581db3de1c\":\"0x30ca024f987b900000\",\"0x7f1c81ee1697fc144b7c0be5493b5615ae7fddca\":\"0x1b1dab61d3aa640000\",\"0x7f2382ffd8f83956467937f9ba72374623f11b38\":\"0x2086ac351052600000\",\"0x7f3709391f3fbeba3592d175c740e87a09541d02\":\"0x1a055690d9db800000\",\"0x7f389c12f3c6164f6446566c77669503c2792527\":\"0x556f64c1fe7fa0000\",\"0x7f3a1e45f67e92c880e573b43379d71ee089db54\":\"0x152d02c7e14af6800000\",\"0x7f3d7203c8a447f7bf36d88ae9b6062a5eee78ae\":\"0x14542ba12a337c00000\",\"0x7f46bb25460dd7dae4211ca7f15ad312fc7dc75c\":\"0x16a6502f15a1e540000\",\"0x7f49e7a4269882bd8722d4a6f566347629624079\":\"0x6c6b935b8bbd400000\",\"0x7f49f20726471ac1c7a83ef106e9775ceb662566\":\"0x14061b9d77a5e980000\",\"0x7f4b5e278578c046cceaf65730a0e068329ed5b6\":\"0x65ea3db75546600000\",\"0x7f4f593b618c330ba2c3d5f41eceeb92e27e426c\":\"0x966edc756b7cfc0000\",\"0x7f541491d2ac00d2612f94aa7f0bcb014651fbd4\":\"0x14620c57dddae00000\",\"0x7f5ae05ae0f8cbe5dfe721f044d7a7bef4c27997\":\"0x340aad21b3b700000\",\"0x7f603aec1759ea5f07c7f8d41a1428fbbaf9e762\":\"0x1158e460913d00000\",\"0x7f616c6f008adfa082f34da7d0650460368075fb\":\"0x3635c9adc5dea00000\",\"0x7f61fa6cf5f898b440dac5abd8600d6d691fdef9\":\"0xf2dc7d47f15600000\",\"0x7f655c6789eddf455cb4b88099720639389eebac\":\"0x14542ba12a337c00000\",\"0x7f6b28c88421e4857e459281d78461692489d3fb\":\"0x6c6b935b8bbd400000\",\"0x7f6efb6f4318876d2ee624e27595f44446f68e93\":\"0x54069233bf7f780000\",\"0x7f7192c0df1c7db6d9ed65d71184d8e4155a17ba\":\"0x453728d33942c0000\",\"0x7f7a3a21b3f5a65d81e0fcb7d52dd00a1aa36dba\":\"0x56bc75e2d63100000\",\"0x7f8dbce180ed9c563635aad2d97b4cbc428906d9\":\"0x90f534608a72880000\",\"0x7f993ddb7e02c282b898f6155f680ef5b9aff907\":\"0x43c33c1937564800000\",\"0x7f9f9b56e4289dfb58e70fd5f12a97b56d35c6a5\":\"0x6acb3df27e1f880000\",\"0x7fa37ed67887751a471f0eb306be44e0dbcd6089\":\"0x3976747fe11a100000\",\"0x7faa30c31519b584e97250ed2a3cf3385ed5fd50\":\"0x6c6b935b8bbd400000\",\"0x7fcf5ba6666f966c5448c17bf1cb0bbcd8019b06\":\"0x56bc3d0aebe498000\",\"0x7fd679e5fb0da2a5d116194dcb508318edc580f3\":\"0x1639e49bba162800000\",\"0x7fdba031c78f9c096d62d05a369eeab0bccc55e5\":\"0x97c9ce4cf6d5c00000\",\"0x7fdbc3a844e40d96b2f3a635322e6065f4ca0e84\":\"0x6c6b935b8bbd400000\",\"0x7fdfc88d78bf1b285ac64f1adb35dc11fcb03951\":\"0x7c06fda02fb0360000\",\"0x7fea1962e35d62059768c749bedd96cab930d378\":\"0x6c6b935b8bbd400000\",\"0x7fef8c38779fb307ec6f044bebe47f3cfae796f1\":\"0x92340f86cf09e8000\",\"0x7ff0c63f70241bece19b737e5341b12b109031d8\":\"0x12c1b6eed03d280000\",\"0x7ffabfbc390cbe43ce89188f0868b27dcb0f0cad\":\"0x1595182224b26480000\",\"0x7ffd02ed370c7060b2ae53c078c8012190dfbb75\":\"0x21e19e0c9bab2400000\",\"0x80022a1207e910911fc92849b069ab0cdad043d3\":\"0xb98bc829a6f90000\",\"0x8009a7cbd192b3aed4adb983d5284552c16c7451\":\"0xd8d726b7177a800000\",\"0x800e7d631c6e573a90332f17f71f5fd19b528cb9\":\"0x83d6c7aab63600000\",\"0x80156d10efa8b230c99410630d37e269d4093cea\":\"0x6c6b935b8bbd400000\",\"0x801732a481c380e57ed62d6c29de998af3fa3b13\":\"0x56bc75e2d63100000\",\"0x801d65c518b11d0e3f4f470221417013c8e53ec5\":\"0xd8d726b7177a800000\",\"0x8026435aac728d497b19b3e7e57c28c563954f2b\":\"0x5dc892aa1131c80000\",\"0x802dc3c4ff2d7d925ee2859f4a06d7ba60f1308c\":\"0x550940c8fd34c0000\",\"0x8030b111c6983f0485ddaca76224c6180634789f\":\"0x4563918244f400000\",\"0x8035bcffaefdeeea35830c497d14289d362023de\":\"0x1043561a8829300000\",\"0x8035fe4e6b6af27ae492a578515e9d39fa6fa65b\":\"0xd8d726b7177a800000\",\"0x8043ed22f997e5a2a4c16e364486ae64975692c4\":\"0x3d4904ffc9112e8000\",\"0x8043fdd0bc4c973d1663d55fc135508ec5d4f4fa\":\"0x1158e460913d00000\",\"0x804ca94972634f633a51f3560b1d06c0b293b3b1\":\"0xad78ebc5ac6200000\",\"0x80522ddf944ec52e27d724ed4c93e1f7be6083d6\":\"0xad78ebc5ac6200000\",\"0x80591a42179f34e64d9df75dcd463b28686f5574\":\"0x43c33c1937564800000\",\"0x805ce51297a0793b812067f017b3e7b2df9bb1f9\":\"0x56bc75e2d63100000\",\"0x805d846fb0bc02a7337226d685be9ee773b9198a\":\"0x43c30fb0884a96c0000\",\"0x8063379a7bf2cb923a84c5093e68dac7f75481c5\":\"0x1176102e6e32df0000\",\"0x806854588ecce541495f81c28a290373df0274b2\":\"0x1f8cdf5c6e8d580000\",\"0x806f44bdeb688037015e84ff218049e382332a33\":\"0x6c5db2a4d815dc0000\",\"0x80744618de396a543197ee4894abd06398dd7c27\":\"0x6c6b935b8bbd400000\",\"0x8077c3e4c445586e094ce102937fa05b737b568c\":\"0x56bc75e2d63100000\",\"0x80907f593148b57c46c177e23d25abc4aae18361\":\"0x56bc75e2d63100000\",\"0x80977316944e5942e79b0e3abad38da746086519\":\"0x21a754a6dc5280000\",\"0x80a0f6cc186cf6201400736e065a391f52a9df4a\":\"0x21e19e0c9bab2400000\",\"0x80abec5aa36e5c9d098f1b942881bd5acac6963d\":\"0x6c6b935b8bbd400000\",\"0x80b23d380b825c46e0393899a85556462da0e18c\":\"0x6c6b935b8bbd400000\",\"0x80b42de170dbd723f454e88f7716452d92985092\":\"0x104623c0762dd10000\",\"0x80b79f338390d1ba1b3737a29a0257e5d91e0731\":\"0x1158e460913d00000\",\"0x80bf995ed8ba92701d10fec49f9e7d014dbee026\":\"0x1f0437ca1a7e128000\",\"0x80c04efd310f440483c73f744b5b9e64599ce3ec\":\"0x410d586a20a4c00000\",\"0x80c3a9f695b16db1597286d1b3a8b7696c39fa27\":\"0x56bc75e2d63100000\",\"0x80c53ee7e3357f94ce0d7868009c208b4a130125\":\"0x6c6b935b8bbd400000\",\"0x80cc21bd99f39005c58fe4a448909220218f66cb\":\"0x3636c9796436740000\",\"0x80d5c40c59c7f54ea3a55fcfd175471ea35099b3\":\"0x3635c9adc5dea00000\",\"0x80da2fdda29a9e27f9e115975e69ae9cfbf3f27e\":\"0xad78ebc5ac6200000\",\"0x80e7b3205230a566a1f061d922819bb4d4d2a0e1\":\"0x2f6f10780d22cc00000\",\"0x80ea1acc136eca4b68c842a95adf6b7fee7eb8a2\":\"0xd8d726b7177a800000\",\"0x80f07ac09e7b2c3c0a3d1e9413a544c73a41becb\":\"0x1158e460913d00000\",\"0x810db25675f45ea4c7f3177f37ce29e22d67999c\":\"0xad78ebc5ac6200000\",\"0x81139bfdcca656c430203f72958c543b6580d40c\":\"0x6c6b935b8bbd400000\",\"0x811461a2b0ca90badac06a9ea16e787b33b196cc\":\"0x8e3f50b173c100000\",\"0x81164deb10814ae08391f32c08667b6248c27d7a\":\"0x155bd9307f9fe80000\",\"0x81186931184137d1192ac88cd3e1e5d0fdb86a74\":\"0x9d3595ab2438d00000\",\"0x812a55c43caedc597218379000ce510d548836fd\":\"0xfc936392801c0000\",\"0x812ea7a3b2c86eed32ff4f2c73514cc63bacfbce\":\"0x3635c9adc5dea00000\",\"0x8134dd1c9df0d6c8a5812426bb55c761ca831f08\":\"0x6a2160bb57ccc0000\",\"0x814135da8f9811075783bf1ab67062af8d3e9f40\":\"0x1158e460913d00000\",\"0x81498ca07b0f2f17e8bbc7e61a7f4ae7be66b78b\":\"0x581fbb5b33bb00000\",\"0x81556db27349ab8b27004944ed50a46e941a0f5f\":\"0xd8bb6549b02bb80000\",\"0x8155fa6c51eb31d808412d748aa086105018122f\":\"0x65ea3db75546600000\",\"0x8156360bbd370961ceca6b6691d75006ad204cf2\":\"0x878678326eac9000000\",\"0x8161d940c3760100b9080529f8a60325030f6edc\":\"0x1043561a8829300000\",\"0x8164e78314ae16b28926cc553d2ccb16f356270d\":\"0x1ca134e95fb32c80000\",\"0x8165cab0eafb5a328fc41ac64dae715b2eef2c65\":\"0x3635c9adc5dea00000\",\"0x8168edce7f2961cf295b9fcd5a45c06cdeda6ef5\":\"0xad78ebc5ac6200000\",\"0x816d9772cf11399116cc1e72c26c6774c9edd739\":\"0xad78ebc5ac6200000\",\"0x8173c835646a672e0152be10ffe84162dd256e4c\":\"0x1aabdf2145b4300000\",\"0x817493cd9bc623702a24a56f9f82e3fd48f3cd31\":\"0x9e4b23f12d4ca00000\",\"0x8179c80970182cc5b7d82a4df06ea94db63a25f3\":\"0x276f259de66bf40000\",\"0x817ac33bd8f847567372951f4a10d7a91ce3f430\":\"0xad7c406c66dc18000\",\"0x818ffe271fc3973565c303f213f6d2da89897ebd\":\"0x136e05342fee1b98000\",\"0x8197948121732e63d9c148194ecad46e30b749c8\":\"0xd8d726b7177a800000\",\"0x819af9a1c27332b1c369bbda1b3de1c6e933d640\":\"0x1109e654b98f7a0000\",\"0x819cdaa5303678ef7cec59d48c82163acc60b952\":\"0x31351545f79816c0000\",\"0x819eb4990b5aba5547093da12b6b3c1093df6d46\":\"0x3635c9adc5dea00000\",\"0x81a88196fac5f23c3e12a69dec4b880eb7d97310\":\"0x6c6b935b8bbd400000\",\"0x81bccbff8f44347eb7fca95b27ce7c952492aaad\":\"0x840c12165dd780000\",\"0x81bd75abd865e0c3f04a0b4fdbcb74d34082fbb7\":\"0xd8d726b7177a800000\",\"0x81c18c2a238ddc4cba230a072dd7dc101e620273\":\"0x487a9a304539440000\",\"0x81c9e1aee2d3365d53bcfdcd96c7c538b0fd7eec\":\"0x62a992e53a0af00000\",\"0x81cfad760913d3c322fcc77b49c2ae3907e74f6e\":\"0xaadec983fcff40000\",\"0x81d619ff5726f2405f12904c72eb1e24a0aaee4f\":\"0x43c33c1937564800000\",\"0x81efe296ae76c860d1c5fbd33d47e8ce9996d157\":\"0x3635c9adc5dea00000\",\"0x81f8de2c283d5fd4afbda85dedf9760eabbbb572\":\"0xa2a15d09519be00000\",\"0x820c19291196505b65059d9914b7090be1db87de\":\"0x796e3ea3f8ab00000\",\"0x821cb5cd05c7ef909fe1be60733d8963d760dc41\":\"0xd8d726b7177a800000\",\"0x821d798af19989c3ae5b84a7a7283cd7fda1fabe\":\"0x43c33c1937564800000\",\"0x821eb90994a2fbf94bdc3233910296f76f9bf6e7\":\"0x21e19e0c9bab2400000\",\"0x82249fe70f61c6b16f19a324840fdc020231bb02\":\"0x20336b08a93635b0000\",\"0x8228ebc087480fd64547ca281f5eace3041453b9\":\"0x6acb3df27e1f880000\",\"0x8229ceb9f0d70839498d44e6abed93c5ca059f5d\":\"0x1a1c1b3c989a20100000\",\"0x822edff636563a6106e52e9a2598f7e6d0ef2782\":\"0x1f4f9693d42d38000\",\"0x823219a25976bb2aa4af8bad41ac3526b493361f\":\"0x6c6b935b8bbd400000\",\"0x8232d1f9742edf8dd927da353b2ae7b4cbce7592\":\"0x243d4d18229ca20000\",\"0x8234f463d18485501f8f85ace4972c9b632dbccc\":\"0x6c6b935b8bbd400000\",\"0x823768746737ce6da312d53e54534e106f967cf3\":\"0x1158e460913d00000\",\"0x823ba7647238d113bce9964a43d0a098118bfe4d\":\"0xad78ebc5ac6200000\",\"0x824074312806da4748434266ee002140e3819ac2\":\"0x51b1d3839261ac0000\",\"0x82438fd2b32a9bdd674b49d8cc5fa2eff9781847\":\"0x1158e460913d00000\",\"0x82485728d0e281563758c75ab27ed9e882a0002d\":\"0x7f808e9291e6c0000\",\"0x824b3c3c443e19295d7ef6faa7f374a4798486a8\":\"0x1158e460913d00000\",\"0x8251358ca4e060ddb559ca58bc0bddbeb4070203\":\"0x6c6b935b8bbd400000\",\"0x825135b1a7fc1605614c8aa4d0ac6dbad08f480e\":\"0x4d853c8f8908980000\",\"0x825309a7d45d1812f51e6e8df5a7b96f6c908887\":\"0x8034f7d9b166d40000\",\"0x825a7f4e10949cb6f8964268f1fa5f57e712b4c4\":\"0x1158e460913d00000\",\"0x8261fa230c901d43ff579f4780d399f31e6076bc\":\"0x6c6b935b8bbd400000\",\"0x8262169b615870134eb4ac6c5f471c6bf2f789fc\":\"0x19127a1391ea2a0000\",\"0x8263ece5d709e0d7ae71cca868ed37cd2fef807b\":\"0x35ab028ac154b80000\",\"0x826ce5790532e0548c6102a30d3eac836bd6388f\":\"0x3cfc82e37e9a7400000\",\"0x826eb7cd7319b82dd07a1f3b409071d96e39677f\":\"0x3635c9adc5dea00000\",\"0x827531a6c5817ae35f82b00b9754fcf74c55e232\":\"0xc328093e61ee400000\",\"0x8275cd684c3679d5887d03664e338345dc3cdde1\":\"0xdb44e049bb2c0000\",\"0x8284923b62e68bbf7c2b9f3414d13ef6c812a904\":\"0xd255d112e103a00000\",\"0x828ba651cb930ed9787156299a3de44cd08b7212\":\"0x487a9a304539440000\",\"0x82a15cef1d6c8260eaf159ea3f0180d8677dce1c\":\"0x6c6b935b8bbd400000\",\"0x82a8b96b6c9e13ebec1e9f18ac02a60ea88a48ff\":\"0x6c6b8c408e73b30000\",\"0x82a8cbbfdff02b2e38ae4bbfca15f1f0e83b1aea\":\"0x49b991c27ef6d8000\",\"0x82e4461eb9d849f0041c1404219e4272c4900ab4\":\"0x6c6b935b8bbd400000\",\"0x82e577b515cb2b0860aafe1ce09a59e09fe7d040\":\"0x2086ac351052600000\",\"0x82ea01e3bf2e83836e71704e22a2719377efd9c3\":\"0xa4cc799563c3800000\",\"0x82f2e991fd324c5f5d17768e9f61335db6319d6c\":\"0x1b1ae4d6e2ef500000\",\"0x82f39b2758ae42277b86d69f75e628d958ebcab0\":\"0x878678326eac9000000\",\"0x82f854c9c2f087dffa985ac8201e626ca5467686\":\"0x152d02c7e14af6800000\",\"0x82ff716fdf033ec7e942c909d9831867b8b6e2ef\":\"0x61093d7c2c6d380000\",\"0x8308ed0af7f8a3c1751fafc877b5a42af7d35882\":\"0x3635c9adc5dea00000\",\"0x831c44b3084047184b2ad218680640903750c45d\":\"0x6acb3df27e1f880000\",\"0x83210583c16a4e1e1dac84ebd37e3d0f7c57eba4\":\"0x6c6b935b8bbd400000\",\"0x832c54176bdf43d2c9bcd7b808b89556b89cbf31\":\"0xad78ebc5ac6200000\",\"0x833316985d47742bfed410604a91953c05fb12b0\":\"0x6c6b935b8bbd400000\",\"0x8334764b7b397a4e578f50364d60ce44899bff94\":\"0x503b203e9fba20000\",\"0x833b6a8ec8da408186ac8a7d2a6dd61523e7ce84\":\"0x3635c9adc5dea000000\",\"0x833d3fae542ad5f8b50ce19bde2bec579180c88c\":\"0x12c1b6eed03d280000\",\"0x833db42c14163c7be4cab86ac593e06266d699d5\":\"0x24e40d2b6943ef900000\",\"0x83563bc364ed81a0c6da3b56ff49bbf267827a9c\":\"0x3ab91d17b20de500000\",\"0x837a645dc95c49549f899c4e8bcf875324b2f57c\":\"0x208c394af1c8880000\",\"0x838bd565f99fde48053f7917fe333cf84ad548ab\":\"0xad78ebc5ac6200000\",\"0x83908aa7478a6d1c9b9b0281148f8f9f242b9fdc\":\"0x6c6b935b8bbd400000\",\"0x8392e53776713578015bff4940cf43849d7dcba1\":\"0x84df0355d56170000\",\"0x8397a1bc47acd647418159b99cea57e1e6532d6e\":\"0x1f10fa827b550b40000\",\"0x8398e07ebcb4f75ff2116de77c1c2a99f303a4cf\":\"0x1b1ae4d6e2ef500000\",\"0x83a3148833d9644984f7c475a7850716efb480ff\":\"0xb8507a820728200000\",\"0x83a402438e0519773d5448326bfb61f8b20cf52d\":\"0x52663ccab1e1c00000\",\"0x83a93b5ba41bf88720e415790cdc0b67b4af34c4\":\"0xad78ebc5ac6200000\",\"0x83c23d8a502124ee150f08d71dc6727410a0f901\":\"0x7331f3bfe661b180000\",\"0x83c897a84b695eebe46679f7da19d776621c2694\":\"0x1b1ae4d6e2ef500000\",\"0x83d532d38d6dee3f60adc68b936133c7a2a1b0dd\":\"0x1b1ae4d6e2ef500000\",\"0x83dbf8a12853b40ac61996f8bf1dc8fdbaddd329\":\"0x34957444b840e80000\",\"0x83dbfd8eda01d0de8e158b16d0935fc2380a5dc7\":\"0x2086ac351052600000\",\"0x83e48055327c28b5936fd9f4447e73bdb2dd3376\":\"0x90f534608a72880000\",\"0x83fe5a1b328bae440711beaf6aad6026eda6d220\":\"0x43c33c1937564800000\",\"0x84008a72f8036f3feba542e35078c057f32a8825\":\"0x56bc75e2d63100000\",\"0x840ec83ea93621f034e7bb3762bb8e29ded4c479\":\"0x878678326eac900000\",\"0x841145b44840c946e21dbc190264b8e0d5029369\":\"0x3f870857a3e0e3800000\",\"0x84232107932b12e03186583525ce023a703ef8d9\":\"0x6c6b935b8bbd400000\",\"0x84244fc95a6957ed7c1504e49f30b8c35eca4b79\":\"0x6c6b935b8bbd400000\",\"0x8431277d7bdd10457dc017408c8dbbbd414a8df3\":\"0x222c8eb3ff6640000\",\"0x84375afbf59b3a1d61a1be32d075e0e15a4fbca5\":\"0xad78ebc5ac6200000\",\"0x843bd3502f45f8bc4da370b323bdac3fcf5f19a6\":\"0x50039d63d11c900000\",\"0x84503334630d77f74147f68b2e086613c8f1ade9\":\"0x56bc75e2d631000000\",\"0x845203750f7148a9aa262921e86d43bf641974fd\":\"0x56bc75e2d63100000\",\"0x8461ecc4a6a45eb1a5b947fb86b88069b91fcd6f\":\"0x6c6b935b8bbd400000\",\"0x84675e9177726d45eaa46b3992a340ba7f710c95\":\"0x3635c9adc5dea00000\",\"0x84686c7bad762c54b667d59f90943cd14d117a26\":\"0x1158e460913d00000\",\"0x8489f6ad1d9a94a297789156899db64154f1dbb5\":\"0x137407c03c8c268000\",\"0x848c994a79003fe7b7c26cc63212e1fc2f9c19eb\":\"0x6c6b935b8bbd400000\",\"0x848fbd29d67cf4a013cb02a4b176ef244e9ee68d\":\"0x1172a636bbdc20000\",\"0x84949dba559a63bfc845ded06e9f2d9b7f11ef24\":\"0x6c6b935b8bbd400000\",\"0x849ab80790b28ff1ffd6ba394efc7463105c36f7\":\"0x1e02be4ae6c840000\",\"0x849b116f596301c5d8bb62e0e97a8248126e39f3\":\"0x1043561a8829300000\",\"0x84a74ceecff65cb93b2f949d773ef1ad7fb4a245\":\"0x50a9b444685c70000\",\"0x84aac7fa197ff85c30e03b7a5382b957f41f3afb\":\"0x88b23acffd9900000\",\"0x84af1b157342d54368260d17876230a534b54b0e\":\"0x35659ef93f0fc40000\",\"0x84b0ee6bb837d3a4c4c5011c3a228c0edab4634a\":\"0x1158e460913d00000\",\"0x84b4b74e6623ba9d1583e0cfbe49643f16384149\":\"0x1158e460913d00000\",\"0x84b6b6adbe2f5b3e2d682c66af1bc4905340c3ed\":\"0x2192f8d22215008000\",\"0x84b91e2e2902d05e2b591b41083bd7beb2d52c74\":\"0x215e5128b4504648000\",\"0x84bcbf22c09607ac84341d2edbc03bfb1739d744\":\"0x1b1ae4d6e2ef500000\",\"0x84bfcef0491a0ae0694b37ceac024584f2aa0467\":\"0x6c6acc67d7b1d40000\",\"0x84cb7da0502df45cf561817bbd2362f451be02da\":\"0x487a9a304539440000\",\"0x84cc7878da605fdb019fab9b4ccfc157709cdda5\":\"0x48798513af04c90000\",\"0x84db1459bb00812ea67ecb3dc189b72187d9c501\":\"0x811b8fbda85ab8000\",\"0x84e9949680bece6841b9a7e5250d08acd87d16cd\":\"0xad78ebc5ac6200000\",\"0x84e9cf8166c36abfa49053b7a1ad4036202681ef\":\"0x6c6b935b8bbd400000\",\"0x84ec06f24700fe42414cb9897c154c88de2f6132\":\"0x487a9a304539440000\",\"0x84f522f0520eba52dd18ad21fa4b829f2b89cb97\":\"0x10c5106d5134f130000\",\"0x850b9db18ff84bf0c7da49ea3781d92090ad7e64\":\"0x8cf23f909c0fa00000\",\"0x8510ee934f0cbc900e1007eb38a21e2a5101b8b2\":\"0x5bf0ba6634f680000\",\"0x8516fcaf77c893970fcd1a958ba9a00e49044019\":\"0xaa3eb1691bce58000\",\"0x851aa91c82f42fad5dd8e8bb5ea69c8f3a5977d1\":\"0x80e561f2578798000\",\"0x851c0d62be4635d4777e8035e37e4ba8517c6132\":\"0x1b1ae4d6e2ef500000\",\"0x851dc38adb4593729a76f33a8616dab6f5f59a77\":\"0x56bc75e2d63100000\",\"0x8532490897bbb4ce8b7f6b837e4cba848fbe9976\":\"0x56bc75e2d63100000\",\"0x853e6abaf44469c72f151d4e223819aced4e3728\":\"0x6c6b935b8bbd400000\",\"0x854691ce714f325ced55ce5928ce9ba12facd1b8\":\"0xed70b5e9c3f2f00000\",\"0x854c0c469c246b83b5d1b3eca443b39af5ee128a\":\"0x56bc75e2d631000000\",\"0x855d9aef2c39c6230d09c99ef6494989abe68785\":\"0x8ba52e6fc45e40000\",\"0x8563c49361b625e768771c96151dbfbd1c906976\":\"0x6c6b935b8bbd400000\",\"0x8566610901aace38b83244f3a9c831306a67b9dc\":\"0xb08213bcf8ffe00000\",\"0x856aa23c82d7215bec8d57f60ad75ef14fa35f44\":\"0x43c33c1937564800000\",\"0x856e5ab3f64c9ab56b009393b01664fc0324050e\":\"0x61093d7c2c6d380000\",\"0x856eb204241a87830fb229031343dc30854f581a\":\"0x3635c9adc5dea00000\",\"0x85732c065cbd64119941aed430ac59670b6c51c4\":\"0x27a57362ab0a0e8000\",\"0x8578e10212ca14ff0732a8241e37467db85632a9\":\"0x14542ba12a337c00000\",\"0x8579dadf1a395a3471e20b6f763d9a0ff19a3f6f\":\"0xd8d726b7177a800000\",\"0x857f100b1a5930225efc7e9020d78327b41c02cb\":\"0x6c6b935b8bbd400000\",\"0x85946d56a4d371a93368539690b60ec825107454\":\"0x5dc892aa1131c80000\",\"0x8599cbd5a6a9dcd4b966be387d69775da5e33c6f\":\"0xc51f1b1d52622900000\",\"0x859c600cf13d1d0273d5d1da3cd789e495899f27\":\"0x90f534608a72880000\",\"0x85a2f6ea94d05e8c1d9ae2f4910338a358e98ded\":\"0x6c6b935b8bbd400000\",\"0x85b16f0b8b34dff3804f69e2168a4f7b24d1042b\":\"0x112f423c7646d40000\",\"0x85b2998d0c73302cb2ba13f489313301e053be15\":\"0x21e19e0c9bab2400000\",\"0x85bb51bc3bfe9a1b2a2f6b1cda95bca8b38c8d5e\":\"0x11712da04ba1ef0000\",\"0x85c8f3cc7a354feac99a5e7bfe7cdfa351cfe355\":\"0x15af1d78b58c400000\",\"0x85ca1e727e9d1a87991cc2c41840ebb9edf21d1b\":\"0xb98bc829a6f90000\",\"0x85ca8bc6da2803d0725f5e1a456c89f9bc774e2f\":\"0x2086ac351052600000\",\"0x85d0d88754ac84b8b21ba93dd2bfec72626faba8\":\"0x3635c9adc5dea00000\",\"0x85eb256b51c819d60ea61a82d12c9358d59c1cae\":\"0x18efc84ad0c7b00000\",\"0x85f0e7c1e3aff805a627a2aaf2cff6b4c0dbe9cb\":\"0x1158e460913d00000\",\"0x86026cad3fe4ea1ce7fca260d3d45eb09ea6a364\":\"0xad78ebc5ac6200000\",\"0x860f5ffc10de767ded807f71e861d647dfd219b1\":\"0x21e19e0c9bab2400000\",\"0x86153063a1ae7f02f1a88136d4d69c7c5e3e4327\":\"0x3635c9adc5dea00000\",\"0x86245f596691093ece3f3d3ca2263eace81941d9\":\"0xa31062beeed700000\",\"0x862569211e8c6327b5415e3a67e5738b15baaf6e\":\"0x796e3ea3f8ab00000\",\"0x86297d730fe0f7a9ee24e08fb1087b31adb306a7\":\"0x6c6b935b8bbd400000\",\"0x8644cc281be332ccced36da483fb2a0746d9ba2e\":\"0x15af1d78b58c400000\",\"0x86499a1228ff2d7ee307759364506f8e8c8307a5\":\"0x6acb3df27e1f880000\",\"0x864bec5069f855a4fd5892a6c4491db07c88ff7c\":\"0x3635c9adc5dea00000\",\"0x86570ab259c9b1c32c9729202f77f590c07dd612\":\"0xad78ebc5ac6200000\",\"0x8663a241a0a89e70e182c845e2105c8ad7264bcf\":\"0x323b13d8398f3238000\",\"0x8667fa1155fed732cfb8dca5a0d765ce0d0705ed\":\"0x46ec965c393b10000\",\"0x8668af868a1e98885f937f2615ded6751804eb2d\":\"0x1158e460913d00000\",\"0x86740a46648e845a5d96461b18091ff57be8a16f\":\"0x14c0973485bf39400000\",\"0x867eba56748a5904350d2ca2a5ce9ca00b670a9b\":\"0x43c33c1937564800000\",\"0x86806474c358047d9406e6a07f40945bc8328e67\":\"0x1752eb0f7013d100000\",\"0x86883d54cd3915e549095530f9ab1805e8c5432d\":\"0xd8d726b7177a800000\",\"0x868c23be873466d4c74c220a19b245d1787e807f\":\"0x4a13bbbd92c88e8000\",\"0x86924fb211aad23cf5ce600e0aae806396444087\":\"0x21e19e0c9bab2400000\",\"0x8693e9b8be94425eef7969bc69f9d42f7cad671e\":\"0x3637096c4bcc690000\",\"0x869f1aa30e4455beb1822091de5cadec79a8f946\":\"0x1b1ae4d6e2ef5000000\",\"0x86a1eadeeb30461345d9ef6bd05216fa247c0d0c\":\"0x6c6b935b8bbd400000\",\"0x86a5f8259ed5b09e188ce346ee92d34aa5dd93fa\":\"0xad78ebc5ac6200000\",\"0x86b7bd563ceab686f96244f9ddc02ad7b0b14bc2\":\"0x21e19e0c9bab2400000\",\"0x86c28b5678af37d727ec05e4447790f15f71f2ea\":\"0xad78ebc5ac6200000\",\"0x86c4ce06d9ac185bb148d96f7b7abe73f441006d\":\"0x21e19e0c9bab2400000\",\"0x86c8d0d982b539f48f9830f9891f9d607a942659\":\"0x2ced37761824fb00000\",\"0x86c934e38e53be3b33f274d0539cfca159a4d0d1\":\"0x34957444b840e80000\",\"0x86ca0145957e6b0dfe36875fbe7a0dec55e17a28\":\"0x21e19e0c9bab2400000\",\"0x86caafacf32aa0317c032ac36babed974791dc03\":\"0x878678326eac9000000\",\"0x86cdb7e51ac44772be3690f61d0e59766e8bfc18\":\"0xd8d726b7177a800000\",\"0x86df73bd377f2c09de63c45d67f283eaefa0f4ab\":\"0x3635c9adc5dea00000\",\"0x86e3fe86e93da486b14266eadf056cbfa4d91443\":\"0x6c6b935b8bbd400000\",\"0x86e8670e27598ea09c3899ab7711d3b9fe901c17\":\"0xad78ebc5ac6200000\",\"0x86ef6426211949cc37f4c75e7850369d0cf5f479\":\"0x2d65f32ea045af60000\",\"0x86f05d19063e9369c6004eb3f123943a7cff4eab\":\"0x6c6acc67d7b1d40000\",\"0x86f23e9c0aafc78b9c404dcd60339a925bffa266\":\"0x15af1d78b58c400000\",\"0x86f4f40ad984fbb80933ae626e0e42f9333fdd41\":\"0x3635c9adc5dea00000\",\"0x86f95c5b11a293940e35c0b898d8b75f08aab06d\":\"0x644e3e875fccf740000\",\"0x86fff220e59305c09f483860d6f94e96fbe32f57\":\"0x2535b6ab4c0420000\",\"0x870796abc0db84af82da52a0ed68734de7e636f5\":\"0x1043561a8829300000\",\"0x870f15e5df8b0eabd02569537a8ef93b56785c42\":\"0x150894e849b3900000\",\"0x87183160d172d2e084d327b86bcb7c1d8e6784ef\":\"0xd8d8583fa2d52f0000\",\"0x871b8a8b51dea1989a5921f13ec1a955a515ad47\":\"0x1b1ae4d6e2ef5000000\",\"0x8725e8c753b3acbfdca55f3c62dfe1a59454968a\":\"0x3637096c4bcc690000\",\"0x8737dae671823a8d5917e0157ace9c43468d946b\":\"0x6c6acc67d7b1d40000\",\"0x873b7f786d3c99ff012c4a7cae2677270240b9c5\":\"0x5dc892aa1131c80000\",\"0x873c6f70efb6b1d0f2bbc57eebcd70617c6ce662\":\"0x36f0d5275d09570000\",\"0x873e49135c3391991060290aa7f6ccb8f85a78db\":\"0x1158e460913d00000\",\"0x875061ee12e820041a01942cb0e65bb427b00060\":\"0x97c9ce4cf6d5c00000\",\"0x87584a3f613bd4fac74c1e780b86d6caeb890cb2\":\"0x5c283d410394100000\",\"0x8764d02722000996ecd475b433298e9f540b05bf\":\"0xad78ebc5ac6200000\",\"0x876c3f218b4776df3ca9dbfb270de152d94ed252\":\"0x56bc75e2d63100000\",\"0x8775a610c502b9f1e6ad4cdadb8ce29bff75f6e4\":\"0x2086ac351052600000\",\"0x87764e3677eef604cbc59aed24abdc566b09fc25\":\"0xa2a15d09519be00000\",\"0x8787d12677a5ec291e57e31ffbfad105c3324b87\":\"0x2a24eb53208f3128000\",\"0x8794bf47d54540ece5c72237a1ffb511ddb74762\":\"0x6c6b935b8bbd400000\",\"0x87a53ea39f59a35bada8352521645594a1a714cb\":\"0x678a932062e4180000\",\"0x87a7c508ef71582dd9a54372f89cb01f252fb180\":\"0xad78ebc5ac6200000\",\"0x87af25d3f6f8eea15313d5fe4557e810c524c083\":\"0x42bf06b78ed3b500000\",\"0x87b10f9c280098179a2b76e9ce90be61fc844d0d\":\"0x487a9a304539440000\",\"0x87bf7cd5d8a929e1c785f9e5449106ac232463c9\":\"0x437b11fcc45640000\",\"0x87c498170934b8233d1ad1e769317d5c475f2f40\":\"0x3708baed3d68900000\",\"0x87cf36ad03c9eae9053abb5242de9117bb0f2a0b\":\"0x1b1ae4d6e2ef500000\",\"0x87d7ac0653ccc67aa9c3469eef4352193f7dbb86\":\"0x2a5a058fc295ed000000\",\"0x87e3062b2321e9dfb0875ce3849c9b2e3522d50a\":\"0x21e19e0c9bab2400000\",\"0x87e6034ecf23f8b5639d5f0ea70a22538a920423\":\"0x11c7ea162e78200000\",\"0x87ef6d8b6a7cbf9b5c8c97f67ee2adc2a73b3f77\":\"0xadd1bd23c3c480000\",\"0x87fb26c31e48644d693134205cae43b21f18614b\":\"0x4a4491bd6dcd280000\",\"0x87fc4635263944ce14a46c75fa4a821f39ce7f72\":\"0x1158e460913d00000\",\"0x87fcbe7c4193ffcb08143779c9bec83fe7fda9fc\":\"0x56f985d38644b8000\",\"0x88015d7203c5e0224aeda286ed12f1a51b789333\":\"0x10f08eda8e555098000\",\"0x88106c27d20b74b4b98ca62b232bd5c97411171f\":\"0xaadec983fcff40000\",\"0x881230047c211d2d5b00d8de4c5139de5e3227c7\":\"0x21e19e0c9bab2400000\",\"0x882aa798bf41df179f85520130f15ccdf59b5e58\":\"0x6c6b935b8bbd400000\",\"0x882bd3a2e9d74110b24961c53777f22f1f46dc5d\":\"0x2d4ca05e2b43ca80000\",\"0x882c8f81872c79fed521cb5f950d8b032322ea69\":\"0x878678326eac9000000\",\"0x882f75708386653c80171d0663bfe30b017ed0ad\":\"0x6c6b935b8bbd400000\",\"0x88344909644c7ad4930fd873ca1c0da2d434c07f\":\"0x727739fcb004d0000\",\"0x8834b2453471f324fb26be5b25166b5b5726025d\":\"0x1f0ff8f01daad40000\",\"0x883a78aeabaa50d8ddd8570bcd34265f14b19363\":\"0xd25522fda379a18000\",\"0x8845e9f90e96336bac3c616be9d88402683e004c\":\"0x6c6b935b8bbd400000\",\"0x8846928d683289a2d11df8db7a9474988ef01348\":\"0x21e19e0c9bab2400000\",\"0x884980eb4565c1048317a8f47fdbb461965be481\":\"0xd8d6119a8146050000\",\"0x884a7a39d0916e05f1c242df55607f37df8c5fda\":\"0x4f4843c157c8ca00000\",\"0x885493bda36a0432976546c1ddce71c3f4570021\":\"0xbbf510ddfcb260000\",\"0x88609e0a465b6e99fce907166d57e9da0814f5c8\":\"0x43c33c1937564800000\",\"0x886d0a9e17c9c095af2ea2358b89ec705212ee94\":\"0x18493fba64ef00000\",\"0x88797e58675ed5cc4c19980783dbd0c956085153\":\"0x6c6b935b8bbd400000\",\"0x887cac41cd706f3345f2d34ac34e01752a6e5909\":\"0x20465cee9da1370000\",\"0x88888a57bd9687cbf950aeeacf9740dcc4d1ef59\":\"0x62a992e53a0af00000\",\"0x8889448316ccf14ed86df8e2f478dc63c4338340\":\"0xd2f13f7789f00000\",\"0x888c16144933197cac26504dd76e06fd6600c789\":\"0x56bc75e2d63100000\",\"0x888e94917083d152202b53163939869d271175b4\":\"0xd8d726b7177a800000\",\"0x889087f66ff284f8b5efbd29493b706733ab1447\":\"0x215f835bc769da80000\",\"0x8895eb726226edc3f78cc6a515077b3296fdb95e\":\"0xd5967be4fc3f100000\",\"0x88975a5f1ef2528c300b83c0c607b8e87dd69315\":\"0x486cb9799191e0000\",\"0x889da40fb1b60f9ea9bd7a453e584cf7b1b4d9f7\":\"0x22b1c8c1227a00000\",\"0x889da662eb4a0a2a069d2bc24b05b4ee2e92c41b\":\"0x5a2c8c5456c9f28000\",\"0x88a122a2382c523931fb51a0ccad3beb5b7259c3\":\"0x6c6b935b8bbd400000\",\"0x88a2154430c0e41147d3c1fee3b3b006f851edbd\":\"0x36356633ebd8ea0000\",\"0x88b217ccb786a254cf4dc57f5d9ac3c455a30483\":\"0x3224f42723d4540000\",\"0x88bc43012edb0ea9f062ac437843250a39b78fbb\":\"0x43c33c1937564800000\",\"0x88c2516a7cdb09a6276d7297d30f5a4db1e84b86\":\"0xd8d726b7177a800000\",\"0x88c361640d6b69373b081ce0c433bd590287d5ec\":\"0xa968163f0a57b400000\",\"0x88d541c840ce43cefbaf6d19af6b9859b573c145\":\"0x93739534d28680000\",\"0x88de13b09931877c910d593165c364c8a1641bd3\":\"0xa2a15d09519be00000\",\"0x88dec5bd3f4eba2d18b8aacefa7b721548c319ba\":\"0x4a4491bd6dcd280000\",\"0x88e6f9b247f988f6c0fc14c56f1de53ec69d43cc\":\"0x56bc75e2d63100000\",\"0x88ee7f0efc8f778c6b687ec32be9e7d6f020b674\":\"0x6c6b935b8bbd400000\",\"0x88f1045f19f2d3191816b1df18bb6e1435ad1b38\":\"0xd02ab486cedc00000\",\"0x89009e3c6488bd5e570d1da34eabe28ed024de1b\":\"0x43c33c1937564800000\",\"0x89054430dcdc28ac15fa635ef87c105e602bf70c\":\"0x5dacd13ca9e300000\",\"0x8908760cd39b9c1e8184e6a752ee888e3f0b7045\":\"0x14542ba12a337c00000\",\"0x890fe11f3c24db8732d6c2e772e2297c7e65f139\":\"0xd5627137da8b5900000\",\"0x8914a680a5aec5226d4baaec2e5552b44dd7c874\":\"0x56cd55fc64dfe0000\",\"0x891cb8238c88e93a1bcf61db49bd82b47a7f4f84\":\"0x914878a8c05ee00000\",\"0x8925da4549e15155e57a628522cea9dddf627d81\":\"0x3636c25e66ece70000\",\"0x893017ff1adad499aa065401b4236ce6e92b625a\":\"0x6c6acc67d7b1d40000\",\"0x8933491760c8f0b4df8caac78ed835caee21046d\":\"0x43c33c1937564800000\",\"0x893608751d68d046e85802926673cdf2f57f7cb8\":\"0x11164759ffb320000\",\"0x8938d1b4daee55a54d738cf17e4477f6794e46f7\":\"0xfc936392801c0000\",\"0x893a6c2eb8b40ab096b4f67e74a897b840746e86\":\"0x5dc892aa1131c80000\",\"0x893cdddf5377f3c751bf2e541120045a47cba101\":\"0x56bc75e2d63100000\",\"0x895613236f3584216ad75c5d3e07e3fa6863a778\":\"0x6c6b935b8bbd400000\",\"0x8957727e72cf629020f4e05edf799aa7458062d0\":\"0x77432217e683600000\",\"0x895d694e880b13ccd0848a86c5ce411f88476bbf\":\"0xad6eedd17cf3b8000\",\"0x895ec5545644e0b78330fffab8ddeac9e833156c\":\"0x2086ac351052600000\",\"0x896009526a2c7b0c09a6f63a80bdf29d9c87de9c\":\"0xbbb86b8223edeb0000\",\"0x8967d7b9bdb7b4aed22e65a15dc803cb7a213f10\":\"0x15af1d78b58c400000\",\"0x896e335ca47af57962fa0f4dbf3e45e688cba584\":\"0x4a2fc0ab6052120000\",\"0x8973aefd5efaee96095d9e288f6a046c97374b43\":\"0x7a4c4a0f332140000\",\"0x898c72dd736558ef9e4be9fdc34fef54d7fc7e08\":\"0x3635c9adc5dea00000\",\"0x899b3c249f0c4b81df75d212004d3d6d952fd223\":\"0x6c6b935b8bbd400000\",\"0x89ab13ee266d779c35e8bb04cd8a90cc2103a95b\":\"0xcb49b44ba602d800000\",\"0x89c433d601fad714da6369308fd26c1dc9942bbf\":\"0x6c6b935b8bbd400000\",\"0x89d75b8e0831e46f80bc174188184e006fde0eae\":\"0x3635c9adc5dea00000\",\"0x89e3b59a15864737d493c1d23cc53dbf8dcb1362\":\"0xd8d726b7177a800000\",\"0x89fc8e4d386b0d0bb4a707edf3bd560df1ad8f4e\":\"0xa030dcebbd2f4c0000\",\"0x89fee30d1728d96cecc1dab3da2e771afbcfaa41\":\"0x6c6acc67d7b1d40000\",\"0x8a1cc5ac111c49bfcfd848f37dd768aa65c88802\":\"0x21e19e0c9bab2400000\",\"0x8a20e5b5cee7cd1f5515bace3bf4f77ffde5cc07\":\"0x4563918244f400000\",\"0x8a217db38bc35f215fd92906be42436fe7e6ed19\":\"0x14542ba12a337c00000\",\"0x8a243a0a9fea49b839547745ff2d11af3f4b0522\":\"0x35659ef93f0fc40000\",\"0x8a247d186510809f71cffc4559471c3910858121\":\"0x61093d7c2c6d380000\",\"0x8a3470282d5e2a2aefd7a75094c822c4f5aeef8a\":\"0xd28bc606478a58000\",\"0x8a36869ad478997cbf6d8924d20a3c8018e9855b\":\"0x1158e460913d00000\",\"0x8a4314fb61cd938fc33e15e816b113f2ac89a7fb\":\"0x17764e7aed65100000\",\"0x8a4f4a7f52a355ba105fca2072d3065fc8f7944b\":\"0x1b1ae4d6e2ef500000\",\"0x8a5831282ce14a657a730dc18826f7f9b99db968\":\"0xeabe8a5b41c1360000\",\"0x8a5fb75793d043f1bcd43885e037bd30a528c927\":\"0x13536e6d2e9ac20000\",\"0x8a66abbc2d30ce21a833b0db8e561d5105e0a72c\":\"0x25f1de5c76acdf0000\",\"0x8a746c5d67064711bfca685b95a4fe291a27028e\":\"0x22b1c8c1227a00000\",\"0x8a780ab87a9145fe10ed60fa476a740af4cab1d2\":\"0x121b2e5e6464780000\",\"0x8a7a06be199a3a58019d846ac9cbd4d95dd757de\":\"0xa2a423944256f40000\",\"0x8a810114b2025db9fbb50099a6e0cb9e2efa6bdc\":\"0x678a932062e4180000\",\"0x8a86e4a51c013b1fb4c76bcf30667c78d52eedef\":\"0x6c6b935b8bbd400000\",\"0x8a9eca9c5aba8e139f8003edf1163afb70aa3aa9\":\"0x23c757072b8dd00000\",\"0x8ab839aeaf2ad37cb78bacbbb633bcc5c099dc46\":\"0x6c6b935b8bbd400000\",\"0x8ac89bd9b8301e6b0677fa25fcf0f58f0cc7b611\":\"0x1158e460913d00000\",\"0x8adc53ef8c18ed3051785d88e996f3e4b20ecd51\":\"0x8e4d316827686400000\",\"0x8ae6f80b70e1f23c91fbd5a966b0e499d95df832\":\"0xaadec983fcff40000\",\"0x8ae9ef8c8a8adfa6ab798ab2cdc405082a1bbb70\":\"0x6c6b935b8bbd400000\",\"0x8af626a5f327d7506589eeb7010ff9c9446020d2\":\"0x4be4e7267b6ae00000\",\"0x8b01da34d470c1d115acf4d8113c4dd8a8c338e4\":\"0x5572dcefab697900000\",\"0x8b07d050754dc9ba230db01c310afdb5395aa1b3\":\"0x666b06e62a6200000\",\"0x8b20ad3b94656dbdc0dd21a393d8a7d9e02138cb\":\"0xa2a15d09519be00000\",\"0x8b27392206b958cd375d7ef8af2cf8ef0598c0bc\":\"0x3635c9adc5dea00000\",\"0x8b30c04098d7a7e6420c357ea7bfa49bac9a8a18\":\"0x1b1b113f91fb0140000\",\"0x8b338411f26ccf37658cc75521d77629099e467d\":\"0x6c6b935b8bbd400000\",\"0x8b36224c7356e751f0c066c35e3b44860364bfc2\":\"0x3627bac7a3d9278000\",\"0x8b3696f3c60de32432a2e4c395ef0303b7e81e75\":\"0x65a4da25d3016c00000\",\"0x8b393fb0813ee101db1e14ecc7d322c72b8c0473\":\"0x18b26a313e8ae90000\",\"0x8b48e19d39dd35b66e6e1bb6b9c657cb2cf59d04\":\"0x3c755ac9c024a018000\",\"0x8b505e2871f7deb7a63895208e8227dcaa1bff05\":\"0xcf68efc308d79bc0000\",\"0x8b57b2bc83cc8d4de331204e893f2f3b1db1079a\":\"0x22b1c8c1227a00000\",\"0x8b5c914b128bf1695c088923fa467e7911f351fa\":\"0x556f64c1fe7fa0000\",\"0x8b5f29cc2faa262cdef30ef554f50eb488146eac\":\"0x13b68705c9720810000\",\"0x8b7056f6abf3b118d026e944d5c073433ca451d7\":\"0x3635c6204739d98000\",\"0x8b714522fa2839620470edcf0c4401b713663df1\":\"0xad78ebc5ac6200000\",\"0x8b74a7cb1bb8c58fce267466a30358adaf527f61\":\"0x2e257784e25b4500000\",\"0x8b7e9f6f05f7e36476a16e3e7100c9031cf404af\":\"0x3635c9adc5dea00000\",\"0x8b81156e698639943c01a75272ad3d35851ab282\":\"0x12b3165f65d3e50000\",\"0x8b9577920053b1a00189304d888010d9ef2cb4bf\":\"0x1b1ae4d6e2ef500000\",\"0x8b9841862e77fbbe919470935583a93cf027e450\":\"0x6c6c5334427f1f0000\",\"0x8b997dbc078ad02961355da0a159f2927ed43d64\":\"0xaadec983fcff40000\",\"0x8b9fda7d981fe9d64287f85c94d83f9074849fcc\":\"0x2f6f10780d22cc00000\",\"0x8bb0212f3295e029cab1d961b04133a1809e7b91\":\"0x6c6b935b8bbd400000\",\"0x8bbeacfc29cfe93402db3c41d99ab759662e73ec\":\"0x6c6b935b8bbd400000\",\"0x8bc1ff8714828bf286ff7e8a7709106548ed1b18\":\"0x21e19e0c9bab2400000\",\"0x8bd0b65a50ef5cef84fec420be7b89ed1470ceb9\":\"0x28a77936e92c81c0000\",\"0x8bd6b1c6d74d010d1008dba6ef835d4430b35c32\":\"0x2b5e3af16b1880000\",\"0x8bd8d4c4e943f6c8073921dc17e3e8d7a0761627\":\"0x9f04219d8d34950000\",\"0x8bdfda6c215720eda2136f91052321af4e936c1f\":\"0x3635e619bb04d40000\",\"0x8bea40379347a5c891d59a6363315640f5a7e07a\":\"0x6c6b76ef96970c0000\",\"0x8bf02bd748690e1fd1c76d270833048b66b25fd3\":\"0x27fade568eba9600000\",\"0x8bf297f8f453523ed66a1acb7676856337b93bf0\":\"0xd8d726b7177a800000\",\"0x8bf373d076814cbc57e1c6d16a82c5be13c73d37\":\"0xad78ebc5ac6200000\",\"0x8c1023fde1574db8bb54f1739670157ca47da652\":\"0x179cf9ac3a1b1770000\",\"0x8c1fbe5f0aea359c5aa1fa08c8895412ca8e05a6\":\"0x3635c9adc5dea00000\",\"0x8c22426055b76f11f0a2de1a7f819a619685fe60\":\"0x6b56051582a9700000\",\"0x8c2b7d8b608d28b77f5caa9cd645242a823e4cd9\":\"0x62a992e53a0af00000\",\"0x8c2fbeee8eacc5c5d77c16abd462ee9c8145f34b\":\"0x692ae8897081d00000\",\"0x8c3a9ee71f729f236cba3867b4d79d8ceee25dbc\":\"0x56bc75e2d63100000\",\"0x8c50aa2a9212bcde56418ae261f0b35e7a9dbb82\":\"0x15af1d78b58c400000\",\"0x8c54c7f8b9896e75d7d5f5c760258699957142ad\":\"0x22b1c8c1227a00000\",\"0x8c5d16ed65e3ed7e8b96ca972bc86173e3500b03\":\"0x6c6b935b8bbd400000\",\"0x8c6aa882ee322ca848578c06cb0fa911d3608305\":\"0x2086ac351052600000\",\"0x8c6ae7a05a1de57582ae2768204276c0ff47ed03\":\"0x2c0bb3dd30c4e2000000\",\"0x8c6f9f4e5b7ae276bf58497bd7bf2a7d25245f64\":\"0x93fe5c57d710680000\",\"0x8c75956e8fed50f5a7dd7cfd27da200f6746aea6\":\"0x3635c9adc5dea00000\",\"0x8c7cb4e48b25031aa1c4f92925d631a8c3edc761\":\"0x3635c9adc5dea00000\",\"0x8c7fa5cae82fedb69ab189d3ff27ae209293fb93\":\"0x15af880d8cdb830000\",\"0x8c81410ea8354cc5c65c41be8bd5de733c0b111d\":\"0x205b4dfa1ee74780000\",\"0x8c83d424a3cf24d51f01923dd54a18d6b6fede7b\":\"0xd8d726b7177a800000\",\"0x8c900a8236b08c2b65405d39d75f20062a7561fd\":\"0x58e7926ee858a00000\",\"0x8c93c3c6db9d37717de165c3a1b4fe51952c08de\":\"0x15af1d78b58c400000\",\"0x8c999591fd72ef7111efca7a9e97a2356b3b000a\":\"0xdd64e2aa0a67500000\",\"0x8ca6989746b06e32e2487461b1ce996a273acfd7\":\"0x1158e460913d00000\",\"0x8cb3aa3fcd212854d7578fcc30fdede6742a312a\":\"0x1043561a8829300000\",\"0x8cc0d7c016fa7aa950114aa1db094882eda274ea\":\"0x8a9aba557e36c0000\",\"0x8cc652dd13e7fe14dabbb36d5d320db9ffee8a54\":\"0x61093d7c2c6d380000\",\"0x8ccabf25077f3aa41545344d53be1b2b9c339000\":\"0x5be866c562c5440000\",\"0x8ccf3aa21ab742576ad8c422f71bb188591dea8a\":\"0x3635c9adc5dea00000\",\"0x8cd0cd22e620eda79c0461e896c93c44837e2968\":\"0x6c6b935b8bbd400000\",\"0x8cde8b732e6023878eb23ed16229124b5f7afbec\":\"0x73f75d1a085ba0000\",\"0x8ce22f9fa372449a420610b47ae0c8d565481232\":\"0x6c6b935b8bbd400000\",\"0x8ce4949d8a16542d423c17984e6739fa72ceb177\":\"0x54b405926f4a63d8000\",\"0x8ce5e3b5f591d5eca38abf228f2e3c35134bdac0\":\"0x7dc35b84897c380000\",\"0x8cee38d6595788a56e3fb94634b3ffe1fbdb26d6\":\"0x43c33c1937564800000\",\"0x8ceea15eec3bdad8023f98ecf25b2b8fef27db29\":\"0x6c6b935b8bbd400000\",\"0x8cf3546fd1cda33d58845fc8fcfecabca7c5642a\":\"0x1f1e39932cb3278000\",\"0x8cf6da0204dbc4860b46ad973fc111008d9e0c46\":\"0xad78ebc5ac6200000\",\"0x8cfedef198db0a9143f09129b3fd64dcbb9b4956\":\"0x6c6b935b8bbd400000\",\"0x8d04a5ebfb5db409db0617c9fa5631c192861f4a\":\"0x34957444b840e80000\",\"0x8d06e464245cad614939e0af0845e6d730e20374\":\"0xadc8a28f3d87d8000\",\"0x8d07d42d831c2d7c838aa1872b3ad5d277176823\":\"0x12ee1f9ddbee680000\",\"0x8d0b9ea53fd263415eac11391f7ce9123c447062\":\"0x6c6b935b8bbd400000\",\"0x8d1794da509cb297053661a14aa892333231e3c1\":\"0xad201a6794ff80000\",\"0x8d1abd897dacd4312e18080c88fb9647eab44052\":\"0xbb59a27953c600000\",\"0x8d2303341e1e1eb5e8189bde03f73a60a2a54861\":\"0x56bc75e2d63100000\",\"0x8d238e036596987643d73173c37b0ad06055b96c\":\"0x7148bf0a2af0660000\",\"0x8d2e31b08803b2c5f13d398ecad88528209f6057\":\"0x21db8bbcad11e840000\",\"0x8d378f0edc0bb0f0686d6a20be6a7692c4fa24b8\":\"0x56bc75e2d63100000\",\"0x8d4b603c5dd4570c34669515fdcc665890840c77\":\"0xfc936392801c0000\",\"0x8d51a4cc62011322c696fd725b9fb8f53feaaa07\":\"0x3635c9adc5dea00000\",\"0x8d544c32c07fd0842c761d53a897d6c950bb7599\":\"0xad78ebc5ac6200000\",\"0x8d5ef172bf77315ea64e85d0061986c794c6f519\":\"0xd5967be4fc3f100000\",\"0x8d616b1eee77eef6f176e0698db3c0c141b2fc8f\":\"0x1b1ae4d6e2ef500000\",\"0x8d6170ff66978e773bb621bf72b1ba7be3a7f87e\":\"0xad78ebc5ac6200000\",\"0x8d620bde17228f6cbba74df6be87264d985cc179\":\"0x56bc75e2d63100000\",\"0x8d629c20608135491b5013f1002586a0383130e5\":\"0x4a4491bd6dcd280000\",\"0x8d6657f59711b1f803c6ebef682f915b62f92dc9\":\"0x6c6b935b8bbd400000\",\"0x8d667637e29eca05b6bfbef1f96d460eefbf9984\":\"0xd8d726b7177a800000\",\"0x8d6df209484d7b94702b03a53e56b9fb0660f6f0\":\"0x6c6b935b8bbd400000\",\"0x8d795c5f4a5689ad62da961671f028065286d554\":\"0x6f05b59d3b20000000\",\"0x8d7f3e61299c2db9b9c0487cf627519ed00a9123\":\"0x5e74a8505e80a00000\",\"0x8d89170b92b2be2c08d57c48a7b190a2f146720f\":\"0x42bf06b78ed3b500000\",\"0x8d93dac785f88f1a84bf927d53652b45a154ccdd\":\"0x890b0c2e14fb80000\",\"0x8d9952d0bb4ebfa0efd01a3aa9e8e87f0525742e\":\"0xbb9125542263900000\",\"0x8d9a0c70d2262042df1017d6c303132024772712\":\"0x6c6b935b8bbd400000\",\"0x8d9ed7f4553058c26f7836a3802d3064eb1b363d\":\"0x4e1003b28d9280000\",\"0x8da1178f55d97772bb1d24111a404a4f8715b95d\":\"0x2f9ac3f6de00808000\",\"0x8da1d359ba6cb4bcc57d7a437720d55db2f01c72\":\"0x4563918244f400000\",\"0x8dab948ae81da301d972e3f617a912e5a753712e\":\"0x15af1d78b58c400000\",\"0x8daddf52efbd74da95b969a5476f4fbbb563bfd2\":\"0x2d43f3ebfafb2c0000\",\"0x8db185fe1b70a94a6a080e7e23a8bedc4acbf34b\":\"0x4be4e7267b6ae00000\",\"0x8db58e406e202df9bc703c480bd8ed248d52a032\":\"0x6c6b935b8bbd400000\",\"0x8dbc3e6cb433e194f40f82b40faadb1f8b856116\":\"0x678a932062e4180000\",\"0x8dc1d5111d09af25fdfcac455c7cec283e6d6775\":\"0x6c6b935b8bbd400000\",\"0x8dd484ff8a307364eb66c525a571aac701c5c318\":\"0xd8d726b7177a800000\",\"0x8dd6a9bae57f518549ada677466fea8ab04fd9b4\":\"0xd8d726b7177a800000\",\"0x8dde3cb8118568ef4503fe998ccdf536bf19a098\":\"0xd8d726b7177a800000\",\"0x8dde60eb08a099d7daa356daaab2470d7b025a6b\":\"0xaadec983fcff40000\",\"0x8df339214b6ad1b24663ce716034749d6ef838d9\":\"0x2544faa778090e00000\",\"0x8df53d96191471e059de51c718b983e4a51d2afd\":\"0x6c6b935b8bbd4000000\",\"0x8dfbafbc0e5b5c86cd1ad697feea04f43188de96\":\"0x15252b7f5fa0de0000\",\"0x8e073bad25e42218615f4a0e6b2ea8f8de2230c0\":\"0x823d629d026bfa0000\",\"0x8e0fee38685a94aabcd7ce857b6b1409824f75b8\":\"0x1b1ae4d6e2ef500000\",\"0x8e23facd12c765c36ab81a6dd34d8aa9e68918ae\":\"0x911e4868dba9b0000\",\"0x8e2f9034c9254719c38e50c9aa64305ed696df1e\":\"0x1004e2e45fb7ee00000\",\"0x8e3240b0810e1cf407a500804740cf8d616432a4\":\"0x22f6655ef0b388000\",\"0x8e486a0442d171c8605be348fee57eb5085eff0d\":\"0xd8d726b7177a800000\",\"0x8e6156336be2cdbe32140df08a2ba55fd0a58463\":\"0x4099e1d6357180000\",\"0x8e670815fb67aeaea57b86534edc00cdf564fee5\":\"0xb2e4b323d9c5100000\",\"0x8e6d7485cbe990acc1ad0ee9e8ccf39c0c93440e\":\"0x33c5499031720c0000\",\"0x8e74e0d1b77ebc823aca03f119854cb12027f6d7\":\"0x16b352da5e0ed3000000\",\"0x8e78f351457d016f4ad2755ec7424e5c21ba6d51\":\"0x7ea28327577080000\",\"0x8e7936d592008fdc7aa04edeeb755ab513dbb89d\":\"0x1158e460913d00000\",\"0x8e7fd23848f4db07906a7d10c04b21803bb08227\":\"0x3635c9adc5dea00000\",\"0x8e92aba38e72a098170b92959246537a2e5556c0\":\"0xe7eeba3410b740000\",\"0x8e98766524b0cf2747c50dd43b9567594d9731de\":\"0x6c44b7c26182280000\",\"0x8e9b35ad4a0a86f758446fffde34269d940ceacd\":\"0xd8d726b7177a800000\",\"0x8e9c08f738661f9676236eff82ba6261dd3f4822\":\"0x56bc75e2d63100000\",\"0x8e9c429266df057efa78dd1d5f77fc40742ad466\":\"0x10442ed1b56c7c8000\",\"0x8ea656e71ec651bfa17c5a5759d86031cc359977\":\"0x56bc75e2d63100000\",\"0x8eae29435598ba8f1c93428cdb3e2b4d31078e00\":\"0x6c6b935b8bbd400000\",\"0x8eb1fbe4e5d3019cd7d30dae9c0d5b4c76fb6331\":\"0x6c6b935b8bbd400000\",\"0x8eb51774af206b966b8909c45aa6722748802c0c\":\"0x1b1ae4d6e2ef500000\",\"0x8eb8c71982a00fb84275293253f8044544b66b49\":\"0x15af1d78b58c400000\",\"0x8ecbcfacbfafe9f00c3922a24e2cf0026756ca20\":\"0x131beb925ffd3200000\",\"0x8eceb2e124536c5b5ffc640ed14ff15ed9a8cb71\":\"0x6c6b935b8bbd400000\",\"0x8ed0af11ff2870da0681004afe18b013f7bd3882\":\"0xd8d726b7177a800000\",\"0x8ed143701f2f72280fd04a7b4164281979ea87c9\":\"0xc249fdd327780000\",\"0x8ed1528b447ed4297902f639c514d0944a88f8c8\":\"0xac6e77ab663a80000\",\"0x8ed4284c0f47449c15b8d9b3245de8beb6ce80bf\":\"0x2b5e3af16b18800000\",\"0x8ede7e3dc50749c6c50e2e28168478c34db81946\":\"0x43c30fb0884a96c0000\",\"0x8ee584337ddbc80f9e3498df55f0a21eacb57fb1\":\"0x1158e460913d00000\",\"0x8eebec1a62c08b05a7d1d59180af9ff0d18e3f36\":\"0x1b1ae4d6e2ef500000\",\"0x8ef4d8a2c23c5279187b64e96f741404085385f3\":\"0x103dc1e9a9697b0000\",\"0x8ef711e43a13918f1303e81d0ea78c9eefd67eb2\":\"0xd8d726b7177a800000\",\"0x8efec058cc546157766a632775404a334aaada87\":\"0x6c5db2a4d815dc0000\",\"0x8f02bda6c36922a6be6a509be51906d393f7b99b\":\"0x37490dc12ebe7f8000\",\"0x8f0538ed71da1155e0f3bde5667ceb84318a1a87\":\"0x692ae8897081d00000\",\"0x8f067c7c1bbd57780b7b9eeb9ec0032f90d0dcf9\":\"0x43c33c1937564800000\",\"0x8f0ab894bd3f4e697dbcfb859d497a9ba195994a\":\"0x85d638b65472aa20000\",\"0x8f0af37566d152802f1ae8f928b25af9b139b448\":\"0xad78ebc5ac6200000\",\"0x8f1952eed1c548d9ee9b97d0169a07933be69f63\":\"0x3635c9adc5dea00000\",\"0x8f1fcc3c51e252b693bc5b0ec3f63529fe69281e\":\"0x14542ba12a337c00000\",\"0x8f226096c184ebb40105e08dac4d22e1c2d54d30\":\"0x109e437bd1618c0000\",\"0x8f29a14a845ad458f2d108b568d813166bcdf477\":\"0x21e19e0c9bab2400000\",\"0x8f31c7005197ec997a87e69bec48649ab94bb2a5\":\"0xd8d726b7177a800000\",\"0x8f41b1fbf54298f5d0bc2d122f4eb95da4e5cd3d\":\"0x1333832f5e335c0000\",\"0x8f47328ee03201c9d35ed2b5412b25decc859362\":\"0x6c6b935b8bbd400000\",\"0x8f473d0ab876ddaa15608621d7013e6ff714b675\":\"0x19801c83b6c7c00000\",\"0x8f4d1d41693e462cf982fd81d0aa701d3a5374c9\":\"0xd8d726b7177a800000\",\"0x8f4d1e7e4561284a34fef9673c0d34e12af4aa03\":\"0x6c6b935b8bbd400000\",\"0x8f4fb1aea7cd0f570ea5e61b40a4f4510b6264e4\":\"0xd8d726b7177a800000\",\"0x8f561b41b209f248c8a99f858788376250609cf3\":\"0x5c283d410394100000\",\"0x8f58d8348fc1dc4e0dd8343b6543c857045ee940\":\"0x2e3038df47303280000\",\"0x8f60895fbebbb5017fcbff3cdda397292bf25ba6\":\"0x174406ff9f6fd28000\",\"0x8f64b9c1246d857831643107d355b5c75fef5d4f\":\"0x6c6acc67d7b1d40000\",\"0x8f660f8b2e4c7cc2b4ac9c47ed28508d5f8f8650\":\"0x43c33c1937564800000\",\"0x8f69eafd0233cadb4059ab779c46edf2a0506e48\":\"0x60f06620a849450000\",\"0x8f717ec1552f4c440084fba1154a81dc003ebdc0\":\"0x21e19e0c9bab2400000\",\"0x8f8acb107607388479f64baaabea8ff007ada97d\":\"0x5c6f3080ad423f40000\",\"0x8f8cd26e82e7c6defd02dfad07979021cbf7150c\":\"0xa2a15d09519be00000\",\"0x8f8f37d0ad8f335d2a7101b41156b688a81a9cbe\":\"0x3cb71f51fc5580000\",\"0x8f92844f282a92999ee5b4a8d773d06b694dbd9f\":\"0x692ae8897081d00000\",\"0x8fac748f784a0fed68dba43319b42a75b4649c6e\":\"0x3154c9729d05780000\",\"0x8fd9a5c33a7d9edce0997bdf77ab306424a11ea9\":\"0x6c6b935b8bbd400000\",\"0x8feffadb387a1547fb284da9b8147f3e7c6dc6da\":\"0x2d627be45305080000\",\"0x8ff46045687723dc33e4d099a06904f1ebb584dc\":\"0x6c6b935b8bbd400000\",\"0x8ffa062122ac307418821adb9311075a3703bfa3\":\"0x3635c9adc5dea00000\",\"0x8ffe322997b8e404422d19c54aadb18f5bc8e9b7\":\"0xd5967be4fc3f100000\",\"0x900194c4b1074305d19de405b0ac78280ecaf967\":\"0x3635c9adc5dea00000\",\"0x9003d270891ba2df643da8341583193545e3e000\":\"0xd8d726b7177a800000\",\"0x90057af9aa66307ec9f033b29724d3b2f41eb6f9\":\"0x19d1d6aadb2c52e80000\",\"0x900f0b8e35b668f81ef252b13855aa5007d012e7\":\"0x170a0f5040e5040000\",\"0x9018cc1f48d2308e252ab6089fb99a7c1d569410\":\"0xad78ebc5ac6200000\",\"0x901d99b699e5c6911519cb2076b4c76330c54d22\":\"0x6c6b935b8bbd400000\",\"0x902d74a157f7d2b9a3378b1f56703730e03a1719\":\"0xd8d726b7177a800000\",\"0x903413878aea3bc1086309a3fe768b65559e8cab\":\"0x1b1ae4d6e2ef5000000\",\"0x904966cc2213b5b8cb5bd6089ef9cddbef7edfcc\":\"0x6c6b935b8bbd400000\",\"0x904caa429c619d940f8e6741826a0db692b19728\":\"0x3635c9adc5dea00000\",\"0x9052f2e4a3e3c12dd1c71bf78a4ec3043dc88b7e\":\"0xe7eeba3410b740000\",\"0x905526568ac123afc0e84aa715124febe83dc87c\":\"0xf8699329677e0000\",\"0x9092918707c621fdbd1d90fb80eb787fd26f7350\":\"0x855b5ba65c84f00000\",\"0x909b5e763a39dcc795223d73a1dbb7d94ca75ac8\":\"0x6c6b935b8bbd400000\",\"0x90acced7e48c08c6b934646dfa0adf29dc94074f\":\"0x30b4b157bbd490000\",\"0x90b1f370f9c1eb0be0fb8e2b8ad96a416371dd8a\":\"0x30ca024f987b900000\",\"0x90b62f131a5f29b45571513ee7a74a8f0b232202\":\"0x890b0c2e14fb80000\",\"0x90bd62a050845261fa4a9f7cf241ea630b05efb8\":\"0x1b1ae4d6e2ef500000\",\"0x90c41eba008e20cbe927f346603fc88698125969\":\"0x246ddf97976680000\",\"0x90d2809ae1d1ffd8f63eda01de49dd552df3d1bc\":\"0xd8bb6549b02bb80000\",\"0x90dc09f717fc2a5b69fd60ba08ebf40bf4e8246c\":\"0xd8d8583fa2d52f0000\",\"0x90e300ac71451e401f887f6e7728851647a80e07\":\"0x15af1d78b58c400000\",\"0x90e35aabb2deef408bb9b5acef714457dfde6272\":\"0x56cd55fc64dfe0000\",\"0x90e7070f4d033fe6910c9efe5a278e1fc6234def\":\"0x571380819b3040000\",\"0x90e93e4dc17121487952333614002be42356498e\":\"0x678a932062e4180000\",\"0x90e9a9a82edaa814c284d232b6e9ba90701d4952\":\"0x56be03ca3e47d8000\",\"0x90f774c9147dde90853ddc43f08f16d455178b8c\":\"0xd8d726b7177a800000\",\"0x90fc537b210658660a83baa9ac4a8402f65746a8\":\"0x65ea3db75546600000\",\"0x91050a5cffadedb4bb6eaafbc9e5013428e96c80\":\"0x5c283d410394100000\",\"0x91051764af6b808e4212c77e30a5572eaa317070\":\"0x3635c9adc5dea00000\",\"0x910b7d577a7e39aa23acf62ad7f1ef342934b968\":\"0x21e19e0c9bab2400000\",\"0x910e996543344c6815fb97cda7af4b8698765a5b\":\"0x59af69829cf640000\",\"0x911feea61fe0ed50c5b9e5a0d66071399d28bdc6\":\"0x340aad21b3b700000\",\"0x911ff233e1a211c0172c92b46cf997030582c83a\":\"0x6acb3df27e1f880000\",\"0x9120e71173e1ba19ba8f9f4fdbdcaa34e1d6bb78\":\"0x6c6b935b8bbd400000\",\"0x91211712719f2b084d3b3875a85069f466363141\":\"0x3635c9adc5dea00000\",\"0x912304118b80473d9e9fe3ee458fbe610ffda2bb\":\"0xad78ebc5ac6200000\",\"0x91546b79ecf69f936b5a561508b0d7e50cc5992f\":\"0xe7eeba3410b740000\",\"0x9156d18029350e470408f15f1aa3be9f040a67c6\":\"0x3635c9adc5dea00000\",\"0x91620f3eb304e813d28b0297556d65dc4e5de5aa\":\"0xcf152640c5c8300000\",\"0x916bf7e3c545921d3206d900c24f14127cbd5e70\":\"0x3d0ddbc7df2bb100000\",\"0x916cf17d71412805f4afc3444a0b8dd1d9339d16\":\"0xc673ce3c40160000\",\"0x917b8f9f3a8d09e9202c52c29e724196b897d35e\":\"0x8ba52e6fc45e40000\",\"0x918967918cd897dd0005e36dc6c883ef438fc8c7\":\"0x796e3ea3f8ab00000\",\"0x91898eab8c05c0222883cd4db23b7795e1a24ad7\":\"0x6c6b935b8bbd400000\",\"0x9191f94698210516cf6321a142070e20597674ed\":\"0xee9d5be6fc110000\",\"0x91a4149a2c7b1b3a67ea28aff34725e0bf8d7524\":\"0x692ae8897081d00000\",\"0x91a787bc5196f34857fe0c372f4df376aaa76613\":\"0x6c6b935b8bbd400000\",\"0x91a8baaed012ea2e63803b593d0d0c2aab4c5b0a\":\"0x5150ae84a8cdf00000\",\"0x91ac5cfe67c54aa7ebfba448666c461a3b1fe2e1\":\"0x15c93492bf9dfc0000\",\"0x91bb3f79022bf3c453f4ff256e269b15cf2c9cbd\":\"0x52585c13fe3a5c0000\",\"0x91c75e3cb4aa89f34619a164e2a47898f5674d9c\":\"0x6c6b935b8bbd400000\",\"0x91c80caa081b38351d2a0e0e00f80a34e56474c1\":\"0x3635c9adc5dea00000\",\"0x91cc46aa379f856a6640dccd5a648a7902f849d9\":\"0xad78ebc5ac6200000\",\"0x91d2a9ee1a6db20f5317cca7fbe2313895db8ef8\":\"0x1ccc3a52f306e280000\",\"0x91d66ea6288faa4b3d606c2aa45c7b6b8a252739\":\"0x6c6b935b8bbd400000\",\"0x91dbb6aaad149585be47375c5d6de5ff09191518\":\"0x43c33c1937564800000\",\"0x91e8810652e8e6161525d63bb7751dc20f676076\":\"0x274d656ac90e340000\",\"0x91f516146cda20281719978060c6be4149067c88\":\"0x6c6b935b8bbd400000\",\"0x91f624b24a1fa5a056fe571229e7379db14b9a1e\":\"0x28a8517c669b3570000\",\"0x91fe8a4c6164df8fa606995d6ba7adcaf1c893ce\":\"0x39992648a23c8a00000\",\"0x921f5261f4f612760706892625c75e7bce96b708\":\"0x6c6b935b8bbd400000\",\"0x9221c9ce01232665741096ac07235903ad1fe2fc\":\"0x6db63335522628000\",\"0x9225983860a1cb4623c72480ac16272b0c95e5f5\":\"0x6c6b935b8bbd400000\",\"0x9225d46a5a80943924a39e5b84b96da0ac450581\":\"0x878678326eac9000000\",\"0x922a20c79a1d3a26dd3829677bf1d45c8f672bb6\":\"0xd8d726b7177a800000\",\"0x92438e5203b6346ff886d7c36288aacccc78ceca\":\"0x3635c9adc5dea00000\",\"0x9243d7762d77287b12638688b9854e88a769b271\":\"0x3635c9adc5dea00000\",\"0x924bce7a853c970bb5ec7bb759baeb9c7410857b\":\"0xbe202d6a0eda0000\",\"0x924efa6db595b79313277e88319625076b580a10\":\"0x6c6b935b8bbd400000\",\"0x92558226b384626cad48e09d966bf1395ee7ea5d\":\"0x121ea68c114e510000\",\"0x926082cb7eed4b1993ad245a477267e1c33cd568\":\"0x144a74badfa4b60000\",\"0x926209b7fda54e8ddb9d9e4d3d19ebdc8e88c29f\":\"0x6c6b935b8bbd400000\",\"0x9268d62646563611dc3b832a30aa2394c64613e3\":\"0x6c6b935b8bbd400000\",\"0x92698e345378c62d8eda184d94366a144b0c105b\":\"0x4be4e7267b6ae00000\",\"0x92793ac5b37268774a7130de2bbd330405661773\":\"0x22ca3587cf4eb0000\",\"0x9279b2228cec8f7b4dda3f320e9a0466c2f585ca\":\"0x10f0cf064dd59200000\",\"0x927cb7dc187036b5427bc7e200c5ec450c1d27d4\":\"0xbb59a27953c600000\",\"0x927cc2bfda0e088d02eff70b38b08aa53cc30941\":\"0x646f60a1f986360000\",\"0x9284f96ddb47b5186ee558aa31324df5361c0f73\":\"0x3635c9adc5dea000000\",\"0x929d368eb46a2d1fbdc8ffa0607ede4ba88f59ad\":\"0x6c6b935b8bbd400000\",\"0x92a7c5a64362e9f842a23deca21035857f889800\":\"0x6c6acc67d7b1d40000\",\"0x92a898d46f19719c38126a8a3c27867ae2cee596\":\"0x6c6b935b8bbd400000\",\"0x92a971a739799f8cb48ea8475d72b2d2474172e6\":\"0xd5967be4fc3f100000\",\"0x92aae59768eddff83cfe60bb512e730a05a161d7\":\"0x5c9778410c76d18000\",\"0x92ad1b3d75fba67d54663da9fc848a8ade10fa67\":\"0x6c6b935b8bbd400000\",\"0x92ae5b7c7eb492ff1ffa16dd42ad9cad40b7f8dc\":\"0x2ee449550898e40000\",\"0x92c0f573eccf62c54810ee6ba8d1f113542b301b\":\"0xb7726f16ccb1e00000\",\"0x92c13fe0d6ce87fd50e03def9fa6400509bd7073\":\"0x22b1c8c1227a00000\",\"0x92c94c2820dfcf7156e6f13088ece7958b3676fd\":\"0x52d542804f1ce0000\",\"0x92cfd60188efdfb2f8c2e7b1698abb9526c1511f\":\"0x6c6b935b8bbd400000\",\"0x92d8ad9a4d61683b80d4a6672e84c20d62421e80\":\"0x1158e460913d00000\",\"0x92dca5e102b3b81b60f1a504634947c374a88ccb\":\"0x6c6b935b8bbd400000\",\"0x92e435340e9d253c00256389f52b067d55974e76\":\"0xe873f44133cb00000\",\"0x92e4392816e5f2ef5fb65837cec2c2325cc64922\":\"0x21e19e0c9bab2400000\",\"0x92e6581e1da1f9b846e09347333dc818e2d2ac66\":\"0xc55325ca7415e00000\",\"0x931df34d1225bcd4224e63680d5c4c09bce735a6\":\"0x3afb087b876900000\",\"0x931fe712f64207a2fd5022728843548bfb8cbb05\":\"0x6c6b935b8bbd400000\",\"0x93235f340d2863e18d2f4c52996516138d220267\":\"0x4002e44fda7d40000\",\"0x93258255b37c7f58f4b10673a932dd3afd90f4f2\":\"0x3635c9adc5dea00000\",\"0x9328d55ccb3fce531f199382339f0e576ee840a3\":\"0xd8d726b7177a800000\",\"0x9329ffdc268babde8874b366406c81445b9b2d35\":\"0x16e62f8c730ca18000\",\"0x932b9c04d40d2ac83083d94298169dae81ab2ed0\":\"0x6c6b935b8bbd400000\",\"0x933436c8472655f64c3afaaf7c4c621c83a62b38\":\"0x3635c9adc5dea00000\",\"0x933bf33f8299702b3a902642c33e0bfaea5c1ca3\":\"0xd2f13f7789f00000\",\"0x9340345ca6a3eabdb77363f2586043f29438ce0b\":\"0x1cc805da0dfff10000\",\"0x9340b5f678e45ee05eb708bb7abb6ec8f08f1b6b\":\"0x14542ba12a337c00000\",\"0x934af21b7ebfa467e2ced65aa34edd3a0ec71332\":\"0x7801f3e80cc0ff00000\",\"0x935069444a6a984de2084e46692ab99f671fc727\":\"0x1e7e4171bf4d3a00000\",\"0x93507e9e8119cbceda8ab087e7ecb071383d6981\":\"0x2f6f10780d22cc00000\",\"0x93678a3c57151aeb68efdc43ef4d36cb59a009f3\":\"0x1a12a92bc3c3e0000\",\"0x936dcf000194e3bff50ac5b4243a3ba014d661d8\":\"0x21e19e0c9bab2400000\",\"0x936f3813f5f6a13b8e4ffec83fe7f826186a71cd\":\"0x1c30731cec03200000\",\"0x9374869d4a9911ee1eaf558bc4c2b63ec63acfdd\":\"0x3635c9adc5dea00000\",\"0x937563d8a80fd5a537b0e66d20a02525d5d88660\":\"0x878678326eac900000\",\"0x9376dce2af2ec8dcda741b7e7345664681d93668\":\"0x3635c9adc5dea00000\",\"0x93868ddb2a794d02ebda2fa4807c76e3609858dc\":\"0x6dee15fc7c24a78000\",\"0x939c4313d2280edf5e071bced846063f0a975d54\":\"0x1969368974c05b000000\",\"0x93a6b3ab423010f981a7489d4aad25e2625c5741\":\"0x44680fe6a1ede4e8000\",\"0x93aa8f92ebfff991fc055e906e651ac768d32bc8\":\"0x32f51edbaaa3300000\",\"0x93b4bf3fdff6de3f4e56ba6d7799dc4b93a6548f\":\"0x10910d4cdc9f60000\",\"0x93bc7d9a4abd44c8bbb8fe8ba804c61ad8d6576c\":\"0xd8d6119a8146050000\",\"0x93c2e64e5de5589ed25006e843196ee9b1cf0b3e\":\"0x5a87e7d7f5f6580000\",\"0x93c88e2d88621e30f58a9586bed4098999eb67dd\":\"0x69b5afac750bb800000\",\"0x93e0f37ecdfb0086e3e862a97034447b1e4dec1a\":\"0x1a055690d9db80000\",\"0x93e303411afaf6c107a44101c9ac5b36e9d6538b\":\"0xdf9ddfecd0365400000\",\"0x93f18cd2526040761488c513174d1e7963768b2c\":\"0x82ffac9ad593720000\",\"0x940f715140509ffabf974546fab39022a41952d2\":\"0x4be4e7267b6ae00000\",\"0x942c6b8c955bc0d88812678a236725b32739d947\":\"0x54069233bf7f780000\",\"0x943d37864a4a537d35c8d99723cd6406ce2562e6\":\"0x6c6b935b8bbd400000\",\"0x94439ca9cc169a79d4a09cae5e67764a6f871a21\":\"0xd02ab486cedc00000\",\"0x94449c01b32a7fa55af8104f42cdd844aa8cbc40\":\"0x38111a1f4f03c100000\",\"0x9445ba5c30e98961b8602461d0385d40fbd80311\":\"0x21e19e0c9bab2400000\",\"0x944f07b96f90c5f0d7c0c580533149f3f585a078\":\"0x402f4cfee62e80000\",\"0x9454b3a8bff9709fd0e190877e6cb6c89974dbd6\":\"0x90f534608a72880000\",\"0x945d96ea573e8df7262bbfa572229b4b16016b0f\":\"0xb589ef914c1420000\",\"0x945e18769d7ee727c7013f92de24d117967ff317\":\"0x6c6b935b8bbd400000\",\"0x94612781033b57b146ee74e753c672017f5385e4\":\"0xc328093e61ee400000\",\"0x94644ad116a41ce2ca7fbec609bdef738a2ac7c7\":\"0x10f0cf064dd59200000\",\"0x9470cc36594586821821c5c996b6edc83b6d5a32\":\"0x14d1120d7b1600000\",\"0x9475c510ec9a26979247744c3d8c3b0e0b5f44d3\":\"0x21e19e0c9bab2400000\",\"0x947e11e5ea290d6fc3b38048979e0cd44ec7c17f\":\"0x6c6b935b8bbd400000\",\"0x9483d98f14a33fdc118d403955c29935edfc5f70\":\"0x18ea3b34ef51880000\",\"0x949131f28943925cfc97d41e0cea0b262973a730\":\"0x97c9ce4cf6d5c00000\",\"0x949f84f0b1d7c4a7cf49ee7f8b2c4a134de32878\":\"0x252248deb6e6940000\",\"0x949f8c107bc7f0aceaa0f17052aadbd2f9732b2e\":\"0x6c6b935b8bbd400000\",\"0x94a7cda8f481f9d89d42c303ae1632b3b709db1d\":\"0x1043561a8829300000\",\"0x94a9a71691317c2064271b51c9353fbded3501a8\":\"0xb50fcfafebecb00000\",\"0x94ad4bad824bd0eb9ea49c58cebcc0ff5e08346b\":\"0x692ae8897081d00000\",\"0x94bbc67d13f89ebca594be94bc5170920c30d9f3\":\"0x458ffa3150a540000\",\"0x94be3ae54f62d663b0d4cc9e1ea8fe9556ea9ebf\":\"0x143132ca843180000\",\"0x94c055e858357aaa30cf2041fa9059ce164a1f91\":\"0x43c25e0dcc1bd1c0000\",\"0x94c742fd7a8b7906b3bfe4f8904fc0be5c768033\":\"0x43c33c1937564800000\",\"0x94ca56de777fd453177f5e0694c478e66aff8a84\":\"0x1b1ae4d6e2ef500000\",\"0x94d81074db5ae197d2bb1373ab80a87d121c4bd3\":\"0x1fd933494aa5fe00000\",\"0x94db807873860aac3d5aea1e885e52bff2869954\":\"0xae8e7a0bb575d00000\",\"0x94e1f5cb9b8abace03a1a6428256553b690c2355\":\"0x1158e460913d00000\",\"0x94ef8be45077c7d4c5652740de946a62624f713f\":\"0x56cf5593a18f88000\",\"0x94f13f9f0836a3ee2437a84922d2984dc0f7d53b\":\"0xa2a0329bc38abe0000\",\"0x94f8f057db7e60e675ad940f155885d1a477348e\":\"0x15be6174e1912e0000\",\"0x94fcceadfe5c109c5eaeaf462d43873142c88e22\":\"0x1043561a88293000000\",\"0x95034e1621865137cd4739b346dc17da3a27c34e\":\"0x55a6e79ccd1d300000\",\"0x950c68a40988154d2393fff8da7ccda99614f72c\":\"0xf94146fd8dcde58000\",\"0x950fe9c6cad50c18f11a9ed9c45740a6180612d0\":\"0x1b1ae4d6e2ef5000000\",\"0x952183cfd38e352e579d36decec5b18450f7fba0\":\"0x6c6b935b8bbd400000\",\"0x95278b08dee7c0f2c8c0f722f9fcbbb9a5241fda\":\"0x829309f64f0db00000\",\"0x952c57d2fb195107d4cd5ca300774119dfad2f78\":\"0x6c6b935b8bbd400000\",\"0x953572f0ea6df9b197cae40e4b8ecc056c4371c5\":\"0x3635c9adc5dea00000\",\"0x953ef652e7b769f53d6e786a58952fa93ee6abe7\":\"0x9b0a791f1211300000\",\"0x95447046313b2f3a5e19b948fd3b8bedc82c717c\":\"0x1b1ae4d6e2ef500000\",\"0x955db3b74360b9a268677e73cea821668af6face\":\"0x65a4da25d3016c00000\",\"0x9560e8ac6718a6a1cdcff189d603c9063e413da6\":\"0xd8d726b7177a800000\",\"0x9567a0de811de6ff095b7ee64e7f1b83c2615b80\":\"0xe7eeba3410b740000\",\"0x95681cdae69b2049ce101e325c759892cac3f811\":\"0x9ae92a9bc94c400000\",\"0x9568b7de755628af359a84543de23504e15e41e6\":\"0x878678326eac9000000\",\"0x9569c63a9284a805626db3a32e9d236393476151\":\"0x6acb3df27e1f880000\",\"0x95809e8da3fbe4b7f281f0b8b1715f420f7d7d63\":\"0x6c6b935b8bbd400000\",\"0x959f57fded6ae37913d900b81e5f48a79322c627\":\"0xddb26104749118000\",\"0x959ff17f1d51b473b44010052755a7fa8c75bd54\":\"0x6acb3df27e1f880000\",\"0x95a577dc2eb3ae6cb9dfc77af697d7efdfe89a01\":\"0x75f610f70ed200000\",\"0x95cb6d8a6379f94aba8b885669562c4d448e56a7\":\"0x6c6b935b8bbd400000\",\"0x95d550427b5a514c751d73a0f6d29fb65d22ed10\":\"0x1043561a8829300000\",\"0x95d98d0c1069908f067a52acac2b8b534da37afd\":\"0x6f59b630a929708000\",\"0x95df4e3445d7662624c48eba74cf9e0a53e9f732\":\"0xbdbc41e0348b3000000\",\"0x95e6a54b2d5f67a24a4875af75107ca7ea9fd2fa\":\"0x487a9a304539440000\",\"0x95e6f93dac228bc7585a25735ac2d076cc3a4017\":\"0x14542ba12a337c00000\",\"0x95e7616424cd0961a71727247437f0069272280e\":\"0x15af1d78b58c400000\",\"0x95e80a82c20cbe3d2060242cb92d735810d034a2\":\"0x1c32e463fd4b98000\",\"0x95f62d0243ede61dad9a3165f53905270d54e242\":\"0x57473d05dabae80000\",\"0x95fb5afb14c1ef9ab7d179c5c300503fd66a5ee2\":\"0x1daf7a02b0dbe8000\",\"0x9610592202c282ab9bd8a884518b3e0bd4758137\":\"0xe873f44133cb00000\",\"0x961c59adc74505d1864d1ecfcb8afa0412593c93\":\"0x878678326eac9000000\",\"0x962c0dec8a3d464bf39b1215eafd26480ae490cd\":\"0x6c82e3eaa513e80000\",\"0x962cd22a8edf1e4f4e55b4b15ddbfb5d9d541971\":\"0x6c6b935b8bbd400000\",\"0x96334bfe04fffa590213eab36514f338b864b736\":\"0x15af1d78b58c400000\",\"0x9637dc12723d9c78588542eab082664f3f038d9d\":\"0x3635c9adc5dea00000\",\"0x964eab4b276b4cd8983e15ca72b106900fe41fce\":\"0x1b1ae4d6e2ef500000\",\"0x9662ee021926682b31c5f200ce457abea76c6ce9\":\"0x24590e8589eb6a0000\",\"0x966c04781cb5e67dde3235d7f8620e1ab663a9a5\":\"0x100d2050da6351600000\",\"0x967076a877b18ec15a415bb116f06ef32645dba3\":\"0x6c6b935b8bbd400000\",\"0x967bfaf76243cdb9403c67d2ceefdee90a3feb73\":\"0x349d87f2a2dc2f0000\",\"0x967d4142af770515dd7062af93498dbfdff29f20\":\"0x11854d0f9cee40000\",\"0x968b14648f018333687cd213fa640aec04ce6323\":\"0x3635c9adc5dea00000\",\"0x968dea60df3e09ae3c8d3505e9c080454be0e819\":\"0x14542ba12a337c00000\",\"0x96924191b7df655b3319dc6d6137f481a73a0ff3\":\"0xd9ecb4fd208e500000\",\"0x9696052138338c722f1140815cf7749d0d3b3a74\":\"0x1b1ae4d6e2ef500000\",\"0x96a55f00dff405dc4de5e58c57f6f6f0cac55d2f\":\"0x6a6616379c87b58000\",\"0x96aa573fed2f233410dbae5180145b23c31a02f0\":\"0x5dc892aa1131c80000\",\"0x96ad579bbfa8db8ebec9d286a72e4661eed8e356\":\"0x3a0ba42bec61830000\",\"0x96b434fe0657e42acc8212b6865139dede15979c\":\"0xd8d726b7177a800000\",\"0x96b906ea729f4655afe3e57d35277c967dfa1577\":\"0x3635c9adc5dea00000\",\"0x96d62dfd46087f62409d93dd606188e70e381257\":\"0x6c6b935b8bbd400000\",\"0x96d9cca8f55eea0040ec6eb348a1774b95d93ef4\":\"0xd8d726b7177a800000\",\"0x96e7c0c9d5bf10821bf140c558a145b7cac21397\":\"0x393ef1a5127c800000\",\"0x96ea6ac89a2bac95347b51dba63d8bd5ebdedce1\":\"0x6c6b935b8bbd400000\",\"0x96eafbf2fb6f4db9a436a74c45b5654452e23819\":\"0x1158e460913d00000\",\"0x96eb523e832f500a017de13ec27f5d366c560eff\":\"0x10acceba43ee280000\",\"0x96f0462ae6f8b96088f7e9c68c74b9d8ad34b347\":\"0x61093d7c2c6d380000\",\"0x96f820500b70f4a3e3239d619cff8f222075b135\":\"0xad78ebc5ac6200000\",\"0x96fe59c3dbb3aa7cc8cb62480c65e56e6204a7e2\":\"0x43c33c1937564800000\",\"0x96ff6f509968f36cb42cba48db32f21f5676abf8\":\"0x6acb3df27e1f880000\",\"0x970938522afb5e8f994873c9fbdc26e3b37e314c\":\"0x3635c9adc5dea00000\",\"0x970abd53a54fca4a6429207c182d4d57bb39d4a0\":\"0x6c6b935b8bbd400000\",\"0x970d8b8a0016d143054f149fb3b8e550dc0797c7\":\"0x3635c9adc5dea00000\",\"0x972c2f96aa00cf8a2f205abcf8937c0c75f5d8d9\":\"0xad78ebc5ac6200000\",\"0x973f4e361fe5decd989d4c8f7d7cc97990385daf\":\"0x150f8543a387420000\",\"0x974d0541ab4a47ec7f75369c0069b64a1b817710\":\"0x15af1d78b58c400000\",\"0x974d2f17895f2902049deaaecf09c3046507402d\":\"0xcc19c29437ab8000\",\"0x9752d14f5e1093f071711c1adbc4e3eb1e5c57f3\":\"0x6c6b935b8bbd400000\",\"0x9756e176c9ef693ee1eec6b9f8b151d313beb099\":\"0x410d586a20a4c00000\",\"0x975f3764e97bbccf767cbd3b795ba86d8ba9840e\":\"0x12c1b6eed03d280000\",\"0x976a18536af41874426308871bcd1512a775c9f8\":\"0x21e19e0c9bab2400000\",\"0x976e3ceaf3f1af51f8c29aff5d7fa21f0386d8ee\":\"0xd02ab486cedc00000\",\"0x9777cc61cf756be3b3c20cd4491c69d275e7a120\":\"0x21e19e0c9bab2400000\",\"0x97810bafc37e84306332aacb35e92ad911d23d24\":\"0x3635c9adc5dea00000\",\"0x978c430ce4359b06bc2cdf5c2985fc950e50d5c8\":\"0x1a055690d9db800000\",\"0x9795f64319fc17dd0f8261f9d206fb66b64cd0c9\":\"0xad78ebc5ac6200000\",\"0x9799ca21dbcf69bfa1b3f72bac51b9e3ca587cf9\":\"0x5c283d410394100000\",\"0x979cbf21dfec8ace3f1c196d82df962534df394f\":\"0x9991d478dd4d160000\",\"0x979d681c617da16f21bcaca101ed16ed015ab696\":\"0x65ea3db75546600000\",\"0x979f30158b574b999aab348107b9eed85b1ff8c1\":\"0x34957444b840e80000\",\"0x97a86f01ce3f7cfd4441330e1c9b19e1b10606ef\":\"0x6c6b935b8bbd400000\",\"0x97b91efe7350c2d57e7e406bab18f3617bcde14a\":\"0x21e1999bbd5d2be0000\",\"0x97d0d9725e3b70e675843173938ed371b62c7fac\":\"0x93739534d28680000\",\"0x97d9e46a7604d7b5a4ea4ee61a42b3d2350fc3ed\":\"0x6c6b935b8bbd400000\",\"0x97dc26ec670a31e0221d2a75bc5dc9f90c1f6fd4\":\"0x2b5e3af16b1880000\",\"0x97de21e421c37fe4b8025f9a51b7b390b5df7804\":\"0x10f0cf064dd592000000\",\"0x97e28973b860c567402800fbb63ce39a048a3d79\":\"0x542253a126ce40000\",\"0x97e5cc6127c4f885be02f44b42d1c8b0ac91e493\":\"0xad78ebc5ac6200000\",\"0x97f1fe4c8083e596212a187728dd5cf80a31bec5\":\"0x1158e460913d00000\",\"0x97f7760657c1e202759086963eb4211c5f8139b9\":\"0xa8a097fcb3d17680000\",\"0x97f99b6ba31346cd98a9fe4c308f87c5a58c5151\":\"0x14542ba12a337c00000\",\"0x980a84b686fc31bdc83c221058546a71b11f838a\":\"0x2a415548af86818000\",\"0x9810e34a94db6ed156d0389a0e2b80f4fd6b0a8a\":\"0x6c6b935b8bbd400000\",\"0x981ddf0404e4d22dda556a0726f00b2d98ab9569\":\"0x36356633ebd8ea0000\",\"0x981f712775c0dad97518ffedcb47b9ad1d6c2762\":\"0x16a6502f15a1e540000\",\"0x9834682180b982d166badb9d9d1d9bbf016d87ee\":\"0x6c6b935b8bbd400000\",\"0x9836b4d30473641ab56aeee19242761d72725178\":\"0x6c6b935b8bbd400000\",\"0x98397342ec5f3d4cb877e54ef5d6f1d366731bd4\":\"0x14061b9d77a5e980000\",\"0x9846648836a307a057184fd51f628a5f8c12427c\":\"0x40b69bf43dce8f00000\",\"0x984a7985e3cc7eb5c93691f6f8cc7b8f245d01b2\":\"0x14542ba12a337c00000\",\"0x985d70d207892bed398590024e2421b1cc119359\":\"0x43c33c1937564800000\",\"0x986df47e76e4d7a789cdee913cc9831650936c9d\":\"0x10f0cf064dd59200000\",\"0x9874803fe1f3a0365e7922b14270eaeb032cc1b5\":\"0x3cf5928824c6c20000\",\"0x9875623495a46cdbf259530ff838a1799ec38991\":\"0x6c6b935b8bbd400000\",\"0x987618c85656207c7bac1507c0ffefa2fb64b092\":\"0x37dfe433189e38000\",\"0x987c9bcd6e3f3990a52be3eda4710c27518f4f72\":\"0x15af1d78b58c400000\",\"0x9882967cee68d2a839fad8ab4a7c3dddf6c0adc8\":\"0x4878be1ffaf95d0000\",\"0x98855c7dfbee335344904a12c40c731795b13a54\":\"0x39fbae8d042dd00000\",\"0x989c0ccff654da03aeb11af701054561d6297e1d\":\"0xd8d726b7177a800000\",\"0x98a0e54c6d9dc8be96276cebf4fec460f6235d85\":\"0x6ac882100952c78000\",\"0x98b769cc305cecfb629a00c907069d7ef9bc3a12\":\"0x168d28e3f00280000\",\"0x98ba4e9ca72fddc20c69b4396f76f8183f7a2a4e\":\"0x2b5e3af16b188000000\",\"0x98be696d51e390ff1c501b8a0f6331b628ddc5ad\":\"0x6c6b935b8bbd400000\",\"0x98bed3a72eccfbafb923489293e429e703c7e25b\":\"0x6c6b935b8bbd400000\",\"0x98bf4af3810b842387db70c14d46099626003d10\":\"0xd8d726b7177a800000\",\"0x98c10ebf2c4f97cba5a1ab3f2aafe1cac423f8cb\":\"0x1043561a8829300000\",\"0x98c19dba810ba611e68f2f83ee16f6e7744f0c1f\":\"0xad78ebc5ac6200000\",\"0x98c5494a03ac91a768dffc0ea1dde0acbf889019\":\"0x2a5a058fc295ed000000\",\"0x98d204f9085f8c8e7de23e589b64c6eff692cc63\":\"0x6c6b935b8bbd400000\",\"0x98d3731992d1d40e1211c7f735f2189afa0702e0\":\"0x1b1ae4d6e2ef5000000\",\"0x98e2b6d606fd2d6991c9d6d4077fdf3fdd4585da\":\"0x30df1a6f8ad6280000\",\"0x98e3e90b28fccaee828779b8d40a5568c4116e21\":\"0x22b1c8c1227a00000\",\"0x98e6f547db88e75f1f9c8ac2c5cf1627ba580b3e\":\"0x3635c9adc5dea00000\",\"0x98f4af3af0aede5fafdc42a081ecc1f89e3ccf20\":\"0x1fd933494aa5fe00000\",\"0x98f6b8e6213dbc9a5581f4cce6655f95252bdb07\":\"0x115872b0bca4300000\",\"0x9909650dd5b1397b8b8b0eb69499b291b0ad1213\":\"0xad78ebc5ac6200000\",\"0x991173601947c2084a62d639527e961512579af9\":\"0x2086ac351052600000\",\"0x99129d5b3c0cde47ea0def4dfc070d1f4a599527\":\"0x6c6b935b8bbd400000\",\"0x9917d68d4af341d651e7f0075c6de6d7144e7409\":\"0x132d4476c08e6f00000\",\"0x991ac7ca7097115f26205eee0ef7d41eb4e311ae\":\"0x1158e460913d00000\",\"0x992365d764c5ce354039ddfc912e023a75b8e168\":\"0xfc936392801c0000\",\"0x992646ac1acaabf5ddaba8f9429aa6a94e7496a7\":\"0x3637507a30abeb0000\",\"0x99268327c373332e06c3f6164287d455b9d5fa4b\":\"0x6c6b935b8bbd400000\",\"0x9928ff715afc3a2b60f8eb4cc4ba4ee8dab6e59d\":\"0x17da3a04c7b3e00000\",\"0x9932ef1c85b75a9b2a80057d508734c51085becc\":\"0x2b83fa5301d590000\",\"0x993f146178605e66d517be782ef0b3c61a4e1925\":\"0x17c1f0535d7a5830000\",\"0x99413704b1a32e70f3bc0d69dd881c38566b54cb\":\"0x5cc6b694631f7120000\",\"0x994152fc95d5c1ca8b88113abbad4d710e40def6\":\"0x1b1ae4d6e2ef500000\",\"0x9944fee9d34a4a880023c78932c00b59d5c82a82\":\"0x28a8a56b3690070000\",\"0x994cc2b5227ec3cf048512467c41b7b7b748909f\":\"0x6c6b935b8bbd400000\",\"0x9971df60f0ae66dce9e8c84e17149f09f9c52f64\":\"0xad78ebc5ac6200000\",\"0x9976947eff5f6ae5da08dd541192f378b428ff94\":\"0x1b1ae4d6e2ef5000000\",\"0x997d6592a31589acc31b9901fbeb3cc3d65b3215\":\"0x6c6b935b8bbd400000\",\"0x9982a5890ffb5406d3aca8d2bfc1dd70aaa80ae0\":\"0x6c6b935b8bbd400000\",\"0x99878f9d6e0a7ed9aec78297b73879a80195afe0\":\"0xd7c198710e66b00000\",\"0x998c1f93bcdb6ff23c10d0dc924728b73be2ff9f\":\"0x365bf3a433eaf30000\",\"0x9991614c5baa47dd6c96874645f97add2c3d8380\":\"0x6acb3df27e1f880000\",\"0x99924a9816bb7ddf3fec1844828e9ad7d06bf4e6\":\"0x5f68e8131ecf800000\",\"0x99997668f7c1a4ff9e31f9977ae3224bcb887a85\":\"0xfc936392801c00000\",\"0x999c49c174ca13bc836c1e0a92bff48b271543ca\":\"0xb1cf24ddd0b1400000\",\"0x99a4de19ded79008cfdcd45d014d2e584b8914a8\":\"0x5150ae84a8cdf00000\",\"0x99a96bf2242ea1b39ece6fcc0d18aed00c0179f3\":\"0x1043561a8829300000\",\"0x99b018932bcad355b6792b255db6702dec8ce5dd\":\"0xd8d8583fa2d52f0000\",\"0x99b743d1d9eff90d9a1934b4db21d519d89b4a38\":\"0x56bc75e2d63100000\",\"0x99b8c824869de9ed24f3bff6854cb6dd45cc3f9f\":\"0x65ea3db75546600000\",\"0x99c0174cf84e0783c220b4eb6ae18fe703854ad3\":\"0x7079a2573d0c780000\",\"0x99c1d9f40c6ab7f8a92fce2fdce47a54a586c53f\":\"0x35659ef93f0fc40000\",\"0x99c236141daec837ece04fdaee1d90cf8bbdc104\":\"0x766516acac0d200000\",\"0x99c31fe748583787cdd3e525b281b218961739e3\":\"0x3708baed3d68900000\",\"0x99c475bf02e8b9214ada5fad02fdfd15ba365c0c\":\"0x2009c5c8bf6fdc0000\",\"0x99c883258546cc7e4e971f522e389918da5ea63a\":\"0xd8d726b7177a800000\",\"0x99c9f93e45fe3c1418c353e4c5ac3894eef8121e\":\"0x585baf145050b0000\",\"0x99d1579cd42682b7644e1d4f7128441eeffe339d\":\"0x43c33c1937564800000\",\"0x99d1b585965f406a42a49a1ca70f769e765a3f98\":\"0x3894f0e6f9b9f700000\",\"0x99dfd0504c06c743e46534fd7b55f1f9c7ec3329\":\"0x6c6b935b8bbd400000\",\"0x99f4147ccc6bcb80cc842e69f6d00e30fa4133d9\":\"0x15af1d78b58c400000\",\"0x99f77f998b20e0bcdcd9fc838641526cf25918ef\":\"0x61093d7c2c6d380000\",\"0x99fad50038d0d9d4c3fbb4bce05606ecadcd5121\":\"0x6c6b935b8bbd400000\",\"0x99fe0d201228a753145655d428eb9fd94985d36d\":\"0x6920bff3515a3a0000\",\"0x9a079c92a629ca15c8cafa2eb28d5bc17af82811\":\"0x1b1ae4d6e2ef500000\",\"0x9a0d3cee3d9892ea3b3700a27ff84140d9025493\":\"0x340aad21b3b700000\",\"0x9a24ce8d485cc4c86e49deb39022f92c7430e67e\":\"0x46791fc84e07d00000\",\"0x9a2ce43b5d89d6936b8e8c354791b8afff962425\":\"0x6c6b935b8bbd400000\",\"0x9a390162535e398877e416787d6239e0754e937c\":\"0x3635c9adc5dea00000\",\"0x9a3da65023a13020d22145cfc18bab10bd19ce4e\":\"0x18bf6ea3464a3a0000\",\"0x9a3e2b1bf346dd070b027357feac44a4b2c97db8\":\"0x21e19e0c9bab2400000\",\"0x9a4ca8b82117894e43db72b9fa78f0b9b93ace09\":\"0x2b5e3af16b1880000\",\"0x9a522e52c195bfb7cf5ffaaedb91a3ba7468161d\":\"0x3635c9adc5dea00000\",\"0x9a5af31c7e06339ac8b4628d7c4db0ce0f45c8a4\":\"0x1b1ae4d6e2ef500000\",\"0x9a633fcd112cceeb765fe0418170732a9705e79c\":\"0xfc936392801c0000\",\"0x9a63d185a79129fdab19b58bb631ea36a420544e\":\"0x246ddf97976680000\",\"0x9a6708ddb8903c289f83fe889c1edcd61f854423\":\"0x3635c9adc5dea00000\",\"0x9a6ff5f6a7af7b7ae0ed9c20ecec5023d281b786\":\"0x8a12b9bd6a67ec0000\",\"0x9a82826d3c29481dcc2bd2950047e8b60486c338\":\"0x43c33c1937564800000\",\"0x9a8eca4189ff4aa8ff7ed4b6b7039f0902219b15\":\"0x1158e460913d00000\",\"0x9a953b5bcc709379fcb559d7b916afdaa50cadcc\":\"0x56bc75e2d63100000\",\"0x9a990b8aeb588d7ee7ec2ed8c2e64f7382a9fee2\":\"0x1d127db69fd8b0000\",\"0x9a9d1dc0baa77d6e20c3d849c78862dd1c054c87\":\"0x2fb474098f67c00000\",\"0x9aa48c66e4fb4ad099934e32022e827427f277ba\":\"0x21e19e0c9bab2400000\",\"0x9aa8308f42910e5ade09c1a5e282d6d91710bdbf\":\"0xad78ebc5ac6200000\",\"0x9aaafa0067647ed999066b7a4ca5b4b3f3feaa6f\":\"0x3635c9adc5dea00000\",\"0x9ab988b505cfee1dbe9cd18e9b5473b9a2d4f536\":\"0x1158e460913d000000\",\"0x9ab98d6dbb1eaae16d45a04568541ad3d8fe06cc\":\"0xec50464fe23f38000\",\"0x9aba2b5e27ff78baaab5cdc988b7be855cebbdce\":\"0x21e0c0013070adc0000\",\"0x9ac4da51d27822d1e208c96ea64a1e5b55299723\":\"0x56c5579f722140000\",\"0x9ac85397792a69d78f286b86432a07aeceb60e64\":\"0xc673ce3c40160000\",\"0x9ac907ee85e6f3e223459992e256a43fa08fa8b2\":\"0x21e19e0c9bab2400000\",\"0x9ad47fdcf9cd942d28effd5b84115b31a658a13e\":\"0xb259ec00d53b280000\",\"0x9adbd3bc7b0afc05d1d2eda49ff863939c48db46\":\"0xad6eedd17cf3b8000\",\"0x9adf458bff3599eee1a26398853c575bc38c6313\":\"0xf2dc7d47f15600000\",\"0x9ae13bd882f2576575921a94974cbea861ba0d35\":\"0xab4dcf399a3a600000\",\"0x9ae9476bfecd3591964dd325cf8c2a24faed82c1\":\"0xd8d726b7177a800000\",\"0x9af100cc3dae83a33402051ce4496b16615483f6\":\"0x6c6b935b8bbd400000\",\"0x9af11399511c213181bfda3a8b264c05fc81b3ce\":\"0x2f6f10780d22cc00000\",\"0x9af5c9894c33e42c2c518e3ac670ea9505d1b53e\":\"0xfc936392801c0000\",\"0x9af9dbe47422d177f945bdead7e6d82930356230\":\"0xd5967be4fc3f100000\",\"0x9afa536b4c66bc38d875c4b30099d9261fdb38eb\":\"0xb2a8f842a77bc8000\",\"0x9b06ad841dffbe4ccf46f1039fc386f3c321446e\":\"0x6c6b935b8bbd400000\",\"0x9b1168de8ab64b47552f3389800a9cc08b4666cf\":\"0x5dc892aa1131c80000\",\"0x9b1811c3051f46e664ae4bc9c824d18592c4574a\":\"0xad6eedd17cf3b8000\",\"0x9b18478655a4851cc906e660feac61f7f4c8bffc\":\"0xe2478d38907d840000\",\"0x9b22a80d5c7b3374a05b446081f97d0a34079e7f\":\"0xa2a15d09519be00000\",\"0x9b2be7f56754f505e3441a10f7f0e20fd3ddf849\":\"0x126e72a69a50d00000\",\"0x9b32cf4f5115f4b34a00a64c617de06387354323\":\"0x5b81ed888207c8000\",\"0x9b43dcb95fde318075a567f1e6b57617055ef9e8\":\"0xd5967be4fc3f100000\",\"0x9b444fd337e5d75293adcfff70e1ea01db023222\":\"0x56bc75e2d63100000\",\"0x9b4824ff9fb2abda554dee4fb8cf549165570631\":\"0x1158e460913d00000\",\"0x9b4c2715780ca4e99e60ebf219f1590c8cad500a\":\"0x56bc75e2d631000000\",\"0x9b59eb213b1e7565e45047e04ea0374f10762d16\":\"0x6c6b935b8bbd400000\",\"0x9b5c39f7e0ac168c8ed0ed340477117d1b682ee9\":\"0x55005f0c614480000\",\"0x9b5ec18e8313887df461d2902e81e67a8f113bb1\":\"0x56bc75e2d63100000\",\"0x9b64d3cd8d2b73f66841b5c46bb695b88a9ab75d\":\"0x1203a4f760c168000\",\"0x9b658fb361e046d4fcaa8aef6d02a99111223625\":\"0x6c6b935b8bbd400000\",\"0x9b6641b13e172fc072ca4b8327a3bc28a15b66a9\":\"0x68155a43676e00000\",\"0x9b68f67416a63bf4451a31164c92f672a68759e9\":\"0xcb49b44ba602d800000\",\"0x9b773669e87d76018c090f8255e54409b9dca8b2\":\"0x1158e460913d00000\",\"0x9b77ebced7e215f0920e8c2b870024f6ecb2ff31\":\"0x3635c9adc5dea00000\",\"0x9b7c8810cc7cc89e804e6d3e38121850472877fe\":\"0x6c6b935b8bbd400000\",\"0x9ba53dc8c95e9a472feba2c4e32c1dc4dd7bab46\":\"0x487a9a304539440000\",\"0x9bacd3d40f3b82ac91a264d9d88d908eac8664b9\":\"0x43c33c1937564800000\",\"0x9bb760d5c289a3e1db18db095345ca413b9a43c2\":\"0xaadec983fcff40000\",\"0x9bb76204186af2f63be79168601687fc9bad661f\":\"0x1043561a8829300000\",\"0x9bb9b02a26bfe1ccc3f0c6219e261c397fc5ca78\":\"0x487a9a304539440000\",\"0x9bc573bcda23b8b26f9073d90c230e8e71e0270b\":\"0x362f75a4305d0c0000\",\"0x9bd7c38a4210304a4d653edeff1b3ce45fce7843\":\"0xf498941e664280000\",\"0x9bd88068e13075f3a8cac464a5f949d6d818c0f6\":\"0x14542ba12a337c00000\",\"0x9bd905f1719fc7acd0159d4dc1f8db2f21472338\":\"0x3635c9adc5dea00000\",\"0x9bdbdc9b973431d13c89a3f9757e9b3b6275bfc7\":\"0x1b1a7dcf8a44d38000\",\"0x9be3c329b62a28b8b0886cbd8b99f8bc930ce3e6\":\"0x409e52b48369a0000\",\"0x9bf58efbea0784eb068adecfa0bb215084c73a35\":\"0x13a6b2b564871a00000\",\"0x9bf672d979b36652fc5282547a6a6bc212ae4368\":\"0x238fd42c5cf0400000\",\"0x9bf703b41c3624e15f4054962390bcba3052f0fd\":\"0x1483e01533c2e3c0000\",\"0x9bf71f7fb537ac54f4e514947fa7ff6728f16d2f\":\"0x1cf84a30a0a0c0000\",\"0x9bf9b3b2f23cf461eb591f28340bc719931c8364\":\"0x3635c9adc5dea00000\",\"0x9bfc659c9c601ea42a6b21b8f17084ec87d70212\":\"0x21e19e0c9bab2400000\",\"0x9bfff50db36a785555f07652a153b0c42b1b8b76\":\"0x6c6b935b8bbd400000\",\"0x9c05e9d0f0758e795303717e31da213ca157e686\":\"0x3635c9adc5dea00000\",\"0x9c1b771f09af882af0643083de2aa79dc097c40e\":\"0x8670e9ec6598c00000\",\"0x9c28a2c4086091cb5da226a657ce3248e8ea7b6f\":\"0xf2dc7d47f15600000\",\"0x9c2fd54089af665df5971d73b804616039647375\":\"0x3635c9adc5dea00000\",\"0x9c344098ba615a398f11d009905b177c44a7b602\":\"0x3635c9adc5dea00000\",\"0x9c3d0692ceeef80aa4965ceed262ffc7f069f2dc\":\"0xad78ebc5ac6200000\",\"0x9c405cf697956138065e11c5f7559e67245bd1a5\":\"0xad78ebc5ac6200000\",\"0x9c45202a25f6ad0011f115a5a72204f2f2198866\":\"0x10fcf3a62b080980000\",\"0x9c49deff47085fc09704caa2dca8c287a9a137da\":\"0x1b1ae4d6e2ef5000000\",\"0x9c4bbcd5f1644a6f075824ddfe85c571d6abf69c\":\"0x6194049f30f7200000\",\"0x9c526a140683edf1431cfaa128a935e2b614d88b\":\"0x6046f37e5945c0000\",\"0x9c54e4ed479a856829c6bb42da9f0b692a75f728\":\"0x197a8f6dd5519800000\",\"0x9c581a60b61028d934167929b22d70b313c34fd0\":\"0xa968163f0a57b400000\",\"0x9c5cc111092c122116f1a85f4ee31408741a7d2f\":\"0x1ab2cf7c9f87e20000\",\"0x9c6bc9a46b03ae5404f043dfcf21883e4110cc33\":\"0xad78ebc5ac6200000\",\"0x9c78963fbc263c09bd72e4f8def74a9475f7055c\":\"0x2eb8eb1a172dcb80000\",\"0x9c78fbb4df769ce2c156920cfedfda033a0e254a\":\"0x6acb3df27e1f880000\",\"0x9c7b6dc5190fe2912963fcd579683ec7395116b0\":\"0x2a1129d09367200000\",\"0x9c80bc18e9f8d4968b185da8c79fa6e11ffc3e23\":\"0xd02ab486cedc00000\",\"0x9c98fdf1fdcd8ba8f4c5b04c3ae8587efdf0f6e6\":\"0x14542ba12a337c00000\",\"0x9c99a1da91d5920bc14e0cb914fdf62b94cb8358\":\"0x43c33c1937564800000\",\"0x9c99b62606281b5cefabf36156c8fe62839ef5f3\":\"0xd8d726b7177a800000\",\"0x9c9a07a8e57c3172a919ef64789474490f0d9f51\":\"0x21e19e0c9bab2400000\",\"0x9c9de44724a4054da0eaa605abcc802668778bea\":\"0xad7d5ca3fa5a20000\",\"0x9c9f3b8a811b21f3ff3fe20fe970051ce66a824f\":\"0x3ec2debc07d4be0000\",\"0x9c9f89a3910f6a2ae8a91047a17ab788bddec170\":\"0x21e19e0c9bab2400000\",\"0x9ca0429f874f8dcee2e9c062a9020a842a587ab9\":\"0x6c6b935b8bbd400000\",\"0x9ca42ee7a0b898f6a5cc60b5a5d7b1bfa3c33231\":\"0x6c6b935b8bbd400000\",\"0x9cb28ac1a20a106f7f373692c5ce4c73f13732a1\":\"0x3635c9adc5dea00000\",\"0x9ccddcb2cfc2b25b08729a0a98d9e6f0202ea2c1\":\"0x56bc75e2d63100000\",\"0x9ce27f245e02d1c312c1d500788c9def7690453b\":\"0xad78ebc5ac6200000\",\"0x9ce5363b13e8238aa4dd15acd0b2e8afe0873247\":\"0xad78ebc5ac6200000\",\"0x9cf2928beef09a40f9bfc953be06a251116182fb\":\"0x14542ba12a337c00000\",\"0x9d069197d1de50045a186f5ec744ac40e8af91c6\":\"0x6c6b935b8bbd400000\",\"0x9d0e7d92fb305853d798263bf15e97c72bf9d7e0\":\"0x3635c9adc5dea00000\",\"0x9d0f347e826b7dceaad279060a35c0061ecf334b\":\"0xd8d726b7177a800000\",\"0x9d207517422cc0d60de7c237097a4d4fce20940c\":\"0x1b1ae4d6e2ef500000\",\"0x9d250ae4f110d71cafc7b0adb52e8d9acb6679b8\":\"0x2156d6e997213c00000\",\"0x9d2bfc36106f038250c01801685785b16c86c60d\":\"0x5077d75df1b675800000\",\"0x9d30cb237bc096f17036fc80dd21ca68992ca2d9\":\"0x66ee7318fdc8f300000\",\"0x9d32962ea99700d93228e9dbdad2cc37bb99f07e\":\"0xb4632bedd4ded40000\",\"0x9d34dac25bd15828faefaaf28f710753b39e89dc\":\"0x3b1c56fed02df00000\",\"0x9d369165fb70b81a3a765f188fd60cbe5e7b0968\":\"0x6c6b935b8bbd400000\",\"0x9d40e012f60425a340d82d03a1c757bfabc706fb\":\"0x9346f3addc88d8000\",\"0x9d4174aa6af28476e229dadb46180808c67505c1\":\"0x421afda42ed6970000\",\"0x9d4213339a01551861764c87a93ce8f85f87959a\":\"0xad78ebc5ac6200000\",\"0x9d460c1b379ddb19a8c85b4c6747050ddf17a875\":\"0xb50fcfafebecb00000\",\"0x9d47ba5b4c8505ad8da42934280b61a0e1e8b971\":\"0x56bc75e2d63100000\",\"0x9d4d321177256ebd9afbda304135d517c3dc5693\":\"0x2164b7a04ac8a00000\",\"0x9d4ff989b7bed9ab109d10c8c7e55f02d76734ad\":\"0x3635c9adc5dea00000\",\"0x9d511543b3d9dc60d47f09d49d01b6c498d82078\":\"0x26197b9516fc3940000\",\"0x9d6ecfa03af2c6e144b7c4692a86951e902e9e1f\":\"0xa2a5aa60ad243f0000\",\"0x9d7655e9f3e5ba5d6e87e412aebe9ee0d49247ee\":\"0x8e09311c1d80fa0000\",\"0x9d7831e834c20b1baa697af1d8e0c621c5afff9a\":\"0x4b06dbbb40f4a0000\",\"0x9d78a975b7db5e4d8e28845cfbe7e31401be0dd9\":\"0x48a43c54602f700000\",\"0x9d799e943e306ba2e5b99c8a6858cbb52c0cf735\":\"0x1043561a8829300000\",\"0x9d7fda7070bf3ee9bbd9a41f55cad4854ae6c22c\":\"0x255cba3c46fcf120000\",\"0x9d81aea69aed6ad07089d61445348c17f34bfc5b\":\"0x1043561a8829300000\",\"0x9d911f3682f32fe0792e9fb6ff3cfc47f589fca5\":\"0xd8d726b7177a800000\",\"0x9d913b5d339c95d87745562563fea98b23c60cc4\":\"0x941302c7f4d230000\",\"0x9d93fab6e22845f8f45a07496f11de71530debc7\":\"0x6c4fd1ee246e780000\",\"0x9d99b189bbd9a48fc2e16e8fcda33bb99a317bbb\":\"0x3d16e10b6d8bb20000\",\"0x9d9c4efe9f433989e23be94049215329fa55b4cb\":\"0xde3b28903c6b58000\",\"0x9d9e57fde30e5068c03e49848edce343b7028358\":\"0x5dc892aa1131c80000\",\"0x9da3302240af0511c6fd1857e6ddb7394f77ab6b\":\"0xa80d24677efef00000\",\"0x9da4ec407077f4b9707b2d9d2ede5ea5282bf1df\":\"0xd8d726b7177a800000\",\"0x9da609fa3a7e6cf2cc0e70cdabe78dc4e382e11e\":\"0x410d586a20a4c00000\",\"0x9da61ccd62bf860656e0325d7157e2f160d93bb5\":\"0x10f0ca956f8799e0000\",\"0x9da6e075989c7419094cc9f6d2e49393bb199688\":\"0x259bb71d5adf3f00000\",\"0x9da8e22ca10e67fea44e525e4751eeac36a31194\":\"0xe18398e7601900000\",\"0x9db2e15ca681f4c66048f6f9b7941ed08b1ff506\":\"0xd8d726b7177a800000\",\"0x9dc10fa38f9fb06810e11f60173ec3d2fd6a751e\":\"0x6acb3df27e1f880000\",\"0x9dd2196624a1ddf14a9d375e5f07152baf22afa2\":\"0x41b05e2463a5438000\",\"0x9dd46b1c6d3f05e29e9c6f037eed9a595af4a9aa\":\"0x1b1ae4d6e2ef500000\",\"0x9ddd355e634ee9927e4b7f6c97e7bf3a2f1e687a\":\"0x2b5e3af16b1880000\",\"0x9de20ae76aa08263b205d5142461961e2408d266\":\"0xda933d8d8c6700000\",\"0x9de20bc37e7f48a80ffd7ad84ffbf1a1abe1738c\":\"0xad78ebc5ac6200000\",\"0x9de7386dde401ce4c67b71b6553f8aa34ea5a17d\":\"0x340aad21b3b700000\",\"0x9deb39027af877992b89f2ec4a1f822ecdf12693\":\"0x6c6b935b8bbd400000\",\"0x9defe56a0ff1a1947dba0923f7dd258d8f12fa45\":\"0x5b12aefafa804000000\",\"0x9df057cd03a4e27e8e032f857985fd7f01adc8d7\":\"0x6c6b935b8bbd400000\",\"0x9df32a501c0b781c0281022f42a1293ffd7b892a\":\"0x1e7e4171bf4d3a00000\",\"0x9e01765aff08bc220550aca5ea2e1ce8e5b09923\":\"0x3635c9adc5dea00000\",\"0x9e20e5fd361eabcf63891f5b87b09268b8eb3793\":\"0x56bc75e2d63100000\",\"0x9e232c08c14dc1a6ed0b8a3b2868977ba5c17d10\":\"0x1158e460913d00000\",\"0x9e23c5e4b782b00a5fadf1aead87dacf5b0367a1\":\"0x1158e460913d00000\",\"0x9e35399071a4a101e9194daa3f09f04a0b5f9870\":\"0xd8d726b7177a800000\",\"0x9e3eb509278fe0dcd8e0bbe78a194e06b6803943\":\"0x32f51edbaaa3300000\",\"0x9e427272516b3e67d4fcbf82f59390d04c8e28e5\":\"0xd8d726b7177a800000\",\"0x9e4cec353ac3e381835e3c0991f8faa5b7d0a8e6\":\"0x21e18b9e9ab45e48000\",\"0x9e5811b40be1e2a1e1d28c3b0774acde0a09603d\":\"0xa2a15d09519be00000\",\"0x9e5a311d9f69898a7c6a9d6360680438e67a7b2f\":\"0x50c5e761a444080000\",\"0x9e7c2050a227bbfd60937e268cea3e68fea8d1fe\":\"0x56bc75e2d63100000\",\"0x9e7f65a90e8508867bccc914256a1ea574cf07e3\":\"0x433874f632cc600000\",\"0x9e8144e08e89647811fe6b72d445d6a5f80ad244\":\"0x21e19e0c9bab2400000\",\"0x9e8f64ddcde9b8b451bafaa235a9bf511a25ac91\":\"0x90f534608a72880000\",\"0x9e951f6dc5e352afb8d04299d2478a451259bf56\":\"0x3e7419881a73a0000\",\"0x9e960dcd03d5ba99cb115d17ff4c09248ad4d0be\":\"0xad78ebc5ac6200000\",\"0x9eaf6a328a4076024efa6b67b48b21eedcc0f0b8\":\"0x890b0c2e14fb80000\",\"0x9eb1ff71798f28d6e989fa1ea0588e27ba86cb7d\":\"0x7a1fe160277000000\",\"0x9eb281c32719c40fdb3e216db0f37fbc73a026b7\":\"0x1158e460913d00000\",\"0x9eb3a7cb5e6726427a3a361cfa8d6164dbd0ba16\":\"0x2b95bdcc39b6100000\",\"0x9eb7834e171d41e069a77947fca87622f0ba4e48\":\"0x56bc75e2d63100000\",\"0x9ec03e02e587b7769def538413e97f7e55be71d8\":\"0x42bf06b78ed3b500000\",\"0x9ecbabb0b22782b3754429e1757aaba04b81189f\":\"0x2ca7bb061f5e998000\",\"0x9ece1400800936c7c6485fcdd3626017d09afbf6\":\"0x10ce1d3d8cb3180000\",\"0x9ed4e63f526542d44fddd34d59cd25388ffd6bda\":\"0xd29b34a46348940000\",\"0x9ed80eda7f55054db9fb5282451688f26bb374c1\":\"0x1043561a8829300000\",\"0x9edc90f4be210865214ab5b35e5a8dd77415279d\":\"0xd8d726b7177a800000\",\"0x9edeac4c026b93054dc5b1d6610c6f3960f2ad73\":\"0x410d586a20a4c00000\",\"0x9ee93f339e6726ec65eea44f8a4bfe10da3d3282\":\"0x6c6b935b8bbd400000\",\"0x9ee9760cc273d4706aa08375c3e46fa230aff3d5\":\"0x1e52e336cde22180000\",\"0x9eeb07bd2b7890195e7d46bdf2071b6617514ddb\":\"0x6c6b935b8bbd400000\",\"0x9eef442d291a447d74c5d253c49ef324eac1d8f0\":\"0xb96608c8103bf00000\",\"0x9ef1896b007c32a15114fb89d73dbd47f9122b69\":\"0xd8d726b7177a800000\",\"0x9f017706b830fb9c30efb0a09f506b9157457534\":\"0x6c6b935b8bbd400000\",\"0x9f10f2a0463b65ae30b070b3df18cf46f51e89bd\":\"0x678a932062e4180000\",\"0x9f19fac8a32437d80ac6837a0bb7841729f4972e\":\"0x233df3299f61720000\",\"0x9f1aa8fcfc89a1a5328cbd6344b71f278a2ca4a0\":\"0x1b1ae4d6e2ef500000\",\"0x9f21302ca5096bea7402b91b0fd506254f999a3d\":\"0x4397451a003dd80000\",\"0x9f271d285500d73846b18f733e25dd8b4f5d4a8b\":\"0x2723c346ae18080000\",\"0x9f3497f5ef5fe63095836c004eb9ce02e9013b4b\":\"0x2256861bf9cf080000\",\"0x9f3a74fd5e7edcc1162993171381cbb632b7cff0\":\"0x21e19e0c9bab2400000\",\"0x9f46e7c1e9078cae86305ac7060b01467d6685ee\":\"0x243d4d18229ca20000\",\"0x9f496cb2069563144d0811677ba0e4713a0a4143\":\"0x3cd2e0bf63a4480000\",\"0x9f4a7195ac7c151ca258cafda0cab083e049c602\":\"0x53538c32185cee0000\",\"0x9f4ac9c9e7e24cb2444a0454fa5b9ad9d92d3853\":\"0x2d43f3ebfafb2c0000\",\"0x9f5f44026b576a4adb41e95961561d41039ca391\":\"0xd8d726b7177a80000\",\"0x9f607b3f12469f446121cebf3475356b71b4328c\":\"0xd8d726b7177a800000\",\"0x9f61beb46f5e853d0a8521c7446e68e34c7d0973\":\"0x1e5b8fa8fe2ac00000\",\"0x9f64a8e8dacf4ade30d10f4d59b0a3d5abfdbf74\":\"0x36369ed7747d260000\",\"0x9f662e95274121f177566e636d23964cf1fd686f\":\"0x6c6b935b8bbd400000\",\"0x9f6a322a6d469981426ae844865d7ee0bb15c7b3\":\"0x2b5ee57929fdb8000\",\"0x9f7986924aeb02687cd64189189fb167ded2dd5c\":\"0x35659ef93f0fc40000\",\"0x9f7a0392f857732e3004a375e6b1068d49d83031\":\"0x6c6b935b8bbd400000\",\"0x9f8245c3ab7d173164861cd3991b94f1ba40a93a\":\"0x9b0a791f1211300000\",\"0x9f83a293c324d4106c18faa8888f64d299054ca0\":\"0xad78ebc5ac6200000\",\"0x9f86a066edb61fcb5856de93b75c8c791864b97b\":\"0x6c6b935b8bbd400000\",\"0x9f98eb34d46979b0a6de8b05aa533a89b825dcf1\":\"0x4b06dbbb40f4a0000\",\"0x9f9fe0c95f10fee87af1af207236c8f3614ef02f\":\"0x14542ba12a337c00000\",\"0x9faea13c733412dc4b490402bfef27a0397a9bc3\":\"0x10ce1d3d8cb3180000\",\"0x9fbe066de57236dc830725d32a02aef9246c6c5e\":\"0x6c6b935b8bbd400000\",\"0x9fd1052a60506bd1a9ef003afd9d033c267d8e99\":\"0x3635c9adc5dea00000\",\"0x9fd64373f2fbcd9c0faca60547cad62e26d9851f\":\"0x3635c9adc5dea00000\",\"0x9fe501aa57ead79278937cd6308c5cfa7a5629fe\":\"0x2b5ee57929fdb8000\",\"0x9ffc5fe06f33f5a480b75aa94eb8556d997a16c0\":\"0x1158e460913d00000\",\"0x9ffcf5ef46d933a519d1d16c6ba3189b27496224\":\"0x3635c9adc5dea00000\",\"0x9ffedcc36b7cc312ad2a9ede431a514fccb49ba3\":\"0x244f579f3f5ca40000\",\"0xa006268446643ec5e81e7acb3f17f1c351ee2ed9\":\"0xd8d726b7177a800000\",\"0xa008019863c1a77c1499eb39bbd7bf2dd7a31cb9\":\"0x76d41c62494840000\",\"0xa009bf076f1ba3fa57d2a7217218bed5565a7a7a\":\"0x3635c9adc5dea00000\",\"0xa01e9476df84431825c836e8803a97e22fa5a0cd\":\"0x14542ba12a337c00000\",\"0xa01f12d70f44aa7b113b285c22dcdb45873454a7\":\"0xfc936392801c0000\",\"0xa01fd1906a908506dedae1e208128872b56ee792\":\"0xa2a15d09519be00000\",\"0xa0228240f99e1de9cb32d82c0f2fa9a3d44b0bf3\":\"0x56bc75e2d631000000\",\"0xa02bde6461686e19ac650c970d0672e76dcb4fc2\":\"0x1e09296c3378de40000\",\"0xa02c1e34064f0475f7fa831ccb25014c3aa31ca2\":\"0x340aad21b3b700000\",\"0xa02dc6aa328b880de99eac546823fccf774047fb\":\"0x6acb3df27e1f880000\",\"0xa02e3f8f5959a7aab7418612129b701ca1b80010\":\"0x1158e460913d00000\",\"0xa0347f0a98776390165c166d32963bf74dcd0a2f\":\"0x3635c9adc5dea00000\",\"0xa035a3652478f82dbd6d115faa8ca946ec9e681d\":\"0x5f4e42dd4afec0000\",\"0xa03a3dc7c533d1744295be955d61af3f52b51af5\":\"0x22b1c8c1227a00000\",\"0xa0459ef3693aacd1647cd5d8929839204cef53be\":\"0x3635c9adc5dea00000\",\"0xa04f2ae02add14c12faf65cb259022d0830a8e26\":\"0x152d02c7e14af6800000\",\"0xa06cd1f396396c0a64464651d7c205efaf387ca3\":\"0x6c6acc67d7b1d40000\",\"0xa072691c8dd7cd4237ff72a75c1a9506d0ce5b9e\":\"0x140ec80fa7ee880000\",\"0xa072cebe62a9e9f61cc3fbf88a9efbfe3e9a8d70\":\"0x15af1d78b58c400000\",\"0xa07682000b1bcf3002f85c80c0fa2949bd1e82fd\":\"0xd8d726b7177a800000\",\"0xa07aa16d74aee8a9a3288d52db1551d593883297\":\"0x2086ac351052600000\",\"0xa08d215b5b6aac4861a281ac7e400b78fef04cbf\":\"0x1158e460913d00000\",\"0xa0951970dfd0832fb83bda12c23545e79041756c\":\"0x2086ac351052600000\",\"0xa09f4d5eaa65a2f4cb750a49923401dae59090af\":\"0x796e3ea3f8ab00000\",\"0xa0a0e65204541fca9b2fb282cd95138fae16f809\":\"0x21e19e0c9bab2400000\",\"0xa0aa5f0201f04d3bbeb898132f7c11679466d901\":\"0x1fbed5215bb4c0000\",\"0xa0aadbd9509722705f6d2358a5c79f37970f00f6\":\"0xad78ebc5ac6200000\",\"0xa0b771951ce1deee363ae2b771b73e07c4b5e800\":\"0x4be4e7267b6ae00000\",\"0xa0de5c601e696635c698b7ae9ca4539fc7b941ec\":\"0x12c3cbd704c9770000\",\"0xa0e8ba661b48154cf843d4c2a5c0f792d528ee29\":\"0x15af1d78b58c400000\",\"0xa0fc7e53c5ebd27a2abdac45261f84ab3b51aefb\":\"0xa313daec9bc0d90000\",\"0xa0ff5b4cf016027e8323497d4428d3e5a83b8795\":\"0x16598d3c83ec0420000\",\"0xa106465bbd19e1b6bce50d1b1157dc59095a3630\":\"0x6c6b935b8bbd400000\",\"0xa106e6923edd53ca8ed650968a9108d6ccfd9670\":\"0x202fe1505afec898000\",\"0xa109e18bb0a39c9ef82fa19597fc5ed8e9eb6d58\":\"0x58e7926ee858a00000\",\"0xa11a03c4bb26d21eff677d5d555c80b25453ee7a\":\"0x3cb2759bc410f8000\",\"0xa11effab6cf0f5972cffe4d56596e98968144a8f\":\"0x5a87e7d7f5f6580000\",\"0xa1204dad5f560728a35c0d8fc79481057bf77386\":\"0x3635c9adc5dea00000\",\"0xa12623e629df93096704b16084be2cd89d562da4\":\"0x1ccc9324511e4500000\",\"0xa12a6c2d985daf0e4f5f207ae851aaf729b332cd\":\"0x152d02c7e14af6800000\",\"0xa1336dfb96b6bcbe4b3edf3205be5723c90fad52\":\"0x10f0cf064dd59200000\",\"0xa13b9d82a99b3c9bba5ae72ef2199edc7d3bb36c\":\"0x6c6acc67d7b1d40000\",\"0xa13cfe826d6d1841dcae443be8c387518136b5e8\":\"0x1da56a4b0835bf800000\",\"0xa1432ed2c6b7777a88e8d46d388e70477f208ca5\":\"0x1b1a7e413a196c50000\",\"0xa144f6b60f72d64a21e330dadb62d8990ade2b09\":\"0x3635c9adc5dea00000\",\"0xa15025f595acdbf3110f77c5bf24477e6548f9e8\":\"0x6c6b935b8bbd400000\",\"0xa158148a2e0f3e92dc2ce38febc20107e3253c96\":\"0x6c6b935b8bbd400000\",\"0xa16160851d2b9c349b92e46f829abfb210943595\":\"0x61093d7c2c6d380000\",\"0xa166f911c644ac3213d29e0e1ae010f794d5ad26\":\"0x6c6b935b8bbd400000\",\"0xa16d9e3d63986159a800b46837f45e8bb980ee0b\":\"0x6e1175da7ad1200000\",\"0xa17070c2e9c5a940a4ec0e4954c4d7d643be8f49\":\"0x6c6b17033b361c8000\",\"0xa17c9e4323069518189d5207a0728dcb92306a3f\":\"0x3635c9adc5dea00000\",\"0xa18360e985f2062e8f8efe02ad2cbc91ad9a5aad\":\"0xa2a15d09519be00000\",\"0xa1911405cf6e999ed011f0ddcd2a4ff7c28f2526\":\"0x22b1c8c1227a00000\",\"0xa192698007cc11aa603d221d5feea076bcf7c30d\":\"0x6c6b935b8bbd400000\",\"0xa192f06ab052d5fd7f94eea8318e827815fe677a\":\"0x71f8a93d01e540000\",\"0xa1998144968a5c70a6415554cefec2824690c4a5\":\"0x1158e460913d00000\",\"0xa1a1f0fa6d20b50a794f02ef52085c9d036aa6ca\":\"0x3635c9adc5dea00000\",\"0xa1ae8d4540d4db6fdde7146f415b431eb55c7983\":\"0xaadec983fcff40000\",\"0xa1b47c4d0ed6018842e6cfc8630ac3a3142e5e6b\":\"0x1158e460913d00000\",\"0xa1c4f45a82e1c478d845082eb18875c4ea6539ab\":\"0x2a5a058fc295ed000000\",\"0xa1dcd0e5b05a977c9623e5ae2f59b9ada2f33e31\":\"0x56bc75e2d63100000\",\"0xa1e4380a3b1f749673e270229993ee55f35663b4\":\"0x6c6b935b8bbd400000\",\"0xa1f193a0592f1feb9fdfc90aa813784eb80471c9\":\"0x4be4e7267b6ae00000\",\"0xa1f2854050f872658ed82e52b0ad7bbc1cb921f6\":\"0x6d0317e2b326f70000\",\"0xa1f5b840140d5a9acef402ac3cc3886a68cad248\":\"0x6c6b935b8bbd400000\",\"0xa1f765c44fe45f790677944844be4f2d42165fbd\":\"0xc7e9cfde768ec70000\",\"0xa1f7dde1d738d8cd679ea1ee965bee224be7d04d\":\"0x3d184450e5e93c0000\",\"0xa1f8d8bcf90e777f19b3a649759ad95027abdfc3\":\"0xad78ebc5ac6200000\",\"0xa202547242806f6e70e74058d6e5292defc8c8d4\":\"0x6c8754c8f30c080000\",\"0xa20d071b1b003063497d7990e1249dabf36c35f7\":\"0x3635c9adc5dea00000\",\"0xa20d8ff60caae31d02e0b665fa435d76f77c9442\":\"0x1a8a909dfcef400000\",\"0xa211da03cc0e31ecce5309998718515528a090df\":\"0xad78ebc5ac6200000\",\"0xa21442ab05340ade68c915f3c3399b9955f3f7eb\":\"0x2a034919dfbfbc0000\",\"0xa2222259dd9c3e3ded127084f808e92a1887302c\":\"0x8c8339dafed480000\",\"0xa22ade0ddb5c6ef8d0cd8de94d82b11082cb2e91\":\"0x374b57f3cef2700000\",\"0xa24c3ab62181e9a15b78c4621e4c7c588127be26\":\"0x8cde43a83d3310000\",\"0xa257ad594bd88328a7d90fc0a907df95eecae316\":\"0x1c3786ff3846930000\",\"0xa25b086437fd2192d0a0f64f6ed044f38ef3da32\":\"0x12290f15180bdc0000\",\"0xa276b058cb98d88beedb67e543506c9a0d9470d8\":\"0x90aafc76e02fbe0000\",\"0xa282e969cac9f7a0e1c0cd90f5d0c438ac570da3\":\"0x2207eb89fc27380000\",\"0xa291e9c7990d552dd1ae16cebc3fca342cbaf1d1\":\"0x43c33c1937564800000\",\"0xa29319e81069e5d60df00f3de5adee3505ecd5fb\":\"0x6c6b935b8bbd400000\",\"0xa2968fc1c64bac0b7ae0d68ba949874d6db253f4\":\"0x43c33c1937564800000\",\"0xa29d5bda74e003474872bd5894b88533ff64c2b5\":\"0x21e19e0c9bab2400000\",\"0xa29d661a6376f66d0b74e2fe9d8f26c0247ec84c\":\"0xdf3304079c13d20000\",\"0xa2a435de44a01bd0ecb29e44e47644e46a0cdffb\":\"0x1b1d445a7affe78000\",\"0xa2ace4c993bb1e5383f8ac74e179066e814f0591\":\"0x56bc75e2d63100000\",\"0xa2b701f9f5cdd09e4ba62baebae3a88257105885\":\"0x3635c9adc5dea00000\",\"0xa2c5854ff1599f98892c5725d262be1da98aadac\":\"0x1109ff333010e78000\",\"0xa2c7eaffdc2c9d937345206c909a52dfb14c478f\":\"0x7c0860e5a80dc0000\",\"0xa2d2aa626b09d6d4e4b13f7ffc5a88bd7ad36742\":\"0xfb8078507553830000\",\"0xa2d38de1c73906f6a7ca6efeb97cf6f69cc421be\":\"0x3635c9adc5dea00000\",\"0xa2dc65ee256b59a5bd7929774f904b358df3ada1\":\"0x483bce28beb09f80000\",\"0xa2e0683a805de6a05edb2ffbb5e96f0570b637c3\":\"0x1158e460913d00000\",\"0xa2e1b8aa900e9c139b3fa122354f6156d92a18b1\":\"0x1b1ae4d6e2ef500000\",\"0xa2e2b5941e0c01944bfe1d5fb4e8a34b922ccfb1\":\"0xad78ebc5ac6200000\",\"0xa2e460a989cb15565f9ecca7d121a18e4eb405b6\":\"0x6c6b935b8bbd400000\",\"0xa2ecce2c49f72a0995a0bda57aacf1e9f001e22a\":\"0xd8d726b7177a800000\",\"0xa2f472fe4f22b77db489219ea4023d11582a9329\":\"0x878678326eac9000000\",\"0xa2f798e077b07d86124e1407df32890dbb4b6379\":\"0xad78ebc5ac6200000\",\"0xa2f86bc061884e9eef05640edd51a2f7c0596c69\":\"0x6c6c44fe47ec050000\",\"0xa2fa17c0fb506ce494008b9557841c3f641b8cae\":\"0x1158e460913d00000\",\"0xa304588f0d850cd8d38f76e9e83c1bf63e333ede\":\"0x2285601216c8c0000\",\"0xa3058c51737a4e96c55f2ef6bd7bb358167ec2a7\":\"0x20db3ae4481ad48000\",\"0xa309df54cabce70c95ec3033149cd6678a6fd4cf\":\"0xc1f12c75101580000\",\"0xa30a45520e5206d9004070e6af3e7bb2e8dd5313\":\"0x15af1d78b58c400000\",\"0xa30e0acb534c9b3084e8501da090b4eb16a2c0cd\":\"0x6c6b935b8bbd400000\",\"0xa3203095edb7028e6871ce0a84f548459f83300a\":\"0xd8d726b7177a800000\",\"0xa321091d3018064279db399d2b2a88a6f440ae24\":\"0xad78ebc5ac62000000\",\"0xa3232d068d50064903c9ebc563b515acc8b7b097\":\"0x6c8754c8f30c080000\",\"0xa3241d890a92baf52908dc4aa049726be426ebd3\":\"0x43c2da661ca2f540000\",\"0xa3294626ec2984c43b43da4d5d8e4669b11d4b59\":\"0x36a4cf636319c00000\",\"0xa32cf7dde20c3dd5679ff5e325845c70c5962662\":\"0x1158e460913d00000\",\"0xa339a3d8ca280e27d2415b26d1fc793228b66043\":\"0x36f28695b78ff00000\",\"0xa33cb450f95bb46e25afb50fe05feee6fb8cc8ea\":\"0x2a1129d09367200000\",\"0xa33f70da7275ef057104dfa7db64f472e9f5d553\":\"0x45946b0f9e9d60000\",\"0xa34076f84bd917f20f8342c98ba79e6fb08ecd31\":\"0xe3aeb5737240a00000\",\"0xa3430e1f647f321ed34739562323c7d623410b56\":\"0x3634fb9f1489a70000\",\"0xa34f9d568bf7afd94c2a5b8a5ff55c66c4087999\":\"0x847d503b220eb00000\",\"0xa35606d51220ee7f2146d411582ee4ee4a45596e\":\"0xd8aabe080bc9400000\",\"0xa356551bb77d4f45a6d7e09f0a089e79cca249cb\":\"0x126e72a69a50d00000\",\"0xa35c19132cac1935576abfed6c0495fb07881ba0\":\"0x6c6b935b8bbd400000\",\"0xa365918bfe3f2627b9f3a86775d8756e0fd8a94b\":\"0x15af1d78b58c400000\",\"0xa36e0d94b95364a82671b608cb2d373245612909\":\"0x821d221b5291f8000\",\"0xa375b4bc24a24e1f797593cc302b2f331063fa5c\":\"0xad78ebc5ac6200000\",\"0xa37622ac9bbdc4d82b75015d745b9f8de65a28ec\":\"0x9dc05cce28c2b80000\",\"0xa379a5070c503d2fac89b8b3afa080fd45ed4bec\":\"0x42bf06b78ed3b500000\",\"0xa3802d8a659e89a2c47e905430b2a827978950a7\":\"0x3635c9adc5dea00000\",\"0xa38306cb70baa8e49186bd68aa70a83d242f2907\":\"0x6c6b935b8bbd400000\",\"0xa38476691d34942eea6b2f76889223047db4617a\":\"0x6c6b935b8bbd400000\",\"0xa387ce4e961a7847f560075c64e1596b5641d21c\":\"0x243d4d18229ca20000\",\"0xa387ecde0ee4c8079499fd8e03473bd88ad7522a\":\"0x6acb3df27e1f880000\",\"0xa3883a24f7f166205f1a6a9949076c26a76e7178\":\"0x62a992e53a0af00000\",\"0xa38b5bd81a9db9d2b21d5ec7c60552cd02ed561b\":\"0x14542ba12a337c00000\",\"0xa390ca122b8501ee3e5e07a8ca4b419f7e4dae15\":\"0x56bc75e2d63100000\",\"0xa3932a31d6ff75fb3b1271ace7caa7d5e1ff1051\":\"0x43c33c1937564800000\",\"0xa394ad4fd9e6530e6f5c53faecbede81cb172da1\":\"0x12f939c99edab800000\",\"0xa3979a92760a135adf69d72f75e167755f1cb8c3\":\"0x56bc75e2d63100000\",\"0xa39bfee4aec9bd75bd22c6b672898ca9a1e95d32\":\"0x21e19e0c9bab2400000\",\"0xa3a262afd2936819230892fde84f2d5a594ab283\":\"0x65ea3db75546600000\",\"0xa3a2e319e7d3a1448b5aa2468953160c2dbcba71\":\"0x6c6b935b8bbd400000\",\"0xa3a57b0716132804d60aac281197ff2b3d237b01\":\"0x4be4e7267b6ae00000\",\"0xa3a93ef9dbea2636263d06d8492f6a41de907c22\":\"0x340aad21b3b700000\",\"0xa3ae1879007d801cb5f352716a4dd8ba2721de3d\":\"0x2a5a058fc295ed000000\",\"0xa3ba0d3a3617b1e31b4e422ce269e873828d5d69\":\"0x2e141ea081ca080000\",\"0xa3bc979b7080092fa1f92f6e0fb347e28d995045\":\"0x97c9ce4cf6d5c00000\",\"0xa3bff1dfa9971668360c0d82828432e27bf54e67\":\"0xad78ebc5ac6200000\",\"0xa3c14ace28b192cbb062145fcbbd5869c67271f6\":\"0x1b1ae4d6e2ef5000000\",\"0xa3c33afc8cb4704e23153de2049d35ae71332472\":\"0x2b58addb89a2580000\",\"0xa3d0b03cffbb269f796ac29d80bfb07dc7c6ad06\":\"0x6c6b935b8bbd400000\",\"0xa3d583a7b65b23f60b7905f3e4aa62aac87f4227\":\"0x38befa126d5a9f8000\",\"0xa3db364a332d884ba93b2617ae4d85a1489bea47\":\"0x5c283d410394100000\",\"0xa3e051fb744aa3410c3b88f899f5d57f168df12d\":\"0xa030dcebbd2f4c0000\",\"0xa3e3a6ea509573e21bd0239ece0523a7b7d89b2f\":\"0x6acb3df27e1f880000\",\"0xa3f4ad14e0bb44e2ce2c14359c75b8e732d37054\":\"0xad78ebc5ac6200000\",\"0xa3facc50195c0b4933c85897fecc5bbd995c34b8\":\"0x1158e460913d00000\",\"0xa4035ab1e5180821f0f380f1131b7387c8d981cd\":\"0x1158e460913d00000\",\"0xa40aa2bbce0c72b4d0dfffcc42715b2b54b01bfa\":\"0x3635c9adc5dea00000\",\"0xa419a984142363267575566089340eea0ea20819\":\"0x6c6acc67d7b1d40000\",\"0xa421dbb89b3a07419084ad10c3c15dfe9b32d0c2\":\"0x43c33c1937564800000\",\"0xa422e4bf0bf74147cc895bed8f16d3cef3426154\":\"0x12ef3f62ee11368000\",\"0xa4259f8345f7e3a8b72b0fec2cf75e321fda4dc2\":\"0x678a932062e4180000\",\"0xa42908e7fe53980a9abf4044e957a54b70e99cbe\":\"0x6c6b935b8bbd400000\",\"0xa429fa88731fdd350e8ecd6ea54296b6484fe695\":\"0x6ac5c62d9486070000\",\"0xa430995ddb185b9865dbe62539ad90d22e4b73c2\":\"0x21e19e0c9bab2400000\",\"0xa436c75453ccca4a1f1b62e5c4a30d86dde4be68\":\"0x6c6b935b8bbd400000\",\"0xa437fe6ec103ca8d158f63b334224eccac5b3ea3\":\"0x1b1ae4d6e2ef5000000\",\"0xa43b6da6cb7aac571dff27f09d39f846f53769b1\":\"0x14998f32ac78700000\",\"0xa43b81f99356c0af141a03010d77bd042c71c1ee\":\"0x6c6b935b8bbd400000\",\"0xa43e1947a9242b355561c30a829dfeeca2815af8\":\"0xd23d99969fd6918000\",\"0xa4489a50ead5d5445a7bee4d2d5536c2a76c41f8\":\"0xad78ebc5ac6200000\",\"0xa44fe800d96fcad73b7170d0f610cb8c0682d6ce\":\"0xd8d726b7177a800000\",\"0xa45432a6f2ac9d56577b938a37fabac8cc7c461c\":\"0x3635c9adc5dea00000\",\"0xa466d770d898d8c9d405e4a0e551efafcde53cf9\":\"0x1ab2cf7c9f87e20000\",\"0xa4670731175893bbcff4fa85ce97d94fc51c4ba8\":\"0x1b1ae4d6e2ef5000000\",\"0xa46b4387fb4dcce011e76e4d73547d4481e09be5\":\"0x487a9a304539440000\",\"0xa46cd237b63eea438c8e3b6585f679e4860832ac\":\"0x3635c9adc5dea00000\",\"0xa47779d8bc1c7bce0f011ccb39ef68b854f8de8f\":\"0x6c6b935b8bbd400000\",\"0xa4826b6c3882fad0ed5c8fbb25cc40cc4f33759f\":\"0x701b43e34433d00000\",\"0xa4875928458ec2005dbb578c5cd33580f0cf1452\":\"0x3635c9adc5dea00000\",\"0xa49f523aa51364cbc7d995163d34eb590ded2f08\":\"0x9027421b2a9fbc0000\",\"0xa4a49f0bc8688cc9e6dc04e1e08d521026e65574\":\"0xad78ebc5ac6200000\",\"0xa4a7d306f510cd58359428c0d2f7c3609d5674d7\":\"0xb58cb61c3ccf340000\",\"0xa4a83a0738799b971bf2de708c2ebf911ca79eb2\":\"0x2086ac351052600000\",\"0xa4b09de6e713dc69546e76ef0acf40b94f0241e6\":\"0x117dc0627ec8700000\",\"0xa4d2b429f1ad5349e31704969edc5f25ee8aca10\":\"0x21e19e0c9bab2400000\",\"0xa4d6c82eddae5947fbe9cdfbd548ae33d91a7191\":\"0x1b1ae4d6e2ef5000000\",\"0xa4da34450d22ec0ffcede0004b02f7872ee0b73a\":\"0x50f616673f0830000\",\"0xa4dd59ab5e517d398e49fa537f899fed4c15e95d\":\"0x43c33c1937564800000\",\"0xa4e623451e7e94e7e89ba5ed95c8a83a62ffc4ea\":\"0x1158e460913d00000\",\"0xa4ed11b072d89fb136759fc69b428c48aa5d4ced\":\"0xe3f1527a03ca80000\",\"0xa4fb14409a67b45688a8593e5cc2cf596ced6f11\":\"0x61093d7c2c6d380000\",\"0xa514d00edd7108a6be839a638db2415418174196\":\"0x65a4da25d3016c00000\",\"0xa522de7eb6ae1250522a513133a93bd42849475c\":\"0x43c33c1937564800000\",\"0xa524a8cccc49518d170a328270a2f88133fbaf5d\":\"0xff7022dac108a0000\",\"0xa539b4a401b584dfe0f344b1b422c65543167e2e\":\"0xad78ebc5ac6200000\",\"0xa53ead54f7850af21438cbe07af686279a315b86\":\"0x21e19e0c9bab2400000\",\"0xa543a066fb32a8668aa0736a0c9cd40d78098727\":\"0x3635c9adc5dea00000\",\"0xa567770b6ae320bdde50f904d663e746a61dace6\":\"0x6c6b935b8bbd400000\",\"0xa568db4d57e4d67462d733c69a9e0fe26e218327\":\"0x3b6bff9266c0ae0000\",\"0xa5698035391e67a49013c0002079593114feb353\":\"0xd02ab486cedc00000\",\"0xa570223ae3caa851418a9843a1ac55db4824f4fd\":\"0xad78ebc5ac6200000\",\"0xa57360f002e0d64d2d74457d8ca4857ee00bcddf\":\"0x1233e232f618aa0000\",\"0xa575f2891dcfcda83c5cf01474af11ee01b72dc2\":\"0x56cd55fc64dfe0000\",\"0xa5783bf33432ff82ac498985d7d460ae67ec3673\":\"0x62a992e53a0af00000\",\"0xa5874d754635a762b381a5c4c792483af8f23d1d\":\"0x2b5e3af16b1880000\",\"0xa5a4227f6cf98825c0d5baff5315752ccc1a1391\":\"0x21e19e0c9bab2400000\",\"0xa5ab4bd3588f46cb272e56e93deed386ba8b753d\":\"0x4842f04105872c8000\",\"0xa5bad86509fbe0e0e3c0e93f6d381f1af6e9d481\":\"0x14542ba12a337c00000\",\"0xa5c336083b04f9471b8c6ed73679b74d66c363ec\":\"0xa3650a4c9d20e20000\",\"0xa5cd123992194b34c4781314303b03c54948f4b9\":\"0x6cfcc3d91da5630000\",\"0xa5d5b8b62d002def92413710d13b6ff8d4fc7dd3\":\"0x15af1d78b58c400000\",\"0xa5d96e697d46358d119af7819dc7087f6ae47fef\":\"0x317bee8af3315a78000\",\"0xa5de5e434fdcdd688f1c31b6fb512cb196724701\":\"0x2b5e3af16b18800000\",\"0xa5e0fc3c3affed3db6710947d1d6fb017f3e276d\":\"0x6c6b935b8bbd400000\",\"0xa5e93b49ea7c509de7c44d6cfeddef5910deaaf2\":\"0x6c6b935b8bbd400000\",\"0xa5e9cd4b74255d22b7d9b27ae8dd43ed6ed0252b\":\"0x298db2f54411d98000\",\"0xa5f0077b351f6c505cd515dfa6d2fa7f5c4cd287\":\"0x878678326eac9000000\",\"0xa5f075fd401335577b6683c281e6d101432dc6e0\":\"0x914878a8c05ee00000\",\"0xa5fe2ce97f0e8c3856be0de5f4dcb2ce5d389a16\":\"0x13db0b8b6863e0000\",\"0xa5ff62222d80c013cec1a0e8850ed4d354dac16d\":\"0xb41075c168b180000\",\"0xa609c26dd350c235e44b2b9c1dddccd0a9d9f837\":\"0x3635c9adc5dea00000\",\"0xa60c1209754f5d87b181da4f0817a81859ef9fd8\":\"0x2b5e3af16b1880000\",\"0xa6101c961e8e1c15798ffcd0e3201d7786ec373a\":\"0x14542ba12a337c00000\",\"0xa613456996408af1c2e93e177788ab55895e2b32\":\"0x15919ff477c88b80000\",\"0xa61887818f914a20e31077290b83715a6b2d6ef9\":\"0x65ea3db75546600000\",\"0xa61a54df784a44d71b771b87317509211381f200\":\"0x3635c9adc5dea00000\",\"0xa61cdbadf04b1e54c883de6005fcdf16beb8eb2f\":\"0x6c6b935b8bbd400000\",\"0xa639acd96b31ba53b0d08763229e1f06fd105e9d\":\"0x1b1ae4d6e2ef5000000\",\"0xa642501004c90ea9c9ed1998ba140a4cd62c6f5f\":\"0xd94fb8b10f8b18000\",\"0xa644ed922cc237a3e5c4979a995477f36e50bc62\":\"0x1fa73d845d7e960000\",\"0xa646a95c6d6f59f104c6541d7760757ab392b08c\":\"0xe3aeb5737240a00000\",\"0xa6484cc684c4c91db53eb68a4da45a6a6bda3067\":\"0x14542ba12a337c00000\",\"0xa64e5ffb704c2c9139d77ef61d8cdfa31d7a88e9\":\"0x7c0860e5a80dc0000\",\"0xa65426cff378ed23253513b19f496de45fa7e18f\":\"0x18650127cc3dc800000\",\"0xa66a4963b27f1ee1932b172be5964e0d3ae54b51\":\"0x960db77681e940000\",\"0xa67f38819565423aa85f3e3ab61bc763cbab89dd\":\"0x7377b022c6be080000\",\"0xa68c313445c22d919ee46cc2d0cdff043a755825\":\"0x41374fd21b0d88000\",\"0xa68e0c30cba3bc5a883e540320f999c7cd558e5c\":\"0x6192333762a58c8000\",\"0xa690f1a4b20ab7ba34628620de9ca040c43c1963\":\"0xd8d726b7177a800000\",\"0xa69d7cd17d4842fe03f62a90b2fbf8f6af7bb380\":\"0x56bc75e2d63100000\",\"0xa6a08252c8595177cc2e60fc27593e2379c81fb1\":\"0x11651ac3e7a758000\",\"0xa6a0de421ae54f6d17281308f5646d2f39f7775d\":\"0x6c6b935b8bbd400000\",\"0xa6b2d573297360102c07a18fc21df2e7499ff4eb\":\"0xd96fce90cfabcc0000\",\"0xa6c910ce4d494a919ccdaaa1fc3b82aa74ba06cf\":\"0x1b1ae4d6e2ef5000000\",\"0xa6e3baa38e104a1e27a4d82869afb1c0ae6eff8d\":\"0x11140eead8b710000\",\"0xa6eebbe464d39187bf80ca9c13d72027ec5ba8be\":\"0xa2a15d09519be00000\",\"0xa6f62b8a3d7f11220701ab9ffffcb327959a2785\":\"0x1b6e291f18dba80000\",\"0xa6f93307f8bce03195fece872043e8a03f7bd11a\":\"0x9c734bad5111580000\",\"0xa701df79f594901afe1444485e6b20c3bda2b9b3\":\"0x3635c9adc5dea00000\",\"0xa7024cfd742c1ec13c01fea18d3042e65f1d5dee\":\"0x263119a28abd0b08000\",\"0xa718aaad59bf395cba2b23e09b02fe0c89816247\":\"0x36303c97e468780000\",\"0xa7247c53d059eb7c9310f628d7fc6c6a0a773f08\":\"0x1b1ae4d6e2ef500000\",\"0xa7253763cf4a75df92ca1e766dc4ee8a2745147b\":\"0x2463770e90a8f500000\",\"0xa72ee666c4b35e82a506808b443cebd5c632c7dd\":\"0x2b5e3af16b18800000\",\"0xa74444f90fbb54e56f3ac9b6cfccaa4819e4614a\":\"0x1158e460913d00000\",\"0xa747439ad0d393b5a03861d77296326de8bb9db9\":\"0x3635c9adc5dea00000\",\"0xa7607b42573bb6f6b4d4f23c7e2a26b3a0f6b6f0\":\"0x57473d05dabae80000\",\"0xa76929890a7b47fb859196016c6fdd8289ceb755\":\"0x10f0cf064dd59200000\",\"0xa76b743f981b693072a131b22ba510965c2fefd7\":\"0xfc936392801c0000\",\"0xa76d3f156251b72c0ccf4b47a3393cbd6f49a9c5\":\"0x487a9a304539440000\",\"0xa77428bcb2a0db76fc8ef1e20e461a0a32c5ac15\":\"0x15be6174e1912e0000\",\"0xa7758cecb60e8f614cce96137ef72b4fbd07774a\":\"0x1b1ae4d6e2ef500000\",\"0xa7775e4af6a23afa201fb78b915e51a515b7a728\":\"0x68155a43676e00000\",\"0xa77f3ee19e9388bbbb2215c62397b96560132360\":\"0xad78ebc5ac6200000\",\"0xa7859fc07f756ea7dcebbccd42f05817582d973f\":\"0x21e19e0c9bab2400000\",\"0xa7966c489f4c748a7ae980aa27a574251767caf9\":\"0xa2a15d09519be00000\",\"0xa7a3bb6139b0ada00c1f7f1f9f56d994ba4d1fa8\":\"0x6c6b935b8bbd400000\",\"0xa7a3f153cdc38821c20c5d8c8241b294a3f82b24\":\"0x1b1ae4d6e2ef500000\",\"0xa7a517d7ad35820b09d497fa7e5540cde9495853\":\"0x6c6b935b8bbd400000\",\"0xa7c9d388ebd873e66b1713448397d0f37f8bd3a8\":\"0x10f0cf064dd59200000\",\"0xa7dcbba9b9bf6762c145416c506a71e3b497209c\":\"0x6c6acc67d7b1d40000\",\"0xa7e74f0bdb278ff0a805a648618ec52b166ff1be\":\"0x56bc75e2d63100000\",\"0xa7e83772bc200f9006aa2a260dbaa8483dc52b30\":\"0xb42d5366637e50000\",\"0xa7ef35ce87eda6c28df248785815053ec97a5045\":\"0x10f0ce949e00f930000\",\"0xa7f9220c8047826bd5d5183f4e676a6d77bfed36\":\"0x85068976be81c0000\",\"0xa807104f2703d679f8deafc442befe849e42950b\":\"0x6c6b935b8bbd400000\",\"0xa80cb1738bac08d4f9c08b4deff515545fa8584f\":\"0x1b1ae4d6e2ef500000\",\"0xa819d2ece122e028c8e8a04a064d02b9029b08b9\":\"0x3635c9adc5dea00000\",\"0xa825fd5abb7926a67cf36ba246a24bd27be6f6ed\":\"0xf43fc2c04ee00000\",\"0xa8285539869d88f8a961533755717d7eb65576ae\":\"0xad78ebc5ac6200000\",\"0xa83382b6e15267974a8550b98f7176c1a353f9be\":\"0xbffdaf2fc1b1a40000\",\"0xa8446c4781a737ac4328b1e15b8a0b3fbb0fd668\":\"0x48794d1f246192a0000\",\"0xa8455b411765d6901e311e726403091e42c56683\":\"0xb73aec3bfe14500000\",\"0xa86613e6c4a4c9c55f5c10bcda32175dcbb4af60\":\"0x243d6c2e36be6ae0000\",\"0xa86db07d9f812f4796622d40e03d135874a88a74\":\"0x1158e460913d00000\",\"0xa87f7abd6fa31194289678efb63cf584ee5e2a61\":\"0xd8d726b7177a800000\",\"0xa880e2a8bf88a1a82648b4013c49c4594c433cc8\":\"0x1004e2e45fb7ee00000\",\"0xa88577a073fbaf33c4cd202e00ea70ef711b4006\":\"0x6c6b935b8bbd400000\",\"0xa8914c95b560ec13f140577338c32bcbb77d3a7a\":\"0x9c2007651b2500000\",\"0xa89ac93b23370472daac337e9afdf642543f3e57\":\"0x21e19e0c9bab2400000\",\"0xa89df34859edd7c820db887740d8ff9e15157c7b\":\"0x6c6b935b8bbd400000\",\"0xa8a43c009100616cb4ae4e033f1fc5d7e0b6f152\":\"0xd588d078b43f4d8000\",\"0xa8a708e84f82db86a35502193b4c6ee9a76ebe8f\":\"0x3708baed3d68900000\",\"0xa8a7b68adab4e3eadff19ffa58e34a3fcec0d96a\":\"0x14542ba12a337c00000\",\"0xa8a8dbdd1a85d1beee2569e91ccc4d09ae7f6ea1\":\"0x13a6b2b564871a00000\",\"0xa8aca748f9d312ec747f8b6578142694c7e9f399\":\"0x6c6b935b8bbd400000\",\"0xa8b65ba3171a3f77a6350b9daf1f8d55b4d201eb\":\"0x2862f3b0d222040000\",\"0xa8beb91c2b99c8964aa95b6b4a184b1269fc3483\":\"0x15af1d78b58c400000\",\"0xa8c0b02faf02cb5519dda884de7bbc8c88a2da81\":\"0xe7c2518505060000\",\"0xa8c1d6aa41fe3d65f67bd01de2a866ed1ed9ae52\":\"0x1a055690d9db80000\",\"0xa8cafac32280d021020bf6f2a9782883d7aabe12\":\"0x56bc75e2d63100000\",\"0xa8db0b9b201453333c757f6ad9bcb555c02da93b\":\"0x7742b7830f341d0000\",\"0xa8e42a4e33d7526cca19d9a36dcd6e8040d0ea73\":\"0x3a8c02c5ea2de00000\",\"0xa8e7201ff619faffc332e6ad37ed41e301bf014a\":\"0x2086ac351052600000\",\"0xa8ee1df5d44b128469e913569ef6ac81eeda4fc8\":\"0x1b1ae4d6e2ef500000\",\"0xa8ef9ad274436042903e413c3b0c62f5f52ed584\":\"0x21e19e0c9bab2400000\",\"0xa8f37f0ab3a1d448a9e3ce40965f97a646083a34\":\"0x11e0e4f8a50bd40000\",\"0xa8f89dd5cc6e64d7b1eeace00702022cd7d2f03d\":\"0x25f273933db5700000\",\"0xa90476e2efdfee4f387b0f32a50678b0efb573b5\":\"0x21e19e0c9bab2400000\",\"0xa9145046fa3628cf5fd4c613927be531e6db1fdd\":\"0x6124fee993bc00000\",\"0xa914cdb571bfd93d64da66a4e108ea134e50d000\":\"0x4d8738994713798000\",\"0xa91a5a7b341f99c535144e20be9c6b3bb4c28e4d\":\"0x126753aa224a70b0000\",\"0xa9252551a624ae513719dabe5207fbefb2fd7749\":\"0x22b1c8c1227a00000\",\"0xa927d48bb6cb814bc609cbcaa9151f5d459a27e1\":\"0xeb935090064180000\",\"0xa929c8bd71db0c308dac06080a1747f21b1465aa\":\"0x1b1ae4d6e2ef500000\",\"0xa94bbb8214cf8da0c2f668a2ac73e86248528d4b\":\"0x340aad21b3b7000000\",\"0xa951b244ff50cfae591d5e1a148df6a938ef2a1a\":\"0x5e001584dfcf580000\",\"0xa960b1cadd3b5c1a8e6cb3abcaf52ee7c3d9fa88\":\"0x528bc3545e52680000\",\"0xa961171f5342b173dd70e7bfe5b5ca238b13bcdd\":\"0xb82794a9244f0c8000\",\"0xa975b077fcb4cc8efcbf838459b6fa243a4159d6\":\"0x22b1c8c1227a00000\",\"0xa97beb3a48c45f1528284cb6a95f7de453358ec6\":\"0x690836c0af5f5600000\",\"0xa97e072144499fe5ebbd354acc7e7efb58985d08\":\"0x90f534608a72880000\",\"0xa986762f7a4f294f2e0b173279ad2c81a2223458\":\"0x1158e460913d00000\",\"0xa98f109835f5eacd0543647c34a6b269e3802fac\":\"0x15af1d78b58c400000\",\"0xa997dfc7986a27050848fa1c64d7a7d6e07acca2\":\"0x7c0860e5a80dc0000\",\"0xa99991cebd98d9c838c25f7a7416d9e244ca250d\":\"0x3635c9adc5dea00000\",\"0xa9a1cdc33bfd376f1c0d76fb6c84b6b4ac274d68\":\"0x10f0cf064dd59200000\",\"0xa9a8eca11a23d64689a2aa3e417dbb3d336bb59a\":\"0xe3453cd3b67ba8000\",\"0xa9acf600081bb55bb6bfbab1815ffc4e17e85a95\":\"0xad78ebc5ac6200000\",\"0xa9ad1926bc66bdb331588ea8193788534d982c98\":\"0x65a4da25d3016c00000\",\"0xa9af21acbe482f8131896a228036ba51b19453c3\":\"0x2b5e021980cc18000\",\"0xa9b2d2e0494eab18e07d37bbb856d80e80f84cd3\":\"0x21e19e0c9bab2400000\",\"0xa9ba6f413b82fcddf3affbbdd09287dcf50415ca\":\"0xd8d726b7177a800000\",\"0xa9be88ad1e518b0bbb024ab1d8f0e73f790e0c76\":\"0x97c9ce4cf6d5c00000\",\"0xa9bfc410dddb20711e45c07387eab30a054e19ac\":\"0x3e99601edf4e530000\",\"0xa9d4a2bcbe5b9e0869d70f0fe2e1d6aacd45edc5\":\"0xac6e77ab663a80000\",\"0xa9d64b4f3bb7850722b58b478ba691375e224e42\":\"0x14542ba12a337c00000\",\"0xa9d6f871ca781a759a20ac3adb972cf12829a208\":\"0x3224f42723d4540000\",\"0xa9dc0424c6969d798358b393b1933a1f51bee00a\":\"0x43c33c1937564800000\",\"0xa9e194661aac704ee9dea043974e9692ded84a5d\":\"0x1a26a51422a0700000\",\"0xa9e28337e6357193d9e2cb236b01be44b81427df\":\"0x77432217e683600000\",\"0xa9e6e25e656b762558619f147a21985b8874edfe\":\"0x6c6b935b8bbd400000\",\"0xa9e9dbce7a2cb03694799897bed7c54d155fdaa8\":\"0xab5ae8fc99d658000\",\"0xa9ed377b7d6ec25971c1a597a3b0f3bead57c98f\":\"0x15af1d78b58c400000\",\"0xaa0200f1d17e9c54da0647bb96395d57a78538d8\":\"0x393ef1a5127c800000\",\"0xaa0ca3737337178a0caac3099c584b056c56301c\":\"0x2fb474098f67c00000\",\"0xaa136b47962bb8b4fb540db4ccf5fdd042ffb8cf\":\"0x1b1b6bd7af64c70000\",\"0xaa14422d6f0ae5a758194ed15780c838d67f1ee1\":\"0x60932056c449de80000\",\"0xaa16269aac9c0d803068d82fc79151dadd334b66\":\"0xd8d726b7177a800000\",\"0xaa167026d39ab7a85635944ed9edb2bfeba11850\":\"0x1c1d5e21b4fcf680000\",\"0xaa1b3768c16d821f580e76c8e4c8e86d7dc78853\":\"0x15af1d78b58c400000\",\"0xaa1df92e51dff70b1973e0e924c66287b494a178\":\"0x1cf84a30a0a0c00000\",\"0xaa2c670096d3f939305325427eb955a8a60db3c5\":\"0x6c95590699232d0000\",\"0xaa3135cb54f102cbefe09e96103a1a796718ff54\":\"0x32222d9c331940000\",\"0xaa321fdbd449180db8ddd34f0fe906ec18ee0914\":\"0x252248deb6e6940000\",\"0xaa3925dc220bb4ae2177b2883078b6dc346ca1b2\":\"0x1b1ae4d6e2ef5000000\",\"0xaa3f29601a1331745e05c42830a15e71938a6237\":\"0x5c283d410394100000\",\"0xaa47a4ffc979363232c99b99fada0f2734b0aeee\":\"0x1b8489df4dbff940000\",\"0xaa493d3f4fb866491cf8f800efb7e2324ed7cfe5\":\"0x5c283d410394100000\",\"0xaa56a65dc4abb72f11bae32b6fbb07444791d5c9\":\"0x2894e975bf496c0000\",\"0xaa5afcfd8309c2df9d15be5e6a504e7d706624c5\":\"0x13cf422e305a1378000\",\"0xaa8eb0823b07b0e6d20aadda0e95cf3835be192e\":\"0x1bc16d674ec800000\",\"0xaa91237e740d25a92f7fa146faa18ce56dc6e1f3\":\"0x3224f42723d4540000\",\"0xaa960e10c52391c54e15387cc67af827b5316dcc\":\"0x6c6b935b8bbd400000\",\"0xaa9bd4589535db27fa2bc903ca17d679dd654806\":\"0x6c6b935b8bbd400000\",\"0xaaa8defe11e3613f11067fb983625a08995a8dfc\":\"0xad78ebc5ac6200000\",\"0xaaaae68b321402c8ebc13468f341c63c0cf03fce\":\"0x52663ccab1e1c00000\",\"0xaaad1baade5af04e2b17439e935987bf8c2bb4b9\":\"0x6c6b935b8bbd400000\",\"0xaab00abf5828d7ebf26b47ceaccdb8ba03325166\":\"0x21e19e0c9bab2400000\",\"0xaabdb35c1514984a039213793f3345a168e81ff1\":\"0x10cac896d239000000\",\"0xaaca60d9d700e78596bbbbb1f1e2f70f4627f9d8\":\"0x3635bb77cb4b860000\",\"0xaaced8a9563b1bc311dbdffc1ae7f57519c4440c\":\"0x6c6b935b8bbd400000\",\"0xaad2b7f8106695078e6c138ec81a7486aaca1eb2\":\"0xad78ebc5ac6200000\",\"0xaae61e43cb0d0c96b30699f77e00d711d0a3979b\":\"0x3635c9adc5dea00000\",\"0xaae732eda65988c3a00c7f472f351c463b1c968e\":\"0x6c6b935b8bbd400000\",\"0xaaf023fef290a49bb78bb7abc95d669c50d528b0\":\"0xad78ebc5ac6200000\",\"0xaaf5b207b88b0de4ac40d747cee06e172df6e745\":\"0x6a7b71d7f51d0900000\",\"0xaaf9ee4b886c6d1e95496fd274235bf4ecfcb07d\":\"0x4be4e7267b6ae00000\",\"0xaafb7b013aa1f8541c7e327bf650adbd194c208f\":\"0x499e092d01f4780000\",\"0xab098633eeee0ccefdf632f9575456f6dd80fc86\":\"0x2a5a058fc295ed000000\",\"0xab0ced762e1661fae1a92afb1408889413794825\":\"0x678a932062e4180000\",\"0xab14d221e33d544629198cd096ed63dfa28d9f47\":\"0x14542ba12a337c00000\",\"0xab209fdca979d0a647010af9a8b52fc7d20d8cd1\":\"0x1eee2532c7c2d040000\",\"0xab27ba78c8e5e3daef31ad05aef0ff0325721e08\":\"0x195ece006e02d00000\",\"0xab2871e507c7be3965498e8fb462025a1a1c4264\":\"0x2a034919dfbfbc0000\",\"0xab3861226ffec1289187fb84a08ec3ed043264e8\":\"0x3635c9adc5dea00000\",\"0xab3d86bc82927e0cd421d146e07f919327cdf6f9\":\"0x678a932062e4180000\",\"0xab3e62e77a8b225e411592b1af300752fe412463\":\"0x215f835bc769da80000\",\"0xab3e78294ba886a0cfd5d3487fb3a3078d338d6e\":\"0x6acb3df27e1f880000\",\"0xab4004c0403f7eabb0ea586f212156c4203d67f1\":\"0x6c6acc67d7b1d40000\",\"0xab416fe30d58afe5d9454c7fce7f830bcc750356\":\"0x6353701c605db8000\",\"0xab4572fbb1d72b575d69ec6ad17333873e8552fc\":\"0x6c6ac54cda68470000\",\"0xab5a79016176320973e8cd38f6375530022531c0\":\"0x3635c9adc5dea00000\",\"0xab5dfc1ea21adc42cf8c3f6e361e243fd0da61e5\":\"0x1043561a8829300000\",\"0xab6b65eab8dfc917ec0251b9db0ecfa0fa032849\":\"0x1b1ae4d6e2ef500000\",\"0xab7091932e4bc39dbb552380ca934fd7166d1e6e\":\"0xb50fcfafebecb00000\",\"0xab7416ff32254951cbbc624ec7fb45fc7ecaa872\":\"0x126e72a69a50d00000\",\"0xab7c42c5e52d641a07ad75099c62928b7f86622f\":\"0x12361aa21d14ba0000\",\"0xab7d54c7c6570efca5b4b8ce70f52a5773e5d53b\":\"0xf283abe9d9f380000\",\"0xab7e0b83ed9a424c6d1e6a6f87a4dbf06409c7d6\":\"0x821ab0d44149800000\",\"0xab84a0f147ad265400002b85029a41fc9ce57f85\":\"0x3635c9adc5dea00000\",\"0xab93b26ece0a0aa21365afed1fa9aea31cd54468\":\"0x572b7b98736c200000\",\"0xab948a4ae3795cbca13126e19253bdc21d3a8514\":\"0xad78ebc5ac6200000\",\"0xab9ad36e5c74ce2e96399f57839431d0e79f96ab\":\"0x8e3f50b173c100000\",\"0xabb2e6a72a40ba6ed908cdbcec3c5612583132fe\":\"0x4f2591f896a6500000\",\"0xabc068b4979b0ea64a62d3b7aa897d73810dc533\":\"0x6acb3df27e1f880000\",\"0xabc45f84db7382dde54c5f7d8938c42f4f3a3bc4\":\"0xad78ebc5ac6200000\",\"0xabc4caeb474d4627cb6eb456ecba0ecd08ed8ae1\":\"0xd5967be4fc3f100000\",\"0xabc74706964960dfe0dca3dca79e9216056f1cf4\":\"0x878678326eac9000000\",\"0xabc9a99e8a2148a55a6d82bd51b98eb5391fdbaf\":\"0x14542ba12a337c00000\",\"0xabcdbc8f1dd13af578d4a4774a62182bedf9f9be\":\"0x1fcc27bc459d20000\",\"0xabd154903513b8da4f019f68284b0656a1d0169b\":\"0x3635c9adc5dea00000\",\"0xabd21eff954fc6a7de26912a7cbb303a6607804e\":\"0x523c9aa696eb940000\",\"0xabd4d6c1666358c0406fdf3af248f78ece830104\":\"0x727de34a24f9000000\",\"0xabd9605b3e91acfd777830d16463478ae0fc7720\":\"0x73f75d1a085ba0000\",\"0xabdc9f1bcf4d19ee96591030e772c334302f7d83\":\"0x87e5e11a81cb5f80000\",\"0xabde147b2af789eaa586547e66c4fa2664d328a4\":\"0xd6b6081f34c128000\",\"0xabe07ced6ac5ddf991eff6c3da226a741bd243fe\":\"0x21e19e0c9bab2400000\",\"0xabf12fa19e82f76c718f01bdca0003674523ef30\":\"0x6c6b935b8bbd400000\",\"0xabf728cf9312f22128024e7046c251f5dc5901ed\":\"0x641e8a13563d8f80000\",\"0xabf8ffe0708a99b528cc1ed4e9ce4b0d0630be8c\":\"0x7ab5c2aeeee6380000\",\"0xabfcf5f25091ce57875fc674dcf104e2a73dd2f2\":\"0x11164759ffb320000\",\"0xabfe936425dcc7b74b955082bbaaf2a11d78bc05\":\"0x4be4e7267b6ae00000\",\"0xac024f594f9558f04943618eb0e6b2ee501dc272\":\"0x6c6b935b8bbd400000\",\"0xac122a03cd058c122e5fe17b872f4877f9df9572\":\"0x6ac5c62d9486070000\",\"0xac142eda1157b9a9a64390df7e6ae694fac98905\":\"0xad78ebc5ac6200000\",\"0xac1dfc984b71a19929a81d81f04a7cbb14073703\":\"0x2086ac351052600000\",\"0xac21c1e5a3d7e0b50681679dd6c792dbca87decb\":\"0x152d02c7e14af6800000\",\"0xac2889b5966f0c7f9edb42895cb69d1c04f923a2\":\"0x10f0cf064dd59200000\",\"0xac28b5edea05b76f8c5f97084541277c96696a4c\":\"0x3635c9adc5dea00000\",\"0xac2c8e09d06493a63858437bd20be01962450365\":\"0x678a932062e4180000\",\"0xac2e766dac3f648f637ac6713fddb068e4a4f04d\":\"0xaadec983fcff40000\",\"0xac3900298dd14d7cc96d4abb428da1bae213ffed\":\"0x53ca12974851c010000\",\"0xac3da526cfce88297302f34c49ca520dc271f9b2\":\"0x2b5e3af16b18800000\",\"0xac4460a76e6db2b9fcd152d9c7718d9ac6ed8c6f\":\"0xad78ebc5ac6200000\",\"0xac4acfc36ed6094a27e118ecc911cd473e8fb91f\":\"0x61913e14403c0c0000\",\"0xac4cc256ae74d624ace80db078b2207f57198f6b\":\"0x6c7974123f64a40000\",\"0xac4ee9d502e7d2d2e99e59d8ca7d5f00c94b4dd6\":\"0x3635c9adc5dea00000\",\"0xac52b77e15664814f39e4f271be641308d91d6cc\":\"0xbed1d0263d9f00000\",\"0xac5999a89d2dd286d5a80c6dee7e86aad40f9e12\":\"0xd255d112e103a00000\",\"0xac5f627231480d0d95302e6d89fc32cb1d4fe7e3\":\"0xad78ebc5ac6200000\",\"0xac608e2bac9dd20728d2947effbbbf900a9ce94b\":\"0x1454b0db37568fc0000\",\"0xac6d02e9a46b379fac4ac9b1d7b5d47bc850ce16\":\"0x5f68e8131ecf800000\",\"0xac6f68e837cf1961cb14ab47446da168a16dde89\":\"0x487a9a304539440000\",\"0xac77bdf00fd5985b5db12bbef800380abc2a0677\":\"0x3635c9adc5dea00000\",\"0xac7e03702723cb16ee27e22dd0b815dc2d5cae9f\":\"0x3635c9adc5dea000000\",\"0xac8b509aefea1dbfaf2bb33500d6570b6fd96d51\":\"0x62a992e53a0af00000\",\"0xac8e87ddda5e78fcbcb9fa7fc3ce038f9f7d2e34\":\"0x6c6b935b8bbd400000\",\"0xac9fff68c61b011efbecf038ed72db97bb9e7281\":\"0x205b4dfa1ee74780000\",\"0xaca1e6bc64cc3180f620e94dc5b1bcfd8158e45d\":\"0x6c6b935b8bbd400000\",\"0xaca2a838330b17302da731d30db48a04f0f207c1\":\"0x487a9a304539440000\",\"0xacaaddcbf286cb0e215dda55598f7ff0f4ada5c6\":\"0x3635c9adc5dea00000\",\"0xacb94338554bc488cc88ae2d9d94080d6bdf8410\":\"0x3635c9adc5dea00000\",\"0xacbc2d19e06c3babbb5b6f052b6bf7fc37e07229\":\"0xad78ebc5ac6200000\",\"0xacbd185589f7a68a67aa4b1bd65077f8c64e4e21\":\"0xad78ebc5ac6200000\",\"0xacc062702c59615d3444ef6214b8862b009a02ed\":\"0x514fcb24ff9c500000\",\"0xacc0909fda2ea6b7b7a88db7a0aac868091ddbf6\":\"0x133765f1e26c78000\",\"0xacc1c78786ab4d2b3b277135b5ba123e0400486b\":\"0x44591d67fecc80000\",\"0xacc46a2a555c74ded4a2bd094e821b97843b40c0\":\"0x692ae8897081d00000\",\"0xacc59f3b30ceffc56461cc5b8df48902240e0e7b\":\"0x6c6b935b8bbd400000\",\"0xacce01e0a70610dc70bb91e9926fa9957f372fba\":\"0x1d1c5f3eda20c40000\",\"0xacd8dd91f714764c45677c63d852e56eb9eece2e\":\"0x6c6b935b8bbd400000\",\"0xace2abb63b0604409fbde3e716d2876d44e8e5dd\":\"0x83d6c7aab63600000\",\"0xacec91ef6941cf630ba9a3e787a012f4a2d91dd4\":\"0x10f0cf064dd592000000\",\"0xad0a4ae478e9636e88c604f242cf5439c6d45639\":\"0xbed1d0263d9f000000\",\"0xad1799aad7602b4540cd832f9db5f11150f1687a\":\"0x6c6b935b8bbd400000\",\"0xad1d68a038fd2586067ef6d135d9628e79c2c924\":\"0xfe09a5279e2abc0000\",\"0xad2a5c00f923aaf21ab9f3fb066efa0a03de2fb2\":\"0x3635bb77cb4b860000\",\"0xad3565d52b688added08168b2d3872d17d0a26ae\":\"0x56bc75e2d63100000\",\"0xad377cd25eb53e83ae091a0a1d2b4516f484afde\":\"0x692ae8897081d00000\",\"0xad414d29cb7ee973fec54e22a388491786cf5402\":\"0x2f6f10780d22cc00000\",\"0xad44357e017e244f476931c7b8189efee80a5d0a\":\"0x1043561a8829300000\",\"0xad57aa9d00d10c439b35efcc0becac2e3955c313\":\"0xad78ebc5ac6200000\",\"0xad59a78eb9a74a7fbdaefafa82eada8475f07f95\":\"0x1b1ae4d6e2ef500000\",\"0xad5a8d3c6478b69f657db3837a2575ef8e1df931\":\"0x20156e104c1b30000\",\"0xad660dec825522a9f62fcec3c5b731980dc286ea\":\"0xa2a15d09519be00000\",\"0xad6628352ed3390bafa86d923e56014cfcb360f4\":\"0x6c6b935b8bbd400000\",\"0xad728121873f0456d0518b80ab6580a203706595\":\"0x1b1ae4d6e2ef500000\",\"0xad732c976593eec4783b4e2ecd793979780bfedb\":\"0x6c6b935b8bbd400000\",\"0xad7dd053859edff1cb6f9d2acbed6dd5e332426f\":\"0x6acb3df27e1f880000\",\"0xad80d865b85c34d2e6494b2e7aefea6b9af184db\":\"0xd8d726b7177a800000\",\"0xad8bfef8c68a4816b3916f35cb7bfcd7d3040976\":\"0x878678326eac9000000\",\"0xad8e48a377695de014363a523a28b1a40c78f208\":\"0x3635c9adc5dea00000\",\"0xad910a23d6850613654af786337ad2a70868ac6d\":\"0x6c68ccd09b022c0000\",\"0xad927e03d1599a78ca2bf0cad2a183dceb71eac0\":\"0x6acb3df27e1f880000\",\"0xad92ca066edb7c711dfc5b166192d1edf8e77185\":\"0x79f905c6fd34e800000\",\"0xad94235fc3b3f47a2413af31e884914908ef0c45\":\"0x1b1b0142d815840000\",\"0xad9e97a0482f353a05c0f792b977b6c7e811fa5f\":\"0xad78ebc5ac6200000\",\"0xad9f4c890a3b511cee51dfe6cfd7f1093b76412c\":\"0x1b767cbfeb0ce40000\",\"0xadaa0e548c035affed64ca678a963fabe9a26bfd\":\"0x3cb71f51fc5580000\",\"0xadb948b1b6fefe207de65e9bbc2de98e605d0b57\":\"0x6c6b935b8bbd400000\",\"0xadc19ec835afe3e58d87dc93a8a9213c90451326\":\"0x6adbe5342282000000\",\"0xadc8228ef928e18b2a807d00fb3c6c79cd1d9e96\":\"0x13c69df334ee80000\",\"0xaddb26317227f45c87a2cb90dc4cfd02fb23caf8\":\"0x3635c9adc5dea00000\",\"0xade6f8163bf7c7bb4abe8e9893bd0cc112fe8872\":\"0x11c25d004d01f80000\",\"0xadeb204aa0c38e179e81a94ed8b3e7d53047c26b\":\"0x20f5b1eaad8d800000\",\"0xadeb52b604e5f77faaac88275b8d6b49e9f9f97f\":\"0x71426b00956ed20000\",\"0xadf1acfe99bc8c14b304c8d905ba27657b8a7bc4\":\"0x43c33c1937564800000\",\"0xadf85203c8376a5fde9815384a350c3879c4cb93\":\"0x3e31fc675815aa0000\",\"0xadff0d1d0b97471e76d789d2e49c8a74f9bd54ff\":\"0x65ea3db75546600000\",\"0xae062c448618643075de7a0030342dced63dbad7\":\"0x2cc6cd8cc282b30000\",\"0xae10e27a014f0d306baf266d4897c89aeee2e974\":\"0x43c33c1937564800000\",\"0xae126b382cf257fad7f0bc7d16297e54cc7267da\":\"0x1043561a8829300000\",\"0xae13a08511110f32e53be4127845c843a1a57c7b\":\"0x1b1ae4d6e2ef500000\",\"0xae179a460db66326743d24e67523a57b246daf7f\":\"0x10007ae7ce5bbe40000\",\"0xae222865799079aaf4f0674a0cdaab02a6d570ff\":\"0x6c6b935b8bbd400000\",\"0xae239acffd4ebe2e1ba5b4170572dc79cc6533ec\":\"0x28a857425466f800000\",\"0xae2f9c19ac76136594432393b0471d08902164d3\":\"0x25df05c6a897e40000\",\"0xae34861d342253194ffc6652dfde51ab44cad3fe\":\"0x194608686316bd8000\",\"0xae36f7452121913e800e0fcd1a65a5471c23846f\":\"0x8e3f50b173c100000\",\"0xae3f98a443efe00f3e711d525d9894dc9a61157b\":\"0x1004e2e45fb7ee0000\",\"0xae47e2609cfafe369d66d415d939de05081a9872\":\"0x5baecf025f9b6500000\",\"0xae4f122e35c0b1d1e4069291457c83c07f965fa3\":\"0x3635c9adc5dea00000\",\"0xae5055814cb8be0c117bb8b1c8d2b63b4698b728\":\"0x1bc932ec573a38000\",\"0xae538c73c5b38d8d584d7ebdadefb15cabe48357\":\"0x3627e8f712373c0000\",\"0xae57cc129a96a89981dac60d2ffb877d5dc5e432\":\"0x3c3a2394b396550000\",\"0xae5aa1e6c2b60f6fd3efe721bb4a719cbe3d6f5d\":\"0x2b24c6b55a5e620000\",\"0xae5c9bdad3c5c8a1220444aea5c229c1839f1d64\":\"0x19e2a4c818b9060000\",\"0xae5ce3355a7ba9b332760c0950c2bc45a85fa9a0\":\"0x15af1d78b58c400000\",\"0xae5d221afcd3d29355f508eadfca408ce33ca903\":\"0x152d02c7e14af6800000\",\"0xae635bf73831119d2d29c0d04ff8f8d8d0a57a46\":\"0x487a9a304539440000\",\"0xae648155a658370f929be384f7e001047e49dd46\":\"0x2df24ae32be20440000\",\"0xae6f0c73fdd77c489727512174d9b50296611c4c\":\"0x14542ba12a337c00000\",\"0xae70e69d2c4a0af818807b1a2705f79fd0b5dbc4\":\"0x35659ef93f0fc40000\",\"0xae7739124ed153052503fc101410d1ffd8cd13b7\":\"0x3634fb9f1489a70000\",\"0xae78bb849139a6ba38ae92a09a69601cc4cb62d1\":\"0x1b1ae4d6e2ef500000\",\"0xae842210f44d14c4a4db91fc9d3b3b50014f7bf7\":\"0xd8d726b7177a800000\",\"0xae842e81858ecfedf6506c686dc204ac15bf8b24\":\"0x22b1c8c1227a00000\",\"0xae8954f8d6166de507cf61297d0fc7ca6b9e7128\":\"0x1043561a8829300000\",\"0xae9ecd6bdd952ef497c0050ae0ab8a82a91898ce\":\"0x1a055690d9db80000\",\"0xae9f5c3fbbe0c9bcbf1af8ff74ea280b3a5d8b08\":\"0x5dc892aa1131c80000\",\"0xaead88d689416b1c91f2364421375b7d3c70fb2e\":\"0x6c6b935b8bbd400000\",\"0xaeadfcd0978edad74a32bd01a0a51d37f246e661\":\"0xe18398e7601900000\",\"0xaeb916ebf49d0f86c13f7331cef19e129937512d\":\"0x2085655b8d1b0a0000\",\"0xaebd4f205de799b64b3564b256d42a711d37ef99\":\"0x3fcf8b4574f84e0000\",\"0xaec27ce2133e82d052520afb5c576d9f7eb93ed2\":\"0xdd04120ba09cfe60000\",\"0xaec27ff5d7f9ddda91183f46f9d52543b6cd2b2f\":\"0x18650127cc3dc80000\",\"0xaee49d68adedb081fd43705a5f78c778fb90de48\":\"0x1158e460913d00000\",\"0xaef5b12258a18dec07d5ec2e316574919d79d6d6\":\"0x6c6b935b8bbd400000\",\"0xaefcfe88c826ccf131d54eb4ea9eb80e61e1ee25\":\"0x126e72a69a50d00000\",\"0xaf06f5fa6d1214ec43967d1bd4dde74ab814a938\":\"0x4c53ecdc18a600000\",\"0xaf1148ef6c8e103d7530efc91679c9ac27000993\":\"0xad78ebc5ac6200000\",\"0xaf203e229d7e6d419df4378ea98715515f631485\":\"0x6acb3df27e1f880000\",\"0xaf2058c7282cf67c8c3cf930133c89617ce75d29\":\"0x177224aa844c7200000\",\"0xaf26f7c6bf453e2078f08953e4b28004a2c1e209\":\"0x56bc75e2d63100000\",\"0xaf3087e62e04bf900d5a54dc3e946274da92423b\":\"0x1158e460913d00000\",\"0xaf3614dcb68a36e45a4e911e62796247222d595b\":\"0x7a81065f1103bc0000\",\"0xaf3615c789d0b1152ad4db25fe5dcf222804cf62\":\"0x3635c9adc5dea00000\",\"0xaf3cb5965933e7dad883693b9c3e15beb68a4873\":\"0x6c6b935b8bbd400000\",\"0xaf4493e8521ca89d95f5267c1ab63f9f45411e1b\":\"0xad78ebc5ac6200000\",\"0xaf4cf41785161f571d0ca69c94f8021f41294eca\":\"0x215f835bc769da80000\",\"0xaf529bdb459cc185bee5a1c58bf7e8cce25c150d\":\"0xaadec983fcff40000\",\"0xaf67fd3e127fd9dc36eb3fcd6a80c7be4f7532b2\":\"0x5a87e7d7f5f6580000\",\"0xaf771039345a343001bc0f8a5923b126b60d509c\":\"0x35659ef93f0fc40000\",\"0xaf7f79cb415a1fb8dbbd094607ee8d41fb7c5a3b\":\"0x21e19e0c9bab2400000\",\"0xaf87d2371ef378957fbd05ba2f1d66931b01e2b8\":\"0x25f273933db5700000\",\"0xaf880fc7567d5595cacce15c3fc14c8742c26c9e\":\"0x73f75d1a085ba0000\",\"0xaf8e1dcb314c950d3687434d309858e1a8739cd4\":\"0xe7eeba3410b740000\",\"0xaf992dd669c0883e5515d3f3112a13f617a4c367\":\"0x6c6b935b8bbd400000\",\"0xafa1d5ad38fed44759c05b8993c1aa0dace19f40\":\"0x4563918244f400000\",\"0xafa539586e4719174a3b46b9b3e663a7d1b5b987\":\"0x10f0cf064dd59200000\",\"0xafa6946effd5ff53154f82010253df47ae280ccc\":\"0x6acb3df27e1f880000\",\"0xafc8ebe8988bd4105acc4c018e546a1e8f9c7888\":\"0x1b1ae4d6e2ef500000\",\"0xafcc7dbb8356d842d43ae7e23c8422b022a30803\":\"0x66ffcbfd5e5a3000000\",\"0xafd019ff36a09155346b69974815a1c912c90aa4\":\"0x6c6b935b8bbd400000\",\"0xafdac5c1cb56e245bf70330066a817eaafac4cd1\":\"0x1158e460913d00000\",\"0xafdd1b786162b8317e20f0e979f4b2ce486d765d\":\"0x1158e460913d00000\",\"0xaff1045adf27a1aa329461b24de1bae9948a698b\":\"0x1cf84a30a0a0c0000\",\"0xaff107960b7ec34ed690b665024d60838c190f70\":\"0x1b1ae4d6e2ef500000\",\"0xaff11ccf699304d5f5862af86083451c26e79ae5\":\"0x6c5db2a4d815dc0000\",\"0xaff161740a6d909fe99c59a9b77945c91cc91448\":\"0x340aad21b3b700000\",\"0xaffc99d5ebb4a84fe7788d97dce274b038240438\":\"0x10f0cf064dd59200000\",\"0xaffea0473722cb7f0e0e86b9e11883bf428d8d54\":\"0x692ae8897081d00000\",\"0xb00996b0566ecb3e7243b8227988dcb352c21899\":\"0x28a857425466f800000\",\"0xb01e389b28a31d8e4995bdd7d7c81beeab1e4119\":\"0x3635c9adc5dea00000\",\"0xb02d062873334545cea29218e4057760590f7423\":\"0xacb6a1c7d93a880000\",\"0xb02fa29387ec12e37f6922ac4ce98c5b09e0b00f\":\"0x6c6b935b8bbd400000\",\"0xb036916bdacf94b69e5a8a65602975eb026104dd\":\"0x1158e460913d00000\",\"0xb041310fe9eed6864cedd4bee58df88eb4ed3cac\":\"0x21e19e0c9bab2400000\",\"0xb055af4cadfcfdb425cf65ba6431078f07ecd5ab\":\"0x56bc75e2d63100000\",\"0xb0571153db1c4ed7acaefe13ecdfdb72e7e4f06a\":\"0x110cff796ac195200000\",\"0xb06eab09a610c6a53d56a946b2c43487ac1d5b2d\":\"0x3635c9adc5dea00000\",\"0xb07249e055044a9155359a402937bbd954fe48b6\":\"0x56bc75e2d63100000\",\"0xb07618328a901307a1b7a0d058fcd5786e9e72fe\":\"0x667495d4a4330ce0000\",\"0xb079bb4d9866143a6da72ae7ac0022062981315c\":\"0x29331e6558f0e00000\",\"0xb07bcc085ab3f729f24400416837b69936ba8873\":\"0x6c6d84bccdd9ce0000\",\"0xb07bcf1cc5d4462e5124c965ecf0d70dc27aca75\":\"0x56bc75e2d631000000\",\"0xb07cb9c12405b711807543c4934465f87f98bd2d\":\"0x6c6b935b8bbd400000\",\"0xb07fdeaff91d4460fe6cd0e8a1b0bd8d22a62e87\":\"0x11d2529f3535ab00000\",\"0xb09fe6d4349b99bc37938054022d54fca366f7af\":\"0x2a5a058fc295ed000000\",\"0xb0aa00950c0e81fa3210173e729aaf163a27cd71\":\"0x878678326eac9000000\",\"0xb0ac4eff6680ee14169cdadbffdb30804f6d25f5\":\"0x6c6b935b8bbd400000\",\"0xb0b36af9aeeedf97b6b02280f114f13984ea3260\":\"0x35659ef93f0fc40000\",\"0xb0b779b94bfa3c2e1f587bcc9c7e21789222378f\":\"0x54069233bf7f780000\",\"0xb0baeb30e313776c4c6d247402ba4167afcda1cc\":\"0x6acb3df27e1f880000\",\"0xb0bb29a861ea1d424d45acd4bfc492fb8ed809b7\":\"0x4563918244f400000\",\"0xb0c1b177a220e41f7c74d07cde8569c21c75c2f9\":\"0x12f939c99edab800000\",\"0xb0c7ce4c0dc3c2bbb99cc1857b8a455f611711ce\":\"0xd8d726b7177a800000\",\"0xb0cef8e8fb8984a6019f01c679f272bbe68f5c77\":\"0x83d6c7aab63600000\",\"0xb0d32bd7e4e695b7b01aa3d0416f80557dba9903\":\"0x3739ff0f6e613300000\",\"0xb0d3c9872b85056ea0c0e6d1ecf7a77e3ce6ab85\":\"0x10f08eda8e555098000\",\"0xb0e469c886593815b3495638595daef0665fae62\":\"0x692ae8897081d00000\",\"0xb0e760bb07c081777345e0578e8bc898226d4e3b\":\"0x6c6b935b8bbd400000\",\"0xb1043004ec1941a8cf4f2b00b15700ddac6ff17e\":\"0x3635c9adc5dea00000\",\"0xb105dd3d987cffd813e9c8500a80a1ad257d56c6\":\"0x6c6acc67d7b1d40000\",\"0xb10fd2a647102f881f74c9fbc37da632949f2375\":\"0x22b1c8c1227a00000\",\"0xb115ee3ab7641e1aa6d000e41bfc1ec7210c2f32\":\"0x2c0bb3dd30c4e200000\",\"0xb1178ad47383c31c8134a1941cbcd474d06244e2\":\"0x3635c9adc5dea00000\",\"0xb1179589e19db9d41557bbec1cb24ccc2dec1c7f\":\"0x152d02c7e14af6800000\",\"0xb119e79aa9b916526581cbf521ef474ae84dcff4\":\"0x4fba1001e5befe0000\",\"0xb11fa7fb270abcdf5a2eab95aa30c4b53636efbf\":\"0x2b5e3af16b18800000\",\"0xb124bcb6ffa430fcae2e86b45f27e3f21e81ee08\":\"0x6c6b935b8bbd400000\",\"0xb129a5cb7105fe810bd895dc7206a991a4545488\":\"0x1a055690d9db80000\",\"0xb12ed07b8a38ad5506363fc07a0b6d799936bdaf\":\"0x21e19e0c9bab2400000\",\"0xb134c004391ab4992878337a51ec242f42285742\":\"0x6c6b935b8bbd400000\",\"0xb13f93af30e8d7667381b2b95bc1a699d5e3e129\":\"0x16c4abbebea0100000\",\"0xb1459285863ea2db3759e546ceb3fb3761f5909c\":\"0x3cd72a894087e08000\",\"0xb146a0b925553cf06fcaf54a1b4dfea621290757\":\"0x6c6e59e67c78540000\",\"0xb14a7aaa8f49f2fb9a8102d6bbe4c48ae7c06fb2\":\"0x1b1ae4d6e2ef5000000\",\"0xb14bbeff70720975dc6191b2a44ff49f2672873c\":\"0x7c0860e5a80dc0000\",\"0xb14cc8de33d6338236539a489020ce4655a32bc6\":\"0x1b1ae4d6e2ef5000000\",\"0xb14ddb0386fb606398b8cc47565afae00ff1d66a\":\"0xa12aff083e66f00000\",\"0xb153f828dd076d4a7c1c2574bb2dee1a44a318a8\":\"0x15af1d78b58c400000\",\"0xb1540e94cff3465cc3d187e7c8e3bdaf984659e2\":\"0xa215e44390e3330000\",\"0xb158db43fa62d30e65f3d09bf781c7b67372ebaa\":\"0x6c5db2a4d815dc0000\",\"0xb161725fdcedd17952d57b23ef285b7e4b1169e8\":\"0x2b6dfed3664958000\",\"0xb16479ba8e7df8f63e1b95d149cd8529d735c2da\":\"0x2de33a6aac32548000\",\"0xb166e37d2e501ae73c84142b5ffb5aa655dd5a99\":\"0x6c5db2a4d815dc0000\",\"0xb183ebee4fcb42c220e47774f59d6c54d5e32ab1\":\"0x56f7a9c33c04d10000\",\"0xb188078444027e386798a8ae68698919d5cc230d\":\"0xe7eeba3410b740000\",\"0xb1896a37e5d8825a2d01765ae5de629977de8352\":\"0xad78ebc5ac6200000\",\"0xb18e67a5050a1dc9fb190919a33da838ef445014\":\"0x1158e460913d00000\",\"0xb1a2b43a7433dd150bb82227ed519cd6b142d382\":\"0x946d620d744b880000\",\"0xb1c0d08b36e184f9952a4037e3e53a667d070a4e\":\"0x3635c9adc5dea00000\",\"0xb1c328fb98f2f19ab6646f0a7c8c566fda5a8540\":\"0x878678326eac900000\",\"0xb1c751786939bba0d671a677a158c6abe7265e46\":\"0x21e19e0c9bab2400000\",\"0xb1cd4bdfd104489a026ec99d597307a04279f173\":\"0x43c33c1937564800000\",\"0xb1cf94f8091505055f010ab4bac696e0ca0f67a1\":\"0x55a6e79ccd1d300000\",\"0xb1d6b01b94d854fe8b374aa65e895cf22aa2560e\":\"0x32f51edbaaa3300000\",\"0xb1dba5250ba9625755246e067967f2ad2f0791de\":\"0x10f0cf064dd592000000\",\"0xb1e2dd95e39ae9775c55aeb13f12c2fa233053ba\":\"0x6c6b935b8bbd400000\",\"0xb1e6e810c24ab0488de9e01e574837829f7c77d0\":\"0x15af1d78b58c400000\",\"0xb1e9c5f1d21e61757a6b2ee75913fc5a1a4101c3\":\"0x6c6b935b8bbd400000\",\"0xb203d29e6c56b92699c4b92d1f6f84648dc4cfbc\":\"0x15af1d78b58c400000\",\"0xb216dc59e27c3d7279f5cd5bb2becfb2606e14d9\":\"0x15af1d78b58c400000\",\"0xb21b7979bf7c5ca01fa82dd640b41c39e6c6bc75\":\"0x6c6acc67d7b1d40000\",\"0xb223bf1fbf80485ca2b5567d98db7bc3534dd669\":\"0xd8d726b7177a800000\",\"0xb22d5055d9623135961e6abd273c90deea16a3e7\":\"0x4be4e7267b6ae00000\",\"0xb22dadd7e1e05232a93237baed98e0df92b1869e\":\"0x6c6b935b8bbd400000\",\"0xb234035f7544463ce1e22bc553064684c513cd51\":\"0xd89fa3dc48dcf0000\",\"0xb247cf9c72ec482af3eaa759658f793d670a570c\":\"0x31708ae00454400000\",\"0xb2676841ee9f2d31c172e82303b0fe9bbf9f1e09\":\"0xad78ebc5ac6200000\",\"0xb279c7d355c2880392aad1aa21ee867c3b3507df\":\"0x445be3f2ef87940000\",\"0xb27c1a24204c1e118d75149dd109311e07c073ab\":\"0xa80d24677efef00000\",\"0xb28181a458a440f1c6bb1de8400281a3148f4c35\":\"0x14620c57dddae00000\",\"0xb28245037cb192f75785cb86cbfe7c930da258b0\":\"0x3635c9adc5dea000000\",\"0xb287f7f8d8c3872c1b586bcd7d0aedbf7e732732\":\"0x1158e460913d00000\",\"0xb28bb39f3466517cd46f979cf59653ee7d8f152e\":\"0x18650127cc3dc80000\",\"0xb28dbfc6499894f73a71faa00abe0f4bc9d19f2a\":\"0x56bc75e2d63100000\",\"0xb2968f7d35f208871631c6687b3f3daeabc6616c\":\"0x875c47f289f760000\",\"0xb29f5b7c1930d9f97a115e067066f0b54db44b3b\":\"0x3635c9adc5dea00000\",\"0xb2a144b1ea67b9510f2267f9da39d3f93de26642\":\"0x6c6b935b8bbd400000\",\"0xb2a2c2111612fb8bbb8e7dd9378d67f1a384f050\":\"0x1158e460913d00000\",\"0xb2a498f03bd7178bd8a789a00f5237af79a3e3f8\":\"0x41bad155e6512200000\",\"0xb2aa2f1f8e93e79713d92cea9ffce9a40af9c82d\":\"0x6c6b935b8bbd400000\",\"0xb2b516fdd19e7f3864b6d2cf1b252a4156f1b03b\":\"0x2e983c76115fc0000\",\"0xb2b7cdb4ff4b61d5b7ce0b2270bbb5269743ec04\":\"0x6c6b935b8bbd400000\",\"0xb2bdbedf95908476d7148a370cc693743628057f\":\"0xd8d726b7177a800000\",\"0xb2bfaa58b5196c5cb7f89de15f479d1838de713d\":\"0x1236efcbcbb340000\",\"0xb2c53efa33fe4a3a1a80205c73ec3b1dbcad0602\":\"0x6801dab35918938000\",\"0xb2d0360515f17daba90fcbac8205d569b915d6ac\":\"0x14542ba12a337c00000\",\"0xb2d1e99af91231858e7065dd1918330dc4c747d5\":\"0x3894f0e6f9b9f700000\",\"0xb2d9ab9664bcf6df203c346fc692fd9cbab9205e\":\"0x17be78976065180000\",\"0xb2ddb786d3794e270187d0451ad6c8b79e0e8745\":\"0x15af1d78b58c400000\",\"0xb2e085fddd1468ba07415b274e734e11237fb2a9\":\"0x56bc75e2d63100000\",\"0xb2e9d76bf50fc36bf7d3944b63e9ca889b699968\":\"0x9032ea62b74b100000\",\"0xb2f9c972c1e9737755b3ff1b3088738396395b26\":\"0x43c33c1937564800000\",\"0xb2fc84a3e50a50af02f94da0383ed59f71ff01d7\":\"0x65a4da25d3016c00000\",\"0xb3050beff9de33c80e1fa15225e28f2c413ae313\":\"0x25f273933db5700000\",\"0xb31196714a48dff726ea9433cd2912f1a414b3b3\":\"0x914878a8c05ee00000\",\"0xb3145b74506d1a8d047cdcdc55392a7b5350799a\":\"0x1b6229741c0d3d5d8000\",\"0xb320834836d1dbfda9e7a3184d1ad1fd4320ccc0\":\"0x3635c9adc5dea00000\",\"0xb323dcbf2eddc5382ee4bbbb201ca3931be8b438\":\"0x6c6b935b8bbd400000\",\"0xb32400fd13c5500917cb037b29fe22e7d5228f2d\":\"0x878678326eac9000000\",\"0xb325674c01e3f7290d5226339fbeac67d221279f\":\"0x97c9ce4cf6d5c00000\",\"0xb32825d5f3db249ef4e85cc4f33153958976e8bc\":\"0x1b2df9d219f5798000\",\"0xb32af3d3e8d075344926546f2e32887bf93b16bd\":\"0xad78ebc5ac6200000\",\"0xb32f1c2689a5ce79f1bc970b31584f1bcf2283e7\":\"0x1158e460913d00000\",\"0xb33c0323fbf9c26c1d8ac44ef74391d0804696da\":\"0x1158e460913d00000\",\"0xb34f04b8db65bba9c26efc4ce6efc50481f3d65d\":\"0x43c33c1937564800000\",\"0xb3557d39b5411b84445f5f54f38f62d2714d0087\":\"0x2086ac351052600000\",\"0xb358e97c70b605b1d7d729dfb640b43c5eafd1e7\":\"0x43c33c1937564800000\",\"0xb35e8a1c0dac7e0e66dbac736a592abd44012561\":\"0xcfce55aa12b30000\",\"0xb3667894b7863c068ad344873fcff4b5671e0689\":\"0x43c33c1937564800000\",\"0xb3717731dad65132da792d876030e46ac227bb8a\":\"0x3635c9adc5dea00000\",\"0xb3731b046c8ac695a127fd79d0a5d5fa6ae6d12e\":\"0x6c4fd1ee246e780000\",\"0xb37c2b9f50637bece0ca959208aefee6463ba720\":\"0x15af1d78b58c400000\",\"0xb388b5dfecd2c5e4b596577c642556dbfe277855\":\"0x1158e460913d00000\",\"0xb38c4e537b5df930d65a74d043831d6b485bbde4\":\"0x15af1d78b58c400000\",\"0xb39139576194a0866195151f33f2140ad1cc86cf\":\"0x152d02c7e14af6800000\",\"0xb39f4c00b2630cab7db7295ef43d47d501e17fd7\":\"0xd8d726b7177a800000\",\"0xb3a64b1176724f5409e1414a3523661baee74b4a\":\"0x16368ff4ff9c10000\",\"0xb3a6bd41f9d9c3201e050b87198fbda399342210\":\"0xc461e1dd1029b58000\",\"0xb3a8c2cb7d358e5739941d945ba9045a023a8bbb\":\"0x3635c9adc5dea00000\",\"0xb3ae54fba09d3ee1d6bdd1e957923919024c35fa\":\"0x38d2cee65b22a8000\",\"0xb3b7f493b44a2c8d80ec78b1cdc75a652b73b06c\":\"0x6c6b935b8bbd400000\",\"0xb3c228731d186d2ded5b5fbe004c666c8e469b86\":\"0x19274b259f6540000\",\"0xb3c260609b9df4095e6c5dff398eeb5e2df49985\":\"0xdc55fdb17647b0000\",\"0xb3c65b845aba6cd816fbaae983e0e46c82aa8622\":\"0x3635c9adc5dea00000\",\"0xb3c94811e7175b148b281c1a845bfc9bb6fbc115\":\"0xad78ebc5ac6200000\",\"0xb3e20eb4de18bd060221689894bee5aeb25351ee\":\"0x3fc80cce516598000\",\"0xb3e3c439069880156600c2892e448d4136c92d9b\":\"0x2e141ea081ca080000\",\"0xb3f82a87e59a39d0d2808f0751eb72c2329cdcc5\":\"0x10f0cf064dd59200000\",\"0xb3fc1d6881abfcb8becc0bb021b8b73b7233dd91\":\"0x2b5e3af16b1880000\",\"0xb40594c4f3664ef849cca6227b8a25aa690925ee\":\"0xd8d726b7177a800000\",\"0xb41eaf5d51a5ba1ba39bb418dbb54fab750efb1f\":\"0x3635c9adc5dea00000\",\"0xb424d68d9d0d00cec1938c854e15ffb880ba0170\":\"0xad78ebc5ac6200000\",\"0xb4256273962bf631d014555cc1da0dcc31616b49\":\"0x6c6b935b8bbd400000\",\"0xb43067fe70d9b55973ba58dc64dd7f311e554259\":\"0xad78ebc5ac6200000\",\"0xb43657a50eecbc3077e005d8f8d94f377876bad4\":\"0x1ec1b3a1ff75a0000\",\"0xb43c27f7a0a122084b98f483922541c8836cee2c\":\"0x26c29e47c4844c0000\",\"0xb4413576869c08f9512ad311fe925988a52d3414\":\"0x21e19e0c9bab2400000\",\"0xb44605552471a6eee4daab71ff3bb41326d473e0\":\"0x2d7e3d51ba53d00000\",\"0xb447571dacbb3ecbb6d1cf0b0c8f3838e52324e2\":\"0x1a318667fb4058000\",\"0xb44783c8e57b480793cbd69a45d90c7b4f0c48ac\":\"0x1158e460913d00000\",\"0xb44815a0f28e569d0e921a4ade8fb2642526497a\":\"0x302379bf2ca2e0000\",\"0xb4496ddb27799a222457d73979116728e8a1845b\":\"0x8d819ea65fa62f8000\",\"0xb4524c95a7860e21840296a616244019421c4aba\":\"0x1b1ae4d6e2ef5000000\",\"0xb45cca0d36826662683cf7d0b2fdac687f02d0c4\":\"0x3635c9adc5dea00000\",\"0xb46440c797a556e04c7d9104660491f96bb076bf\":\"0xcec76f0e71520000\",\"0xb46ace865e2c50ea4698d216ab455dff5a11cd72\":\"0x3635c9adc5dea00000\",\"0xb46d1182e5aacaff0d26b2fcf72f3c9ffbcdd97d\":\"0xaa2a603cdd7f2c0000\",\"0xb48921c9687d5510744584936e8886bdbf2df69b\":\"0x3635c9adc5dea00000\",\"0xb498bb0f520005b6216a4425b75aa9adc52d622b\":\"0xd8d726b7177a800000\",\"0xb4b11d109f608fa8edd3fea9f8c315649aeb3d11\":\"0x10f0cf064dd59200000\",\"0xb4b14bf45455d0ab0803358b7524a72be1a2045b\":\"0x1b1ae4d6e2ef500000\",\"0xb4b185d943ee2b58631e33dff5af6854c17993ac\":\"0x3635c9adc5dea00000\",\"0xb4bf24cb83686bc469869fefb044b909716993e2\":\"0x6c6b935b8bbd400000\",\"0xb4c20040ccd9a1a3283da4d4a2f365820843d7e2\":\"0x3635c9adc5dea00000\",\"0xb4c8170f7b2ab536d1d9a25bdd203ae1288dc3d5\":\"0xad78ebc5ac6200000\",\"0xb4d82f2e69943f7de0f5f7743879406fac2e9cec\":\"0x22b1c8c1227a00000\",\"0xb4dd460cd016725a64b22ea4f8e06e06674e033e\":\"0x1231bb8748547a80000\",\"0xb4dd5499daeb2507fb2de12297731d4c72b16bb0\":\"0x1158e460913d00000\",\"0xb5046cb3dc1dedbd364514a2848e44c1de4ed147\":\"0x37b7d9bb820405e0000\",\"0xb508f987b2de34ae4cf193de85bff61389621f88\":\"0x14542ba12a337c00000\",\"0xb50955aa6e341571986608bdc891c2139f540cdf\":\"0x6acb3df27e1f880000\",\"0xb50c149a1906fad2786ffb135aab501737e9e56f\":\"0x150894e849b3900000\",\"0xb50c9f5789ae44e2dce017c714caf00c830084c2\":\"0x155bd9307f9fe80000\",\"0xb514882c979bb642a80dd38754d5b8c8296d9a07\":\"0x33c5499031720c0000\",\"0xb51ddcb4dd4e8ae6be336dd9654971d9fec86b41\":\"0x16d464f83de2948000\",\"0xb51e558eb5512fbcfa81f8d0bd938c79ebb5242b\":\"0x26c29e47c4844c0000\",\"0xb523fff9749871b35388438837f7e6e0dea9cb6b\":\"0x6c6b935b8bbd400000\",\"0xb52dfb45de5d74e3df208332bc571c809b8dcf32\":\"0x14542ba12a337c00000\",\"0xb535f8db879fc67fec58824a5cbe6e5498aba692\":\"0x678a932062e4180000\",\"0xb537d36a70eeb8d3e5c80de815225c1158cb92c4\":\"0x5150ae84a8cdf00000\",\"0xb53bcb174c2518348b818aece020364596466ba3\":\"0x6c6b935b8bbd400000\",\"0xb5493ef173724445cf345c035d279ba759f28d51\":\"0x1158e460913d00000\",\"0xb553d25d6b5421e81c2ad05e0b8ba751f8f010e3\":\"0x6c6b935b8bbd400000\",\"0xb55474ba58f0f2f40e6cbabed4ea176e011fcad6\":\"0x6acb3df27e1f880000\",\"0xb555d00f9190cc3677aef314acd73fdc39399259\":\"0x6c6b935b8bbd400000\",\"0xb557ab9439ef50d237b553f02508364a466a5c03\":\"0xad78ebc5ac6200000\",\"0xb56a780028039c81caf37b6775c620e786954764\":\"0x6c6b935b8bbd400000\",\"0xb56ad2aec6c8c3f19e1515bbb7dd91285256b639\":\"0x3635c9adc5dea00000\",\"0xb57413060af3f14eb479065f1e9d19b3757ae8cc\":\"0x22b1c8c1227a00000\",\"0xb57549bfbc9bdd18f736b22650e48a73601fa65c\":\"0x182d7e4cfda0380000\",\"0xb577b6befa054e9c040461855094b002d7f57bd7\":\"0x1823f3cf621d23400000\",\"0xb57b04fa23d1203fae061eac4542cb60f3a57637\":\"0xa5aa85009e39c0000\",\"0xb5870ce342d43343333673038b4764a46e925f3e\":\"0x3635c9adc5dea00000\",\"0xb587b44a2ca79e4bc1dd8bfdd43a207150f2e7e0\":\"0x222c8eb3ff66400000\",\"0xb589676d15a04448344230d4ff27c95edf122c49\":\"0x3635c9adc5dea00000\",\"0xb58b52865ea55d8036f2fab26098b352ca837e18\":\"0xfc936392801c0000\",\"0xb5906b0ae9a28158e8ac550e39da086ee3157623\":\"0xad78ebc5ac6200000\",\"0xb5a4679685fa14196c2e9230c8c4e33bffbc10e2\":\"0x4be4e7267b6ae00000\",\"0xb5a589dd9f4071dbb6fba89b3f5d5dae7d96c163\":\"0x6c6b935b8bbd400000\",\"0xb5a606f4ddcbb9471ec67f658caf2b00ee73025e\":\"0xea756ea92afc740000\",\"0xb5ad5157dda921e6bafacd9086ae73ae1f611d3f\":\"0x6c6b935b8bbd400000\",\"0xb5add1e7809f7d03069bfe883b0a932210be8712\":\"0x3635c9adc5dea00000\",\"0xb5ba29917c78a1d9e5c5c713666c1e411d7f693a\":\"0xa80d24677efef00000\",\"0xb5c816a8283ca4df68a1a73d63bd80260488df08\":\"0xad78ebc5ac6200000\",\"0xb5cac5ed03477d390bb267d4ebd46101fbc2c3da\":\"0xaadec983fcff40000\",\"0xb5cdbc4115406f52e5aa85d0fea170d2979cc7ba\":\"0x487a9a304539440000\",\"0xb5d9934d7b292bcf603b2880741eb760288383a0\":\"0xe7c2518505060000\",\"0xb5dd50a15da34968890a53b4f13fe1af081baaaa\":\"0xd8d726b7177a800000\",\"0xb5fa8184e43ed3e0b8ab91216461b3528d84fd09\":\"0x914878a8c05ee00000\",\"0xb5fb7ea2ddc1598b667a9d57dd39e85a38f35d56\":\"0x1b1ae4d6e2ef500000\",\"0xb600429752f399c80d0734744bae0a022eca67c6\":\"0x1158e460913d00000\",\"0xb600feab4aa96c537504d96057223141692c193a\":\"0x15af1d78b58c400000\",\"0xb6047cdf932db3e4045f4976122341537ed5961e\":\"0x1158e460913d00000\",\"0xb615e940143eb57f875893bc98a61b3d618c1e8c\":\"0x1158e460913d00000\",\"0xb61c34fcacda701a5aa8702459deb0e4ae838df8\":\"0x7695a92c20d6fe00000\",\"0xb63064bd3355e6e07e2d377024125a33776c4afa\":\"0x8375a2abcca24400000\",\"0xb635a4bc71fb28fdd5d2c322983a56c284426e69\":\"0x93739534d28680000\",\"0xb646df98b49442746b61525c81a3b04ba3106250\":\"0x6acb3df27e1f880000\",\"0xb65941d44c50d24666670d364766e991c02e11c2\":\"0x2086ac351052600000\",\"0xb65bd780c7434115162027565223f44e5498ff8c\":\"0x43c30fb0884a96c0000\",\"0xb66411e3a02dedb726fa79107dc90bc1cae64d48\":\"0x6c6b935b8bbd400000\",\"0xb66675142e3111a1c2ea1eb2419cfa42aaf7a234\":\"0x3635c9adc5dea00000\",\"0xb66f92124b5e63035859e390628869dbdea9485e\":\"0x215f835bc769da80000\",\"0xb672734afcc224e2e609fc51d4f059732744c948\":\"0x1004e2e45fb7ee0000\",\"0xb6771b0bf3427f9ae7a93e7c2e61ee63941fdb08\":\"0x3fb26692954bfc00000\",\"0xb67a80f170197d96cdcc4ab6cba627b4afa6e12c\":\"0x821ab0d44149800000\",\"0xb68899e7610d4c93a23535bcc448945ba1666f1c\":\"0xad78ebc5ac6200000\",\"0xb6a82933c9eadabd981e5d6d60a6818ff806e36b\":\"0x15af1d78b58c400000\",\"0xb6aacb8cb30bab2ae4a2424626e6e12b02d04605\":\"0x1b1ae4d6e2ef5000000\",\"0xb6b34a263f10c3d2eceb0acc559a7b2ab85ce565\":\"0xd8d726b7177a800000\",\"0xb6bfe1c3ef94e1846fb9e3acfe9b50c3e9069233\":\"0x6c6acc67d7b1d40000\",\"0xb6cd7432d5161be79768ad45de3e447a07982063\":\"0xd8d726b7177a800000\",\"0xb6ce4dc560fc73dc69fb7a62e388db7e72ea764f\":\"0x345df169e9a3580000\",\"0xb6decf82969819ba02de29b9b593f21b64eeda0f\":\"0x281d901f4fdd100000\",\"0xb6e6c3222b6b6f9be2875d2a89f127fb64100fe2\":\"0x1b21d5323cc30200000\",\"0xb6e8afd93dfa9af27f39b4df06076710bee3dfab\":\"0x15af1d78b58c40000\",\"0xb6f78da4f4d041b3bc14bc5ba519a5ba0c32f128\":\"0x247dd32c3fe195048000\",\"0xb6fb39786250081426a342c70d47ee521e5bc563\":\"0x32d26d12e980b600000\",\"0xb70dba9391682b4a364e77fe99256301a6c0bf1f\":\"0xad78ebc5ac6200000\",\"0xb71623f35107cf7431a83fb3d204b29ee0b1a7f4\":\"0x11164759ffb320000\",\"0xb71a13ba8e95167b80331b52d69e37054fe7a826\":\"0xad78ebc5ac6200000\",\"0xb71b62f4b448c02b1201cb5e394ae627b0a560ee\":\"0x1b1ae4d6e2ef500000\",\"0xb72220ade364d0369f2d2da783ca474d7b9b34ce\":\"0x1b1ab319f5ec750000\",\"0xb7230d1d1ff2aca366963914a79df9f7c5ea2c98\":\"0x1b1ae4d6e2ef5000000\",\"0xb7240af2af90b33c08ae9764103e35dce3638428\":\"0x1cadd2fe9686e638000\",\"0xb727a9fc82e1cffc5c175fa1485a9befa2cdbdd1\":\"0x3627e8f712373c0000\",\"0xb72c2a011c0df50fbb6e28b20ae1aad217886790\":\"0xd8d726b7177a800000\",\"0xb7382d37db0398ac72410cf9813de9f8e1ec8dad\":\"0x3636c25e66ece70000\",\"0xb73b4ff99eb88fd89b0b6d57a9bc338e886fa06a\":\"0x1bc16d674ec800000\",\"0xb73d6a77559c86cf6574242903394bacf96e3570\":\"0x4f1a77ccd3ba00000\",\"0xb74372dbfa181dc9242f39bf1d3731dffe2bdacf\":\"0x6c6b935b8bbd400000\",\"0xb7479dab5022c4d5dbaaf8de171b4e951dd1a457\":\"0x4563918244f400000\",\"0xb749b54e04d5b19bdcedfb84da7701ab478c27ae\":\"0x914878a8c05ee00000\",\"0xb74ed2666001c16333cf7af59e4a3d4860363b9c\":\"0xa7ebd5e4363a00000\",\"0xb75149e185f6e3927057739073a1822ae1cf0df2\":\"0xd8d8583fa2d52f0000\",\"0xb753a75f9ed10b21643a0a3dc0517ac96b1a4068\":\"0x15c8185b2c1ff40000\",\"0xb756ad52f3bf74a7d24c67471e0887436936504c\":\"0x43c33c1937564800000\",\"0xb7576e9d314df41ec5506494293afb1bd5d3f65d\":\"0x1158e460913d00000\",\"0xb758896f1baa864f17ebed16d953886fee68aae6\":\"0x3635c9adc5dea00000\",\"0xb768b5234eba3a9968b34d6ddb481c8419b3655d\":\"0xcfce55aa12b30000\",\"0xb782bfd1e2de70f467646f9bc09ea5b1fcf450af\":\"0xe7eeba3410b740000\",\"0xb7a2c103728b7305b5ae6e961c94ee99c9fe8e2b\":\"0xa968163f0a57b400000\",\"0xb7a31a7c38f3db09322eae11d2272141ea229902\":\"0x6c6b935b8bbd400000\",\"0xb7a6791c16eb4e2162f14b6537a02b3d63bfc602\":\"0x2a526391ac93760000\",\"0xb7a7f77c348f92a9f1100c6bd829a8ac6d7fcf91\":\"0x62a992e53a0af00000\",\"0xb7c077946674ba9341fb4c747a5d50f5d2da6415\":\"0x3635c9adc5dea00000\",\"0xb7c0d0cc0b4d342d4062bac624ccc3c70cc6da3f\":\"0xd8d726b7177a800000\",\"0xb7c9f12b038e73436d17e1c12ffe1aeccdb3f58c\":\"0x1d460162f516f00000\",\"0xb7cc6b1acc32d8b295df68ed9d5e60b8f64cb67b\":\"0x1043561a8829300000\",\"0xb7ce684b09abda53389a875369f71958aeac3bdd\":\"0x6c6b935b8bbd400000\",\"0xb7d12e84a2e4c4a6345af1dd1da9f2504a2a996e\":\"0xad78ebc5ac6200000\",\"0xb7d252ee9402b0eef144295f0e69f0db586c0871\":\"0x23c757072b8dd00000\",\"0xb7d581fe0af1ec383f3b3c416783f385146a7612\":\"0x43c33c1937564800000\",\"0xb7f67314cb832e32e63b15a40ce0d7ffbdb26985\":\"0x398279264a818d0000\",\"0xb8040536958d5998ce4bec0cfc9c2204989848e9\":\"0x52ea70d498fd50a0000\",\"0xb8310a16cc6abc465007694b930f978ece1930bd\":\"0x281d901f4fdd100000\",\"0xb834acf3015322c58382eeb2b79638906e88b6de\":\"0x5150ae84a8cdf000000\",\"0xb84b53d0bb125656cddc52eb852ab71d7259f3d5\":\"0x3635c9adc5dea000000\",\"0xb84c8b9fd33ece00af9199f3cf5fe0cce28cd14a\":\"0xcf152640c5c8300000\",\"0xb85218f342f8012eda9f274e63ce2152b2dcfdab\":\"0xa80d24677efef00000\",\"0xb8555010776e3c5cb311a5adeefe9e92bb9a64b9\":\"0xd8d726b7177a800000\",\"0xb85f26dd0e72d9c29ebaf697a8af77472c2b58b5\":\"0x28519acc7190c700000\",\"0xb85ff03e7b5fc422981fae5e9941dacbdaba7584\":\"0x487a9a304539440000\",\"0xb86607021b62d340cf2652f3f95fd2dc67698bdf\":\"0x10f0cf064dd59200000\",\"0xb87de1bcd29269d521b8761cc39cfb4319d2ead5\":\"0x3635c9adc5dea00000\",\"0xb87f5376c2de0b6cc3c179c06087aa473d6b4674\":\"0x487a9a304539440000\",\"0xb884add88d83dc564ab8e0e02cbdb63919aea844\":\"0x6c6b935b8bbd400000\",\"0xb88a37c27f78a617d5c091b7d5b73a3761e65f2a\":\"0x6c6b935b8bbd400000\",\"0xb8947822d5ace7a6ad8326e95496221e0be6b73d\":\"0x1158e460913d00000\",\"0xb89c036ed7c492879921be41e10ca1698198a74c\":\"0x62a992e53a0af00000\",\"0xb89f4632df5909e58b2a9964f74feb9a3b01e0c5\":\"0x48875bcc6e7cbeb8000\",\"0xb8a79c84945e47a9c3438683d6b5842cff7684b1\":\"0x6c6b935b8bbd400000\",\"0xb8a979352759ba09e35aa5935df175bff678a108\":\"0x1158e460913d00000\",\"0xb8ab39805bd821184f6cbd3d2473347b12bf175c\":\"0x6685ac1bfe32c0000\",\"0xb8ac117d9f0dba80901445823c4c9d4fa3fedc6e\":\"0x3564c4427a8fc7d8000\",\"0xb8bc9bca7f71b4ed12e620438d620f53c114342f\":\"0x1b1ae4d6e2ef500000\",\"0xb8bedd576a4b4c2027da735a5bc3f533252a1808\":\"0x6c6b935b8bbd400000\",\"0xb8c2703d8c3f2f44c584bc10e7c0a6b64c1c097e\":\"0x12cddb8ead6f9f80000\",\"0xb8cc0f060aad92d4eb8b36b3b95ce9e90eb383d7\":\"0x1fc3842bd1f071c00000\",\"0xb8d2ddc66f308c0158ae3ccb7b869f7d199d7b32\":\"0x2dcbf4840eca000000\",\"0xb8d389e624a3a7aebce4d3e5dbdf6cdc29932aed\":\"0xad78ebc5ac6200000\",\"0xb8d531a964bcea13829620c0ced72422dadb4cca\":\"0x93715cc5ab8a70000\",\"0xb8d5c324a8209d7c8049d0d4aede02ba80ab578b\":\"0x393928629fff75e8000\",\"0xb8f20005b61352ffa7699a1b52f01f5ab39167f1\":\"0x21e19e0c9bab2400000\",\"0xb8f30758faa808dbc919aa7b425ec922b93b8129\":\"0x3636d7af5ec98e0000\",\"0xb9013c51bd078a098fae05bf2ace0849c6be17a5\":\"0x4563918244f400000\",\"0xb9144b677c2dc614ceefdf50985f1183208ea64c\":\"0x6c6b935b8bbd400000\",\"0xb916b1a01cdc4e56e7657715ea37e2a0f087d106\":\"0x826e3181e027068000\",\"0xb91d9e916cd40d193db60e79202778a0087716fc\":\"0x15f1ba7f4716200000\",\"0xb9231eb26e5f9e4b4d288f03906704fab96c87d6\":\"0x42bf06b78ed3b500000\",\"0xb92427ad7578b4bfe20a9f63a7c5506d5ca12dc8\":\"0x6c6b935b8bbd400000\",\"0xb927abd2d28aaaa24db31778d27419df8e1b04bb\":\"0x17e11c2a26f478000\",\"0xb94d47b3c052a5e50e4261ae06a20f45d8eee297\":\"0x6c6b935b8bbd400000\",\"0xb95396daaa490df2569324fcc6623be052f132ca\":\"0x6c6b935b8bbd400000\",\"0xb959dce02e91d9db02b1bd8b7d17a9c41a97af09\":\"0x1b1ae4d6e2ef5000000\",\"0xb95c9b10aa981cf4a67a71cc52c504dee8cf58bd\":\"0xd8d726b7177a800000\",\"0xb95cfda8465ba9c2661b249fc3ab661bdfa35ff0\":\"0x114a4e79a2c2108000\",\"0xb96841cabbc7dbd69ef0cf8f81dff3c8a5e21570\":\"0x28a857425466f800000\",\"0xb97a6733cd5fe99864b3b33460d1672434d5cafd\":\"0x6c65bbaa46c2cf8000\",\"0xb981ad5e6b7793a23fc6c1e8692eb2965d18d0da\":\"0x21e18d2c821c7520000\",\"0xb98ca31785ef06be49a1e47e864f60d076ca472e\":\"0xd8d726b7177a800000\",\"0xb9920fd0e2c735c256463caa240fb7ac86a93dfa\":\"0x5f68e8131ecf800000\",\"0xb992a967308c02b98af91ee760fd3b6b4824ab0e\":\"0x6c6b935b8bbd400000\",\"0xb9a985501ee950829b17fae1c9cf348c3156542c\":\"0xff17517ca9a620000\",\"0xb9b0a3219a3288d9b35b091b14650b8fe23dce2b\":\"0x2f6f10780d22cc00000\",\"0xb9cf71b226583e3a921103a5316f855a65779d1b\":\"0x5150ae84a8cdf000000\",\"0xb9e90c1192b3d5d3e3ab0700f1bf655f5dd4347a\":\"0x1b19e50b44977c0000\",\"0xb9fd3833e88e7cf1fa9879bdf55af4b99cd5ce3f\":\"0x3635c9adc5dea00000\",\"0xba0249e01d945bef93ee5ec61925e03c5ca509fd\":\"0xd8d726b7177a800000\",\"0xba0f39023bdb29eb1862a9f9059cab5d306e662f\":\"0x6c6b935b8bbd400000\",\"0xba10f2764290f875434372f79dbf713801caac01\":\"0x33c5499031720c0000\",\"0xba1531fb9e791896bcf3a80558a359f6e7c144bd\":\"0xd5967be4fc3f100000\",\"0xba176dbe3249e345cd4fa967c0ed13b24c47e586\":\"0x15aef9f1c31c7f0000\",\"0xba1f0e03cb9aa021f4dcebfa94e5c889c9c7bc9e\":\"0x6d190c475169a200000\",\"0xba1fcaf223937ef89e85675503bdb7ca6a928b78\":\"0x22b1c8c1227a000000\",\"0xba24fc436753a739db2c8d40e6d4d04c528e86fa\":\"0x2c0bb3dd30c4e200000\",\"0xba42f9aace4c184504abf5425762aca26f71fbdc\":\"0x207077dd8a79c0000\",\"0xba469aa5c386b19295d4a1b5473b540353390c85\":\"0x6c6b935b8bbd400000\",\"0xba6440aeb3737b8ef0f1af9b0c15f4c214ffc7cf\":\"0x3635c9adc5dea00000\",\"0xba6d31b9a261d640b5dea51ef2162c3109f1eba8\":\"0x10f0cf064dd59200000\",\"0xba70e8b4759c0c3c82cc00ac4e9a94dd5bafb2b8\":\"0x3043fa33c412d70000\",\"0xba8a63f3f40de4a88388bc50212fea8e064fbb86\":\"0x6c6b935b8bbd400000\",\"0xba8e46d69d2e2343d86c60d82cf42c2041a0c1c2\":\"0x56bc75e2d63100000\",\"0xbaa4b64c2b15b79f5f204246fd70bcbd86e4a92a\":\"0x1b1ae4d6e2ef500000\",\"0xbac8922c4acc7d2cb6fd59a14eb45cf3e702214b\":\"0x2b5e3af16b18800000\",\"0xbad235d5085dc7b068a67c412677b03e1836884c\":\"0x6c6b935b8bbd400000\",\"0xbad4425e171c3e72975eb46ac0a015db315a5d8f\":\"0x6c6b935b8bbd400000\",\"0xbadc2aef9f5951a8d78a6b35c3d0b3a4e6e2e739\":\"0x14542ba12a337c00000\",\"0xbade43599e02f84f4c3014571c976b13a36c65ab\":\"0xd8d726b7177a800000\",\"0xbae9b82f7299631408659dd74e891cb8f3860fe5\":\"0x6acb3df27e1f880000\",\"0xbb0366a7cfbd3445a70db7fe5ae34885754fd468\":\"0x14def2c42ebd6400000\",\"0xbb076aac92208069ea318a31ff8eeb14b7e996e3\":\"0x813ca56906d340000\",\"0xbb0857f1c911b24b86c8a70681473fe6aaa1cce2\":\"0x56bc75e2d63100000\",\"0xbb19bf91cbad74cceb5f811db27e411bc2ea0656\":\"0xf43fc2c04ee00000\",\"0xbb27c6a7f91075475ab229619040f804c8ec7a6a\":\"0x21e19e0c9bab2400000\",\"0xbb371c72c9f0316cea2bd9c6fbb4079e775429ef\":\"0x5f68e8131ecf800000\",\"0xbb3b010b18e6e2be1135871026b7ba15ea0fde24\":\"0x2207c80309b77700000\",\"0xbb3b9005f46fd2ca3b30162599928c77d9f6b601\":\"0x1b1ae7f2b1bf7db0000\",\"0xbb3fc0a29c034d710812dcc775c8cab9d28d6975\":\"0x39d4e844d1cf5f0000\",\"0xbb48eaf516ce2dec3e41feb4c679e4957641164f\":\"0xcf152640c5c8300000\",\"0xbb4b4a4b548070ff41432c9e08a0ca6fa7bc9f76\":\"0x2e141ea081ca080000\",\"0xbb56a404723cff20d0685488b05a02cdc35aacaa\":\"0x1158e460913d00000\",\"0xbb618e25221ad9a740b299ed1406bc3934b0b16d\":\"0x3635c9adc5dea00000\",\"0xbb61a04bffd57c10470d45c39103f64650347616\":\"0x3635c9adc5dea00000\",\"0xbb6823a1bd819f13515538264a2de052b4442208\":\"0x16368ff4ff9c10000\",\"0xbb6c284aac8a69b75cddb00f28e145583b56bece\":\"0x6c6b935b8bbd400000\",\"0xbb75cb5051a0b0944b4673ca752a97037f7c8c15\":\"0xad78ebc5ac6200000\",\"0xbb993b96ee925ada7d99d786573d3f89180ce3aa\":\"0x6c6b935b8bbd400000\",\"0xbba3c68004248e489573abb2743677066b24c8a7\":\"0x6c6b935b8bbd400000\",\"0xbba4fac3c42039d828e742cde0efffe774941b39\":\"0x6c6ad382d4fb610000\",\"0xbba8ab22d2fedbcfc63f684c08afdf1c175090b5\":\"0x55f29f37e4e3b8000\",\"0xbba976f1a1215f7512871892d45f7048acd356c8\":\"0x6c6b935b8bbd400000\",\"0xbbab000b0408ed015a37c04747bc461ab14e151b\":\"0x14542ba12a337c00000\",\"0xbbabf6643beb4bd01c120bd0598a0987d82967d1\":\"0xb5328178ad0f2a0000\",\"0xbbb4ee1d82f2e156442cc93338a2fc286fa28864\":\"0x4a4491bd6dcd280000\",\"0xbbb5a0f4802c8648009e8a6998af352cde87544f\":\"0x52d542804f1ce0000\",\"0xbbb643d2187b364afc10a6fd368d7d55f50d1a3c\":\"0x3635c9adc5dea00000\",\"0xbbb8ffe43f98de8eae184623ae5264e424d0b8d7\":\"0x5d53ffde928080000\",\"0xbbbd6ecbb5752891b4ceb3cce73a8f477059376f\":\"0x1f399b1438a100000\",\"0xbbbf39b1b67995a42241504f9703d2a14a515696\":\"0x55a6e79ccd1d300000\",\"0xbbc8eaff637e94fcc58d913c7770c88f9b479277\":\"0xad78ebc5ac6200000\",\"0xbbc9d8112e5beb02dd29a2257b1fe69b3536a945\":\"0x6c6b935b8bbd400000\",\"0xbbca65b3266ea2fb73a03f921635f912c7bede00\":\"0x6acb3df27e1f880000\",\"0xbbf84292d954acd9e4072fb860b1504106e077ae\":\"0x5150ae84a8cdf00000\",\"0xbbf85aaaa683738f073baef44ac9dc34c4c779ea\":\"0x6c6b935b8bbd400000\",\"0xbbf8616d97724af3def165d0e28cda89b800009a\":\"0x62ef12e2b17618000\",\"0xbbfe0a830cace87b7293993a7e9496ce64f8e394\":\"0x14542ba12a337c00000\",\"0xbc0ca4f217e052753614d6b019948824d0d8688b\":\"0x15af1d78b58c400000\",\"0xbc0e8745c3a549445c2be900f52300804ab56289\":\"0x7029bf5dd4c53b28000\",\"0xbc0f98598f88056a26339620923b8f1eb074a9fd\":\"0xad78ebc5ac6200000\",\"0xbc1609d685b76b48ec909aa099219022f89b2ccd\":\"0x40138b917edfb80000\",\"0xbc171e53d17ac9b61241ae436deec7af452e7496\":\"0x121ea68c114e5100000\",\"0xbc1b021a78fde42d9b5226d6ec26e06aa3670090\":\"0x4563918244f400000\",\"0xbc1e80c181616342ebb3fb3992072f1b28b802c6\":\"0xd8d726b7177a800000\",\"0xbc237148d30c13836ffa2cad520ee4d2e5c4eeff\":\"0x6acb3df27e1f880000\",\"0xbc46d537cf2edd403565bde733b2e34b215001bd\":\"0x43c33c1937564800000\",\"0xbc4e471560c99c8a2a4b1b1ad0c36aa6502b7c4b\":\"0x28a857425466f800000\",\"0xbc62b3096a91e7dc11a1592a293dd2542150d751\":\"0x3635c9adc5dea00000\",\"0xbc69a0d2a31c3dbf7a9122116901b2bdfe9802a0\":\"0xa2a15d09519be00000\",\"0xbc6b58364bf7f1951c309e0cba0595201cd73f9a\":\"0x62401a457e45f80000\",\"0xbc73f7b1ca3b773b34249ada2e2c8a9274cc17c2\":\"0x6c6b935b8bbd400000\",\"0xbc7afc8477412274fc265df13c054473427d43c6\":\"0x70c95920ce3250000\",\"0xbc967fe4418c18b99858966d870678dca2b88879\":\"0x1d9cbdd8d7ed2100000\",\"0xbc999e385c5aebcac8d6f3f0d60d5aa725336d0d\":\"0x6c6b935b8bbd400000\",\"0xbc9c95dfab97a574cea2aa803b5caa197cef0cff\":\"0x16c4abbebea0100000\",\"0xbc9e0ec6788f7df4c7fc210aacd220c27e45c910\":\"0x1b1ae4d6e2ef500000\",\"0xbca3ffd4683fba0ad3bbc90734b611da9cfb457e\":\"0xad78ebc5ac6200000\",\"0xbcaed0acb6a76f113f7c613555a2c3b0f5bf34a5\":\"0xa7ebd5e4363a00000\",\"0xbcaf347918efb2d63dde03e39275bbe97d26df50\":\"0x56bc75e2d63100000\",\"0xbcb422dc4dd2aae94abae95ea45dd1731bb6b0ba\":\"0x18424f5f0b1b4e0000\",\"0xbcbd31252ec288f91e298cd812c92160e738331a\":\"0x6b1bc2cac09a590000\",\"0xbcbf6ba166e2340db052ea23d28029b0de6aa380\":\"0xd255d112e103a00000\",\"0xbcc84597b91e73d5c5b4d69c80ecf146860f779a\":\"0xed70b5e9c3f2f00000\",\"0xbcc9593b2da6df6a34d71b1aa38dacf876f95b88\":\"0x1158e460913d00000\",\"0xbcd95ef962462b6edfa10fda87d72242fe3edb5c\":\"0x121d06e12fff988000\",\"0xbcd99edc2160f210a05e3a1fa0b0434ced00439b\":\"0x6c6b935b8bbd400000\",\"0xbcdfacb9d9023c3417182e9100e8ea1d373393a3\":\"0x3342d60dff1960000\",\"0xbce13e22322acfb355cd21fd0df60cf93add26c6\":\"0xad78ebc5ac6200000\",\"0xbce40475d345b0712dee703d87cd7657fc7f3b62\":\"0x1a420db02bd7d580000\",\"0xbcedc4267ccb89b31bb764d7211171008d94d44d\":\"0xad78ebc5ac6200000\",\"0xbcfc98e5c82b6adb180a3fcb120b9a7690c86a3f\":\"0x6acb3df27e1f880000\",\"0xbd043b67c63e60f841ccca15b129cdfe6590c8e3\":\"0xad78ebc5ac6200000\",\"0xbd047ff1e69cc6b29ad26497a9a6f27a903fc4dd\":\"0x2ee449550898e40000\",\"0xbd08e0cddec097db7901ea819a3d1fd9de8951a2\":\"0x1158e460913d00000\",\"0xbd09126c891c4a83068059fe0e15796c4661a9f4\":\"0x2b5e3af16b18800000\",\"0xbd0c5cd799ebc48642ef97d74e8e429064fee492\":\"0x11ac28a8c729580000\",\"0xbd17eed82b9a2592019a1b1b3c0fbad45c408d22\":\"0xd8d726b7177a80000\",\"0xbd1803370bddb129d239fd16ea8526a6188ae58e\":\"0x1b1ae4d6e2ef500000\",\"0xbd2b70fecc37640f69514fc7f3404946aad86b11\":\"0x410d586a20a4c00000\",\"0xbd3097a79b3c0d2ebff0e6e86ab0edadbed47096\":\"0x5a87e7d7f5f6580000\",\"0xbd325d4029e0d8729f6d399c478224ae9e7ae41e\":\"0xd255d112e103a00000\",\"0xbd432a3916249b4724293af9146e49b8280a7f2a\":\"0xd8d726b7177a800000\",\"0xbd47f5f76e3b930fd9485209efa0d4763da07568\":\"0x3635c9adc5dea00000\",\"0xbd4b60faec740a21e3071391f96aa534f7c1f44e\":\"0x9ddc1e3b901180000\",\"0xbd4bd5b122d8ef7b7c8f0667450320db2116142e\":\"0x2086ac351052600000\",\"0xbd51ee2ea143d7b1d6b77e7e44bdd7da12f485ac\":\"0x477e06ccb2b9280000\",\"0xbd59094e074f8d79142ab1489f148e32151f2089\":\"0x1158e460913d00000\",\"0xbd5a8c94bd8be6470644f70c8f8a33a8a55c6341\":\"0xad78ebc5ac6200000\",\"0xbd5e473abce8f97a6932f77c2facaf9cc0a00514\":\"0x3c9258a106a6b70000\",\"0xbd5f46caab2c3d4b289396bbb07f203c4da82530\":\"0x4563918244f400000\",\"0xbd66ffedb530ea0b2e856dd12ac2296c31fe29e0\":\"0xad78ebc5ac6200000\",\"0xbd67d2e2f82da8861341bc96a2c0791fddf39e40\":\"0xad7c07947c8fb0000\",\"0xbd6a474d66345bcdd707594adb63b30c7822af54\":\"0xd8d726b7177a800000\",\"0xbd723b289a7367b6ece2455ed61edb49670ab9c4\":\"0x10f0cdea164213f8000\",\"0xbd73c3cbc26a175062ea0320dd84b253bce64358\":\"0x155bd9307f9fe80000\",\"0xbd7419dc2a090a46e2873d7de6eaaad59e19c479\":\"0x170bcb671759f080000\",\"0xbd8765f41299c7f479923c4fd18f126d7229047d\":\"0xd8d726b7177a800000\",\"0xbd93e550403e2a06113ed4c3fba1a8913b19407e\":\"0x6c6b935b8bbd400000\",\"0xbd9e56e902f4be1fc8768d8038bac63e2acbbf8e\":\"0x36356633ebd8ea0000\",\"0xbda4be317e7e4bed84c0495eee32d607ec38ca52\":\"0x7d32277978ef4e8000\",\"0xbdb60b823a1173d45a0792245fb496f1fd3301cf\":\"0x6c6b935b8bbd400000\",\"0xbdbaf6434d40d6355b1e80e40cc4ab9c68d96116\":\"0x56bc75e2d63100000\",\"0xbdc02cd4330c93d6fbda4f6db2a85df22f43c233\":\"0x6c6b935b8bbd400000\",\"0xbdc461462b6322b462bdb33f22799e8108e2417d\":\"0x243d4d18229ca20000\",\"0xbdc739a699700b2e8e2c4a4c7b058a0e513ddebe\":\"0x6c6b935b8bbd400000\",\"0xbdc74873af922b9df474853b0fa7ff0bf8c82695\":\"0xd8c9460063d31c0000\",\"0xbdca2a0ff34588af625fa8e28fc3015ab5a3aa00\":\"0x7ed73f773552fc0000\",\"0xbdd3254e1b3a6dc6cc2c697d45711aca21d516b2\":\"0x6c6b935b8bbd400000\",\"0xbddfa34d0ebf1b04af53b99b82494a9e3d8aa100\":\"0x28a857425466f800000\",\"0xbde4c73f969b89e9ceae66a2b51844480e038e9a\":\"0x3635c9adc5dea00000\",\"0xbde9786a84e75b48f18e726dd78d70e4af3ed802\":\"0x1369fb96128ac480000\",\"0xbded11612fb5c6da99d1e30e320bc0995466141e\":\"0x15af1d78b58c400000\",\"0xbded7e07d0711e684de65ac8b2ab57c55c1a8645\":\"0x2009c5c8bf6fdc0000\",\"0xbdf693f833c3fe471753184788eb4bfe4adc3f96\":\"0x6acb3df27e1f880000\",\"0xbdf6e68c0cd7584080e847d72cbb23aad46aeb1d\":\"0x6acb3df27e1f880000\",\"0xbe0a2f385f09dbfce96732e12bb40ac349871ba8\":\"0x574c115e02b8be0000\",\"0xbe0c2a80b9de084b172894a76cf4737a4f529e1a\":\"0x6c6acc67d7b1d40000\",\"0xbe1cd7f4c472070968f3bde268366b21eeea8321\":\"0xe91a7cd19fa3b00000\",\"0xbe2346a27ff9b702044f500deff2e7ffe6824541\":\"0x1158e460913d00000\",\"0xbe2471a67f6047918772d0e36839255ed9d691ae\":\"0xd8d726b7177a800000\",\"0xbe2b2280523768ea8ac35cd9e888d60a719300d4\":\"0x6c6b935b8bbd400000\",\"0xbe2b326e78ed10e550fee8efa8f8070396522f5a\":\"0x857e0d6f1da76a00000\",\"0xbe305a796e33bbf7f9aeae6512959066efda1010\":\"0x24dce54d34a1a000000\",\"0xbe478e8e3dde6bd403bb2d1c657c4310ee192723\":\"0x1ab2cf7c9f87e20000\",\"0xbe4e7d983f2e2a636b1102ec7039efebc842e98d\":\"0x393ef1a5127c80000\",\"0xbe4fd073617022b67f5c13499b827f763639e4e3\":\"0x6c6b935b8bbd400000\",\"0xbe525a33ea916177f17283fca29e8b350b7f530b\":\"0x8f019aaf46e8780000\",\"0xbe53322f43fbb58494d7cce19dda272b2450e827\":\"0xad7ceaf425c150000\",\"0xbe538246dd4e6f0c20bf5ad1373c3b463a131e86\":\"0xad78ebc5ac6200000\",\"0xbe5a60689998639ad75bc105a371743eef0f7940\":\"0x1b327c73e1257a0000\",\"0xbe5cba8d37427986e8ca2600e858bb03c359520f\":\"0xa030dcebbd2f4c0000\",\"0xbe60037e90714a4b917e61f193d834906703b13a\":\"0x5c283d410394100000\",\"0xbe633a3737f68439bac7c90a52142058ee8e8a6f\":\"0x340aad21b3b7000000\",\"0xbe659d85e7c34f8833ea7f488de1fbb5d4149bef\":\"0x1ebd23ad9d5bb720000\",\"0xbe73274d8c5aa44a3cbefc8263c37ba121b20ad3\":\"0x1b1ae4d6e2ef500000\",\"0xbe86d0b0438419ceb1a038319237ba5206d72e46\":\"0x3634fb9f1489a70000\",\"0xbe8d7f18adfe5d6cc775394989e1930c979d007d\":\"0x3635c9adc5dea00000\",\"0xbe9186c34a52514abb9107860f674f97b821bd5b\":\"0x1ba01ee40603100000\",\"0xbe935793f45b70d8045d2654d8dd3ad24b5b6137\":\"0x2fb474098f67c00000\",\"0xbe98a77fd41097b34f59d7589baad021659ff712\":\"0x30ca024f987b900000\",\"0xbe9b8c34b78ee947ff81472eda7af9d204bc8466\":\"0x821ab0d4414980000\",\"0xbea00df17067a43a82bc1daecafb6c14300e89e6\":\"0x62a992e53a0af00000\",\"0xbea0afc93aae2108a3fac059623bf86fa582a75e\":\"0x5c283d410394100000\",\"0xbeb3358c50cf9f75ffc76d443c2c7f55075a0589\":\"0x90f534608a72880000\",\"0xbeb4fd315559436045dcb99d49dcec03f40c42dc\":\"0x6c6b935b8bbd400000\",\"0xbec2e6de39c07c2bae556acfbee2c4728b9982e3\":\"0x1f0ff8f01daad40000\",\"0xbec6640f4909b58cbf1e806342961d607595096c\":\"0x6c6acc67d7b1d40000\",\"0xbec8caf7ee49468fee552eff3ac5234eb9b17d42\":\"0x6c6b935b8bbd400000\",\"0xbecef61c1c442bef7ce04b73adb249a8ba047e00\":\"0x363b56c3a754c80000\",\"0xbed4649df646e2819229032d8868556fe1e053d3\":\"0xfc936392801c0000\",\"0xbed4c8f006a27c1e5f7ce205de75f516bfb9f764\":\"0x3635c9adc5dea000000\",\"0xbee8d0b008421954f92d000d390fb8f8e658eaee\":\"0x3635c9adc5dea00000\",\"0xbeecd6af900c8b064afcc6073f2d85d59af11956\":\"0x6c6b935b8bbd400000\",\"0xbeef94213879e02622142bea61290978939a60d7\":\"0x136857b32ad86048000\",\"0xbef07d97c3481f9d6aee1c98f9d91a180a32442b\":\"0x152d02c7e14af6800000\",\"0xbefb448c0c5f683fb67ee570baf0db5686599751\":\"0x6acb3df27e1f880000\",\"0xbf05070c2c34219311c4548b2614a438810ded6d\":\"0x6c6b935b8bbd400000\",\"0xbf05ff5ecf0df2df887759fb8274d93238ac267d\":\"0x2b5e3af16b18800000\",\"0xbf09d77048e270b662330e9486b38b43cd781495\":\"0x5c539b7bf4ff28800000\",\"0xbf17f397f8f46f1bae45d187148c06eeb959fa4d\":\"0x3649c59624bb300000\",\"0xbf183641edb886ce60b8190261e14f42d93cce01\":\"0x15b3557f1937f8000\",\"0xbf2aea5a1dcf6ed3b5e8323944e983fedfd1acfb\":\"0x55a6e79ccd1d300000\",\"0xbf4096bc547dbfc4e74809a31c039e7b389d5e17\":\"0xd5967be4fc3f100000\",\"0xbf49c14898316567d8b709c2e50594b366c6d38c\":\"0x27bf38c6544df50000\",\"0xbf4c73a7ede7b164fe072114843654e4d8781dde\":\"0x6c6b935b8bbd400000\",\"0xbf50ce2e264b9fe2b06830617aedf502b2351b45\":\"0x3635c9adc5dea00000\",\"0xbf59aee281fa43fe97194351a9857e01a3b897b2\":\"0x2086ac351052600000\",\"0xbf68d28aaf1eeefef646b65e8cc8d190f6c6da9c\":\"0x6c6b935b8bbd400000\",\"0xbf6925c00751008440a6739a02bf2b6cdaab5e3a\":\"0x3635c9adc5dea00000\",\"0xbf7701fc6225d5a17815438a8941d21ebc5d059d\":\"0x65ea3db75546600000\",\"0xbf8b8005d636a49664f74275ef42438acd65ac91\":\"0xad78ebc5ac6200000\",\"0xbf92418a0c6c31244d220260cb3e867dd7b4ef49\":\"0x56900d33ca7fc0000\",\"0xbf9acd4445d9c9554689cabbbab18800ff1741c2\":\"0x3635c9adc5dea00000\",\"0xbf9f271f7a7e12e36dd2fe9facebf385fe6142bd\":\"0x366f84f7bb7840000\",\"0xbfa8c858df102cb12421008b0a31c4c7190ad560\":\"0xad78ebc5ac6200000\",\"0xbfaeb91067617dcf8b44172b02af615674835dba\":\"0x8b59e884813088000\",\"0xbfb0ea02feb61dec9e22a5070959330299c43072\":\"0x43c33c1937564800000\",\"0xbfbca418d3529cb393081062032a6e1183c6b2dc\":\"0x1b1ae4d6e2ef5000000\",\"0xbfbe05e88c9cbbcc0e92a405fac1d85de248ee24\":\"0x56bc75e2d63100000\",\"0xbfbfbcb656c2992be8fcde8219fbc54aadd59f29\":\"0x21e18d2c821c7520000\",\"0xbfc57aa666fae28e9f107a49cb5089a4e22151dd\":\"0x3635c9adc5dea00000\",\"0xbfcb9730246304700da90b4153e71141622e1c41\":\"0x3635c9adc5dea00000\",\"0xbfd93c90c29c07bc5fb5fc49aeea55a40e134f35\":\"0x5ede20f01a459800000\",\"0xbfe3a1fc6e24c8f7b3250560991f93cba2cf8047\":\"0x10f0cf064dd592000000\",\"0xbfe6bcb0f0c07852643324aa5df5fd6225abc3ca\":\"0x409e52b48369a0000\",\"0xbff5df769934b8943ca9137d0efef2fe6ebbb34e\":\"0x56bc75e2d63100000\",\"0xbffb6929241f788693273e7022e60e3eab1fe84f\":\"0x6c6b935b8bbd400000\",\"0xc0064f1d9474ab915d56906c9fb320a2c7098c9b\":\"0x13683f7f3c15d80000\",\"0xc007f0bdb6e7009202b7af3ea90902697c721413\":\"0xa2a0e43e7fb9830000\",\"0xc00ab080b643e1c2bae363e0d195de2efffc1c44\":\"0x1b1ae4d6e2ef500000\",\"0xc02077449a134a7ad1ef7e4d927affeceeadb5ae\":\"0xfc936392801c0000\",\"0xc02471e3fc2ea0532615a7571d493289c13c36ef\":\"0x1158e460913d00000\",\"0xc02d6eadeacf1b78b3ca85035c637bb1ce01f490\":\"0xd8d726b7177a800000\",\"0xc033b1325a0af45472c25527853b1f1c21fa35de\":\"0x6c6b935b8bbd400000\",\"0xc033be10cb48613bd5ebcb33ed4902f38b583003\":\"0xa2a15d09519be00000\",\"0xc0345b33f49ce27fe82cf7c84d141c68f590ce76\":\"0x3635c9adc5dea00000\",\"0xc03de42a109b657a64e92224c08dc1275e80d9b2\":\"0x1158e460913d00000\",\"0xc04069dfb18b096c7867f8bee77a6dc7477ad062\":\"0x90f534608a72880000\",\"0xc0413f5a7c2d9a4b8108289ef6ecd271781524f4\":\"0xa968163f0a57b400000\",\"0xc043f2452dcb9602ef62bd360e033dd23971fe84\":\"0x6c6b935b8bbd400000\",\"0xc04f4bd4049f044685b883b62959ae631d667e35\":\"0x13b80b99c5185700000\",\"0xc056d4bd6bf3cbacac65f8f5a0e3980b852740ae\":\"0x56bc75e2d63100000\",\"0xc05b740620f173f16e52471dc38b9c514a0b1526\":\"0x796e3ea3f8ab00000\",\"0xc069ef0eb34299abd2e32dabc47944b272334824\":\"0x68155a43676e00000\",\"0xc06cebbbf7f5149a66f7eb976b3e47d56516da2f\":\"0x6c6b935b8bbd400000\",\"0xc0725ec2bdc33a1d826071dea29d62d4385a8c25\":\"0x8a08513463aa6100000\",\"0xc07e3867ada096807a051a6c9c34cc3b3f4ad34a\":\"0x60f06620a849450000\",\"0xc0895efd056d9a3a81c3da578ada311bfb9356cf\":\"0xad78ebc5ac6200000\",\"0xc090fe23dcd86b358c32e48d2af91024259f6566\":\"0xad78ebc5ac6200000\",\"0xc09a66172aea370d9a63da04ff71ffbbfcff7f94\":\"0x6c6b935b8bbd400000\",\"0xc09e3cfc19f605ff3ec9c9c70e2540d7ee974366\":\"0x1b1ae4d6e2ef500000\",\"0xc0a02ab94ebe56d045b41b629b98462e3a024a93\":\"0x56bc75e2d63100000\",\"0xc0a39308a80e9e84aaaf16ac01e3b01d74bd6b2d\":\"0x7664ddd4c1c0b8000\",\"0xc0a6cbad77692a3d88d141ef769a99bb9e3c9951\":\"0x56bc75e2d63100000\",\"0xc0a7e8435dff14c25577739db55c24d5bf57a3d9\":\"0xa6dd90cae5114480000\",\"0xc0ae14d724832e2fce2778de7f7b8daf7b12a93e\":\"0x1158e460913d00000\",\"0xc0afb7d8b79370cfd663c68cc6b9702a37cd9eff\":\"0x3635c9adc5dea00000\",\"0xc0b0b7a8a6e1acdd05e47f94c09688aa16c7ad8d\":\"0x37b6d02ac76710000\",\"0xc0b3f244bca7b7de5b48a53edb9cbeab0b6d88c0\":\"0x13b80b99c5185700000\",\"0xc0c04d0106810e3ec0e54a19f2ab8597e69a573d\":\"0x2b5e3af16b1880000\",\"0xc0ca3277942e7445874be31ceb902972714f1823\":\"0xd8d726b7177a80000\",\"0xc0cbad3ccdf654da22cbcf5c786597ca1955c115\":\"0x6c6b935b8bbd400000\",\"0xc0cbf6032fa39e7c46ff778a94f7d445fe22cf30\":\"0x10ce1d3d8cb3180000\",\"0xc0e0b903088e0c63f53dd069575452aff52410c3\":\"0xa2a15d09519be00000\",\"0xc0e457bd56ec36a1246bfa3230fff38e5926ef22\":\"0x692ae8897081d00000\",\"0xc0ed0d4ad10de03435b153a0fc25de3b93f45204\":\"0xab4dcf399a3a600000\",\"0xc0f29ed0076611b5e55e130547e68a48e26df5e4\":\"0xa2a15d09519be00000\",\"0xc1132878235c5ddba5d9f3228b5236e47020dc6f\":\"0x3635c9adc5dea00000\",\"0xc1170dbaadb3dee6198ea544baec93251860fda5\":\"0x410d586a20a4c00000\",\"0xc126573d87b0175a5295f1dd07c575cf8cfa15f2\":\"0x21e19e0c9bab2400000\",\"0xc127aab59065a28644a56ba3f15e2eac13da2995\":\"0x2086ac351052600000\",\"0xc12b7f40df9a2f7bf983661422ab84c9c1f50858\":\"0x1b1ae4d6e2ef5000000\",\"0xc12cfb7b3df70fceca0ede263500e27873f8ed16\":\"0x3635c9adc5dea00000\",\"0xc12f881fa112b8199ecbc73ec4185790e614a20f\":\"0x6c6b935b8bbd400000\",\"0xc1384c6e717ebe4b23014e51f31c9df7e4e25b31\":\"0x1b1ae4d6e2ef500000\",\"0xc1438c99dd51ef1ca8386af0a317e9b041457888\":\"0xc1daf81d8a3ce0000\",\"0xc1631228efbf2a2e3a4092ee8900c639ed34fbc8\":\"0x33c5499031720c0000\",\"0xc175be3194e669422d15fee81eb9f2c56c67d9c9\":\"0xad78ebc5ac6200000\",\"0xc1827686c0169485ec15b3a7c8c01517a2874de1\":\"0x22b1c8c1227a00000\",\"0xc18ab467feb5a0aadfff91230ff056464d78d800\":\"0x6c6b935b8bbd400000\",\"0xc1950543554d8a713003f662bb612c10ad4cdf21\":\"0xfc936392801c0000\",\"0xc1a41a5a27199226e4c7eb198b031b59196f9842\":\"0xa5aa85009e39c0000\",\"0xc1b2a0fb9cad45cd699192cd27540b88d3384279\":\"0x1b1ae4d6e2ef500000\",\"0xc1b2aa8cb2bf62cdc13a47ecc4657facaa995f98\":\"0x363793fa96e6a68000\",\"0xc1b500011cfba95d7cd636e95e6cbf6167464b25\":\"0xad78ebc5ac6200000\",\"0xc1b9a5704d351cfe983f79abeec3dbbbae3bb629\":\"0x1158e460913d00000\",\"0xc1cbd2e2332a524cf219b10d871ccc20af1fb0fa\":\"0x3635c9adc5dea00000\",\"0xc1cdc601f89c0428b31302d187e0dc08ad7d1c57\":\"0x14542ba12a337c00000\",\"0xc1d4af38e9ba799040894849b8a8219375f1ac78\":\"0x43c33c1937564800000\",\"0xc1e1409ca52c25435134d006c2a6a8542dfb7273\":\"0x1dd1e4bd8d1ee0000\",\"0xc1eba5684aa1b24cba63150263b7a9131aeec28d\":\"0x1158e460913d00000\",\"0xc1ec81dd123d4b7c2dd9b4d438a7072c11dc874c\":\"0x6c6b935b8bbd400000\",\"0xc1f39bd35dd9cec337b96f47c677818160df37b7\":\"0x1158e460913d00000\",\"0xc1ffad07db96138c4b2a530ec1c7de29b8a0592c\":\"0xf43fc2c04ee00000\",\"0xc21fa6643a1f14c02996ad7144b75926e87ecb4b\":\"0x43c33c1937564800000\",\"0xc2340a4ca94c9678b7494c3c852528ede5ee529f\":\"0x2a36b05a3fd7c8000\",\"0xc239abdfae3e9af5457f52ed2b91fd0ab4d9c700\":\"0x6c6b935b8bbd400000\",\"0xc23b2f921ce4a37a259ee4ad8b2158d15d664f59\":\"0x1608995e8bd3f8000\",\"0xc24399b4bf86f7338fbf645e3b22b0e0b7973912\":\"0x6c6b935b8bbd400000\",\"0xc24ccebc2344cce56417fb684cf81613f0f4b9bd\":\"0x54069233bf7f780000\",\"0xc25266c7676632f13ef29be455ed948add567792\":\"0x487a9a304539440000\",\"0xc25cf826550c8eaf10af2234fef904ddb95213be\":\"0x3635c9adc5dea00000\",\"0xc2663f8145dbfec6c646fc5c49961345de1c9f11\":\"0x2567ac70392b880000\",\"0xc270456885342b640b4cfc1b520e1a544ee0d571\":\"0x62a992e53a0af00000\",\"0xc27376f45d21e15ede3b26f2655fcee02ccc0f2a\":\"0x1158e460913d00000\",\"0xc2779771f0536d79a8708f6931abc44b3035e999\":\"0x43c4f8300dcb3480000\",\"0xc27f4e08099d8cf39ee11601838ef9fc06d7fc41\":\"0x61093d7c2c6d380000\",\"0xc282e6993fbe7a912ea047153ffd9274270e285b\":\"0x7960b331247638000\",\"0xc2836188d9a29253e0cbda6571b058c289a0bb32\":\"0x6c6b935b8bbd400000\",\"0xc2aa74847e86edfdd3f3db22f8a2152feee5b7f7\":\"0x6f118886b784a20000\",\"0xc2b2cbe65bc6c2ee7a3c75b2e47c189c062e8d8b\":\"0x43c33c1937564800000\",\"0xc2bae4a233c2d85724f0dabebda0249d833e37d3\":\"0x10f0cf064dd59200000\",\"0xc2c13e72d268e7150dc799e7c6cf03c88954ced7\":\"0x25f273933db5700000\",\"0xc2cb1ada5da9a0423873814793f16144ef36b2f3\":\"0x48557e3b7017df0000\",\"0xc2d1778ef6ee5fe488c145f3586b6ebbe3fbb445\":\"0x3e1ff1e03b55a80000\",\"0xc2d9eedbc9019263d9d16cc5ae072d1d3dd9db03\":\"0x43c33c1937564800000\",\"0xc2e0584a71348cc314b73b2029b6230b92dbb116\":\"0x6c6b935b8bbd400000\",\"0xc2e2d498f70dcd0859e50b023a710a6d4b2133bd\":\"0x383911f00cbce10000\",\"0xc2ed5ffdd1add855a2692fe062b5d618742360d4\":\"0x410d586a20a4c00000\",\"0xc2ee91d3ef58c9d1a589844ea1ae3125d6c5ba69\":\"0x34957444b840e80000\",\"0xc2fafdd30acb6d6706e9293cb02641f9edbe07b5\":\"0x5100860b430f480000\",\"0xc2fd0bf7c725ef3e047e5ae1c29fe18f12a7299c\":\"0x487a9a304539440000\",\"0xc2fe7d75731f636dcd09dbda0671393ba0c82a7d\":\"0x77432217e683600000\",\"0xc3107a9af3322d5238df0132419131629539577d\":\"0x1ab4e464d414310000\",\"0xc3110be01dc9734cfc6e1ce07f87d77d1345b7e1\":\"0x10f0ce949e00f930000\",\"0xc32038ca52aee19745be5c31fcdc54148bb2c4d0\":\"0x2b5aad72c65200000\",\"0xc325c352801ba883b3226c5feb0df9eae2d6e653\":\"0xd5967be4fc3f100000\",\"0xc32ec7e42ad16ce3e2555ad4c54306eda0b26758\":\"0x6c6b935b8bbd400000\",\"0xc332df50b13c013490a5d7c75dbfa366da87b6d6\":\"0xd8d726b7177a800000\",\"0xc33acdb3ba1aab27507b86b15d67faf91ecf6293\":\"0x6c6b935b8bbd400000\",\"0xc33ece935a8f4ef938ea7e1bac87cb925d8490ca\":\"0x7038c16781f78480000\",\"0xc340f9b91c26728c31d121d5d6fc3bb56d3d8624\":\"0x6c6b935b8bbd400000\",\"0xc346cb1fbce2ab285d8e5401f42dd7234d37e86d\":\"0x486cb9799191e0000\",\"0xc3483d6e88ac1f4ae73cc4408d6c03abe0e49dca\":\"0x39992648a23c8a00000\",\"0xc348fc5a461323b57be303cb89361b991913df28\":\"0x152d02c7e14af6800000\",\"0xc34e3ba1322ed0571183a24f94204ee49c186641\":\"0x327afefa4a7bc0000\",\"0xc35b95a2a3737cb8f0f596b34524872bd30da234\":\"0x198be85235e2d500000\",\"0xc3631c7698b6c5111989bf452727b3f9395a6dea\":\"0x243275896641dbe0000\",\"0xc36c0b63bfd75c2f8efb060883d868cccd6cbdb4\":\"0xa2a15d09519be00000\",\"0xc3756bcdcc7eec74ed896adfc335275930266e08\":\"0x14542ba12a337c00000\",\"0xc384ac6ee27c39e2f278c220bdfa5baed626d9d3\":\"0x2086ac351052600000\",\"0xc3a046e3d2b2bf681488826e32d9c061518cfe8c\":\"0x8cf23f909c0fa00000\",\"0xc3a9226ae275df2cab312b911040634a9c9c9ef6\":\"0xd8d726b7177a800000\",\"0xc3b928a76fad6578f04f0555e63952cd21d1520a\":\"0x6c6b935b8bbd400000\",\"0xc3c2297329a6fd99117e54fc6af379b4d556547e\":\"0x14542ba12a337c00000\",\"0xc3c3c2510d678020485a63735d1307ec4ca6302b\":\"0x3635c9adc5dea00000\",\"0xc3cb6b36af443f2c6e258b4a39553a818747811f\":\"0x57473d05dabae80000\",\"0xc3db5657bb72f10d58f231fddf11980aff678693\":\"0x14061b9d77a5e980000\",\"0xc3db9fb6f46c480af34465d79753b4e2b74a67ce\":\"0x43c33c1937564800000\",\"0xc3dd58903886303b928625257ae1a013d71ae216\":\"0x6c6b935b8bbd400000\",\"0xc3e0471c64ff35fa5232cc3121d1d38d1a0fb7de\":\"0x6c6b935b8bbd400000\",\"0xc3e20c96df8d4e38f50b265a98a906d61bc51a71\":\"0x6c6b935b8bbd400000\",\"0xc3e387b03ce95ccfd7fa51dd840183bc43532809\":\"0x6c6b935b8bbd400000\",\"0xc3f8f67295a5cd049364d05d23502623a3e52e84\":\"0x14542ba12a337c00000\",\"0xc401c427cccff10decb864202f36f5808322a0a8\":\"0xb47b51a69cd4020000\",\"0xc4088c025f3e85013f5439fb3440a17301e544fe\":\"0x7e09db4d9f3f340000\",\"0xc41461a3cfbd32c9865555a4813137c076312360\":\"0x3635c6204739d98000\",\"0xc420388fbee84ad656dd68cdc1fbaa9392780b34\":\"0xa2dca63aaf4c58000\",\"0xc42250b0fe42e6b7dcd5c890a6f0c88f5f5fb574\":\"0x81ee4825359840000\",\"0xc42d6aeb710e3a50bfb44d6c31092969a11aa7f3\":\"0x82263cafd8cea0000\",\"0xc440c7ca2f964b6972ef664a2261dde892619d9c\":\"0x43c33c1937564800000\",\"0xc44bdec8c36c5c68baa2ddf1d431693229726c43\":\"0x152d02c7e14af6800000\",\"0xc44f4ab5bc60397c737eb0683391b633f83c48fa\":\"0x3635c9adc5dea00000\",\"0xc452e0e4b3d6ae06b836f032ca09db409ddfe0fb\":\"0x2b5e3af16b18800000\",\"0xc45a1ca1036b95004187cdac44a36e33a94ab5c3\":\"0xdd00f720301880000\",\"0xc45d47ab0c9aa98a5bd62d16223ea2471b121ca4\":\"0x202e68f2c2aee40000\",\"0xc4681e73bb0e32f6b726204831ff69baa4877e32\":\"0x62a992e53a0af00000\",\"0xc46bbdef76d4ca60d316c07f5d1a780e3b165f7e\":\"0x6c6b935b8bbd400000\",\"0xc47d610b399250f70ecf1389bab6292c91264f23\":\"0xfa7e7b5df3cd00000\",\"0xc4803bb407c762f90b7596e6fde194931e769590\":\"0xd8d726b7177a800000\",\"0xc48651c1d9c16bff4c9554886c3f3f26431f6f68\":\"0x23ab9599c43f080000\",\"0xc489c83ffbb0252ac0dbe3521217630e0f491f14\":\"0xd8d726b7177a800000\",\"0xc48b693cacefdbd6cb5d7895a42e3196327e261c\":\"0x3635c9adc5dea00000\",\"0xc493489e56c3bdd829007dc2f956412906f76bfa\":\"0x2a791488e71540000\",\"0xc496cbb0459a6a01600fc589a55a32b454217f9d\":\"0xeda838c4929080000\",\"0xc49cfaa967f3afbf55031061fc4cef88f85da584\":\"0x6c6b935b8bbd400000\",\"0xc4b6e5f09cc1b90df07803ce3d4d13766a9c46f4\":\"0x14542ba12a337c00000\",\"0xc4bec96308a20f90cab18399c493fd3d065abf45\":\"0x2f6f10780d22cc00000\",\"0xc4c01afc3e0f045221da1284d7878574442fb9ac\":\"0x1923c688b73ab040000\",\"0xc4c15318d370c73318cc18bdd466dbaa4c6603bf\":\"0x11164759ffb320000\",\"0xc4c6cb723dd7afa7eb535615e53f3cef14f18118\":\"0x6c6b8fce0d18798000\",\"0xc4cc45a2b63c27c0b4429e58cd42da59be739bd6\":\"0x3635c9adc5dea00000\",\"0xc4cf930e5d116ab8d13b9f9a7ec4ab5003a6abde\":\"0x1158e460913d000000\",\"0xc4d916574e68c49f7ef9d3d82d1638b2b7ee0985\":\"0x55a6e79ccd1d300000\",\"0xc4dac5a8a0264fbc1055391c509cc3ee21a6e04c\":\"0x1606b7fa039ce740000\",\"0xc4dd048bfb840e2bc85cb53fcb75abc443c7e90f\":\"0xc971dc07c9c7900000\",\"0xc4f2913b265c430fa1ab8adf26c333fc1d9b66f2\":\"0x1158e460913d00000\",\"0xc4f7b13ac6d4eb4db3d4e6a252af8a07bd5957da\":\"0xad78ebc5ac6200000\",\"0xc4f7d2e2e22084c44f70feaab6c32105f3da376f\":\"0x6acb3df27e1f880000\",\"0xc4ff6fbb1f09bd9e102ba033d636ac1c4c0f5304\":\"0x3635c9adc5dea00000\",\"0xc4ffadaaf2823fbea7bff702021bffc4853eb5c9\":\"0x24a19c1bd6f128000\",\"0xc500b720734ed22938d78c5e48b2ba9367a575ba\":\"0x7129e1cdf373ee00000\",\"0xc50fe415a641b0856c4e75bf960515441afa358d\":\"0x6c6b935b8bbd400000\",\"0xc5134cfbb1df7a20b0ed7057622eeed280947dad\":\"0xcdff97fabcb4600000\",\"0xc517d0315c878813c717e18cafa1eab2654e01da\":\"0x21e19e0c9bab2400000\",\"0xc518799a5925576213e21896e0539abb85b05ae3\":\"0x3635c9adc5dea00000\",\"0xc522e20fbf04ed7f6b05a37b4718d6fce0142e1a\":\"0xd8d726b7177a800000\",\"0xc524086d46c8112b128b2faf6f7c7d8160a8386c\":\"0x15af1d78b58c400000\",\"0xc52d1a0c73c2a1be84915185f8b34faa0adf1de3\":\"0x4be4eab3fa0fa68000\",\"0xc53594c7cfb2a08f284cc9d7a63bbdfc0b319732\":\"0xa6b2328ff3a62c00000\",\"0xc5374928cdf193705443b14cc20da423473cd9cf\":\"0x77d10509bb3af8000\",\"0xc538a0ff282aaa5f4b75cfb62c70037ee67d4fb5\":\"0x6c6b935b8bbd400000\",\"0xc53b50fd3b2b72bc6c430baf194a515585d3986d\":\"0x1158e460913d00000\",\"0xc53d79f7cb9b70952fd30fce58d54b9f0b59f647\":\"0x113e2d6744345f80000\",\"0xc549df83c6f65eec0f1dc9a0934a5c5f3a50fd88\":\"0x9dc05cce28c2b80000\",\"0xc55005a6c37e8ca7e543ce259973a3cace961a4a\":\"0x6c6b935b8bbd400000\",\"0xc555b93156f09101233c6f7cf6eb3c4f196d3346\":\"0xa2a15d09519be00000\",\"0xc55a6b4761fd11e8c85f15174d74767cd8bd9a68\":\"0x73f75d1a085ba0000\",\"0xc56e6b62ba6e40e52aab167d21df025d0055754b\":\"0x6c6b935b8bbd400000\",\"0xc573e841fa08174a208b060ccb7b4c0d7697127f\":\"0x243d4d18229ca20000\",\"0xc57612de91110c482e6f505bcd23f3c5047d1d61\":\"0xc2127af858da700000\",\"0xc5843399d150066bf7979c34ba294620368ad7c0\":\"0xad78ebc5ac6200000\",\"0xc58b9cc61dedbb98c33f224d271f0e228b583433\":\"0xd255d112e103a00000\",\"0xc58f62fee9711e6a05dc0910b618420aa127f288\":\"0xd7c198710e66b00000\",\"0xc593b546b7698710a205ad468b2c13152219a342\":\"0x54069233bf7f780000\",\"0xc593d6e37d14b566643ac4135f243caa0787c182\":\"0x28a857425466f800000\",\"0xc5a3b98e4593fea0b38c4f455a5065f051a2f815\":\"0x44cf468af25bf770000\",\"0xc5a48a8500f9b4e22f0eb16c6f4649687674267d\":\"0x2c0ec50385043e8000\",\"0xc5a629a3962552cb8eded889636aafbd0c18ce65\":\"0x21e19e0c9bab2400000\",\"0xc5ae86b0c6c7e3900f1368105c56537faf8d743e\":\"0xa31062beeed700000\",\"0xc5b009baeaf788a276bd35813ad65b400b849f3b\":\"0x3635c9adc5dea00000\",\"0xc5b56cd234267c28e89c6f6b2266b086a12f970c\":\"0xd8d726b7177a800000\",\"0xc5c6a4998a33feb764437a8be929a73ba34a0764\":\"0xa968163f0a57b400000\",\"0xc5c73d61cce7c8fe4c8fce29f39092cd193e0fff\":\"0x1b1ae4d6e2ef5000000\",\"0xc5c7590b5621ecf8358588de9b6890f2626143f1\":\"0xa2a15d09519be00000\",\"0xc5cdcee0e85d117dabbf536a3f4069bf443f54e7\":\"0x6ac5c62d9486070000\",\"0xc5d48ca2db2f85d8c555cb0e9cfe826936783f9e\":\"0xad78ebc5ac6200000\",\"0xc5de1203d3cc2cea31c82ee2de5916880799eafd\":\"0x10f0cf064dd59200000\",\"0xc5e488cf2b5677933971f64cb8202dd05752a2c0\":\"0x3635c9adc5dea00000\",\"0xc5e812f76f15f2e1f2f9bc4823483c8804636f67\":\"0x3f514193abb840000\",\"0xc5e9939334f1252ed2ba26814487dfd2982b3128\":\"0x3cb71f51fc5580000\",\"0xc5eb42295e9cadeaf2af12dede8a8d53c579c469\":\"0xcf152640c5c8300000\",\"0xc5edbbd2ca0357654ad0ea4793f8c5cecd30e254\":\"0x14542ba12a337c00000\",\"0xc5f64babb7033142f20e46d7aa6201ed86f67103\":\"0x6c6b935b8bbd400000\",\"0xc5f687717246da8a200d20e5e9bcac60b67f3861\":\"0x18d993f34aef10000\",\"0xc6045b3c350b4ce9ca0c6b754fb41a69b97e9900\":\"0x3224f42723d4540000\",\"0xc60b04654e003b4683041f1cbd6bc38fda7cdbd6\":\"0x6c6b935b8bbd400000\",\"0xc61446b754c24e3b1642d9e51765b4d3e46b34b6\":\"0x6c6b935b8bbd400000\",\"0xc618521321abaf5b26513a4a9528086f220adc6f\":\"0x176b344f2a78c0000\",\"0xc6234657a807384126f8968ca1708bb07baa493c\":\"0x1158e460913d00000\",\"0xc625f8c98d27a09a1bcabd5128b1c2a94856af30\":\"0xad78ebc5ac6200000\",\"0xc6355ec4768c70a49af69513cd83a5bca7e3b9cd\":\"0x14542ba12a337c00000\",\"0xc63ac417992e9f9b60386ed953e6d7dff2b090e8\":\"0xd8d8583fa2d52f0000\",\"0xc63cd7882118b8a91e074d4c8f4ba91851303b9a\":\"0xe18398e7601900000\",\"0xc652871d192422c6bc235fa063b44a7e1d43e385\":\"0x8670e9ec6598c0000\",\"0xc667441e7f29799aba616451d53b3f489f9e0f48\":\"0x2f29ace68addd800000\",\"0xc66ae4cee87fb3353219f77f1d6486c580280332\":\"0x19a16b06ff8cb0000\",\"0xc674f28c8afd073f8b799691b2f0584df942e844\":\"0x6c6b935b8bbd400000\",\"0xc697b70477cab42e2b8b266681f4ae7375bb2541\":\"0x12e5732baba5c980000\",\"0xc69b855539ce1b04714728eec25a37f367951de7\":\"0x6c6b935b8bbd400000\",\"0xc69be440134d6280980144a9f64d84748a37f349\":\"0x26c29e47c4844c0000\",\"0xc69d663c8d60908391c8d236191533fdf7775613\":\"0x1a4aba225c20740000\",\"0xc6a286e065c85f3af74812ed8bd3a8ce5d25e21d\":\"0xfc936392801c0000\",\"0xc6a30ef5bb3320f40dc5e981230d52ae3ac19322\":\"0x9ddc1e3b901180000\",\"0xc6ae287ddbe1149ba16ddcca4fe06aa2eaa988a9\":\"0x15af1d78b58c400000\",\"0xc6c7c191379897dd9c9d9a33839c4a5f62c0890d\":\"0xd8d854b22430688000\",\"0xc6cd68ec35362c5ad84c82ad4edc232125912d99\":\"0x5e0549c9632e1d80000\",\"0xc6d8954e8f3fc533d2d230ff025cb4dce14f3426\":\"0x15af1d78b58c400000\",\"0xc6dbdb9efd5ec1b3786e0671eb2279b253f215ed\":\"0x3635c9adc5dea00000\",\"0xc6df2075ebd240d44869c2be6bdf82e63d4ef1f5\":\"0x1158e460913d00000\",\"0xc6e2f5af979a03fd723a1b6efa728318cf9c1800\":\"0x243d4d18229ca20000\",\"0xc6e324beeb5b36765ecd464260f7f26006c5c62e\":\"0x6c6b935b8bbd400000\",\"0xc6e4cc0c7283fc1c85bc4813effaaf72b49823c0\":\"0xf031ec9c87dd30000\",\"0xc6ee35934229693529dc41d9bb71a2496658b88e\":\"0x42bf06b78ed3b500000\",\"0xc6fb1ee37417d080a0d048923bdabab095d077c6\":\"0xad78ebc5ac6200000\",\"0xc70527d444c490e9fc3f5cc44e66eb4f306b380f\":\"0xd8d726b7177a800000\",\"0xc70d856d621ec145303c0a6400cd17bbd6f5eaf7\":\"0x1158e460913d00000\",\"0xc70fa45576bf9c865f983893002c414926f61029\":\"0x15b4aa8e9702680000\",\"0xc71145e529c7a714e67903ee6206e4c3042b6727\":\"0x4d853c8f8908980000\",\"0xc71b2a3d7135d2a85fb5a571dcbe695e13fc43cd\":\"0x3635c9adc5dea00000\",\"0xc71f1d75873f33dcb2dd4b3987a12d0791a5ce27\":\"0x3708baed3d68900000\",\"0xc71f92a3a54a7b8c2f5ea44305fccb84eee23148\":\"0x2b59ca131d2060000\",\"0xc721b2a7aa44c21298e85039d00e2e460e670b9c\":\"0x7a1fe160277000000\",\"0xc72cb301258e91bc08998a805dd192f25c2f9a35\":\"0x2009c5c8bf6fdc0000\",\"0xc7368b9709a5c1b51c0adf187a65df14e12b7dba\":\"0x2026fc77f03e5ae8000\",\"0xc739259e7f85f2659bef5f609ed86b3d596c201e\":\"0xad78ebc5ac6200000\",\"0xc73e2112282215dc0762f32b7e807dcd1a7aae3e\":\"0x1760cbc623bb3500000\",\"0xc749668042e71123a648975e08ed6382f83e05e2\":\"0x2f6f10780d22cc00000\",\"0xc74a3995f807de1db01a2eb9c62e97d0548f696f\":\"0x3635c9adc5dea00000\",\"0xc7506c1019121ff08a2c8c1591a65eb4bdfb4a3f\":\"0x2086ac351052600000\",\"0xc75c37ce2da06bbc40081159c6ba0f976e3993b1\":\"0x3a7923151ecf580000\",\"0xc75d2259306aec7df022768c69899a652185dbc4\":\"0xd8d726b7177a800000\",\"0xc760971bbc181c6a7cf77441f24247d19ce9b4cf\":\"0x6c6b935b8bbd400000\",\"0xc76130c73cb9210238025c9df95d0be54ac67fbe\":\"0x5150ae84a8cdf00000\",\"0xc765e00476810947816af142d46d2ee7bca8cc4f\":\"0x1b1ae4d6e2ef500000\",\"0xc7675e5647b9d8daf4d3dff1e552f6b07154ac38\":\"0x9c2007651b2500000\",\"0xc77b01a6e911fa988d01a3ab33646beef9c138f3\":\"0x271b6fa5dbe6cc0000\",\"0xc7837ad0a0bf14186937ace06c5546a36aa54f46\":\"0xd8d726b7177a800000\",\"0xc79806032bc7d828f19ac6a640c68e3d820fa442\":\"0x1158e460913d00000\",\"0xc799e34e88ff88be7de28e15e4f2a63d0b33c4cb\":\"0xad78ebc5ac6200000\",\"0xc79d5062c796dd7761f1f13e558d73a59f82f38b\":\"0x1b1ae4d6e2ef5000000\",\"0xc7a018f0968a51d1f6603c5c49dc545bcb0ff293\":\"0xd8d726b7177a800000\",\"0xc7aff91929797489555a2ff1d14d5c695a108355\":\"0x3635c9adc5dea00000\",\"0xc7b1c83e63203f9547263ef6282e7da33b6ed659\":\"0xfc936392801c0000\",\"0xc7b39b060451000ca1049ba154bcfa00ff8af262\":\"0x152d02c7e14af6800000\",\"0xc7bf17c4c11f98941f507e77084fffbd2dbd3db5\":\"0x3635c9adc5dea00000\",\"0xc7bf2ed1ed312940ee6aded1516e268e4a604856\":\"0x14542ba12a337c00000\",\"0xc7d44fe32c7f8cd5f1a97427b6cd3afc9e45023e\":\"0x55a6e79ccd1d300000\",\"0xc7d5c7054081e918ec687b5ab36e973d18132935\":\"0x9ddc1e3b901180000\",\"0xc7de5e8eafb5f62b1a0af2195cf793c7894c9268\":\"0x3635c9adc5dea00000\",\"0xc7e330cd0c890ac99fe771fcc7e7b009b7413d8a\":\"0xd8d726b7177a800000\",\"0xc7eac31abce6d5f1dea42202b6a674153db47a29\":\"0x2009c5c8bf6fdc0000\",\"0xc7ec62b804b1f69b1e3070b5d362c62fb309b070\":\"0x2c46bf5416066110000\",\"0xc7f72bb758016b374714d4899bce22b4aec70a31\":\"0x3a26c9478f5e2d0000\",\"0xc80b36d1beafba5fcc644d60ac6e46ed2927e7dc\":\"0xb98bc829a6f90000\",\"0xc811c2e9aa1ac3462eba5e88fcb5120e9f6e2ca2\":\"0x4be6d887bd876e0000\",\"0xc817df1b91faf30fe3251571727c9711b45d8f06\":\"0x6c6acc67d7b1d40000\",\"0xc81fb7d20fd2800192f0aac198d6d6a37d3fcb7d\":\"0xe1149331c2dde0000\",\"0xc820c711f07705273807aaaa6de44d0e4b48be2e\":\"0x8670e9ec6598c0000\",\"0xc8231ba5a411a13e222b29bfc1083f763158f226\":\"0x3637096c4bcc690000\",\"0xc836e24a6fcf29943b3608e662290a215f6529ea\":\"0xfd45064eaee100000\",\"0xc83ba6dd9549be1d3287a5a654d106c34c6b5da2\":\"0x17b7883c06916600000\",\"0xc83e9d6a58253beebeb793e6f28b054a58491b74\":\"0xf46c2b6f5a9140000\",\"0xc841884fa4785fb773b28e9715fae99a5134305d\":\"0x6c6b935b8bbd400000\",\"0xc84d9bea0a7b9f140220fd8b9097cfbfd5edf564\":\"0x6ab9ec291ad7d8000\",\"0xc852428d2b586497acd30c56aa13fb5582f84402\":\"0x3342d60dff19600000\",\"0xc853215b9b9f2d2cd0741e585e987b5fb80c212e\":\"0x54069233bf7f780000\",\"0xc85325eab2a59b3ed863c86a5f2906a04229ffa9\":\"0x193d7f7d253de00000\",\"0xc85ef27d820403805fc9ed259fff64acb8d6346a\":\"0x6c6b935b8bbd400000\",\"0xc8616b4ec09128cdff39d6e4b9ac86eec471d5f2\":\"0x10d3aa536e2940000\",\"0xc86190904b8d079ec010e462cbffc90834ffaa5c\":\"0x22385a827e815500000\",\"0xc8710d7e8b5a3bd69a42fe0fa8b87c357fddcdc8\":\"0xd8d726b7177a800000\",\"0xc87352dba582ee2066b9c002a962e003134f78b1\":\"0x1b1ae4d6e2ef500000\",\"0xc87c77e3c24adecdcd1038a38b56e18dead3b702\":\"0x1dd0c885f9a0d800000\",\"0xc87d3ae3d88704d9ab0009dcc1a0067131f8ba3c\":\"0x6ac5c62d9486070000\",\"0xc8814e34523e38e1f927a7dce8466a447a093603\":\"0x21e19e0c9bab2400000\",\"0xc88255eddcf521c6f81d97f5a42181c9073d4ef1\":\"0xfc39044d00a2a8000\",\"0xc885a18aabf4541b7b7b7ecd30f6fae6869d9569\":\"0x6c6b935b8bbd400000\",\"0xc88ca1e6e5f4d558d13780f488f10d4ad3130d34\":\"0x54069233bf7f780000\",\"0xc88eec54d305c928cc2848c2fee23531acb96d49\":\"0x6c6ad382d4fb610000\",\"0xc89cf504b9f3f835181fd8424f5ccbc8e1bddf7d\":\"0x21e19e0c9bab2400000\",\"0xc8a2c4e59e1c7fc54805580438aed3e44afdf00e\":\"0x2629f66e0c5300000\",\"0xc8aa49e3809f0899f28ab57e6743709d58419033\":\"0x2fb474098f67c00000\",\"0xc8ab1a3cf46cb8b064df2e222d39607394203277\":\"0x6c6b935b8bbd400000\",\"0xc8b1850525d946f2ae84f317b15188c536a5dc86\":\"0x918ddc3a42a3d40000\",\"0xc8d4e1599d03b79809e0130a8dc38408f05e8cd3\":\"0x9fad06241279160000\",\"0xc8dd27f16bf22450f5771b9fe4ed4ffcb30936f4\":\"0xaadec983fcff40000\",\"0xc8de7a564c7f4012a6f6d10fd08f47890fbf07d4\":\"0x1043561a8829300000\",\"0xc8e2adeb545e499d982c0c117363ceb489c5b11f\":\"0x35659ef93f0fc40000\",\"0xc8e558a3c5697e6fb23a2594c880b7a1b68f9860\":\"0x21e19e0c9bab2400000\",\"0xc8f2b320e6dfd70906c597bad2f9501312c78259\":\"0x51934b8b3a57d00000\",\"0xc90300cb1d4077e6a6d7e169a460468cf4a492d7\":\"0x6c6b935b8bbd400000\",\"0xc90c3765156bca8e4897ab802419153cbe5225a9\":\"0xad78ebc5ac6200000\",\"0xc910a970556c9716ea53af66ddef93143124913d\":\"0x55a6e79ccd1d300000\",\"0xc9127b7f6629ee13fc3f60bc2f4467a20745a762\":\"0x37c9aa4e7ce421d8000\",\"0xc91bb562e42bd46130e2d3ae4652b6a4eb86bc0f\":\"0x1d460162f516f00000\",\"0xc9308879056dfe138ef8208f79a915c6bc7e70a8\":\"0x21e19e0c9bab2400000\",\"0xc934becaf71f225f8b4a4bf7b197f4ac9630345c\":\"0x43c33c1937564800000\",\"0xc93fbde8d46d2bcc0fa9b33bd8ba7f8042125565\":\"0x4be4e7267b6ae00000\",\"0xc94089553ae4c22ca09fbc98f57075cf2ec59504\":\"0xd8d726b7177a800000\",\"0xc94110e71afe578aa218e4fc286403b0330ace8d\":\"0x6c6b935b8bbd400000\",\"0xc946d5acc1346eba0a7279a0ac1d465c996d827e\":\"0x3783d545fdf0aa40000\",\"0xc94a28fb3230a9ddfa964e770f2ce3c253a7be4f\":\"0xad78ebc5ac6200000\",\"0xc94a585203da7bbafd93e15884e660d4b1ead854\":\"0x17b7883c06916600000\",\"0xc94f7c35c027d47df8ef4f9df85a9248a17dd23b\":\"0x19f8e7559924c0000\",\"0xc951900c341abbb3bafbf7ee2029377071dbc36a\":\"0x11c25d004d01f80000\",\"0xc953f934c0eb2d0f144bdab00483fd8194865ce7\":\"0x6c6b935b8bbd400000\",\"0xc96626728aaa4c4fb3d31c26df3af310081710d1\":\"0xb50fcfafebecb00000\",\"0xc96751656c0a8ef4357b7344322134b983504aca\":\"0x6c6b935b8bbd400000\",\"0xc98048687f2bfcc9bd90ed18736c57edd352b65d\":\"0x3635c9adc5dea00000\",\"0xc981d312d287d558871edd973abb76b979e5c35e\":\"0x6acb3df27e1f880000\",\"0xc982586d63b0d74c201b1af8418372e30c7616be\":\"0x56bc75e2d63100000\",\"0xc989434f825aaf9c552f685eba7c11db4a5fc73a\":\"0x1b28c58d9696b40000\",\"0xc989eec307e8839b9d7237cfda08822962abe487\":\"0x15af1d78b58c400000\",\"0xc992be59c6721caf4e028f9e8f05c25c55515bd4\":\"0x1158e460913d00000\",\"0xc9957ba94c1b29e5277ec36622704904c63dc023\":\"0x683efc6782642c0000\",\"0xc99a9cd6c9c1be3534eecd92ecc22f5c38e9515b\":\"0x105593b3a169d770000\",\"0xc9ac01c3fb0929033f0ccc7e1acfeaaba7945d47\":\"0x2a36a9e9ca4d2038000\",\"0xc9b698e898d20d4d4f408e4e4d061922aa856307\":\"0x22b1c8c1227a00000\",\"0xc9b6b686111691ee6aa197c7231a88dc60bd295d\":\"0x1b1ae4d6e2ef500000\",\"0xc9c7ac0bdd9342b5ead4360923f68c72a6ba633a\":\"0x1b1ae4d6e2ef500000\",\"0xc9c80dc12e7bab86e949d01e4c3ed35f2b9bba5f\":\"0x6c6b935b8bbd400000\",\"0xc9d76446d5aadff80b68b91b08cd9bc8f5551ac1\":\"0x26b4bd9110dce80000\",\"0xc9dcbb056f4db7d9da39936202c5bd8230b3b477\":\"0x43c33c1937564800000\",\"0xc9e02608066828848aeb28c73672a12925181f4d\":\"0x1b1b6bd7af64c70000\",\"0xca0432cb157b5179f02ebba5c9d1b54fec4d88ca\":\"0x3635c9adc5dea00000\",\"0xca122cf0f2948896b74843f49afed0ba1618eed7\":\"0x1e5b8fa8fe2ac00000\",\"0xca22cda3606da5cad013b8074706d7e9e721a50c\":\"0x17181c6fa3981940000\",\"0xca23f62dff0d6460036c62e840aec5577e0befd2\":\"0x7a1fe160277000000\",\"0xca25ff34934c1942e22a4e7bd56f14021a1af088\":\"0xaadec983fcff40000\",\"0xca373fe3c906b8c6559ee49ccd07f37cd4fb5266\":\"0x61093d7c2c6d380000\",\"0xca41ccac30172052d522cd2f2f957d248153409f\":\"0x6acb3df27e1f880000\",\"0xca4288014eddc5632f5facb5e38517a8f8bc5d98\":\"0x126e72a69a50d00000\",\"0xca428863a5ca30369892d612183ef9fb1a04bcea\":\"0x52663ccab1e1c00000\",\"0xca49a5f58adbefae23ee59eea241cf0482622eaa\":\"0x4d853c8f8908980000\",\"0xca4ca9e4779d530ecbacd47e6a8058cfde65d98f\":\"0x2b5e3af16b18800000\",\"0xca657ec06fe5bc09cf23e52af7f80cc3689e6ede\":\"0x30ca024f987b900000\",\"0xca66b2280fa282c5b67631ce552b62ee55ad8474\":\"0x6ac422f53492880000\",\"0xca6c818befd251361e02744068be99d8aa60b84a\":\"0x14542ba12a337c00000\",\"0xca70f4ddbf069d2143bd6bbc7f696b52789b32e7\":\"0xa2a15d09519be00000\",\"0xca747576446a4c8f30b08340fee198de63ec92cf\":\"0x17c8e1206722a300000\",\"0xca7ba3ff536c7e5f0e153800bd383db8312998e0\":\"0x931ac3d6bb2400000\",\"0xca8276c477b4a07b80107b843594189607b53bec\":\"0x14542ba12a337c00000\",\"0xca8409083e01b397cf12928a05b68455ce6201df\":\"0x56bc75e2d631000000\",\"0xca98c7988efa08e925ef9c9945520326e9f43b99\":\"0xd8d726b7177a800000\",\"0xca9a042a6a806ffc92179500d24429e8ab528117\":\"0x3ba1910bf341b00000\",\"0xca9dec02841adf5cc920576a5187edd2bd434a18\":\"0x1b1ae4d6e2ef500000\",\"0xca9faa17542fafbb388eab21bc4c94e8a7b34788\":\"0x6c6b8fce0d18798000\",\"0xcaaa68ee6cdf0d34454a769b0da148a1faaa1865\":\"0x1872e1de7fe52c00000\",\"0xcaad9dc20d589ce428d8fda3a9d53a607b7988b5\":\"0xd8d726b7177a800000\",\"0xcab0d32cf3767fa6b3537c84328baa9f50458136\":\"0x1e5b8fa8fe2ac000000\",\"0xcab9a301e6bd46e940355028eccd40ce4d5a1ac3\":\"0x15af1d78b58c400000\",\"0xcab9a97ada065c87816e6860a8f1426fe6b3d775\":\"0x3635c9adc5dea00000\",\"0xcabab6274ed15089737e287be878b757934864e2\":\"0x43c33c1937564800000\",\"0xcabdaf354f4720a466a764a528d60e3a482a393c\":\"0x3635c9adc5dea00000\",\"0xcacb675e0996235404efafbb2ecb8152271b55e0\":\"0x25f273933db5700000\",\"0xcad14f9ebba76680eb836b079c7f7baaf481ed6d\":\"0xcef3d7bd7d0340000\",\"0xcae3a253bcb2cf4e13ba80c298ab0402da7c2aa0\":\"0x124bc0ddd92e5600000\",\"0xcaef027b1ab504c73f41f2a10979b474f97e309f\":\"0xad78ebc5ac6200000\",\"0xcaf4481d9db78dc4f25f7b4ac8bd3b1ca0106b31\":\"0x10f0cf064dd59200000\",\"0xcafde855864c2598da3cafc05ad98df2898e8048\":\"0x300a8ed96ff4a940000\",\"0xcb0dd7cf4e5d8661f6028943a4b9b75c914436a7\":\"0x1969368974c05b000000\",\"0xcb1bb6f1da5eb10d4899f7e61d06c1b00fdfb52d\":\"0x384524cc70b7780000\",\"0xcb3d766c983f192bcecac70f4ee03dd9ff714d51\":\"0x56bc75e2d63100000\",\"0xcb42b44eb5fd60b5837e4f9eb47267523d1a229c\":\"0x2ee449550898e40000\",\"0xcb47bd30cfa8ec5468aaa6a94642ced9c819c8d4\":\"0xd8d726b7177a800000\",\"0xcb48fe8265d9af55eb7006bc335645b0a3a183be\":\"0xa2a15d09519be00000\",\"0xcb4a914d2bb029f32e5fef5c234c4fec2d2dd577\":\"0x6194049f30f7200000\",\"0xcb4abfc282aed76e5d57affda542c1f382fcacf4\":\"0x1b90f11c3183faa0000\",\"0xcb4ad0c723da46ab56d526da0c1d25c73daff10a\":\"0x1ba5abf9e779380000\",\"0xcb4bb1c623ba28dc42bdaaa6e74e1d2aa1256c2a\":\"0x6c6acc67d7b1d40000\",\"0xcb50587412822304ebcba07dab3a0f09fffee486\":\"0x4a4491bd6dcd280000\",\"0xcb58990bcd90cfbf6d8f0986f6fa600276b94e2d\":\"0x3634bf39ab98788000\",\"0xcb68ae5abe02dcf8cbc5aa719c25814651af8b85\":\"0x1b1ae4d6e2ef500000\",\"0xcb7479109b43b26657f4465f4d18c6f974be5f42\":\"0x62a992e53a0af00000\",\"0xcb7d2b8089e9312cc9aeaa2773f35308ec6c2a7b\":\"0x21e19e0c9bab2400000\",\"0xcb86edbc8bbb1f9131022be649565ebdb09e32a1\":\"0x6c6b935b8bbd400000\",\"0xcb93199b9c90bc4915bd859e3d42866dc8c18749\":\"0xc90df07def78c0000\",\"0xcb94e76febe208116733e76e805d48d112ec9fca\":\"0x3635c9adc5dea00000\",\"0xcb9b5103e4ce89af4f64916150bff9eecb9faa5c\":\"0x1b1ae4d6e2ef500000\",\"0xcba25c7a503cc8e0d04971ca05c762f9b762b48b\":\"0x1b1ae4d6e2ef500000\",\"0xcba288cd3c1eb4d59ddb06a6421c14c345a47b24\":\"0xd8d726b7177a800000\",\"0xcbb3189e4bd7f45f178b1c30c76e26314d4a4b0a\":\"0xffe0b677c65a98000\",\"0xcbb7be17953f2ccc93e1bc99805bf45511434e4c\":\"0xaae5b9df56d2f200000\",\"0xcbc04b4d8b82caf670996f160c362940d66fcf1a\":\"0x14542ba12a337c00000\",\"0xcbde9734b8e6aa538c291d6d7facedb0f338f857\":\"0x6c6b935b8bbd400000\",\"0xcbe1b948864d8474e765145858fca4550f784b92\":\"0x21e19e0c9bab2400000\",\"0xcbe52fc533d7dd608c92a260b37c3f45deb4eb33\":\"0x3635c9adc5dea00000\",\"0xcbe810fe0fecc964474a1db97728bc87e973fcbd\":\"0x21e19e0c9bab2400000\",\"0xcbf16a0fe2745258cd52db2bf21954c975fc6a15\":\"0x1043561a8829300000\",\"0xcbf37ff854a2f1ce53934494777892d3ec655782\":\"0x21e19e0c9bab2400000\",\"0xcbfa6af6c283b046e2772c6063b0b21553c40106\":\"0x6c6b935b8bbd400000\",\"0xcbfa76db04ce38fb205d37b8d377cf1380da0317\":\"0x4d853c8f8908980000\",\"0xcc034985d3f28c2d39b1a34bced4d3b2b6ca234e\":\"0x9ddc1e3b901180000\",\"0xcc043c4388d345f884c6855e71142a9f41fd6935\":\"0x1158e460913d00000\",\"0xcc1d6ead01aada3e8dc7b95dca25df26eefa639d\":\"0x6c6b935b8bbd400000\",\"0xcc2b5f448f3528d3fe41cc7d1fa9c0dc76f1b776\":\"0x340aad21b3b700000\",\"0xcc2d04f0a4017189b340ca77198641dcf6456b91\":\"0xd5967be4fc3f100000\",\"0xcc419fd9912b85135659e77a93bc3df182d45115\":\"0x21e19e0c9bab2400000\",\"0xcc45fb3a555bad807b388a0357c855205f7c75e8\":\"0x2ee449550898e40000\",\"0xcc48414d2ac4d42a5962f29eee4497092f431352\":\"0x8ba52e6fc45e40000\",\"0xcc4a2f2cf86cf3e43375f360a4734691195f1490\":\"0x4915053bd129098000\",\"0xcc4f0ff2aeb67d54ce3bc8c6510b9ae83e9d328b\":\"0x15af1d78b58c400000\",\"0xcc4faac00be6628f92ef6b8cb1b1e76aac81fa18\":\"0xb22a2eab0f0fd0000\",\"0xcc4feb72df98ff35a138e01761d1203f9b7edf0a\":\"0x17b7883c06916600000\",\"0xcc606f511397a38fc7872bd3b0bd03c71bbd768b\":\"0x3635c9adc5dea00000\",\"0xcc60f836acdef3548a1fefcca13ec6a937db44a0\":\"0x4b06dbbb40f4a0000\",\"0xcc6c03bd603e09de54e9c4d5ac6d41cbce715724\":\"0x556f64c1fe7fa0000\",\"0xcc6c2df00e86eca40f21ffda1a67a1690f477c65\":\"0xab4dcf399a3a600000\",\"0xcc6d7b12061bc96d104d606d65ffa32b0036eb07\":\"0x21e19e0c9bab2400000\",\"0xcc73dd356b4979b579b401d4cc7a31a268ddce5a\":\"0x1b1ae4d6e2ef500000\",\"0xcc758d071d25a6320af68c5dc9c4f6955ba94520\":\"0x14542ba12a337c00000\",\"0xcc7b0481cc32e6faef2386a07022bcb6d2c3b4fc\":\"0xab4dcf399a3a600000\",\"0xcc943be1222cd1400a2399dd1b459445cf6d54a9\":\"0x2a740ae6536fc880000\",\"0xcc9519d1f3985f6b255eaded12d5624a972721e1\":\"0x3635c9adc5dea00000\",\"0xcc9ac715cd6f2610c52b58676456884297018b29\":\"0xb98bc829a6f90000\",\"0xcca07bb794571d4acf041dad87f0d1ef3185b319\":\"0x6c6b935b8bbd400000\",\"0xccabc6048a53464424fcf76eeb9e6e1801fa23d4\":\"0x2ab7b260ff3fd0000\",\"0xccae0d3d852a7da3860f0636154c0a6ca31628d4\":\"0x5c6d12b6bc1a00000\",\"0xccca24d8c56d6e2c07db086ec07e585be267ac8d\":\"0xad78ebc5ac6200000\",\"0xccd521132d986cb96869842622a7dda26c3ed057\":\"0x6c6b935b8bbd400000\",\"0xccf43975b76bfe735fec3cb7d4dd24f805ba0962\":\"0x340aad21b3b700000\",\"0xccf62a663f1353ba2ef8e6521dc1ecb673ec8ef7\":\"0x83d6c7aab63600000\",\"0xccf7110d1bd9a74bfd1d7d7d2d9d55607e7b837d\":\"0x30ca024f987b900000\",\"0xccfd725760a68823ff1e062f4cc97e1360e8d997\":\"0x15ac56edc4d12c0000\",\"0xcd020f8edfcf524798a9b73a640334bbf72f80a5\":\"0x73f75d1a085ba0000\",\"0xcd06f8c1b5cdbd28e2d96b6346c3e85a0483ba24\":\"0x3635c9adc5dea00000\",\"0xcd072e6e1833137995196d7bb1725fef8761f655\":\"0x14542ba12a337c00000\",\"0xcd0a161bc367ae0927a92aac9cf6e5086714efca\":\"0x6c6b935b8bbd400000\",\"0xcd0af3474e22f069ec3407870dd770443d5b12b0\":\"0x8e5eb4ee77b2ef0000\",\"0xcd0b0257e783a3d2c2e3ba9d6e79b75ef98024d4\":\"0x9fad06241279160000\",\"0xcd102cd6db3df14ad6af0f87c72479861bfc3d24\":\"0x6c6b935b8bbd400000\",\"0xcd1e66ed539dd92fc40bbaa1fa16de8c02c14d45\":\"0xc77e4256863d80000\",\"0xcd1ed263fbf6f6f7b48aef8f733d329d4382c7c7\":\"0x100bd33fb98ba0000\",\"0xcd2a36d753e9e0ed012a584d716807587b41d56a\":\"0xe2ba75b0b1f1c0000\",\"0xcd32a4a8a27f1cc63954aa634f7857057334c7a3\":\"0x3ad166576c72d40000\",\"0xcd35ff010ec501a721a1b2f07a9ca5877dfcf95a\":\"0xd96fce90cfabcc0000\",\"0xcd4306d7f6947ac1744d4e13b8ef32cb657e1c00\":\"0x1b1ab319f5ec750000\",\"0xcd43258b7392a930839a51b2ef8ad23412f75a9f\":\"0x6c6b935b8bbd400000\",\"0xcd49bf185e70d04507999f92a4de4455312827d0\":\"0x3635c9adc5dea00000\",\"0xcd5510a242dfb0183de925fba866e312fabc1657\":\"0x821ab0d44149800000\",\"0xcd566ad7b883f01fd3998a9a58a9dee4724ddca5\":\"0x330ae1835be300000\",\"0xcd59f3dde77e09940befb6ee58031965cae7a336\":\"0x21e19e0c9bab2400000\",\"0xcd725d70be97e677e3c8e85c0b26ef31e9955045\":\"0x487a9a304539440000\",\"0xcd7e47909464d871b9a6dc76a8e9195db3485e7a\":\"0x215f835bc769da80000\",\"0xcd7ece086b4b619b3b369352ee38b71ddb06439a\":\"0xad78ebc5ac6200000\",\"0xcd7f09d7ed66d0c38bc5ad4e32b7f2b08dc1b30d\":\"0x3e3bb34da2a4700000\",\"0xcd9529492b5c29e475acb941402b3d3ba50686b0\":\"0x6acb3df27e1f880000\",\"0xcd95fa423d6fc120274aacde19f4eeb766f10420\":\"0xad78ebc5ac6200000\",\"0xcd9b4cef73390c83a8fd71d7b540a7f9cf8b8c92\":\"0x4e1003b28d9280000\",\"0xcda1741109c0265b3fb2bf8d5ec9c2b8a3346b63\":\"0x1158e460913d00000\",\"0xcda1b886e3a795c9ba77914e0a2fe5676f0f5ccf\":\"0x5bf60ea42c2040000\",\"0xcda4530f4b9bc50905b79d17c28fc46f95349bdf\":\"0x3310e04911f1f80000\",\"0xcdab46a5902080646fbf954204204ae88404822b\":\"0x1d8a96e5c606eb0000\",\"0xcdb597299030183f6e2d238533f4642aa58754b6\":\"0x15af1d78b58c400000\",\"0xcdd5d881a7362c9070073bdfbc75e72453ac510e\":\"0x2da518eae48ee80000\",\"0xcdd60d73efaad873c9bbfb178ca1b7105a81a681\":\"0x1bc16d674ec800000\",\"0xcdd9efac4d6d60bd71d95585dce5d59705c13564\":\"0x56bc75e2d63100000\",\"0xcde36d81d128c59da145652193eec2bfd96586ef\":\"0xd8d726b7177a800000\",\"0xcdea386f9d0fd804d02818f237b7d9fa7646d35e\":\"0xa349d36d80ec578000\",\"0xcdecf5675433cdb0c2e55a68db5d8bbe78419dd2\":\"0x1158e460913d00000\",\"0xcdfd8217339725d7ebac11a63655f265eff1cc3d\":\"0x10f0c696410e3a90000\",\"0xce079f51887774d8021cb3b575f58f18e9acf984\":\"0x9c2007651b2500000\",\"0xce1884ddbbb8e10e4dba6e44feeec2a7e5f92f05\":\"0xd8d726b7177a800000\",\"0xce1b0cb46aaecfd79b880cad0f2dda8a8dedd0b1\":\"0x1158e460913d00000\",\"0xce26f9a5305f8381094354dbfc92664e84f902b5\":\"0xc7aaab0591eec0000\",\"0xce2deab51c0a9ae09cd212c4fa4cc52b53cc0dec\":\"0x6c6b935b8bbd400000\",\"0xce2e0da8934699bb1a553e55a0b85c169435bea3\":\"0x10f0c696410e3a90000\",\"0xce3a61f0461b00935e85fa1ead82c45e5a64d488\":\"0x1b1ae4d6e2ef500000\",\"0xce4b065dbcb23047203262fb48c1188364977470\":\"0x1b1ae4d6e2ef500000\",\"0xce53c8cdd74296aca987b2bc19c2b875a48749d0\":\"0xa2a15d09519be00000\",\"0xce5e04f0184369bcfa06aca66ffa91bf59fa0fb9\":\"0x22b1c8c1227a00000\",\"0xce5eb63a7bf4fbc2f6e4baa0c68ab1cb4cf98fb4\":\"0x6c6b935b8bbd400000\",\"0xce62125adec3370ac52110953a4e760be9451e3b\":\"0x83d6c7aab63600000\",\"0xce71086d4c602554b82dcbfce88d20634d53cc4d\":\"0x92896529baddc880000\",\"0xce8a6b6d5033b1498b1ffeb41a41550405fa03a2\":\"0xd8d726b7177a800000\",\"0xce9786d3712fa200e9f68537eeaa1a06a6f45a4b\":\"0x61093d7c2c6d380000\",\"0xce9d21c692cd3c01f2011f505f870036fa8f6cd2\":\"0x15af1d78b58c400000\",\"0xcea2896623f4910287a2bdc5be83aea3f2e6de08\":\"0x1fb5a3751e490dc0000\",\"0xcea34a4dd93dd9aefd399002a97d997a1b4b89cd\":\"0x5150ae84a8cdf00000\",\"0xcea43f7075816b60bbfce68b993af0881270f6c4\":\"0x6c6b935b8bbd400000\",\"0xcea8743341533cb2f0b9c6efb8fda80d77162825\":\"0x56bc75e2d63100000\",\"0xceb089ec8a78337e8ef88de11b49e3dd910f748f\":\"0x3635c9adc5dea00000\",\"0xceb33d78e7547a9da2e87d51aec5f3441c87923a\":\"0x1158e460913d00000\",\"0xceb389381d48a8ae4ffc483ad0bb5e204cfdb1ec\":\"0x2827e6e4dd62ba8000\",\"0xcec6fc65853f9cce5f8e844676362e1579015f02\":\"0x6c6b935b8bbd400000\",\"0xced3c7be8de7585140952aeb501dc1f876ecafb0\":\"0xd8d726b7177a800000\",\"0xced81ec3533ff1bfebf3e3843ee740ad11758d3e\":\"0x6acb3df27e1f880000\",\"0xcedcb3a1d6843fb6bef643617deaf38f8e98dd5f\":\"0x19e2a4c818b9060000\",\"0xcee699c0707a7836252b292f047ce8ad289b2f55\":\"0x119a1e21aa69560000\",\"0xceed47ca5b899fd1623f21e9bd4db65a10e5b09d\":\"0x73877404c1eee0000\",\"0xcef77451dfa2c643e00b156d6c6ff84e2373eb66\":\"0xa31062beeed700000\",\"0xcf1169041c1745e45b172435a2fc99b49ace2b00\":\"0x1bb88baab2d7c0000\",\"0xcf157612764e0fd696c8cb5fba85df4c0ddc3cb0\":\"0x65a4da25d3016c00000\",\"0xcf1bdb799b2ea63ce134668bdc198b54840f180b\":\"0xfc936392801c0000\",\"0xcf2288ef4ebf88e86db13d8a0e0bf52a056582c3\":\"0x89506fbf9740740000\",\"0xcf264e6925130906c4d7c18591aa41b2a67f6f58\":\"0x6c6b935b8bbd400000\",\"0xcf26b47bd034bc508e6c4bcfd6c7d30034925761\":\"0x6194049f30f7200000\",\"0xcf2e2ad635e9861ae95cb9bafcca036b5281f5ce\":\"0x77432217e6836000000\",\"0xcf2e734042a355d05ffb2e3915b16811f45a695e\":\"0x6c6b935b8bbd400000\",\"0xcf348f2fe47b7e413c077a7baf3a75fbf8428692\":\"0x6c6b935b8bbd400000\",\"0xcf3f9128b07203a3e10d7d5755c0c4abc6e2cac2\":\"0x10f0cf064dd59200000\",\"0xcf3fbfa1fd32d7a6e0e6f8ef4eab57be34025c4c\":\"0x39a1c0f7594d480000\",\"0xcf4166746e1d3bc1f8d0714b01f17e8a62df1464\":\"0x3677036edf0af60000\",\"0xcf4f1138f1bd6bf5b6d485cce4c1017fcb85f07d\":\"0x2fd0bc77c32bff0000\",\"0xcf5a6f9df75579c644f794711215b30d77a0ce40\":\"0x6c6b935b8bbd400000\",\"0xcf5e0eacd1b39d0655f2f77535ef6608eb950ba0\":\"0x6c6b935b8bbd400000\",\"0xcf684dfb8304729355b58315e8019b1aa2ad1bac\":\"0x177224aa844c720000\",\"0xcf694081c76d18c64ca71382be5cd63b3cb476f8\":\"0x3635c9adc5dea00000\",\"0xcf6e52e6b77480b1867efec6446d9fc3cc3577e8\":\"0xc0901f6bd98790000\",\"0xcf883a20329667ea226a1e3c765dbb6bab32219f\":\"0xa4be3564d616660000\",\"0xcf8882359c0fb23387f5674074d8b17ade512f98\":\"0x14542ba12a337c00000\",\"0xcf89f7460ba3dfe83c5a1d3a019ee1250f242f0f\":\"0x356813cdcefd028000\",\"0xcf923a5d8fbc3d01aa079d1cfe4b43ce071b1611\":\"0x6c6b935b8bbd400000\",\"0xcf9be9b9ab86c66b59968e67b8d4dcff46b1814a\":\"0x23c757072b8dd00000\",\"0xcfa8b37127149bdbfee25c34d878510951ea10eb\":\"0x6c6b935b8bbd400000\",\"0xcfac2e1bf33205b05533691a02267ee19cd81836\":\"0x3635c9adc5dea00000\",\"0xcfbb32b7d024350e3321fa20c9a914035372ffc6\":\"0x15be6174e1912e0000\",\"0xcfc4e6f7f8b011414bfba42f23adfaa78d4ecc5e\":\"0x6449e84e47a8a80000\",\"0xcfd2728dfb8bdbf3bf73598a6e13eaf43052ea2b\":\"0x93739534d28680000\",\"0xcfd47493c9f89fe680bda5754dd7c9cfe7cb5bbe\":\"0x2f473513448fe0000\",\"0xcfde0fc75d6f16c443c3038217372d99f5d907f7\":\"0x83225e6396b5ec0000\",\"0xcfe2caaf3cec97061d0939748739bffe684ae91f\":\"0x21e19e0c9bab2400000\",\"0xcfeacaaed57285e0ac7268ce6a4e35ecfdb242d7\":\"0x3ae4d4240190600000\",\"0xcfecbea07c27002f65fe534bb8842d0925c78402\":\"0xd8d726b7177a800000\",\"0xcfee05c69d1f29e7714684c88de5a16098e91399\":\"0x6acb3df27e1f880000\",\"0xcff6a6fe3e9a922a12f21faa038156918c4fcb9c\":\"0x44591d67fecc80000\",\"0xcff7f89a4d4219a38295251331568210ffc1c134\":\"0x5f68e8131ecf800000\",\"0xcff8d06b00e3f50c191099ad56ba6ae26571cd88\":\"0x3635c9adc5dea00000\",\"0xcffc49c1787eebb2b56cabe92404b636147d4558\":\"0x133e0308f40a3da8000\",\"0xd008513b27604a89ba1763b6f84ce688b346945b\":\"0x3635c9adc5dea00000\",\"0xd00f067286c0fbd082f9f4a61083ec76deb3cee6\":\"0x3635c9adc5dea00000\",\"0xd015f6fcb84df7bb410e8c8f04894a881dcac237\":\"0x384524cc70b7780000\",\"0xd01af9134faf5257174e8b79186f42ee354e642d\":\"0x3635c9adc5dea00000\",\"0xd02108d2ae3cab10cbcf1657af223e027c8210f6\":\"0x6c6d84bccdd9ce0000\",\"0xd02afecf8e2ec2b62ac8ad204161fd1fae771d0e\":\"0x6c6b935b8bbd400000\",\"0xd0319139fbab2e8e2accc1d924d4b11df6696c5a\":\"0xad78ebc5ac6200000\",\"0xd037d215d11d1df3d54fbd321cd295c5465e273b\":\"0x4be4e7267b6ae00000\",\"0xd03a2da41e868ed3fef5745b96f5eca462ff6fda\":\"0xa2a15d09519be00000\",\"0xd03fc165576aaed525e5502c8e140f8b2e869639\":\"0x17356d8b32501c80000\",\"0xd043a011ec4270ee7ec8b968737515e503f83028\":\"0x1b1ae4d6e2ef500000\",\"0xd04b861b3d9acc563a901689941ab1e1861161a2\":\"0x1158e460913d00000\",\"0xd05a447c911dbb275bfb2e5a37e5a703a56f9997\":\"0xad78ebc5ac6200000\",\"0xd05ffb2b74f867204fe531653b0248e21c13544e\":\"0x3635c9adc5dea00000\",\"0xd062588171cf99bbeb58f126b870f9a3728d61ec\":\"0xf3f20b8dfa69d00000\",\"0xd0638ea57189a6a699024ad78c71d939c1c2ff8c\":\"0x8eae566710fc200000\",\"0xd0648a581b3508e135a2935d12c9657045d871ca\":\"0x1b2df9d219f57980000\",\"0xd071192966eb69c3520fca3aa4dd04297ea04b4e\":\"0x5f68e8131ecf80000\",\"0xd0718520eae0a4d62d70de1be0ca431c5eea2482\":\"0x6c6b935b8bbd400000\",\"0xd0775dba2af4c30a3a78365939cd71c2f9de95d2\":\"0x692ae8897081d00000\",\"0xd07be0f90997caf903c8ac1d53cde904fb190741\":\"0x36389038b699b40000\",\"0xd07e511864b1cf9969e3560602829e32fc4e71f5\":\"0x2b5e3af16b1880000\",\"0xd0809498c548047a1e2a2aa6a29cd61a0ee268bd\":\"0x6c6b935b8bbd400000\",\"0xd082275f745a2cac0276fbdb02d4b2a3ab1711fe\":\"0x1a055690d9db80000\",\"0xd08fc09a0030fd0928cd321198580182a76aae9f\":\"0x3635c9adc5dea00000\",\"0xd093e829819fd2e25b973800bb3d5841dd152d05\":\"0xd8d726b7177a800000\",\"0xd0944aa185a1337061ae20dc9dd96c83b2ba4602\":\"0xad78ebc5ac6200000\",\"0xd096565b7c7407d06536580355fdd6d239144aa1\":\"0xd8d726b7177a80000\",\"0xd09cb2e6082d693a13e8d2f68dd1dd8461f55840\":\"0x3635c9adc5dea00000\",\"0xd0a6c6f9e9c4b383d716b31de78d56414de8fa91\":\"0x1043561a8829300000\",\"0xd0a7209b80cf60db62f57d0a5d7d521a69606655\":\"0x8ac7230489e800000\",\"0xd0a8abd80a199b54b08b65f01d209c27fef0115b\":\"0x161c626dc61a2ef8000\",\"0xd0abcc70c0420e0e172f97d43b87d5e80c336ea9\":\"0x21e19e0c9bab2400000\",\"0xd0ae735d915e946866e1fea77e5ea466b5cadd16\":\"0x6c6b935b8bbd400000\",\"0xd0b11d6f2bce945e0c6a5020c3b52753f803f9d1\":\"0xad78ebc5ac6200000\",\"0xd0c101fd1f01c63f6b1d19bc920d9f932314b136\":\"0x43c33c1937564800000\",\"0xd0c55abf976fdc3db2afe9be99d499484d576c02\":\"0x3635c9adc5dea00000\",\"0xd0d0a2ad45f59a9dccc695d85f25ca46ed31a5a3\":\"0x2d89577d7d40200000\",\"0xd0d62c47ea60fb90a3639209bbfdd4d933991cc6\":\"0xa844a7424d9c80000\",\"0xd0db456178206f5c4430fe005063903c3d7a49a7\":\"0x26491e45a753c08000\",\"0xd0e194f34b1db609288509ccd2e73b6131a2538b\":\"0x36356633ebd8ea0000\",\"0xd0e35e047646e759f4517093d6408642517f084d\":\"0xd58fa46818eccb8000\",\"0xd0ee4d02cf24382c3090d3e99560de3678735cdf\":\"0x821ab0d44149800000\",\"0xd0f04f52109aebec9a7b1e9332761e9fe2b97bb5\":\"0xd8d726b7177a800000\",\"0xd0f9597811b0b992bb7d3757aa25b4c2561d32e2\":\"0x1b1ae4d6e2ef500000\",\"0xd10302faa1929a326904d376bf0b8dc93ad04c4c\":\"0x61093d7c2c6d380000\",\"0xd1100dd00fe2ddf18163ad964d0b69f1f2e9658a\":\"0x143120955b2506b0000\",\"0xd116f3dcd5db744bd008887687aa0ec9fd7292aa\":\"0x3635c9adc5dea00000\",\"0xd119417c46732cf34d1a1afb79c3e7e2cd8eece4\":\"0x6c6b935b8bbd400000\",\"0xd12d77ae01a92d35117bac705aacd982d02e74c1\":\"0x3635c9adc5dea00000\",\"0xd135794b149a18e147d16e621a6931f0a40a969a\":\"0x43c33c1937564800000\",\"0xd1432538e35b7664956ae495a32abdf041a7a21c\":\"0x42bf06b78ed3b500000\",\"0xd1438267231704fc7280d563adf4763844a80722\":\"0xad78ebc5ac6200000\",\"0xd1538e9a87e59ca9ec8e5826a5b793f99f96c4c3\":\"0x3635c9adc5dea00000\",\"0xd1648503b1ccc5b8be03fa1ec4f3ee267e6adf7b\":\"0x13befbf51eec0900000\",\"0xd1682c2159018dc3d07f08240a8c606daf65f8e1\":\"0x2a5a058fc295ed000000\",\"0xd171c3f2258aef35e599c7da1aa07300234da9a6\":\"0x6c6b935b8bbd400000\",\"0xd1778c13fbd968bc083cb7d1024ffe1f49d02caa\":\"0xd9ecb4fd208e500000\",\"0xd17fbe22d90462ed37280670a2ea0b3086a0d6d6\":\"0xad6eedd17cf3b8000\",\"0xd1811c55976980f083901d8a0db269222dfb5cfe\":\"0x54069233bf7f780000\",\"0xd18eb9e1d285dabe93e5d4bae76beefe43b521e8\":\"0x243d4d18229ca20000\",\"0xd193e583d6070563e7b862b9614a47e99489f3e5\":\"0x36356633ebd8ea0000\",\"0xd1978f2e34407fab1dc2183d95cfda6260b35982\":\"0x2ab7b260ff3fd00000\",\"0xd19caf39bb377fdf2cf19bd4fb52591c2631a63c\":\"0x3635c9adc5dea00000\",\"0xd1a396dcdab2c7494130b3fd307820340dfd8c1f\":\"0xf92250e2dfd00000\",\"0xd1a71b2d0858e83270085d95a3b1549650035e23\":\"0x327bb09d06aa8500000\",\"0xd1acb5adc1183973258d6b8524ffa28ffeb23de3\":\"0xd8d726b7177a800000\",\"0xd1b37f03cb107424e9c4dd575ccd4f4cee57e6cd\":\"0x6c6b935b8bbd400000\",\"0xd1b5a454ac3405bb4179208c6c84de006bcb9be9\":\"0x1b1ae4d6e2ef500000\",\"0xd1c45954a62b911ad701ff2e90131e8ceb89c95c\":\"0x4b91a2de457e880000\",\"0xd1c96e70f05ae0e6cd6021b2083750a7717cde56\":\"0x1b1ae4d6e2ef500000\",\"0xd1d5b17ffe2d7bbb79cc7d7930bcb2e518fb1bbf\":\"0xa2a15d09519be00000\",\"0xd1da0c8fb7c210e0f2ec618f85bdae7d3e734b1c\":\"0x6acb3df27e1f880000\",\"0xd1dd79fb158160e5b4e8e23f312e6a907fbc4d4e\":\"0x1b1ae4d6e2ef500000\",\"0xd1de5aad3a5fd803f1b1aeb6103cb8e14fe723b7\":\"0x1158e460913d00000\",\"0xd1e1f2b9c16c309874dee7fac32675aff129c398\":\"0x3f24d8e4a00700000\",\"0xd1e5e234a9f44266a4a6241a84d7a1a55ad5a7fe\":\"0x43c33c1937564800000\",\"0xd1ea4d72a67b5b3e0f315559f52bd0614d713069\":\"0x6c6b935b8bbd400000\",\"0xd1ee905957fe7cc70ec8f2868b43fe47b13febff\":\"0x2629f66e0c5300000\",\"0xd1f1694d22671b5aad6a94995c369fbe6133676f\":\"0x3635c9adc5dea00000\",\"0xd1f4dc1ddb8abb8848a8b14e25f3b55a8591c266\":\"0xd8d726b7177a80000\",\"0xd1fed0aee6f5dfd7e25769254c3cfad15adeccaa\":\"0x2792c8fc4b53280000\",\"0xd2051cb3cb6704f0548cc890ab0a19db3415b42a\":\"0x121b2e5e6464780000\",\"0xd206aaddb336d45e7972e93cb075471d15897b5d\":\"0x2086ac351052600000\",\"0xd209482bb549abc4777bea6d7f650062c9c57a1c\":\"0x11651ac3e7a7580000\",\"0xd20dcb0b78682b94bc3000281448d557a20bfc83\":\"0x30849ebe16369c0000\",\"0xd2107b353726c3a2b46566eaa7d9f80b5d21dbe3\":\"0x1158e460913d00000\",\"0xd211b21f1b12b5096181590de07ef81a89537ead\":\"0x6c6b935b8bbd400000\",\"0xd218efb4db981cdd6a797f4bd48c7c26293ceb40\":\"0xa1466b31c6431c0000\",\"0xd21a7341eb84fd151054e5e387bb25d36e499c09\":\"0x2f6f10780d22cc00000\",\"0xd224f880f9479a89d32f09e52be990b288135cef\":\"0x3a9d5baa4abf1d00000\",\"0xd22f0ca4cd479e661775053bcc49e390f670dd8a\":\"0x3635c9adc5dea00000\",\"0xd231929735132102471ba59007b6644cc0c1de3e\":\"0x3637096c4bcc690000\",\"0xd235d15cb5eceebb61299e0e827fa82748911d89\":\"0xd8d726b7177a800000\",\"0xd23a24d7f9468343c143a41d73b88f7cbe63be5e\":\"0xad78ebc5ac6200000\",\"0xd23d7affacdc3e9f3dae7afcb4006f58f8a44600\":\"0xc328093e61ee400000\",\"0xd243184c801e5d79d2063f3578dbae81e7b3a9cb\":\"0x6bdca2681e1aba0000\",\"0xd24b6644f439c8051dfc64d381b8c86c75c17538\":\"0x6c6b935b8bbd400000\",\"0xd24bf12d2ddf457decb17874efde2052b65cbb49\":\"0x2f6f10780d22cc00000\",\"0xd251f903ae18727259eee841a189a1f569a5fd76\":\"0x21e19e0c9bab2400000\",\"0xd252960b0bf6b2848fdead80136db5f507f8be02\":\"0x6c6b935b8bbd400000\",\"0xd2581a55ce23ab10d8ad8c44378f59079bd6f658\":\"0x1dd0c885f9a0d800000\",\"0xd25aecd7eb8bd6345b063b5dbd271c77d3514494\":\"0x62a992e53a0af00000\",\"0xd27c234ff7accace3d996708f8f9b04970f97d36\":\"0x487a9a304539440000\",\"0xd28298524df5ec4b24b0ffb9df85170a145a9eb5\":\"0xf98a3b9b337e20000\",\"0xd283b8edb10a25528a4404de1c65e7410dbcaa67\":\"0x28a857425466f800000\",\"0xd284a50382f83a616d39b8a9c0f396e0ebbfa95d\":\"0x3636c25e66ece70000\",\"0xd288e7cb7ba9f620ab0f7452e508633d1c5aa276\":\"0xd8d726b7177a800000\",\"0xd29dc08efbb3d72e263f78ab7610d0226de76b00\":\"0x28a857425466f800000\",\"0xd2a030ac8952325f9e1db378a71485a24e1b07b2\":\"0x6c6b935b8bbd400000\",\"0xd2a479404347c5543aab292ae1bb4a6f158357fa\":\"0xd8d726b7177a800000\",\"0xd2a5a024230a57ccc666760b89b0e26cafd189c7\":\"0xa96595a5c6e8a3f8000\",\"0xd2a80327cbe55c4c7bd51ff9dde4ca648f9eb3f8\":\"0x2b5e3af16b1880000\",\"0xd2a84f75675c62d80c88756c428eee2bcb185421\":\"0x410d586a20a4c00000\",\"0xd2abd84a181093e5e229136f42d835e8235de109\":\"0x56be03ca3e47d8000\",\"0xd2ac0d3a58605e1d0f0eb3de25b2cad129ed6058\":\"0xd8d726b7177a800000\",\"0xd2bf67a7f3c6ce56b7be41675dbbadfe7ea93a33\":\"0x15af1d78b58c400000\",\"0xd2dbebe89b0357aea98bbe8e496338debb28e805\":\"0xd8d726b7177a800000\",\"0xd2e21ed56868fab28e0947927adaf29f23ebad6c\":\"0x6c184f1355d0e80000\",\"0xd2e817738abf1fb486583f80c350318bed860c80\":\"0xd02cecf5f5d810000\",\"0xd2edd1ddd6d86dc005baeb541d22b640d5c7cae5\":\"0x1158e460913d00000\",\"0xd2f1998e1cb1580cec4f6c047dcd3dcec54cf73c\":\"0xad78ebc5ac6200000\",\"0xd2f241255dd7c3f73c07043071ec08ddd9c5cde5\":\"0x1b1ae4d6e2ef500000\",\"0xd2ff672016f63b2f85398f4a6fedbb60a50d3cce\":\"0x1291246f5b734a0000\",\"0xd30d4c43adcf55b2cb53d68323264134498d89ce\":\"0x3635c9adc5dea00000\",\"0xd30ee9a12b4d68abace6baca9ad7bf5cd1faf91c\":\"0x514fcb24ff9c500000\",\"0xd3118ea3c83505a9d893bb67e2de142d537a3ee7\":\"0x1158e460913d00000\",\"0xd311bcd7aa4e9b4f383ff3d0d6b6e07e21e3705d\":\"0xad78ebc5ac6200000\",\"0xd315deea1d8c1271f9d1311263ab47c007afb6f5\":\"0x3c81d4e654b400000\",\"0xd32b2c79c36478c5431901f6d700b04dbe9b8810\":\"0x15779a9de6eeb00000\",\"0xd32b45564614516c91b07fa9f72dcf787cce4e1c\":\"0xfc66fae3746ac0000\",\"0xd330728131fe8e3a15487a34573c93457e2afe95\":\"0xd8d726b7177a800000\",\"0xd331c823825a9e5263d052d8915d4dcde07a5c37\":\"0x1e931283ccc8500000\",\"0xd333627445f2d787901ef33bb2a8a3675e27ffec\":\"0x15af1d78b58c400000\",\"0xd33cf82bf14c592640a08608914c237079d5be34\":\"0x6c6b935b8bbd400000\",\"0xd34d708d7398024533a5a2b2309b19d3c55171bb\":\"0x15af1d78b58c400000\",\"0xd34e03d36a2bd4d19a5fa16218d1d61e3ffa0b15\":\"0x1158e460913d000000\",\"0xd35075ca61fe59d123969c36a82d1ab2d918aa38\":\"0x90f534608a72880000\",\"0xd367009ab658263b62c2333a1c9e4140498e1389\":\"0x6c6b935b8bbd400000\",\"0xd3679a47df2d99a49b01c98d1c3e0c987ce1e158\":\"0xf2dc7d47f15600000\",\"0xd38fa2c4cc147ad06ad5a2f75579281f22a7cc1f\":\"0x43c33c1937564800000\",\"0xd39a5da460392b940b3c69bc03757bf3f2e82489\":\"0x17c83a97d6b6ca50000\",\"0xd39b7cbc94003fc948f0cde27b100db8ccd6e063\":\"0x15af1d78b58c400000\",\"0xd3a10ec7a5c9324999dd9e9b6bde7c911e584bda\":\"0x2086ac351052600000\",\"0xd3a941c961e8ca8b1070f23c6d6d0d2a758a4444\":\"0xad78ebc5ac6200000\",\"0xd3bb59fa31258be62f8ed232f1a7d47b4a0b41ee\":\"0x56bc75e2d63100000\",\"0xd3bc730937fa75d8452616ad1ef1fe7fffe0d0e7\":\"0x484e4ded2eae38000\",\"0xd3c24d4b3a5e0ff8a4622d518edd73f16ab28610\":\"0x1158e460913d00000\",\"0xd3c6f1e0f50ec3d2a67e6bcd193ec7ae38f1657f\":\"0x166c5480889db770000\",\"0xd3d6e9fb82542fd29ed9ea3609891e151396b6f7\":\"0xb6f588aa7bcf5c00000\",\"0xd3dad1b6d08d4581ccae65a8732db6ac69f0c69e\":\"0x14542ba12a337c00000\",\"0xd3df3b53cb3b4755de54e180451cc44c9e8ae0aa\":\"0x23c49409b977828000\",\"0xd3f873bd9956135789ab00ebc195b922e94b259d\":\"0x6c6b935b8bbd400000\",\"0xd402b4f6a099ebe716cb14df4f79c0cd01c6071b\":\"0x6c6b935b8bbd400000\",\"0xd40d0055fd9a38488aff923fd03d35ec46d711b3\":\"0x10f08eda8e555098000\",\"0xd40ed66ab3ceff24ca05ecd471efb492c15f5ffa\":\"0x1b1ae4d6e2ef500000\",\"0xd418870bc2e4fa7b8a6121ae0872d55247b62501\":\"0x55a6e79ccd1d300000\",\"0xd41d7fb49fe701baac257170426cc9b38ca3a9b2\":\"0x98a7d9b8314c00000\",\"0xd4205592844055b3c7a1f80cefe3b8eb509bcde7\":\"0x9b3bfd342a9fc8000\",\"0xd42b20bd0311608b66f8a6d15b2a95e6de27c5bf\":\"0x6c6b935b8bbd400000\",\"0xd4344f7d5cad65d17e5c2d0e7323943d6f62fe92\":\"0xe7eeba3410b740000\",\"0xd43ee438d83de9a37562bb4e286cb1bd19f4964d\":\"0x3635c9adc5dea00000\",\"0xd44334b4e23a169a0c16bd21e866bba52d970587\":\"0x8cf23f909c0fa00000\",\"0xd44d81e18f46e2cfb5c1fcf5041bc8569767d100\":\"0x7b442e684f65aa40000\",\"0xd44f4ac5fad76bdc1537a3b3af6472319b410d9d\":\"0x56bc75e2d631000000\",\"0xd44f5edf2bcf2433f211dadd0cc450db1b008e14\":\"0xe7eeba3410b740000\",\"0xd44f6ac3923b5fd731a4c45944ec4f7ec52a6ae4\":\"0x21e19e0c9bab2400000\",\"0xd45b3341e8f15c80329320c3977e3b90e7826a7e\":\"0x1b1ae4d6e2ef500000\",\"0xd45d5daa138dd1d374c71b9019916811f4b20a4e\":\"0x1f399b1438a1000000\",\"0xd460a4b908dd2b056759b488850b66a838fc77a8\":\"0x6acb3df27e1f880000\",\"0xd467cf064c0871989b90d8b2eb14ccc63b360823\":\"0xad78ebc5ac6200000\",\"0xd46bae61b027e5bb422e83a3f9c93f3c8fc77d27\":\"0x6c6b935b8bbd400000\",\"0xd46f8223452982a1eea019a8816efc2d6fc00768\":\"0x76d41c62494840000\",\"0xd475477fa56390d33017518d6711027f05f28dbf\":\"0x6b111333d4fd4c0000\",\"0xd47c242edffea091bc54d57df5d1fdb93101476c\":\"0x9df7dfa8f760480000\",\"0xd47d8685faee147c520fd986709175bf2f886bef\":\"0x6c6b935b8bbd400000\",\"0xd47f50df89a1cff96513bef1b2ae3a2971accf2c\":\"0x2d89577d7d40200000\",\"0xd482e7f68e41f238fe517829de15477fe0f6dd1d\":\"0x1b1ae4d6e2ef500000\",\"0xd4879fd12b1f3a27f7e109761b23ca343c48e3d8\":\"0x241a9b4f617a280000\",\"0xd48e3f9357e303513841b3f84bda83fc89727587\":\"0x3635c9adc5dea00000\",\"0xd49a75bb933fca1fca9aa1303a64b6cb44ea30e1\":\"0x21e19e0c9bab2400000\",\"0xd4b085fb086f3d0d68bf12926b1cc3142cae8770\":\"0xc893d09c8f51500000\",\"0xd4b2ff3bae1993ffea4d3b180231da439f7502a2\":\"0x6c6b935b8bbd400000\",\"0xd4b38a5fdb63e01714e9801db47bc990bd509183\":\"0x14534d95bef905c0000\",\"0xd4b8bdf3df9a51b0b91d16abbea05bb4783c8661\":\"0x3635c9adc5dea00000\",\"0xd4c4d1a7c3c74984f6857b2f5f07e8face68056d\":\"0x6c6b935b8bbd400000\",\"0xd4c6ac742e7c857d4a05a04c33d4d05c1467571d\":\"0xad78ebc5ac6200000\",\"0xd4cb21e590c5a0e06801366aff342c7d7db16424\":\"0x1ac7a08ead02f80000\",\"0xd4d92c62b280e00f626d8657f1b86166cb1f740f\":\"0xad7f23634cbd60000\",\"0xd4ebb1929a23871cf77fe049ab9602be08be0a73\":\"0x678a932062e4180000\",\"0xd4ee4919fb37f2bb970c3fff54aaf1f3dda6c03f\":\"0x878678326eac9000000\",\"0xd4feed99e8917c5c5458635f3603ecb7e817a7d0\":\"0x1043c43cde1d398000\",\"0xd4ff46203efa23064b1caf00516e28704a82a4f8\":\"0x487a9a304539440000\",\"0xd500e4d1c9824ba9f5b635cfa3a8c2c38bbd4ced\":\"0x15af1d78b58c400000\",\"0xd508d39c70916f6abc4cc7f999f011f077105802\":\"0x5724d24afe77f0000\",\"0xd50f7fa03e389876d3908b60a537a6706304fb56\":\"0x56bc75e2d63100000\",\"0xd513a45080ff2febe62cd5854abe29ee4467f996\":\"0x84e13bc4fc5d80000\",\"0xd5276f0cd5ffd5ffb63f98b5703d5594ede0838b\":\"0x15af1d78b58c400000\",\"0xd5294b666242303b6df0b1c88d37429bc8c965aa\":\"0x104d0d00d2b7f60000\",\"0xd52aecc6493938a28ca1c367b701c21598b6a02e\":\"0x3ba1910bf341b00000\",\"0xd53c567f0c3ff2e08b7d59e2b5c73485437fc58d\":\"0x2086ac351052600000\",\"0xd541ac187ad7e090522de6da3213e9a7f4439673\":\"0x6c6b935b8bbd400000\",\"0xd54ba2d85681dc130e5b9b02c4e8c851391fd9b9\":\"0xd5967be4fc3f100000\",\"0xd55508adbbbe9be81b80f97a6ea89add68da674f\":\"0x6c6b935b8bbd400000\",\"0xd5550caaf743b037c56fd2558a1c8ed235130750\":\"0x121e4d49036255b0000\",\"0xd5586da4e59583c8d86cccf71a86197f17996749\":\"0x6c6b935b8bbd400000\",\"0xd55c1c8dfbe1e02cacbca60fdbdd405b09f0b75f\":\"0x6c6b935b8bbd400000\",\"0xd561cbbc05515de73ab8cf9eae1357341e7dfdf4\":\"0x14542ba12a337c00000\",\"0xd56a144d7af0ae8df649abae535a15983aa04d02\":\"0x10f0cf064dd59200000\",\"0xd572309169b1402ec8131a17a6aac3222f89e6eb\":\"0x2ec1978c47766a00000\",\"0xd5787668c2c5175b01a8ee1ac3ecc9c8b2aba95a\":\"0x6c6acc67d7b1d40000\",\"0xd588c3a5df228185d98ee7e60748255cdea68b01\":\"0xd8d726b7177a800000\",\"0xd58a52e078a805596b0d56ea4ae1335af01c66eb\":\"0xe7eeba3410b740000\",\"0xd5903e9978ee20a38c3f498d63d57f31a39f6a06\":\"0x232b36ffc672ab00000\",\"0xd59638d3c5faa7711bf085745f9d5bdc23d498d8\":\"0x6c6b935b8bbd400000\",\"0xd59d92d2c8701980cc073c375d720af064743c0c\":\"0x405fdf7e5af85e00000\",\"0xd5a7bec332adde18b3104b5792546aa59b879b52\":\"0x6c6b935b8bbd400000\",\"0xd5b117ec116eb846418961eb7edb629cd0dd697f\":\"0xa2a15d09519be00000\",\"0xd5b284040130abf7c1d163712371cc7e28ad66da\":\"0x6acb3df27e1f880000\",\"0xd5b9d277d8aad20697a51f76e20978996bffe055\":\"0x7c3fe3c076ab50000\",\"0xd5bd5e8455c130169357c471e3e681b7996a7276\":\"0x2d9e288f8abb360000\",\"0xd5cba5b26bea5d73fabb1abafacdef85def368cc\":\"0xad78ebc5ac6200000\",\"0xd5ce55d1b62f59433c2126bcec09bafc9dfaa514\":\"0xaadec983fcff40000\",\"0xd5e55100fbd1956bbed2ca518d4b1fa376032b0b\":\"0x56bc75e2d63100000\",\"0xd5e5c135d0c4c3303934711993d0d16ff9e7baa0\":\"0x6c6b935b8bbd400000\",\"0xd5e656a1b916f9bf45afb07dd8afaf73b4c56f41\":\"0x542253a126ce40000\",\"0xd5ea472cb9466018110af00c37495b5c2c713112\":\"0x10eee686c854f440000\",\"0xd5f07552b5c693c20067b378b809cee853b8f136\":\"0x1b67c6df88c6fa0000\",\"0xd5f7c41e07729dfa6dfc64c4423160a22c609fd3\":\"0x61093d7c2c6d380000\",\"0xd604abce4330842e3d396ca73ddb5519ed3ec03f\":\"0x8e31fe1689d8a0000\",\"0xd60651e393783423e5cc1bc5f889e44ef7ea243e\":\"0x159e76371129c80000\",\"0xd609bf4f146eea6b0dc8e06ddcf4448a1fccc9fa\":\"0x6c6b935b8bbd400000\",\"0xd609ec0be70d0ad26f6e67c9d4762b52ee51122c\":\"0x3635c9adc5dea00000\",\"0xd60a52580728520df7546bc1e283291788dbae0c\":\"0x363489ef3ff0d70000\",\"0xd60b247321a32a5affb96b1e279927cc584de943\":\"0x7ad020d6ddd7760000\",\"0xd6110276cfe31e42825a577f6b435dbcc10cf764\":\"0x3635c9adc5dea00000\",\"0xd612597bc31743c78633f633f239b1e9426bd925\":\"0x1017f7df96be17800000\",\"0xd6234aaf45c6f22e66a225ffb93add629b4ef80f\":\"0x3635c9adc5dea00000\",\"0xd62edb96fce2969aaf6c545e967cf1c0bc805205\":\"0x4a565536a5ada8000\",\"0xd6300b3215b11de762ecde4b70b7927d01291582\":\"0x6c6b935b8bbd400000\",\"0xd6395db5a4bb66e60f4cfbcdf0057bb4d97862e2\":\"0x3154c9729d05780000\",\"0xd64a2d50f8858537188a24e0f50df1681ab07ed7\":\"0x8375a2abcca24400000\",\"0xd6580ab5ed4c7dfa506fa6fe64ad5ce129707732\":\"0xd8d726b7177a800000\",\"0xd6598b1386e93c5ccb9602ff4bbbecdbd3701dc4\":\"0xc25f4ecb041f00000\",\"0xd6644d40e90bc97fe7dfe7cabd3269fd579ba4b3\":\"0x89e917994f71c0000\",\"0xd6670c036df754be43dadd8f50feea289d061fd6\":\"0x144a2903448cef78000\",\"0xd668523a90f0293d65c538d2dd6c57673710196e\":\"0x2242c30b853ee0000\",\"0xd66ab79294074c8b627d842dab41e17dd70c5de5\":\"0x3635c9adc5dea00000\",\"0xd66acc0d11b689cea6d9ea5ff4014c224a5dc7c4\":\"0xfc936392801c0000\",\"0xd66ddf1159cf22fd8c7a4bc8d5807756d433c43e\":\"0x77432217e683600000\",\"0xd687cec0059087fdc713d4d2d65e77daefedc15f\":\"0x340aad21b3b700000\",\"0xd688e785c98f00f84b3aa1533355c7a258e87948\":\"0x1b1ae4d6e2ef500000\",\"0xd6a22e598dabd38ea6e958bd79d48ddd9604f4df\":\"0x3635c9adc5dea00000\",\"0xd6a7ac4de7b510f0e8de519d973fa4c01ba83400\":\"0x65ea3db75546600000\",\"0xd6acc220ba2e51dfcf21d443361eea765cbd35d8\":\"0x1158e460913d00000\",\"0xd6acffd0bfd99c382e7bd56ff0e6144a9e52b08e\":\"0x8ac7230489e800000\",\"0xd6c0d0bc93a62e257174700e10f024c8b23f1f87\":\"0x6c6b935b8bbd400000\",\"0xd6cf5c1bcf9da662bcea2255905099f9d6e84dcc\":\"0x1c49e420157d9c20000\",\"0xd6d03572a45245dbd4368c4f82c95714bd2167e2\":\"0x3f00c3d66686fc0000\",\"0xd6d6776958ee23143a81adadeb08382009e996c2\":\"0xa2a15d09519be00000\",\"0xd6d9e30f0842012a7176a917d9d2048ca0738759\":\"0xd8d726b7177a800000\",\"0xd6e09e98fe1300332104c1ca34fbfac554364ed9\":\"0x6c6b935b8bbd400000\",\"0xd6e8e97ae9839b9ee507eedb28edfb7477031439\":\"0x6c6b935b8bbd400000\",\"0xd6eea898d4ae2b718027a19ce9a5eb7300abe3ca\":\"0x17d4aceee63db8000\",\"0xd6f1e55b1694089ebcb4fe7d7882aa66c8976176\":\"0x43c23bdbe929db30000\",\"0xd6f4a7d04e8faf20e8c6eb859cf7f78dd23d7a15\":\"0x724ded1c748140000\",\"0xd6fc0446c6a8d40ae3551db7e701d1fa876e4a49\":\"0x6c6b935b8bbd400000\",\"0xd703c6a4f11d60194579d58c2766a7ef16c30a29\":\"0x6c6b935b8bbd400000\",\"0xd7052519756af42590f15391b723a03fa564a951\":\"0xfa3631480d01fd8000\",\"0xd70a612bd6dda9eab0dddcff4aaf4122d38feae4\":\"0x1d460162f516f00000\",\"0xd70ad2c4e9eebfa637ef56bd486ad2a1e5bce093\":\"0xad78ebc5ac6200000\",\"0xd7140c8e5a4307fab0cc27badd9295018bf87970\":\"0x5f1016b5076d00000\",\"0xd7164aa261c09ad9b2b5068d453ed8eb6aa13083\":\"0xa2a15d09519be00000\",\"0xd71e43a45177ad51cbe0f72184a5cb503917285a\":\"0xad78ebc5ac6200000\",\"0xd71fb130f0150c565269e00efb43902b52a455a6\":\"0xad78ebc5ac6200000\",\"0xd7225738dcf3578438f8e7c8b3837e42e04a262f\":\"0x182b8cebbb83aa0000\",\"0xd7274d50804d9c77da93fa480156efe57ba501de\":\"0x692ae8897081d00000\",\"0xd731bb6b5f3c37395e09ceaccd14a918a6060789\":\"0xd5967be4fc3f100000\",\"0xd73ed2d985b5f21b55b274643bc6da031d8edd8d\":\"0xa6dd90cae5114480000\",\"0xd744ac7e5310be696a63b003c40bd039370561c6\":\"0x5a87e7d7f5f6580000\",\"0xd74a6e8d6aab34ce85976814c1327bd6ea0784d2\":\"0x152d02c7e14af6800000\",\"0xd75a502a5b677287470f65c5aa51b87c10150572\":\"0x3130b4646385740000\",\"0xd76dbaebc30d4ef67b03e6e6ecc6d84e004d502d\":\"0x6d76b9188e13850000\",\"0xd771d9e0ca8a08a113775731434eb3270599c40d\":\"0x1158e460913d00000\",\"0xd7788ef28658aa06cc53e1f3f0de58e5c371be78\":\"0x16a6502f15a1e540000\",\"0xd77892e2273b235d7689e430e7aeed9cbce8a1f3\":\"0x6c6b935b8bbd400000\",\"0xd781f7fc09184611568570b4986e2c72872b7ed0\":\"0x1159561065d5d0000\",\"0xd785a8f18c38b9bc4ffb9b8fa8c7727bd642ee1c\":\"0x3635c9adc5dea00000\",\"0xd78ecd25adc86bc2051d96f65364866b42a426b7\":\"0xd23058bf2f26120000\",\"0xd78f84e38944a0e0255faece48ba4950d4bd39d2\":\"0x10f0cf064dd59200000\",\"0xd79483f6a8444f2549d611afe02c432d15e11051\":\"0x1158e460913d00000\",\"0xd79835e404fb86bf845fba090d6ba25e0c8866a6\":\"0x821ab0d44149800000\",\"0xd79aff13ba2da75d46240cac0a2467c656949823\":\"0x5dc892aa1131c80000\",\"0xd79db5ab43621a7a3da795e58929f3dd25af67d9\":\"0x6c6acc67d7b1d40000\",\"0xd7a1431ee453d1e49a0550d1256879b4f5d10201\":\"0x5a87e7d7f5f6580000\",\"0xd7ad09c6d32657685355b5c6ec8e9f57b4ebb982\":\"0x6acb3df27e1f880000\",\"0xd7b740dff8c457668fdf74f6a266bfc1dcb723f9\":\"0x1158e460913d00000\",\"0xd7c2803ed7b0e0837351411a8e6637d168bc5b05\":\"0x641daf5c91bd9358000\",\"0xd7c6265dea11876c903b718e4cd8ab24fe265bde\":\"0x6c6b935b8bbd400000\",\"0xd7ca7fdcfebe4588eff5421d1522b61328df7bf3\":\"0xd8e6001e6c302b0000\",\"0xd7cdbd41fff20df727c70b6255c1ba7606055468\":\"0xad78ebc5ac6200000\",\"0xd7d157e4c0a96437a6d285741dd23ec4361fa36b\":\"0x6c6b935b8bbd400000\",\"0xd7d2c6fca8ad1f75395210b57de5dfd673933909\":\"0x126e72a69a50d00000\",\"0xd7d3c75920590438b82c3e9515be2eb6ed7a8b1a\":\"0xcb49b44ba602d800000\",\"0xd7d7f2caa462a41b3b30a34aeb3ba61010e2626f\":\"0x6c6b935b8bbd400000\",\"0xd7e74afdbad55e96cebc5a374f2c8b768680f2b0\":\"0x55de6a779bbac0000\",\"0xd7eb903162271c1afa35fe69e37322c8a4d29b11\":\"0x21e19e0c9bab2400000\",\"0xd7ebddb9f93987779b680155375438db65afcb6a\":\"0x5741afeff944c0000\",\"0xd7ef340e66b0d7afcce20a19cb7bfc81da33d94e\":\"0xa2a15d09519be00000\",\"0xd7f370d4bed9d57c6f49c999de729ee569d3f4e4\":\"0xad78ebc5ac6200000\",\"0xd7fa5ffb6048f96fb1aba09ef87b1c11dd7005e4\":\"0x3635c9adc5dea00000\",\"0xd8069f84b521493f4715037f3226b25f33b60586\":\"0x678a932062e4180000\",\"0xd815e1d9f4e2b5e57e34826b7cfd8881b8546890\":\"0xf015f25736420000\",\"0xd81bd54ba2c44a6f6beb1561d68b80b5444e6dc6\":\"0x3f170d7ee43c430000\",\"0xd82251456dc1380f8f5692f962828640ab9f2a03\":\"0x1088b53b2c202be0000\",\"0xd82c6fedbdac98af2eed10b00f32b00056ca5a6d\":\"0xad78ebc5ac6200000\",\"0xd82fd9fdf6996bedad2843159c06f37e0924337d\":\"0x5b8ccedc5aa7b00000\",\"0xd83ad260e9a6f432fb6ea28743299b4a09ad658c\":\"0x6c6b935b8bbd400000\",\"0xd843ee0863ce933e22f89c802d31287b9671e81c\":\"0xb98bc829a6f90000\",\"0xd84b922f7841fc5774f00e14604ae0df42c8551e\":\"0xd96fce90cfabcc0000\",\"0xd855b03ccb029a7747b1f07303e0a664793539c8\":\"0x6c6b935b8bbd400000\",\"0xd85fdeaf2a61f95db902f9b5a53c9b8f9266c3ac\":\"0x6cf65a7e9047280000\",\"0xd8715ef9176f850b2e30eb8e382707f777a6fbe9\":\"0x6c6b935b8bbd400000\",\"0xd874b9dfae456a929ba3b1a27e572c9b2cecdfb3\":\"0x93739534d28680000\",\"0xd8930a39c77357c30ad3a060f00b06046331fd62\":\"0x2c73c937742c500000\",\"0xd89bc271b27ba3ab6962c94a559006ae38d5f56a\":\"0x6c6b935b8bbd400000\",\"0xd8b77db9b81bbe90427b62f702b201ffc29ff618\":\"0x326d1e4396d45c0000\",\"0xd8cd64e0284eec53aa4639afc4750810b97fab56\":\"0x1158e460913d00000\",\"0xd8d64384249b776794063b569878d5e3b530a4b2\":\"0x9a043d0b2f9568000\",\"0xd8d65420c18c2327cc5af97425f857e4a9fd51b3\":\"0x5f68e8131ecf800000\",\"0xd8e5c9675ef4deed266b86956fc4590ea7d4a27d\":\"0x3635c9adc5dea00000\",\"0xd8e8474292e7a051604ca164c0707783bb2885e8\":\"0x2d4ca05e2b43ca80000\",\"0xd8eb78503ec31a54a90136781ae109004c743257\":\"0x3635c9adc5dea00000\",\"0xd8eef4cf4beb01ee20d111748b61cb4d3f641a01\":\"0x9489237adb9a500000\",\"0xd8f4bae6f84d910d6d7d5ac914b1e68372f94135\":\"0x56bc75e2d63100000\",\"0xd8f62036f03b7635b858f1103f8a1d9019a892b6\":\"0x2b5e3af16b1880000\",\"0xd8f665fd8cd5c2bcc6ddc0a8ae521e4dc6aa6060\":\"0x5c283d410394100000\",\"0xd8f9240c55cff035523c6d5bd300d370dc8f0c95\":\"0xf732b66015a540000\",\"0xd8f94579496725b5cb53d7985c989749aff849c0\":\"0x39992648a23c8a00000\",\"0xd8fdf546674738c984d8fab857880b3e4280c09e\":\"0x1158e460913d00000\",\"0xd8fe088fffce948f5137ee23b01d959e84ac4223\":\"0xc5b54a94fc0170000\",\"0xd90f3009db437e4e11c780bec8896f738d65ef0d\":\"0xd8d726b7177a800000\",\"0xd9103bb6b67a55a7fece2d1af62d457c2178946d\":\"0x3635c9adc5dea00000\",\"0xd913f0771949753c4726acaa2bd3619c5c20ff77\":\"0xa2a15d09519be00000\",\"0xd91d889164479ce436ece51763e22cda19b22d6b\":\"0xb66d88126800880000\",\"0xd929c65d69d5bbaea59762662ef418bc21ad924a\":\"0x3635c9adc5dea00000\",\"0xd930b27a78876485d0f48b70dd5336549679ca8f\":\"0x22b1c8c1227a00000\",\"0xd931ac2668ba6a84481ab139735aec14b7bfbabf\":\"0x6c6b935b8bbd400000\",\"0xd9383d4b6d17b3f9cd426e10fb944015c0d44bfb\":\"0x2b5e3af16b18800000\",\"0xd942de4784f7a48716c0fd4b9d54a6e54c5f2f3e\":\"0x43c33c1937564800000\",\"0xd944c8a69ff2ca1249690c1229c7192f36251062\":\"0x6acb3df27e1f880000\",\"0xd94a57882a52739bbe2a0647c80c24f58a2b4f1c\":\"0x48b54e2adbe12b0000\",\"0xd95342953c8a21e8b635eefac7819bea30f17047\":\"0x13f06c7ffef05d400000\",\"0xd95c90ffbe5484864780b867494a83c89256d6e4\":\"0x58e7926ee858a00000\",\"0xd96711540e2e998343d4f590b6fc8fac3bb8b31d\":\"0x5f5a4068b71cb00000\",\"0xd96ac2507409c7a383ab2eee1822a5d738b36b56\":\"0xad78ebc5ac6200000\",\"0xd96db33b7b5a950c3efa2dc31b10ba10a532ef87\":\"0x6c6b935b8bbd400000\",\"0xd9775965b716476675a8d513eb14bbf7b07cd14a\":\"0x1132e6d2d23c5e40000\",\"0xd97bc84abd47c05bbf457b2ef659d61ca5e5e48f\":\"0x69d17119dc5a80000\",\"0xd97f4526dea9b163f8e8e33a6bcf92fb907de6ec\":\"0xf654aaf4db2f00000\",\"0xd97fe6f53f2a58f6d76d752adf74a8a2c18e9074\":\"0x10cdf9b69a43570000\",\"0xd99999a2490d9494a530cae4daf38554f4dd633e\":\"0x68155a43676e00000\",\"0xd99df7421b9382e42c89b006c7f087702a0757c0\":\"0x1a055690d9db800000\",\"0xd9b783d31d32adc50fa3eacaa15d92b568eaeb47\":\"0x733af90374c1b280000\",\"0xd9d370fec63576ab15b318bf9e58364dc2a3552a\":\"0x56bc75e2d63100000\",\"0xd9d42fd13ebd4bf69cac5e9c7e82483ab46dd7e9\":\"0x121ea68c114e5100000\",\"0xd9e27eb07dfc71a706060c7f079238ca93e88539\":\"0x3635c9adc5dea00000\",\"0xd9e3857efd1e202a441770a777a49dcc45e2e0d3\":\"0xc1daf81d8a3ce0000\",\"0xd9ec2efe99ff5cf00d03a8317b92a24aef441f7e\":\"0x6c6b935b8bbd400000\",\"0xd9ec8fe69b7716c0865af888a11b2b12f720ed33\":\"0xd8d726b7177a800000\",\"0xd9f1b26408f0ec67ad1d0d6fe22e8515e1740624\":\"0x14d1120d7b1600000\",\"0xd9f547f2c1de0ed98a53d161df57635dd21a00bd\":\"0x556f64c1fe7fa0000\",\"0xd9ff115d01266c9f73b063c1c238ef3565e63b36\":\"0x24dce54d34a1a00000\",\"0xda06044e293c652c467fe74146bf185b21338a1c\":\"0x3635c9adc5dea00000\",\"0xda0b48e489d302b4b7bf204f957c1c9be383b0df\":\"0x6c6b935b8bbd400000\",\"0xda0d4b7ef91fb55ad265f251142067f10376ced6\":\"0x43c33c1937564800000\",\"0xda10978a39a46ff0bb848cf65dd9c77509a6d70e\":\"0x6c6b935b8bbd400000\",\"0xda16dd5c3d1a2714358fe3752cae53dbab2be98c\":\"0x41bad155e6512200000\",\"0xda214c023e2326ff696c00393168ce46ffac39ec\":\"0x3635c9adc5dea00000\",\"0xda2a14f9724015d79014ed8e5909681d596148f1\":\"0x2a10f0f8a91ab8000\",\"0xda2ad58e77deddede2187646c465945a8dc3f641\":\"0x23c757072b8dd00000\",\"0xda3017c150dd0dce7fcf881b0a48d0d1c756c4c7\":\"0x56bf91b1a65eb0000\",\"0xda34b2eae30bafe8daeccde819a794cd89e09549\":\"0x6c6b935b8bbd400000\",\"0xda4a5f557f3bab390a92f49b9b900af30c46ae80\":\"0x21e19e0c9bab2400000\",\"0xda505537537ffb33c415fec64e69bae090c5f60f\":\"0x8ac7230489e800000\",\"0xda698d64c65c7f2b2c7253059cd3d181d899b6b7\":\"0x1004e2e45fb7ee0000\",\"0xda7732f02f2e272eaf28df972ecc0ddeed9cf498\":\"0xb20bfbf6967890000\",\"0xda7ad025ebde25d22243cb830ea1d3f64a566323\":\"0x1b1ae4d6e2ef500000\",\"0xda855d53477f505ec4c8d5e8bb9180d38681119c\":\"0x12f939c99edab800000\",\"0xda875e4e2f3cabe4f37e0eaed7d1f6dcc6ffef43\":\"0x6c6b935b8bbd400000\",\"0xda8bbee182e455d2098acb338a6d45b4b17ed8b6\":\"0x6c6b935b8bbd400000\",\"0xda982e9643ffece723075a40fe776e5ace04b29b\":\"0x8b8b6c9999bf20000\",\"0xda9f55460946d7bfb570ddec757ca5773b58429a\":\"0x1b845d769eb4480000\",\"0xdaa1bd7a9148fb865cd612dd35f162861d0f3bdc\":\"0xa638ab72d92c138000\",\"0xdaa63cbda45dd487a3f1cd4a746a01bb5e060b90\":\"0x10416d9b02a89240000\",\"0xdaa776a6754469d7b9267a89b86725e740da0fa0\":\"0x6acb3df27e1f880000\",\"0xdaac91c1e859d5e57ed3084b50200f9766e2c52b\":\"0x15af1d78b58c400000\",\"0xdaacdaf42226d15cb1cf98fa15048c7f4ceefe69\":\"0x1043561a8829300000\",\"0xdab6bcdb83cf24a0ae1cb21b3b5b83c2f3824927\":\"0xa968163f0a57b400000\",\"0xdabb0889fc042926b05ef57b2520910abc4b4149\":\"0x6c6b935b8bbd400000\",\"0xdabc225042a6592cfa13ebe54efa41040878a5a2\":\"0xe11fad5d85ca30000\",\"0xdac0c177f11c5c3e3e78f2efd663d13221488574\":\"0x3635c9adc5dea00000\",\"0xdad136b88178b4837a6c780feba226b98569a94c\":\"0xad78ebc5ac6200000\",\"0xdadbfafd8b62b92a24efd75256dd83abdbd7bbdb\":\"0x11164759ffb320000\",\"0xdadc00ab7927603c2fcf31cee352f80e6c4d6351\":\"0x6c66e9a55378b80000\",\"0xdae0d33eaa341569fa9ff5982684854a4a328a6e\":\"0x3635c9adc5dea00000\",\"0xdae7201eab8c063302930d693929d07f95e71962\":\"0x91aec028b419810000\",\"0xdaedd4ad107b271e89486cbf80ebd621dd974578\":\"0x6c6b935b8bbd400000\",\"0xdb04fad9c49f9e880beb8fcf1d3a3890e4b3846f\":\"0x435ae6cc0c58e50000\",\"0xdb0cc78f74d9827bdc8a6473276eb84fdc976212\":\"0x6c6b935b8bbd400000\",\"0xdb1293a506e90cad2a59e1b8561f5e66961a6788\":\"0x6c6b935b8bbd400000\",\"0xdb19a3982230368f0177219cb10cb259cdb2257c\":\"0x6c6b935b8bbd400000\",\"0xdb23a6fef1af7b581e772cf91882deb2516fc0a7\":\"0xad78ebc5ac6200000\",\"0xdb244f97d9c44b158a40ed9606d9f7bd38913331\":\"0x58788cb94b1d80000\",\"0xdb288f80ffe232c2ba47cc94c763cf6fc9b82b0d\":\"0x49b9ca9a694340000\",\"0xdb2a0c9ab64df58ddfb1dbacf8ba0d89c85b31b4\":\"0xd8d726b7177a800000\",\"0xdb34745ede8576b499db01beb7c1ecda85cf4abe\":\"0x4563918244f400000\",\"0xdb3f258ab2a3c2cf339c4499f75a4bd1d3472e9e\":\"0x5150ae84a8cdf00000\",\"0xdb4bc83b0e6baadb1156c5cf06e0f721808c52c7\":\"0x2fb474098f67c00000\",\"0xdb63122de7037da4971531fae9af85867886c692\":\"0xf0425b0641f340000\",\"0xdb6c2a73dac7424ab0d031b66761122566c01043\":\"0xa2a15d09519be00000\",\"0xdb6e560c9bc620d4bea3a94d47f7880bf47f2d5f\":\"0x4da0fdfcf05760000\",\"0xdb6ff71b3db0928f839e05a7323bfb57d29c87aa\":\"0x3154c9729d05780000\",\"0xdb73460b59d8e85045d5e752e62559875e42502e\":\"0x36330322d5238c0000\",\"0xdb77b88dcb712fd17ee91a5b94748d720c90a994\":\"0x6c6b935b8bbd400000\",\"0xdb7d4037081f6c65f9476b0687d97f1e044d0a1d\":\"0x23c757072b8dd00000\",\"0xdb882eacedd0eff263511b312adbbc59c6b8b25b\":\"0x1ed4fde7a2236b00000\",\"0xdb9371b30c4c844e59e03e924be606a938d1d310\":\"0x6c6b935b8bbd400000\",\"0xdba4796d0ceb4d3a836b84c96f910afc103f5ba0\":\"0x908f493f737410000\",\"0xdbadc61ed5f0460a7f18e51b2fb2614d9264a0e0\":\"0x22b1c8c1227a00000\",\"0xdbb6ac484027041642bbfd8d80f9d0c1cf33c1eb\":\"0x6c6b935b8bbd400000\",\"0xdbbcbb79bf479a42ad71dbcab77b5adfaa872c58\":\"0x5dc892aa1131c80000\",\"0xdbc1ce0e49b1a705d22e2037aec878ee0d75c703\":\"0xd8d726b7177a80000\",\"0xdbc1d0ee2bab531140de137722cd36bdb4e47194\":\"0xad78ebc5ac6200000\",\"0xdbc59ed88973dead310884223af49763c05030f1\":\"0x1158e460913d00000\",\"0xdbc66965e426ff1ac87ad6eb78c1d95271158f9f\":\"0xfc936392801c0000\",\"0xdbcbcd7a57ea9db2349b878af34b1ad642a7f1d1\":\"0xad78ebc5ac6200000\",\"0xdbd51cdf2c3bfacdff106221de2e19ad6d420414\":\"0x5f68e8131ecf800000\",\"0xdbd71efa4b93c889e76593de609c3b04cbafbe08\":\"0x1158e460913d00000\",\"0xdbf5f061a0f48e5e69618739a77d2ec19768d201\":\"0x83d6c7aab63600000\",\"0xdbf8b13967f55125272de0562536c450ba5655a0\":\"0x6ef578f06e0ccb0000\",\"0xdbfb1bb464b8a58e500d2ed8de972c45f5f1c0fb\":\"0x56bc75e2d631000000\",\"0xdc067ed3e12d711ed475f5156ef7e71a80d934b9\":\"0x205b4dfa1ee74780000\",\"0xdc087f9390fb9e976ac23ab689544a0942ec2021\":\"0x62a992e53a0af00000\",\"0xdc1eb9b6e64351f56424509645f83e79eee76cf4\":\"0xd8d726b7177a800000\",\"0xdc1f1979615f082140b8bb78c67b27a1942713b1\":\"0x340aad21b3b700000\",\"0xdc23b260fcc26e7d10f4bd044af794579460d9da\":\"0x1b1b6bd7af64c70000\",\"0xdc29119745d2337320da51e19100c948d980b915\":\"0x8ac7230489e800000\",\"0xdc2d15a69f6bb33b246aef40450751c2f6756ad2\":\"0x6c341080bd1fb00000\",\"0xdc3dae59ed0fe18b58511e6fe2fb69b219689423\":\"0x56bc75e2d63100000\",\"0xdc3f0e7672f71fe7525ba30b9755183a20b9166a\":\"0x2089cf57b5b3e968000\",\"0xdc4345d6812e870ae90c568c67d2c567cfb4f03c\":\"0x16b352da5e0ed300000\",\"0xdc44275b1715baea1b0345735a29ac42c9f51b4f\":\"0x3f19beb8dd1ab00000\",\"0xdc46c13325cd8edf0230d068896486f007bf4ef1\":\"0x487a9a304539440000\",\"0xdc51b2dc9d247a1d0e5bc36ca3156f7af21ff9f6\":\"0x3635c9adc5dea00000\",\"0xdc5305b4020a06b49d657c7ca34c35c91c5f2c56\":\"0x17df6c10dbeba970000\",\"0xdc57345b38e0f067c9a31d9deac5275a10949321\":\"0xad78ebc5ac6200000\",\"0xdc57477dafa42f705c7fe40eae9c81756e0225f1\":\"0x1b1b8128a7416e0000\",\"0xdc5f5ad663a6f263327d64cac9cb133d2c960597\":\"0x6c6b935b8bbd400000\",\"0xdc703a5f3794c84d6cb3544918cae14a35c3bd4f\":\"0x6449e84e47a8a80000\",\"0xdc738fb217cead2f69594c08170de1af10c419e3\":\"0x152d02c7e14af6800000\",\"0xdc76e85ba50b9b31ec1e2620bce6e7c8058c0eaf\":\"0x1158e460913d00000\",\"0xdc83b6fd0d512131204707eaf72ea0c8c9bef976\":\"0x6c6b935b8bbd400000\",\"0xdc8c2912f084a6d184aa73638513ccbc326e0102\":\"0x4633bc36cbc2dc0000\",\"0xdc911cf7dc5dd0813656670528e9338e67034786\":\"0x6c6b935b8bbd400000\",\"0xdcb03bfa6c1131234e56b7ea7c4f721487546b7a\":\"0x487a9a304539440000\",\"0xdcb64df43758c7cf974fa660484fbb718f8c67c1\":\"0x43c33c1937564800000\",\"0xdcc52d8f8d9fc742a8b82767f0555387c563efff\":\"0x1b1ae4d6e2ef500000\",\"0xdccb370ed68aa922283043ef7cad1b9d403fc34a\":\"0xd8d726b7177a800000\",\"0xdccca42045ec3e16508b603fd936e7fd7de5f36a\":\"0x11164759ffb320000\",\"0xdcd10c55bb854f754434f1219c2c9a98ace79f03\":\"0xd8d8583fa2d52f0000\",\"0xdcd5bca2005395b675fde5035659b26bfefc49ee\":\"0xaadec983fcff40000\",\"0xdcdbbd4e2604e40e1710cc6730289dccfad3892d\":\"0xf95dd2ec27cce00000\",\"0xdce30c31f3ca66721ecb213c809aab561d9b52e4\":\"0x6c6b935b8bbd400000\",\"0xdcf33965531380163168fc11f67e89c6f1bc178a\":\"0x122776853406b08000\",\"0xdcf6b657266e91a4dae6033ddac15332dd8d2b34\":\"0x5f68e8131ecf800000\",\"0xdcf9719be87c6f46756db4891db9b611d2469c50\":\"0x3635c9adc5dea00000\",\"0xdcfff3e8d23c2a34b56bd1b3bd45c79374432239\":\"0x10f0cf064dd59200000\",\"0xdd04eee74e0bf30c3f8d6c2c7f52e0519210df93\":\"0x4563918244f400000\",\"0xdd26b429fd43d84ec179825324bad5bfb916b360\":\"0x116bf95bc8432980000\",\"0xdd2a233adede66fe1126d6c16823b62a021feddb\":\"0x6c6b935b8bbd400000\",\"0xdd2bdfa917c1f310e6fa35aa8af16939c233cd7d\":\"0x15af1d78b58c400000\",\"0xdd35cfdbcb993395537aecc9f59085a8d5ddb6f5\":\"0x3635c9adc5dea00000\",\"0xdd47189a3e64397167f0620e484565b762bfbbf4\":\"0x6449e84e47a8a80000\",\"0xdd4dd6d36033b0636fcc8d0938609f4dd64f4a86\":\"0x340aad21b3b700000\",\"0xdd4f5fa2111db68f6bde3589b63029395b69a92d\":\"0x8963dd8c2c5e00000\",\"0xdd63042f25ed32884ad26e3ad959eb94ea36bf67\":\"0x484d7fde7d593f00000\",\"0xdd65f6e17163b5d203641f51cc7b24b00f02c8fb\":\"0xad78ebc5ac6200000\",\"0xdd6c062193eac23d2fdbf997d5063a346bb3b470\":\"0x1158e460913d00000\",\"0xdd7bcda65924aaa49b80984ae173750258b92847\":\"0x21e19e0c9bab2400000\",\"0xdd7ff441ba6ffe3671f3c0dabbff1823a5043370\":\"0x6c6b935b8bbd400000\",\"0xdd8254121a6e942fc90828f2431f511dad7f32e6\":\"0xa39b29e1f360e80000\",\"0xdd8af9e7765223f4446f44d3d509819a3d3db411\":\"0x21e19e0c9bab2400000\",\"0xdd95dbe30f1f1877c5dd7684aeef302ab6885192\":\"0x1c5d8d6eb3e32500000\",\"0xdd967c4c5f8ae47e266fb416aad1964ee3e7e8c3\":\"0x1a420db02bd7d580000\",\"0xdd9b485a3b1cd33a6a9c62f1e5bee92701856d25\":\"0xc3383ed031b7e8000\",\"0xdda371e600d30688d4710e088e02fdf2b9524d5f\":\"0x177224aa844c7200000\",\"0xdda4ed2a58a8dd20a73275347b580d71b95bf99a\":\"0x15a13cc201e4dc0000\",\"0xdda4ff7de491c687df4574dd1b17ff8f246ba3d1\":\"0x42684a41abfd8400000\",\"0xddab6b51a9030b40fb95cf0b748a059c2417bec7\":\"0x6c6b935b8bbd400000\",\"0xddab75fb2ff9fecb88f89476688e2b00e367ebf9\":\"0x41bad155e6512200000\",\"0xddabf13c3c8ea4e3d73d78ec717afafa430e5479\":\"0x8cf23f909c0fa000000\",\"0xddac312a9655426a9c0c9efa3fd82559ef4505bf\":\"0x15be6174e1912e0000\",\"0xddac6bf4bbdd7d597d9c686d0695593bedccc7fa\":\"0x2ee449550898e40000\",\"0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a\":\"0x21e19e0c9bab2400000\",\"0xddbddd1bbd38ffade0305d30f02028d92e9f3aa8\":\"0x6c6b935b8bbd400000\",\"0xddbee6f094eae63420b003fb4757142aea6cd0fd\":\"0x6c6b935b8bbd400000\",\"0xddd69c5b9bf5eb5a39cee7c3341a120d973fdb34\":\"0x6bc14b8f8e1b350000\",\"0xdddd7b9e6eab409b92263ac272da801b664f8a57\":\"0x69e10de76676d0800000\",\"0xdde670d01639667576a22dd05d3246d61f06e083\":\"0x1731790534df20000\",\"0xdde77a4740ba08e7f73fbe3a1674912931742eeb\":\"0x434fe4d4382f1d48000\",\"0xdde8f0c31b7415511dced1cd7d46323e4bd12232\":\"0x57473d05dabae80000\",\"0xdde969aef34ea87ac299b7597e292b4a0155cc8a\":\"0x1032f2594a01738000\",\"0xddf0cce1fe996d917635f00712f4052091dff9ea\":\"0x6c6b935b8bbd400000\",\"0xddf3ad76353810be6a89d731b787f6f17188612b\":\"0x43c33c1937564800000\",\"0xddf5810a0eb2fb2e32323bb2c99509ab320f24ac\":\"0x3ca5c66d9bc44300000\",\"0xddf95c1e99ce2f9f5698057c19d5c94027ee4a6e\":\"0x14542ba12a337c00000\",\"0xddfafdbc7c90f1320e54b98f374617fbd01d109f\":\"0xb98bc829a6f90000\",\"0xddfcca13f934f0cfbe231da13039d70475e6a1d0\":\"0x3638221660a5aa8000\",\"0xde027efbb38503226ed871099cb30bdb02af1335\":\"0x3635c9adc5dea00000\",\"0xde06d5ea777a4eb1475e605dbcbf43444e8037ea\":\"0xa968163f0a57b400000\",\"0xde07fb5b7a464e3ba7fbe09e9acb271af5338c58\":\"0x2b5e3af16b1880000\",\"0xde1121829c9a08284087a43fbd2fc1142a3233b4\":\"0x3635c9adc5dea00000\",\"0xde176b5284bcee3a838ba24f67fc7cbf67d78ef6\":\"0x209ce08c962b00000\",\"0xde212293f8f1d231fa10e609470d512cb8ffc512\":\"0x6c6b935b8bbd400000\",\"0xde30e49e5ab313214d2f01dcabce8940b81b1c76\":\"0xaadec983fcff40000\",\"0xde33d708a3b89e909eaf653b30fdc3a5d5ccb4b3\":\"0x99c88229fd4c20000\",\"0xde374299c1d07d79537385190f442ef9ca24061f\":\"0x73f75d1a085ba0000\",\"0xde42fcd24ce4239383304367595f068f0c610740\":\"0x2722a70f1a9a00000\",\"0xde50868eb7e3c71937ec73fa89dd8b9ee10d45aa\":\"0x3635c9adc5dea00000\",\"0xde55de0458f850b37e4d78a641dd2eb2dd8f38ce\":\"0xd8d726b7177a800000\",\"0xde5b005fe8daae8d1f05de3eda042066c6c4691c\":\"0x3ba1910bf341b00000\",\"0xde612d0724e84ea4a7feaa3d2142bd5ee82d3201\":\"0x1158e460913d00000\",\"0xde6d363106cc6238d2f092f0f0372136d1cd50c6\":\"0x121ea68c114e5100000\",\"0xde7dee220f0457a7187d56c1c41f2eb00ac56021\":\"0x2225f39c85052a0000\",\"0xde82cc8d4a1bb1d9434392965b3e80bad3c03d4f\":\"0x50186e75de97a60000\",\"0xde97f4330700b48c496d437c91ca1de9c4b01ba4\":\"0x9dcc0515b56e0c0000\",\"0xde9eff4c798811d968dccb460d9b069cf30278e0\":\"0x15af1d78b58c400000\",\"0xdeb1bc34d86d4a4dde2580d8beaf074eb0e1a244\":\"0x55a6e79ccd1d300000\",\"0xdeb2495d6aca7b2a6a2d138b6e1a42e2dc311fdd\":\"0x6c6b935b8bbd400000\",\"0xdeb97254474c0d2f5a7970dcdb2f52fb1098b896\":\"0x3635c9adc5dea00000\",\"0xdeb9a49a43873020f0759185e20bbb4cf381bb8f\":\"0xb78edb0bf2e5e0000\",\"0xdebbdd831e0f20ae6e378252decdf92f7cf0c658\":\"0x6c6b935b8bbd400000\",\"0xdec3eec2640a752c466e2b7e7ee685afe9ac41f4\":\"0x47c99753596b288000\",\"0xdec82373ade8ebcf2acb6f8bc2414dd7abb70d77\":\"0xad78ebc5ac6200000\",\"0xdec8a1a898f1b895d8301fe64ab3ad5de941f689\":\"0x2ab4f67e8a730f8000\",\"0xdec99e972fca7177508c8e1a47ac22d768acab7c\":\"0x6c6b935b8bbd400000\",\"0xded877378407b94e781c4ef4af7cfc5bc220b516\":\"0x143179d86911020000\",\"0xdee942d5caf5fac11421d86b010b458e5c392990\":\"0xd8d726b7177a800000\",\"0xdeee2689fa9006b59cf285237de53b3a7fd01438\":\"0x186579f29e20250000\",\"0xdefddfd59b8d2c154eecf5c7c167bf0ba2905d3e\":\"0x512cb5e2647420000\",\"0xdefe9141f4704599159d7b223de42bffd80496b3\":\"0x56bc75e2d63100000\",\"0xdf098f5e4e3dffa51af237bda8652c4f73ed9ca6\":\"0x1b36a6444a3e180000\",\"0xdf0d08617bd252a911df8bd41a39b83ddf809673\":\"0x21e19e0c9bab2400000\",\"0xdf0ff1f3d27a8ec9fb8f6b0cb254a63bba8224a5\":\"0xecc5202945d0020000\",\"0xdf1fa2e20e31985ebe2c0f0c93b54c0fb67a264b\":\"0xad78ebc5ac6200000\",\"0xdf211cd21288d6c56fae66c3ff54625dd4b15427\":\"0x8786cd764e1f2c0000\",\"0xdf236bf6abf4f3293795bf0c28718f93e3b1b36b\":\"0x487a9a304539440000\",\"0xdf31025f5649d2c6eea41ed3bdd3471a790f759a\":\"0x1158e460913d00000\",\"0xdf37c22e603aedb60a627253c47d8ba866f6d972\":\"0x5150ae84a8cdf000000\",\"0xdf3b72c5bd71d4814e88a62321a93d4011e3578b\":\"0xd8d726b7177a800000\",\"0xdf3f57b8ee6434d047223def74b20f63f9e4f955\":\"0xd9462c6cb4b5a0000\",\"0xdf44c47fc303ac76e74f97194cca67b5bb3c023f\":\"0x2009c5c8bf6fdc0000\",\"0xdf47a61b72535193c561cccc75c3f3ce0804a20e\":\"0x15935c0b4e3d780000\",\"0xdf47a8ef95f2f49f8e6f58184154145d11f72797\":\"0x678a932062e4180000\",\"0xdf53003346d65c5e7a646bc034f2b7d32fcbe56a\":\"0x6c6b935b8bbd400000\",\"0xdf57353aaff2aadb0a04f9014e8da7884e86589c\":\"0x84886a66e4fb00000\",\"0xdf60f18c812a11ed4e2776e7a80ecf5e5305b3d6\":\"0x30ca024f987b900000\",\"0xdf6485c4297ac152b289b19dde32c77ec417f47d\":\"0x3635c9adc5dea00000\",\"0xdf660a91dab9f730f6190d50c8390561500756ca\":\"0x6c6b935b8bbd400000\",\"0xdf6ed6006a6abe886ed33d95a4de28fc12183927\":\"0x3154c9729d05780000\",\"0xdf8510793eee811c2dab1c93c6f4473f30fbef5b\":\"0x3635c9adc5dea00000\",\"0xdf8d48b1eb07b3c217790e6c2df04dc319e7e848\":\"0x1b1ae4d6e2ef500000\",\"0xdfa6b8b8ad3184e357da282951d79161cfb089bc\":\"0x15af1d78b58c400000\",\"0xdfaf31e622c03d9e18a0ddb8be60fbe3e661be0a\":\"0x21e171a3ec9f72c0000\",\"0xdfb1626ef48a1d7d7552a5e0298f1fc23a3b482d\":\"0x5ce895dd949efa0000\",\"0xdfb4d4ade52fcc818acc7a2c6bb2b00224658f78\":\"0x1a420db02bd7d580000\",\"0xdfbd4232c17c407a980db87ffbcda03630e5c459\":\"0x1dfc7f924923530000\",\"0xdfcbdf09454e1a5e4a40d3eef7c5cf1cd3de9486\":\"0xd8d726b7177a800000\",\"0xdfdbcec1014b96da2158ca513e9c8d3b9af1c3d0\":\"0x6c6b935b8bbd400000\",\"0xdfded2574b27d1613a7d98b715159b0d00baab28\":\"0x43c33c1937564800000\",\"0xdfdf43393c649caebe1bb18059decb39f09fb4e8\":\"0x15af1d78b58c400000\",\"0xdfe3c52a92c30396a4e33a50170dc900fcf8c9cf\":\"0x2b5e3af16b1880000\",\"0xdfe549fe8430e552c6d07cc3b92ccd43b12fb50f\":\"0x48875eaf6562a0000\",\"0xdfe929a61c1b38eddbe82c25c2d6753cb1e12d68\":\"0x15d1cf4176aeba0000\",\"0xdff1b220de3d8e9ca4c1b5be34a799bcded4f61c\":\"0x14e4e353ea39420000\",\"0xdff4007931786593b229efe5959f3a4e219e51af\":\"0x10afc1ade3b4ed40000\",\"0xdffcea5421ec15900c6ecfc777184e140e209e24\":\"0x115473824344e0000\",\"0xe001aba77c02e172086c1950fffbcaa30b83488f\":\"0x6acb3df27e1f880000\",\"0xe00484788db50fc6a48e379d123e508b0f6e5ab1\":\"0x3635c9adc5dea00000\",\"0xe0060462c47ff9679baef07159cae08c29f274a9\":\"0x6c6b935b8bbd400000\",\"0xe00d153b10369143f97f54b8d4ca229eb3e8f324\":\"0x83d6c7aab63600000\",\"0xe012db453827a58e16c1365608d36ed658720507\":\"0x6c6b935b8bbd400000\",\"0xe01547ba42fcafaf93938becf7699f74290af74f\":\"0x6c6b935b8bbd400000\",\"0xe016dc138e25815b90be3fe9eee8ffb2e105624f\":\"0x1b1ae4d6e2ef500000\",\"0xe01859f242f1a0ec602fa8a3b0b57640ec89075e\":\"0x1e162c177be5cc0000\",\"0xe020e86362b487752836a6de0bc02cd8d89a8b6a\":\"0x14542ba12a337c00000\",\"0xe023f09b2887612c7c9cf1988e3a3a602b3394c9\":\"0x6c6b935b8bbd400000\",\"0xe0272213e8d2fd3e96bd6217b24b4ba01b617079\":\"0x1158e460913d00000\",\"0xe02b74a47628be315b1f76b315054ad44ae9716f\":\"0xd8d726b7177a800000\",\"0xe03220c697bcd28f26ef0b74404a8beb06b2ba7b\":\"0x1b1ae4d6e2ef5000000\",\"0xe0352fdf819ba265f14c06a6315c4ac1fe131b2e\":\"0x3635c9adc5dea00000\",\"0xe0388aeddd3fe2ad56f85748e80e710a34b7c92e\":\"0x1b1ae4d6e2ef500000\",\"0xe03c00d00388ecbf4f263d0ac778bb41a57a40d9\":\"0x3636c9796436740000\",\"0xe04920dc6ecc1d6ecc084f88aa0af5db97bf893a\":\"0x9ddc1e3b901180000\",\"0xe04972a83ca4112bc871c72d4ae1616c2f0728db\":\"0xe81c77f29a32f0000\",\"0xe04ff5e5a7e2af995d8857ce0290b53a2b0eda5d\":\"0x3635c9adc5dea00000\",\"0xe05029aceb0778675bef1741ab2cd2931ef7c84b\":\"0x10f0dbae61009528000\",\"0xe056bf3ff41c26256fef51716612b9d39ade999c\":\"0x56be757a12e0a8000\",\"0xe061a4f2fc77b296d19ada238e49a5cb8ecbfa70\":\"0xd8d726b7177a800000\",\"0xe0663e8cd66792a641f56e5003660147880f018e\":\"0x6c6b935b8bbd400000\",\"0xe0668fa82c14d6e8d93a53113ef2862fa81581bc\":\"0x2f2f39fc6c54000000\",\"0xe069c0173352b10bf6834719db5bed01adf97bbc\":\"0x10634f8e5323b0000\",\"0xe06c29a81517e0d487b67fb0b6aabc4f57368388\":\"0x15be6174e1912e0000\",\"0xe06cb6294704eea7437c2fc3d30773b7bf38889a\":\"0x116dc3a8994b30000\",\"0xe07137ae0d116d033533c4eab496f8a9fb09569c\":\"0x4be4e7267b6ae00000\",\"0xe076db30ab486f79194ebbc45d8fab9a9242f654\":\"0x106607e3494baa00000\",\"0xe07ebbc7f4da416e42c8d4f842aba16233c12580\":\"0x6c6b935b8bbd400000\",\"0xe081ca1f4882db6043d5a9190703fde0ab3bf56d\":\"0x15af1d78b58c400000\",\"0xe083d34863e0e17f926b7928edff317e998e9c4b\":\"0x15af1d78b58c400000\",\"0xe08b9aba6bd9d28bc2056779d2fbf0f2855a3d9d\":\"0x6c6b935b8bbd400000\",\"0xe08bc29c2b48b169ff2bdc16714c586e6cb85ccf\":\"0x1158e460913d00000\",\"0xe08c60313106e3f9334fe6f7e7624d211130c077\":\"0x22b1c8c1227a00000\",\"0xe09c68e61998d9c81b14e4ee802ba7adf6d74cdb\":\"0xd8d726b7177a800000\",\"0xe09fea755aee1a44c0a89f03b5deb762ba33006f\":\"0x3ba289bc944ff70000\",\"0xe0a254ac09b9725bebc8e460431dd0732ebcabbf\":\"0x14542ba12a337c00000\",\"0xe0aa69365555b73f282333d1e30c1bbd072854e8\":\"0x17b7883c06916600000\",\"0xe0bad98eee9698dbf6d76085b7923de5754e906d\":\"0x90d972f32323c0000\",\"0xe0c4ab9072b4e6e3654a49f8a8db026a4b3386a9\":\"0x6c6b935b8bbd400000\",\"0xe0ce80a461b648a501fd0b824690c8868b0e4de8\":\"0x1b1ae4d6e2ef500000\",\"0xe0cf698a053327ebd16b7d7700092fe2e8542446\":\"0x52a34cbb61f578000\",\"0xe0d231e144ec9107386c7c9b02f1702ceaa4f700\":\"0x10f0dbae61009528000\",\"0xe0d76b7166b1f3a12b4091ee2b29de8caa7d07db\":\"0x6c6b935b8bbd400000\",\"0xe0e0b2e29dde73af75987ee4446c829a189c95bc\":\"0x813ca56906d340000\",\"0xe0e978753d982f7f9d1d238a18bd4889aefe451b\":\"0x20dd68aaf3289100000\",\"0xe0f372347c96b55f7d4306034beb83266fd90966\":\"0x15af1d78b58c400000\",\"0xe0f903c1e48ac421ab48528f3d4a2648080fe043\":\"0x3708baed3d68900000\",\"0xe0ff0bd9154439c4a5b7233e291d7d868af53f33\":\"0x1579216a51bbfb0000\",\"0xe10ac19c546fc2547c61c139f5d1f45a6666d5b0\":\"0x102da6fd0f73a3c0000\",\"0xe10c540088113fa6ec00b4b2c8824f8796e96ec4\":\"0x320f4509ab1ec7c00000\",\"0xe1173a247d29d8238df0922f4df25a05f2af77c3\":\"0x878c95d560f30478000\",\"0xe1203eb3a723e99c2220117ca6afeb66fa424f61\":\"0x200ef929e3256fe0000\",\"0xe131f87efc5ef07e43f0f2f4a747b551d750d9e6\":\"0x43c25e0dcc1bd1c0000\",\"0xe1334e998379dfe983177062791b90f80ee22d8d\":\"0x1b1ae4d6e2ef500000\",\"0xe13540ecee11b212e8b775dc8e71f374aae9b3f8\":\"0x6c6b935b8bbd400000\",\"0xe13b3d2bbfdcbc8772a23315724c1425167c5688\":\"0x37f379141ed04b8000\",\"0xe1443dbd95cc41237f613a48456988a04f683282\":\"0xd8d8583fa2d52f0000\",\"0xe14617f6022501e97e7b3e2d8836aa61f0ff2dba\":\"0xad78ebc5ac6200000\",\"0xe149b5726caf6d5eb5bf2acc41d4e2dc328de182\":\"0x692ae8897081d00000\",\"0xe154daeadb545838cbc6aa0c55751902f528682a\":\"0x10afc1ade3b4ed40000\",\"0xe16ce35961cd74bd590d04c4ad4a1989e05691c6\":\"0x7ea28327577080000\",\"0xe172dfc8f80cd1f8cd8539dc26082014f5a8e3e8\":\"0xa2a15d09519be00000\",\"0xe177e0c201d335ba3956929c571588b51c5223ae\":\"0x6c6b935b8bbd400000\",\"0xe17812f66c5e65941e186c46922b6e7b2f0eeb46\":\"0x62a992e53a0af00000\",\"0xe180de9e86f57bafacd7904f9826b6b4b26337a3\":\"0x2d041d705a2c600000\",\"0xe192489b85a982c1883246d915b229cb13207f38\":\"0x10f0cf064dd59200000\",\"0xe1953c6e975814c571311c34c0f6a99cdf48ab82\":\"0x2b5e3af16b1880000\",\"0xe1ae029b17e373cde3de5a9152201a14cac4e119\":\"0x56b55ae58ca400000\",\"0xe1b2aca154b8e0766c4eba30bc10c7f35036f368\":\"0x115473824344e0000\",\"0xe1b39b88d9900dbc4a6cdc481e1060080a8aec3c\":\"0x6c6b935b8bbd400000\",\"0xe1b63201fae1f129f95c7a116bd9dde5159c6cda\":\"0x4d60573a2f0c9ef0000\",\"0xe1bfaa5a45c504428923c4a61192a55b1400b45d\":\"0x90f534608a72880000\",\"0xe1c607c0a8a060da8f02a8eb38a013ea8cda5b8c\":\"0x2ba39e82ed5d740000\",\"0xe1cb83ec5eb6f1eeb85e99b2fc63812fde957184\":\"0x43c33c1937564800000\",\"0xe1d91b0954cede221d6f24c7985fc59965fb98b8\":\"0x6c6b935b8bbd400000\",\"0xe1dfb5cc890ee8b2877e885d267c256187d019e6\":\"0x56bc75e2d63100000\",\"0xe1e8c50b80a352b240ce7342bbfdf5690cc8cb14\":\"0x155bd9307f9fe80000\",\"0xe1f63ebbc62c7b7444040eb99623964f7667b376\":\"0x1158e460913d00000\",\"0xe206fb7324e9deb79e19903496d6961b9be56603\":\"0x56bc75e2d63100000\",\"0xe207578e1f4ddb8ff6d5867b39582d71b9812ac5\":\"0xd255d112e103a00000\",\"0xe208812a684098f3da4efe6aba256256adfe3fe6\":\"0x6c6b935b8bbd400000\",\"0xe20954d0f4108c82d4dcb2148d26bbd924f6dd24\":\"0x21e19e0c9bab2400000\",\"0xe20bb9f3966419e14bbbaaaa6789e92496cfa479\":\"0xbbd825030752760000\",\"0xe20d1bcb71286dc7128a9fc7c6ed7f733892eef5\":\"0x3664f8e7c24af40000\",\"0xe2191215983f33fd33e22cd4a2490054da53fddc\":\"0xdb44e049bb2c0000\",\"0xe2198c8ca1b399f7521561fd5384a7132fba486b\":\"0x3708baed3d68900000\",\"0xe21c778ef2a0d7f751ea8c074d1f812243863e4e\":\"0x11fc70e2c8c8ae18000\",\"0xe229e746a83f2ce253b0b03eb1472411b57e5700\":\"0x1369fb96128ac480000\",\"0xe22b20c77894463baf774cc256d5bddbbf7ddd09\":\"0x3635c9adc5dea00000\",\"0xe230fe1bff03186d0219f15d4c481b7d59be286a\":\"0x1fd741e8088970000\",\"0xe237baa4dbc9926e32a3d85d1264402d54db012f\":\"0x6c6b935b8bbd400000\",\"0xe24109be2f513d87498e926a286499754f9ed49e\":\"0x300ea8ad1f27ca0000\",\"0xe246683cc99db7c4a52bcbacaab0b32f6bfc93d7\":\"0x6c6b935b8bbd400000\",\"0xe25a167b031e84616d0f013f31bda95dcc6350b9\":\"0x23c757072b8dd000000\",\"0xe25b9f76b8ad023f057eb11ad94257a0862e4e8c\":\"0x6c6b935b8bbd400000\",\"0xe26657f0ed201ea2392c9222b80a7003608ddf30\":\"0x22b1c8c1227a00000\",\"0xe26bf322774e18288769d67e3107deb7447707b8\":\"0x6c6b935b8bbd400000\",\"0xe2728a3e8c2aaac983d05dc6877374a8f446eee9\":\"0xab640391201300000\",\"0xe28b062259e96eeb3c8d4104943f9eb325893cf5\":\"0x487a9a304539440000\",\"0xe28dbc8efd5e416a762ec0e018864bb9aa83287b\":\"0x531f200ab3e030a8000\",\"0xe2904b1aefa056398b6234cb35811288d736db67\":\"0x22b1c8c1227a00000\",\"0xe29d8ae452dcf3b6ac645e630409385551faae0a\":\"0x45a0da4adf5420000\",\"0xe2bbf84641e3541f6c33e6ed683a635a70bde2ec\":\"0x1b413cfcbf59b78000\",\"0xe2cf360aa2329eb79d2bf7ca04a27a17c532e4d8\":\"0x58788cb94b1d80000\",\"0xe2df23f6ea04becf4ab701748dc0963184555cdb\":\"0x6c6b935b8bbd400000\",\"0xe2e15c60dd381e3a4be25071ab249a4c5c5264da\":\"0x7f6bc49b81b5370000\",\"0xe2e26e4e1dcf30d048cc6ecf9d51ec1205a4e926\":\"0xd8d726b7177a800000\",\"0xe2ee691f237ee6529b6557f2fcdd3dcf0c59ec63\":\"0x127729c14687c200000\",\"0xe2efa5fca79538ce6068bf31d2c516d4d53c08e5\":\"0x71cc408df63400000\",\"0xe2efd0a9bc407ece03d67e8ec8e9d283f48d2a49\":\"0x299b33bf9c584e00000\",\"0xe2f40d358f5e3fe7463ec70480bd2ed398a7063b\":\"0x1158e460913d00000\",\"0xe2f9383d5810ea7b43182b8704b62b27f5925d39\":\"0x15af1d78b58c400000\",\"0xe2ff9ee4b6ecc14141cc74ca52a9e7a2ee14d908\":\"0x4be4e7267b6ae00000\",\"0xe30212b2011bb56bdbf1bc35690f3a4e0fd905ea\":\"0x1b2df9d219f57980000\",\"0xe303167f3d4960fe881b32800a2b4aeff1b088d4\":\"0x6c6b935b8bbd400000\",\"0xe304a32f05a83762744a9542976ff9b723fa31ea\":\"0x5572f240a346200000\",\"0xe308435204793764f5fcbe65eb510f5a744a655a\":\"0xad78ebc5ac6200000\",\"0xe309974ce39d60aadf2e69673251bf0e04760a10\":\"0xdc55fdb17647b0000\",\"0xe31b4eef184c24ab098e36c802714bd4743dd0d4\":\"0xad78ebc5ac6200000\",\"0xe321bb4a946adafdade4571fb15c0043d39ee35f\":\"0x556475382b4c9e0000\",\"0xe3263ce8af6db3e467584502ed7109125eae22a5\":\"0x6c6b935b8bbd400000\",\"0xe32b1c4725a1875449e98f970eb3e54062d15800\":\"0xad78ebc5ac6200000\",\"0xe32f95766d57b5cd4b173289d6876f9e64558194\":\"0x56bc75e2d63100000\",\"0xe33840d8bca7da98a6f3d096d83de78b70b71ef8\":\"0x6c6b935b8bbd400000\",\"0xe338e859fe2e8c15554848b75caecda877a0e832\":\"0x61acff81a78ad40000\",\"0xe33d980220fab259af6a1f4b38cf0ef3c6e2ea1a\":\"0x6c6b935b8bbd400000\",\"0xe33df4ce80ccb62a76b12bcdfcecc46289973aa9\":\"0x14542ba12a337c00000\",\"0xe33ff987541dde5cdee0a8a96dcc3f33c3f24cc2\":\"0x2a5a058fc295ed000000\",\"0xe3410bb7557cf91d79fa69d0dfea0aa075402651\":\"0x6c6b935b8bbd400000\",\"0xe341642d40d2afce2e9107c67079ac7a2660086c\":\"0x15af1d78b58c400000\",\"0xe35453eef2cc3c7a044d0ac134ba615908fa82ee\":\"0x7ff1ccb7561df0000\",\"0xe36a8ea87f1e99e8a2dc1b2608d166667c9dfa01\":\"0x56bc75e2d63100000\",\"0xe3712701619ca7623c55db3a0ad30e867db0168b\":\"0x1158e460913d00000\",\"0xe37f5fdc6ec97d2f866a1cfd0d3a4da4387b22b5\":\"0x21e19e0c9bab2400000\",\"0xe3878f91ca86053fced5444686a330e09cc388fb\":\"0xa844a7424d9c80000\",\"0xe38b91b35190b6d9deed021c30af094b953fdcaa\":\"0x1ceaf795b6b860000\",\"0xe38ef28a5ed984a7db24a1ae782dfb87f397dfc6\":\"0x7c0860e5a80dc0000\",\"0xe3925509c8d0b2a6738c5f6a72f35314491248ce\":\"0x36e9a8669a44768000\",\"0xe3933d61b77dcdc716407f8250bc91e4ffaeb09d\":\"0x1256986c95891c200000\",\"0xe3951de5aefaf0458768d774c254f7157735e505\":\"0x56c95de8e8ca1d0000\",\"0xe399c81a1d701b44f0b66f3399e66b275aaaf8c1\":\"0x3635c9adc5dea00000\",\"0xe39b11a8ab1ff5e22e5ae6517214f73c5b9b55dc\":\"0x6c6b935b8bbd400000\",\"0xe39e46e15d22ce56e0c32f1877b7d1a264cf94f3\":\"0x43c33c1937564800000\",\"0xe3a4621b66004588e31206f718cb00a319889cf0\":\"0x6c6b935b8bbd400000\",\"0xe3a4f83c39f85af9c8b1b312bfe5fc3423afa634\":\"0x18d993f34aef10000\",\"0xe3a89a1927cc4e2d43fbcda1e414d324a7d9e057\":\"0xb23e2a936dec60000\",\"0xe3ab3ca9b870e3f548517306bba4de2591afafc2\":\"0x410e34aecc8cd30000\",\"0xe3b3d2c9bf570be6a2f72adca1862c310936a43c\":\"0x56d2aa3a5c09a0000\",\"0xe3c0c128327a9ad80148139e269773428e638cb0\":\"0x6c6b935b8bbd400000\",\"0xe3c812737ac606baf7522ad817428a36050e7a34\":\"0x692ae8897081d00000\",\"0xe3cffe239c64e7e20388e622117391301b298696\":\"0x1b1ae4d6e2ef500000\",\"0xe3d3eaa299887865569e88be219be507189be1c9\":\"0x18ba6fa92e93160000\",\"0xe3d8bf4efe84b1616d1b89e427ddc6c8830685ae\":\"0x6c6b935b8bbd400000\",\"0xe3d915eda3b825d6ee4af9328d32ac18ada35497\":\"0x1b1ae4d6e2ef500000\",\"0xe3da4f3240844c9b6323b4996921207122454399\":\"0x27190a952df4be58000\",\"0xe3eb2c0a132a524f72ccc0d60fee8b41685d39e2\":\"0x6acb3df27e1f880000\",\"0xe3ec18a74ed43855409a26ade7830de8e42685ef\":\"0x11164759ffb320000\",\"0xe3ece1f632711d13bfffa1f8f6840871ee58fb27\":\"0xd8d726b7177a800000\",\"0xe3f80b40fb83fb97bb0d5230af4f6ed59b1c7cc8\":\"0x487a9a304539440000\",\"0xe3ffb02cb7d9ea5243701689afd5d417d7ed2ece\":\"0x43a77aabd00780000\",\"0xe400d651bb3f2d23d5f849e6f92d9c5795c43a8a\":\"0x90f534608a72880000\",\"0xe406f5dd72cab66d8a6ecbd6bfb494a7b6b09afe\":\"0x56bc75e2d63100000\",\"0xe408aa99835307eea4a6c5eb801fe694117f707d\":\"0x1b1ae4d6e2ef500000\",\"0xe408fceaa1b98f3c640f48fcba39f056066d6308\":\"0x21e19e0c9bab2400000\",\"0xe40a7c82e157540a0b00901dbb86c716e1a062da\":\"0x2b31d2425f6740000\",\"0xe41aea250b877d423a63ba2bce2f3a61c0248d56\":\"0xe18398e7601900000\",\"0xe430c0024fdbf73a82e21fccf8cbd09138421c21\":\"0xd8d726b7177a800000\",\"0xe4324912d64ea3aef76b3c2ff9df82c7e13ae991\":\"0x6c6b935b8bbd400000\",\"0xe4368bc1420b35efda95fafbc73090521916aa34\":\"0xd8d726b7177a800000\",\"0xe437acbe0f6227b0e36f36e4bcf7cf613335fb68\":\"0xad78ebc5ac6200000\",\"0xe44b7264dd836bee8e87970340ed2b9aed8ed0a5\":\"0x138e7faa01a803a0000\",\"0xe44ea51063405154aae736be2bf1ee3b9be639ae\":\"0xd8d726b7177a800000\",\"0xe4625501f52b7af52b19ed612e9d54fdd006b492\":\"0xb5a905a56ddd00000\",\"0xe4715956f52f15306ee9506bf82bccc406b3895e\":\"0xee79d4f48c5000000\",\"0xe47fbaed99fc209962604ebd20e240f74f4591f1\":\"0x6c6b935b8bbd400000\",\"0xe482d255ede56b04c3e8df151f56e9ca62aaa8c2\":\"0x1b1ae4d6e2ef500000\",\"0xe48e65125421880d42bdf1018ab9778d96928f3f\":\"0xe3aeb5737240a00000\",\"0xe492818aa684e5a676561b725d42f3cc56ae5198\":\"0x2b5e3af16b18800000\",\"0xe49936a92a8ccf710eaac342bc454b9b14ebecb1\":\"0x6c6b935b8bbd400000\",\"0xe49af4f34adaa2330b0e49dc74ec18ab2f92f827\":\"0x6c6b935b8bbd400000\",\"0xe49ba0cd96816c4607773cf8a5970bb5bc16a1e6\":\"0x5a87e7d7f5f6580000\",\"0xe4a47e3933246c3fd62979a1ea19ffdf8c72ef37\":\"0x809b383ea7d7e8000\",\"0xe4b6ae22c7735f5b89f34dd77ad0975f0acc9181\":\"0x3635c9adc5dea00000\",\"0xe4ca0a5238564dfc91e8bf22bade2901619a1cd4\":\"0x3635c9adc5dea00000\",\"0xe4cafb727fb5c6b70bb27533b8a9ccc9ef6888e1\":\"0x10497bf4af4caf8000\",\"0xe4dc22ed595bf0a337c01e03cc6be744255fc9e8\":\"0xa5aa85009e39c0000\",\"0xe4fb26d1ca1eecba3d8298d9d148119ac2bbf580\":\"0x15af1d78b58c400000\",\"0xe4fc13cfcbac1b17ce7783acd423a845943f6b3a\":\"0x1158e460913d00000\",\"0xe50b464ac9de35a5618b7cbf254674182b81b97e\":\"0xde42ee1544dd900000\",\"0xe5102c3b711b810344197419b1cd8a7059f13e32\":\"0x1043528d0984698000\",\"0xe510d6797fba3d6693835a844ea2ad540691971b\":\"0x3ae39d47383e8740000\",\"0xe51421f8ee2210c71ed870fe618276c8954afbe9\":\"0x487a9a304539440000\",\"0xe51eb87e7fb7311f5228c479b48ec9878831ac4c\":\"0x6c6b935b8bbd400000\",\"0xe5215631b14248d45a255296bed1fbfa0330ff35\":\"0x4703e6eb5291b80000\",\"0xe528a0e5a267d667e9393a6584e19b34dc9be973\":\"0x12f939c99edab800000\",\"0xe53425d8df1f11c341ff58ae5f1438abf1ca53cf\":\"0x1174a5cdf88bc80000\",\"0xe53c68796212033e4e6f9cff56e19c461eb454f9\":\"0x3635c9adc5dea00000\",\"0xe54102534de8f23effb093b31242ad3b233facfd\":\"0xd8d726b7177a800000\",\"0xe545ee84ea48e564161e9482d59bcf406a602ca2\":\"0x6449e84e47a8a80000\",\"0xe5481a7fed42b901bbed20789bd4ade50d5f83b9\":\"0x6c6b935b8bbd400000\",\"0xe559b5fd337b9c5572a9bf9e0f2521f7d446dbe4\":\"0xad78ebc5ac6200000\",\"0xe55c80520a1b0f755b9a2cd3ce214f7625653e8a\":\"0x6c6b935b8bbd400000\",\"0xe56d431324c92911a1749df292709c14b77a65cd\":\"0x1bc85dc2a89bb200000\",\"0xe57d2995b0ebdf3f3ca6c015eb04260dbb98b7c6\":\"0x6c6b935b8bbd400000\",\"0xe587b16abc8a74081e3613e14342c03375bf0847\":\"0x6c6b935b8bbd400000\",\"0xe589fa76984db5ec4004b46ee8a59492c30744ce\":\"0x97c9ce4cf6d5c00000\",\"0xe58dd23238ee6ea7c2138d385df500c325f376be\":\"0x62a992e53a0af00000\",\"0xe5953fea497104ef9ad2d4e5841c271f073519c2\":\"0x2629f66e0c53000000\",\"0xe5968797468ef767101b761d431fce14abffdbb4\":\"0x1b3d969fa411ca00000\",\"0xe597f083a469c4591c3d2b1d2c772787befe27b2\":\"0xf2dc7d47f15600000\",\"0xe59b3bd300893f97233ef947c46f7217e392f7e9\":\"0x3635c9adc5dea00000\",\"0xe5a365343cc4eb1e770368e1f1144a77b832d7e0\":\"0x1158e460913d00000\",\"0xe5a3d7eb13b15c100177236d1beb30d17ee15420\":\"0x6c6b935b8bbd400000\",\"0xe5aa0b833bb916dc19a8dd683f0ede241d988eba\":\"0xa2a15d09519be00000\",\"0xe5b7af146986c0ff8f85d22e6cc334077d84e824\":\"0x6c6b935b8bbd400000\",\"0xe5b826196c0e1bc1119b021cf6d259a610c99670\":\"0xad78ebc5ac6200000\",\"0xe5b96fc9ac03d448c1613ac91d15978145dbdfd1\":\"0xad78ebc5ac6200000\",\"0xe5b980d28eece2c06fca6c9473068b37d4a6d6e9\":\"0x25afd68cac2b900000\",\"0xe5bab4f0afd8a9d1a381b45761aa18f3d3cce105\":\"0x51bfd7c13878d10000\",\"0xe5bcc88c3b256f6ed5fe550e4a18198b943356ad\":\"0x6c6b935b8bbd400000\",\"0xe5bdf34f4ccc483e4ca530cc7cf2bb18febe92b3\":\"0x6d835a10bbcd20000\",\"0xe5dc9349cb52e161196122cf87a38936e2c57f34\":\"0x6c6b935b8bbd400000\",\"0xe5e33800a1b2e96bde1031630a959aa007f26e51\":\"0x487a9a304539440000\",\"0xe5e37e19408f2cfbec83349dd48153a4a795a08f\":\"0xe3aeb5737240a00000\",\"0xe5edc73e626f5d3441a45539b5f7a398c593edf6\":\"0x2ee449550898e40000\",\"0xe5edf8123f2403ce1a0299becf7aac744d075f23\":\"0xada55474b81340000\",\"0xe5f8ef6d970636b0dcaa4f200ffdc9e75af1741c\":\"0x6c6b935b8bbd400000\",\"0xe5fb31a5caee6a96de393bdbf89fbe65fe125bb3\":\"0x3635c9adc5dea00000\",\"0xe5fbe34984b637196f331c679d0c0c47d83410e1\":\"0x6c6c44fe47ec050000\",\"0xe60955dc0bc156f6c41849f6bd776ba44b0ef0a1\":\"0x10431627a0933b0000\",\"0xe60a55f2df996dc3aedb696c08dde039b2641de8\":\"0x6c6b935b8bbd400000\",\"0xe6115b13f9795f7e956502d5074567dab945ce6b\":\"0x152d02c7e14af6800000\",\"0xe61f280915c774a31d223cf80c069266e5adf19b\":\"0x2fb474098f67c00000\",\"0xe62f98650712eb158753d82972b8e99ca3f61877\":\"0x6c6b935b8bbd400000\",\"0xe62f9d7c64e8e2635aeb883dd73ba684ee7c1079\":\"0x1b1ae4d6e2ef5000000\",\"0xe63e787414b9048478a50733359ecdd7e3647aa6\":\"0x55a6e79ccd1d300000\",\"0xe646665872e40b0d7aa2ff82729caaba5bc3e89e\":\"0x15af1d78b58c400000\",\"0xe64ef012658d54f8e8609c4e9023c09fe865c83b\":\"0x18493fba64ef00000\",\"0xe64f6e1d6401b56c076b64a1b0867d0b2f310d4e\":\"0x2cbad71c53ae50000\",\"0xe667f652f957c28c0e66d0b63417c80c8c9db878\":\"0x209d922f5259c50000\",\"0xe677c31fd9cb720075dca49f1abccd59ec33f734\":\"0x1a6d6beb1d42ee00000\",\"0xe67c2c1665c88338688187629f49e99b60b2d3ba\":\"0xad78ebc5ac6200000\",\"0xe69a6cdb3a8a7db8e1f30c8b84cd73bae02bc0f8\":\"0x394fdc2e452f6718000\",\"0xe69d1c378b771e0feff051db69d966ac6779f4ed\":\"0x1dfa6aaa1497040000\",\"0xe69fcc26ed225f7b2e379834c524d70c1735e5bc\":\"0x6c6b935b8bbd400000\",\"0xe6a3010f0201bc94ff67a2f699dfc206f9e76742\":\"0x2fa7cbf66464980000\",\"0xe6a6f6dd6f70a456f4ec15ef7ad5e5dbb68bd7dc\":\"0xad78ebc5ac6200000\",\"0xe6b20f980ad853ad04cbfc887ce6601c6be0b24c\":\"0xd8d726b7177a800000\",\"0xe6b3ac3f5d4da5a8857d0b3f30fc4b2b692b77d7\":\"0x4f2591f896a6500000\",\"0xe6b9545f7ed086e552924639f9a9edbbd5540b3e\":\"0xcbd47b6eaa8cc00000\",\"0xe6bcd30a8fa138c5d9e5f6c7d2da806992812dcd\":\"0x370ea0d47cf61a800000\",\"0xe6c81ffcecb47ecdc55c0b71e4855f3e5e97fc1e\":\"0x121ea68c114e510000\",\"0xe6cb260b716d4c0ab726eeeb07c8707204e276ae\":\"0x3635c9adc5dea00000\",\"0xe6cb3f3124c9c9cc3834b1274bc3336456a38bac\":\"0x172b1de0a213ff0000\",\"0xe6d22209ffd0b87509ade3a8e2ef429879cb89b5\":\"0x3a7aa9e1899ca300000\",\"0xe6d49f86c228f47367a35e886caacb271e539429\":\"0x165ec09da7a1980000\",\"0xe6e621eaab01f20ef0836b7cad47464cb5fd3c96\":\"0x11219342afa24b0000\",\"0xe6e886317b6a66a5b4f81bf164c538c264351765\":\"0x6c6b935b8bbd400000\",\"0xe6e9a39d750fe994394eb68286e5ea62a6997882\":\"0x2086ac351052600000\",\"0xe6ec5cf0c49b9c317e1e706315ef9eb7c0bf11a7\":\"0x3a469f3467e8ec00000\",\"0xe6f5eb649afb99599c414b27a9c9c855357fa878\":\"0x90f534608a72880000\",\"0xe6fe0afb9dcedd37b2e22c451ba6feab67348033\":\"0x21e19e0c9bab2400000\",\"0xe710dcd09b8101f9437bd97db90a73ef993d0bf4\":\"0x14ee36c05ac2520000\",\"0xe727e67ef911b81f6cf9c73fcbfebc2b02b5bfc6\":\"0x6c6b935b8bbd400000\",\"0xe72e1d335cc29a96b9b1c02f003a16d971e90b9d\":\"0x55a6e79ccd1d300000\",\"0xe7311c9533f0092c7248c9739b5b2c864a34b1ce\":\"0x97f97d6cc26dfe0000\",\"0xe73bfeada6f0fd016fbc843ebcf6e370a65be70c\":\"0x6acb3df27e1f880000\",\"0xe73ccf436725c151e255ccf5210cfce5a43f13e3\":\"0x1154e53217ddb0000\",\"0xe742b1e6069a8ffc3c4767235defb0d49cbed222\":\"0x2b5e3af16b18800000\",\"0xe74608f506866ada6bfbfdf20fea440be76989ef\":\"0x6c6acc67d7b1d40000\",\"0xe7533e270cc61fa164ac1553455c105d04887e14\":\"0x696d8590020bb0000\",\"0xe75c1fb177089f3e58b1067935a6596ef1737fb5\":\"0x56a879fa775470000\",\"0xe75c3b38a58a3f33d55690a5a59766be185e0284\":\"0x1b1ae4d6e2ef500000\",\"0xe761d27fa3502cc76bb1a608740e1403cf9dfc69\":\"0xf2dc7d47f15600000\",\"0xe766f34ff16f3cfcc97321721f43ddf5a38b0cf4\":\"0x54069233bf7f780000\",\"0xe76d945aa89df1e457aa342b31028a5e9130b2ce\":\"0x3708baed3d68900000\",\"0xe7735ec76518fc6aa92da8715a9ee3f625788f13\":\"0x6c4d160bafa1b78000\",\"0xe77a89bd45dc04eeb4e41d7b596b707e6e51e74c\":\"0x28a857425466f800000\",\"0xe77d7deab296c8b4fa07ca3be184163d5a6d606c\":\"0x5043904b671190000\",\"0xe77febabdf080f0f5dca1d3f5766f2a79c0ffa7c\":\"0x4b229d28a843680000\",\"0xe780a56306ba1e6bb331952c22539b858af9f77d\":\"0xa968163f0a57b400000\",\"0xe781ec732d401202bb9bd13860910dd6c29ac0b6\":\"0x433874f632cc600000\",\"0xe784dcc873aa8c1513ec26ff36bc92eac6d4c968\":\"0xad78ebc5ac6200000\",\"0xe7912d4cf4562c573ddc5b71e37310e378ef86c9\":\"0x155bd9307f9fe80000\",\"0xe791d585b89936b25d298f9d35f9f9edc25a2932\":\"0x6c6b935b8bbd400000\",\"0xe792349ce9f6f14f81d0674096befa1f9221cdea\":\"0x5b5d234a0db4388000\",\"0xe796fd4e839b4c95d7510fb7c5c72b83c6c3e3c7\":\"0x1bc433f23f83140000\",\"0xe7a42f59fee074e4fb13ea9e57ecf1cc48282249\":\"0x43c33c1937564800000\",\"0xe7a4560c84b20e0fb54c49670c2903b0a96c42a4\":\"0x206aeac7a903980000\",\"0xe7a8e471eafb798f4554cc6e526730fd56e62c7d\":\"0x3635c9adc5dea00000\",\"0xe7be82c6593c1eeddd2ae0b15001ff201ab57b2f\":\"0x10910d4cdc9f60000\",\"0xe7c6b5fc05fc748e5b4381726449a1c0ad0fb0f1\":\"0x6c6b935b8bbd400000\",\"0xe7d17524d00bad82497c0f27156a647ff51d2792\":\"0x1158e460913d00000\",\"0xe7d213947fcb904ad738480b1eed2f5c329f27e8\":\"0x103c3b1d3e9c30000\",\"0xe7d6240620f42c5edbb2ede6aec43da4ed9b5757\":\"0x3635c9adc5dea00000\",\"0xe7da609d40cde80f00ce5b4ffb6aa9d0b03494fc\":\"0x3635c9adc5dea00000\",\"0xe7f06f699be31c440b43b4db0501ec0e25261644\":\"0x1b1ae4d6e2ef500000\",\"0xe7f4d7fe6f561f7fa1da3005fd365451ad89df89\":\"0xad78ebc5ac6200000\",\"0xe7fd8fd959aed2767ea7fa960ce1db53af802573\":\"0x3635c9adc5dea00000\",\"0xe80e7fef18a5db15b01473f3ad6b78b2a2f8acd9\":\"0x1b1ae4d6e2ef500000\",\"0xe8137fc1b2ec7cc7103af921899b4a39e1d959a1\":\"0x50c5e761a444080000\",\"0xe81c2d346c0adf4cc56708f6394ba6c8c8a64a1e\":\"0x6c6b935b8bbd400000\",\"0xe82c58c579431b673546b53a86459acaf1de9b93\":\"0x3635c9adc5dea00000\",\"0xe834c64318205ca7dd4a21abcb08266cb21ff02c\":\"0x3635c6204739d98000\",\"0xe83604e4ff6be7f96f6018d3ec3072ec525dff6b\":\"0x9ddc1e3b901180000\",\"0xe845e387c4cbdf982280f6aa01c40e4be958ddb2\":\"0x54b40b1f852bda00000\",\"0xe848ca7ebff5c24f9b9c316797a43bf7c356292d\":\"0x62e115c008a880000\",\"0xe84b55b525f1039e744b918cb3332492e45eca7a\":\"0xad78ebc5ac6200000\",\"0xe84f8076a0f2969ecd333eef8de41042986291f2\":\"0x176b344f2a78c00000\",\"0xe864fec07ed1214a65311e11e329de040d04f0fd\":\"0x59ca83f5c404968000\",\"0xe87dbac636a37721df54b08a32ef4959b5e4ff82\":\"0x6c6b935b8bbd400000\",\"0xe87e9bbfbbb71c1a740c74c723426df55d063dd9\":\"0x1b1928c00c7a6380000\",\"0xe87eac6d602b4109c9671bf57b950c2cfdb99d55\":\"0x2b4f21972ecce0000\",\"0xe881bbbe69722d81efecaa48d1952a10a2bfac8f\":\"0x3635c9adc5dea000000\",\"0xe89249738b7eced7cb666a663c49cbf6de8343ea\":\"0x6c6b935b8bbd400000\",\"0xe89c22f1a4e1d4746ecfaa59ed386fee12d51e37\":\"0x26f8e87f0a7da0000\",\"0xe89da96e06beaf6bd880b378f0680c43fd2e9d30\":\"0x209a1a01a56fec0000\",\"0xe8a91da6cf1b9d65c74a02ec1f96eecb6dd241f3\":\"0x692ae8897081d00000\",\"0xe8a9a41740f44f54c3688b53e1ddd42e43c9fe94\":\"0xd8d726b7177a800000\",\"0xe8b28acda971725769db8f563d28666d41ddab6c\":\"0x21e19e0c9bab2400000\",\"0xe8be24f289443ee473bc76822f55098d89b91cc5\":\"0x6c6b935b8bbd400000\",\"0xe8c3d3b0e17f97d1e756e684f94e1470f99c95a1\":\"0x15af1d78b58c400000\",\"0xe8c3f045bb7d38c9d2f395b0ba8492b253230901\":\"0x1e7e4171bf4d3a00000\",\"0xe8cc43bc4f8acf39bff04ebfbf42aac06a328470\":\"0x15af1d78b58c400000\",\"0xe8d942d82f175ecb1c16a405b10143b3f46b963a\":\"0x1ed2e8ff6d971c0000\",\"0xe8ddbed732ebfe754096fde9086b8ea4a4cdc616\":\"0x6c6b935b8bbd400000\",\"0xe8de725eca5def805ff7941d31ac1c2e342dfe95\":\"0x857e0d6f1da76a0000\",\"0xe8e9850586e94f5299ab494bb821a5f40c00bd04\":\"0xcf152640c5c8300000\",\"0xe8ead1bb90ccc3aea2b0dcc5b58056554655d1d5\":\"0x1a4aba225c207400000\",\"0xe8eaf12944092dc3599b3953fa7cb1c9761cc246\":\"0x6194049f30f7200000\",\"0xe8ed51bbb3ace69e06024b33f86844c47348db9e\":\"0x22f9ea89f4a7d6c40000\",\"0xe8ef100d7ce0895832f2678df72d4acf8c28b8e3\":\"0x1b1b6bd7af64c70000\",\"0xe8f29969e75c65e01ce3d86154207d0a9e7c76f2\":\"0xa22fa9a73a27198000\",\"0xe8fc36b0131ec120ac9e85afc10ce70b56d8b6ba\":\"0xad78ebc5ac6200000\",\"0xe90a354cec04d69e5d96ddc0c5138d3d33150aa0\":\"0x1b1a7dcf8a44d38000\",\"0xe9133e7d31845d5f2b66a2618792e869311acf66\":\"0x517c0cbf9a390880000\",\"0xe91dac0195b19e37b59b53f7c017c0b2395ba44c\":\"0x65ea3db75546600000\",\"0xe91fa0badaddb9a97e88d3f4db7c55d6bb7430fe\":\"0x14620c57dddae00000\",\"0xe923c06177b3427ea448c0a6ff019b54cc548d95\":\"0x1f780014667f28000\",\"0xe93d47a8ca885d540c4e526f25d5c6f2c108c4b8\":\"0x17da3a04c7b3e0000000\",\"0xe9458f68bb272cb5673a04f781b403556fd3a387\":\"0x34e8b88cee2d40000\",\"0xe94941b6036019b4016a30c1037d5a6903babaad\":\"0x2a48acab6204b00000\",\"0xe9495ba5842728c0ed97be37d0e422b98d69202c\":\"0x6c6b935b8bbd400000\",\"0xe94ded99dcb572b9bb1dcba32f6dee91e057984e\":\"0x155bd9307f9fe80000\",\"0xe95179527deca5916ca9a38f215c1e9ce737b4c9\":\"0x21e19e0c9bab2400000\",\"0xe9559185f166fc9513cc71116144ce2deb0f1d4b\":\"0x43c33c1937564800000\",\"0xe95e92bbc6de07bf3a660ebf5feb1c8a3527e1c5\":\"0xfc936392801c0000\",\"0xe965daa34039f7f0df62375a37e5ab8a72b301e7\":\"0x103fddecdb3f5700000\",\"0xe969ea1595edc5c4a707cfde380929633251a2b0\":\"0xad78ebc5ac6200000\",\"0xe96b184e1f0f54924ac874f60bbf44707446b72b\":\"0x9dcc0515b56e0c0000\",\"0xe96d7d4cdd15553a4e4d316d6d6480ca3cea1e38\":\"0x2955d02e1a135a00000\",\"0xe96e2d3813efd1165f12f602f97f4a62909d3c66\":\"0x7caee97613e6700000\",\"0xe97fde0b67716325cf0ecce8a191a3761b2c791d\":\"0x3677036edf0af60000\",\"0xe982e6f28c548f5f96f45e63f7ab708724f53fa1\":\"0x157ae829a41f3b0000\",\"0xe9864c1afc8eaad37f3ba56fcb7477cc622009b7\":\"0x448586170a7dc0000\",\"0xe987e6139e6146a717fef96bc24934a5447fe05d\":\"0x6c6b935b8bbd400000\",\"0xe989733ca1d58d9e7b5029ba5d444858bec03172\":\"0x1f87408313df4f8000\",\"0xe98c91cadd924c92579e11b41217b282956cdaa1\":\"0x75c9a8480320c0000\",\"0xe99aece90541cae224b87da673965e0aeb296afd\":\"0x31df9095a18f600000\",\"0xe99de258a4173ce9ac38ede26c0b3bea3c0973d5\":\"0x59d0b805e5bb300000\",\"0xe9a2b4914e8553bf0d7c00ca532369b879f931bf\":\"0x6c6b935b8bbd400000\",\"0xe9a39a8bac0f01c349c64cedb69897f633234ed2\":\"0xd7c198710e66b00000\",\"0xe9a5ae3c9e05977dd1069e9fd9d3aefbae04b8df\":\"0x6acb3df27e1f880000\",\"0xe9ac36376efa06109d40726307dd1a57e213eaa9\":\"0xa844a7424d9c80000\",\"0xe9b1f1fca3fa47269f21b061c353b7f5e96d905a\":\"0x1b1ae4d6e2ef500000\",\"0xe9b36fe9b51412ddca1a521d6e94bc901213dda8\":\"0x21e19e0c9bab2400000\",\"0xe9b4a4853577a9dbcc2e795be0310d1bed28641a\":\"0x3635c9adc5dea00000\",\"0xe9b6a790009bc16642c8d820b7cde0e9fd16d8f5\":\"0xc55325ca7415e00000\",\"0xe9b9a2747510e310241d2ece98f56b3301d757e0\":\"0x6c6b935b8bbd400000\",\"0xe9c35c913ca1fceab461582fe1a5815164b4fd21\":\"0x1b1ae4d6e2ef5000000\",\"0xe9c6dfae97f7099fc5f4e94b784db802923a1419\":\"0x2a53c6d724f100000\",\"0xe9c758f8da41e3346e4350e5ac3976345c6c1082\":\"0x68a0d3092826ad0000\",\"0xe9caf827be9d607915b365c83f0d3b7ea8c79b50\":\"0xa2a15d09519be00000\",\"0xe9cafe41a5e8bbd90ba02d9e06585b4eb546c57f\":\"0x6c6b935b8bbd400000\",\"0xe9d599456b2543e6db80ea9b210e908026e2146e\":\"0xad78ebc5ac6200000\",\"0xe9e1f7cb00a110edd0ebf8b377ef8a7bb856117f\":\"0xad78ebc5ac6200000\",\"0xea14bfda0a6e76668f8788321f07df37824ec5df\":\"0x2a5a058fc295ed000000\",\"0xea1ea0c599afb9cd36caacbbb52b5bbb97597377\":\"0x39fbae8d042dd00000\",\"0xea1efb3ce789bedec3d67c3e1b3bc0e9aa227f90\":\"0x27ca4bd719f0b80000\",\"0xea2c197d26e98b0da83e1b72c787618c979d3db0\":\"0x11164759ffb320000\",\"0xea3779d14a13f6c78566bcde403591413a6239db\":\"0x29b76432b94451200000\",\"0xea4e809e266ae5f13cdbe38f9d0456e6386d1274\":\"0xf3f20b8dfa69d00000\",\"0xea53c954f4ed97fd4810111bdab69ef981ef25b9\":\"0x3a9d5baa4abf1d00000\",\"0xea53d26564859d9e90bb0e53b7abf560e0162c38\":\"0x15af1d78b58c400000\",\"0xea60436912de6bf187d3a472ff8f5333a0f7ed06\":\"0x11164759ffb320000\",\"0xea60549ec7553f511d2149f2d4666cbd9243d93c\":\"0x6c6b935b8bbd400000\",\"0xea66e7b84dcdbf36eea3e75b85382a75f1a15d96\":\"0x5dbc9191266f118000\",\"0xea686c5057093c171c66db99e01b0ececb308683\":\"0x14dda85d2ce1478000\",\"0xea6afe2cc928ac8391eb1e165fc40040e37421e7\":\"0xa27fa063b2e2e68000\",\"0xea79057dabef5e64e7b44f7f18648e7e533718d2\":\"0xad78ebc5ac6200000\",\"0xea7c4d6dc729cd6b157c03ad237ca19a209346c3\":\"0x6c6b935b8bbd400000\",\"0xea8168fbf225e786459ca6bb18d963d26b505309\":\"0x1b1ae4d6e2ef500000\",\"0xea81ca8638540cd9d4d73d060f2cebf2241ffc3e\":\"0x6acb3df27e1f880000\",\"0xea8317197959424041d9d7c67a3ece1dbb78bb55\":\"0x155bd9307f9fe80000\",\"0xea8527febfa1ade29e26419329d393b940bbb7dc\":\"0x6c6acc67d7b1d40000\",\"0xea8f30b6e4c5e65290fb9864259bc5990fa8ee8a\":\"0x1158e460913d00000\",\"0xea94f32808a2ef8a9bf0861d1d2404f7b7be258a\":\"0x1158e460913d00000\",\"0xeaa45cea02d87d2cc8fda9434e2d985bd4031584\":\"0x681fc2cc6e2b8b0000\",\"0xeab0bd148309186cf8cbd13b7232d8095acb833a\":\"0x2439a881c6a717c0000\",\"0xeabb90d37989aab31feae547e0e6f3999ce6a35d\":\"0x6c6b935b8bbd400000\",\"0xeac0827eff0c6e3ff28a7d4a54f65cb7689d7b99\":\"0x9ad9e69f9d47520000\",\"0xeac1482826acb6111e19d340a45fb851576bed60\":\"0x1be8bab04d9be8000\",\"0xeac17b81ed5191fb0802aa54337313834107aaa4\":\"0x1b1ae4d6e2ef5000000\",\"0xeac3af5784927fe9a598fc4eec38b8102f37bc58\":\"0x3635c9adc5dea00000\",\"0xeac6b98842542ea10bb74f26d7c7488f698b6452\":\"0x43c33c1937564800000\",\"0xeac768bf14b8f9432e69eaa82a99fbeb94cd0c9c\":\"0x14dbb2195ca228900000\",\"0xead21c1deccfbf1c5cd96688a2476b69ba07ce4a\":\"0x3f24d8e4a00700000\",\"0xead4d2eefb76abae5533961edd11400406b298fc\":\"0xd255d112e103a00000\",\"0xead65262ed5d122df2b2751410f98c32d1238f51\":\"0x58317ed46b9b80000\",\"0xead75016e3a0815072b6b108bcc1b799acf0383e\":\"0x6c6b935b8bbd400000\",\"0xeaea23aa057200e7c9c15e8ff190d0e66c0c0e83\":\"0x6c6b935b8bbd400000\",\"0xeaed16eaf5daab5bf0295e5e077f59fb8255900b\":\"0xd8d726b7177a800000\",\"0xeaedcc6b8b6962d5d9288c156c579d47c0a9fcff\":\"0x49b9ca9a694340000\",\"0xeaf52388546ec35aca6f6c6393d8d609de3a4bf3\":\"0x1158e460913d00000\",\"0xeb10458daca79e4a6b24b29a8a8ada711b7f2eb6\":\"0xd8bb6549b02bb80000\",\"0xeb1cea7b45d1bd4d0e2a007bd3bfb354759e2c16\":\"0xabbcd4ef377580000\",\"0xeb25481fcd9c221f1ac7e5fd1ecd9307a16215b8\":\"0xaadec983fcff40000\",\"0xeb2ef3d38fe652403cd4c9d85ed7f0682cd7c2de\":\"0x90f534608a728800000\",\"0xeb3bdd59dcdda5a9bb2ac1641fd02180f5f36560\":\"0x165c96647b38a200000\",\"0xeb3ce7fc381c51db7d5fbd692f8f9e058a4c703d\":\"0xad78ebc5ac6200000\",\"0xeb453f5a3adddd8ab56750fadb0fe7f94d9c89e7\":\"0x1158e460913d00000\",\"0xeb4f00e28336ea09942588eeac921811c522143c\":\"0x6c6b935b8bbd400000\",\"0xeb52ab10553492329c1c54833ae610f398a65b9d\":\"0x83d6c7aab63600000\",\"0xeb570dba975227b1c42d6e8dea2c56c9ad960670\":\"0x6c6b935b8bbd400000\",\"0xeb6394a7bfa4d28911d5a5b23e93f35e340c2294\":\"0x43a77aabd00780000\",\"0xeb6810691d1ae0d19e47bd22cebee0b3ba27f88a\":\"0x87856315d878150000\",\"0xeb76424c0fd597d3e341a9642ad1ee118b2b579d\":\"0xd8d726b7177a800000\",\"0xeb7c202b462b7cc5855d7484755f6e26ef43a115\":\"0x6c6b935b8bbd400000\",\"0xeb835c1a911817878a33d167569ea3cdd387f328\":\"0x3635c9adc5dea00000\",\"0xeb89a882670909cf377e9e78286ee97ba78d46c2\":\"0x2b7cc2e9c3225c0000\",\"0xeb90c793b3539761e1c814a29671148692193eb4\":\"0x28a857425466f800000\",\"0xeb9cc9fe0869d2dab52cc7aae8fd57adb35f9feb\":\"0x6a93bb17af81f80000\",\"0xeba388b0da27c87b1cc0eac6c57b2c5a0b459c1a\":\"0x170a0f5040e50400000\",\"0xebaa216de9cc5a43031707d36fe6d5bedc05bdf0\":\"0x6ac5c62d9486070000\",\"0xebac2b4408ef5431a13b8508e86250982114e145\":\"0xd8d726b7177a800000\",\"0xebb62cf8e22c884b1b28c6fa88fbbc17938aa787\":\"0x2b42798403c9b80000\",\"0xebb7d2e11bc6b58f0a8d45c2f6de3010570ac891\":\"0x1731790534df20000\",\"0xebbb4f2c3da8be3eb62d1ffb1f950261cf98ecda\":\"0x6c6b935b8bbd400000\",\"0xebbd4db9019952d68b1b0f6d8cf0683c00387bb5\":\"0x120401563d7d910000\",\"0xebbeeb259184a6e01cccfc2207bbd883785ac90a\":\"0x219bc1b04783d30000\",\"0xebd356156a383123343d48843bffed6103e866b3\":\"0x6acb3df27e1f880000\",\"0xebd37b256563e30c6f9289a8e2702f0852880833\":\"0x6c6acc67d7b1d40000\",\"0xebe46cc3c34c32f5add6c3195bb486c4713eb918\":\"0x3635c9adc5dea00000\",\"0xebff84bbef423071e604c361bba677f5593def4e\":\"0x21e19e0c9bab2400000\",\"0xec0927bac7dc36669c28354ab1be83d7eec30934\":\"0x6c6b935b8bbd400000\",\"0xec0e18a01dc4dc5daae567c3fa4c7f8f9b590205\":\"0x111ffe404a41e60000\",\"0xec11362cec810985d0ebbd7b73451444985b369f\":\"0x65a4e49577057318000\",\"0xec2cb8b9378dff31aec3c22e0e6dadff314ab5dd\":\"0x6c6b935b8bbd400000\",\"0xec30addd895b82ee319e54fb04cb2bb03971f36b\":\"0x6c6b935b8bbd400000\",\"0xec3b8b58a12703e581ce5ffd7e21c57d1e5c663f\":\"0x5c283d410394100000\",\"0xec4867d2175ab5b9469361595546554684cda460\":\"0xa2a15d09519be00000\",\"0xec4d08aa2e47496dca87225de33f2b40a8a5b36f\":\"0x890b0c2e14fb80000\",\"0xec58bc0d0c20d8f49465664153c5c196fe59e6be\":\"0x15af1d78b58c400000\",\"0xec5b198a00cfb55a97b5d53644cffa8a04d2ab45\":\"0x6c6b935b8bbd400000\",\"0xec5df227bfa85d7ad76b426e1cee963bc7f519dd\":\"0x3635c9adc5dea00000\",\"0xec5feafe210c12bfc9a5d05925a123f1e73fbef8\":\"0x608fcf3d88748d000000\",\"0xec6904bae1f69790591709b0609783733f2573e3\":\"0x1b1ae4d6e2ef500000\",\"0xec73114c5e406fdbbe09b4fa621bd70ed54ea1ef\":\"0x53025cd216fce500000\",\"0xec73833de4b810bb027810fc8f69f544e83c12d1\":\"0x3635c9adc5dea00000\",\"0xec75b4a47513120ba5f86039814f1998e3817ac3\":\"0x9b0bce2e8fdba0000\",\"0xec76f12e57a65504033f2c0bce6fc03bd7fa0ac4\":\"0xc2127af858da700000\",\"0xec8014efc7cbe5b0ce50f3562cf4e67f8593cd32\":\"0xf015f25736420000\",\"0xec82f50d06475f684df1b392e00da341aa145444\":\"0x6c6b935b8bbd400000\",\"0xec83e798c396b7a55e2a2224abcd834b27ea459c\":\"0x28a857425466f800000\",\"0xec89f2b678a1a15b9134ec5eb70c6a62071fbaf9\":\"0xad78ebc5ac6200000\",\"0xec8c1d7b6aaccd429db3a91ee4c9eb1ca4f6f73c\":\"0xe664992288f2280000\",\"0xec9851bd917270610267d60518b54d3ca2b35b17\":\"0x878678326eac9000000\",\"0xec99e95dece46ffffb175eb6400fbebb08ee9b95\":\"0x56bc75e2d63100000\",\"0xeca5f58792b8c62d2af556717ee3ee3028be4dce\":\"0x6c6b935b8bbd400000\",\"0xecab5aba5b828de1705381f38bc744b32ba1b437\":\"0x32f51edbaaa3300000\",\"0xecaf3350b7ce144d068b186010852c84dd0ce0f0\":\"0x6c6b935b8bbd400000\",\"0xecb94c568bfe59ade650645f4f26306c736cace4\":\"0xe7eeba3410b740000\",\"0xecbe425e670d39094e20fb5643a9d818eed236de\":\"0x10f0cf064dd59200000\",\"0xecbe5e1c9ad2b1dccf0a305fc9522f4669dd3ae7\":\"0x10f0cf064dd59200000\",\"0xeccf7a0457b566b346ca673a180f444130216ac3\":\"0x56bc75e2d63100000\",\"0xecd1a62802351a41568d23033004acc6c005a5d3\":\"0x2b5e3af16b1880000\",\"0xecd276af64c79d1bd9a92b86b5e88d9a95eb88f8\":\"0x1158e460913d00000\",\"0xecd486fc196791b92cf612d348614f9156488b7e\":\"0x28a857425466f800000\",\"0xecdaf93229b45ee672f65db506fb5eca00f7fce6\":\"0x5701f96dcc40ee8000\",\"0xece111670b563ccdbebca52384290ecd68fe5c92\":\"0x1158e460913d00000\",\"0xece1152682b7598fe2d1e21ec15533885435ac85\":\"0xd8d726b7177a800000\",\"0xece1290877b583e361a2d41b009346e6274e2538\":\"0x1043561a8829300000\",\"0xecf05d07ea026e7ebf4941002335baf2fed0f002\":\"0xad78ebc5ac6200000\",\"0xecf24cdd7c22928c441e694de4aa31b0fab59778\":\"0x2086ac351052600000\",\"0xecfd004d02f36cd4d8b4a8c1a9533b6af85cd716\":\"0x10f41acb4bb3b9c0000\",\"0xed0206cb23315128f8caff26f6a30b985467d022\":\"0x878678326eac9000000\",\"0xed1065dbcf9d73c04ffc7908870d881468c1e132\":\"0x6c6b935b8bbd400000\",\"0xed1276513b6fc68628a74185c2e20cbbca7817bf\":\"0xa5aa85009e39c0000\",\"0xed12a1ba1fb8adfcb20dfa19582e525aa3b74524\":\"0x16a6502f15a1e540000\",\"0xed16ce39feef3bd7f5d162045e0f67c0f00046bb\":\"0x1158e460913d00000\",\"0xed1a5c43c574d4e934299b24f1472cdc9fd6f010\":\"0xad78ebc5ac6200000\",\"0xed1b24b6912d51b334ac0de6e771c7c0454695ea\":\"0x22b1c8c1227a00000\",\"0xed1f1e115a0d60ce02fb25df014d289e3a0cbe7d\":\"0x1b1ae4d6e2ef500000\",\"0xed31305c319f9273d3936d8f5b2f71e9b1b22963\":\"0x56bc75e2d63100000\",\"0xed327a14d5cfadd98103fc0999718d7ed70528ea\":\"0x4e1003b28d92800000\",\"0xed3cbc3782cebd67989b305c4133b2cde32211eb\":\"0x15af1d78b58c400000\",\"0xed4014538cee664a2fbcb6dc669f7ab16d0ba57c\":\"0xad78ebc5ac6200000\",\"0xed41e1a28f5caa843880ef4e8b08bd6c33141edf\":\"0x2ad5ddfa7a8d830000\",\"0xed4be04a052d7accb3dcce90319dba4020ab2c68\":\"0x7f37a70eaf362178000\",\"0xed52a2cc0869dc9e9f842bd0957c47a8e9b0c9ff\":\"0x205b4dfa1ee74780000\",\"0xed5b4c41e762d942404373caf21ed4615d25e6c1\":\"0x6d2d4f3d9525b40000\",\"0xed60c4ab6e540206317e35947a63a9ca6b03e2cb\":\"0x31ad9ad0b467f8000\",\"0xed641e06368fb0efaa1703e01fe48f4a685309eb\":\"0xad78ebc5ac6200000\",\"0xed6643c0e8884b2d3211853785a08bf8f33ed29f\":\"0x487a9a304539440000\",\"0xed70a37cdd1cbda9746d939658ae2a6181288578\":\"0x2086ac3510526000000\",\"0xed7346766e1a676d0d06ec821867a276a083bf31\":\"0xd98a0931cc2d490000\",\"0xed862616fcbfb3becb7406f73c5cbff00c940755\":\"0x5c283d410394100000\",\"0xed9e030ca75cb1d29ea01d0d4cdfdccd3844b6e4\":\"0x1acc116cfafb18000\",\"0xed9ebccba42f9815e78233266dd6e835b6afc31b\":\"0x14542ba12a337c00000\",\"0xed9fb1f5af2fbf7ffc5029cee42b70ff5c275bf5\":\"0xf2dc7d47f15600000\",\"0xeda4b2fa59d684b27a810df8978a73df308a63c2\":\"0xd8d726b7177a800000\",\"0xedb473353979a206879de144c10a3c51d7d7081a\":\"0x14542ba12a337c00000\",\"0xedb71ec41bda7dce86e766e6e8c3e9907723a69b\":\"0x1158e460913d00000\",\"0xedbac9527b54d6df7ae2e000cca3613ba015cae3\":\"0x6acb3df27e1f880000\",\"0xedc22fb92c638e1e21ff5cf039daa6e734dafb29\":\"0x102794ad20da680000\",\"0xeddacd94ec89a2ef968fcf977a08f1fae2757869\":\"0x1b1ae4d6e2ef5000000\",\"0xeddbaafbc21be8f25562f1ed6d05d6afb58f02c2\":\"0x6c6b935b8bbd400000\",\"0xede0147ec032c3618310c1ff25690bf172193dac\":\"0x6c6b935b8bbd400000\",\"0xede5de7c7fb7eee0f36e64530a41440edfbefacf\":\"0x21755ee1ef2b180000\",\"0xede79ae1ff4f1606d59270216fa46ab2ddd4ecaa\":\"0x7ea28327577080000\",\"0xede8c2cb876fbe8a4cca8290361a7ea01a69fdf8\":\"0x1a78c6b44f841838000\",\"0xedeb4894aadd0081bbddd3e8846804b583d19f27\":\"0x6c6b935b8bbd400000\",\"0xedf603890228d7d5de9309942b5cad4219ef9ad7\":\"0x10f0cf064dd59200000\",\"0xedf8a3e1d40f13b79ec8e3e1ecf262fd92116263\":\"0x890b0c2e14fb80000\",\"0xedfda2d5db98f9380714664d54b4ee971a1cae03\":\"0x22bb8ddd679be0000\",\"0xee0007b0960d00908a94432a737557876aac7c31\":\"0x2e0421e69c4cc8000\",\"0xee049af005974dd1c7b3a9ca8d9aa77175ba53aa\":\"0x1211ecb56d13488000\",\"0xee25b9a7032679b113588ed52c137d1a053a1e94\":\"0xad50f3f4eea8e0000\",\"0xee31167f9cc93b3c6465609d79db0cde90e8484c\":\"0x6c6b935b8bbd400000\",\"0xee34c7e7995db9f187cff156918cfb6f13f6e003\":\"0x6a4076cf7995a00000\",\"0xee3564f5f1ba0f94ec7bac164bddbf31c6888b55\":\"0x56bc75e2d63100000\",\"0xee58fb3db29070d0130188ce472be0a172b89055\":\"0x21f42dcdc58e39c0000\",\"0xee655bb4ee0e8d5478526fb9f15e4064e09ff3dd\":\"0xad78ebc5ac6200000\",\"0xee6959de2b67967b71948c891ab00d8c8f38c7dc\":\"0x6685ac1bfe32c0000\",\"0xee6c03429969ca1262cb3f0a4a54afa7d348d7f5\":\"0xde219f91fc18a0000\",\"0xee71793e3acf12a7274f563961f537529d89c7de\":\"0x6c6b935b8bbd400000\",\"0xee7288d91086d9e2eb910014d9ab90a02d78c2a0\":\"0x6c6b935b8bbd400000\",\"0xee7c3ded7c28f459c92fe13b4d95bafbab02367d\":\"0x25f273933db5700000\",\"0xee867d20916bd2e9c9ece08aa04385db667c912e\":\"0xa968163f0a57b400000\",\"0xee899b02cbcb3939cd61de1342d50482abb68532\":\"0x5f68e8131ecf800000\",\"0xee906d7d5f1748258174be4cbc38930302ab7b42\":\"0xad78ebc5ac6200000\",\"0xee97aa8ac69edf7a987d6d70979f8ec1fbca7a94\":\"0x14620c57dddae00000\",\"0xeea1e97988de75d821cd28ad6822b22cce988b31\":\"0x1c30731cec03200000\",\"0xeed28c3f068e094a304b853c950a6809ebcb03e0\":\"0x3a9d5baa4abf1d00000\",\"0xeed384ef2d41d9d203974e57c12328ea760e08ea\":\"0x3635c9adc5dea00000\",\"0xeedf6c4280e6eb05b934ace428e11d4231b5905b\":\"0xad78ebc5ac6200000\",\"0xeee761847e33fd61d99387ee14628694d1bfd525\":\"0x6c6b935b8bbd400000\",\"0xeee9d0526eda01e43116a395322dda8970578f39\":\"0x21e1999bbd5d2be0000\",\"0xeef1bbb1e5a83fde8248f88ee3018afa2d1332eb\":\"0xad78ebc5ac6200000\",\"0xeefba12dfc996742db790464ca7d273be6e81b3e\":\"0x3635c9adc5dea00000\",\"0xeefd05b0e3c417d55b3343060486cdd5e92aa7a6\":\"0x4d853c8f8908980000\",\"0xef0dc7dd7a53d612728bcbd2b27c19dd4d7d666f\":\"0x26411c5b35f05a0000\",\"0xef115252b1b845cd857f002d630f1b6fa37a4e50\":\"0x6acb3df27e1f880000\",\"0xef1c0477f1184d60accab374d374557a0a3e10f3\":\"0x83d6c7aab63600000\",\"0xef2c34bb487d3762c3cca782ccdd7a8fbb0a9931\":\"0x9c2007651b2500000\",\"0xef35f6d4b1075e6aa139151c974b2f4658f70538\":\"0x3c3bc33f94e50d8000\",\"0xef39ca9173df15531d73e6b72a684b51ba0f2bb4\":\"0x56a0b4756ee2380000\",\"0xef463c2679fb279164e20c3d2691358773a0ad95\":\"0x6c6b935b8bbd400000\",\"0xef47cf073e36f271d522d7fa4e7120ad5007a0bc\":\"0x878678326eac900000\",\"0xef61155ba009dcdebef10b28d9da3d1bc6c9ced4\":\"0x3342d60dff1960000\",\"0xef69781f32ffce33346f2c9ae3f08493f3e82f89\":\"0xfc936392801c0000\",\"0xef76a4cd8febcbc9b818f17828f8d93473f3f3cb\":\"0xd8d726b7177a800000\",\"0xef93818f684db0c3675ec81332b3183ecc28a495\":\"0x54069233bf7f780000\",\"0xef9f59aeda418c1494682d941aab4924b5f4929a\":\"0x152d02c7e14af6800000\",\"0xefa6b1f0db603537826891b8b4bc163984bb40cd\":\"0x35659ef93f0fc40000\",\"0xefbd52f97da5fd3a673a46cbf330447b7e8aad5c\":\"0x56c3c9b80a0a68000\",\"0xefc8cf1963c9a95267b228c086239889f4dfd467\":\"0x21e19e0c9bab2400000\",\"0xefcaae9ff64d2cd95b5249dcffe7faa0a0c0e44d\":\"0x15be6174e1912e0000\",\"0xefcce06bd6089d0e458ef561f5a689480afe7000\":\"0x2086ac351052600000\",\"0xefe0675da98a5dda70cd96196b87f4e726b43348\":\"0x3f19beb8dd1ab00000\",\"0xefe8ff87fc260e0767638dd5d02fc4672e0ec06d\":\"0x6c6b935b8bbd400000\",\"0xefeb1997aad277cc33430e6111ed0943594048b8\":\"0x6c6b935b8bbd400000\",\"0xefeea010756f81da4ba25b721787f058170befbd\":\"0x1c29c9cf770ef0000\",\"0xeff51d72adfae143edf3a42b1aec55a2ccdd0b90\":\"0x1043561a8829300000\",\"0xeff86b5123bcdc17ed4ce8e05b7e12e51393a1f7\":\"0x1b1ae4d6e2ef500000\",\"0xeffc15e487b1beda0a8d1325bdb4172240dc540a\":\"0x3853939eee1de0000\",\"0xf01195d657ef3c942e6cb83949e5a20b5cfa8b1e\":\"0x57473d05dabae800000\",\"0xf02796295101674288c1d93467053d042219b794\":\"0x281d901f4fdd100000\",\"0xf039683d7b3d225bc7d8dfadef63163441be41e2\":\"0x1dd1e4bd8d1ee0000\",\"0xf04a6a379708b9428d722aa2b06b77e88935cf89\":\"0x1043561a8829300000\",\"0xf04d2c91efb6e9c45ffbe74b434c8c5f2b028f1f\":\"0x3635c9adc5dea00000\",\"0xf057aa66ca767ede124a1c5b9cc5fc94ef0b0137\":\"0x70a24bcab6f45d0000\",\"0xf05ba8d7b68539d933300bc9289c3d9474d0419e\":\"0x6da27024dd9600000\",\"0xf05ceeab65410564709951773c8445ad9f4ec797\":\"0x10431627a0933b0000\",\"0xf05fcd4c0d73aa167e5553c8c0d6d4f2faa39757\":\"0x2d2d66c3170b2980000\",\"0xf067e1f1d683556a4cc4fd0c0313239f32c4cfd8\":\"0x3635c9adc5dea00000\",\"0xf067fb10dfb293e998abe564c055e3348f9fbf1e\":\"0x6c6b935b8bbd400000\",\"0xf068dfe95d15cd3a7f98ffa688b4346842be2690\":\"0x440ad819e0974c0000\",\"0xf06a854a3c5dc36d1c49f4c87d6db333b57e4add\":\"0x21e19e0c9bab2400000\",\"0xf079e1b1265f50e8c8a98ec0c7815eb3aeac9eb4\":\"0x116dc3a8994b30000\",\"0xf07bd0e5c2ce69c7c4a724bd26bbfa9d2a17ca03\":\"0x14061b9d77a5e980000\",\"0xf0832a6bb25503eeca435be31b0bf905ca1fcf57\":\"0x16a6502f15a1e540000\",\"0xf09b3e87f913ddfd57ae8049c731dba9b636dfc3\":\"0x20f5b1eaad8d800000\",\"0xf0b1340b996f6f0bf0d9561c849caf7f4430befa\":\"0x56bc75e2d63100000\",\"0xf0b1f9e27832c6de6914d70afc238c749995ace4\":\"0x6c6b935b8bbd400000\",\"0xf0b469eae89d400ce7d5d66a9695037036b88903\":\"0x43c33c1937564800000\",\"0xf0b9d683cea12ba600baace219b0b3c97e8c00e4\":\"0x56bc75e2d63100000\",\"0xf0be0faf4d7923fc444622d1980cf2d990aab307\":\"0x6c6b935b8bbd400000\",\"0xf0c081da52a9ae36642adf5e08205f05c54168a6\":\"0x6046f37e5945c0000\",\"0xf0c70d0d6dab7663aa9ed9ceea567ee2c6b02765\":\"0x71438ac5a791a08000\",\"0xf0cbef84e169630098d4e301b20208ef05846ac9\":\"0xe0b8345506b4e0000\",\"0xf0d21663d8b0176e05fde1b90ef31f8530fda95f\":\"0x6c6acc67d7b1d40000\",\"0xf0d5c31ccb6cbe30c7c9ea19f268d159851f8c9c\":\"0x3894f0e6f9b9f700000\",\"0xf0d64cf9df09741133d170485fd24b005011d520\":\"0x1b089341e14fcc0000\",\"0xf0d858105e1b648101ac3f85a0f8222bf4f81d6a\":\"0x2086ac351052600000\",\"0xf0dc43f205619127507b2b1c1cfdf32d28310920\":\"0x105eb79b9417088000\",\"0xf0e1dfa42adeac2f17f6fdf584c94862fd563393\":\"0x1b1ae4d6e2ef500000\",\"0xf0e2649c7e6a3f2c5dfe33bbfbd927ca3c350a58\":\"0x6c6b935b8bbd400000\",\"0xf0e7fb9e420a5340d536f40408344feaefc06aef\":\"0x3635c9adc5dea00000\",\"0xf10462e58fcc07f39584a187639451167e859201\":\"0x934dd5d33bc970000\",\"0xf10661ff94140f203e7a482572437938bec9c3f7\":\"0x43c33c1937564800000\",\"0xf114ff0d0f24eff896edde5471dea484824a99b3\":\"0xbe202d6a0eda0000\",\"0xf116b0b4680f53ab72c968ba802e10aa1be11dc8\":\"0x1158e460913d00000\",\"0xf11cf5d363746fee6864d3ca336dd80679bb87ae\":\"0x878678326eac9000000\",\"0xf11e01c7a9d12499005f4dae7716095a34176277\":\"0x15af1d78b58c400000\",\"0xf13b083093ba564e2dc631568cf7540d9a0ec719\":\"0x6c6acc67d7b1d40000\",\"0xf14f0eb86db0eb68753f16918e5d4b807437bd3e\":\"0xad78ebc5ac6200000\",\"0xf15178ffc43aa8070ece327e930f809ab1a54f9d\":\"0xab640391201300000\",\"0xf156dc0b2a981e5b55d3f2f03b8134e331dbadb7\":\"0x56bc75e2d63100000\",\"0xf15d9d5a21b1929e790371a17f16d95f0c69655c\":\"0x6c6b935b8bbd400000\",\"0xf15e182c4fbbad79bd93342242d4dccf2be58925\":\"0x692ae8897081d00000\",\"0xf1624d980b65336feac5a6d54125005cfcf2aacb\":\"0x6c6b935b8bbd400000\",\"0xf167f5868dcf4233a7830609682caf2df4b1b807\":\"0x81e542e1a7383f0000\",\"0xf16de1891d8196461395f9b136265b3b9546f6ef\":\"0x1b28e1f98bbce8000\",\"0xf17a92e0361dbacecdc5de0d1894955af6a9b606\":\"0x6c6b935b8bbd400000\",\"0xf17adb740f45cbbde3094e7e13716f8103f563bd\":\"0x6c6b935b8bbd400000\",\"0xf18b14cbf6694336d0fe12ac1f25df2da0c05dbb\":\"0xd8d4602c26bf6c0000\",\"0xf19b39389d47b11b8a2c3f1da9124decffbefaf7\":\"0x6c6b935b8bbd400000\",\"0xf19f193508393e4d2a127b20b2031f39c82581c6\":\"0xbdbd7a83bd2f6c0000\",\"0xf1a1f320407964fd3c8f2e2cc8a4580da94f01ea\":\"0x6c6c2177557c440000\",\"0xf1b4ecc63525f7432c3d834ffe2b970fbeb87212\":\"0xa2a24068facd800000\",\"0xf1b58faffa8794f50af8e88309c7a6265455d51a\":\"0x36330322d5238c0000\",\"0xf1c8c4a941b4628c0d6c30fda56452d99c7e1b64\":\"0x4e8cea1ede75040000\",\"0xf1da40736f99d5df3b068a5d745fafc6463fc9b1\":\"0x696ca23058da10000\",\"0xf1dc8ac81042c67a9c3c6792b230c46ac016ca10\":\"0xad78ebc5ac6200000\",\"0xf1df55dcc34a051012b575cb968bc9c458ea09c9\":\"0xd8d726b7177a800000\",\"0xf1e980c559a1a8e5e50a47f8fffdc773b7e06a54\":\"0x65ffbcdea04b7480000\",\"0xf1f391ca92808817b755a8b8f4e2ca08d1fd1108\":\"0x14542ba12a337c00000\",\"0xf1f766b0e46d73fcd4d52e7a72e1b9190cc632b3\":\"0x1b1ae4d6e2ef5000000\",\"0xf2049532fd458a83ca1bff2eebacb6d5ca63f4a4\":\"0xc48c991dc1545c8000\",\"0xf206d328e471d0117b246d2a4619827709e96df3\":\"0xa2af3dc00543440000\",\"0xf20c9a99b74759d782f25c1ceca802a27e0b436c\":\"0x5a87e7d7f5f6580000\",\"0xf2127d54188fedef0f338a5f38c7ff73ad9f6f42\":\"0x43c33c1937564800000\",\"0xf2133431d1d9a37ba2f0762bc40c5acc8aa6978e\":\"0x6c6b935b8bbd400000\",\"0xf21549bdd1487912f900a7523db5f7626121bba3\":\"0x21e19e0c9bab2400000\",\"0xf218bd848ee7f9d38bfdd1c4eb2ed2496ae4305f\":\"0x1b1ae4d6e2ef500000\",\"0xf224eb900b37b4490eee6a0b6420d85c947d8733\":\"0x34957444b840e80000\",\"0xf2294adbb6f0dcc76e632ebef48ab49f124dbba4\":\"0x4e43393600a7b10000\",\"0xf22f4078febbbaa8b0e78e642c8a42f35d433905\":\"0x6c6acc67d7b1d40000\",\"0xf237ef05261c34d79cc22b860de0f17f793c3860\":\"0xad78ebc5ac6200000\",\"0xf23c7b0cb8cd59b82bd890644a57daf40c85e278\":\"0x2b66aafe326ff0000\",\"0xf23d01589eb12d439f7448ff54307529f191858d\":\"0x6c6b935b8bbd400000\",\"0xf23e5c633221a8f7363e65870c9f287424d2a960\":\"0x4acf58e07257100000\",\"0xf242da845d42d4bf779a00f295b40750fe49ea13\":\"0x3635c9adc5dea00000\",\"0xf25259a5c939cd25966c9b6303d3731c53ddbc4c\":\"0xad78ebc5ac6200000\",\"0xf25e4c70bc465632c89e5625a832a7722f6bffab\":\"0xf34b82fd8e91200000\",\"0xf26bcedce3feadcea3bc3e96eb1040dfd8ffe1a0\":\"0x2a034919dfbfbc0000\",\"0xf270792576f05d514493ffd1f5e84bec4b2df810\":\"0x3635c9adc5dea00000\",\"0xf2732cf2c13b8bb8e7492a988f5f89e38273ddc8\":\"0x2086ac351052600000\",\"0xf2742e6859c569d5f2108351e0bf4dca352a48a8\":\"0x21e19e0c9bab2400000\",\"0xf2813a64c5265d020235cb9c319b6c96f906c41e\":\"0x12f939c99edab80000\",\"0xf287ff52f461117adb3e1daa71932d1493c65f2e\":\"0xc55325ca7415e00000\",\"0xf2ab1161750244d0ecd048ee0d3e51abb143a2fd\":\"0x42fe2b907373bc0000\",\"0xf2b4ab2c9427a9015ef6eefff5edb60139b719d1\":\"0x26db992a3b18000000\",\"0xf2c03e2a38998c21648760f1e5ae7ea3077d8522\":\"0x8f3f7193ab079c0000\",\"0xf2c2904e9fa664a11ee25656d8fd2cc0d9a522a0\":\"0xb98bc829a6f90000\",\"0xf2c362b0ef991bc82fb36e66ff75932ae8dd8225\":\"0x402f4cfee62e80000\",\"0xf2d0e986d814ea13c8f466a0538c53dc922651f0\":\"0x4acf58e07257100000\",\"0xf2d1b7357724ec4c03185b879b63f57e26589153\":\"0x14542ba12a337c00000\",\"0xf2d5763ce073127e2cedde6faba786c73ca94141\":\"0x1ac4286100191f00000\",\"0xf2d59c8923759073d6f415aaf8eb065ff2f3b685\":\"0x1ab2cf7c9f87e200000\",\"0xf2e99f5cbb836b7ad36247571a302cbe4b481c69\":\"0x6acb3df27e1f880000\",\"0xf2ed3e77254acb83231dc0860e1a11242ba627db\":\"0x6b56051582a9700000\",\"0xf2edde37f9a8c39ddea24d79f4015757d06bf786\":\"0x152d02c7e14af6800000\",\"0xf2efe96560c9d97b72bd36447843885c1d90c231\":\"0x6c6b935b8bbd400000\",\"0xf2fbb6d887f8b8cc3a869aba847f3d1f643c53d6\":\"0xd8c9460063d31c0000\",\"0xf3034367f87d24d3077fa9a2e38a8b0ccb1104ef\":\"0x3635c9adc5dea00000\",\"0xf303d5a816affd97e83d9e4dac2f79072bb0098f\":\"0x340aad21b3b7000000\",\"0xf3159866c2bc86bba40f9d73bb99f1eee57bb9d7\":\"0x3635c9adc5dea00000\",\"0xf316ef1df2ff4d6c1808dba663ec8093697968e0\":\"0x61464d6cdc80f00000\",\"0xf32d25eb0ea2b8b3028a4c7a155dc1aae865784d\":\"0x13593a9297fdad60000\",\"0xf332c0f3e05a27d9126fd0b641a8c2d4060608fd\":\"0x10f1b62c4d9644e8000\",\"0xf338459f32a159b23db30ac335769ab2351aa63c\":\"0x65a4da25d3016c00000\",\"0xf33efc6397aa65fb53a8f07a0f893aae30e8bcee\":\"0x7cf2381f619f150000\",\"0xf34083ecea385017aa40bdd35ef7effb4ce7762d\":\"0x15af1d78b58c400000\",\"0xf346d7de92741c08fc58a64db55b062dde012d14\":\"0xfff6b1f761e6d0000\",\"0xf355d3ec0cfb907d8dbb1bf3464e458128190bac\":\"0x10b046e7f0d80100000\",\"0xf36df02fbd89607347afce2969b9c4236a58a506\":\"0x6c6b935b8bbd400000\",\"0xf373e9daac0c8675f53b797a160f6fc034ae6b23\":\"0x56bc75e2d63100000\",\"0xf37b426547a1642d8033324814f0ede3114fc212\":\"0x15be6174e1912e0000\",\"0xf37bf78c5875154711cb640d37ea6d28cfcb1259\":\"0xad78ebc5ac6200000\",\"0xf382df583155d8548f3f93440cd5f68cb79d6026\":\"0x38757d027fc1fd5c0000\",\"0xf382e4c20410b951089e19ba96a2fee3d91cce7e\":\"0x111fa56eec2a8380000\",\"0xf38a6ca80168537e974d14e1c3d13990a44c2c1b\":\"0x14542ba12a337c00000\",\"0xf39a9d7aa3581df07ee4279ae6c312ef21033658\":\"0xd8d726b7177a800000\",\"0xf3b668b3f14d920ebc379092db98031b67b219b3\":\"0xad6eedd17cf3b8000\",\"0xf3be99b9103ce7550aa74ff1db18e09dfe32e005\":\"0x6c6b935b8bbd400000\",\"0xf3c1abd29dc57b41dc192d0e384d021df0b4f6d4\":\"0x97ae0cdf8f86f80000\",\"0xf3c4716d1ee5279a86d0163a14618181e16136c7\":\"0x3635c9adc5dea00000\",\"0xf3cc8bcb559465f81bfe583bd7ab0a2306453b9e\":\"0x43c33c1937564800000\",\"0xf3d688f06bbdbf50f9932c4145cbe48ecdf68904\":\"0x1158e460913d00000\",\"0xf3dbcf135acb9dee1a489c593c024f03c2bbaece\":\"0x6c6b935b8bbd400000\",\"0xf3de5f26ef6aded6f06d3b911346ee70401da4a0\":\"0x133ab37d9f9d030000\",\"0xf3df63a97199933330383b3ed7570b96c4812334\":\"0x6c6b935b8bbd400000\",\"0xf3e74f470c7d3a3f0033780f76a89f3ef691e6cb\":\"0xa3cfe631d143640000\",\"0xf3eb1948b951e22df1617829bf3b8d8680ec6b68\":\"0xd8d726b7177a800000\",\"0xf3f1fa3918ca34e2cf7e84670b1f4d8eca160db3\":\"0x24dce54d34a1a00000\",\"0xf3f24fc29e20403fc0e8f5ebbb553426f78270a2\":\"0x56bc75e2d63100000\",\"0xf3fa723552a5d0512e2b62f48dca7b2b8105305b\":\"0x76d41c62494840000\",\"0xf3fe51fde34413c73318b9c85437fe7e820f561a\":\"0x3662325cd18fe00000\",\"0xf400f93d5f5c7e3fc303129ac8fb0c2f786407fa\":\"0x6c6b935b8bbd400000\",\"0xf40b134fea22c6b29c8457f49f000f9cda789adb\":\"0x2086ac351052600000\",\"0xf41557dfdfb1a1bdcefefe2eba1e21fe0a4a9942\":\"0x6acb3df27e1f880000\",\"0xf4177a0d85d48b0e264211ce2aa2efd3f1b47f08\":\"0xc2ccca26b7e80e8000\",\"0xf42f905231c770f0a406f2b768877fb49eee0f21\":\"0xaadec983fcff40000\",\"0xf432b9dbaf11bdbd73b6519fc0a904198771aac6\":\"0x83d6c7aab63600000\",\"0xf43da3a4e3f5fab104ca9bc1a0f7f3bb4a56f351\":\"0x6c6acc67d7b1d40000\",\"0xf447108b98df64b57e871033885c1ad71db1a3f9\":\"0x176f49ead3483508000\",\"0xf44f8551ace933720712c5c491cdb6f2f951736c\":\"0xd8d726b7177a800000\",\"0xf456055a11ab91ff668e2ec922961f2a23e3db25\":\"0xfc936392801c0000\",\"0xf456a75bb99655a7412ce97da081816dfdb2b1f2\":\"0xad78ebc5ac6200000\",\"0xf45b1dcb2e41dc27ffa024daadf619c11175c087\":\"0x11164759ffb320000\",\"0xf463a90cb3f13e1f0643423636beab84c123b06d\":\"0x22b1c8c1227a00000\",\"0xf468906e7edf664ab0d8be3d83eb7ab3f7ffdc78\":\"0x5c283d410394100000\",\"0xf46980e3a4a9d29a6a6e90604537a3114bcb2897\":\"0x1b1ae4d6e2ef500000\",\"0xf46b6b9c7cb552829c1d3dfd8ffb11aabae782f6\":\"0x1236efcbcbb340000\",\"0xf476e1267f86247cc908816f2e7ad5388c952db0\":\"0xd8d726b7177a800000\",\"0xf476f2cb7208a32e051fd94ea8662992638287a2\":\"0x56bc75e2d63100000\",\"0xf47bb134da30a812d003af8dccb888f44bbf5724\":\"0x11959b7fe3395580000\",\"0xf483f607a21fcc28100a018c568ffbe140380410\":\"0x3635c9adc5dea00000\",\"0xf48e1f13f6af4d84b371d7de4b273d03a263278e\":\"0x2086ac351052600000\",\"0xf49c47b3efd86b6e6a5bc9418d1f9fec814b69ef\":\"0x43c33c1937564800000\",\"0xf49f6f9baabc018c8f8e119e0115f491fc92a8a4\":\"0x21e19e0c9bab2400000\",\"0xf4a367b166d2991a2bfda9f56463a09f252c1b1d\":\"0x6acb3df27e1f880000\",\"0xf4a51fce4a1d5b94b0718389ba4e7814139ca738\":\"0x1043561a8829300000\",\"0xf4a9d00cefa97b7a58ef9417fc6267a5069039ee\":\"0x12e89287fa7840000\",\"0xf4aaa3a6163e3706577b49c0767e948a681e16ee\":\"0x6c6b935b8bbd400000\",\"0xf4b1626e24f30bcad9273c527fcc714b5d007b8f\":\"0xad78ebc5ac6200000\",\"0xf4b49100757772f33c177b9a76ba95226c8f3dd8\":\"0x16b352da5e0ed300000\",\"0xf4b6cdcfcb24230b337d770df6034dfbd4e1503f\":\"0x405fdf7e5af85e00000\",\"0xf4b759cc8a1c75f80849ebbcda878dc8f0d66de4\":\"0x15af1d78b58c400000\",\"0xf4ba6a46d55140c439cbcf076cc657136262f4f8\":\"0x6c6b935b8bbd400000\",\"0xf4d67a9044b435b66e8977ff39a28dc4bd53729a\":\"0xad78ebc5ac6200000\",\"0xf4d97664cc4eec9edbe7fa09f4750a663b507d79\":\"0xd8d726b7177a800000\",\"0xf4dc7ba85480bbb3f535c09568aaa3af6f3721c6\":\"0x1871fb6307e35e50000\",\"0xf4ebf50bc7e54f82e9b9bd24baef29438e259ce6\":\"0x21e19e0c9bab2400000\",\"0xf4ec8e97a20aa5f8dd206f55207e06b813df2cc0\":\"0xad78ebc5ac6200000\",\"0xf4ed848ec961739c2c7e352f435ba70a7cd5db38\":\"0x6acb3df27e1f880000\",\"0xf4fc4d39bc0c2c4068a36de50e4ab4d4db7e340a\":\"0x16037df87ef6a0000\",\"0xf504943aaf16796e0b341bbcdf21d11cc586cdd1\":\"0x1e7e4171bf4d3a00000\",\"0xf5061ee2e5ee26b815503677130e1de07a52db07\":\"0x56bc75e2d63100000\",\"0xf509557e90183fbf0f0651a786487bcc428ba175\":\"0xa844a7424d9c80000\",\"0xf50abbd4aa45d3eb88515465a8ba0b310fd9b521\":\"0x16a6502f15a1e540000\",\"0xf50ae7fab4cfb5a646ee04ceadf9bf9dd5a8e540\":\"0xd8d67c2f5895480000\",\"0xf50cbafd397edd556c0678988cb2af5c2617e0a2\":\"0x26d07efe782bb00000\",\"0xf51fded80acb502890e87369741f3722514cefff\":\"0x43c3456ca3c6d110000\",\"0xf52a5882e8927d944b359b26366ba2b9cacfbae8\":\"0x54b41ce2fe63ba80000\",\"0xf52c0a7877345fe0c233bb0f04fd6ab18b6f14ba\":\"0x54cbe55989f38de00000\",\"0xf5437e158090b2a2d68f82b54a5864b95dd6dbea\":\"0xd96c16703b2bfe0000\",\"0xf54c19d9ef3873bfd1f7a622d02d86249a328f06\":\"0x960ae127af32fb28000\",\"0xf5500178cb998f126417831a08c2d7abfff6ab5f\":\"0x46f4f4a5875a9f8000\",\"0xf5534815dc635efa5cc84b2ac734723e21b29372\":\"0x55a6e79ccd1d300000\",\"0xf555a27bb1e2fd4e2cc784caee92939fc06e2fc9\":\"0x6c6b935b8bbd400000\",\"0xf558a2b2dd26dd9593aae04531fd3c3cc3854b67\":\"0xabbcd4ef377580000\",\"0xf56048dd2181d4a36f64fcecc6215481e42abc15\":\"0xad78ebc5ac6200000\",\"0xf56442f60e21691395d0bffaa9194dcaff12e2b7\":\"0xe18398e7601900000\",\"0xf579714a45eb8f52c3d57bbdefd2c15b2e2f11df\":\"0x54915956c409600000\",\"0xf593c65285ee6bbd6637f3be8f89ad40d489f655\":\"0xa2a15d09519be00000\",\"0xf598db2e09a8a5ee7d720d2b5c43bb126d11ecc2\":\"0xad78ebc5ac6200000\",\"0xf59dab1bf8df11327e61f9b7a14b563a96ec3554\":\"0x14542ba12a337c00000\",\"0xf59f9f02bbc98efe097eabb78210979021898bfd\":\"0x21e171a3ec9f72c0000\",\"0xf5a5459fcdd5e5b273830df88eea4cb77ddadfb9\":\"0x409e52b48369a0000\",\"0xf5a7676ad148ae9c1ef8b6f5e5a0c2c473be850b\":\"0xad78ebc5ac6200000\",\"0xf5b068989df29c253577d0405ade6e0e7528f89e\":\"0x57473d05dabae80000\",\"0xf5b6e9061a4eb096160777e26762cf48bdd8b55d\":\"0xdc55fdb17647b0000\",\"0xf5cffbba624e7eb321bc83c60ca68199b4e36671\":\"0x6c6b935b8bbd400000\",\"0xf5d14552b1dce0d6dc1f320da6ffc8a331cd6f0c\":\"0x487a9a304539440000\",\"0xf5d61ac4ca95475e5b7bffd5f2f690b316759615\":\"0x692ae8897081d000000\",\"0xf5d9cf00d658dd45517a48a9d3f5f633541a533d\":\"0x64f5fdf494f780000\",\"0xf5eadcd2d1b8657a121f33c458a8b13e76b65526\":\"0xd8b0f5a5ac24a0000\",\"0xf607c2150d3e1b99f24fa1c7d540add35c4ebe1e\":\"0xa7f1aa07fc8faa0000\",\"0xf60bd735543e6bfd2ea6f11bff627340bc035a23\":\"0x6c6b935b8bbd400000\",\"0xf60c1b45f164b9580e20275a5c39e1d71e35f891\":\"0x6c6b935b8bbd400000\",\"0xf60f62d73937953fef35169e11d872d2ea317eec\":\"0x121ea68c114e5100000\",\"0xf61283b4bd8504058ca360e993999b62cbc8cd67\":\"0xdd2d5fcf3bc9c0000\",\"0xf617b967b9bd485f7695d2ef51fb7792d898f500\":\"0x1b1ae4d6e2ef500000\",\"0xf618d9b104411480a863e623fc55232d1a4f48aa\":\"0xe689e6d44b1668000\",\"0xf622e584a6623eaaf99f2be49e5380c5cbcf5cd8\":\"0xad78ebc5ac6200000\",\"0xf632adff490da4b72d1236d04b510f74d2faa3cd\":\"0x4be4e7267b6ae00000\",\"0xf639ac31da9f67271bd10402b7654e5ce763bd47\":\"0x15af0f42baf9260000\",\"0xf63a579bc3eac2a9490410128dbcebe6d9de8243\":\"0x50c5e761a444080000\",\"0xf645dd7c890093e8e4c8aa92a6bb353522d3dc98\":\"0x7439fa2099e580000\",\"0xf648ea89c27525710172944e79edff847803b775\":\"0x152d02c7e14af6800000\",\"0xf64a4ac8d540a9289c68d960d5fb7cc45a77831c\":\"0x6c6b935b8bbd400000\",\"0xf64ecf2117931c6d535a311e4ffeaef9d49405b8\":\"0x90f534608a72880000\",\"0xf64fe0939a8d1eea2a0ecd9a9730fd7958e33109\":\"0x11de1e6db450c0000\",\"0xf65616be9c8b797e7415227c9138faa0891742d7\":\"0x2ad373ce668e980000\",\"0xf657fcbe682eb4e8db152ecf892456000b513d15\":\"0x692ae8897081d00000\",\"0xf65819ac4cc14c137f05dd7977c7dae08d1a4ab5\":\"0x58788cb94b1d80000\",\"0xf67bb8e2118bbcd59027666eedf6943ec9f880a5\":\"0xd8d726b7177a800000\",\"0xf68464bf64f2411356e4d3250efefe5c50a5f65b\":\"0x1158e460913d00000\",\"0xf686785b89720b61145fea80978d6acc8e0bc196\":\"0xd8d726b7177a800000\",\"0xf68c5e33fa97139df5b2e63886ce34ebf3e4979c\":\"0xb3fa4169e2d8e00000\",\"0xf6a8635757c5e8c134d20d028cf778cf8609e46a\":\"0x4f1d772faec17c0000\",\"0xf6b782f4dcd745a6c0e2e030600e04a24b25e542\":\"0x15af1d78b58c400000\",\"0xf6bc37b1d2a3788d589b6de212dc1713b2f6e78e\":\"0x10f0cf064dd59200000\",\"0xf6c3c48a1ac0a34799f04db86ec7a975fe7768f3\":\"0x6acb3df27e1f880000\",\"0xf6d25d3f3d846d239f525fa8cac97bc43578dbac\":\"0x30927f74c9de000000\",\"0xf6eaac7032d492ef17fd6095afc11d634f56b382\":\"0x1b1b6bd7af64c70000\",\"0xf6ead67dbf5b7eb13358e10f36189d53e643cfcf\":\"0x878678326eac9000000\",\"0xf6f1a44309051c6b25e47dff909b179bb9ab591c\":\"0x692ae8897081d00000\",\"0xf70328ef97625fe745faa49ee0f9d4aa3b0dfb69\":\"0x3635c9adc5dea00000\",\"0xf70a998a717b338d1dd99854409b1a338deea4b0\":\"0x6c6b935b8bbd400000\",\"0xf70d637a845c06db6cdc91e6371ce7c4388a628e\":\"0x1158e460913d00000\",\"0xf7155213449892744bc60f2e04400788bd041fdd\":\"0x39fbae8d042dd0000\",\"0xf71b4534f286e43093b1e15efea749e7597b8b57\":\"0x161c13d3341c87280000\",\"0xf734ec03724ddee5bb5279aa1afcf61b0cb448a1\":\"0xe5bf2cc9b097800000\",\"0xf736dc96760012388fe88b66c06efe57e0d7cf0a\":\"0x71d75ab9b920500000\",\"0xf73ac46c203be1538111b151ec8220c786d84144\":\"0xff7377817b82b8000\",\"0xf73dd9c142b71bce11d06e30e7e7d032f2ec9c9e\":\"0x6acb3df27e1f880000\",\"0xf7418aa0e713d248228776b2e7434222ae75e3a5\":\"0x6c6b935b8bbd400000\",\"0xf74e6e145382b4db821fe0f2d98388f45609c69f\":\"0x56bc75e2d63100000\",\"0xf7500c166f8bea2f82347606e5024be9e4f4ce99\":\"0x1158e460913d00000\",\"0xf757fc8720d3c4fa5277075e60bd5c411aebd977\":\"0x6c6b935b8bbd400000\",\"0xf75bb39c799779ebc04a336d260da63146ed98d0\":\"0x15af1d78b58c40000\",\"0xf768f321fd6433d96b4f354d3cc1652c1732f57f\":\"0x21e19e0c9bab2400000\",\"0xf76f69cee4faa0a63b30ae1e7881f4f715657010\":\"0xad78ebc5ac6200000\",\"0xf777361a3dd8ab62e5f1b9b047568cc0b555704c\":\"0x3635c9adc5dea00000\",\"0xf77c7b845149efba19e261bc7c75157908afa990\":\"0x6c6b935b8bbd400000\",\"0xf77f9587ff7a2d7295f1f571c886bd33926a527c\":\"0x6c68ccd09b022c0000\",\"0xf78258c12481bcdddbb72a8ca0c043097261c6c5\":\"0x1158e460913d00000\",\"0xf798d16da4e460c460cd485fae0fa0599708eb82\":\"0x3635c9adc5dea00000\",\"0xf7a1ade2d0f529123d1055f19b17919f56214e67\":\"0x1b1ae4d6e2ef500000\",\"0xf7acff934b84da0969dc37a8fcf643b7d7fbed41\":\"0x6c6acc67d7b1d40000\",\"0xf7b151cc5e571c17c76539dbe9964cbb6fe5de79\":\"0x74717cfb6883100000\",\"0xf7b29b82195c882dab7897c2ae95e77710f57875\":\"0x7735416132dbfc0000\",\"0xf7bc4c44910d5aedd66ed2355538a6b193c361ec\":\"0x541de2c2d8d620000\",\"0xf7c00cdb1f020310d5acab7b496aaa44b779085e\":\"0x5a87e7d7f5f6580000\",\"0xf7c1b443968b117b5dd9b755572fcd39ca5ec04b\":\"0x18b968c292f1b50000\",\"0xf7c50f922ad16b61c6d1baa045ed816815bac48f\":\"0x2a9396a9784ad7d0000\",\"0xf7c708015071d4fb0a3a2a09a45d156396e3349e\":\"0xa2a15d09519be00000\",\"0xf7cbdba6be6cfe68dbc23c2b0ff530ee05226f84\":\"0x1158e460913d00000\",\"0xf7d0d310acea18406138baaabbfe0571e80de85f\":\"0x487a9a304539440000\",\"0xf7d7af204c56f31fd94398e40df1964bd8bf123c\":\"0x821d221b5291f8000\",\"0xf7dc251196fbcbb77c947d7c1946b0ff65021cea\":\"0x3635c9adc5dea00000\",\"0xf7e45a12aa711c709acefe95f33b78612d2ad22a\":\"0xe0655e2f26bc9180000\",\"0xf7f4898c4c526d955f21f055cb6e47b915e51964\":\"0x7c0860e5a80dc00000\",\"0xf7f91e7acb5b8129a306877ce3168e6f438b66a1\":\"0x98a7d9b8314c00000\",\"0xf7fc45abf76f5088e2e5b5a8d132f28a4d4ec1c0\":\"0x6c6b935b8bbd400000\",\"0xf8063af4cc1dd9619ab5d8bff3fcd1faa8488221\":\"0x6c6b935b8bbd400000\",\"0xf8086e42661ea929d2dda1ab6c748ce3055d111e\":\"0x3635c9adc5dea00000\",\"0xf8087786b42da04ed6d1e0fe26f6c0eefe1e9f5a\":\"0x21e19e0c9bab2400000\",\"0xf80d3619702fa5838c48391859a839fb9ce7160f\":\"0x6c07a7d1b16e700000\",\"0xf814799f6ddf4dcb29c7ee870e75f9cc2d35326d\":\"0x3635c9adc5dea00000\",\"0xf815c10a032d13c34b8976fa6e3bd2c9131a8ba9\":\"0x487a9a304539440000\",\"0xf81622e55757daea6675975dd93538da7d16991e\":\"0x6c6b935b8bbd400000\",\"0xf824ee331e4ac3cc587693395b57ecf625a6c0c2\":\"0x56c95de8e8ca1d0000\",\"0xf827d56ed2d32720d4abf103d6d0ef4d3bcd559b\":\"0x16c80065791a28000\",\"0xf8298591523e50b103f0b701d623cbf0f74556f6\":\"0xad78ebc5ac6200000\",\"0xf848fce9ab611c7d99206e23fac69ad488b94fe1\":\"0x2a1129d0936720000\",\"0xf84f090adf3f8db7e194b350fbb77500699f66fd\":\"0x6acb3df27e1f880000\",\"0xf851b010f633c40af1a8f06a73ebbaab65077ab5\":\"0xee86442fcd06c00000\",\"0xf858171a04d357a13b4941c16e7e55ddd4941329\":\"0x246a5218f2a000000\",\"0xf85bab1cb3710fc05fa19ffac22e67521a0ba21d\":\"0x6c95357fa6b36c0000\",\"0xf86a3ea8071f7095c7db8a05ae507a8929dbb876\":\"0x1236efcbcbb3400000\",\"0xf8704c16d2fd5ba3a2c01d0eb20484e6ecfa3109\":\"0xad78ebc5ac6200000\",\"0xf870995fe1e522321d754337a45c0c9d7b38951c\":\"0x1158e460913d00000\",\"0xf873e57a65c93b6e18cb75f0dc077d5b8933dc5c\":\"0xaadec983fcff40000\",\"0xf875619d8a23e45d8998d184d480c0748970822a\":\"0xd8d726b7177a800000\",\"0xf87bb07b289df7301e54c0efda6a2cf291e89200\":\"0x4be4e7267b6ae00000\",\"0xf88900db737955b1519b1a7d170a18864ce590eb\":\"0xfc936392801c0000\",\"0xf88b58db37420b464c0be88b45ee2b95290f8cfa\":\"0x22b1c8c1227a00000\",\"0xf8962b75db5d24c7e8b7cef1068c3e67cebb30a5\":\"0xf2dc7d47f15600000\",\"0xf8a065f287d91d77cd626af38ffa220d9b552a2b\":\"0x678a932062e4180000\",\"0xf8a49ca2390c1f6d5c0e62513b079571743f7cc6\":\"0xa2a15d09519be00000\",\"0xf8a50cee2e688ceee3aca4d4a29725d4072cc483\":\"0x6c6b935b8bbd400000\",\"0xf8ac4a39b53c11307820973b441365cffe596f66\":\"0x6c6b935b8bbd400000\",\"0xf8ae857b67a4a2893a3fbe7c7a87ff1c01c6a6e7\":\"0xd8d726b7177a800000\",\"0xf8bf9c04874e5a77f38f4c38527e80c676f7b887\":\"0x6c6b935b8bbd400000\",\"0xf8c7f34a38b31801da43063477b12b27d0f203ff\":\"0x1ad2baba6fef480000\",\"0xf8ca336c8e91bd20e314c20b2dd4608b9c8b9459\":\"0x2ddc9bc5b32c780000\",\"0xf8d17424c767bea31205739a2b57a7277214eebe\":\"0x246ddf97976680000\",\"0xf8d52dcc5f96cc28007b3ecbb409f7e22a646caa\":\"0x81690e18128480000\",\"0xf8dce867f0a39c5bef9eeba609229efa02678b6c\":\"0x6c6b935b8bbd400000\",\"0xf8f226142a428434ab17a1864a2597f64aab2f06\":\"0x9598b2fb2e9f28000\",\"0xf8f6645e0dee644b3dad81d571ef9baf840021ad\":\"0x6c6b935b8bbd400000\",\"0xf901c00fc1db88b69c4bc3252b5ca70ea6ee5cf6\":\"0x15af1d78b58c400000\",\"0xf93d5bcb0644b0cce5fcdda343f5168ffab2877d\":\"0xb6207b67d26f90000\",\"0xf9570e924c95debb7061369792cf2efec2a82d5e\":\"0x1158e460913d00000\",\"0xf9642086b1fbae61a6804dbe5fb15ec2d2b537f4\":\"0x6c6b935b8bbd400000\",\"0xf96488698590dc3b2c555642b871348dfa067ad5\":\"0x1b1ae4d6e2ef500000\",\"0xf964d98d281730ba35b2e3a314796e7b42fedf67\":\"0x53b0876098d80c0000\",\"0xf9650d6989f199ab1cc479636ded30f241021f65\":\"0x2e141ea081ca080000\",\"0xf96883582459908c827627e86f28e646f9c7fc7a\":\"0x1c4a78737cdcfb80000\",\"0xf96b4c00766f53736a8574f822e6474c2f21da2d\":\"0x15af1d78b58c400000\",\"0xf9729d48282c9e87166d5eef2d01eda9dbf78821\":\"0x56b83ddc728548000\",\"0xf9767e4ecb4a5980527508d7bec3d45e4c649c13\":\"0x678a932062e4180000\",\"0xf978b025b64233555cc3c19ada7f4199c9348bf7\":\"0x54b40b1f852bda000000\",\"0xf97b56ebd5b77abc9fbacbabd494b9d2c221cd03\":\"0x6acb3df27e1f880000\",\"0xf9811fa19dadbf029f8bfe569adb18228c80481a\":\"0xad78ebc5ac6200000\",\"0xf98250730c4c61c57f129835f2680894794542f3\":\"0xd8d726b7177a800000\",\"0xf989346772995ec1906faffeba2a7fe7de9c6bab\":\"0x16a6502f15a1e540000\",\"0xf998ca3411730a6cd10e7455b0410fb0f6d3ff80\":\"0x6c6b935b8bbd400000\",\"0xf99aee444b5783c093cfffd1c4632cf93c6f050c\":\"0x15af1d78b58c400000\",\"0xf99eeece39fa7ef5076d855061384009792cf2e0\":\"0x1b1ae4d6e2ef500000\",\"0xf9a59c3cc5ffacbcb67be0fc7256f64c9b127cb4\":\"0x6c6b935b8bbd400000\",\"0xf9a94bd56198da245ed01d1e6430b24b2708dcc0\":\"0x28a77afda87ee50000\",\"0xf9b37825f03073d31e249378c30c795c33f83af2\":\"0xad9aabf8c9bfc0000\",\"0xf9b617f752edecae3e909fbb911d2f8192f84209\":\"0x90f534608a72880000\",\"0xf9bfb59d538afc4874d4f5941b08c9730e38e24b\":\"0x22b1c8c1227a00000\",\"0xf9dd239008182fb519fb30eedd2093fed1639be8\":\"0x1b1ae4d6e2ef500000\",\"0xf9debaecb5f339beea4894e5204bfa340d067f25\":\"0x5a42844673b1640000\",\"0xf9e37447406c412197b2e2aebc001d6e30c98c60\":\"0x1c479bb4349c0ee0000\",\"0xf9e7222faaf0f4da40c1c4a40630373a09bed7b6\":\"0x9b4fdcb09456240000\",\"0xf9ece022bccd2c92346911e79dd50303c01e0188\":\"0x3635c9adc5dea00000\",\"0xfa00c376e89c05e887817a9dd0748d96f341aa89\":\"0x104d0d00d2b7f60000\",\"0xfa0c1a988c8a17ad3528eb28b3409daa58225f26\":\"0xad78ebc5ac6200000\",\"0xfa105f1a11b6e4b1f56012a27922e2ac2da4812f\":\"0x205b4dfa1ee74780000\",\"0xfa142fe47eda97e6503b386b18a2bedd73ccb5b1\":\"0x2e153ad81548100000\",\"0xfa14b566234abee73042c31d21717182cba14aa1\":\"0x11c7ea162e78200000\",\"0xfa19d6f7a50f4f079893d167bf14e21d0073d196\":\"0x1cbb3a3ff08d080000\",\"0xfa1f1971a775c3504fef5079f640c2c4bce7ac05\":\"0x6c6b935b8bbd400000\",\"0xfa279bfd8767f956bf7fa0bd5660168da75686bd\":\"0x90f534608a72880000\",\"0xfa27cc49d00b6c987336a875ae39da58fb041b2e\":\"0x21e19e0c9bab2400000\",\"0xfa283299603d8758e8cab082125d2c8f7d445429\":\"0x15bcacb1e0501ae8000\",\"0xfa2bbca15d3fe39f8a328e91f90da14f7ac6253d\":\"0xad78ebc5ac6200000\",\"0xfa2fd29d03fee9a07893df3a269f56b72f2e1e64\":\"0x21e19e0c9bab2400000\",\"0xfa33553285a973719a0d5f956ff861b2d89ed304\":\"0x1158e460913d00000\",\"0xfa3a0c4b903f6ea52ea7ab7b8863b6a616ad6650\":\"0x1158e460913d00000\",\"0xfa3a1aa4488b351aa7560cf5ee630a2fd45c3222\":\"0x2fa47e6aa7340d0000\",\"0xfa410971ad229c3036f41acf852f2ac999281950\":\"0xd8b311a8ddfa7c0000\",\"0xfa44a855e404c86d0ca8ef3324251dfb349c539e\":\"0x542253a126ce400000\",\"0xfa5201fe1342af11307b9142a041243ca92e2f09\":\"0x2038116a3ac043980000\",\"0xfa60868aafd4ff4c5c57914b8ed58b425773dfa9\":\"0x1cfe5c808f39fbc0000\",\"0xfa67b67b4f37a0150915110ede073b05b853bda2\":\"0x2319ba947371ad0000\",\"0xfa68e0cb3edf51f0a6f211c9b2cb5e073c9bffe6\":\"0xfc936392801c00000\",\"0xfa6a37f018e97967937fc5e8617ba1d786dd5f77\":\"0x43c30fb0884a96c0000\",\"0xfa7606435b356cee257bd2fcd3d9eacb3cd1c4e1\":\"0x56bc75e2d63100000\",\"0xfa7adf660b8d99ce15933d7c5f072f3cbeb99d33\":\"0x14061b9d77a5e980000\",\"0xfa86ca27bf2854d98870837fb6f6dfe4bf6453fc\":\"0x11757e8525cf148000\",\"0xfa8cf4e627698c5d5788abb7880417e750231399\":\"0xe61a3696eef6100000\",\"0xfa8e3b1f13433900737daaf1f6299c4887f85b5f\":\"0x26c29e47c4844c0000\",\"0xfa9ec8efe08686fa58c181335872ba698560ecab\":\"0x6c6acc67d7b1d40000\",\"0xfaad905d847c7b23418aeecbe3addb8dd3f8924a\":\"0x6acb3df27e1f880000\",\"0xfaaeba8fc0bbda553ca72e30ef3d732e26e82041\":\"0x488d282aafc9f68000\",\"0xfab487500df20fb83ebed916791d561772adbebf\":\"0x6c6b4c4da6ddbe0000\",\"0xfac5ca94758078fbfccd19db3558da7ee8a0a768\":\"0x3728a62b0dcff60000\",\"0xfad96ab6ac768ad5099452ac4777bd1a47edc48f\":\"0x56bc75e2d63100000\",\"0xfae76719d97eac41870428e940279d97dd57b2f6\":\"0x14dbb2195ca228900000\",\"0xfae881937047895a660cf229760f27e66828d643\":\"0x9ddc1e3b901180000\",\"0xfae92c1370e9e1859a5df83b56d0f586aa3b404c\":\"0x5c5b4f3d843980000\",\"0xfaf5f0b7b6d558f5090d9ea1fb2d42259c586078\":\"0x15affb8420c6b640000\",\"0xfb126f0ec769f49dcefca2f200286451583084b8\":\"0x10fcbc2350396bf0000\",\"0xfb135eb15a8bac72b69915342a60bbc06b7e077c\":\"0x43c33c1937564800000\",\"0xfb223c1e22eac1269b32ee156a5385922ed36fb8\":\"0x6c6b935b8bbd400000\",\"0xfb37cf6b4f81a9e222fba22e9bd24b5098b733cf\":\"0x21a754a6dc5280000\",\"0xfb3860f4121c432ebdc8ec6a0331b1b709792e90\":\"0x208c394af1c8880000\",\"0xfb39189af876e762c71d6c3e741893df226cedd6\":\"0xd8d726b7177a800000\",\"0xfb3a0b0d6b6a718f6fc0292a825dc9247a90a5d0\":\"0xad6dd199e975b0000\",\"0xfb3fa1ac08aba9cc3bf0fe9d483820688f65b410\":\"0x65a4da25d3016c00000\",\"0xfb3fe09bb836861529d7518da27635f538505615\":\"0x4be39216fda0700000\",\"0xfb5125bf0f5eb0b6f020e56bfc2fdf3d402c097e\":\"0x14061b9d77a5e980000\",\"0xfb5518714cefc36d04865de5915ef0ff47dfe743\":\"0x6c6b935b8bbd400000\",\"0xfb5ffaa0f7615726357891475818939d2037cf96\":\"0x1158e460913d00000\",\"0xfb685c15e439965ef626bf0d834cd1a89f2b5695\":\"0xd5967be4fc3f100000\",\"0xfb744b951d094b310262c8f986c860df9ab1de65\":\"0x2d1c515f1cb4a8000\",\"0xfb79abdb925c55b9f98efeef64cfc9eb61f51bb1\":\"0x6140c056fb0ac80000\",\"0xfb8113f94d9173eefd5a3073f516803a10b286ae\":\"0x4563918244f400000\",\"0xfb842ca2c5ef133917a236a0d4ac40690110b038\":\"0x10969a62be15880000\",\"0xfb91fb1a695553f0c68e21276decf0b83909b86d\":\"0x56c003617af780000\",\"0xfb9473cf7712350a1fa0395273fc80560752e4fb\":\"0x6af2198ba85aa0000\",\"0xfb949c647fdcfd2514c7d58e31f28a532d8c5833\":\"0x43c33c1937564800000\",\"0xfba5486d53c6e240494241abf87e43c7600d413a\":\"0x6bbf61494948340000\",\"0xfbb161fe875f09290a4b262bc60110848f0d2226\":\"0x6c6b935b8bbd400000\",\"0xfbbbebcfbe235e57dd2306ad1a9ec581c7f9f48f\":\"0x22b1c8c1227a00000\",\"0xfbc01db54e47cdc3c438694ab717a856c23fe6e9\":\"0x1ca7150ab174f470000\",\"0xfbcfcc4a7b0f26cf26e9f3332132e2fc6a230766\":\"0x1b1ae4d6e2ef5000000\",\"0xfbe71622bcbd31c1a36976e7e5f670c07ffe16de\":\"0x15af1d78b58c400000\",\"0xfbede32c349f3300ef4cd33b4de7dc18e443d326\":\"0xab4dcf399a3a600000\",\"0xfbf204c813f836d83962c7870c7808ca347fd33e\":\"0x1158e460913d00000\",\"0xfbf75933e01b75b154ef0669076be87f62dffae1\":\"0x10846372f249d4c00000\",\"0xfc0096b21e95acb8d619d176a4a1d8d529badbef\":\"0x14d9693bcbec028000\",\"0xfc00a420a36107dfd5f495128a5fe5abb2db0f34\":\"0x143179d869110200000\",\"0xfc018a690ad6746dbe3acf9712ddca52b6250039\":\"0x21e19e0c9bab2400000\",\"0xfc02734033e57f70517e0afc7ee62461f06fad8e\":\"0x155bd9307f9fe80000\",\"0xfc0ee6f7c2b3714ae9916c45566605b656f32441\":\"0x5f68e8131ecf800000\",\"0xfc10b7a67b3268d5331bfb6a14def5ea4a162ca3\":\"0xad78ebc5ac6200000\",\"0xfc15cb99a8d1030b12770add033a79ee0d0c908c\":\"0x12fa00bd52e6240000\",\"0xfc2952b4c49fedd0bc0528a308495e6d6a1c71d6\":\"0x6c6b935b8bbd400000\",\"0xfc2c1f88961d019c3e9ea33009152e0693fbf88a\":\"0x1b1ae4d6e2ef5000000\",\"0xfc361105dd90f9ede566499d69e9130395f12ac8\":\"0x53a4fe2f204e80e00000\",\"0xfc372ff6927cb396d9cf29803500110da632bc52\":\"0x6c6b935b8bbd400000\",\"0xfc39be41094b1997d2169e8264c2c3baa6c99bc4\":\"0x6c6b935b8bbd400000\",\"0xfc3d226bb36a58f526568857b0bb12d109ec9301\":\"0x6c6b935b8bbd400000\",\"0xfc43829ac787ff88aaf183ba352aadbf5a15b193\":\"0xd6ac0a2b0552e00000\",\"0xfc49c1439a41d6b3cf26bb67e0365224e5e38f5f\":\"0x3636d7af5ec98e0000\",\"0xfc5500825105cf712a318a5e9c3bfc69c89d0c12\":\"0xd8d726b7177a800000\",\"0xfc66faba277f4b5de64ad45eb19c31e00ced3ed5\":\"0x131beb925ffd3200000\",\"0xfc7e22a503ec5abe9b08c50bd14999f520fa4884\":\"0x15a477dfbe1ea148000\",\"0xfc8215a0a69913f62a43bf1c8590b9ddcd0d8ddb\":\"0x6c6b935b8bbd400000\",\"0xfc989cb487bf1a7d17e4c1b7c4b7aafdda6b0a8d\":\"0x1158e460913d00000\",\"0xfc9b347464b2f9929d807e039dae48d3d98de379\":\"0x2f6f10780d22cc00000\",\"0xfca43bbc23a0d321ba9e46b929735ce7d8ef0c18\":\"0x1158e460913d00000\",\"0xfca73eff8771c0103ba3cc1a9c259448c72abf0b\":\"0x3635c9adc5dea00000\",\"0xfcada300283f6bcc134a91456760b0d77de410e0\":\"0x6c6b935b8bbd400000\",\"0xfcbc5c71ace79741450b012cf6b8d3f17db68a70\":\"0x205b4dfa1ee74780000\",\"0xfcbd85feea6a754fcf3449449e37ff9784f7773c\":\"0xa74ada69abd7780000\",\"0xfcc9d4a4262e7a027ab7519110d802c495ceea39\":\"0x1595182224b26480000\",\"0xfccd0d1ecee27addea95f6857aeec8c7a04b28ee\":\"0x21e19e0c9bab2400000\",\"0xfcd0b4827cd208ffbf5e759dba8c3cc61d8c2c3c\":\"0x1b1ae4d6e2ef5000000\",\"0xfce089635ce97abac06b44819be5bb0a3e2e0b37\":\"0x503920a7630a78000\",\"0xfcf199f8b854222f182e4e1d099d4e323e2aae01\":\"0x3635c9adc5dea00000\",\"0xfcfc3a5004d678613f0b36a642269a7f371c3f6a\":\"0x3635c9adc5dea00000\",\"0xfd191a35157d781373fb411bf9f25290047c5eef\":\"0x3635c9adc5dea00000\",\"0xfd1faa347b0fcc804c2da86c36d5f1d18b7087bb\":\"0x2d6eb247a96f60000\",\"0xfd1fb5a89a89a721b8797068fbc47f3e9d52e149\":\"0xcd0b5837fc6580000\",\"0xfd204f4f4aba2525ba728afdf78792cbdeb735ae\":\"0x6c6b935b8bbd400000\",\"0xfd2757cc3551a095878d97875615fe0c6a32aa8a\":\"0x206db15299beac0000\",\"0xfd2872d19e57853cfa16effe93d0b1d47b4f93fb\":\"0xd8d726b7177a800000\",\"0xfd2929271e9d2095a264767e7b0df52ea0d1d400\":\"0xa2a1eb251b5ae40000\",\"0xfd377a385272900cb436a3bb7962cdffe93f5dad\":\"0x6c6b935b8bbd400000\",\"0xfd40242bb34a70855ef0fd90f3802dec2136b327\":\"0x68a875073e29240000\",\"0xfd452c3969ece3801c542020f1cdcaa1c71ed23d\":\"0x152d02c7e14af6800000\",\"0xfd4b551f6fdbcda6c511b5bb372250a6b783e534\":\"0x11de1e6db450c0000\",\"0xfd4b989558ae11be0c3b36e2d6f2a54a9343ca2e\":\"0x6c6b935b8bbd400000\",\"0xfd4de8e3748a289cf7d060517d9d38388db01fb8\":\"0xd8d726b7177a80000\",\"0xfd5a63157f914fd398eab19c137dd9550bb7715c\":\"0x56bc75e2d63100000\",\"0xfd60d2b5af3d35f7aaf0c393052e79c4d823d985\":\"0x30eb50d2e14080000\",\"0xfd686de53fa97f99639e2568549720bc588c9efc\":\"0x6ac5c62d9486070000\",\"0xfd7ede8f5240a06541eb699d782c2f9afb2170f6\":\"0x487a9a304539440000\",\"0xfd812bc69fb170ef57e2327e80affd14f8e4b6d2\":\"0x6c6b935b8bbd400000\",\"0xfd88d114220f081cb3d5e15be8152ab07366576a\":\"0x1043561a8829300000\",\"0xfd918536a8efa6f6cefe1fa1153995fef5e33d3b\":\"0x1b1ae4d6e2ef500000\",\"0xfd920f722682afb5af451b0544d4f41b3b9d5742\":\"0x7e52056a123f3c0000\",\"0xfd9579f119bbc819a02b61e38d8803c942f24d32\":\"0x5b97e9081d9400000\",\"0xfda0ce15330707f10bce3201172d2018b9ddea74\":\"0x2d041d705a2c60000\",\"0xfda3042819af3e662900e1b92b4358eda6e92590\":\"0x1907a284d58f63e00000\",\"0xfda6810ea5ac985d6ffbf1c511f1c142edcfddf7\":\"0xd8d726b7177a800000\",\"0xfdb33944f2360615e5be239577c8a19ba52d9887\":\"0x209d922f5259c50000\",\"0xfdba5359f7ec3bc770ac49975d844ec9716256f1\":\"0x3635c9adc5dea00000\",\"0xfdc4d4765a942f5bf96931a9e8cc7ab8b757ff4c\":\"0x126c478a0e3ea8600000\",\"0xfdcd5d80b105897a57abc47865768b2900524295\":\"0x15af1d78b58c4000000\",\"0xfdd1195f797d4f35717d15e6f9810a9a3ff55460\":\"0xfc936392801c0000\",\"0xfdd502a74e813bcfa355ceda3c176f6a6871af7f\":\"0x15af1d78b58c400000\",\"0xfde395bc0b6d5cbb4c1d8fea3e0b4bff635e9db7\":\"0x6c6b935b8bbd400000\",\"0xfdeaac2acf1d138e19f2fc3f9fb74592e3ed818a\":\"0x243d4d18229ca20000\",\"0xfdecc82ddfc56192e26f563c3d68cb544a96bfed\":\"0x17da3a04c7b3e00000\",\"0xfdf42343019b0b0c6bf260b173afab7e45b9d621\":\"0x6c6acc67d7b1d40000\",\"0xfdf449f108c6fb4f5a2b081eed7e45e6919e4d25\":\"0x6c6b935b8bbd400000\",\"0xfdfd6134c04a8ab7eb16f00643f8fed7daaaecb2\":\"0x15af1d78b58c400000\",\"0xfe00bf439911a553982db638039245bcf032dbdc\":\"0x155bd9307f9fe80000\",\"0xfe016ec17ec5f10e3bb98ff4a1eda045157682ab\":\"0x145f5402e7b2e60000\",\"0xfe0e30e214290d743dd30eb082f1f0a5225ade61\":\"0xad78ebc5ac6200000\",\"0xfe210b8f04dc6d4f76216acfcbd59ba83be9b630\":\"0x1158e460913d00000\",\"0xfe22a0b388668d1ae2643e771dacf38a434223cc\":\"0xd8db5ebd7b26380000\",\"0xfe362688845fa244cc807e4b1130eb3741a8051e\":\"0x3635c9adc5dea00000\",\"0xfe3827d57630cf8761d512797b0b858e478bbd12\":\"0x1158e460913d00000\",\"0xfe418b421a9c6d373602790475d2303e11a75930\":\"0x3708baed3d68900000\",\"0xfe4249127950e2f896ec0e7e2e3d055aab10550f\":\"0x243d4d18229ca20000\",\"0xfe4d8403216fd571572bf1bdb01d00578978d688\":\"0x215f835bc769da80000\",\"0xfe53b94989d89964da2061539526bbe979dd2ea9\":\"0x68a875073e29240000\",\"0xfe549bbfe64740189892932538daaf46d2b61d4f\":\"0x22b1c8c1227a00000\",\"0xfe615d975c0887e0c9113ec7298420a793af8b96\":\"0x1b1ae4d6e2ef5000000\",\"0xfe65c4188d7922576909642044fdc52395560165\":\"0xd8d726b7177a800000\",\"0xfe697ff22ca547bfc95e33d960da605c6763f35b\":\"0x47d4119fd960940000\",\"0xfe6a895b795cb4bf85903d3ce09c5aa43953d3bf\":\"0xb8507a820728200000\",\"0xfe6f5f42b6193b1ad16206e4afb5239d4d7db45e\":\"0x5dc892aa1131c80000\",\"0xfe7011b698bf3371132d7445b19eb5b094356aee\":\"0x6c6b935b8bbd400000\",\"0xfe80e9232deaff19baf99869883a4bdf0004e53c\":\"0x2e62f20a69be400000\",\"0xfe8e6e3665570dff7a1bda697aa589c0b4e9024a\":\"0x6c6b935b8bbd400000\",\"0xfe8f1fdcab7fbec9a6a3fcc507619600505c36a3\":\"0x11164759ffb320000\",\"0xfe91eccf2bd566afa11696c5049fa84c69630a52\":\"0x692ae8897081d00000\",\"0xfe96c4cd381562401aa32a86e65b9d52fa8aee27\":\"0x8f1d5c1cae37400000\",\"0xfe98c664c3e447a95e69bd582171b7176ea2a685\":\"0xd8d726b7177a800000\",\"0xfe9ad12ef05d6d90261f96c8340a0381974df477\":\"0x6c6b935b8bbd400000\",\"0xfe9c0fffefb803081256c0cf4d6659e6d33eb4fb\":\"0x52d542804f1ce00000\",\"0xfe9cfc3bb293ddb285e625f3582f74a6b0a5a6cd\":\"0x6acb3df27e1f880000\",\"0xfe9e1197d7974a7648dcc7a03112a88edbc9045d\":\"0x10afc1ade3b4ed40000\",\"0xfeaca2ac74624bf348dac9985143cfd652a4be55\":\"0x5897fcbb02914088000\",\"0xfead1803e5e737a68e18472d9ac715f0994cc2be\":\"0x1b1ae4d6e2ef500000\",\"0xfeb8b8e2af716ae41fc7c04bcf29540156461e6b\":\"0x545174a528a77a0000\",\"0xfeb92d30bf01ff9a1901666c5573532bfa07eeec\":\"0x3635c9adc5dea00000\",\"0xfebc3173bc9072136354002b7b4fb3bfc53f22f1\":\"0x140ec80fa7ee880000\",\"0xfebd48d0ffdbd5656cd5e686363a61145228f279\":\"0x97c9ce4cf6d5c00000\",\"0xfebd9f81cf78bd5fb6c4b9a24bd414bb9bfa4c4e\":\"0x6be10fb8ed6e138000\",\"0xfec06fe27b44c784b2396ec92f7b923ad17e9077\":\"0x6c6b935b8bbd400000\",\"0xfec14e5485de2b3eef5e74c46146db8e454e0335\":\"0x9b41fbf9e0aec0000\",\"0xfed8476d10d584b38bfa6737600ef19d35c41ed8\":\"0x62a992e53a0af00000\",\"0xfeef3b6eabc94affd3310c1c4d0e65375e131119\":\"0x1158e460913d00000\",\"0xfef09d70243f39ed8cd800bf9651479e8f4aca3c\":\"0xad78ebc5ac6200000\",\"0xfef3b3dead1a6926d49aa32b12c22af54d9ff985\":\"0x3635c9adc5dea00000\",\"0xff0b7cb71da9d4c1ea6ecc28ebda504c63f82fd1\":\"0x388a885df2fc6c0000\",\"0xff0c3c7798e8733dd2668152891bab80a8be955c\":\"0x45946b0f9e9d60000\",\"0xff0cb06c42e3d88948e45bd7b0d4e291aefeea51\":\"0x678a932062e4180000\",\"0xff0cc8dac824fa24fc3caa2169e6e057cf638ad6\":\"0xd8d726b7177a800000\",\"0xff0e2fec304207467e1e3307f64cbf30af8fd9cd\":\"0x6c6b935b8bbd400000\",\"0xff128f4b355be1dc4a6f94fa510d7f15d53c2aff\":\"0x93739534d286800000\",\"0xff12e49d8e06aa20f886293c0b98ed7eff788805\":\"0xd8d726b7177a800000\",\"0xff207308ced238a6c01ad0213ca9eb4465d42590\":\"0x6c6acc67d7b1d40000\",\"0xff26138330274df4e0a3081e6df7dd983ec6e78f\":\"0x6c6b935b8bbd400000\",\"0xff2726294148b86c78a9372497e459898ed3fee3\":\"0x6acb3df27e1f880000\",\"0xff3ded7a40d3aff0d7a8c45fa6136aa0433db457\":\"0x6c68ccd09b022c0000\",\"0xff3eee57c34d6dae970d8b311117c53586cd3502\":\"0x5c283d410394100000\",\"0xff3ef6ba151c21b59986ae64f6e8228bc9a2c733\":\"0x6c6b935b8bbd400000\",\"0xff41d9e1b4effe18d8b0d1f63fc4255fb4e06c3d\":\"0x487a9a304539440000\",\"0xff45cb34c928364d9cc9d8bb00373474618f06f3\":\"0x56bc75e2d63100000\",\"0xff49a775814ec00051a795a875de24592ea400d4\":\"0x2a5a058fc295ed000000\",\"0xff4a408f50e9e72146a28ce4fc8d90271f116e84\":\"0x6acb3df27e1f880000\",\"0xff4d9c8484c43c42ff2c5ab759996498d323994d\":\"0xd8d726b7177a800000\",\"0xff4fc66069046c525658c337a917f2d4b832b409\":\"0x6c6b935b8bbd400000\",\"0xff5162f2354dc492c75fd6e3a107268660eecb47\":\"0x5c283d410394100000\",\"0xff545bbb66fbd00eb5e6373ff4e326f5feb5fe12\":\"0x1158e460913d00000\",\"0xff5e7ee7d5114821e159dca5e81f18f1bfffbff9\":\"0x6c6b935b8bbd400000\",\"0xff61c9c1b7a3d8b53bba20b34466544b7b216644\":\"0x6c6b935b8bbd400000\",\"0xff65511cada259260c1ddc41974ecaecd32d6357\":\"0x5f68e8131ecf800000\",\"0xff7843c7010aa7e61519b762dfe49124a76b0e4e\":\"0xc5b17924412b9bb00000\",\"0xff78541756ab2b706e0d70b18adb700fc4f1643d\":\"0x92896529baddc880000\",\"0xff83855051ee8ffb70b4817dba3211ed2355869d\":\"0x15af1d78b58c400000\",\"0xff850e3be1eb6a4d726c08fa73aad358f39706da\":\"0x692ae8897081d00000\",\"0xff86e5e8e15b53909600e41308dab75f0e24e46b\":\"0x30eb50d2e140800000\",\"0xff88ebacc41b3687f39e4b59e159599b80cba33f\":\"0x15af1d78b58c400000\",\"0xff8a2ca5a81333f19998255f203256e1a819c0aa\":\"0xc249fdd3277800000\",\"0xff8eb07de3d49d9d52bbe8e5b26dbe1d160fa834\":\"0xd814dcb94453080000\",\"0xffa4aff1a37f984b0a67272149273ae9bd41e3bc\":\"0x21e19e0c9bab2400000\",\"0xffa696ecbd787e66abae4fe87b635f07ca57d848\":\"0x487a9a304539440000\",\"0xffac3db879a6c7158e8dec603b407463ba0d31cf\":\"0x6acb3df27e1f880000\",\"0xffad3dd74e2c1f796ac640de56dc99b4c792a402\":\"0x10f0cf064dd59200000\",\"0xffb04726dfa41afdc819168418610472970d7bfc\":\"0xd8d726b7177a800000\",\"0xffb3bcc3196a8c3cb834cec94c34fed35b3e1054\":\"0x48a43c54602f700000\",\"0xffb974673367f5c07be5fd270dc4b7138b074d57\":\"0x85ebc8bdb9066d8000\",\"0xffb9c7217e66743031eb377af65c77db7359dcda\":\"0x22b1c8c1227a00000\",\"0xffbc3da0381ec339c1c049eb1ed9ee34fdcea6ca\":\"0xd8d726b7177a800000\",\"0xffc5fc4b7e8a0293ff39a3a0f7d60d2646d37a74\":\"0x6c6b935b8bbd400000\",\"0xffc9cc3094b041ad0e076f968a0de3b167255866\":\"0x1770c1650beee80000\",\"0xffd5170fd1a8118d558e7511e364b24906c4f6b3\":\"0x341d8cd27f1588000\",\"0xffd6da958eecbc016bab91058440d39b41c7be83\":\"0x43c33c1937564800000\",\"0xffe0e997f1977a615f5a315af413fd4869343ba0\":\"0x56cd55fc64dfe0000\",\"0xffe28db53c9044b4ecd4053fd1b4b10d7056c688\":\"0x56bc75e2d63100000\",\"0xffe2e28c3fb74749d7e780dc8a5d422538e6e451\":\"0xdbb81e05bc12d8000\",\"0xffe8cbc1681e5e9db74a0f93f8ed25897519120f\":\"0x51b1d3839261ac0000\",\"0xffeac0305ede3a915295ec8e61c7f881006f4474\":\"0x556f64c1fe7fa0000\",\"0xffec0913c635baca2f5e57a37aa9fb7b6c9b6e26\":\"0x2ba39e82ed5d740000\",\"0xfff33a3bd36abdbd412707b8e310d6011454a7ae\":\"0x1b1ae4d6e2ef5000000\",\"0xfff4bad596633479a2a29f9a8b3f78eefd07e6ee\":\"0x56bc75e2d63100000\",\"0xfff7ac99c8e4feb60c9750054bdc14ce1857f181\":\"0x3635c9adc5dea00000\"}");

/***/ }),

/***/ 706139:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"0x0000000000000000000000000000000000000000\":\"0x1\",\"0x0000000000000000000000000000000000000001\":\"0x1\",\"0x0000000000000000000000000000000000000002\":\"0x1\",\"0x0000000000000000000000000000000000000003\":\"0x1\",\"0x0000000000000000000000000000000000000004\":\"0x1\",\"0x0000000000000000000000000000000000000005\":\"0x1\",\"0x0000000000000000000000000000000000000006\":\"0x1\",\"0x0000000000000000000000000000000000000007\":\"0x1\",\"0x0000000000000000000000000000000000000008\":\"0x1\",\"0x0000000000000000000000000000000000000009\":\"0x1\",\"0x000000000000000000000000000000000000000a\":\"0x1\",\"0x000000000000000000000000000000000000000b\":\"0x1\",\"0x000000000000000000000000000000000000000c\":\"0x1\",\"0x000000000000000000000000000000000000000d\":\"0x1\",\"0x000000000000000000000000000000000000000e\":\"0x1\",\"0x000000000000000000000000000000000000000f\":\"0x1\",\"0x0000000000000000000000000000000000000010\":\"0x1\",\"0x0000000000000000000000000000000000000011\":\"0x1\",\"0x0000000000000000000000000000000000000012\":\"0x1\",\"0x0000000000000000000000000000000000000013\":\"0x1\",\"0x0000000000000000000000000000000000000014\":\"0x1\",\"0x0000000000000000000000000000000000000015\":\"0x1\",\"0x0000000000000000000000000000000000000016\":\"0x1\",\"0x0000000000000000000000000000000000000017\":\"0x1\",\"0x0000000000000000000000000000000000000018\":\"0x1\",\"0x0000000000000000000000000000000000000019\":\"0x1\",\"0x000000000000000000000000000000000000001a\":\"0x1\",\"0x000000000000000000000000000000000000001b\":\"0x1\",\"0x000000000000000000000000000000000000001c\":\"0x1\",\"0x000000000000000000000000000000000000001d\":\"0x1\",\"0x000000000000000000000000000000000000001e\":\"0x1\",\"0x000000000000000000000000000000000000001f\":\"0x1\",\"0x0000000000000000000000000000000000000020\":\"0x1\",\"0x0000000000000000000000000000000000000021\":\"0x1\",\"0x0000000000000000000000000000000000000022\":\"0x1\",\"0x0000000000000000000000000000000000000023\":\"0x1\",\"0x0000000000000000000000000000000000000024\":\"0x1\",\"0x0000000000000000000000000000000000000025\":\"0x1\",\"0x0000000000000000000000000000000000000026\":\"0x1\",\"0x0000000000000000000000000000000000000027\":\"0x1\",\"0x0000000000000000000000000000000000000028\":\"0x1\",\"0x0000000000000000000000000000000000000029\":\"0x1\",\"0x000000000000000000000000000000000000002a\":\"0x1\",\"0x000000000000000000000000000000000000002b\":\"0x1\",\"0x000000000000000000000000000000000000002c\":\"0x1\",\"0x000000000000000000000000000000000000002d\":\"0x1\",\"0x000000000000000000000000000000000000002e\":\"0x1\",\"0x000000000000000000000000000000000000002f\":\"0x1\",\"0x0000000000000000000000000000000000000030\":\"0x1\",\"0x0000000000000000000000000000000000000031\":\"0x1\",\"0x0000000000000000000000000000000000000032\":\"0x1\",\"0x0000000000000000000000000000000000000033\":\"0x1\",\"0x0000000000000000000000000000000000000034\":\"0x1\",\"0x0000000000000000000000000000000000000035\":\"0x1\",\"0x0000000000000000000000000000000000000036\":\"0x1\",\"0x0000000000000000000000000000000000000037\":\"0x1\",\"0x0000000000000000000000000000000000000038\":\"0x1\",\"0x0000000000000000000000000000000000000039\":\"0x1\",\"0x000000000000000000000000000000000000003a\":\"0x1\",\"0x000000000000000000000000000000000000003b\":\"0x1\",\"0x000000000000000000000000000000000000003c\":\"0x1\",\"0x000000000000000000000000000000000000003d\":\"0x1\",\"0x000000000000000000000000000000000000003e\":\"0x1\",\"0x000000000000000000000000000000000000003f\":\"0x1\",\"0x0000000000000000000000000000000000000040\":\"0x1\",\"0x0000000000000000000000000000000000000041\":\"0x1\",\"0x0000000000000000000000000000000000000042\":\"0x1\",\"0x0000000000000000000000000000000000000043\":\"0x1\",\"0x0000000000000000000000000000000000000044\":\"0x1\",\"0x0000000000000000000000000000000000000045\":\"0x1\",\"0x0000000000000000000000000000000000000046\":\"0x1\",\"0x0000000000000000000000000000000000000047\":\"0x1\",\"0x0000000000000000000000000000000000000048\":\"0x1\",\"0x0000000000000000000000000000000000000049\":\"0x1\",\"0x000000000000000000000000000000000000004a\":\"0x1\",\"0x000000000000000000000000000000000000004b\":\"0x1\",\"0x000000000000000000000000000000000000004c\":\"0x1\",\"0x000000000000000000000000000000000000004d\":\"0x1\",\"0x000000000000000000000000000000000000004e\":\"0x1\",\"0x000000000000000000000000000000000000004f\":\"0x1\",\"0x0000000000000000000000000000000000000050\":\"0x1\",\"0x0000000000000000000000000000000000000051\":\"0x1\",\"0x0000000000000000000000000000000000000052\":\"0x1\",\"0x0000000000000000000000000000000000000053\":\"0x1\",\"0x0000000000000000000000000000000000000054\":\"0x1\",\"0x0000000000000000000000000000000000000055\":\"0x1\",\"0x0000000000000000000000000000000000000056\":\"0x1\",\"0x0000000000000000000000000000000000000057\":\"0x1\",\"0x0000000000000000000000000000000000000058\":\"0x1\",\"0x0000000000000000000000000000000000000059\":\"0x1\",\"0x000000000000000000000000000000000000005a\":\"0x1\",\"0x000000000000000000000000000000000000005b\":\"0x1\",\"0x000000000000000000000000000000000000005c\":\"0x1\",\"0x000000000000000000000000000000000000005d\":\"0x1\",\"0x000000000000000000000000000000000000005e\":\"0x1\",\"0x000000000000000000000000000000000000005f\":\"0x1\",\"0x0000000000000000000000000000000000000060\":\"0x1\",\"0x0000000000000000000000000000000000000061\":\"0x1\",\"0x0000000000000000000000000000000000000062\":\"0x1\",\"0x0000000000000000000000000000000000000063\":\"0x1\",\"0x0000000000000000000000000000000000000064\":\"0x1\",\"0x0000000000000000000000000000000000000065\":\"0x1\",\"0x0000000000000000000000000000000000000066\":\"0x1\",\"0x0000000000000000000000000000000000000067\":\"0x1\",\"0x0000000000000000000000000000000000000068\":\"0x1\",\"0x0000000000000000000000000000000000000069\":\"0x1\",\"0x000000000000000000000000000000000000006a\":\"0x1\",\"0x000000000000000000000000000000000000006b\":\"0x1\",\"0x000000000000000000000000000000000000006c\":\"0x1\",\"0x000000000000000000000000000000000000006d\":\"0x1\",\"0x000000000000000000000000000000000000006e\":\"0x1\",\"0x000000000000000000000000000000000000006f\":\"0x1\",\"0x0000000000000000000000000000000000000070\":\"0x1\",\"0x0000000000000000000000000000000000000071\":\"0x1\",\"0x0000000000000000000000000000000000000072\":\"0x1\",\"0x0000000000000000000000000000000000000073\":\"0x1\",\"0x0000000000000000000000000000000000000074\":\"0x1\",\"0x0000000000000000000000000000000000000075\":\"0x1\",\"0x0000000000000000000000000000000000000076\":\"0x1\",\"0x0000000000000000000000000000000000000077\":\"0x1\",\"0x0000000000000000000000000000000000000078\":\"0x1\",\"0x0000000000000000000000000000000000000079\":\"0x1\",\"0x000000000000000000000000000000000000007a\":\"0x1\",\"0x000000000000000000000000000000000000007b\":\"0x1\",\"0x000000000000000000000000000000000000007c\":\"0x1\",\"0x000000000000000000000000000000000000007d\":\"0x1\",\"0x000000000000000000000000000000000000007e\":\"0x1\",\"0x000000000000000000000000000000000000007f\":\"0x1\",\"0x0000000000000000000000000000000000000080\":\"0x1\",\"0x0000000000000000000000000000000000000081\":\"0x1\",\"0x0000000000000000000000000000000000000082\":\"0x1\",\"0x0000000000000000000000000000000000000083\":\"0x1\",\"0x0000000000000000000000000000000000000084\":\"0x1\",\"0x0000000000000000000000000000000000000085\":\"0x1\",\"0x0000000000000000000000000000000000000086\":\"0x1\",\"0x0000000000000000000000000000000000000087\":\"0x1\",\"0x0000000000000000000000000000000000000088\":\"0x1\",\"0x0000000000000000000000000000000000000089\":\"0x1\",\"0x000000000000000000000000000000000000008a\":\"0x1\",\"0x000000000000000000000000000000000000008b\":\"0x1\",\"0x000000000000000000000000000000000000008c\":\"0x1\",\"0x000000000000000000000000000000000000008d\":\"0x1\",\"0x000000000000000000000000000000000000008e\":\"0x1\",\"0x000000000000000000000000000000000000008f\":\"0x1\",\"0x0000000000000000000000000000000000000090\":\"0x1\",\"0x0000000000000000000000000000000000000091\":\"0x1\",\"0x0000000000000000000000000000000000000092\":\"0x1\",\"0x0000000000000000000000000000000000000093\":\"0x1\",\"0x0000000000000000000000000000000000000094\":\"0x1\",\"0x0000000000000000000000000000000000000095\":\"0x1\",\"0x0000000000000000000000000000000000000096\":\"0x1\",\"0x0000000000000000000000000000000000000097\":\"0x1\",\"0x0000000000000000000000000000000000000098\":\"0x1\",\"0x0000000000000000000000000000000000000099\":\"0x1\",\"0x000000000000000000000000000000000000009a\":\"0x1\",\"0x000000000000000000000000000000000000009b\":\"0x1\",\"0x000000000000000000000000000000000000009c\":\"0x1\",\"0x000000000000000000000000000000000000009d\":\"0x1\",\"0x000000000000000000000000000000000000009e\":\"0x1\",\"0x000000000000000000000000000000000000009f\":\"0x1\",\"0x00000000000000000000000000000000000000a0\":\"0x1\",\"0x00000000000000000000000000000000000000a1\":\"0x1\",\"0x00000000000000000000000000000000000000a2\":\"0x1\",\"0x00000000000000000000000000000000000000a3\":\"0x1\",\"0x00000000000000000000000000000000000000a4\":\"0x1\",\"0x00000000000000000000000000000000000000a5\":\"0x1\",\"0x00000000000000000000000000000000000000a6\":\"0x1\",\"0x00000000000000000000000000000000000000a7\":\"0x1\",\"0x00000000000000000000000000000000000000a8\":\"0x1\",\"0x00000000000000000000000000000000000000a9\":\"0x1\",\"0x00000000000000000000000000000000000000aa\":\"0x1\",\"0x00000000000000000000000000000000000000ab\":\"0x1\",\"0x00000000000000000000000000000000000000ac\":\"0x1\",\"0x00000000000000000000000000000000000000ad\":\"0x1\",\"0x00000000000000000000000000000000000000ae\":\"0x1\",\"0x00000000000000000000000000000000000000af\":\"0x1\",\"0x00000000000000000000000000000000000000b0\":\"0x1\",\"0x00000000000000000000000000000000000000b1\":\"0x1\",\"0x00000000000000000000000000000000000000b2\":\"0x1\",\"0x00000000000000000000000000000000000000b3\":\"0x1\",\"0x00000000000000000000000000000000000000b4\":\"0x1\",\"0x00000000000000000000000000000000000000b5\":\"0x1\",\"0x00000000000000000000000000000000000000b6\":\"0x1\",\"0x00000000000000000000000000000000000000b7\":\"0x1\",\"0x00000000000000000000000000000000000000b8\":\"0x1\",\"0x00000000000000000000000000000000000000b9\":\"0x1\",\"0x00000000000000000000000000000000000000ba\":\"0x1\",\"0x00000000000000000000000000000000000000bb\":\"0x1\",\"0x00000000000000000000000000000000000000bc\":\"0x1\",\"0x00000000000000000000000000000000000000bd\":\"0x1\",\"0x00000000000000000000000000000000000000be\":\"0x1\",\"0x00000000000000000000000000000000000000bf\":\"0x1\",\"0x00000000000000000000000000000000000000c0\":\"0x1\",\"0x00000000000000000000000000000000000000c1\":\"0x1\",\"0x00000000000000000000000000000000000000c2\":\"0x1\",\"0x00000000000000000000000000000000000000c3\":\"0x1\",\"0x00000000000000000000000000000000000000c4\":\"0x1\",\"0x00000000000000000000000000000000000000c5\":\"0x1\",\"0x00000000000000000000000000000000000000c6\":\"0x1\",\"0x00000000000000000000000000000000000000c7\":\"0x1\",\"0x00000000000000000000000000000000000000c8\":\"0x1\",\"0x00000000000000000000000000000000000000c9\":\"0x1\",\"0x00000000000000000000000000000000000000ca\":\"0x1\",\"0x00000000000000000000000000000000000000cb\":\"0x1\",\"0x00000000000000000000000000000000000000cc\":\"0x1\",\"0x00000000000000000000000000000000000000cd\":\"0x1\",\"0x00000000000000000000000000000000000000ce\":\"0x1\",\"0x00000000000000000000000000000000000000cf\":\"0x1\",\"0x00000000000000000000000000000000000000d0\":\"0x1\",\"0x00000000000000000000000000000000000000d1\":\"0x1\",\"0x00000000000000000000000000000000000000d2\":\"0x1\",\"0x00000000000000000000000000000000000000d3\":\"0x1\",\"0x00000000000000000000000000000000000000d4\":\"0x1\",\"0x00000000000000000000000000000000000000d5\":\"0x1\",\"0x00000000000000000000000000000000000000d6\":\"0x1\",\"0x00000000000000000000000000000000000000d7\":\"0x1\",\"0x00000000000000000000000000000000000000d8\":\"0x1\",\"0x00000000000000000000000000000000000000d9\":\"0x1\",\"0x00000000000000000000000000000000000000da\":\"0x1\",\"0x00000000000000000000000000000000000000db\":\"0x1\",\"0x00000000000000000000000000000000000000dc\":\"0x1\",\"0x00000000000000000000000000000000000000dd\":\"0x1\",\"0x00000000000000000000000000000000000000de\":\"0x1\",\"0x00000000000000000000000000000000000000df\":\"0x1\",\"0x00000000000000000000000000000000000000e0\":\"0x1\",\"0x00000000000000000000000000000000000000e1\":\"0x1\",\"0x00000000000000000000000000000000000000e2\":\"0x1\",\"0x00000000000000000000000000000000000000e3\":\"0x1\",\"0x00000000000000000000000000000000000000e4\":\"0x1\",\"0x00000000000000000000000000000000000000e5\":\"0x1\",\"0x00000000000000000000000000000000000000e6\":\"0x1\",\"0x00000000000000000000000000000000000000e7\":\"0x1\",\"0x00000000000000000000000000000000000000e8\":\"0x1\",\"0x00000000000000000000000000000000000000e9\":\"0x1\",\"0x00000000000000000000000000000000000000ea\":\"0x1\",\"0x00000000000000000000000000000000000000eb\":\"0x1\",\"0x00000000000000000000000000000000000000ec\":\"0x1\",\"0x00000000000000000000000000000000000000ed\":\"0x1\",\"0x00000000000000000000000000000000000000ee\":\"0x1\",\"0x00000000000000000000000000000000000000ef\":\"0x1\",\"0x00000000000000000000000000000000000000f0\":\"0x1\",\"0x00000000000000000000000000000000000000f1\":\"0x1\",\"0x00000000000000000000000000000000000000f2\":\"0x1\",\"0x00000000000000000000000000000000000000f3\":\"0x1\",\"0x00000000000000000000000000000000000000f4\":\"0x1\",\"0x00000000000000000000000000000000000000f5\":\"0x1\",\"0x00000000000000000000000000000000000000f6\":\"0x1\",\"0x00000000000000000000000000000000000000f7\":\"0x1\",\"0x00000000000000000000000000000000000000f8\":\"0x1\",\"0x00000000000000000000000000000000000000f9\":\"0x1\",\"0x00000000000000000000000000000000000000fa\":\"0x1\",\"0x00000000000000000000000000000000000000fb\":\"0x1\",\"0x00000000000000000000000000000000000000fc\":\"0x1\",\"0x00000000000000000000000000000000000000fd\":\"0x1\",\"0x00000000000000000000000000000000000000fe\":\"0x1\",\"0x00000000000000000000000000000000000000ff\":\"0x1\",\"0x31b98d14007bdee637298086988a0bbd31184523\":\"0x200000000000000000000000000000000000000000000000000000000000000\"}");

/***/ }),

/***/ 638923:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"0x0000000000000000000000000000000000000000\":\"0x1\",\"0x0000000000000000000000000000000000000001\":\"0x1\",\"0x0000000000000000000000000000000000000002\":\"0x1\",\"0x0000000000000000000000000000000000000003\":\"0x1\",\"0x0000000000000000000000000000000000000004\":\"0x1\",\"0x0000000000000000000000000000000000000005\":\"0x1\",\"0x0000000000000000000000000000000000000006\":\"0x1\",\"0x0000000000000000000000000000000000000007\":\"0x1\",\"0x0000000000000000000000000000000000000008\":\"0x1\",\"0x0000000000000000000000000000000000000009\":\"0x1\",\"0x000000000000000000000000000000000000000a\":\"0x0\",\"0x000000000000000000000000000000000000000b\":\"0x0\",\"0x000000000000000000000000000000000000000c\":\"0x0\",\"0x000000000000000000000000000000000000000d\":\"0x0\",\"0x000000000000000000000000000000000000000e\":\"0x0\",\"0x000000000000000000000000000000000000000f\":\"0x0\",\"0x0000000000000000000000000000000000000010\":\"0x0\",\"0x0000000000000000000000000000000000000011\":\"0x0\",\"0x0000000000000000000000000000000000000012\":\"0x0\",\"0x0000000000000000000000000000000000000013\":\"0x0\",\"0x0000000000000000000000000000000000000014\":\"0x0\",\"0x0000000000000000000000000000000000000015\":\"0x0\",\"0x0000000000000000000000000000000000000016\":\"0x0\",\"0x0000000000000000000000000000000000000017\":\"0x0\",\"0x0000000000000000000000000000000000000018\":\"0x0\",\"0x0000000000000000000000000000000000000019\":\"0x0\",\"0x000000000000000000000000000000000000001a\":\"0x0\",\"0x000000000000000000000000000000000000001b\":\"0x0\",\"0x000000000000000000000000000000000000001c\":\"0x0\",\"0x000000000000000000000000000000000000001d\":\"0x0\",\"0x000000000000000000000000000000000000001e\":\"0x0\",\"0x000000000000000000000000000000000000001f\":\"0x0\",\"0x0000000000000000000000000000000000000020\":\"0x0\",\"0x0000000000000000000000000000000000000021\":\"0x0\",\"0x0000000000000000000000000000000000000022\":\"0x0\",\"0x0000000000000000000000000000000000000023\":\"0x0\",\"0x0000000000000000000000000000000000000024\":\"0x0\",\"0x0000000000000000000000000000000000000025\":\"0x0\",\"0x0000000000000000000000000000000000000026\":\"0x0\",\"0x0000000000000000000000000000000000000027\":\"0x0\",\"0x0000000000000000000000000000000000000028\":\"0x0\",\"0x0000000000000000000000000000000000000029\":\"0x0\",\"0x000000000000000000000000000000000000002a\":\"0x0\",\"0x000000000000000000000000000000000000002b\":\"0x0\",\"0x000000000000000000000000000000000000002c\":\"0x0\",\"0x000000000000000000000000000000000000002d\":\"0x0\",\"0x000000000000000000000000000000000000002e\":\"0x0\",\"0x000000000000000000000000000000000000002f\":\"0x0\",\"0x0000000000000000000000000000000000000030\":\"0x0\",\"0x0000000000000000000000000000000000000031\":\"0x0\",\"0x0000000000000000000000000000000000000032\":\"0x0\",\"0x0000000000000000000000000000000000000033\":\"0x0\",\"0x0000000000000000000000000000000000000034\":\"0x0\",\"0x0000000000000000000000000000000000000035\":\"0x0\",\"0x0000000000000000000000000000000000000036\":\"0x0\",\"0x0000000000000000000000000000000000000037\":\"0x0\",\"0x0000000000000000000000000000000000000038\":\"0x0\",\"0x0000000000000000000000000000000000000039\":\"0x0\",\"0x000000000000000000000000000000000000003a\":\"0x0\",\"0x000000000000000000000000000000000000003b\":\"0x0\",\"0x000000000000000000000000000000000000003c\":\"0x0\",\"0x000000000000000000000000000000000000003d\":\"0x0\",\"0x000000000000000000000000000000000000003e\":\"0x0\",\"0x000000000000000000000000000000000000003f\":\"0x0\",\"0x0000000000000000000000000000000000000040\":\"0x0\",\"0x0000000000000000000000000000000000000041\":\"0x0\",\"0x0000000000000000000000000000000000000042\":\"0x0\",\"0x0000000000000000000000000000000000000043\":\"0x0\",\"0x0000000000000000000000000000000000000044\":\"0x0\",\"0x0000000000000000000000000000000000000045\":\"0x0\",\"0x0000000000000000000000000000000000000046\":\"0x0\",\"0x0000000000000000000000000000000000000047\":\"0x0\",\"0x0000000000000000000000000000000000000048\":\"0x0\",\"0x0000000000000000000000000000000000000049\":\"0x0\",\"0x000000000000000000000000000000000000004a\":\"0x0\",\"0x000000000000000000000000000000000000004b\":\"0x0\",\"0x000000000000000000000000000000000000004c\":\"0x0\",\"0x000000000000000000000000000000000000004d\":\"0x0\",\"0x000000000000000000000000000000000000004e\":\"0x0\",\"0x000000000000000000000000000000000000004f\":\"0x0\",\"0x0000000000000000000000000000000000000050\":\"0x0\",\"0x0000000000000000000000000000000000000051\":\"0x0\",\"0x0000000000000000000000000000000000000052\":\"0x0\",\"0x0000000000000000000000000000000000000053\":\"0x0\",\"0x0000000000000000000000000000000000000054\":\"0x0\",\"0x0000000000000000000000000000000000000055\":\"0x0\",\"0x0000000000000000000000000000000000000056\":\"0x0\",\"0x0000000000000000000000000000000000000057\":\"0x0\",\"0x0000000000000000000000000000000000000058\":\"0x0\",\"0x0000000000000000000000000000000000000059\":\"0x0\",\"0x000000000000000000000000000000000000005a\":\"0x0\",\"0x000000000000000000000000000000000000005b\":\"0x0\",\"0x000000000000000000000000000000000000005c\":\"0x0\",\"0x000000000000000000000000000000000000005d\":\"0x0\",\"0x000000000000000000000000000000000000005e\":\"0x0\",\"0x000000000000000000000000000000000000005f\":\"0x0\",\"0x0000000000000000000000000000000000000060\":\"0x0\",\"0x0000000000000000000000000000000000000061\":\"0x0\",\"0x0000000000000000000000000000000000000062\":\"0x0\",\"0x0000000000000000000000000000000000000063\":\"0x0\",\"0x0000000000000000000000000000000000000064\":\"0x0\",\"0x0000000000000000000000000000000000000065\":\"0x0\",\"0x0000000000000000000000000000000000000066\":\"0x0\",\"0x0000000000000000000000000000000000000067\":\"0x0\",\"0x0000000000000000000000000000000000000068\":\"0x0\",\"0x0000000000000000000000000000000000000069\":\"0x0\",\"0x000000000000000000000000000000000000006a\":\"0x0\",\"0x000000000000000000000000000000000000006b\":\"0x0\",\"0x000000000000000000000000000000000000006c\":\"0x0\",\"0x000000000000000000000000000000000000006d\":\"0x0\",\"0x000000000000000000000000000000000000006e\":\"0x0\",\"0x000000000000000000000000000000000000006f\":\"0x0\",\"0x0000000000000000000000000000000000000070\":\"0x0\",\"0x0000000000000000000000000000000000000071\":\"0x0\",\"0x0000000000000000000000000000000000000072\":\"0x0\",\"0x0000000000000000000000000000000000000073\":\"0x0\",\"0x0000000000000000000000000000000000000074\":\"0x0\",\"0x0000000000000000000000000000000000000075\":\"0x0\",\"0x0000000000000000000000000000000000000076\":\"0x0\",\"0x0000000000000000000000000000000000000077\":\"0x0\",\"0x0000000000000000000000000000000000000078\":\"0x0\",\"0x0000000000000000000000000000000000000079\":\"0x0\",\"0x000000000000000000000000000000000000007a\":\"0x0\",\"0x000000000000000000000000000000000000007b\":\"0x0\",\"0x000000000000000000000000000000000000007c\":\"0x0\",\"0x000000000000000000000000000000000000007d\":\"0x0\",\"0x000000000000000000000000000000000000007e\":\"0x0\",\"0x000000000000000000000000000000000000007f\":\"0x0\",\"0x0000000000000000000000000000000000000080\":\"0x0\",\"0x0000000000000000000000000000000000000081\":\"0x0\",\"0x0000000000000000000000000000000000000082\":\"0x0\",\"0x0000000000000000000000000000000000000083\":\"0x0\",\"0x0000000000000000000000000000000000000084\":\"0x0\",\"0x0000000000000000000000000000000000000085\":\"0x0\",\"0x0000000000000000000000000000000000000086\":\"0x0\",\"0x0000000000000000000000000000000000000087\":\"0x0\",\"0x0000000000000000000000000000000000000088\":\"0x0\",\"0x0000000000000000000000000000000000000089\":\"0x0\",\"0x000000000000000000000000000000000000008a\":\"0x0\",\"0x000000000000000000000000000000000000008b\":\"0x0\",\"0x000000000000000000000000000000000000008c\":\"0x0\",\"0x000000000000000000000000000000000000008d\":\"0x0\",\"0x000000000000000000000000000000000000008e\":\"0x0\",\"0x000000000000000000000000000000000000008f\":\"0x0\",\"0x0000000000000000000000000000000000000090\":\"0x0\",\"0x0000000000000000000000000000000000000091\":\"0x0\",\"0x0000000000000000000000000000000000000092\":\"0x0\",\"0x0000000000000000000000000000000000000093\":\"0x0\",\"0x0000000000000000000000000000000000000094\":\"0x0\",\"0x0000000000000000000000000000000000000095\":\"0x0\",\"0x0000000000000000000000000000000000000096\":\"0x0\",\"0x0000000000000000000000000000000000000097\":\"0x0\",\"0x0000000000000000000000000000000000000098\":\"0x0\",\"0x0000000000000000000000000000000000000099\":\"0x0\",\"0x000000000000000000000000000000000000009a\":\"0x0\",\"0x000000000000000000000000000000000000009b\":\"0x0\",\"0x000000000000000000000000000000000000009c\":\"0x0\",\"0x000000000000000000000000000000000000009d\":\"0x0\",\"0x000000000000000000000000000000000000009e\":\"0x0\",\"0x000000000000000000000000000000000000009f\":\"0x0\",\"0x00000000000000000000000000000000000000a0\":\"0x0\",\"0x00000000000000000000000000000000000000a1\":\"0x0\",\"0x00000000000000000000000000000000000000a2\":\"0x0\",\"0x00000000000000000000000000000000000000a3\":\"0x0\",\"0x00000000000000000000000000000000000000a4\":\"0x0\",\"0x00000000000000000000000000000000000000a5\":\"0x0\",\"0x00000000000000000000000000000000000000a6\":\"0x0\",\"0x00000000000000000000000000000000000000a7\":\"0x0\",\"0x00000000000000000000000000000000000000a8\":\"0x0\",\"0x00000000000000000000000000000000000000a9\":\"0x0\",\"0x00000000000000000000000000000000000000aa\":\"0x0\",\"0x00000000000000000000000000000000000000ab\":\"0x0\",\"0x00000000000000000000000000000000000000ac\":\"0x0\",\"0x00000000000000000000000000000000000000ad\":\"0x0\",\"0x00000000000000000000000000000000000000ae\":\"0x0\",\"0x00000000000000000000000000000000000000af\":\"0x0\",\"0x00000000000000000000000000000000000000b0\":\"0x0\",\"0x00000000000000000000000000000000000000b1\":\"0x0\",\"0x00000000000000000000000000000000000000b2\":\"0x0\",\"0x00000000000000000000000000000000000000b3\":\"0x0\",\"0x00000000000000000000000000000000000000b4\":\"0x0\",\"0x00000000000000000000000000000000000000b5\":\"0x0\",\"0x00000000000000000000000000000000000000b6\":\"0x0\",\"0x00000000000000000000000000000000000000b7\":\"0x0\",\"0x00000000000000000000000000000000000000b8\":\"0x0\",\"0x00000000000000000000000000000000000000b9\":\"0x0\",\"0x00000000000000000000000000000000000000ba\":\"0x0\",\"0x00000000000000000000000000000000000000bb\":\"0x0\",\"0x00000000000000000000000000000000000000bc\":\"0x0\",\"0x00000000000000000000000000000000000000bd\":\"0x0\",\"0x00000000000000000000000000000000000000be\":\"0x0\",\"0x00000000000000000000000000000000000000bf\":\"0x0\",\"0x00000000000000000000000000000000000000c0\":\"0x0\",\"0x00000000000000000000000000000000000000c1\":\"0x0\",\"0x00000000000000000000000000000000000000c2\":\"0x0\",\"0x00000000000000000000000000000000000000c3\":\"0x0\",\"0x00000000000000000000000000000000000000c4\":\"0x0\",\"0x00000000000000000000000000000000000000c5\":\"0x0\",\"0x00000000000000000000000000000000000000c6\":\"0x0\",\"0x00000000000000000000000000000000000000c7\":\"0x0\",\"0x00000000000000000000000000000000000000c8\":\"0x0\",\"0x00000000000000000000000000000000000000c9\":\"0x0\",\"0x00000000000000000000000000000000000000ca\":\"0x0\",\"0x00000000000000000000000000000000000000cb\":\"0x0\",\"0x00000000000000000000000000000000000000cc\":\"0x0\",\"0x00000000000000000000000000000000000000cd\":\"0x0\",\"0x00000000000000000000000000000000000000ce\":\"0x0\",\"0x00000000000000000000000000000000000000cf\":\"0x0\",\"0x00000000000000000000000000000000000000d0\":\"0x0\",\"0x00000000000000000000000000000000000000d1\":\"0x0\",\"0x00000000000000000000000000000000000000d2\":\"0x0\",\"0x00000000000000000000000000000000000000d3\":\"0x0\",\"0x00000000000000000000000000000000000000d4\":\"0x0\",\"0x00000000000000000000000000000000000000d5\":\"0x0\",\"0x00000000000000000000000000000000000000d6\":\"0x0\",\"0x00000000000000000000000000000000000000d7\":\"0x0\",\"0x00000000000000000000000000000000000000d8\":\"0x0\",\"0x00000000000000000000000000000000000000d9\":\"0x0\",\"0x00000000000000000000000000000000000000da\":\"0x0\",\"0x00000000000000000000000000000000000000db\":\"0x0\",\"0x00000000000000000000000000000000000000dc\":\"0x0\",\"0x00000000000000000000000000000000000000dd\":\"0x0\",\"0x00000000000000000000000000000000000000de\":\"0x0\",\"0x00000000000000000000000000000000000000df\":\"0x0\",\"0x00000000000000000000000000000000000000e0\":\"0x0\",\"0x00000000000000000000000000000000000000e1\":\"0x0\",\"0x00000000000000000000000000000000000000e2\":\"0x0\",\"0x00000000000000000000000000000000000000e3\":\"0x0\",\"0x00000000000000000000000000000000000000e4\":\"0x0\",\"0x00000000000000000000000000000000000000e5\":\"0x0\",\"0x00000000000000000000000000000000000000e6\":\"0x0\",\"0x00000000000000000000000000000000000000e7\":\"0x0\",\"0x00000000000000000000000000000000000000e8\":\"0x0\",\"0x00000000000000000000000000000000000000e9\":\"0x0\",\"0x00000000000000000000000000000000000000ea\":\"0x0\",\"0x00000000000000000000000000000000000000eb\":\"0x0\",\"0x00000000000000000000000000000000000000ec\":\"0x0\",\"0x00000000000000000000000000000000000000ed\":\"0x0\",\"0x00000000000000000000000000000000000000ee\":\"0x0\",\"0x00000000000000000000000000000000000000ef\":\"0x0\",\"0x00000000000000000000000000000000000000f0\":\"0x0\",\"0x00000000000000000000000000000000000000f1\":\"0x0\",\"0x00000000000000000000000000000000000000f2\":\"0x0\",\"0x00000000000000000000000000000000000000f3\":\"0x0\",\"0x00000000000000000000000000000000000000f4\":\"0x0\",\"0x00000000000000000000000000000000000000f5\":\"0x0\",\"0x00000000000000000000000000000000000000f6\":\"0x0\",\"0x00000000000000000000000000000000000000f7\":\"0x0\",\"0x00000000000000000000000000000000000000f8\":\"0x0\",\"0x00000000000000000000000000000000000000f9\":\"0x0\",\"0x00000000000000000000000000000000000000fa\":\"0x0\",\"0x00000000000000000000000000000000000000fb\":\"0x0\",\"0x00000000000000000000000000000000000000fc\":\"0x0\",\"0x00000000000000000000000000000000000000fd\":\"0x0\",\"0x00000000000000000000000000000000000000fe\":\"0x0\",\"0x00000000000000000000000000000000000000ff\":\"0x0\",\"0x874b54a8bd152966d63f706bae1ffeb0411921e5\":\"0xc9f2c9cd04674edea40000000\"}");

/***/ }),

/***/ 521964:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var createKeccakHash = __webpack_require__(465221);
var secp256k1 = __webpack_require__(907972);
var assert = __webpack_require__(742357);
var rlp = __webpack_require__(6636);
var BN = __webpack_require__(213550);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
Object.assign(exports, __webpack_require__(180884));

/**
 * the max integer that this VM can handle (a ```BN```)
 * @var {BN} MAX_INTEGER
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);

/**
 * 2^256 (a ```BN```)
 * @var {BN} TWO_POW256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);

/**
 * Keccak-256 hash of null (a ```String```)
 * @var {String} KECCAK256_NULL_S
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
exports.SHA3_NULL_S = exports.KECCAK256_NULL_S;

/**
 * Keccak-256 hash of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_NULL
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
exports.SHA3_NULL = exports.KECCAK256_NULL;

/**
 * Keccak-256 of an RLP of an empty array (a ```String```)
 * @var {String} KECCAK256_RLP_ARRAY_S
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S;

/**
 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP_ARRAY
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY;

/**
 * Keccak-256 hash of the RLP of null  (a ```String```)
 * @var {String} KECCAK256_RLP_S
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
exports.SHA3_RLP_S = exports.KECCAK256_RLP_S;

/**
 * Keccak-256 hash of the RLP of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
exports.SHA3_RLP = exports.KECCAK256_RLP;

/**
 * [`BN`](https://github.com/indutny/bn.js)
 * @var {Function}
 */
exports.BN = BN;

/**
 * [`rlp`](https://github.com/ethereumjs/rlp)
 * @var {Function}
 */
exports.rlp = rlp;

/**
 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
 * @var {Object}
 */
exports.secp256k1 = secp256k1;

/**
 * Returns a buffer filled with 0s
 * @method zeros
 * @param {Number} bytes  the number of bytes the buffer should be
 * @return {Buffer}
 */
exports.zeros = function (bytes) {
  return Buffer.allocUnsafe(bytes).fill(0);
};

/**
  * Returns a zero address
  * @method zeroAddress
  * @return {String}
  */
exports.zeroAddress = function () {
  var addressLength = 20;
  var zeroAddress = exports.zeros(addressLength);
  return exports.bufferToHex(zeroAddress);
};

/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @method lsetLength
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @param {Boolean} [right=false] whether to start padding form the left or right
 * @return {Buffer|Array}
 */
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
  var buf = exports.zeros(length);
  msg = exports.toBuffer(msg);
  if (right) {
    if (msg.length < length) {
      msg.copy(buf);
      return buf;
    }
    return msg.slice(0, length);
  } else {
    if (msg.length < length) {
      msg.copy(buf, length - msg.length);
      return buf;
    }
    return msg.slice(-length);
  }
};

/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @return {Buffer|Array}
 */
exports.setLengthRight = function (msg, length) {
  return exports.setLength(msg, length, true);
};

/**
 * Trims leading zeros from a `Buffer` or an `Array`
 * @param {Buffer|Array|String} a
 * @return {Buffer|Array|String}
 */
exports.unpad = exports.stripZeros = function (a) {
  a = exports.stripHexPrefix(a);
  var first = a[0];
  while (a.length > 0 && first.toString() === '0') {
    a = a.slice(1);
    first = a[0];
  }
  return a;
};
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param {*} v the value
 */
exports.toBuffer = function (v) {
  if (!Buffer.isBuffer(v)) {
    if (Array.isArray(v)) {
      v = Buffer.from(v);
    } else if (typeof v === 'string') {
      if (exports.isHexString(v)) {
        v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (typeof v === 'number') {
      v = exports.intToBuffer(v);
    } else if (v === null || v === undefined) {
      v = Buffer.allocUnsafe(0);
    } else if (BN.isBN(v)) {
      v = v.toArrayLike(Buffer);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type');
    }
  }
  return v;
};

/**
 * Converts a `Buffer` to a `Number`
 * @param {Buffer} buf
 * @return {Number}
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
  return new BN(exports.toBuffer(buf)).toNumber();
};

/**
 * Converts a `Buffer` into a hex `String`
 * @param {Buffer} buf
 * @return {String}
 */
exports.bufferToHex = function (buf) {
  buf = exports.toBuffer(buf);
  return '0x' + buf.toString('hex');
};

/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param {Buffer} num
 * @return {BN}
 */
exports.fromSigned = function (num) {
  return new BN(num).fromTwos(256);
};

/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param {BN} num
 * @return {Buffer}
 */
exports.toUnsigned = function (num) {
  return Buffer.from(num.toTwos(256).toArray());
};

/**
 * Creates Keccak hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the Keccak width
 * @return {Buffer}
 */
exports.keccak = function (a, bits) {
  a = exports.toBuffer(a);
  if (!bits) bits = 256;

  return createKeccakHash('keccak' + bits).update(a).digest();
};

/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.keccak256 = function (a) {
  return exports.keccak(a);
};

/**
 * Creates SHA-3 (Keccak) hash of the input [OBSOLETE]
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the SHA-3 width
 * @return {Buffer}
 */
exports.sha3 = exports.keccak;

/**
 * Creates SHA256 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.sha256 = function (a) {
  a = exports.toBuffer(a);
  return createHash('sha256').update(a).digest();
};

/**
 * Creates RIPEMD160 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Boolean} padded whether it should be padded to 256 bits or not
 * @return {Buffer}
 */
exports.ripemd160 = function (a, padded) {
  a = exports.toBuffer(a);
  var hash = createHash('rmd160').update(a).digest();
  if (padded === true) {
    return exports.setLength(hash, 32);
  } else {
    return hash;
  }
};

/**
 * Creates SHA-3 hash of the RLP encoded version of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.rlphash = function (a) {
  return exports.keccak(rlp.encode(a));
};

/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 * @param {Buffer} privateKey
 * @return {Boolean}
 */
exports.isValidPrivate = function (privateKey) {
  return secp256k1.privateKeyVerify(privateKey);
};

/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Boolean}
 */
exports.isValidPublic = function (publicKey, sanitize) {
  if (publicKey.length === 64) {
    // Convert to SEC1 for secp256k1
    return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
  }

  if (!sanitize) {
    return false;
  }

  return secp256k1.publicKeyVerify(publicKey);
};

/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Buffer}
 */
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
  pubKey = exports.toBuffer(pubKey);
  if (sanitize && pubKey.length !== 64) {
    pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
  }
  assert(pubKey.length === 64);
  // Only take the lower 160bits of the hash
  return exports.keccak(pubKey).slice(-20);
};

/**
 * Returns the ethereum public key of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
var privateToPublic = exports.privateToPublic = function (privateKey) {
  privateKey = exports.toBuffer(privateKey);
  // skip the type flag and use the X, Y points
  return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};

/**
 * Converts a public key to the Ethereum format.
 * @param {Buffer} publicKey
 * @return {Buffer}
 */
exports.importPublic = function (publicKey) {
  publicKey = exports.toBuffer(publicKey);
  if (publicKey.length !== 64) {
    publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
  }
  return publicKey;
};

/**
 * ECDSA sign
 * @param {Buffer} msgHash
 * @param {Buffer} privateKey
 * @return {Object}
 */
exports.ecsign = function (msgHash, privateKey) {
  var sig = secp256k1.sign(msgHash, privateKey);

  var ret = {};
  ret.r = sig.signature.slice(0, 32);
  ret.s = sig.signature.slice(32, 64);
  ret.v = sig.recovery + 27;
  return ret;
};

/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 * @param message
 * @returns {Buffer} hash
 */
exports.hashPersonalMessage = function (message) {
  var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString());
  return exports.keccak(Buffer.concat([prefix, message]));
};

/**
 * ECDSA public key recovery from signature
 * @param {Buffer} msgHash
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {Buffer} publicKey
 */
exports.ecrecover = function (msgHash, v, r, s) {
  var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
  var recovery = v - 27;
  if (recovery !== 0 && recovery !== 1) {
    throw new Error('Invalid signature v value');
  }
  var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
  return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};

/**
 * Convert signature parameters into the format of `eth_sign` RPC method
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {String} sig
 */
exports.toRpcSig = function (v, r, s) {
  // NOTE: with potential introduction of chainId this might need to be updated
  if (v !== 27 && v !== 28) {
    throw new Error('Invalid recovery id');
  }

  // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
  // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
  return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)]));
};

/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 * @param {String} sig
 * @return {Object}
 */
exports.fromRpcSig = function (sig) {
  sig = exports.toBuffer(sig);

  // NOTE: with potential introduction of chainId this might need to be updated
  if (sig.length !== 65) {
    throw new Error('Invalid signature length');
  }

  var v = sig[64];
  // support both versions of `eth_sign` responses
  if (v < 27) {
    v += 27;
  }

  return {
    v: v,
    r: sig.slice(0, 32),
    s: sig.slice(32, 64)
  };
};

/**
 * Returns the ethereum address of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
exports.privateToAddress = function (privateKey) {
  return exports.publicToAddress(privateToPublic(privateKey));
};

/**
 * Checks if the address is a valid. Accepts checksummed addresses too
 * @param {String} address
 * @return {Boolean}
 */
exports.isValidAddress = function (address) {
  return (/^0x[0-9a-fA-F]{40}$/.test(address)
  );
};

/**
  * Checks if a given address is a zero address
  * @method isZeroAddress
  * @param {String} address
  * @return {Boolean}
  */
exports.isZeroAddress = function (address) {
  var zeroAddress = exports.zeroAddress();
  return zeroAddress === exports.addHexPrefix(address);
};

/**
 * Returns a checksummed address
 * @param {String} address
 * @return {String}
 */
exports.toChecksumAddress = function (address) {
  address = exports.stripHexPrefix(address).toLowerCase();
  var hash = exports.keccak(address).toString('hex');
  var ret = '0x';

  for (var i = 0; i < address.length; i++) {
    if (parseInt(hash[i], 16) >= 8) {
      ret += address[i].toUpperCase();
    } else {
      ret += address[i];
    }
  }

  return ret;
};

/**
 * Checks if the address is a valid checksummed address
 * @param {Buffer} address
 * @return {Boolean}
 */
exports.isValidChecksumAddress = function (address) {
  return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};

/**
 * Generates an address of a newly created contract
 * @param {Buffer} from the address which is creating this new address
 * @param {Buffer} nonce the nonce of the from account
 * @return {Buffer}
 */
exports.generateAddress = function (from, nonce) {
  from = exports.toBuffer(from);
  nonce = new BN(nonce);

  if (nonce.isZero()) {
    // in RLP we want to encode null in the case of zero nonce
    // read the RLP documentation for an answer if you dare
    nonce = null;
  } else {
    nonce = Buffer.from(nonce.toArray());
  }

  // Only take the lower 160bits of the hash
  return exports.rlphash([from, nonce]).slice(-20);
};

/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
 * @param {Buffer|String} address
 * @return {Boolean}
 */
exports.isPrecompiled = function (address) {
  var a = exports.unpad(address);
  return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};

/**
 * Adds "0x" to a given `String` if it does not already start with "0x"
 * @param {String} str
 * @return {String}
 */
exports.addHexPrefix = function (str) {
  if (typeof str !== 'string') {
    return str;
  }

  return exports.isHexPrefixed(str) ? str : '0x' + str;
};

/**
 * Validate ECDSA signature
 * @method isValidSignature
 * @param {Buffer} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @param {Boolean} [homestead=true]
 * @return {Boolean}
 */

exports.isValidSignature = function (v, r, s, homestead) {
  var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
  var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);

  if (r.length !== 32 || s.length !== 32) {
    return false;
  }

  if (v !== 27 && v !== 28) {
    return false;
  }

  r = new BN(r);
  s = new BN(s);

  if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
    return false;
  }

  if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) {
    return false;
  }

  return true;
};

/**
 * Converts a `Buffer` or `Array` to JSON
 * @param {Buffer|Array} ba
 * @return {Array|String|null}
 */
exports.baToJSON = function (ba) {
  if (Buffer.isBuffer(ba)) {
    return '0x' + ba.toString('hex');
  } else if (ba instanceof Array) {
    var array = [];
    for (var i = 0; i < ba.length; i++) {
      array.push(exports.baToJSON(ba[i]));
    }
    return array;
  }
};

/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param {Object} self the `Object` to define properties on
 * @param {Array} fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param {*} data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
  self.raw = [];
  self._fields = [];

  // attach the `toJSON`
  self.toJSON = function (label) {
    if (label) {
      var obj = {};
      self._fields.forEach(function (field) {
        obj[field] = '0x' + self[field].toString('hex');
      });
      return obj;
    }
    return exports.baToJSON(this.raw);
  };

  self.serialize = function serialize() {
    return rlp.encode(self.raw);
  };

  fields.forEach(function (field, i) {
    self._fields.push(field.name);
    function getter() {
      return self.raw[i];
    }
    function setter(v) {
      v = exports.toBuffer(v);

      if (v.toString('hex') === '00' && !field.allowZero) {
        v = Buffer.allocUnsafe(0);
      }

      if (field.allowLess && field.length) {
        v = exports.stripZeros(v);
        assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes');
      } else if (!(field.allowZero && v.length === 0) && field.length) {
        assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length);
      }

      self.raw[i] = v;
    }

    Object.defineProperty(self, field.name, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter
    });

    if (field.default) {
      self[field.name] = field.default;
    }

    // attach alias
    if (field.alias) {
      Object.defineProperty(self, field.alias, {
        enumerable: false,
        configurable: true,
        set: setter,
        get: getter
      });
    }
  });

  // if the constuctor is passed data
  if (data) {
    if (typeof data === 'string') {
      data = Buffer.from(exports.stripHexPrefix(data), 'hex');
    }

    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }

    if (Array.isArray(data)) {
      if (data.length > self._fields.length) {
        throw new Error('wrong number of fields in data');
      }

      // make sure all the items are buffers
      data.forEach(function (d, i) {
        self[self._fields[i]] = exports.toBuffer(d);
      });
    } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
      var keys = Object.keys(data);
      fields.forEach(function (field) {
        if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name];
        if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias];
      });
    } else {
      throw new Error('invalid data');
    }
  }
};

/***/ }),

/***/ 219679:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const EventEmitter = __webpack_require__(128614).EventEmitter
const inherits = __webpack_require__(431669).inherits

module.exports = Stoplight


inherits(Stoplight, EventEmitter)

function Stoplight(){
  const self = this
  EventEmitter.call(self)
  self.isLocked = true
}

Stoplight.prototype.go = function(){
  const self = this
  if (!self.isLocked) return
  self.isLocked = false
  self.emit('unlock')
}

Stoplight.prototype.stop = function(){
  const self = this
  if (self.isLocked) return
  self.isLocked = true
  self.emit('lock')
}

Stoplight.prototype.await = function(fn){
  const self = this
  if (self.isLocked) {
    self.once('unlock', fn)
  } else {
    setTimeout(fn)
  }
}

/***/ }),

/***/ 417648:
/***/ ((module) => {

"use strict";


/* eslint no-invalid-this: 1 */

var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';

module.exports = function bind(that) {
    var target = this;
    if (typeof target !== 'function' || toStr.call(target) !== funcType) {
        throw new TypeError(ERROR_MESSAGE + target);
    }
    var args = slice.call(arguments, 1);

    var bound;
    var binder = function () {
        if (this instanceof bound) {
            var result = target.apply(
                this,
                args.concat(slice.call(arguments))
            );
            if (Object(result) === result) {
                return result;
            }
            return this;
        } else {
            return target.apply(
                that,
                args.concat(slice.call(arguments))
            );
        }
    };

    var boundLength = Math.max(0, target.length - args.length);
    var boundArgs = [];
    for (var i = 0; i < boundLength; i++) {
        boundArgs.push('$' + i);
    }

    bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);

    if (target.prototype) {
        var Empty = function Empty() {};
        Empty.prototype = target.prototype;
        bound.prototype = new Empty();
        Empty.prototype = null;
    }

    return bound;
};


/***/ }),

/***/ 158612:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(417648);

module.exports = Function.prototype.bind || implementation;


/***/ }),

/***/ 244977:
/***/ ((module) => {

"use strict";


module.exports = createRBTree

var RED   = 0
var BLACK = 1

function RBNode(color, key, value, left, right, count) {
  this._color = color
  this.key = key
  this.value = value
  this.left = left
  this.right = right
  this._count = count
}

function cloneNode(node) {
  return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count)
}

function repaint(color, node) {
  return new RBNode(color, node.key, node.value, node.left, node.right, node._count)
}

function recount(node) {
  node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0)
}

function RedBlackTree(compare, root) {
  this._compare = compare
  this.root = root
}

var proto = RedBlackTree.prototype

Object.defineProperty(proto, "keys", {
  get: function() {
    var result = []
    this.forEach(function(k,v) {
      result.push(k)
    })
    return result
  }
})

Object.defineProperty(proto, "values", {
  get: function() {
    var result = []
    this.forEach(function(k,v) {
      result.push(v)
    })
    return result
  }
})

//Returns the number of nodes in the tree
Object.defineProperty(proto, "length", {
  get: function() {
    if(this.root) {
      return this.root._count
    }
    return 0
  }
})

//Insert a new item into the tree
proto.insert = function(key, value) {
  var cmp = this._compare
  //Find point to insert new node at
  var n = this.root
  var n_stack = []
  var d_stack = []
  while(n) {
    var d = cmp(key, n.key)
    n_stack.push(n)
    d_stack.push(d)
    if(d <= 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  //Rebuild path to leaf node
  n_stack.push(new RBNode(RED, key, value, null, null, 1))
  for(var s=n_stack.length-2; s>=0; --s) {
    var n = n_stack[s]
    if(d_stack[s] <= 0) {
      n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1)
    } else {
      n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1)
    }
  }
  //Rebalance tree using rotations
  //console.log("start insert", key, d_stack)
  for(var s=n_stack.length-1; s>1; --s) {
    var p = n_stack[s-1]
    var n = n_stack[s]
    if(p._color === BLACK || n._color === BLACK) {
      break
    }
    var pp = n_stack[s-2]
    if(pp.left === p) {
      if(p.left === n) {
        var y = pp.right
        if(y && y._color === RED) {
          //console.log("LLr")
          p._color = BLACK
          pp.right = repaint(BLACK, y)
          pp._color = RED
          s -= 1
        } else {
          //console.log("LLb")
          pp._color = RED
          pp.left = p.right
          p._color = BLACK
          p.right = pp
          n_stack[s-2] = p
          n_stack[s-1] = n
          recount(pp)
          recount(p)
          if(s >= 3) {
            var ppp = n_stack[s-3]
            if(ppp.left === pp) {
              ppp.left = p
            } else {
              ppp.right = p
            }
          }
          break
        }
      } else {
        var y = pp.right
        if(y && y._color === RED) {
          //console.log("LRr")
          p._color = BLACK
          pp.right = repaint(BLACK, y)
          pp._color = RED
          s -= 1
        } else {
          //console.log("LRb")
          p.right = n.left
          pp._color = RED
          pp.left = n.right
          n._color = BLACK
          n.left = p
          n.right = pp
          n_stack[s-2] = n
          n_stack[s-1] = p
          recount(pp)
          recount(p)
          recount(n)
          if(s >= 3) {
            var ppp = n_stack[s-3]
            if(ppp.left === pp) {
              ppp.left = n
            } else {
              ppp.right = n
            }
          }
          break
        }
      }
    } else {
      if(p.right === n) {
        var y = pp.left
        if(y && y._color === RED) {
          //console.log("RRr", y.key)
          p._color = BLACK
          pp.left = repaint(BLACK, y)
          pp._color = RED
          s -= 1
        } else {
          //console.log("RRb")
          pp._color = RED
          pp.right = p.left
          p._color = BLACK
          p.left = pp
          n_stack[s-2] = p
          n_stack[s-1] = n
          recount(pp)
          recount(p)
          if(s >= 3) {
            var ppp = n_stack[s-3]
            if(ppp.right === pp) {
              ppp.right = p
            } else {
              ppp.left = p
            }
          }
          break
        }
      } else {
        var y = pp.left
        if(y && y._color === RED) {
          //console.log("RLr")
          p._color = BLACK
          pp.left = repaint(BLACK, y)
          pp._color = RED
          s -= 1
        } else {
          //console.log("RLb")
          p.left = n.right
          pp._color = RED
          pp.right = n.left
          n._color = BLACK
          n.right = p
          n.left = pp
          n_stack[s-2] = n
          n_stack[s-1] = p
          recount(pp)
          recount(p)
          recount(n)
          if(s >= 3) {
            var ppp = n_stack[s-3]
            if(ppp.right === pp) {
              ppp.right = n
            } else {
              ppp.left = n
            }
          }
          break
        }
      }
    }
  }
  //Return new tree
  n_stack[0]._color = BLACK
  return new RedBlackTree(cmp, n_stack[0])
}


//Visit all nodes inorder
function doVisitFull(visit, node) {
  if(node.left) {
    var v = doVisitFull(visit, node.left)
    if(v) { return v }
  }
  var v = visit(node.key, node.value)
  if(v) { return v }
  if(node.right) {
    return doVisitFull(visit, node.right)
  }
}

//Visit half nodes in order
function doVisitHalf(lo, compare, visit, node) {
  var l = compare(lo, node.key)
  if(l <= 0) {
    if(node.left) {
      var v = doVisitHalf(lo, compare, visit, node.left)
      if(v) { return v }
    }
    var v = visit(node.key, node.value)
    if(v) { return v }
  }
  if(node.right) {
    return doVisitHalf(lo, compare, visit, node.right)
  }
}

//Visit all nodes within a range
function doVisit(lo, hi, compare, visit, node) {
  var l = compare(lo, node.key)
  var h = compare(hi, node.key)
  var v
  if(l <= 0) {
    if(node.left) {
      v = doVisit(lo, hi, compare, visit, node.left)
      if(v) { return v }
    }
    if(h > 0) {
      v = visit(node.key, node.value)
      if(v) { return v }
    }
  }
  if(h > 0 && node.right) {
    return doVisit(lo, hi, compare, visit, node.right)
  }
}


proto.forEach = function rbTreeForEach(visit, lo, hi) {
  if(!this.root) {
    return
  }
  switch(arguments.length) {
    case 1:
      return doVisitFull(visit, this.root)
    break

    case 2:
      return doVisitHalf(lo, this._compare, visit, this.root)
    break

    case 3:
      if(this._compare(lo, hi) >= 0) {
        return
      }
      return doVisit(lo, hi, this._compare, visit, this.root)
    break
  }
}

//First item in list
Object.defineProperty(proto, "begin", {
  get: function() {
    var stack = []
    var n = this.root
    while(n) {
      stack.push(n)
      n = n.left
    }
    return new RedBlackTreeIterator(this, stack)
  }
})

//Last item in list
Object.defineProperty(proto, "end", {
  get: function() {
    var stack = []
    var n = this.root
    while(n) {
      stack.push(n)
      n = n.right
    }
    return new RedBlackTreeIterator(this, stack)
  }
})

//Find the ith item in the tree
proto.at = function(idx) {
  if(idx < 0) {
    return new RedBlackTreeIterator(this, [])
  }
  var n = this.root
  var stack = []
  while(true) {
    stack.push(n)
    if(n.left) {
      if(idx < n.left._count) {
        n = n.left
        continue
      }
      idx -= n.left._count
    }
    if(!idx) {
      return new RedBlackTreeIterator(this, stack)
    }
    idx -= 1
    if(n.right) {
      if(idx >= n.right._count) {
        break
      }
      n = n.right
    } else {
      break
    }
  }
  return new RedBlackTreeIterator(this, [])
}

proto.ge = function(key) {
  var cmp = this._compare
  var n = this.root
  var stack = []
  var last_ptr = 0
  while(n) {
    var d = cmp(key, n.key)
    stack.push(n)
    if(d <= 0) {
      last_ptr = stack.length
    }
    if(d <= 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  stack.length = last_ptr
  return new RedBlackTreeIterator(this, stack)
}

proto.gt = function(key) {
  var cmp = this._compare
  var n = this.root
  var stack = []
  var last_ptr = 0
  while(n) {
    var d = cmp(key, n.key)
    stack.push(n)
    if(d < 0) {
      last_ptr = stack.length
    }
    if(d < 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  stack.length = last_ptr
  return new RedBlackTreeIterator(this, stack)
}

proto.lt = function(key) {
  var cmp = this._compare
  var n = this.root
  var stack = []
  var last_ptr = 0
  while(n) {
    var d = cmp(key, n.key)
    stack.push(n)
    if(d > 0) {
      last_ptr = stack.length
    }
    if(d <= 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  stack.length = last_ptr
  return new RedBlackTreeIterator(this, stack)
}

proto.le = function(key) {
  var cmp = this._compare
  var n = this.root
  var stack = []
  var last_ptr = 0
  while(n) {
    var d = cmp(key, n.key)
    stack.push(n)
    if(d >= 0) {
      last_ptr = stack.length
    }
    if(d < 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  stack.length = last_ptr
  return new RedBlackTreeIterator(this, stack)
}

//Finds the item with key if it exists
proto.find = function(key) {
  var cmp = this._compare
  var n = this.root
  var stack = []
  while(n) {
    var d = cmp(key, n.key)
    stack.push(n)
    if(d === 0) {
      return new RedBlackTreeIterator(this, stack)
    }
    if(d <= 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  return new RedBlackTreeIterator(this, [])
}

//Removes item with key from tree
proto.remove = function(key) {
  var iter = this.find(key)
  if(iter) {
    return iter.remove()
  }
  return this
}

//Returns the item at `key`
proto.get = function(key) {
  var cmp = this._compare
  var n = this.root
  while(n) {
    var d = cmp(key, n.key)
    if(d === 0) {
      return n.value
    }
    if(d <= 0) {
      n = n.left
    } else {
      n = n.right
    }
  }
  return
}

//Iterator for red black tree
function RedBlackTreeIterator(tree, stack) {
  this.tree = tree
  this._stack = stack
}

var iproto = RedBlackTreeIterator.prototype

//Test if iterator is valid
Object.defineProperty(iproto, "valid", {
  get: function() {
    return this._stack.length > 0
  }
})

//Node of the iterator
Object.defineProperty(iproto, "node", {
  get: function() {
    if(this._stack.length > 0) {
      return this._stack[this._stack.length-1]
    }
    return null
  },
  enumerable: true
})

//Makes a copy of an iterator
iproto.clone = function() {
  return new RedBlackTreeIterator(this.tree, this._stack.slice())
}

//Swaps two nodes
function swapNode(n, v) {
  n.key = v.key
  n.value = v.value
  n.left = v.left
  n.right = v.right
  n._color = v._color
  n._count = v._count
}

//Fix up a double black node in a tree
function fixDoubleBlack(stack) {
  var n, p, s, z
  for(var i=stack.length-1; i>=0; --i) {
    n = stack[i]
    if(i === 0) {
      n._color = BLACK
      return
    }
    //console.log("visit node:", n.key, i, stack[i].key, stack[i-1].key)
    p = stack[i-1]
    if(p.left === n) {
      //console.log("left child")
      s = p.right
      if(s.right && s.right._color === RED) {
        //console.log("case 1: right sibling child red")
        s = p.right = cloneNode(s)
        z = s.right = cloneNode(s.right)
        p.right = s.left
        s.left = p
        s.right = z
        s._color = p._color
        n._color = BLACK
        p._color = BLACK
        z._color = BLACK
        recount(p)
        recount(s)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.left === p) {
            pp.left = s
          } else {
            pp.right = s
          }
        }
        stack[i-1] = s
        return
      } else if(s.left && s.left._color === RED) {
        //console.log("case 1: left sibling child red")
        s = p.right = cloneNode(s)
        z = s.left = cloneNode(s.left)
        p.right = z.left
        s.left = z.right
        z.left = p
        z.right = s
        z._color = p._color
        p._color = BLACK
        s._color = BLACK
        n._color = BLACK
        recount(p)
        recount(s)
        recount(z)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.left === p) {
            pp.left = z
          } else {
            pp.right = z
          }
        }
        stack[i-1] = z
        return
      }
      if(s._color === BLACK) {
        if(p._color === RED) {
          //console.log("case 2: black sibling, red parent", p.right.value)
          p._color = BLACK
          p.right = repaint(RED, s)
          return
        } else {
          //console.log("case 2: black sibling, black parent", p.right.value)
          p.right = repaint(RED, s)
          continue  
        }
      } else {
        //console.log("case 3: red sibling")
        s = cloneNode(s)
        p.right = s.left
        s.left = p
        s._color = p._color
        p._color = RED
        recount(p)
        recount(s)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.left === p) {
            pp.left = s
          } else {
            pp.right = s
          }
        }
        stack[i-1] = s
        stack[i] = p
        if(i+1 < stack.length) {
          stack[i+1] = n
        } else {
          stack.push(n)
        }
        i = i+2
      }
    } else {
      //console.log("right child")
      s = p.left
      if(s.left && s.left._color === RED) {
        //console.log("case 1: left sibling child red", p.value, p._color)
        s = p.left = cloneNode(s)
        z = s.left = cloneNode(s.left)
        p.left = s.right
        s.right = p
        s.left = z
        s._color = p._color
        n._color = BLACK
        p._color = BLACK
        z._color = BLACK
        recount(p)
        recount(s)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.right === p) {
            pp.right = s
          } else {
            pp.left = s
          }
        }
        stack[i-1] = s
        return
      } else if(s.right && s.right._color === RED) {
        //console.log("case 1: right sibling child red")
        s = p.left = cloneNode(s)
        z = s.right = cloneNode(s.right)
        p.left = z.right
        s.right = z.left
        z.right = p
        z.left = s
        z._color = p._color
        p._color = BLACK
        s._color = BLACK
        n._color = BLACK
        recount(p)
        recount(s)
        recount(z)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.right === p) {
            pp.right = z
          } else {
            pp.left = z
          }
        }
        stack[i-1] = z
        return
      }
      if(s._color === BLACK) {
        if(p._color === RED) {
          //console.log("case 2: black sibling, red parent")
          p._color = BLACK
          p.left = repaint(RED, s)
          return
        } else {
          //console.log("case 2: black sibling, black parent")
          p.left = repaint(RED, s)
          continue  
        }
      } else {
        //console.log("case 3: red sibling")
        s = cloneNode(s)
        p.left = s.right
        s.right = p
        s._color = p._color
        p._color = RED
        recount(p)
        recount(s)
        if(i > 1) {
          var pp = stack[i-2]
          if(pp.right === p) {
            pp.right = s
          } else {
            pp.left = s
          }
        }
        stack[i-1] = s
        stack[i] = p
        if(i+1 < stack.length) {
          stack[i+1] = n
        } else {
          stack.push(n)
        }
        i = i+2
      }
    }
  }
}

//Removes item at iterator from tree
iproto.remove = function() {
  var stack = this._stack
  if(stack.length === 0) {
    return this.tree
  }
  //First copy path to node
  var cstack = new Array(stack.length)
  var n = stack[stack.length-1]
  cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count)
  for(var i=stack.length-2; i>=0; --i) {
    var n = stack[i]
    if(n.left === stack[i+1]) {
      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)
    } else {
      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
    }
  }

  //Get node
  n = cstack[cstack.length-1]
  //console.log("start remove: ", n.value)

  //If not leaf, then swap with previous node
  if(n.left && n.right) {
    //console.log("moving to leaf")

    //First walk to previous leaf
    var split = cstack.length
    n = n.left
    while(n.right) {
      cstack.push(n)
      n = n.right
    }
    //Copy path to leaf
    var v = cstack[split-1]
    cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count))
    cstack[split-1].key = n.key
    cstack[split-1].value = n.value

    //Fix up stack
    for(var i=cstack.length-2; i>=split; --i) {
      n = cstack[i]
      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
    }
    cstack[split-1].left = cstack[split]
  }
  //console.log("stack=", cstack.map(function(v) { return v.value }))

  //Remove leaf node
  n = cstack[cstack.length-1]
  if(n._color === RED) {
    //Easy case: removing red leaf
    //console.log("RED leaf")
    var p = cstack[cstack.length-2]
    if(p.left === n) {
      p.left = null
    } else if(p.right === n) {
      p.right = null
    }
    cstack.pop()
    for(var i=0; i<cstack.length; ++i) {
      cstack[i]._count--
    }
    return new RedBlackTree(this.tree._compare, cstack[0])
  } else {
    if(n.left || n.right) {
      //Second easy case:  Single child black parent
      //console.log("BLACK single child")
      if(n.left) {
        swapNode(n, n.left)
      } else if(n.right) {
        swapNode(n, n.right)
      }
      //Child must be red, so repaint it black to balance color
      n._color = BLACK
      for(var i=0; i<cstack.length-1; ++i) {
        cstack[i]._count--
      }
      return new RedBlackTree(this.tree._compare, cstack[0])
    } else if(cstack.length === 1) {
      //Third easy case: root
      //console.log("ROOT")
      return new RedBlackTree(this.tree._compare, null)
    } else {
      //Hard case: Repaint n, and then do some nasty stuff
      //console.log("BLACK leaf no children")
      for(var i=0; i<cstack.length; ++i) {
        cstack[i]._count--
      }
      var parent = cstack[cstack.length-2]
      fixDoubleBlack(cstack)
      //Fix up links
      if(parent.left === n) {
        parent.left = null
      } else {
        parent.right = null
      }
    }
  }
  return new RedBlackTree(this.tree._compare, cstack[0])
}

//Returns key
Object.defineProperty(iproto, "key", {
  get: function() {
    if(this._stack.length > 0) {
      return this._stack[this._stack.length-1].key
    }
    return
  },
  enumerable: true
})

//Returns value
Object.defineProperty(iproto, "value", {
  get: function() {
    if(this._stack.length > 0) {
      return this._stack[this._stack.length-1].value
    }
    return
  },
  enumerable: true
})


//Returns the position of this iterator in the sorted list
Object.defineProperty(iproto, "index", {
  get: function() {
    var idx = 0
    var stack = this._stack
    if(stack.length === 0) {
      var r = this.tree.root
      if(r) {
        return r._count
      }
      return 0
    } else if(stack[stack.length-1].left) {
      idx = stack[stack.length-1].left._count
    }
    for(var s=stack.length-2; s>=0; --s) {
      if(stack[s+1] === stack[s].right) {
        ++idx
        if(stack[s].left) {
          idx += stack[s].left._count
        }
      }
    }
    return idx
  },
  enumerable: true
})

//Advances iterator to next element in list
iproto.next = function() {
  var stack = this._stack
  if(stack.length === 0) {
    return
  }
  var n = stack[stack.length-1]
  if(n.right) {
    n = n.right
    while(n) {
      stack.push(n)
      n = n.left
    }
  } else {
    stack.pop()
    while(stack.length > 0 && stack[stack.length-1].right === n) {
      n = stack[stack.length-1]
      stack.pop()
    }
  }
}

//Checks if iterator is at end of tree
Object.defineProperty(iproto, "hasNext", {
  get: function() {
    var stack = this._stack
    if(stack.length === 0) {
      return false
    }
    if(stack[stack.length-1].right) {
      return true
    }
    for(var s=stack.length-1; s>0; --s) {
      if(stack[s-1].left === stack[s]) {
        return true
      }
    }
    return false
  }
})

//Update value
iproto.update = function(value) {
  var stack = this._stack
  if(stack.length === 0) {
    throw new Error("Can't update empty node!")
  }
  var cstack = new Array(stack.length)
  var n = stack[stack.length-1]
  cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count)
  for(var i=stack.length-2; i>=0; --i) {
    n = stack[i]
    if(n.left === stack[i+1]) {
      cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count)
    } else {
      cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count)
    }
  }
  return new RedBlackTree(this.tree._compare, cstack[0])
}

//Moves iterator backward one element
iproto.prev = function() {
  var stack = this._stack
  if(stack.length === 0) {
    return
  }
  var n = stack[stack.length-1]
  if(n.left) {
    n = n.left
    while(n) {
      stack.push(n)
      n = n.right
    }
  } else {
    stack.pop()
    while(stack.length > 0 && stack[stack.length-1].left === n) {
      n = stack[stack.length-1]
      stack.pop()
    }
  }
}

//Checks if iterator is at start of tree
Object.defineProperty(iproto, "hasPrev", {
  get: function() {
    var stack = this._stack
    if(stack.length === 0) {
      return false
    }
    if(stack[stack.length-1].left) {
      return true
    }
    for(var s=stack.length-1; s>0; --s) {
      if(stack[s-1].right === stack[s]) {
        return true
      }
    }
    return false
  }
})

//Default comparison function
function defaultCompare(a, b) {
  if(a < b) {
    return -1
  }
  if(a > b) {
    return 1
  }
  return 0
}

//Build a tree
function createRBTree(compare) {
  return new RedBlackTree(compare || defaultCompare, null)
}

/***/ }),

/***/ 373863:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// this replaces `eth-block-tracker` in the provider-engine, as that block tracker is meant to work with
// an external provider instance

const EventEmitter = __webpack_require__(128614);
var blockHelper = __webpack_require__(575784);

function GanacheBlockTracker(opts) {
  opts = opts || {};
  EventEmitter.apply(this);
  if (!opts.blockchain) {
    throw new Error("RpcBlockTracker - no blockchain specified.");
  }
  if (!opts.blockchain.on) {
    throw new Error("RpcBlockTracker - blockchain is not an EventEmitter.");
  }
  this._blockchain = opts.blockchain;
  this.start = this.start.bind(this);
  this.stop = this.stop.bind(this);
  this.getTrackingBlock = this.getTrackingBlock.bind(this);
  this.awaitCurrentBlock = this.awaitCurrentBlock.bind(this);
  this._setCurrentBlock = this._setCurrentBlock.bind(this);
}

GanacheBlockTracker.prototype = Object.create(EventEmitter.prototype);
GanacheBlockTracker.prototype.constructor = GanacheBlockTracker;

GanacheBlockTracker.prototype.getTrackingBlock = function() {
  return this._currentBlock;
};

GanacheBlockTracker.prototype.getCurrentBlock = function() {
  return this._currentBlock;
};

GanacheBlockTracker.prototype.awaitCurrentBlock = function() {
  const self = this;
  // return if available
  if (this._currentBlock) {
    return this._currentBlock;
  }
  // wait for "sync" event
  return new Promise((resolve) => this.once("block", resolve)).then(() => self._currentBlock);
};

GanacheBlockTracker.prototype.start = function(opts = {}) {
  this._blockchain.on("block", this._setCurrentBlock);
  return Promise.resolve();
};

GanacheBlockTracker.prototype.stop = function() {
  this._isRunning = false;
  this._blockchain.removeListener("block", this._setCurrentBlock);
};

//
// private
//

GanacheBlockTracker.prototype._setCurrentBlock = function(newBlock) {
  const block = blockHelper.toJSON(newBlock, true);
  if (this._currentBlock && this._currentBlock.hash === block.hash) {
    return;
  }
  const oldBlock = this._currentBlock;
  this._currentBlock = block;
  this.emit("latest", block);
  this.emit("sync", { block, oldBlock });
  this.emit("block", block);
};

module.exports = GanacheBlockTracker;


/***/ }),

/***/ 85718:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var to = __webpack_require__(484302);
var Account = __webpack_require__(95789).default;
var Block = __webpack_require__(339951);
var Log = __webpack_require__(358410);
var Receipt = __webpack_require__(164191);
var VM = __webpack_require__(143040).default;
var Common = __webpack_require__(265982).default;
var RuntimeError = __webpack_require__(828175);
var Trie = __webpack_require__(822358);
var utils = __webpack_require__(791996);
var async = __webpack_require__(940008);
var Heap = __webpack_require__(354485);
var Database = __webpack_require__(693929);
var EventEmitter = __webpack_require__(128614);
var estimateGas = __webpack_require__(36457);
var _ = __webpack_require__(494517);
var promisify = __webpack_require__(431669).promisify;
const BN = utils.BN;

function BlockchainDouble(options) {
  var self = this;
  EventEmitter.apply(self);

  this.options = options = this._applyDefaultOptions(options || {});

  this.logger = options.logger || console;

  this.data = new Database(options);

  if (options.trie != null && options.db_path != null) {
    throw new Error("Can't initialize a TestRPC with a db and a custom trie.");
  }

  this.pending_transactions = [];

  // updated periodically to keep up with the times
  this.blockGasLimit = options.gasLimit;
  this.defaultTransactionGasLimit = options.defaultTransactionGasLimit;
  this.timeAdjustment = 0;
}

const defaultOptions = {
  gasLimit: "0x6691b7",
  defaultTransactionGasLimit: "0x15f90",
  time: null,
  debug: false,
  hardfork: "muirGlacier",
  allowUnlimitedContractSize: false
};

// inheritence w/ prototype chaining
BlockchainDouble.prototype = Object.create(EventEmitter.prototype);
BlockchainDouble.prototype.constructor = BlockchainDouble;

BlockchainDouble.prototype._applyDefaultOptions = function(options) {
  // We want this function to mutate the options object so that we can report
  // our settings back to our consumer application (e.g., ganache)
  return _.merge(options, defaultOptions, Object.assign({}, options));
};

BlockchainDouble.prototype.initialize = function(accounts, callback) {
  var self = this;

  this.data.initialize(function(err) {
    if (err) {
      return callback(err);
    }

    self.latestBlock(function(err, block) {
      if (err) {
        return callback(err);
      }

      var options = self.options;

      var root = null;

      if (block) {
        root = block.header.stateRoot;
      }

      // I haven't yet found a good way to do this. Getting the trie from the
      // forked blockchain without going through the other setup is a little gross.
      self.stateTrie = self.createStateTrie(self.data.trie_db, root);

      self.vm = options.vm || self.createVMFromStateTrie(self.stateTrie, true);

      if (options.time) {
        self.setTime(options.time);
      }

      // If we already have a block, then that means there's an existing chain.
      // Don't create a genesis block.
      if (block) {
        self.emit("block", block);
        return callback();
      }

      self.createGenesisBlock(function(err, block) {
        if (err) {
          return callback(err);
        }

        accounts = accounts || [];

        self.vm.stateManager.checkpoint(() => {
          async.eachSeries(
            accounts,
            function(accountData, finished) {
              self.vm.stateManager.putAccount(utils.toBuffer(accountData.address), accountData.account, finished);
            },
            function(err) {
              if (err) {
                return callback(err);
              }

              self.vm.stateManager.commit(() => {
                // Create first block
                self.putBlock(block, [], [], callback);
              });
            }
          );
        });
      });
    });
  });
};

BlockchainDouble.prototype.createVMFromStateTrie = function(state, activatePrecompiles) {
  const self = this;
  const common = Common.forCustomChain(
    "mainnet", // TODO needs to match chain id
    {
      name: "ganache",
      networkId: self.options.network_id || self.forkVersion,
      chainId: self.options._chainId,
      comment: "Local test network",
      bootstrapNodes: []
    },
    self.options.hardfork
  );

  const vm = new VM({
    state: state,
    common,
    blockchain: {
      // EthereumJS VM needs a blockchain object in order to get block information.
      // When calling getBlock() it will pass a number that's of a Buffer type.
      // Unfortunately, it uses a 64-character buffer (when converted to hex) to
      // represent block numbers as well as block hashes. Since it's very unlikely
      // any block number will get higher than the maximum safe Javascript integer,
      // we can convert this buffer to a number ahead of time before calling our
      // own getBlock(). If the conversion succeeds, we have a block number.
      // If it doesn't, we have a block hash. (Note: Our implementation accepts both.)
      getBlock: function(number, done) {
        try {
          number = to.number(number);
        } catch (e) {
          // Do nothing; must be a block hash.
        }

        self.getBlock(number, done);
      }
    },
    activatePrecompiles: activatePrecompiles || false,
    allowUnlimitedContractSize: self.options.allowUnlimitedContractSize
  });

  if (self.options.debug === true) {
    // log executed opcodes, including args as hex
    vm.on("step", function(info) {
      var name = info.opcode.name;
      var argsNum = info.opcode.in;
      if (argsNum) {
        var args = info.stack
          .slice(-argsNum)
          .map((arg) => to.hex(arg))
          .join(" ");

        self.logger.log(`${name} ${args}`);
      } else {
        self.logger.log(name);
      }
    });
  }

  return vm;
};

BlockchainDouble.prototype.createStateTrie = function(db, root) {
  return new Trie(db, root);
};

// Overrideable so other implementations (forking) can edit it.
BlockchainDouble.prototype.createGenesisBlock = function(callback) {
  this.createBlock(callback);
};

BlockchainDouble.prototype.latestBlock = function(callback) {
  this.data.blocks.last(function(err, last) {
    if (err) {
      return callback(err);
    }
    callback(null, last);
  });
};

// number accepts number (integer, hex) or tag (e.g., "latest")
BlockchainDouble.prototype.getEffectiveBlockNumber = function(number, callback) {
  if (typeof number !== "string") {
    number = to.hex(number);
  }

  // If we have a hex number
  if (number.indexOf("0x") >= 0) {
    return callback(null, to.number(number));
  } else {
    if (number === "latest" || number === "pending") {
      return this.getHeight(callback);
    } else if (number === "earliest") {
      return callback(null, 0);
    }
  }
};

// number accepts number (integer, hex), tag (e.g., "latest") or block hash
// This function is used by ethereumjs-vm
BlockchainDouble.prototype.getBlock = function(number, callback) {
  var self = this;

  if (typeof number !== "string") {
    number = to.hex(number);
  }

  // If we have a hex number or a block hash
  if (number.indexOf("0x") >= 0) {
    var hash = number;

    // block hash
    if (hash.length > 40) {
      this.data.blockHashes.get(to.hex(hash), function(err, blockIndex) {
        if (err) {
          return callback(err);
        }
        return self.data.blocks.get(blockIndex, callback);
      });
    } else {
      // Block number
      return this.data.blocks.get(to.number(hash), callback);
    }
  } else {
    if (number === "latest" || number === "pending") {
      return this.latestBlock(callback);
    } else if (number === "earliest") {
      return this.data.blocks.first(callback);
    } else {
      process.nextTick(callback, new Error("Invalid `blockNumber`: \"" + number + "\""));
    }
  }
};

BlockchainDouble.prototype.putBlock = function(block, logs, receipts, callback) {
  var self = this;

  // Lock in the state root for this block.
  block.header.stateRoot = this.stateTrie.root;

  this.data.blocks.length(function(err, length) {
    if (err) {
      return callback(err);
    }

    var requests = [
      self.data.blocks.push.bind(self.data.blocks, block),
      self.data.blockLogs.push.bind(self.data.blockLogs, logs),
      self.data.blockHashes.set.bind(self.data.blockHashes, to.hex(block.hash()), length)
    ];

    block.transactions.forEach(function(tx, index) {
      var txHash = to.hex(tx.hash());
      requests.push(
        self.data.transactions.set.bind(self.data.transactions, txHash, tx),
        self.data.transactionReceipts.set.bind(self.data.transactionReceipts, txHash, receipts[index])
      );
    });

    async.parallel(requests, (err, result) => {
      if (!err) {
        self.emit("block", block);
      }
      callback(err, result);
    });
  });
};

BlockchainDouble.prototype.popBlock = function(callback) {
  var self = this;

  this.data.blocks.last(function(err, block) {
    if (err) {
      return callback(err);
    }
    if (block == null) {
      return callback(null, null);
    }

    var requests = [];
    var blockHash = to.hex(block.hash());

    block.transactions.forEach(function(tx) {
      var txHash = to.hex(tx.hash());

      requests.push(
        self.data.transactions.del.bind(self.data.transactions, txHash),
        self.data.transactionReceipts.del.bind(self.data.transactionReceipts, txHash)
      );
    });

    requests.push(
      self.data.blockLogs.pop.bind(self.data.blockLogs),
      self.data.blockHashes.del.bind(self.data.blockHashes, blockHash),
      self.data.blocks.pop.bind(self.data.blocks) // Do this one last in case anything relies on it.
    );

    async.series(requests, function(err) {
      if (err) {
        return callback(err);
      }

      // Set the root to the last available, which will "roll back" to the previous
      // moment in time. Note that all the old data is still in the db, but it's now just junk data.
      self.data.blocks.last(function(err, newLastBlock) {
        if (err) {
          return callback(err);
        }
        // using setStateRoot because in the future it will automatically take care
        // of clearing the cache for us.
        // note setStateRoot checks for checkpoints, and if there are any, it will fail.
        // At time of writing this comment, the only time there could be a checkpoint
        // is in the middle of a vm.runBlock call. Once asyncRequestProcessing is reenabled
        // this will likely cause problems.
        self.vm.stateManager.setStateRoot(newLastBlock.header.stateRoot, function(err) {
          // Remember: Return block we popped off.
          callback(err, block);
        });
      });
    });
  });
};

BlockchainDouble.prototype.clearPendingTransactions = function() {
  this.pending_transactions = [];
};

/**
 * createBlock
 *
 * Create a new block, where the parent's block is either the latest block
 * on the chain or the parent block passed in.
 *
 * @param  {Block}   parent   The block meant to be the parent block (optional)
 * @param  {Function} callback Callback function called after block is created
 * @return Block              The block created.
 */
BlockchainDouble.prototype.createBlock = function(parent, emulateParent, callback) {
  var self = this;

  if (typeof parent === "function") {
    callback = parent;
    parent = null;
    emulateParent = false;
  } else if (typeof emulateParent === "function") {
    callback = emulateParent;
    emulateParent = false;
  }

  var block = new Block();

  function getParent(callback) {
    if (parent) {
      return callback(null, parent);
    } else {
      self.latestBlock(callback);
    }
  }

  getParent(function(err, parent) {
    if (err) {
      return callback(err);
    }

    block.header.gasLimit = self.blockGasLimit;

    if (parent != null && emulateParent) {
      block.header.number = parent.header.number;
      block.header.timestamp = parent.header.timestamp;
      block.header.parentHash = parent.header.parentHash;
    } else {
      var parentNumber = parent != null ? to.number(parent.header.number) : -1;

      // Ensure we have the right block number for the VM.
      block.header.number = to.hex(parentNumber + 1);

      // Set the timestamp before processing txs
      block.header.timestamp = to.hex(self.currentTime());

      if (parent != null) {
        block.header.parentHash = to.hex(parent.hash());
      }
    }

    callback(null, block);
  });
};

BlockchainDouble.prototype.getQueuedNonce = function(address, callback) {
  var nonce = null;
  var addressBuffer = to.buffer(address);
  this.pending_transactions.forEach(function(tx) {
    if (!tx.from.equals(addressBuffer)) {
      return;
    }

    var pendingNonce = new BN(tx.nonce);
    // If this is the first queued nonce for this address we found,
    // or it's higher than the previous highest, note it.
    if (nonce === null || pendingNonce.gt(nonce)) {
      nonce = pendingNonce;
    }
  });

  // If we found a queued transaction nonce, return one higher
  // than the highest we found
  if (nonce != null) {
    return callback(null, nonce.iaddn(1).toArrayLike(Buffer));
  }
  this.stateTrie.get(addressBuffer, function(err, val) {
    if (err) {
      return callback(err);
    }

    var account = new Account(val);
    // nonces are initiallized as an empty buffer, which isn't what we want.
    callback(null, account.nonce.length === 0 ? Buffer.from([0]) : account.nonce);
  });
};

BlockchainDouble.prototype.queueTransaction = function(tx) {
  this.pending_transactions.push(tx);
};

BlockchainDouble.prototype.sortByPriceAndNonce = function() {
  // Sorts transactions like I believe geth does.
  // See the description of 'SortByPriceAndNonce' at
  // https://github.com/ethereum/go-ethereum/blob/290e851f57f5d27a1d5f0f7ad784c836e017c337/core/types/transaction.go
  var self = this;
  var sortedByNonce = {};

  self.pending_transactions.forEach((tx) => {
    const from = tx.from.toString("hex");
    const arr = sortedByNonce[from];
    if (arr) {
      arr.push(tx);
    } else {
      sortedByNonce[from] = [tx];
    }
  });

  var priceSort = function(a, b) {
    return parseInt(to.hex(b.gasPrice), 16) - parseInt(to.hex(a.gasPrice), 16);
  };
  var nonceSort = function(a, b) {
    return parseInt(to.hex(a.nonce), 16) - parseInt(to.hex(b.nonce), 16);
  };

  // Now sort each address by nonce
  Object.keys(sortedByNonce).forEach((address) => {
    sortedByNonce[address].sort(nonceSort);
  });

  // Initialise a heap, sorted by price, for the head transaction from each account.
  var heap = new Heap(priceSort);
  Object.keys(sortedByNonce).forEach((address) => {
    heap.push(sortedByNonce[address].shift());
  });

  // Now reorder our transactions. Compare the next transactions from each account, and choose
  // the one with the highest gas price.
  const sortedTransactions = [];
  while (heap.size() > 0) {
    const best = heap.pop();
    const address = best.from.toString("hex");
    if (sortedByNonce[address].length > 0) {
      // Push on the next transaction from this account
      heap.push(sortedByNonce[address].shift());
    }
    sortedTransactions.push(best);
  }
  self.pending_transactions = sortedTransactions;
};

BlockchainDouble.prototype.getReadyCall = function(tx, emulateParent, blockNumber, callback) {
  const readyCall = (tx, err, parentBlock) => {
    if (err) {
      return callback(err);
    }
    // create a fake block with this fake transaction
    this.createBlock(parentBlock, emulateParent, (err, newBlock) => {
      if (err) {
        return callback(err);
      }

      newBlock.transactions.push(tx);

      // gas estimates and eth_calls aren't subject to block gas limits
      newBlock.header.gasLimit = tx.gasLimit;

      const runArgs = {
        tx: tx,
        block: newBlock,
        skipBalance: true,
        skipNonce: true
      };

      callback(null, parentBlock.header.stateRoot, runArgs);
    });
  };
  // Delegate block selection
  if (blockNumber === "latest") {
    this.latestBlock(readyCall.bind(null, tx));
  } else {
    this.getBlock(blockNumber, readyCall.bind(null, tx));
  }
};

BlockchainDouble.prototype.readyCall = function(tx, emulateParent, blockNumber, callback) {
  this.getReadyCall(tx, emulateParent, blockNumber, (err, stateRoot, runArgs) => {
    if (err) {
      callback(err);
      return;
    }
    const stateTrie = this.createStateTrie(this.data.trie_db, stateRoot, { persist: false });
    const vm = this.createVMFromStateTrie(stateTrie);
    callback(null, vm, runArgs);
  });
};

BlockchainDouble.prototype.processCall = function(tx, blockNumber, callback) {
  this.readyCall(tx, true, blockNumber, async(err, vm, runArgs) => {
    if (err) {
      callback(err);
      return;
    }

    const result = await vm.runTx(runArgs).catch((vmerr) => ({ vmerr }));
    let vmerr = result.vmerr;
    // This is a check that has been in there for awhile. I'm unsure if it's required, but it can't hurt.
    if (vmerr && vmerr instanceof Error === false) {
      vmerr = new Error("VM error: " + vmerr);
    }

    // If we're given an error back directly, it's worse than a runtime error. Expose it and get out.
    if (vmerr) {
      return callback(vmerr, err);
    }

    // If no error, check for a runtime error. This can return null if no runtime error.
    vmerr = RuntimeError.fromResults([tx], { results: [result] });

    callback(vmerr, result);
  });
};

BlockchainDouble.prototype.estimateGas = function(tx, blockNumber, callback) {
  this.getReadyCall(tx, false, blockNumber, (err, stateRoot, runArgs) => {
    if (err) {
      callback(err);
      return;
    }
    const generateVM = () => {
      const stateTrie = this.createStateTrie(this.data.trie_db, stateRoot);
      return this.createVMFromStateTrie(stateTrie);
    };
    estimateGas(generateVM, runArgs, callback);
  });
};

/**
 * processBlock
 *
 * Process the passed in block and included transactions
 *
 * @param  {VM} vm             the vm to use when running the block
 * @param  {Block} block       block to process
 * @param  {Boolean} commit    Whether or not changes should be committed to the state
 * trie and the block appended to the end of the chain.
 * @param  {Function} callback Callback function when transaction processing is completed.
 * @return [type]              [description]
 */
BlockchainDouble.prototype.processBlock = async function(vm, block, commit, callback) {
  var self = this;

  if (typeof commit === "function") {
    callback = commit;
    commit = true;
  }

  const results = await vm
    .runBlock({
      block: block,
      generate: true,
      skipBlockValidation: true
    })
    .catch((vmerr) => ({ vmerr }));
  let vmerr = results.vmerr;
  // This is a check that has been in there for awhile. I'm unsure if it's required, but it can't hurt.
  if (vmerr && vmerr instanceof Error === false) {
    vmerr = new Error("VM error: " + vmerr);
  }

  // If we're given an error back directly, it's worse than a runtime error. Expose it and get out.
  if (vmerr) {
    callback(vmerr);
    return;
  }
  // If no error, check for a runtime error. This can return null if no runtime error.
  vmerr = RuntimeError.fromResults(block.transactions, results);

  // Note, even if we have an error, some transactions may still have succeeded.
  // Process their logs if so, returning the error at the end.

  var logs = [];
  var receipts = [];

  var totalBlockGasUsage = 0;

  results.results.forEach(function(result) {
    totalBlockGasUsage += to.number(result.gasUsed);
  });

  block.header.gasUsed = utils.toBuffer(to.hex(totalBlockGasUsage));

  const txTrie = new Trie();
  const rcptTrie = new Trie();
  const promises = [];
  const putInTrie = (trie, key, val) => promisify(trie.put.bind(trie))(key, val);

  for (var v = 0; v < results.receipts.length; v++) {
    var result = results.results[v];
    var receipt = results.receipts[v];
    var tx = block.transactions[v];
    var txHash = tx.hash();
    var txLogs = [];

    // Only process the transaction's logs if it didn't error.
    if (result.execResult.exceptionError === undefined) {
      for (var i = 0; i < receipt.logs.length; i++) {
        var receiptLog = receipt.logs[i];
        var address = to.hex(receiptLog[0]);
        var topics = [];

        for (var j = 0; j < receiptLog[1].length; j++) {
          topics.push(to.hex(receiptLog[1][j]));
        }

        var data = to.hex(receiptLog[2]);

        var log = new Log({
          logIndex: to.hex(i),
          transactionIndex: to.hex(v),
          transactionHash: txHash,
          block: block,
          address: address,
          data: data,
          topics: topics,
          type: "mined"
        });

        logs.push(log);
        txLogs.push(log);
      }
    }

    const rcpt = new Receipt(
      tx,
      block,
      txLogs,
      result.gasUsed.toArrayLike(Buffer),
      receipt.gasUsed,
      result.createdAddress,
      receipt.status,
      to.hex(receipt.bitvector)
    );
    receipts.push(rcpt);

    const rawReceipt = [receipt.status, receipt.gasUsed, receipt.bitvector, receipt.logs];
    const rcptBuffer = utils.rlp.encode(rawReceipt);
    const key = utils.rlp.encode(v);
    promises.push(putInTrie(txTrie, key, tx.serialize()));
    promises.push(putInTrie(rcptTrie, key, rcptBuffer));
  }
  await Promise.all(promises);

  block.header.transactionsTrie = utils.toBuffer(txTrie.root);
  block.header.receiptTrie = utils.toBuffer(rcptTrie.root);

  if (commit) {
    // Put that block on the end of the chain
    self.putBlock(block, logs, receipts, done);
  } else {
    done();
  }

  function done(e) {
    if (e) {
      return callback(e);
    }
    // Note we return the vm err here too, if it exists.
    callback(vmerr, block.transactions, results);
  }
};

/**
 * processNextBlock
 *
 * Process the next block like a normal blockchain, pulling from the list of
 * pending transactions.
 *
 * @param  {number} timestamp at which the block is mined
 * @param  {Function} callback Callback when transaction processing is finished.
 * @return [type]              [description]
 */
BlockchainDouble.prototype.processNextBlock = function(timestamp, callback) {
  var self = this;

  if (typeof timestamp === "function") {
    callback = timestamp;
    timestamp = undefined;
  }

  self.sortByPriceAndNonce();

  // Grab only the transactions that can fit within the block
  var currentTransactions = [];
  var totalGasLimit = 0;
  var maxGasLimit = to.number(self.blockGasLimit);

  while (self.pending_transactions.length > 0) {
    var tx = self.pending_transactions[0];
    var gasLimit = to.number(tx.gasLimit);

    if (totalGasLimit + gasLimit <= maxGasLimit) {
      totalGasLimit += gasLimit;
      self.pending_transactions.shift();
      currentTransactions.push(tx);
    } else {
      // Next one won't fit. Break.
      break;
    }
  }

  // Remember, we ensured transactions had a valid gas limit when they were queued (in the state manager).
  // If we run into a case where we can't process any because one is higher than the gas limit,
  // then it's a serious issue. This should never happen, but let's check anyway.
  if (currentTransactions.length === 0 && self.pending_transactions.length > 0) {
    // Error like geth.
    var error = "Unexpected error condition: next transaction exceeds block gas limit";
    return callback(error);
  }

  // Create a new block meant to be the end of the chain
  this.createBlock(function(err, block) {
    if (err) {
      return callback(err);
    }

    // Overwrite block timestamp
    if (timestamp) {
      self.data.blocks.last(function(err, last) {
        if (err) {
          // it is safe to ignore this error as we only use the result
          // to log a warning to the console.
          return;
        }
        if (last && to.number(last.header.timestamp) > timestamp) {
          self.logger.log(
            "Waring: Setting the block timestamp (" + timestamp + ") that is earlier than the parent block one."
          );
        }
      });
      block.header.timestamp = to.hex(timestamp);
      self.setTime(new Date(timestamp * 1000));
    }
    // Add transactions to the block.
    Array.prototype.push.apply(block.transactions, currentTransactions);

    self.processBlock(self.vm, block, true, callback);
  });
};

/**
 * processTransactionTrace
 *
 * Run a previously-run transaction in the same state in which it occurred at the time it was run.
 * This will return the vm-level trace output for debugging purposes.
 *
 * Strategy:
 *
 *  1. Find block where transaction occurred
 *  2. Set state root of that block
 *  3. Rerun every transaction in that block prior to and including the requested transaction
 *  4. Send trace results back.
 *
 * @param  {[type]}   tx       [description]
 * @param  {Function} callback [description]
 * @return [type]              [description]
 */
BlockchainDouble.prototype.processTransactionTrace = async function(hash, params, callback) {
  const self = this;
  const targetHash = to.hex(hash);
  let txHashCurrentlyProcessing = "";
  let txCurrentlyProcessing = null;
  let vm;

  const storageStack = {
    currentDepth: -1,
    stack: []
  };

  const returnVal = {
    gas: 0,
    returnValue: "",
    structLogs: []
  };

  function stepListener(event, next) {
    // See these docs:
    // https://github.com/ethereum/go-ethereum/wiki/Management-APIs

    const gasLeft = to.number(event.gasLeft);
    const totalGasUsedAfterThisStep = to.number(txCurrentlyProcessing.gasLimit) - gasLeft;
    const gasUsedPreviousStep = totalGasUsedAfterThisStep - returnVal.gas;
    returnVal.gas += gasUsedPreviousStep;

    let memory = null;
    if (!params.disableMemory) {
      // Get memory and break it up into 32-byte words.
      // Note we may possibly have to pad the final word.
      memory = Buffer.from(event.memory).toString("hex");
      memory = memory.match(/.{1,64}/g) || [];

      if (memory.length > 0) {
        const lastItem = memory[memory.length - 1];
        if (lastItem.length < 64) {
          memory[memory.length - 1] = lastItem + new Array(64 - lastItem.length + 1).join("0");
        }
      }
    }

    let stack = null;
    if (!params.disableStack) {
      stack = event.stack.map((item) => {
        return to.rpcDataHexString(item, 64).replace("0x", ""); // non-0x prefixed.
      });
    }
    let structLog = {
      depth: event.depth,
      error: "",
      gas: gasLeft,
      gasCost: 0,
      memory,
      op: event.opcode.name,
      pc: event.pc,
      stack,
      storage: null
    };

    // The gas difference calculated for each step is indicative of gas consumed in
    // the previous step. Gas consumption in the final step will always be zero.
    if (returnVal.structLogs.length) {
      returnVal.structLogs[returnVal.structLogs.length - 1].gasCost = gasUsedPreviousStep;
    }

    if (params.disableStorage) {
      returnVal.structLogs.push(structLog);
      next();
    } else {
      structLog = self.processStorageTrace(structLog, storageStack, event, vm, function(err, structLog) {
        if (err) {
          return next(err);
        }
        returnVal.structLogs.push(structLog);
        next();
      });
    }
  }

  // #1 - get block via transaction receipt
  this.getTransactionReceipt(targetHash, function(err, receipt) {
    if (err) {
      return callback(err);
    }

    if (!receipt) {
      return callback(new Error("Unknown transaction " + targetHash));
    }

    const targetBlock = receipt.block;

    // Get the parent of the target block
    self.getBlock(targetBlock.header.parentHash, function(err, parent) {
      if (err) {
        return callback(err);
      }

      // #2 - Set state root of original block
      var stateTrie = self.createStateTrie(self.data.trie_db, parent.header.stateRoot, {
        // when forking we need to make sure we also copy over the forkBlockNumber,
        // otherwise some operations will request data from the main chain at the
        // latest block
        forkBlockNumber: to.number(parent.header.number)
      });
      vm = self.createVMFromStateTrie(stateTrie);

      // Prepare the "next" block with necessary transactions
      self.createBlock(parent, false, function(err, block) {
        if (err) {
          return callback(err);
        }

        // make sure we use the same timestamp as the target block
        block.header.timestamp = targetBlock.header.timestamp;

        for (var i = 0; i < targetBlock.transactions.length; i++) {
          var tx = targetBlock.transactions[i];
          block.transactions.push(tx);

          // After including the target transaction, that's all we need to do.
          if (to.hex(tx.hash()) === targetHash) {
            break;
          }
        }

        function beforeTxListener(tx) {
          txCurrentlyProcessing = tx;
          txHashCurrentlyProcessing = to.hex(tx.hash());
          if (txHashCurrentlyProcessing === targetHash) {
            vm.on("step", stepListener);
          }
        }

        // afterTxListener cleans up everything.
        function afterTxListener() {
          if (txHashCurrentlyProcessing === targetHash) {
            removeListeners();
          }
        }

        function removeListeners() {
          vm.removeListener("step", stepListener);
          vm.removeListener("beforeTx", beforeTxListener);
          vm.removeListener("afterTx", afterTxListener);
        }

        // Listen to beforeTx and afterTx so we know when our target transaction
        // is processing. These events will add the event listener for getting the trace data.
        vm.on("beforeTx", beforeTxListener);
        vm.on("afterTx", afterTxListener);

        // Don't even let the vm try to flush the block's _cache to the stateTrie.
        // When forking some of the data that the traced function may request will
        // exist only on the main chain. Because we pretty much lie to the VM by
        // telling it we DO have data in our Trie, when we really don't, it gets
        // lost during the commit phase when it traverses the "borrowed" data's
        // trie (as it may not have a valid root). Because this is a trace, and we
        // don't need to commit the data, duck punching the `flush` method (the
        // simplest method I could find) is fine.
        // Remove this and you may see the infamous
        // `Uncaught TypeError: Cannot read property 'pop' of undefined` error!
        vm.stateManager._cache.flush = (cb) => cb();

        // #3 - Process the block without committing the data.
        self.processBlock(vm, block, false, function(err) {
          // Ignore runtime errors, or else erroneous transactions can't be traced.
          if (err && err.message.indexOf("VM Exception") === 0) {
            err = null;
          }

          // Just to be safe
          removeListeners();

          // #4 - send state results back
          callback(err, returnVal);
        });
      });
    });
  });
};

BlockchainDouble.prototype.processStorageTrace = function(structLog, storageStack, event, vm, callback) {
  var name = event.opcode.name;

  if (storageStack.currentDepth > event.depth) {
    storageStack.stack.pop();
  }
  if (storageStack.currentDepth < event.depth) {
    storageStack.stack.push({});
  }

  storageStack.currentDepth = event.depth;

  var key;
  var value;
  switch (name) {
    case "SSTORE":
      {
        const stack = event.stack;
        const stackLength = stack.length;
        key = to.rpcDataHexString(stack[stackLength - 1], 64).replace("0x", "");
        value = to.rpcDataHexString(stack[stackLength - 2], 64).replace("0x", "");
        // use Object.assign to prevent future steps from overwriting this step's storage values
        structLog.storage = Object.assign({}, storageStack.stack[storageStack.currentDepth]);

        callback(null, structLog);
        // assign after callback because this storage change actually takes
        // effect _after_ this opcode executes
        storageStack.stack[storageStack.currentDepth][key] = value;
      }
      break;
    case "SLOAD":
      {
        const stack = event.stack;
        // this one's more fun, we need to get the value the contract is loading from current storage
        key = to.rpcDataHexString(stack[stack.length - 1], 64).replace("0x", "");

        vm.stateManager.getContractStorage(event.address, Buffer.from(key, "hex"), function(err, result) {
          if (err) {
            return callback(err);
          }

          value = to.rpcDataHexString(result, 64).replace("0x", "");
          storageStack.stack[storageStack.currentDepth][key] = value;
          // use Object.assign to prevent future steps from overwriting this step's storage values
          structLog.storage = Object.assign({}, storageStack.stack[storageStack.currentDepth]);
          callback(null, structLog);
        });
      }
      break;
    default:
      // use Object.assign to prevent future steps from overwriting this step's storage values
      structLog.storage = Object.assign({}, storageStack.stack[storageStack.currentDepth]);
      callback(null, structLog);
  }
};

BlockchainDouble.prototype.getAccount = function(address, number, callback) {
  var self = this;

  this.getBlock(number, function(err, block) {
    if (err) {
      return callback(err);
    }

    var trie = self.stateTrie;

    // Manipulate the state root in place to maintain checkpoints
    var currentStateRoot = trie.root;
    self.stateTrie.root = block.header.stateRoot;

    trie.get(utils.toBuffer(address), function(err, data) {
      // Finally, put the stateRoot back for good
      trie.root = currentStateRoot;

      if (err) {
        return callback(err);
      }

      var account = new Account(data);

      callback(null, account);
    });
  });
};

BlockchainDouble.prototype.getNonce = function(address, number, callback) {
  this.getAccount(address, number, function(err, account) {
    if (err) {
      return callback(err);
    }
    callback(null, account.nonce);
  });
};

BlockchainDouble.prototype.getBalance = function(address, number, callback) {
  this.getAccount(address, number, function(err, account) {
    if (err) {
      return callback(err);
    }

    callback(null, account.balance);
  });
};

// Note! Storage values are returned RLP encoded!
BlockchainDouble.prototype.getStorage = function(address, position, number, callback) {
  var self = this;

  this.getBlock(number, function(err, block) {
    if (err) {
      return callback(err);
    }

    var trie = self.stateTrie;

    // Manipulate the state root in place to maintain checkpoints
    var currentStateRoot = trie.root;
    self.stateTrie.root = block.header.stateRoot;

    trie.get(utils.toBuffer(address), function(err, data) {
      if (err != null) {
        // Put the stateRoot back if there's an error
        trie.root = currentStateRoot;
        return callback(err);
      }

      var account = new Account(data);

      trie.root = account.stateRoot;

      trie.get(utils.setLengthLeft(utils.toBuffer(position), 32), function(err, value) {
        // Finally, put the stateRoot back for good
        trie.root = currentStateRoot;

        if (err != null) {
          return callback(err);
        }

        callback(null, value);
      });
    });
  });
};

BlockchainDouble.prototype.getCode = function(address, number, callback) {
  var self = this;

  this.getBlock(number, function(err, block) {
    if (err) {
      return callback(err);
    }

    var trie = self.stateTrie;

    // Manipulate the state root in place to maintain checkpoints
    var currentStateRoot = trie.root;
    self.stateTrie.root = block.header.stateRoot;

    trie.get(utils.toBuffer(address), function(err, data) {
      if (err != null) {
        // Put the stateRoot back if there's an error
        trie.root = currentStateRoot;
        return callback(err);
      }

      var account = new Account(data);

      account.getCode(trie, function(err, code) {
        // Finally, put the stateRoot back for good
        trie.root = currentStateRoot;

        if (err) {
          return callback(err);
        }

        callback(null, code);
      });
    });
  });
};

BlockchainDouble.prototype.getTransaction = function(hash, callback) {
  hash = to.hex(hash);

  this.data.transactions.get(hash, function(err, tx) {
    if (err) {
      if (err.notFound) {
        return callback(null, null);
      } else {
        return callback(err);
      }
    }
    callback(null, tx);
  });
};

BlockchainDouble.prototype.getTransactionReceipt = function(hash, callback) {
  hash = to.hex(hash);
  const pendingTxs = this.pending_transactions;

  for (var i = 0; i < pendingTxs.length; i++) {
    const pendingTxHash = to.hex(pendingTxs[i].hash());
    if (hash === pendingTxHash) {
      return callback(null, { tx: pendingTxs[i] });
    }
  }

  this.data.transactionReceipts.get(hash, function(err, receipt) {
    if (err) {
      if (err.notFound) {
        return callback(null, null);
      } else {
        return callback(err);
      }
    }

    callback(err, receipt);
  });
};

BlockchainDouble.prototype.getBlockLogs = function(number, callback) {
  var self = this;
  this.getEffectiveBlockNumber(number, function(err, effective) {
    if (err) {
      return callback(err);
    }
    self.data.blockLogs.get(effective, callback);
  });
};

BlockchainDouble.prototype.getHeight = function(callback) {
  this.data.blocks.length(function(err, length) {
    if (err) {
      return callback(err);
    }
    callback(null, length - 1);
  });
};

BlockchainDouble.prototype.currentTime = function() {
  return ((new Date().getTime() / 1000) | 0) + this.timeAdjustment;
};

BlockchainDouble.prototype.increaseTime = function(seconds) {
  if (seconds < 0) {
    seconds = 0;
  }
  this.timeAdjustment += seconds;
  return this.timeAdjustment;
};

BlockchainDouble.prototype.setTime = function(date) {
  var now = (new Date().getTime() / 1000) | 0;
  var start = (date.getTime() / 1000) | 0;
  this.timeAdjustment = start - now;
};

BlockchainDouble.prototype.close = function(callback) {
  this.data.close(callback);
};

module.exports = BlockchainDouble;


/***/ }),

/***/ 693929:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var LevelUpArrayAdapter = __webpack_require__(727549);
var LevelUpObjectAdapter = __webpack_require__(818584);
var levelup = __webpack_require__(334918);
var encode = __webpack_require__(650780);
var filedown = __webpack_require__(384378);
var cachedown = __webpack_require__(474023);
var txserializer = __webpack_require__(597550);
var blockserializer = __webpack_require__(398873);
var bufferserializer = __webpack_require__(859073);
var BlockLogsSerializer = __webpack_require__(339423);
var ReceiptSerializer = __webpack_require__(976672);
var tmp = __webpack_require__(156783);

function Database(options) {
  this.options = options;
  this.directory = null;
}

Database.prototype.initialize = function(callback) {
  var self = this;

  function getDir(cb) {
    if (self.options.db_path) {
      cb(null, self.options.db_path);
    } else {
      tmp.dir(cb);
    }
  }

  getDir(function(err, directory) {
    if (err) {
      return callback(err);
    }
    const levelupOptions = { valueEncoding: "json" };
    if (self.options.db) {
      const store = self.options.db;
      levelup(store, levelupOptions, finishInitializing);
    } else {
      self.directory = directory;
      const store = encode(cachedown(directory, filedown).maxSize(100), levelupOptions);
      levelup(store, {}, finishInitializing);
    }
  });

  function finishInitializing(err, db) {
    if (err) {
      return callback(err);
    }

    self.db = db;

    // Blocks, keyed by array index (not necessarily by block number) (0-based)
    self.blocks = new LevelUpArrayAdapter("blocks", self.db, blockserializer);

    // Logs triggered in each block, keyed by block id (ids in the blocks array; not necessarily block number) (0-based)
    self.blockLogs = new LevelUpArrayAdapter("blockLogs", self.db, new BlockLogsSerializer(self));

    // Block hashes -> block ids (ids in the blocks array; not necessarily block number) for quick lookup
    self.blockHashes = new LevelUpObjectAdapter("blockHashes", self.db);

    // Transaction hash -> transaction objects
    self.transactions = new LevelUpObjectAdapter("transactions", self.db, txserializer);

    // Transaction hash -> transaction receipts
    self.transactionReceipts = new LevelUpObjectAdapter("transactionReceipts", self.db, new ReceiptSerializer(self));

    self.trie_db = new LevelUpObjectAdapter("trie_db", self.db, bufferserializer, bufferserializer);

    callback();
  }
};

Database.prototype.close = function(callback) {
  callback();
};

module.exports = Database;


/***/ }),

/***/ 339423:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Log = __webpack_require__(358410);
var async = __webpack_require__(940008);

function BlockLogsSerializer(database) {
  this.database = database;
}

BlockLogsSerializer.prototype.encode = function(logs, done) {
  logs = logs.map(function(log) {
    return log.toJSON();
  });

  done(null, logs);
};

BlockLogsSerializer.prototype.decode = function(json, done) {
  var self = this;

  if (json.length === 0) {
    return done(null, []);
  }

  this.database.blockHashes.get(json[0].blockHash, function(err, blockIndex) {
    if (err) {
      return done(err);
    }

    self.database.blocks.get(blockIndex, function(err, block) {
      if (err) {
        return done(err);
      }

      async.map(
        json,
        function(log, finished) {
          finished(
            null,
            new Log({
              block: block,
              logIndex: log.logIndex,
              transactionIndex: log.transactionIndex,
              transactionHash: log.transactionHash,
              address: log.address,
              data: log.data,
              topics: log.topics,
              type: log.type
            })
          );
        },
        function(err, logs) {
          if (err) {
            return done(err);
          }
          done(null, logs);
        }
      );
    });
  });
};

module.exports = BlockLogsSerializer;


/***/ }),

/***/ 398873:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var txserializer = __webpack_require__(597550);
var async = __webpack_require__(940008);
var Block = __webpack_require__(339951);

module.exports = {
  encode: function(block, done) {
    var encoded = block.toJSON(true);

    async.map(
      block.transactions,
      function(tx, finished) {
        txserializer.encode(tx, finished);
      },
      function(err, transactions) {
        if (err) {
          return done(err);
        }
        encoded.transactions = transactions;
        done(null, encoded);
      }
    );
  },
  decode: function(json, done) {
    var transactions = json.transactions;
    json.transactions = [];

    var block = new Block(json);

    async.eachSeries(
      transactions,
      function(txJson, finished) {
        txserializer.decode(txJson, function(err, tx) {
          if (err) {
            return finished(err);
          }
          block.transactions.push(tx);
          finished();
        });
      },
      function(err) {
        if (err) {
          return done(err);
        }

        done(null, block);
      }
    );
  }
};


/***/ }),

/***/ 859073:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var utils = __webpack_require__(791996);
var to = __webpack_require__(484302);

module.exports = {
  encode: function(val, cb) {
    var hex = to.hex(val);
    cb(null, hex);
  },
  decode: function(json, cb) {
    cb(null, utils.toBuffer(json));
  }
};


/***/ }),

/***/ 384378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var util = __webpack_require__(431669);
var AbstractLevelDOWN = __webpack_require__(685222).AbstractLevelDOWN;
var async = __webpack_require__(940008);
var fs = __webpack_require__(935747);
var path = __webpack_require__(385622);
var tmp = __webpack_require__(156783);

util.inherits(FileDown, AbstractLevelDOWN);

function FileDown(location) {
  this.location = location;
  const tmpDir = path.join(location, "_tmp");
  try {
    // Fixes https://github.com/trufflesuite/ganache/issues/1617
    fs.mkdirSync(tmpDir, { recursive: true, mode: 0o1777 });
  } catch (e) {
    // `recursive` doesn't throw if the file exists, but `recursive` doesn't
    // exist in Node 8, so we catch the EEXISTS error in that case and ignore it.
    // once we drop node 8 suport we can remove this try/catch
    if (e.code !== "EEXIST") {
      throw e;
    }
  }
  this.tmpOptions = { keep: true, dir: tmpDir };
  AbstractLevelDOWN.call(this, location);
}

FileDown.prototype._open = function(options, callback) {
  var self = this;
  callback(null, self);
};
const accessQueue = {
  next: (lKey) => {
    const cont = accessQueue.cache[lKey].shift();
    if (cont) {
      cont();
    } else {
      delete accessQueue.cache[lKey];
    }
  },
  execute: (lKey, callback) => {
    const cache = accessQueue.cache[lKey];
    if (cache) {
      cache.push(callback);
    } else {
      accessQueue.cache[lKey] = [];
      callback();
    }
  },
  cache: {}
};

const fds = new Set();
const cleanup = (exit) => {
  try {
    fds.forEach((fdPath) => {
      const [fd, path] = fdPath;
      try {
        fs.closeSync(fd);
      } catch (e) {
        // ignore
      } finally {
        try {
          fs.unlinkSync(path);
        } catch (e) {
          // ignore
        }
      }
    });
    fds.clear();
  } finally {
    if (exit) {
      process.exit(0);
    }
  }
};
process.on("SIGINT", cleanup);
process.on("exit", () => cleanup(false));

FileDown.prototype._put = function(key, value, options, callback) {
  const lKey = path.join(this.location, key);
  // This fixes an issue caused by writing AND reading the same key multiple times
  // simultaneously. Sometimes the read operation would end up reading the value as 0 bytes
  // due to the way writes are performed in node. To fix this, we implemented a queue so only a
  // single read or write operation can occur at a time for each key; basically an in-memory lock.
  // Additionally, during testing we found that it was possible for a write operation to fail
  // due to program termination. This failure would sometimes cause the key to _exist_ but contain
  // 0 bytes (which is always invalid). To fix this we write to a temp file, and only if it works
  // do we move this temp file to its correct key location. This prevents early termination from
  // writing partial/empty values.
  // Of course, all this will eventually be for nothing as we are migrating the db to actual an
  // leveldb implementation that doesn't use a separate file for every key Soon(TM).
  accessQueue.execute(lKey, () => {
    // get a tmp file to write the contents to...
    tmp.file(this.tmpOptions, (err, path, fd, cleanupTmpFile) => {
      if (err) {
        callback(err);
        accessQueue.next(lKey);
        return;
      }
      const pair = [fd, path];
      fds.add(pair);
      const cleanupAndCallback = (err) => {
        err && cleanupTmpFile();
        fds.delete(pair);
        callback(err);
        accessQueue.next(lKey);
      };

      // write the value to our temporary file
      fs.writeFile(fd, value, "utf8", (err) => {
        if (err) {
          cleanupAndCallback(err);
          return;
        }

        // It worked! Move the temporary file to its final destination
        fs.rename(path, lKey, (err) => {
          if (err) {
            cleanupAndCallback(err);
            return;
          }

          // make sure we close this file descriptor now that the file is no
          // longer "temporary" (because we successfully moved it)
          fs.close(fd, () => cleanupAndCallback());
        });
      });
    });
  });
};

FileDown.prototype._get = function(key, options, callback) {
  const lKey = path.join(this.location, key);
  accessQueue.execute(lKey, () => {
    fs.readFile(lKey, "utf8", (err, data) => {
      if (err) {
        callback(new Error("NotFound"));
      } else {
        callback(null, data);
      }
      accessQueue.next(lKey);
    });
  });
};

FileDown.prototype._del = function(key, options, callback) {
  fs.unlink(path.join(this.location, key), function(err) {
    // Ignore when we try to delete a file that doesn't exist.
    // I'm not sure why this happens. Worth looking into.
    if (err) {
      if (err.message.indexOf("ENOENT") >= 0) {
        return callback();
      } else {
        return callback(err);
      }
    }
    callback();
  });
};

FileDown.prototype._batch = function(array, options, callback) {
  var self = this;
  async.each(
    array,
    function(item, finished) {
      if (item.type === "put") {
        self.put(item.key, item.value, options, finished);
      } else if (item.type === "del") {
        self.del(item.key, options, finished);
      } else {
        finished(new Error("Unknown batch type", item.type));
      }
    },
    function(err) {
      if (err) {
        return callback(err);
      }
      callback();
    }
  );
};

module.exports = function(location) {
  return new FileDown(location);
};


/***/ }),

/***/ 727549:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Sublevel = __webpack_require__(998673);
const { LevelUpOutOfRangeError, BlockOutOfRangeError } = __webpack_require__(24742);

// Level up adapter that looks like an array. Doesn't support inserts.

function LevelUpArrayAdapter(name, db, serializer) {
  this.db = Sublevel(db);
  this.db = this.db.sublevel(name);
  this.name = name;
  this.serializer = serializer || {
    encode: function(val, callback) {
      callback(null, val);
    },
    decode: function(val, callback) {
      callback(null, val);
    }
  };
}

LevelUpArrayAdapter.prototype.length = function(callback) {
  this.db.get("length", function(err, result) {
    if (err) {
      if (err.notFound) {
        return callback(null, 0);
      } else {
        return callback(err);
      }
    }

    callback(null, result);
  });
};

LevelUpArrayAdapter.prototype._get = function(key, callback) {
  var self = this;
  this.db.get(key, function(err, val) {
    if (err) {
      return callback(err);
    }
    self.serializer.decode(val, callback);
  });
};

LevelUpArrayAdapter.prototype._put = function(key, value, callback) {
  var self = this;
  this.serializer.encode(value, function(err, encoded) {
    if (err) {
      return callback(err);
    }
    self.db.put(key, encoded, callback);
  });
};

LevelUpArrayAdapter.prototype.get = function(index, callback) {
  var self = this;

  this.length(function(err, length) {
    if (err) {
      return callback(err);
    }
    if (index >= length) {
      // index out of range
      const RangeError =
        self.name === "blocks"
          ? new BlockOutOfRangeError(index, length)
          : new LevelUpOutOfRangeError(self.name, index, length);
      return callback(RangeError);
    }
    self._get(index, callback);
  });
};

LevelUpArrayAdapter.prototype.push = function(val, callback) {
  var self = this;
  this.length(function(err, length) {
    if (err) {
      return callback(err);
    }

    // TODO: Do this in atomic batch.
    self._put(length + "", val, function(err) {
      if (err) {
        return callback(err);
      }
      self.db.put("length", length + 1, callback);
    });
  });
};

LevelUpArrayAdapter.prototype.pop = function(callback) {
  var self = this;

  this.length(function(err, length) {
    if (err) {
      return callback(err);
    }

    var newLength = length - 1;

    // TODO: Do this in atomic batch.
    self._get(newLength + "", function(err, val) {
      if (err) {
        return callback(err);
      }
      self.db.del(newLength + "", function(err) {
        if (err) {
          return callback(err);
        }
        self.db.put("length", newLength, function(err) {
          if (err) {
            return callback(err);
          }

          callback(null, val);
        });
      });
    });
  });
};

LevelUpArrayAdapter.prototype.last = function(callback) {
  var self = this;
  this.length(function(err, length) {
    if (err) {
      return callback(err);
    }

    if (length === 0) {
      return callback(null, null);
    }

    self._get(length - 1 + "", callback);
  });
};

LevelUpArrayAdapter.prototype.first = function(callback) {
  this._get("0", callback);
};

module.exports = LevelUpArrayAdapter;


/***/ }),

/***/ 818584:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Sublevel = __webpack_require__(998673);
var async = __webpack_require__(940008);

function LevelUpObjectAdapter(name, db, valueserializer, keyserializer, options) {
  this.db = Sublevel(db, options);
  this.db = this.db.sublevel(name);
  this.name = name;
  this.valueserializer = valueserializer || {
    encode: function(val, callback) {
      callback(null, val);
    },
    decode: function(val, callback) {
      callback(null, val);
    }
  };
  this.keyserializer = keyserializer || {
    encode: function(val, callback) {
      callback(null, val);
    },
    decode: function(val, callback) {
      callback(null, val);
    }
  };
}

LevelUpObjectAdapter.prototype.get = function(key, options, callback) {
  var self = this;

  if (typeof options === "function") {
    callback = options;
    options = {};
  }

  this.keyserializer.encode(key, function(err, encodedKey) {
    if (err) {
      return callback(err);
    }

    self.db.get(encodedKey, function(err, val) {
      if (err) {
        return callback(err);
      }

      self.valueserializer.decode(val, function(err, decodedValue) {
        if (err) {
          return callback(err);
        }

        callback(null, decodedValue);
      });
    });
  });
};

LevelUpObjectAdapter.prototype.put = function(key, value, options, callback) {
  var self = this;

  if (typeof options === "function") {
    callback = options;
    options = {};
  }

  this.keyserializer.encode(key, function(err, encodedKey) {
    if (err) {
      return callback(err);
    }

    self.valueserializer.encode(value, function(err, encoded) {
      if (err) {
        return callback(err);
      }

      self.db.put(encodedKey, encoded, callback);
    });
  });
};

LevelUpObjectAdapter.prototype.set = LevelUpObjectAdapter.prototype.put;

LevelUpObjectAdapter.prototype.del = function(key, callback) {
  var self = this;

  this.keyserializer.encode(key, function(err, encodedKey) {
    if (err) {
      return callback(err);
    }

    self.db.del(encodedKey, callback);
  });
};

LevelUpObjectAdapter.prototype.batch = function(array, options, callback) {
  var self = this;

  async.each(
    array,
    function(item, finished) {
      if (item.type === "put") {
        self.put(item.key, item.value, options, finished);
      } else if (item.type === "del") {
        self.del(item.key, finished);
      } else {
        finished(new Error("Unknown batch type", item.type));
      }
    },
    function(err) {
      if (err) {
        return callback(err);
      }
      callback();
    }
  );
};

LevelUpObjectAdapter.prototype.isOpen = function() {
  return true;
};

module.exports = LevelUpObjectAdapter;


/***/ }),

/***/ 976672:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Receipt = __webpack_require__(164191);
var async = __webpack_require__(940008);

function ReceiptSerializer(database) {
  this.database = database;
}

ReceiptSerializer.prototype.encode = function(receipt, done) {
  done(null, receipt.toJSON());
};

ReceiptSerializer.prototype.decode = function(json, done) {
  var self = this;
  // Make sure we can handle mixed/upper-case transaction hashes
  // it doesn't seem possible to record a transaction hash that isn't
  // already lower case, as that's the way ganache generates them, however
  // I don't think it will hurt anything to normalize here anyway.
  // If you can figure out how to test this please feel free to add a test!
  var txHash = json.transactionHash.toLowerCase();

  this.database.transactions.get(json.transactionHash, function(err, tx) {
    if (err) {
      return done(err);
    }

    self.database.blockHashes.get(json.blockHash, function(err, blockIndex) {
      if (err) {
        return done(err);
      }

      async.parallel(
        {
          block: self.database.blocks.get.bind(self.database.blocks, blockIndex),
          logs: self.database.blockLogs.get.bind(self.database.blockLogs, blockIndex)
        },
        function(err, result) {
          if (err) {
            return done(err);
          }

          done(
            null,
            new Receipt(
              tx,
              result.block,
              result.logs.filter((log) => log.transactionHash.toLowerCase() === txHash),
              json.gasUsed,
              json.cumulativeGasUsed,
              json.contractAddress,
              json.status,
              json.logsBloom
            )
          );
        }
      );
    });
  });
};

module.exports = ReceiptSerializer;


/***/ }),

/***/ 597550:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// var to = require("../utils/to");
var Transaction = __webpack_require__(283286);
var Common = __webpack_require__(265982).default;
var ethUtil = __webpack_require__(791996);

const decode = function(json, done) {
  const options = {
    hash: json.hash,
    nonce: json.nonce,
    value: json.value,
    to: json.to,
    from: json.from,
    gasLimit: json.gas || json.gasLimit,
    gasPrice: json.gasPrice,
    data: json.data,
    v: json.v,
    r: json.r,
    s: json.s
  };

  const sigV = ethUtil.bufferToInt(options.v);
  let chainId = Math.floor((sigV - 35) / 2);
  if (chainId < 0) {
    chainId = 0;
  }

  const commonOptions = {
    name: "ganache",
    chainId,
    networkId: 1,
    comment: "Local test network"
  };

  let hardfork = "muirGlacier";
  if (json._options) {
    hardfork = json._options.hardfork;
    commonOptions.chainId = json._options.chainId;
    commonOptions.networkId = json._options.networkId;
  }

  const common = Common.forCustomChain(
    "mainnet", // TODO needs to match chain id
    commonOptions,
    hardfork
  );
  // databases generated before ganache-core@2.3.2 didn't have a `_type` and
  // and were always fake signed. So if _type is undefined it is "fake" (even
  // if we have a valid signature that can generate the tx's `from`).
  const type = json._type === undefined ? Transaction.types.fake : json._type;
  const tx = Transaction.fromJSON(options, type, common);

  // Commenting this out because we don't want to throw if the json.hash we
  // put in is different that the tx.hash() calculation we now have. There
  // may have been bug fixes to the way transactions are hashed in future
  // versions of ganache-core, but we still want tobe able to read in
  // transactions from previously saved databases!
  // if (to.hex(tx.hash()) !== json.hash) {
  //   const e = new Error(
  //     "DB consistency check: Decoded transaction hash " +
  //       "didn't match encoded hash. Expected: " +
  //       json.hash +
  //       "; actual: " +
  //       to.hex(tx.hash())
  //   );
  //   return done(e);
  // }

  done(null, tx);
};

const encode = function(tx, done) {
  const encoded = tx.encode();
  done(null, encoded);
};

module.exports = {
  encode,
  decode
};


/***/ }),

/***/ 839693:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var BlockchainDouble = __webpack_require__(85718);
var Account = __webpack_require__(95789).default;
var Block = __webpack_require__(339951);
var Log = __webpack_require__(358410);
var Receipt = __webpack_require__(164191);
var utils = __webpack_require__(791996);
var ForkedStorageTrie = __webpack_require__(112140);
var Web3 = __webpack_require__(230812);
var to = __webpack_require__(484302);
var Transaction = __webpack_require__(283286);
var async = __webpack_require__(940008);
var LRUCache = __webpack_require__(39593);
const Sublevel = __webpack_require__(998673);
const BN = utils.BN;

var inherits = __webpack_require__(431669).inherits;

inherits(ForkedBlockchain, BlockchainDouble);

const httpReg = /^https?:/i;
const protocolReg = /^[A-Za-z][A-Za-z0-9+\-.]*:/;
const validProtocolReg = /^(?:http|ws)s?:/i;
const blockNumberReg = /@([0-9]+)$/;

function cloneWithoutId(obj) {
  return Object.assign({}, obj, { id: null });
}

function ForkedBlockchain(options) {
  this.options = options || {};

  if (options.fork == null || (typeof options.fork === "string" && options.fork.trim().length === 0)) {
    throw new Error("ForkedBlockchain must be passed a fork parameter.");
  }

  this.forkVersion = null;

  if (typeof options.fork === "string") {
    const blockNumber = blockNumberReg.exec(options.fork);

    if (blockNumber) {
      options.fork = options.fork.slice(0, blockNumber.index);
      options.fork_block_number = parseInt(blockNumber[1], 10);
    }

    let fork;
    if (!protocolReg.test(options.fork)) {
      // we don't have a protocol at all, assume ws
      options.fork = "ws://" + options.fork;
      fork = new Web3.providers.WebsocketProvider(options.fork);
    } else if (validProtocolReg.test(options.fork)) {
      if (httpReg.test(options.fork)) {
        fork = new Web3.providers.HttpProvider(options.fork);
      } else {
        fork = new Web3.providers.WebsocketProvider(options.fork);
      }
    } else {
      throw new Error(`Invalid scheme for fork url: ${options.fork}. Supported schemes are: http, https, ws, and wss.`);
    }

    this.fork = fork;
  } else {
    this.fork = options.fork;
  }

  this.forkBlockNumber = options.fork_block_number;
  this.forkCacheSize = parseInt(options.forkCacheSize);

  // if forkCacheSize is `0`, it means it is "off"
  if (!isNaN(this.forkCacheSize) && this.forkCacheSize !== 0) {
    const send = this.fork.send;
    const cache = new LRUCache({
      // `-1` means `Infinity`, which is represented by `0` in LRUCache's options
      max: this.forkCacheSize === -1 ? 0 : this.forkCacheSize,
      length: (bufValue, strKey) => {
        // compute the rough byte size of the stored key + value
        return Buffer.byteLength(bufValue) + Buffer.byteLength(strKey, "utf8");
      }
    });

    // Patch the `send` method of the underlying fork provider. We can
    // simply cache every non-error result because all requests to the
    // fork should be deterministic.
    const pendingRequests = new Map();
    this.fork.send = (payload, callback) => {
      let payloads;
      const sendArray = Array.isArray(payload);
      if (sendArray) {
        payloads = payload;
      } else {
        payloads = [payload];
      }
      Promise.all(
        payloads.map(async(payload) => {
          const key = JSON.stringify(cloneWithoutId(payload));
          let pendingRequest = pendingRequests.get(key);
          // if a request is in flight just wait for it instead of sending another
          // note: web3 actually polls on `.send`, resending the `payload`, so don't wait
          // if the new `payload` is the same as the `pendingRequest`.
          if (pendingRequest && pendingRequest.payload !== payload) {
            await pendingRequest.promise;
          }

          const cachedItem = cache.get(key);
          if (cachedItem) {
            const result = JSON.parse(cachedItem.toString());
            result.id = payload.id;
            return Promise.resolve({ error: null, result });
          } else {
            const promise = new Promise((resolve) => {
              send.call(this.fork, payload, (error, result) => {
                if (!error) {
                  cache.set(key, Buffer.from(JSON.stringify(cloneWithoutId(result))));
                }
                resolve({ error, result });
              });
            });
            pendingRequest = {
              payload,
              promise
            };

            pendingRequests.set(key, pendingRequest);
            // Node 8 doesn't have Promise.finally
            promise
              .catch(() => {})
              .then(() => {
                pendingRequests.delete(key);
              });
            return promise;
          }
        })
      ).then((errResults) => {
        if (!sendArray) {
          const errResult = errResults[0];
          callback(errResult.error, errResult.result);
        } else {
          let hasError = false;
          const errors = [];
          const results = [];
          errResults.forEach(({ error, result }) => {
            if (error) {
              hasError = true;
            }
            errors.push(error);
            results.push(result);
          });
          callback(hasError ? errors : null, results);
        }
      });
    };
  }

  this.time = options.time;
  this.storageTrieCache = {};

  BlockchainDouble.call(this, options);

  this.createVMFromStateTrie = function() {
    var vm = BlockchainDouble.prototype.createVMFromStateTrie.apply(this, arguments);
    this.patchVM(vm);
    return vm;
  };

  this.web3 = new Web3(this.fork);
  this._touchedKeys = [];
}

ForkedBlockchain.prototype.initialize = async function(accounts, callback) {
  try {
    const forkVersion = await new Promise((resolve, reject) => {
      this.web3.eth.net.getId((err, version) => {
        if (err) {
          Error.captureStackTrace(err);
          err.message = `The fork provider errored when checking net_version: ${err.message}`;
          reject(err);
        } else {
          resolve(version);
        }
      });
    });

    this.forkVersion = forkVersion;

    const forkBlock = (this.forkBlock = await new Promise((resolve, reject) => {
      const queriedBlock = this.forkBlockNumber || "latest";
      this.web3.eth.getBlock(queriedBlock, (err, json) => {
        if (err) {
          Error.captureStackTrace(err);
          err.message =
            `The fork provider errored when checking for block '${
              queriedBlock
            }': ${err.message}`;
          reject(err);
        } else {
          resolve(json);
        }
      });
    }));

    // If no start time was passed, set the time to where we forked from.
    // We only want to do this if a block was explicitly passed. If a block
    // number wasn't passed, then we're using the last block and the current time.
    if (!this.time && this.forkBlockNumber) {
      this.time = this.options.time = new Date(to.number(forkBlock.timestamp) * 1000);
      this.setTime(this.time);
    }

    this.forkBlockNumber = this.options.fork_block_number = forkBlock.number;
    this.forkBlockHash = forkBlock.hash;

    // Fetch the nonce for all the accounts before we prime them in our state manager.
    // This is necessary to prevent conflicting contract deployments.
    const nonces = await Promise.all(
      accounts.map((account) => {
        return new Promise((resolve, reject) => {
          this.web3.eth.getTransactionCount(account.address, this.forkBlockNumber, (err, nonce) => {
            if (err) {
              Error.captureStackTrace(err);
              err.message =
                `The fork provider errored when checking the nonce for account ${
                  account.address
                }: ${err.message}`;
              reject(err);
            } else {
              resolve(nonce);
            }
          });
        });
      })
    );

    nonces.forEach((nonce, index) => {
      accounts[index].account.nonce = nonce;
    });

    BlockchainDouble.prototype.initialize.call(this, accounts, callback);
  } catch (err) {
    callback(err);
  }
};

ForkedBlockchain.prototype.patchVM = function(vm) {
  const trie = vm.stateManager._trie;
  const lookupAccount = this.getLookupAccount(trie);
  // Unfortunately forking requires a bit of monkey patching, but it gets the job done.
  vm.stateManager._cache._lookupAccount = lookupAccount;
  vm.stateManager._lookupStorageTrie = this.getLookupStorageTrie(trie, lookupAccount);
};

/**
 * @param db
 * @param root
 * @param options Allows overriding the options passed to the ForkedStorageTrie,
 * like `forkBlockNumber` (required for tracing transactions)
 */
ForkedBlockchain.prototype.createStateTrie = function(db, root, options) {
  options = Object.assign(
    {
      fork: this.fork,
      forkBlockNumber: this.forkBlockNumber,
      blockchain: this
    },
    options
  );
  // never allow the forkBlockNumber to go beyond our root forkBlockNumber
  if (options.forkBlockNumber > this.forkBlockNumber) {
    options.forkBlockNumber = this.forkBlockNumber;
  }
  return new ForkedStorageTrie(db, root, options);
};

ForkedBlockchain.prototype.createGenesisBlock = function(callback) {
  const forkBlock = this.forkBlock;

  this.createBlock(function(err, block) {
    if (err) {
      return callback(err);
    }

    block.header.number = forkBlock.number + 1;
    block.header.parentHash = forkBlock.hash;

    callback(null, block);
  });
};

ForkedBlockchain.prototype.getLookupStorageTrie = function(stateTrie, lookupAccount) {
  lookupAccount = lookupAccount || this.getLookupAccount(stateTrie);
  return (address, callback) => {
    const storageTrie = stateTrie.copy();
    storageTrie.address = address;
    lookupAccount(address, (err, account) => {
      if (err) {
        return callback(err);
      }

      storageTrie.root = account.stateRoot;
      callback(null, storageTrie);
    });
  };
};

ForkedBlockchain.prototype.isFallbackBlock = function(value, callback) {
  var self = this;

  self.getEffectiveBlockNumber(value, function(err, number) {
    if (err) {
      return callback(err);
    }

    callback(null, number <= to.number(self.forkBlockNumber));
  });
};

ForkedBlockchain.prototype.isBlockHash = function(value) {
  const isHash = typeof value === "string" && value.indexOf("0x") === 0 && value.length > 42;
  return isHash || (Buffer.isBuffer(value) && value.byteLength > 20);
};

ForkedBlockchain.prototype.isFallbackBlockHash = function(value, callback) {
  var self = this;

  if (!this.isBlockHash(value)) {
    return callback(null, false);
  }

  if (Buffer.isBuffer(value)) {
    value = to.hex(value);
  }

  self.data.blockHashes.get(value, function(err, blockIndex) {
    if (err) {
      if (err.notFound) {
        // If the block isn't found in our database, then it must be a fallback block.
        return callback(null, true);
      } else {
        return callback(err);
      }
    }
    callback(null, false);
  });
};

ForkedBlockchain.prototype.getFallbackBlock = function(numberOrHash, cb) {
  var self = this;

  if (Buffer.isBuffer(numberOrHash)) {
    // When tracing a transaction the VM sometimes ask for a block numbers as
    // buffers instead of numbers.
    numberOrHash = to.rpcDataHexString(numberOrHash);
  }
  if (typeof numberOrHash === "string" && numberOrHash.length !== 66) {
    numberOrHash = to.number(numberOrHash);
  }

  self.web3.eth.getBlock(numberOrHash, true, function(err, json) {
    if (err) {
      return cb(err);
    }

    if (json == null) {
      return cb(new Error("Block not found"));
    }

    var block = new Block();

    block.header.parentHash = utils.toBuffer(json.parentHash);
    block.header.uncleHash = utils.toBuffer(json.sha3Uncles);
    block.header.coinbase = utils.toBuffer(json.miner);
    block.header.stateRoot = utils.toBuffer(json.stateRoot); // Should we include the following three?
    block.header.transactionsTrie = utils.toBuffer(json.transactionsRoot);
    block.header.receiptTrie = utils.toBuffer(json.receiptsRoot);
    block.header.bloom = utils.toBuffer(json.logsBloom);
    block.header.difficulty = utils.toBuffer("0x" + json.totalDifficulty.toString(16)); // BigNumber
    block.header.number = utils.toBuffer(json.number);
    block.header.gasLimit = utils.toBuffer(json.gasLimit);
    block.header.gasUsed = utils.toBuffer(json.gasUsed);
    block.header.timestamp = utils.toBuffer(json.timestamp);
    block.header.extraData = utils.toBuffer(json.extraData);

    (json.transactions || []).forEach(function(txJson, index) {
      block.transactions.push(
        Transaction.fromJSON(txJson, Transaction.types.real, null, self.forkVersion, self.options.hardfork)
      );
    });

    // Fake block. Let's do the worst.
    // TODO: Attempt to fill out all block data so as to produce the same hash! (can we?)
    block.hash = function() {
      return utils.toBuffer(json.hash);
    };

    cb(null, block);
  });
};

ForkedBlockchain.prototype.getBlock = function(number, callback) {
  let checkFn;
  const isBlockHash = this.isBlockHash(number);
  if (isBlockHash) {
    checkFn = this.isFallbackBlockHash;
  } else {
    checkFn = this.isFallbackBlock;
  }
  checkFn.call(this, number, (err, isFallback) => {
    if (err) {
      return callback(err);
    }
    if (isFallback) {
      return this.getFallbackBlock(number, callback);
    }

    const getBlock = BlockchainDouble.prototype.getBlock.bind(this);
    if (isBlockHash) {
      getBlock(number, callback);
    } else {
      this.getRelativeBlockNumber(number, (err, number) => {
        if (err) {
          return callback(err);
        }
        getBlock(number, callback);
      });
    }
  });
};

ForkedBlockchain.prototype.getStorage = function(address, key, number, callback) {
  var self = this;

  this.getEffectiveBlockNumber(number, (err, blockNumber) => {
    if (err) {
      return callback(err);
    }

    if (blockNumber > self.forkBlockNumber) {
      // we should have this block

      self.getBlock(blockNumber, function(err, block) {
        if (err) {
          return callback(err);
        }

        const trie = self.stateTrie;

        // Manipulate the state root in place to maintain checkpoints
        const currentStateRoot = trie.root;
        self.stateTrie.root = block.header.stateRoot;

        self.getLookupStorageTrie(self.stateTrie)(address, (err, trie) => {
          if (err) {
            return callback(err);
          }

          trie.get(utils.setLengthLeft(utils.toBuffer(key), 32), function(err, value) {
            // Finally, put the stateRoot back for good
            trie.root = currentStateRoot;

            if (err != null) {
              return callback(err);
            }

            callback(null, value);
          });
        });
      });
    } else {
      // we're looking for something prior to forking, so let's
      // hit eth_getStorageAt
      self.web3.eth.getStorageAt(to.rpcDataHexString(address), to.rpcDataHexString(key), blockNumber, function(
        err,
        value
      ) {
        if (err) {
          return callback(err);
        }

        value = utils.rlp.encode(value);

        callback(null, value);
      });
    }
  });
};

ForkedBlockchain.prototype.getCode = function(address, number, callback) {
  var self = this;

  if (typeof number === "function") {
    callback = number;
    number = "latest";
  }

  if (!number) {
    number = "latest";
  }

  this.getEffectiveBlockNumber(number, function(err, effective) {
    if (err) {
      return callback(err);
    }
    number = effective;

    self.stateTrie.getTouchedAt(address, (err, touchedAt) => {
      if (err) {
        return callback(err);
      }

      if (typeof touchedAt !== "undefined" && touchedAt <= number) {
        BlockchainDouble.prototype.getCode.call(self, address, number, callback);
      } else {
        if (number > to.number(self.forkBlockNumber)) {
          number = "latest";
        }

        self.fetchCodeFromFallback(address, number, function(err, code) {
          if (code) {
            code = utils.toBuffer(code);
          }
          callback(err, code);
        });
      }
    });
  });
};

ForkedBlockchain.prototype.getLookupAccount = function(trie) {
  return (address, callback) => {
    // If the account doesn't exist in our state trie, get it off the wire.
    trie.keyExists(address, (err, exists) => {
      if (err) {
        return callback(err);
      }
      if (exists) {
        trie.get(address, (err, data) => {
          if (err) {
            return callback(err);
          }
          const account = new Account(data);
          callback(null, account);
        });
      } else {
        this.fetchAccountFromFallback(address, to.number(trie.forkBlockNumber), callback);
      }
    });
  };
};

ForkedBlockchain.prototype.getAccount = function(address, number, callback) {
  var self = this;

  if (typeof number === "function") {
    callback = number;
    number = "latest";
  }

  this.getEffectiveBlockNumber(number, function(err, effective) {
    if (err) {
      return callback(err);
    }
    number = effective;

    // If the account doesn't exist in our state trie, get it off the wire.
    self.stateTrie.keyExists(address, function(err, exists) {
      if (err) {
        return callback(err);
      }

      if (exists && number > to.number(self.forkBlockNumber)) {
        BlockchainDouble.prototype.getAccount.call(self, address, number, function(err, acc) {
          if (err) {
            return callback(err);
          }
          callback(null, acc);
        });
      } else {
        self.fetchAccountFromFallback(address, number, callback);
      }
    });
  });
};

ForkedBlockchain.prototype.getTransaction = function(hash, callback) {
  var self = this;
  BlockchainDouble.prototype.getTransaction.call(this, hash, function(err, tx) {
    if (err) {
      return callback(err);
    }
    if (tx != null) {
      return callback(null, tx);
    }

    self.web3.eth.getTransaction(hash, function(err, result) {
      if (err) {
        return callback(err);
      }

      if (result) {
        result = Transaction.fromJSON(result, Transaction.types.signed, null, self.forkVersion, self.options.hardfork);
      }

      callback(null, result);
    });
  });
};

ForkedBlockchain.prototype.getTransactionReceipt = function(hash, callback) {
  var self = this;
  BlockchainDouble.prototype.getTransactionReceipt.call(this, hash, function(err, receipt) {
    if (err) {
      return callback(err);
    }
    if (receipt) {
      return callback(null, receipt);
    }

    self.web3.eth.getTransactionReceipt(hash, function(err, receiptJson) {
      if (err) {
        return callback(err);
      }
      if (!receiptJson) {
        return callback();
      }

      async.parallel(
        {
          tx: self.getTransaction.bind(self, hash),
          block: self.getBlock.bind(self, receiptJson.blockNumber)
        },
        function(err, result) {
          if (err) {
            return callback(err);
          }

          var logs = receiptJson.logs.map(function(log) {
            log.block = result.block;
            return new Log(log);
          });

          var receipt = new Receipt(
            result.tx,
            result.block,
            logs,
            receiptJson.gasUsed,
            receiptJson.cumulativeGasUsed,
            receiptJson.contractAddress,
            receiptJson.status,
            to.hex(receiptJson.logsBloom)
          );

          callback(null, receipt);
        }
      );
    });
  });
};

ForkedBlockchain.prototype.fetchAccountFromFallback = function(address, blockNumber, callback) {
  var self = this;
  address = to.hex(address);

  async.parallel(
    {
      code: this.fetchCodeFromFallback.bind(this, address, blockNumber),
      balance: this.fetchBalanceFromFallback.bind(this, address, blockNumber),
      nonce: this.fetchNonceFromFallback.bind(this, address, blockNumber)
    },
    function(err, results) {
      if (err) {
        return callback(err);
      }

      var code = results.code;
      var balance = results.balance;
      var nonce = results.nonce;

      var account = new Account({
        nonce: nonce,
        balance: balance
      });

      // This puts the code on the trie, keyed by the hash of the code.
      // It does not actually link an account to code in the trie.
      account.setCode(self.stateTrie, utils.toBuffer(code), function(err) {
        if (err) {
          return callback(err);
        }
        callback(null, account);
      });
    }
  );
};

ForkedBlockchain.prototype.fetchCodeFromFallback = function(address, blockNumber, callback) {
  var self = this;
  address = to.hex(address);

  // Allow an optional blockNumber
  if (typeof blockNumber === "function") {
    callback = blockNumber;
    blockNumber = this.forkBlockNumber;
  }

  this.getSafeFallbackBlockNumber(blockNumber, function(err, safeBlockNumber) {
    if (err) {
      return callback(err);
    }

    self.web3.eth.getCode(address, safeBlockNumber, function(err, code) {
      if (err) {
        return callback(err);
      }

      code = "0x" + utils.toBuffer(code).toString("hex");
      callback(null, code);
    });
  });
};

ForkedBlockchain.prototype.fetchBalanceFromFallback = function(address, blockNumber, callback) {
  var self = this;
  address = to.hex(address);

  // Allow an optional blockNumber
  if (typeof blockNumber === "function") {
    callback = blockNumber;
    blockNumber = this.forkBlockNumber;
  }

  this.getSafeFallbackBlockNumber(blockNumber, function(err, safeBlockNumber) {
    if (err) {
      return callback(err);
    }

    self.web3.eth.getBalance(address, safeBlockNumber, function(err, balance) {
      if (err) {
        return callback(err);
      }

      balance = "0x" + new BN(balance).toString(16);
      callback(null, balance);
    });
  });
};

ForkedBlockchain.prototype.fetchNonceFromFallback = function(address, blockNumber, callback) {
  var self = this;
  address = to.hex(address);

  // Allow an optional blockNumber
  if (typeof blockNumber === "function") {
    callback = blockNumber;
    blockNumber = this.forkBlockNumber;
  }

  this.getSafeFallbackBlockNumber(blockNumber, function(err, safeBlockNumber) {
    if (err) {
      return callback(err);
    }

    self.web3.eth.getTransactionCount(address, safeBlockNumber, function(err, nonce) {
      if (err) {
        return callback(err);
      }

      nonce = "0x" + self.web3.utils.toBN(nonce).toString(16);
      callback(null, nonce);
    });
  });
};

ForkedBlockchain.prototype.getHeight = function(callback) {
  this.latestBlock(function(err, block) {
    if (err) {
      return callback(err);
    }
    callback(null, to.number(block.header.number));
  });
};

ForkedBlockchain.prototype.getRelativeBlockNumber = function(number, callback) {
  var self = this;
  this.getEffectiveBlockNumber(number, function(err, effective) {
    if (err) {
      return callback(err);
    }
    callback(null, effective - to.number(self.forkBlockNumber) - 1);
  });
};

ForkedBlockchain.prototype.getSafeFallbackBlockNumber = function(blockNumber, callback) {
  var forkBlockNumber = to.number(this.forkBlockNumber);

  if (blockNumber == null) {
    return callback(null, forkBlockNumber);
  }

  this.getEffectiveBlockNumber(blockNumber, function(err, effective) {
    if (err) {
      return callback(err);
    }
    if (effective > forkBlockNumber) {
      effective = forkBlockNumber;
    }

    callback(null, effective);
  });
};

ForkedBlockchain.prototype.getBlockLogs = function(number, callback) {
  var self = this;

  this.getEffectiveBlockNumber(number, function(err, effective) {
    if (err) {
      return callback(err);
    }

    self.getRelativeBlockNumber(effective, function(err, relative) {
      if (err) {
        return callback(err);
      }

      if (relative < 0) {
        self.getBlock(number, function(err, block) {
          if (err) {
            return callback(err);
          }

          self.web3.currentProvider.send(
            {
              jsonrpc: "2.0",
              method: "eth_getLogs",
              params: [
                {
                  fromBlock: to.hex(number),
                  toBlock: to.hex(number)
                }
              ],
              id: new Date().getTime()
            },
            function(err, res) {
              if (err) {
                return callback(err);
              }

              var logs = res.result.map(function(log) {
                // To make this result masquerade as the right information.
                log.block = block;
                return new Log(log);
              });

              callback(null, logs);
            }
          );
        });
      } else {
        BlockchainDouble.prototype.getBlockLogs.call(self, relative, callback);
      }
    });
  });
};

ForkedBlockchain.prototype.getQueuedNonce = function(address, callback) {
  var nonce = null;
  var addressBuffer = to.buffer(address);
  this.pending_transactions.forEach(function(tx) {
    if (!tx.from.equals(addressBuffer)) {
      return;
    }

    var pendingNonce = new BN(tx.nonce);
    // If this is the first queued nonce for this address we found,
    // or it's higher than the previous highest, note it.
    if (nonce === null || pendingNonce.gt(nonce)) {
      nonce = pendingNonce;
    }
  });

  // If we found a queued transaction nonce, return one higher
  // than the highest we found
  if (nonce != null) {
    return callback(null, nonce.iaddn(1).toArrayLike(Buffer));
  }
  this.getLookupAccount(this.stateTrie)(addressBuffer, function(err, account) {
    if (err) {
      return callback(err);
    }

    // nonces are initialized as an empty buffer, which isn't what we want.
    callback(null, account.nonce.length === 0 ? Buffer.from([0]) : account.nonce);
  });
};

ForkedBlockchain.prototype.processCall = function(tx, blockNumber, callback) {
  const self = this;

  this.getEffectiveBlockNumber(blockNumber, function(err, effectiveBlockNumber) {
    if (err) {
      return callback(err);
    }

    if (effectiveBlockNumber > self.forkBlockNumber) {
      BlockchainDouble.prototype.processCall.call(self, tx, blockNumber, callback);
    } else {
      self.web3.eth.call({
        from: to.rpcDataHexString(tx.from),
        to: to.nullableRpcDataHexString(tx.to),
        data: to.rpcDataHexString(tx.data)
      }, effectiveBlockNumber, function(err, result) {
        if (err) {
          return callback(err);
        }

        callback(null, {
          execResult: {
            returnValue: result
          }
        });
      });
    }
  });
};

ForkedBlockchain.prototype.processBlock = async function(vm, block, commit, callback) {
  const self = this;

  self._touchedKeys = [];
  BlockchainDouble.prototype.processBlock.call(self, vm, block, commit, callback);
};

ForkedBlockchain.prototype.putBlock = function(block, logs, receipts, callback) {
  const self = this;
  const touched = Sublevel(self.data.trie_db).sublevel("touched");
  const blockKey = `block-${to.number(block.header.number)}`;

  BlockchainDouble.prototype.putBlock.call(self, block, logs, receipts, function(err, result) {
    if (err) {
      return callback(err);
    }

    touched.put(blockKey, JSON.stringify(self._touchedKeys), (err) => {
      if (err) {
        return callback(err);
      }

      callback(null, result);
    });
  });
};

ForkedBlockchain.prototype.popBlock = function(callback) {
  const self = this;
  const touched = Sublevel(this.data.trie_db).sublevel("touched");

  this.data.blocks.last(function(err, block) {
    if (err) {
      return callback(err);
    }
    if (block == null) {
      return callback(null, null);
    }

    const blockKey = `block-${to.number(block.header.number)}`;
    touched.get(blockKey, function(err, value) {
      if (err) {
        return callback(err);
      }

      const touchedKeys = value ? JSON.parse(value) : [];
      async.eachSeries(
        touchedKeys,
        function(touchedKey, finished) {
          touched.del(touchedKey, finished);
        },
        function(err) {
          if (err) {
            return callback(err);
          }

          touched.del(blockKey, function(err) {
            if (err) {
              return callback(err);
            }

            BlockchainDouble.prototype.popBlock.call(self, callback);
          });
        }
      );
    });
  });
};

ForkedBlockchain.prototype.close = function(callback) {
  if (this.fork.disconnect) {
    this.fork.disconnect();
  }
  BlockchainDouble.prototype.close.call(this, callback);
};

module.exports = ForkedBlockchain;


/***/ }),

/***/ 112140:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Sublevel = __webpack_require__(998673);
const MerklePatriciaTree = __webpack_require__(822358);
const BaseTrie = __webpack_require__(577986);
const checkpointInterface = __webpack_require__(241276);
var utils = __webpack_require__(791996);
var inherits = __webpack_require__(431669).inherits;
var Web3 = __webpack_require__(230812);
var to = __webpack_require__(484302);

inherits(ForkedStorageBaseTrie, BaseTrie);

function ForkedStorageBaseTrie(db, root, options) {
  BaseTrie.call(this, db, root);
  this._touched = Sublevel(this.db).sublevel("touched");

  this.options = options;
  this.address = options.address;
  this.forkBlockNumber = options.forkBlockNumber;
  this.blockchain = options.blockchain;
  this.fork = options.fork;
  this.web3 = new Web3(this.fork);
  this.persist = typeof options.persist === "undefined" ? true : options.persist;
}

// Note: This overrides a standard method whereas the other methods do not.
ForkedStorageBaseTrie.prototype.get = function(key, callback) {
  var self = this;

  key = utils.toBuffer(key);

  self.keyExists(key, function(err, keyExists) {
    if (err) {
      return callback(err);
    }

    self.getTouchedAt(key, function(err, touchedAt) {
      if (err) {
        return callback(err);
      }

      if (keyExists && typeof touchedAt !== "undefined") {
        MerklePatriciaTree.prototype.get.call(self, key, function(err, r) {
          callback(err, r);
        });
      } else {
        // If this is the main trie, get the whole account.
        if (self.address == null) {
          self.blockchain.fetchAccountFromFallback(key, self.forkBlockNumber, function(err, account) {
            if (err) {
              return callback(err);
            }

            callback(null, account.serialize());
          });
        } else {
          self.web3.eth.getStorageAt(
            to.rpcDataHexString(self.address),
            to.rpcDataHexString(key),
            self.forkBlockNumber,
            function(err, value) {
              if (err) {
                return callback(err);
              }

              value = utils.rlp.encode(value);

              callback(null, value);
            }
          );
        }
      }
    });
  });
};

ForkedStorageBaseTrie.prototype.keyExists = function(key, callback) {
  key = utils.toBuffer(key);
  this.findPath(key, (err, node, remainder, stack) => {
    const exists = node && remainder.length === 0;
    callback(err, exists);
  });
};

ForkedStorageBaseTrie.prototype.touch = function(key, callback) {
  if (!this.persist) {
    return callback();
  }

  const self = this;
  let rpcKey = to.rpcDataHexString(key);
  if (this.address) {
    rpcKey = `${to.rpcDataHexString(this.address)};${rpcKey}`;
  }
  rpcKey = rpcKey.toLowerCase();

  this._touched.get(rpcKey, (err, result) => {
    if (err && err.type !== "NotFoundError") {
      return callback(err);
    }

    if (typeof result === "undefined") {
      // key doesn't exist
      this.blockchain.data.blocks.last((err, lastBlock) => {
        if (err) {
          return callback(err);
        }

        const number = lastBlock === null ? self.forkBlockNumber : to.number(lastBlock.header.number);
        this._touched.put(rpcKey, number + 1);
        this.blockchain._touchedKeys.push(rpcKey);
        callback();
      });
    } else {
      callback();
    }
  });
};

const originalPut = ForkedStorageBaseTrie.prototype.put;
ForkedStorageBaseTrie.prototype.put = function(key, value, callback) {
  const self = this;
  this.touch(key, function(err) {
    if (err) {
      return callback(err);
    }

    originalPut.call(self, key, value, callback);
  });
};

ForkedStorageBaseTrie.prototype.getTouchedAt = function(key, callback) {
  let rpcKey = to.rpcDataHexString(key);
  if (this.address) {
    rpcKey = `${to.rpcDataHexString(this.address)};${rpcKey}`;
  }
  rpcKey = rpcKey.toLowerCase();

  this._touched.get(rpcKey, function(err, result) {
    if (err && err.type !== "NotFoundError") {
      return callback(err);
    }

    callback(null, result);
  });
};

ForkedStorageBaseTrie.prototype.del = function(key, callback) {
  this.put(key, 0, callback);
};

ForkedStorageBaseTrie.prototype.copy = function() {
  return new ForkedStorageBaseTrie(this.db, this.root, this.options);
};

inherits(ForkedStorageTrie, ForkedStorageBaseTrie);

function ForkedStorageTrie(db, root, options) {
  ForkedStorageBaseTrie.call(this, db, root, options);
  checkpointInterface.call(this, this);
}

ForkedStorageTrie.prove = MerklePatriciaTree.prove;
ForkedStorageTrie.verifyProof = MerklePatriciaTree.verifyProof;

module.exports = ForkedStorageTrie;


/***/ }),

/***/ 563374:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const http = __webpack_require__(298605);
const { rpcError } = __webpack_require__(484302);

const hasOwnProperty = Object.prototype.hasOwnProperty;

function createCORSResponseHeaders(method, requestHeaders) {
  // https://fetch.spec.whatwg.org/#http-requests
  const headers = {};
  const isCORSRequest = hasOwnProperty.call(requestHeaders, "origin");
  if (isCORSRequest) {
    // OPTIONS preflight requests need a little extra treatment
    if (method === "OPTIONS") {
      // we only allow POST requests, so it doesn't matter which method the request is asking for
      headers["Access-Control-Allow-Methods"] = "POST";
      // echo all requested access-control-request-headers back to the response
      if (hasOwnProperty.call(requestHeaders, "access-control-request-headers")) {
        headers["Access-Control-Allow-Headers"] = requestHeaders["access-control-request-headers"];
      }
      // Safari needs Content-Length = 0 for a 204 response otherwise it hangs forever
      // https://github.com/expressjs/cors/pull/121#issue-130260174
      headers["Content-Length"] = 0;

      // Make browsers and compliant clients cache the OPTIONS preflight response for 10
      // minutes (this is the maximum time Chromium allows)
      headers["Access-Control-Max-Age"] = 600; // seconds
    }

    // From the spec: https://fetch.spec.whatwg.org/#http-responses
    // "For a CORS-preflight request, request’s credentials mode is always "omit",
    // but for any subsequent CORS requests it might not be. Support therefore
    // needs to be indicated as part of the HTTP response to the CORS-preflight request as well.", so this
    // header is added to all requests.
    // Additionally, https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials,
    // states that there aren't any HTTP Request headers that indicate you whether or not Request.withCredentials
    // is set. Because web3@1.0.0-beta.35-? always sets `request.withCredentials = true` while Safari requires it be
    // returned even when no credentials are set in the browser this header must always be return on all requests.
    // (I've found that Chrome and Firefox don't actually require the header when credentials aren't set)
    //  Regression Commit: https://github.com/ethereum/web3.js/pull/1722
    //  Open Web3 Issue: https://github.com/ethereum/web3.js/issues/1802
    headers["Access-Control-Allow-Credentials"] = true;

    // From the spec: "It cannot be reliably identified as participating in the CORS protocol
    // as the `Origin` header is also included for all requests whose method is neither
    // `GET` nor `HEAD`."
    // Explicitly set the origin instead of using *, since credentials
    // can't be used in conjunction with *. This will always be set
    /// for valid preflight requests.
    headers["Access-Control-Allow-Origin"] = requestHeaders.origin;
  }
  return headers;
}

function sendResponse(response, statusCode, headers, data) {
  response.writeHead(statusCode, headers);
  response.end(data);
}

module.exports = function(provider, logger) {
  var server = http.createServer(function(request, response) {
    var method = request.method;
    var body = [];

    request
      .on("data", function(chunk) {
        body.push(chunk);
      })
      .on("end", function() {
        body = Buffer.concat(body).toString();
        // At this point, we have the headers, method, url and body, and can now
        // do whatever we need to in order to respond to this request.

        const headers = createCORSResponseHeaders(method, request.headers);

        switch (method) {
          case "POST":
            var payload;
            try {
              payload = JSON.parse(body);
            } catch (e) {
              headers["Content-Type"] = "text/plain";
              sendResponse(response, 400, headers, "400 Bad Request");
              return;
            }

            // Log messages that come into the TestRPC via http
            if (payload instanceof Array) {
              // Batch request
              for (var i = 0; i < payload.length; i++) {
                var item = payload[i];
                logger.log(item.method);
              }
            } else {
              logger.log(payload.method);
            }

            // http connections do not support subscriptions
            if (payload.method === "eth_subscribe" || payload.method === "eth_unsubscribe") {
              headers["Content-Type"] = "application/json";
              sendResponse(response, 400, headers, rpcError(payload.id, -32000, "notifications not supported"));
              break;
            }

            provider.send(payload, function(_, result) {
              headers["Content-Type"] = "application/json";
              sendResponse(response, 200, headers, JSON.stringify(result));
            });

            break;
          case "OPTIONS":
            sendResponse(response, 204, headers);
            break;
          default:
            headers["Content-Type"] = "text/plain";
            sendResponse(response, 400, headers, "400 Bad Request");
            break;
        }
      });
  });

  server.ganacheProvider = provider;
  return server;
};


/***/ }),

/***/ 419767:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// make sourcemaps work!
__webpack_require__(977575);

const ProviderEngine = __webpack_require__(912906);
const SubscriptionSubprovider = __webpack_require__(378191);

const RequestFunnel = __webpack_require__(625165);
const DelayedBlockFilter = __webpack_require__(1428);
const GethDefaults = __webpack_require__(582132);
const GethApiDouble = __webpack_require__(772573);

const BlockTracker = __webpack_require__(373863);

const RuntimeError = __webpack_require__(828175);
const EventEmitter = __webpack_require__(128614);

const _ = __webpack_require__(494517);

function Provider(options) {
  const self = this;
  EventEmitter.call(this);

  this.options = options = self._applyDefaultOptions(options || {});

  const gethApiDouble = new GethApiDouble(options, this);

  this.engine = new ProviderEngine({
    blockTracker: new BlockTracker({ blockchain: gethApiDouble.state.blockchain })
  });

  const subscriptionSubprovider = new SubscriptionSubprovider();

  this.engine.manager = gethApiDouble;
  this.engine.addProvider(new RequestFunnel());
  this.engine.addProvider(new DelayedBlockFilter());
  this.engine.addProvider(subscriptionSubprovider);
  this.engine.addProvider(new GethDefaults());
  this.engine.addProvider(gethApiDouble);

  this.engine.setMaxListeners(100);
  this.engine.start();

  this.manager = gethApiDouble;
  this.sendAsync = this.send.bind(this);
  this.send = this.send.bind(this);
  this.close = this.close.bind(this);
  this._queueRequest = this._queueRequest.bind(this);
  this._processRequestQueue = this._processRequestQueue.bind(this);

  subscriptionSubprovider.on("data", function(err, notification) {
    self.emit("data", err, notification);
  });
}

const defaultOptions = {
  _chainId: 1,
  _chainIdRpc: 1337,
  vmErrorsOnRPCResponse: true,
  verbose: false,
  asyncRequestProcessing: false,
  logger: {
    log: function() {}
  }
};

Provider.prototype = Object.create(EventEmitter.prototype);
Provider.prototype.constructor = Provider;

Provider.prototype._applyDefaultOptions = function(options) {
  return _.merge({}, defaultOptions, options);
};

Provider.prototype.send = function(payload, callback) {
  if (typeof callback !== "function") {
    throw new Error(
      "No callback provided to provider's send function. As of web3 1.0, provider.send " +
        "is no longer synchronous and must be passed a callback as its final argument."
    );
  }

  const self = this;

  const externalize = function(payload) {
    return _.cloneDeep(payload);
  };

  if (Array.isArray(payload)) {
    payload = payload.map(externalize);
  } else {
    payload = externalize(payload);
  }

  const intermediary = function(err, result) {
    // clone result so that we can mutate the response without worrying about
    // that messing up assumptions the calling logic might have about us
    // mutating things
    result = _.cloneDeep(result);
    let response;
    if (Array.isArray(result)) {
      response = [];
      for (let i = 0; i < result.length; i++) {
        response.push(self.reportErrorInResponse(payload[i], err, result[i]));
      }
    } else {
      response = self.reportErrorInResponse(payload, err, result);
    }

    if (self.options.verbose) {
      self.options.logger.log(
        " <   " +
          JSON.stringify(response, null, 2)
            .split("\n")
            .join("\n <   ")
      );
    }
    process.nextTick(() => callback(response.error ? err : null, response));
  };

  if (self.options.verbose) {
    self.options.logger.log(
      "   > " +
        JSON.stringify(payload, null, 2)
          .split("\n")
          .join("\n   > ")
    );
  }

  if (self.options.asyncRequestProcessing) {
    self.engine.sendAsync(payload, intermediary);
  } else {
    self._queueRequest(payload, intermediary);
  }
};

Provider.prototype.close = function(callback) {
  // This is a little gross reaching, but...
  this.manager.state.stopMining();
  this.manager.state.blockchain.close(callback);
  this.engine.stop();
};

Provider.prototype._queueRequest = function(payload, intermediary) {
  if (!this._requestQueue) {
    this._requestQueue = [];
  }

  this._requestQueue.push({
    payload: payload,
    callback: intermediary
  });

  setImmediate(this._processRequestQueue);
};

Provider.prototype._processRequestQueue = function() {
  const self = this;

  if (self._requestInProgress) {
    return;
  }

  self._requestInProgress = true;

  const args = self._requestQueue.shift();

  if (args) {
    self.engine.sendAsync(args.payload, (err, result) => {
      if (self._requestQueue.length > 0) {
        setImmediate(self._processRequestQueue);
      }
      args.callback(err, result);
      self._requestInProgress = false;
    });
  } else {
    // still need to free the lock
    self._requestInProgress = false;

    if (self._requestQueue.length > 0) {
      setImmediate(self._processRequestQueue);
    }
  }
};

Provider.prototype.cleanUpErrorObject = function(err, response) {
  // Our response should already have an error field at this point, if it
  // doesn't, this was likely intentional. If not, this is the wrong place to
  // fix that problem.
  if (!err || !response.error) {
    return response;
  }

  const errorObject = {
    error: {
      data: {}
    }
  };

  if (err.message) {
    // clean up the error reporting done by the provider engine so the error message isn't lost in the stack trace noise
    errorObject.error.message = err.message;
    errorObject.error.data.stack = err.stack;
    errorObject.error.data.name = err.name;
    if ("code" in err) {
      errorObject.error.code = err.code;
    }
  } else if (!response.error) {
    errorObject.error = {
      message: err.toString()
    };
  }

  return _.merge(response, errorObject);
};

// helper set of RPC methods which execute code and respond with a transaction hash as their result
const transactionMethods = new Set(["eth_sendTransaction", "eth_sendRawTransaction", "personal_sendTransaction"]);

Provider.prototype._isTransactionRequest = function(request) {
  return transactionMethods.has(request.method);
};

Provider.prototype.reportErrorInResponse = function(request, err, response) {
  const self = this;

  if (!err) {
    return response;
  }

  // TODO: for next major release: move reporting of tx hash on error to error
  // field to prevent poorly-written clients which assume that the existence of
  // the "result" field implies no errors from breaking.
  if (self._isTransactionRequest(request)) {
    if (err instanceof RuntimeError) {
      // Make sure we always return the transaction hash on failed transactions so
      // the caller can get their tx receipt. This breaks JSONRPC 2.0, but it's how
      // we've always done it.
      response.result = err.hashes[0];

      if (self.options.vmErrorsOnRPCResponse) {
        if (!response.error.data) {
          response.error.data = {};
        }
        response.error.data[err.hashes[0]] = err.results[err.hashes[0]];
      } else {
        delete response.error;
      }
    }
  }

  if (request.method === "eth_call") {
    if (err instanceof RuntimeError) {
      if (self.options.vmErrorsOnRPCResponse) {
        if (!response.error.data) {
          response.error.data = {};
        }
        response.error.data[err.hashes[0]] = err.results[err.hashes[0]];
      } else {
        response.result = err.results[err.hashes[0]].return || "0x";
        delete response.error;
      }
    }
  }

  return self.cleanUpErrorObject(err, response);
};

module.exports = Provider;


/***/ }),

/***/ 97216:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// make sourcemaps work!
__webpack_require__(977575);

var Provider = __webpack_require__(419767);
var webSocketServer = __webpack_require__(685291);
var httpServer = __webpack_require__(563374);
var _ = __webpack_require__(494517);

module.exports = {
  create: function(options) {
    options = _applyDefaultOptions(options || {});

    var logger = options.logger;
    var provider = new Provider(options);

    var server = httpServer(provider, logger);
    server.keepAliveTimeout = options.keepAliveTimeout;

    let connectionCounter = 0;
    const connections = {};
    server.on("connection", (conn) => {
      const key = connectionCounter++;
      connections[key] = conn;
      conn.on("close", () => delete connections[key]);
    });

    var oldListen = server.listen;

    server.listen = function() {
      var args = Array.prototype.slice.call(arguments);
      var callback = function() {};
      if (args.length > 0) {
        var last = args[args.length - 1];
        if (typeof last === "function") {
          callback = args.pop();
        }
      }

      var intermediary = function(err) {
        if (err) {
          return callback(err);
        }
        server.provider.manager.waitForInitialization(callback);
      };

      args.push(intermediary);

      oldListen.apply(server, args);
    };

    server.provider = provider;

    if (options.ws) {
      webSocketServer(server, provider, logger);
    }

    var oldClose = server.close;

    server.close = function(callback) {
      var args = Array.prototype.slice.call(arguments);
      oldClose.apply(server, args);

      server.provider.close(function(err) {
        if (err) {
          return callback(err);
        }
        Object.keys(connections).forEach((key) => {
          try {
            connections[key].destroy();
          } catch (error) {}
        });
      });
    };

    return server;
  }
};

const defaultOptions = {
  logger: {
    log: function() {}
  },
  ws: true,
  keepAliveTimeout: 5000
};

var _applyDefaultOptions = function(options) {
  return _.merge({}, defaultOptions, options);
};


/***/ }),

/***/ 368761:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Account = __webpack_require__(95789).default;
var RuntimeError = __webpack_require__(828175);
var Transaction = __webpack_require__(283286);
var utils = __webpack_require__(791996);
var seedrandom = __webpack_require__(236377);
var bip39 = __webpack_require__(705672);
var wallet = __webpack_require__(642110);
var hdkey = __webpack_require__(880496);
var async = __webpack_require__(940008);
var BlockchainDouble = __webpack_require__(85718);
var ForkedBlockchain = __webpack_require__(839693);
var Web3 = __webpack_require__(230812);
var fs = __webpack_require__(935747);
var sigUtil = __webpack_require__(802843);
var _ = __webpack_require__(494517);
const { BlockOutOfRangeError } = __webpack_require__(24742);
const BN = utils.BN;
const rlp = __webpack_require__(6636);
const Common = __webpack_require__(265982).default;

const ZERO_BUFFER = Buffer.from([0]);

var to = __webpack_require__(484302);
var random = __webpack_require__(404429);
var TXRejectedError = __webpack_require__(364011);

function StateManager(options, provider) {
  this.options = options = this._applyDefaultOptions(options || {});

  if (options.fork) {
    this.blockchain = new ForkedBlockchain(options);
  } else {
    this.blockchain = new BlockchainDouble(options);
  }

  this.vm = this.blockchain.vm;
  this.stateTrie = this.blockchain.stateTrie;

  this.accounts = {};
  this.secure = !!options.secure;
  this.account_passwords = {};
  this.personal_accounts = {};
  this.total_accounts = options.total_accounts;
  this.coinbase = null;

  this.latest_filter_id = 1;

  // This queue manages actions that shouldn't be run in parallel.
  // The action_processing flag ensures new actions are queued instead of
  // run immediately.
  this.action_queue = [];
  this.action_processing = false;

  this.snapshots = [];
  this.logger = options.logger;
  this.net_version = options.network_id;
  this.mnemonic = options.mnemonic;
  this.wallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(this.mnemonic));
  this.wallet_hdpath = options.hd_path || options.hdPath;

  this.gasPriceVal = to.rpcQuantityHexString(options.gasPrice);

  this.is_mining = true;
  this.blockTime = options.blockTime;
  this.is_mining_on_interval = !!options.blockTime;
  this.mining_interval_timeout = null;

  this._provider = provider;
}

const defaultOptions = {
  forkCacheSize: 1024 * 1024 * 1024,
  total_accounts: 10,
  gasPrice: "0x77359400", // 2 gwei
  default_balance_ether: 100,
  unlocked_accounts: [],
  hdPath: "m/44'/60'/0'/0/"
};

StateManager.prototype._applyDefaultOptions = function(options) {
  // do this so that we can use the same seed on our next run and get the same
  // results without explicitly setting a seed up front
  if (!options.seed) {
    options.seed = random.randomAlphaNumericString(10, seedrandom());
  }

  // generate a randomized default mnemonic
  if (!options.mnemonic) {
    const randomBytes = random.randomBytes(16, seedrandom(options.seed));
    options.mnemonic = bip39.entropyToMnemonic(randomBytes.toString("hex"));
  }

  if (!options.fork && !options.network_id) {
    options.network_id = new Date().getTime();
  }

  // We want this function to mutate the options object so that we can report
  // our settings back to our consumer application (e.g., ganache)
  return _.merge(options, defaultOptions, Object.assign({}, options));
};

StateManager.prototype.initialize = function(callback) {
  var self = this;

  var accounts = [];

  const defaultBalanceWei = to.hex(Web3.utils.toWei(self.options.default_balance_ether.toString(), "ether"));

  if (self.options.accounts) {
    accounts = self.options.accounts.map(self.createAccount.bind(self));
  } else {
    if (!self.total_accounts) {
      return callback(
        new Error("Cannot initialize chain: either options.accounts or options.total_accounts must be specified")
      );
    }

    for (var i = 0; i < self.total_accounts; i++) {
      accounts.push(
        self.createAccount({
          index: i,
          balance: defaultBalanceWei
        })
      );
    }
  }

  self.coinbase = to.hex(accounts[0].address);
  self.accounts = {};

  accounts.forEach(function(data) {
    self.accounts[data.address] = data;
    self.personal_accounts[data.address.toLowerCase()] = true;
  });

  // Turn array into object, mostly for speed purposes.
  // No need for caller to specify private keys.
  self.unlocked_accounts = self.options.unlocked_accounts.reduce(function(obj, address) {
    // If it doesn't have a hex prefix, must be a number (either a string or number type).
    if ((address + "").indexOf("0x") !== 0) {
      const idx = parseInt(address);
      const account = accounts[idx];
      if (!account) {
        throw new Error(`Account at index ${idx} not found. Max index available is ${accounts.length - 1}.`);
      }
      address = account.address.toLowerCase();
    }

    obj[address.toLowerCase()] = true; // can be any value
    return obj;
  }, {});

  if (!self.secure) {
    accounts.forEach(function(data) {
      self.unlocked_accounts[data.address.toLowerCase()] = data;
    });
  }

  if (self.options.account_keys_path) {
    const fileData = {
      addresses: {},
      private_keys: {}
    };
    accounts.forEach(function(account) {
      fileData.private_keys[account.address] = account.secretKey.toString("hex");
      fileData.addresses[account.address] = account;
    });
    const json = JSON.stringify(fileData);
    fs.writeFileSync(self.options.account_keys_path, json, "utf8");
  }

  self.blockchain.initialize(accounts, function(err) {
    if (err) {
      return callback(err);
    }

    // If the user didn't pass a specific version id in, then use the
    // forked blockchain's version (if it exists) or create our own.
    if (!self.net_version) {
      self.net_version = self.blockchain.forkVersion;
    }

    if (self.is_mining_on_interval) {
      self.mineOnInterval();
    }
    callback();
  });
};

StateManager.prototype._minerCancellationToken = null;
StateManager.prototype.mineOnInterval = function() {
  // cancel the a previous miner's timeout
  clearTimeout(this.mining_interval_timeout);

  // make sure a pending eth_mine doesn't come back and execute mineOnInterval
  // again...
  if (this._minerCancellationToken !== null) {
    this._minerCancellationToken.cancelled = true;
  }

  // if mining was stopped `mineOnInterval` shouldn't start mining again
  if (!this.is_mining) {
    this.logger.log("Warning: mineOnInterval called when miner was stopped");
    return;
  }

  const cancellationToken = { cancelled: false };
  this._minerCancellationToken = cancellationToken;

  const timeout = (this.mining_interval_timeout = setTimeout(
    this._provider.send.bind(this._provider),
    this.blockTime * 1000,
    { method: "evm_mine" },
    () => {
      if (!cancellationToken.cancelled) {
        this.mineOnInterval.bind(this)();
      }
    }
  ));

  // Ensure this won't keep a node process open.
  if (typeof timeout.unref === "function") {
    timeout.unref();
  }
};

StateManager.prototype.createAccount = function(opts, i) {
  var secretKey;

  if (opts.generate) {
    secretKey = wallet.generate().getPrivateKey();
  } else if (opts.secretKey) {
    secretKey = utils.toBuffer(to.hex(opts.secretKey));
  } else {
    var index = typeof opts.index === "undefined" ? i : opts.index;
    var acct = this.wallet.derivePath(this.wallet_hdpath + index); // index is a number
    secretKey = acct.getWallet().getPrivateKey(); // Buffer
  }

  var publicKey = utils.privateToPublic(secretKey);
  var address = utils.publicToAddress(publicKey);

  var account = new Account();

  account.balance = to.hex(opts.balance);

  var data = {
    secretKey: secretKey,
    publicKey: publicKey,
    address: to.hex(address).toLowerCase(),
    account: account
  };

  return data;
};

StateManager.prototype.blockNumber = function(callback) {
  return this.blockchain.getHeight(callback);
};

StateManager.prototype.gasPrice = function() {
  return this.gasPriceVal;
};

StateManager.prototype.getBalance = function(address, number, callback) {
  this.blockchain.getBalance(address, number, function(err, balance) {
    if (balance) {
      balance = to.rpcQuantityHexString(balance);
    }
    callback(err, balance);
  });
};

StateManager.prototype.getTransactionCount = function(address, number, callback) {
  this.blockchain.getNonce(address, number, function(err, nonce) {
    if (nonce) {
      nonce = to.rpcQuantityHexString(nonce);
    }
    callback(err, nonce);
  });
};

StateManager.prototype.getCode = function(address, number, callback) {
  this.blockchain.getCode(address, number, function(err, code) {
    if (code) {
      code = to.hex(code);
    }
    callback(err, code);
  });
};

StateManager.prototype.queueRawTransaction = function(data, callback) {
  // a hack until we get chainid and networkId alignment
  // in the next major (breaking_change) version:
  // Reason: historically we didn't validate chain ids.
  let chainId;
  if (Buffer.isBuffer(data)) {
    const decodedData = rlp.decode(data);
    let v = decodedData[6];
    if (v !== undefined) {
      v = utils.bufferToInt(v);
      chainId = Math.floor((v - 35) / 2);
      if (chainId < 0) {
        chainId = 0;
      }
    }
  }
  const common = !chainId
    ? this.blockchain.vm.opts.common
    : Common.forCustomChain(
      "mainnet", // TODO needs to match chain id
      {
        name: "ganache",
        networkId: this.options.network_id || this.blockchain.forkVersion,
        chainId,
        comment: "Local test network",
        bootstrapNodes: []
      },
      this.options.hardfork
    );
  const tx = new Transaction(data, Transaction.types.signed, common);
  // use toLowerCase() to properly handle from addresses meant to be validated.
  const from = to.hex(tx.from).toLowerCase();
  this._queueTransaction("eth_sendRawTransaction", tx, from, null, callback);
};

StateManager.prototype.queueStorage = function(address, position, block, callback) {
  this.action_queue.push({
    method: "eth_getStorageAt",
    address: utils.addHexPrefix(address),
    position: utils.addHexPrefix(position),
    block: block,
    callback: callback
  });

  // We know there's work, so get started.
  this.processNextAction();
};

StateManager.prototype.queueTransaction = function(method, txJsonRpc, blockNumber, callback) {
  // use toLowerCase() to properly handle from addresses meant to be validated.
  const from = txJsonRpc.from ? to.hex(txJsonRpc.from).toLowerCase() : null;

  if (from == null) {
    callback(new TXRejectedError("from not found; is required"));
    return;
  }

  // Error checks. It's possible to JSON.stringify a Buffer to JSON.
  // we actually now handle this "properly" (not sure about spec), but for
  // legacy reasons we don't allow it.
  if (txJsonRpc.to && typeof txJsonRpc.to !== "string") {
    return callback(new TXRejectedError("Invalid to address"));
  }

  const hasOwnProperty = Object.prototype.hasOwnProperty;
  const isKnownAccount = hasOwnProperty.call(this.accounts, from);

  if (method === "eth_sendTransaction" && !hasOwnProperty.call(this.unlocked_accounts, from)) {
    const msg = isKnownAccount ? "signer account is locked" : "sender account not recognized";
    return callback(new TXRejectedError(msg));
  }

  let type = Transaction.types.none;
  if (!isKnownAccount || method === "eth_call" || method === "eth_estimateGas") {
    type |= Transaction.types.fake;
  }

  let tx;
  try {
    tx = Transaction.fromJSON(txJsonRpc, type, this.blockchain.vm.opts.common);
    this._setTransactionDefaults(tx, method === "eth_sendTransaction");
  } catch (e) {
    callback(e);
    return;
  }
  this._queueTransaction(method, tx, from, blockNumber, callback);
};

StateManager.prototype._setTransactionDefaults = function(tx, isTransaction) {
  if (isTransaction && tx.gasLimit.length === 0) {
    tx.gasLimit = utils.toBuffer(this.blockchain.defaultTransactionGasLimit);
  }

  if (tx.gasPrice.length === 0) {
    tx.gasPrice = utils.toBuffer(this.gasPriceVal);
  }

  if (tx.value.length === 0) {
    tx.value = Buffer.from([0]);
  }

  if (tx.to.length === 0 || tx.to.equals(ZERO_BUFFER)) {
    tx.to = Buffer.allocUnsafe(0);
  }
};

StateManager.prototype._queueTransaction = function(method, tx, from, blockNumber, callback) {
  if (!(tx instanceof Transaction)) {
    throw new TXRejectedError("tx must be of type Transaction");
  }

  // If the transaction has a higher gas limit than the block gas limit, error.
  if (
    (method === "eth_sendRawTransaction" || method === "eth_sendTransaction") &&
    to.number(tx.gasLimit) > to.number(this.blockchain.blockGasLimit)
  ) {
    return callback(new TXRejectedError("Exceeds block gas limit"));
  }

  this.action_queue.push({
    method,
    from,
    tx,
    callback,
    blockNumber
  });

  // We know there's work, so get started.
  this.processNextAction();
};

StateManager.prototype.queueTransactionTrace = function(txHash, params, callback) {
  this.action_queue.push({
    method: "debug_traceTransaction",
    hash: to.hex(txHash),
    params: params,
    callback: callback
  });

  // We know there's work, so get started.
  this.processNextAction();
};

StateManager.prototype.processNextAction = function(override) {
  var self = this;

  if (override !== true) {
    if (this.action_processing === true || this.action_queue.length === 0) {
      return;
    }
  }

  var queued = this.action_queue.shift();

  // Set the flag that we're currently processing something.
  this.action_processing = true;

  var intermediary = function(err, result) {
    queued.callback(err, result);

    if (self.action_queue.length > 0) {
      self.processNextAction(true);
    } else {
      self.action_processing = false;
    }
  };

  if (typeof queued.method === "function") {
    var result = queued.method();
    return intermediary(null, result);
  } else if (queued.method === "eth_getStorageAt") {
    this.blockchain.getStorage(queued.address, queued.position, queued.block, function(err, result) {
      if (err) {
        return intermediary(err);
      }

      if (result) {
        result = utils.rlp.decode(result);
      }

      result = to.hex(result || 0);
      intermediary(null, result);
    });
  } else if (queued.method === "debug_traceTransaction") {
    this.blockchain.processTransactionTrace(queued.hash, queued.params, intermediary);
  } else if (queued.method === "eth_sendTransaction" || queued.method === "eth_sendRawTransaction") {
    this.processTransaction(queued.from, queued.tx, intermediary);
  } else if (queued.method === "eth_call") {
    this.processCall(queued.from, queued.tx, queued.blockNumber, intermediary);
  } else if (queued.method === "eth_estimateGas") {
    this.processGasEstimate(queued.from, queued.tx, queued.blockNumber, intermediary);
  }
};

StateManager.prototype.sign = function(address, dataToSign) {
  var account = this.accounts[to.hex(address).toLowerCase()];

  if (!account) {
    throw new Error("cannot sign data; no private key");
  }

  var secretKey = account.secretKey;
  var msg = to.buffer(dataToSign, "hex");
  var msgHash = utils.hashPersonalMessage(msg);
  var sgn = utils.ecsign(msgHash, Buffer.from(secretKey));
  // ethereumjs-utils changed the behavior of toRpcSig so that the `v` value
  // output by `toRpcSig` is always `sgn.v - 27` (basically `0` or `1`). In
  // order to avoid a breaking change in Ganache at this time we are calculating
  // a chain ID that will always a) validate the v, and b) generate an output v
  // of `0` or `1`, like it used to.
  const v = sgn.v - 27;
  const chainId = (v - 35) / 2;
  return utils.toRpcSig(v, sgn.r, sgn.s, chainId);
};

StateManager.prototype.signTypedData = function(address, typedDataToSign) {
  var account = this.accounts[to.hex(address).toLowerCase()];
  if (!account) {
    throw new Error("cannot sign data; no private key");
  }

  if (!typedDataToSign.types) {
    throw new Error("cannot sign data; types missing");
  }

  if (!typedDataToSign.types.EIP712Domain) {
    throw new Error("cannot sign data; EIP712Domain definition missing");
  }

  if (!typedDataToSign.domain) {
    throw new Error("cannot sign data; domain missing");
  }

  if (!typedDataToSign.primaryType) {
    throw new Error("cannot sign data; primaryType missing");
  }

  if (!typedDataToSign.message) {
    throw new Error("cannot sign data; message missing");
  }

  return sigUtil.signTypedData_v4(account.secretKey, { data: typedDataToSign });
};

StateManager.prototype.printTransactionReceipt = function(txHash, error, callback) {
  var self = this;

  self.blockchain.getTransactionReceipt(txHash, function(err, receipt) {
    if (err) {
      return callback(err);
    }

    self.blockchain.latestBlock(function(err, block) {
      if (err) {
        return callback(err);
      }

      receipt = receipt.toJSON();

      self.logger.log("");
      self.logger.log("  Transaction: " + txHash);

      if (receipt.contractAddress != null) {
        self.logger.log("  Contract created: " + receipt.contractAddress);
      }

      self.logger.log("  Gas usage: " + parseInt(receipt.gasUsed, 16));
      self.logger.log("  Block Number: " + parseInt(receipt.blockNumber, 16));
      self.logger.log("  Block Time: " + new Date(to.number(block.header.timestamp) * 1000).toString());

      if (error) {
        self.logger.log("  Runtime Error: " + error.error);
        if (error.reason) {
          self.logger.log("  Revert reason: " + error.reason);
        }
      }

      self.logger.log("");

      callback(null, txHash);
    });
  });
};

StateManager.prototype.processBlock = function(timestamp, callback) {
  var self = this;

  if (typeof timestamp === "function") {
    callback = timestamp;
    timestamp = null;
  }

  self.blockchain.processNextBlock(timestamp, function(runtimeError, transactions, vmOutput) {
    if (runtimeError && runtimeError instanceof RuntimeError === false) {
      // This is bad. Get out.
      return callback(runtimeError, transactions, vmOutput);
    }

    // TODO: Can we refactor printTransactionReceipt so it's synchronous?
    // We technically have the raw vm receipts (though they're not full receipts here...).
    async.eachSeries(
      transactions,
      function(tx, finishedPrinting) {
        var hash = to.hex(tx.hash());
        var error = runtimeError == null ? { results: {} } : runtimeError;
        self.printTransactionReceipt(hash, error.results[hash], finishedPrinting);
      },
      callback(runtimeError, transactions, vmOutput)
    );
  });
};

StateManager.prototype.processBlocks = function(totalBlocks, callback) {
  var self = this;

  if (typeof totalBlocks === "function") {
    callback = totalBlocks;
    totalBlocks = null;
  }

  // Note: VM errors (errors that the VM directly returns) trump all runtime errors.
  var runtimeError = null;
  var amountProcessed = 0;

  async.whilst(
    function() {
      var shouldContinue;

      if (totalBlocks == null) {
        shouldContinue = self.blockchain.pending_transactions.length > 0;
      } else {
        shouldContinue = amountProcessed < totalBlocks;
      }

      return shouldContinue;
    },
    function(done) {
      self.processBlock(function(err, transactions, vmOutput) {
        amountProcessed += 1;

        if (err) {
          if (err instanceof RuntimeError === false) {
            // This is bad. Get out.
            return done(err);
          }

          // We must have a RuntimeError. Merge results if we've found
          // other runtime errors during this execution.
          if (runtimeError == null) {
            runtimeError = err;
          } else {
            runtimeError.combine(err);
          }
        }

        // Note we don't quit on runtime errors. We keep processing transactions.
        done();
      });
    },
    function(err) {
      // Remember: vm errors trump runtime errors
      callback(err || runtimeError);
    }
  );
};

StateManager.prototype.processCall = function(from, tx, blockNumber, callback) {
  var self = this;

  function next(err, tx) {
    if (err) {
      return callback(err);
    }

    self.blockchain.processCall(tx, blockNumber, function(err, results) {
      if (err) {
        if (err instanceof BlockOutOfRangeError) {
          // block doesn't exist
          return callback(null, null);
        }
        return callback(err);
      }

      var result = "0x";
      if (!results.error && results.execResult.returnValue) {
        result = to.hex(results.execResult.returnValue);
      } else if (results.error) {
        self.logger.log(`Error processing call: ${results.error}`);
      }

      return callback(null, result);
    });
  }

  // `eth_call` should never need to validate an existing nonce
  if (tx.nonce.length === 0) {
    self.createTransactionWithCorrectNonce(tx, from, next);
  } else {
    next(null, tx);
  }
};

StateManager.prototype.processGasEstimate = function(from, tx, blockNumber, callback) {
  var self = this;

  function next(err, tx) {
    if (err) {
      return callback(err);
    }

    self.blockchain.estimateGas(tx, blockNumber, function(err, results) {
      if (err) {
        return callback(err);
      }
      var result = "0x";
      if (!results.error) {
        result = to.hex(results.gasEstimate);
      } else {
        self.logger.log(`Error calculating gas estimate: ${results.error}`);
      }
      return callback(null, result);
    });
  }

  // `eth_estimateGas` should never need to validate an existing nonce
  if (tx.nonce.length === 0) {
    self.createTransactionWithCorrectNonce(tx, from, next);
  } else {
    next(null, tx);
  }
};

StateManager.prototype.processTransaction = function(from, tx, callback) {
  var self = this;

  self.createTransactionWithCorrectNonce(tx, from, function(err, tx) {
    if (err) {
      return callback(err);
    }

    self.blockchain.queueTransaction(tx);

    var txHash = to.hex(tx.hash());

    // If we're not currently mining or we're mining on an interval,
    // only queue the transaction, don't process it.
    if (self.is_mining === false || self.is_mining_on_interval) {
      return callback(null, txHash);
    }

    self.processBlocks(function(err) {
      if (err) {
        return callback(err);
      }
      callback(null, txHash);
    });
  });
};

StateManager.prototype.getTransactionReceipt = function(hash, callback) {
  this.blockchain.getTransactionReceipt(hash, function(err, receipt) {
    if (err && err.notFound) {
      // Return null if the receipt's not found.
      return callback(null, null);
    }
    callback(err, receipt);
  });
};

StateManager.prototype.getBlock = function(hashOrNumber, callback) {
  this.blockchain.getBlock(hashOrNumber, callback);
};

StateManager.prototype.getLogs = function(filter, callback) {
  var self = this;

  // filter.address may be a single address or an array
  // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs
  var expectedAddress = filter.address && (Array.isArray(filter.address) ? filter.address : [filter.address]);
  expectedAddress =
    expectedAddress &&
    expectedAddress.map(function(a) {
      return a.toLowerCase();
    });
  var expectedTopics = filter.topics || [];

  async.parallel(
    {
      fromBlock: this.blockchain.getEffectiveBlockNumber.bind(this.blockchain, filter.fromBlock || "latest"),
      toBlock: this.blockchain.getEffectiveBlockNumber.bind(this.blockchain, filter.toBlock || "latest"),
      latestBlock: this.blockchain.getEffectiveBlockNumber.bind(this.blockchain, "latest"),
      block: this.blockchain.getBlock.bind(this.blockchain, filter.blockHash || 0)
    },
    function(err, results) {
      if (err) {
        return callback(err);
      }
      var fromBlock = results.fromBlock;
      var toBlock = results.toBlock;
      var latestBlock = results.latestBlock;
      var block = results.block;

      if (toBlock > latestBlock) {
        toBlock = latestBlock;
      }

      if (filter.blockHash) {
        fromBlock = to.number(block.header.number);
        toBlock = to.number(block.header.number);
      }

      var logs = [];
      var current = fromBlock;

      async.whilst(
        function() {
          return current <= toBlock;
        },
        function(finished) {
          self.blockchain.getBlockLogs(current, function(err, blockLogs) {
            if (err) {
              return finished(err);
            }

            // Filter logs that match the address
            var filtered = !expectedAddress
              ? blockLogs
              : blockLogs.filter(function(log) {
                return expectedAddress.indexOf(log.address.toLowerCase()) > -1;
              });

            // Now filter based on topics.
            filtered = filtered.filter(function(log) {
              var keep = true;
              for (var i = 0; i < expectedTopics.length; i++) {
                var expectedTopic = expectedTopics[i];
                var logTopic = log.topics[i];
                if (expectedTopic == null) {
                  continue;
                }
                var isMatch = Array.isArray(expectedTopic)
                  ? expectedTopic.includes(logTopic)
                  : expectedTopic === logTopic;
                if (i >= log.topics.length || !isMatch) {
                  keep = false;
                  break;
                }
              }
              return keep;
            });

            logs.push.apply(logs, filtered);

            current += 1;
            finished();
          });
        },
        function(err) {
          if (err) {
            return callback(err);
          }

          logs = logs.map(function(log) {
            return log.toJSON();
          });

          callback(err, logs);
        }
      );
    }
  );
};

// Note: Snapshots have 1-based ids.
StateManager.prototype.snapshot = function(callback) {
  var self = this;

  this.blockchain.getHeight(function(err, blockNumber) {
    if (err) {
      return callback(err);
    }

    self.snapshots.push({
      blockNumber: blockNumber,
      timeAdjustment: self.blockchain.timeAdjustment
    });

    self.logger.log("Saved snapshot #" + self.snapshots.length);

    callback(null, to.hex(self.snapshots.length));
  });
};

StateManager.prototype.revert = function(snapshotId, callback) {
  var self = this;

  if (snapshotId === null || snapshotId === undefined) {
    callback(new Error("invalid snapshotId"));
    return;
  }
  // Convert from hex.
  try {
    snapshotId = utils.bufferToInt(snapshotId);
  } catch (e) {
    callback(e);
    return;
  }

  this.logger.log("Reverting to snapshot #" + snapshotId);

  if (snapshotId > this.snapshots.length || snapshotId <= 0) {
    // the snapshot doesn't exist now, or it has already been reverted
    callback(null, false);
    return false;
  }

  // Convert to zero based.
  snapshotId = snapshotId - 1;
  var timeAdjustment = this.snapshots[snapshotId].timeAdjustment;

  // Loop through each snapshot with a higher id than the current one.
  async.whilst(
    function() {
      return self.snapshots.length > snapshotId;
    },
    function(nextSnapshot) {
      var snapshot = self.snapshots.pop();

      // For each snapshot, asynchronously pop off the blocks it represents.
      async.during(
        function(doneWithTest) {
          self.blockchain.getHeight(function(err, blockNumber) {
            if (err) {
              return doneWithTest(err);
            }

            doneWithTest(null, blockNumber > snapshot.blockNumber);
          });
        },
        function(nextBlock) {
          self.blockchain.popBlock(function(err) {
            if (err) {
              return nextBlock(err);
            }
            nextBlock();
          });
        },
        nextSnapshot
      );
    },
    function(err) {
      if (err) {
        return callback(err);
      }

      // Pending transactions are removed when you revert.
      self.blockchain.clearPendingTransactions();
      // The time adjustment is restored to its prior state
      self.blockchain.timeAdjustment = timeAdjustment;

      callback(null, true);
    }
  );
};

StateManager.prototype.hasContractCode = function(address, callback) {
  this.vm.stateManager.getContractCode(address, function(err, result) {
    if (err != null) {
      callback(err, false);
    } else {
      callback(null, true);
    }
  });
};

StateManager.prototype.startMining = function(callback) {
  if (this.is_mining) {
    process.nextTick(callback);
    this.logger.log("Warning: startMining called when miner was already started");
    return;
  }

  this.is_mining = true;

  if (this.is_mining_on_interval) {
    this.mineOnInterval();
    process.nextTick(callback);
  } else {
    this.processBlocks(callback);
  }
};

StateManager.prototype.stopMining = function(callback) {
  if (this.is_mining) {
    if (this._minerCancellationToken) {
      this._minerCancellationToken.cancelled = true;
      this._minerCancellationToken = null;
    }
    this.is_mining = false;
    clearTimeout(this.mining_interval_timeout);
    this.mining_interval_timeout = null;
  } else {
    this.logger.log("Warning: stopMining called when miner was already stopped");
  }
  callback && process.nextTick(callback);
};

StateManager.prototype.isUnlocked = function(address) {
  return this.unlocked_accounts[address.toLowerCase()] != null;
};

StateManager.prototype.createTransactionWithCorrectNonce = function(tx, from, callback) {
  // account for transactions waiting in the tx queue
  this.blockchain.getQueuedNonce(from, (err, expectedNonce) => {
    if (err) {
      return callback(err);
    }

    const validateNonce = (tx, expectedNonce) => {
      if (tx.validateNonce(expectedNonce)) {
        return Promise.resolve(tx);
      } else {
        const expected = new BN(expectedNonce).toString(10);
        const actual = new BN(tx.nonce).toString(10);
        return Promise.reject(
          new TXRejectedError(
            `the tx doesn't have the correct nonce. account has nonce of: ${expected} tx has nonce of: ${actual}`
          )
        );
      }
    };
    const done = (tx) => callback(null, tx);

    if (tx.isSigned()) {
      validateNonce(tx, expectedNonce)
        .then(done)
        .catch(callback);
    } else {
      const sign = (tx) => {
        // we need to sign transactions if they haven't been signed already
        // but we never sign fake transactions
        if (!tx.isFake() && !tx.isSigned()) {
          const account = this.accounts[from];
          if (account) {
            tx.sign(account.secretKey);
          }
        }
        return Promise.resolve(tx);
      };

      // Validate the tx's nonce and then sign the transaction.
      // By signing this transaction now we ensure all future calls to tx.hash()
      // return the same signed transaction hash. It's sort of an unintuitive
      // quirk of etheremjs-tx that:
      //   tx.hash(includeSignature);
      //   tx.sign(secretKey);
      //   tx.hash(includeSignature);
      // will produce different hashes.
      if (tx.nonce.length === 0) {
        // Since this transaction is unsigned and the nonce was not defined
        // we can go ahead and change the nonce and not worry about
        // invalidating the tx hash the client may be expecting (automatic nonce
        // calculation should have been expected by the client in this case).
        tx.nonce = expectedNonce;
        sign(tx).then(done);
      } else {
        validateNonce(tx, expectedNonce)
          .then(sign)
          .then(done)
          .catch(callback);
      }
    }
  });
};
module.exports = StateManager;


/***/ }),

/***/ 1428:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// It's unforutnate we have to have this subprovider, but it's because
// we instamine, and web3 isn't written in a way that supports instamining
// (i.e., it sets up the filter after the transaction has been processed).
// This block filter will ensure that each block filter will always see
// the change from the last block to the current block.
//
// Note: An added benefit of this is that it shaves off a signifcant
// amount of time from tests that use web3 and block filters.

var Subprovider = __webpack_require__(230398);
var inherits = __webpack_require__(431669).inherits;
var async = __webpack_require__(940008);
var to = __webpack_require__(484302);

inherits(DelayedBlockFilter, Subprovider);

module.exports = DelayedBlockFilter;

function DelayedBlockFilter() {
  this.watching = {};
}

DelayedBlockFilter.prototype.handleRequest = function(payload, next, end) {
  if (payload.method === "eth_newBlockFilter") {
    return this.handleNewBlockFilter(payload, next, end);
  }
  if (payload.method === "eth_getFilterChanges") {
    return this.handleGetFilterChanges(payload, next, end);
  }

  next();
};

DelayedBlockFilter.prototype.handleNewBlockFilter = function(payload, next, end) {
  var self = this;

  // Let this filter process and add it to our watch list.
  next(function(err, result, cb) {
    if (err) {
      return cb();
    }
    self.watching[result] = true;
    cb();
  });
};

DelayedBlockFilter.prototype.handleGetFilterChanges = function(payload, next, end) {
  var self = this;
  var filterId = payload.params[0];

  if (!this.watching[filterId]) {
    return next();
  }

  // Get the changes, and then alter the result.
  next(function(err, result, cb) {
    if (err) {
      return cb();
    }

    var currentBlockHash;
    var previousBlockHash;
    var blockNumber;

    async.series(
      [
        function(c) {
          // If we have a result, use it.
          if (result.length !== 0) {
            currentBlockHash = result[0];
            c();
          } else {
            // Otherwise, get the current block number.
            self.emitPayload(
              {
                method: "eth_blockNumber"
              },
              function(err, res) {
                if (err) {
                  return c(err);
                }
                blockNumber = to.number(res.result);
                c();
              }
            );
          }
        },
        function(c) {
          // If we got a block number above, meaning, we didn't get a block hash,
          // skip this step.
          if (blockNumber) {
            return c();
          }

          // If not skipped, then we got a block hash, and we need to get a block number from it.
          self.emitPayload(
            {
              method: "eth_getBlockByHash",
              params: [currentBlockHash, false]
            },
            function(err, res) {
              if (err) {
                return c(err);
              }
              blockNumber = to.number(res.result.number);
              c();
            }
          );
        },
        function(c) {
          // If we're at block 0, return no changes. See final function below.
          blockNumber = to.number(blockNumber);
          if (blockNumber === 0) {
            previousBlockHash = undefined;
            return c();
          }

          // If at this point, we do have a block number, so let's subtract one
          // from it and get the block hash of the block before it.
          blockNumber = blockNumber - 1;
          self.emitPayload(
            {
              method: "eth_getBlockByNumber",
              params: [blockNumber, false]
            },
            function(err, res) {
              if (err) {
                return c(err);
              }
              previousBlockHash = res.result.hash;
              c();
            }
          );
        }
      ],
      function(err) {
        if (err) {
          // Unfortunately the subprovider code doesn't let us return an error
          // through the callback cb(). So we'll just ignore it.... (famous last words).
        }

        // If we got the previous block, use it. Otherwise do nothing.
        // Then stop watching because we only want on getFilterChanges to react this way.
        if (previousBlockHash) {
          result[0] = previousBlockHash;
        }

        delete self.watching[filterId];
        cb();
      }
    );
  });
};


/***/ }),

/***/ 772573:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var utils = __webpack_require__(791996);
var inherits = __webpack_require__(431669).inherits;
var StateManager = __webpack_require__(368761);
var to = __webpack_require__(484302);
var TXRejectedError = __webpack_require__(364011);

var blockHelper = __webpack_require__(575784);
var pkg = __webpack_require__(138642);
const { BlockOutOfRangeError } = __webpack_require__(24742);

var Subprovider = __webpack_require__(230398);

const maxSafeInt = "0x" + Number.MAX_SAFE_INTEGER.toString(16);
const vrs = ["v", "r", "s"];

inherits(GethApiDouble, Subprovider);

function GethApiDouble(options, provider) {
  var self = this;

  this.state = options.state || new StateManager(options, provider);
  this.options = options;
  this.initialized = false;

  this.initialization_error = null;
  this.post_initialization_callbacks = [];

  this.state.initialize(function(err) {
    if (err) {
      self.initialization_error = err;
    }
    self.initialized = true;

    var callbacks = self.post_initialization_callbacks;
    self.post_initialization_callbacks = [];

    callbacks.forEach(function(callback) {
      setImmediate(function() {
        callback(self.initialization_error, self.state);
      });
    });
  });
}

GethApiDouble.prototype.waitForInitialization = function(callback) {
  var self = this;
  if (self.initialized === false) {
    self.post_initialization_callbacks.push(callback);
  } else {
    callback(self.initialization_error, self.state);
  }
};

// Function to not pass methods through until initialization is finished
GethApiDouble.prototype.handleRequest = function(payload, next, end) {
  var self = this;

  if (self.initialization_error != null) {
    return end(self.initialization_error);
  }

  if (self.initialized === false) {
    self.waitForInitialization(self.getDelayedHandler(payload, next, end));
    return;
  }

  var method = self[payload.method];

  if (method == null) {
    return end(new Error("Method " + payload.method + " not supported."));
  }

  var params = payload.params || [];
  var args = [].concat(params);

  var addedBlockParam = false;

  if (self.requiresDefaultBlockParameter(payload.method) && args.length < method.length - 1) {
    args.push("latest");
    addedBlockParam = true;
  }

  args.push(end);

  // avoid crash by checking to make sure that we haven't specified too many arguments
  if (
    args.length > method.length ||
    (method.minLength !== undefined && args.length < method.minLength) ||
    (method.minLength === undefined && args.length < method.length)
  ) {
    var errorMessage = `Incorrect number of arguments. Method '${payload.method}' requires `;
    if (method.minLength) {
      errorMessage += `between ${method.minLength - 1} and ${method.length - 1} arguments. `;
    } else {
      errorMessage += `exactly ${method.length - 1} arguments. `;
    }

    if (addedBlockParam) {
      errorMessage += "Including the implicit block argument, r";
    } else {
      // new sentence, capitalize it.
      errorMessage += "R";
    }
    errorMessage += `equest specified ${args.length - 1} arguments: ${JSON.stringify(args)}.`;

    return end(new Error(errorMessage));
  }

  method.apply(self, args);
};

GethApiDouble.prototype.getDelayedHandler = function(payload, next, end) {
  var self = this;
  return function(err, state) {
    if (err) {
      end(err);
    }
    self.handleRequest(payload, next, end);
  };
};

GethApiDouble.prototype.requiresDefaultBlockParameter = function(method) {
  // object for O(1) lookup.
  var methods = {
    eth_getBalance: true,
    eth_getCode: true,
    eth_getTransactionCount: true,
    eth_getStorageAt: true,
    eth_call: true,
    eth_estimateGas: true
  };

  return methods[method] === true;
};

// Handle individual requests.

GethApiDouble.prototype.eth_accounts = function(callback) {
  callback(null, Object.keys(this.state.accounts));
};

GethApiDouble.prototype.eth_blockNumber = function(callback) {
  this.state.blockNumber(function(err, result) {
    if (err) {
      return callback(err);
    }
    callback(null, to.hex(result));
  });
};

GethApiDouble.prototype.eth_chainId = function(callback) {
  callback(null, to.hex(this.options._chainIdRpc));
};

GethApiDouble.prototype.eth_coinbase = function(callback) {
  callback(null, this.state.coinbase);
};

GethApiDouble.prototype.eth_mining = function(callback) {
  callback(null, this.state.is_mining);
};

GethApiDouble.prototype.eth_hashrate = function(callback) {
  callback(null, "0x0");
};

GethApiDouble.prototype.eth_gasPrice = function(callback) {
  callback(null, utils.addHexPrefix(this.state.gasPrice()));
};

GethApiDouble.prototype.eth_getBalance = function(address, blockNumber, callback) {
  this.state.getBalance(address, blockNumber, callback);
};

GethApiDouble.prototype.eth_getCode = function(address, blockNumber, callback) {
  this.state.getCode(address, blockNumber, callback);
};

GethApiDouble.prototype.eth_getBlockByNumber = function(blockNumber, includeFullTransactions, callback) {
  this.state.blockchain.getBlock(blockNumber, function(err, block) {
    if (err) {
      if (err instanceof BlockOutOfRangeError) {
        return callback(null, null);
      } else {
        return callback(err);
      }
    }

    callback(null, blockHelper.toJSON(block, includeFullTransactions));
  });
};

GethApiDouble.prototype.eth_getBlockByHash = function(txHash, includeFullTransactions, callback) {
  this.eth_getBlockByNumber.apply(this, arguments);
};

GethApiDouble.prototype.eth_getBlockTransactionCountByNumber = function(blockNumber, callback) {
  this.state.blockchain.getBlock(blockNumber, function(err, block) {
    if (err) {
      if (err instanceof BlockOutOfRangeError) {
        // block doesn't exist
        return callback(null, null);
      }
      return callback(err);
    }
    callback(null, to.rpcQuantityHexString(block.transactions.length));
  });
};

GethApiDouble.prototype.eth_getBlockTransactionCountByHash = function(blockHash, callback) {
  this.eth_getBlockTransactionCountByNumber.apply(this, arguments);
};

GethApiDouble.prototype.eth_getTransactionReceipt = function(hash, callback) {
  this.state.getTransactionReceipt(hash, function(err, receipt) {
    if (err) {
      return callback(err);
    }

    var result = null;

    if (receipt && receipt.block) {
      result = receipt.toJSON();
      vrs.forEach((element) => {
        delete result[element];
      });
    }
    callback(null, result);
  });
};

GethApiDouble.prototype.eth_getTransactionByHash = function(hash, callback) {
  this.state.getTransactionReceipt(hash, function(err, receipt) {
    if (err) {
      return callback(err);
    }

    var result = null;

    if (receipt) {
      // if there is no block then the transaction is still pending
      if (!receipt.block) {
        // assemble the block object with null values for pending transactions
        receipt.block = {
          transactions: [],
          hash: () => {
            return null;
          },
          header: { number: null }
        };

        result = receipt.tx.toJsonRpc(receipt.block);
      } else {
        result = receipt.tx.toJsonRpc(receipt.block);
      }
    }
    callback(null, result);
  });
};

GethApiDouble.prototype.eth_getTransactionByBlockHashAndIndex = function(hashOrNumber, index, callback) {
  index = to.number(index);

  this.state.getBlock(hashOrNumber, function(err, block) {
    if (err) {
      // block doesn't exist by that hash
      if (err.notFound) {
        return callback(null, null);
      } else {
        return callback(err);
      }
    }

    if (index >= block.transactions.length) {
      return callback(new Error("Transaction at index " + to.hex(index) + " does not exist in block."));
    }

    var tx = block.transactions[index];
    var result = tx.toJsonRpc(block);

    callback(null, result);
  });
};

GethApiDouble.prototype.eth_getTransactionByBlockNumberAndIndex = function(hashOrNumber, index, callback) {
  this.eth_getTransactionByBlockHashAndIndex(hashOrNumber, index, callback);
};

GethApiDouble.prototype.eth_getTransactionCount = function(address, blockNumber, callback) {
  this.state.getTransactionCount(address, blockNumber, (err, count) => {
    if (err instanceof BlockOutOfRangeError) {
      return callback(null, null);
    }
    return callback(err, count);
  });
};

GethApiDouble.prototype.eth_sign = function(address, dataToSign, callback) {
  var result;
  var error;

  try {
    result = this.state.sign(address, dataToSign);
  } catch (e) {
    error = e;
  }

  callback(error, result);
};

GethApiDouble.prototype.eth_signTypedData = function(address, typedDataToSign, callback) {
  var result;
  var error;

  try {
    result = this.state.signTypedData(address, typedDataToSign);
  } catch (e) {
    error = e;
  }

  callback(error, result);
};

GethApiDouble.prototype.eth_sendTransaction = function(txData, callback) {
  this.state.queueTransaction("eth_sendTransaction", txData, null, callback);
};

GethApiDouble.prototype.eth_sendRawTransaction = function(rawTx, callback) {
  let data;
  if (rawTx) {
    data = to.buffer(rawTx);
  }

  if (data === undefined) {
    throw new TXRejectedError("rawTx must be a string, JSON-encoded Buffer, or Buffer.");
  }

  this.state.queueRawTransaction(data, callback);
};

GethApiDouble.prototype._setCallGasLimit = function(txData) {
  // if the caller didn't specify a gas limit make sure we set one
  if (!txData.gas && !txData.gasLimit) {
    const globalCallGasLimit = this.options.callGasLimit;
    if (globalCallGasLimit != null) {
      // if the user configured a global `callGasLimit` use it
      txData.gas = globalCallGasLimit;
    } else {
      // otherwise, set a very high gas limit. We'd use Infinity, or some VM flag to ignore gasLimit checks like
      // geth does, but the VM doesn't currently support that for `runTx`.
      // https://github.com/ethereumjs/ethereumjs-vm/blob/4bbb6e394a344717890d618a6be1cf67b8e5b74d/lib/runTx.ts#L71
      txData.gas = maxSafeInt;
    }
  }
};
GethApiDouble.prototype.eth_call = function(txData, blockNumber, callback) {
  this._setCallGasLimit(txData);
  this.state.queueTransaction("eth_call", txData, blockNumber, callback);
};

GethApiDouble.prototype.eth_estimateGas = function(txData, blockNumber, callback) {
  this._setCallGasLimit(txData);
  this.state.queueTransaction("eth_estimateGas", txData, blockNumber, callback);
};

GethApiDouble.prototype.eth_getStorageAt = function(address, position, blockNumber, callback) {
  this.state.queueStorage(address, position, blockNumber, callback);
};

GethApiDouble.prototype.eth_newBlockFilter = function(callback) {
  var filterId = utils.addHexPrefix(utils.intToHex(this.state.latestFilterId));
  this.state.latestFilterId += 1;
  callback(null, filterId);
};

GethApiDouble.prototype.eth_getFilterChanges = function(filterId, callback) {
  var blockHash = this.state
    .latestBlock()
    .hash()
    .toString("hex");
  // Mine a block after each request to getFilterChanges so block filters work.
  this.state.mine();
  callback(null, [blockHash]);
};

GethApiDouble.prototype.eth_getLogs = function(filter, callback) {
  this.state.getLogs(filter, callback);
};

GethApiDouble.prototype.eth_uninstallFilter = function(filterId, callback) {
  callback(null, true);
};

GethApiDouble.prototype.eth_protocolVersion = function(callback) {
  callback(null, "63");
};

GethApiDouble.prototype.bzz_hive = function(callback) {
  callback(null, []);
};

GethApiDouble.prototype.bzz_info = function(callback) {
  callback(null, []);
};

GethApiDouble.prototype.shh_version = function(callback) {
  callback(null, "2");
};

GethApiDouble.prototype.eth_getCompilers = function(callback) {
  callback(null, []);
};

GethApiDouble.prototype.eth_syncing = function(callback) {
  callback(null, false);
};

GethApiDouble.prototype.net_listening = function(callback) {
  callback(null, true);
};

GethApiDouble.prototype.net_peerCount = function(callback) {
  callback(null, 0);
};

GethApiDouble.prototype.web3_clientVersion = function(callback) {
  callback(null, "EthereumJS TestRPC/v" + pkg.version + "/ethereum-js");
};

GethApiDouble.prototype.web3_sha3 = function(string, callback) {
  callback(null, to.hex(utils.keccak256(string)));
};

GethApiDouble.prototype.net_version = function(callback) {
  // net_version returns a string containing a base 10 integer.
  callback(null, this.state.net_version + "");
};

GethApiDouble.prototype.miner_start = function(threads, callback) {
  if (!callback && typeof threads === "function") {
    callback = threads;
    threads = null;
  }

  this.state.startMining(function(err) {
    callback(err, true);
  });
};

// indicate that `miner_start` only requires one argument (the callback)
GethApiDouble.prototype.miner_start.minLength = 1;

GethApiDouble.prototype.miner_stop = function(callback) {
  this.state.stopMining(function(err) {
    callback(err, true);
  });
};

GethApiDouble.prototype.rpc_modules = function(callback) {
  // returns the availible api modules and versions
  callback(null, { eth: "1.0", net: "1.0", rpc: "1.0", web3: "1.0", evm: "1.0", personal: "1.0" });
};

GethApiDouble.prototype.personal_listAccounts = function(callback) {
  callback(null, Object.keys(this.state.personal_accounts));
};

GethApiDouble.prototype.personal_newAccount = function(password, callback) {
  var account = this.state.createAccount({ generate: true });
  this.state.accounts[account.address.toLowerCase()] = account;
  this.state.personal_accounts[account.address.toLowerCase()] = true;
  this.state.account_passwords[account.address.toLowerCase()] = password;
  callback(null, account.address);
};

GethApiDouble.prototype.personal_importRawKey = function(rawKey, password, callback) {
  var account = this.state.createAccount({ secretKey: rawKey });
  this.state.accounts[account.address.toLowerCase()] = account;
  this.state.personal_accounts[account.address.toLowerCase()] = true;
  this.state.account_passwords[account.address.toLowerCase()] = password;
  callback(null, account.address);
};

GethApiDouble.prototype.personal_lockAccount = function(address, callback) {
  var account = this.state.personal_accounts[address.toLowerCase()];
  if (account !== true) {
    var error = "Account not found";
    return callback(error);
  }
  delete this.state.unlocked_accounts[address.toLowerCase()];
  callback(null, true);
};

GethApiDouble.prototype.personal_unlockAccount = function(address, password, duration, callback) {
  // FIXME handle duration
  var account = this.state.personal_accounts[address.toLowerCase()];
  if (account !== true) {
    var accountError = "Account not found";
    return callback(accountError);
  }

  var storedPassword = this.state.account_passwords[address.toLowerCase()];
  if (storedPassword !== undefined && storedPassword !== password) {
    var passwordError = "Invalid password";
    return callback(passwordError);
  }

  this.state.unlocked_accounts[address.toLowerCase()] = true;
  callback(null, true);
};

GethApiDouble.prototype.personal_sendTransaction = function(txData, password, callback) {
  if (txData.from == null) {
    var error = "Sender not found";
    callback(error);
    return;
  }

  var from = utils.addHexPrefix(txData.from).toLowerCase();

  var self = this;
  self.personal_unlockAccount(from, password, null, function(err) {
    if (err) {
      return callback(err);
    }

    self.state.queueTransaction("eth_sendTransaction", txData, null, function(err, ret) {
      self.state.unlocked_accounts[from.toLowerCase()] = false;
      callback(err, ret);
    });
  });
};

/* Functions for testing purposes only. */

GethApiDouble.prototype.evm_snapshot = function(callback) {
  this.state.snapshot(callback);
};

GethApiDouble.prototype.evm_revert = function(snapshotId, callback) {
  this.state.revert(snapshotId, callback);
};

GethApiDouble.prototype.evm_increaseTime = function(seconds, callback) {
  callback(null, this.state.blockchain.increaseTime(seconds));
};

GethApiDouble.prototype.evm_setTime = function(date, callback) {
  callback(null, this.state.blockchain.setTime(new Date(date)));
};

GethApiDouble.prototype.evm_mine = function(timestamp, callback) {
  if (typeof timestamp === "function") {
    callback = timestamp;
    timestamp = undefined;
  }
  this.state.processBlock(timestamp, function(err) {
    if (err) {
      return callback(err);
    }
    callback(err, "0x0");
  });
};

// indicate that `evm_mine` only requires one argument (the callback)
GethApiDouble.prototype.evm_mine.minLength = 1;

/**
 * Unlocks any unknown account.
 *
 * Note: accounts known to the `personal` namespace and accounts returned by
 * `eth_accounts` cannot be unlocked using this method.
 *
 * @param {*} address the address of the account to unlock
 * @param {*} callback
 * @returns `true` if the account was unlocked successfully, `false` if the
 * account was already unlocked. Throws an error if the account could not be
 * unlocked.
 */
GethApiDouble.prototype.evm_unlockUnknownAccount = function(address, callback) {
  // check if given address is already unlocked
  address = address.toLowerCase();
  if (this.state.unlocked_accounts[address] !== true) {
    if (this.state.personal_accounts[address] !== true) {
      // unlock the account
      this.state.unlocked_accounts[address] = true;
      return callback(null, true);
    } else {
      // if the account is known to the `personal` namespace we may not unlock
      // it
      return callback(new Error("cannot unlock known/personal account"));
    }
  }
  // account was already unlocked, return `false`
  callback(null, false);
};

/**
 * Locks any unknown account.
 *
 * Note: accounts known to the `personal` namespace and accounts returned by
 * `eth_accounts` cannot be locked using this method.
 *
 * @param {*} address the address of the account to lock
 * @param {*} callback
 * @returns `true` if the account was locked successfully, `false` if the
 * account was already locked. Throws an error if the account could not be
 * locked.
 */
GethApiDouble.prototype.evm_lockUnknownAccount = function(address, callback) {
  // Checks if given address is already unlocked
  address = address.toLowerCase();
  if (this.state.unlocked_accounts[address]) {
    if (this.state.personal_accounts[address]) {
      // if the account is known to the `personal` namespace we may not lock it
      return callback(new Error("cannot lock known/personal account"));
    } else {
      // unlock the account
      delete this.state.unlocked_accounts[address];
      return callback(null, true);
    }
  }
  // account wasn't locked to begin with, return `false`
  callback(null, false);
};

GethApiDouble.prototype.debug_traceTransaction = function(txHash, params, callback) {
  if (typeof params === "function") {
    callback = params;
    params = [];
  }

  this.state.queueTransactionTrace(txHash, params, callback);
};

/*
  RPC AUDIT:
  TODO ETH: eth_getUncleCountByBlockHash, eth_getUncleCountByBlockNumber, eth_getUncleByBlockHashAndIndex,
        eth_getUncleByBlockNumberAndIndex, eth_getWork, eth_submitWork, eth_submitHashrate

  TODO DB: db_putString, db_getString, db_putHex, db_getHex

  TODO WHISPER: shh_post, shh_newIdentity, shh_hasIdentity, shh_newGroup, shh_addToGroup,
        shh_newFilter, shh_uninstallFilter, shh_getFilterChanges, shh_getMessages
*/

/**
 * Returns the number of uncles in a block from a block matching the given block hash.
 *
 * @param {DATA, 32 Bytes} hash - hash of a block.
 * @callback callback
 * @param {error} err - Error Object
 * @param {QUANTITY} result - integer of the number of uncles in this block.
 */
GethApiDouble.prototype.eth_getUncleCountByBlockHash = function(hash, callback) {
  callback(null, "0x0");
};

/**
 * Returns the number of uncles in a block from a block matching the given block number.
 *
 * @param {QUANTITY} blockNumber -
 *  ^integer of a block number, or the string "latest", "earliest" or "pending". Ex: '0xe8', // 232
 * @callback callback
 * @param {error} err - Error Object
 * @param {QUANTITY} result - integer of the number of uncles in this block.
 */
GethApiDouble.prototype.eth_getUncleCountByBlockNumber = function(blockNumber, callback) {
  callback(null, "0x0");
};

/**
 * Returns information about a uncle of a block by hash and uncle index position.
 *
 * @param {DATA, 32 Bytes} hash - hash of a block
 * @param {QUANTITY} index - the uncle's index position.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Object} result - A block object,
 */
GethApiDouble.prototype.eth_getUncleByBlockHashAndIndex = function(hash, index, callback) {
  callback(null, {});
};

/**
 * Returns information about a uncle of a block by number and uncle index position.
 *
 * @param {QUANTITY} blockNumber -
 * ^a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.
 * @param {QUANTITY} uncleIndex - the uncle's index position.
 * @callback callback
 * @param {error} err - Error object
 * @param {Object} resutl - A block object,
 */
GethApiDouble.prototype.eth_getUncleByBlockNumberAndIndex = function(blockNumber, uncleIndex, callback) {
  callback(null, {});
};

/**
 * Returns: An Array with the following elements
 * 1: DATA, 32 Bytes - current block header pow-hash
 * 2: DATA, 32 Bytes - the seed hash used for the DAG.
 * 3: DATA, 32 Bytes - the boundary condition ("target"), 2^256 / difficulty.
 *
 * @param {QUANTITY} filterId - A filter id
 * @callback callback
 * @param {error} err - Error object
 * @param {Array} result - the hash of the current block, the seedHash, and the boundary condition to be met ("target").
 */
GethApiDouble.prototype.eth_getWork = function(filterId, callback) {
  callback(null, []);
};

/**
 * Used for submitting a proof-of-work solution
 *
 * @param {DATA, 8 Bytes} nonce - The nonce found (64 bits)
 * @param {DATA, 32 Bytes} powHash - The header's pow-hash (256 bits)
 * @param {DATA, 32 Bytes} digest - The mix digest (256 bits)
 * @callback callback
 * @param {error} err - Error object
 * @param {Boolean} result - returns true if the provided solution is valid, otherwise false.
 */
GethApiDouble.prototype.eth_submitWork = function(nonce, powHash, digest, callback) {
  callback(null, false);
};

/**
 * Used for submitting mining hashrate.
 *
 * @param {String} hashRate - a hexadecimal string representation (32 bytes) of the hash rate
 * @param {String} clientID - A random hexadecimal(32 bytes) ID identifying the client
 * @callback callback
 * @param {error} err - Error object
 * @param {Boolean} result - returns true if submitting went through succesfully and false otherwise.
 */
GethApiDouble.prototype.eth_submitHashrate = function(hashRate, clientID, callback) {
  callback(null, false);
};

/**
 * Stores a string in the local database.
 *
 * @param {String} dbName - Database name.
 * @param {String} key - Key name.
 * @param {String} value - String to store.
 * @callback callback
 * @param {error} err - Error object
 * @param {Boolean} result - returns true if the value was stored, otherwise false.
 */
GethApiDouble.prototype.db_putString = function(dbName, key, value, callback) {
  callback(null, false);
};

/**
 * Returns string from the local database
 *
 * @param {String} dbName - Database name.
 * @param {String} key - Key name.
 * @callback callback
 * @param {error} - Error Object
 * @param {String} result - The previously stored string.
 */
GethApiDouble.prototype.db_getString = function(dbName, key, callback) {
  callback(null, "");
};

/**
 * Stores binary data in the local database.
 *
 * @param {String} dbName - Database name.
 * @param {String} key - Key name.
 * @param {DATA} data - Data to store.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - returns true if the value was stored, otherwise false.
 */
GethApiDouble.prototype.db_putHex = function(dbName, key, data, callback) {
  callback(null, false);
};

/**
 * Returns binary data from the local database
 *
 * @param {String} dbName - Database name.
 * @param {String} key - Key name.
 * @callback callback
 * @param {error} err - Error Object
 * @param {DATA} result - The previously stored data.
 */
GethApiDouble.prototype.db_getHex = function(dbName, key, callback) {
  callback(null, "0x00");
};

/**
 * Sends a whisper message.
 *
 * @param {DATA, 60 Bytes} from - (optional) The identity of the sender.
 * @param {DATA, 60 Bytes} to -
 *  ^(optional) The identity of the receiver. When present whisper will encrypt the message so that
 *  only the receiver can decrypt it.
 * @param {Array of DATA} topics - Array of DATA topics, for the receiver to identify messages.
 * @param {DATA} payload - The payload of the message.
 * @param {QUANTITY} priority - The integer of the priority in a range from ... (?).
 * @param {QUANTITY} ttl - integer of the time to live in seconds.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - returns true if the message was sent, otherwise false.
 */
GethApiDouble.prototype.shh_post = function(from, to, topics, payload, priority, ttl, callback) {
  callback(null, false);
};

/**
 * Creates new whisper identity in the client.
 *
 * @callback callback
 * @param {error} err - Error Object
 * @param {DATA, 60 Bytes} result - the address of the new identiy.
 */
GethApiDouble.prototype.shh_newIdentity = function(callback) {
  callback(null, "0x00");
};

/**
 * Checks if the client hold the private keys for a given identity.
 *
 * @param {DATA, 60 Bytes} address - The identity address to check.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - returns true if the client holds the privatekey for that identity, otherwise false.
 */
GethApiDouble.prototype.shh_hasIdentity = function(address, callback) {
  callback(null, false);
};

/**
 * Creates a new group.
 *
 * @callback callback
 * @param {error} err - Error Object
 * @param {DATA, 60 Bytes} result - the address of the new group.
 */
GethApiDouble.prototype.shh_newGroup = function(callback) {
  callback(null, "0x00");
};

/**
 * Adds a whisper identity to the group
 *
 * @param {DATA, 60 Bytes} - The identity address to add to a group.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - returns true if the identity was successfully added to the group, otherwise false.
 */
GethApiDouble.prototype.shh_addToGroup = function(address, callback) {
  callback(null, false);
};

/**
 * Creates filter to notify, when client receives whisper message matching the filter options.
 *
 * @param {DATA, 60 Bytes} to -
 * ^(optional) Identity of the receiver. When present it will try to decrypt any incoming message
 *  if the client holds the private key to this identity.
 * @param {Array of DATA} topics - Array of DATA topics which the incoming message's topics should match.
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - returns true if the identity was successfully added to the group, otherwise false.
 */
GethApiDouble.prototype.shh_newFilter = function(to, topics, callback) {
  callback(null, false);
};

/**
 * Uninstalls a filter with given id. Should always be called when watch is no longer needed.
 * Additonally Filters timeout when they aren't requested with shh_getFilterChanges for a period of time.
 *
 * @param {QUANTITY} id - The filter id. Ex: "0x7"
 * @callback callback
 * @param {error} err - Error Object
 * @param {Boolean} result - true if the filter was successfully uninstalled, otherwise false.
 */
GethApiDouble.prototype.shh_uninstallFilter = function(id, callback) {
  callback(null, false);
};

/**
 * Polling method for whisper filters. Returns new messages since the last call of this method.
 *
 * @param {QUANTITY} id - The filter id. Ex: "0x7"
 * @callback callback
 * @param {error} err - Error Object
 * @param {Array} result - More Info: https://github.com/ethereum/wiki/wiki/JSON-RPC#shh_getfilterchanges
 */
GethApiDouble.prototype.shh_getFilterChanges = function(id, callback) {
  callback(null, []);
};

/**
 * Get all messages matching a filter. Unlike shh_getFilterChanges this returns all messages.
 *
 * @param {QUANTITY} id - The filter id. Ex: "0x7"
 * @callback callback
 * @param {error} err - Error Object
 * @param {Array} result - See: shh_getFilterChanges
 */
GethApiDouble.prototype.shh_getMessages = function(id, callback) {
  callback(null, false);
};

module.exports = GethApiDouble;


/***/ }),

/***/ 582132:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Subprovider = __webpack_require__(230398);
var inherits = __webpack_require__(431669).inherits;

inherits(GethDefaults, Subprovider);

module.exports = GethDefaults;

function GethDefaults() {}

// Massage eth_estimateGas requests, setting default data (e.g., from) if
// not specified. This is here specifically to make the testrpc
// react like Geth.
GethDefaults.prototype.handleRequest = function(payload, next, end) {
  if (payload.method !== "eth_estimateGas" && payload.method !== "eth_call") {
    return next();
  }

  var params = payload.params[0];

  if (params.from == null) {
    this.emitPayload(
      {
        method: "eth_coinbase"
      },
      function(err, result) {
        if (err) {
          return end(err);
        }

        var coinbase = result.result;

        params.from = coinbase;
        next();
      }
    );
  } else {
    next();
  }
};


/***/ }),

/***/ 625165:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Subprovider = __webpack_require__(230398);
var inherits = __webpack_require__(431669).inherits;

inherits(RequestFunnel, Subprovider);

module.exports = RequestFunnel;

// See if any payloads for the specified methods are marked as external.
// If they are external, and match the method list, process them one at
// a time.
function RequestFunnel() {
  // We use an object here for O(1) lookups (speed).
  this.methods = {
    eth_call: true,
    eth_getStorageAt: true,
    eth_sendTransaction: true,
    eth_sendRawTransaction: true,

    // Ensure block filter and filter changes are process one at a time
    // as well so filter requests that come in after a transaction get
    // processed once that transaction has finished processing.
    eth_newBlockFilter: true,
    eth_getFilterChanges: true,
    eth_getFilterLogs: true
  };
  this.queue = [];
  this.isWorking = false;
}

RequestFunnel.prototype.handleRequest = function(payload, next, end) {
  if (payload.external !== true || this.methods[payload.method] !== true) {
    return next();
  }

  this.queue.push([payload, next]);

  if (this.isWorking === false) {
    this.processNext();
  }
};

RequestFunnel.prototype.processNext = function() {
  var self = this;

  if (this.queue.length === 0) {
    this.isWorking = false;
    return;
  }

  this.isWorking = true;

  var item = this.queue.shift();
  var next = item[1];

  next(function(error, request, cb) {
    if (error) {
      return cb(error);
    }
    cb();
    self.processNext();
  });
};


/***/ }),

/***/ 575784:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var to = __webpack_require__(484302);

module.exports = {
  toJSON: function(block, includeFullTransactions) {
    return {
      number: to.rpcQuantityHexString(block.header.number),
      hash: to.hex(block.hash()),
      parentHash: to.hex(block.header.parentHash), // common.hash
      mixHash: to.hex(block.header.mixHash),
      nonce: to.rpcDataHexString(to.hex(block.header.nonce), 16),
      sha3Uncles: to.hex(block.header.uncleHash),
      logsBloom: to.hex(block.header.bloom),
      transactionsRoot: to.hex(block.header.transactionsTrie),
      stateRoot: to.hex(block.header.stateRoot),
      receiptsRoot: to.hex(block.header.receiptTrie),
      miner: to.hex(block.header.coinbase),
      difficulty: to.rpcQuantityHexString(block.header.difficulty),
      totalDifficulty: to.rpcQuantityHexString(block.header.difficulty), // TODO: Figure out what to do here.
      extraData: to.rpcDataHexString(block.header.extraData),
      size: to.hex(1000), // TODO: Do something better here
      gasLimit: to.rpcQuantityHexString(block.header.gasLimit),
      gasUsed: to.rpcQuantityHexString(block.header.gasUsed),
      timestamp: to.rpcQuantityHexString(block.header.timestamp),
      transactions: block.transactions.map(function(tx) {
        if (includeFullTransactions) {
          return tx.toJsonRpc(block);
        } else {
          return to.hex(tx.hash());
        }
      }),
      uncles: [] // block.uncleHeaders.map(function(uncleHash) {return to.hex(uncleHash)})
    };
  }
};


/***/ }),

/***/ 24742:
/***/ ((module) => {

class LevelUpOutOfRangeError extends Error {
  constructor(type, index, len) {
    const message = "LevelUpArrayAdapter named '" + type + "' index out of range: index " + index + "; length: " + len;
    super(message);
    this.name = `${this.constructor.name}:${type}`;
    this.type = type;
  }
}

class BlockOutOfRangeError extends LevelUpOutOfRangeError {
  constructor(index, len) {
    super("blocks", index, len);
  }
}

module.exports = {
  LevelUpOutOfRangeError,
  BlockOutOfRangeError
};


/***/ }),

/***/ 229513:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const { BN } = __webpack_require__(791996);
const hexToBn = (val = 0) => new BN(parseInt("0x" + val.toString("hex"), 16));
const MULTIPLE = 64 / 63;

module.exports = async function binSearch(generateVM, runArgs, result, callback) {
  const MAX = hexToBn(runArgs.block.header.gasLimit);
  const gasRefund = result.execResult.gasRefund;
  const startingGas = gasRefund ? result.gasEstimate.add(gasRefund) : result.gasEstimate;
  const range = { lo: startingGas, hi: startingGas };
  const isEnoughGas = async(gas) => {
    const vm = generateVM(); // Generate fresh VM
    runArgs.tx.gasLimit = gas.toBuffer();
    const result = await vm.runTx(runArgs).catch((vmerr) => ({ vmerr }));
    return !result.vmerr && !result.execResult.exceptionError;
  };

  if (!(await isEnoughGas(range.hi))) {
    do {
      range.hi = range.hi.muln(MULTIPLE);
    } while (!(await isEnoughGas(range.hi)));
    while (range.lo.addn(1).lt(range.hi)) {
      const mid = range.lo.add(range.hi).divn(2);
      if (await isEnoughGas(mid)) {
        range.hi = mid;
      } else {
        range.lo = mid;
      }
    }
    if (range.hi.gte(MAX)) {
      if (!(await isEnoughGas(range.hi))) {
        return callback(new Error("gas required exceeds allowance or always failing transaction"));
      }
    }
  }

  result.gasEstimate = range.hi;
  callback(null, result);
};


/***/ }),

/***/ 36457:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const estimateGas = __webpack_require__(255574);
const binSearch = __webpack_require__(229513);

module.exports = async(generateVM, runArgs, callback) => {
  const vm = generateVM();
  estimateGas(vm, runArgs, async(err, result) => {
    if (err) {
      callback(err);
      return;
    }

    await binSearch(generateVM, runArgs, result, callback);
  });
};


/***/ }),

/***/ 255574:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const RuntimeError = __webpack_require__(828175);

const { BN } = __webpack_require__(791996);
const bn = (val = 0) => new BN(val);
const STIPEND = bn(2300);

const check = (set) => (opname) => set.has(opname);
const isCall = check(new Set(["CALL", "DELEGATECALL", "STATICCALL", "CALLCODE"]));
const isCallOrCallcode = check(new Set(["CALL", "CALLCODE"]));
const isCreate = check(new Set(["CREATE", "CREATE2"]));
const isTerminator = check(new Set(["STOP", "RETURN", "REVERT", "INVALID", "SELFDESTRUCT"]));

module.exports = async(vm, runArgs, callback) => {
  const steps = stepTracker();
  vm.on("step", steps.collect);

  const Context = (index, fee) => {
    const base = index === 0;
    let start = index;
    let stop = 0;
    const cost = bn();
    let sixtyFloorths = bn();
    const op = steps.ops[index];
    const next = steps.ops[index + 1];
    const intermediateCost = op.gasLeft.sub(next.gasLeft);
    const callingFee = fee || bn();
    let compositeContext = false;

    function addGas(val) {
      // Add to our current context, but accounted for in sixtyfloorths
      if (sixtyFloorths.gtn(0)) {
        if (val.gte(sixtyFloorths)) {
          sixtyFloorths = bn();
        } else {
          sixtyFloorths.isub(val);
        }
      }
      cost.iadd(val);
    }

    return {
      start: () => start,
      stop: () => stop,
      setStart: (val) => {
        start = val;
        compositeContext = true;
      },
      setStop: (val) => {
        stop = val;
      },
      getCost: () => ({ cost, sixtyFloorths }),
      transfer: (ctx) => {
        const values = ctx.getCost();
        addGas(values.cost);
        sixtyFloorths.iadd(values.sixtyFloorths);
      },
      addSixtyFloorth: (sixtyFloorth) => {
        sixtyFloorths.iadd(sixtyFloorth);
      },
      addRange: (fee = bn()) => {
        // only occurs on stack increasing ops
        addGas(steps.ops[base || compositeContext ? start : start + 1].gasLeft.sub(steps.ops[stop].gasLeft).add(fee));
      },
      finalizeRange: () => {
        let range;
        // if we have a composite context and we are NOT at the final terminator
        if (compositeContext && stop !== steps.ops.length - 1) {
          range = steps.ops[start].gasLeft.sub(steps.ops[stop - 1].gasLeft);
          addGas(range);
          const tail = steps.ops[stop - 1].gasLeft.sub(steps.ops[stop].gasLeft);
          range = tail.add(intermediateCost);
        } else {
          range = steps.ops[start].gasLeft.sub(steps.ops[stop].gasLeft);
        }
        range.isub(callingFee);
        addGas(range);
        if (isCallOrCallcode(op.opcode.name) && !op.stack[op.stack.length - 3].isZero()) {
          cost.iadd(sixtyFloorths);
          const innerCost = next.gasLeft.sub(steps.ops[stop - 1].gasLeft);
          if (innerCost.gt(STIPEND)) {
            sixtyFloorths = cost.divn(63);
          } else if (innerCost.lte(STIPEND)) {
            sixtyFloorths = STIPEND.sub(innerCost);
          }
        } else if (stop !== steps.ops.length - 1) {
          cost.iadd(sixtyFloorths);
          sixtyFloorths = cost.divn(63);
        }
      }
    };
  };

  const getTotal = () => {
    const sysops = steps.systemOps;
    const ops = steps.ops;
    const opIndex = (cursor) => sysops[cursor].index;
    const stack = [];
    let cursor = 0;
    let context = Context(0);
    while (cursor < sysops.length) {
      const currentIndex = opIndex(cursor);
      const current = ops[currentIndex];
      const name = current.opcode.name;
      if (isCall(name) || isCreate(name)) {
        if (steps.isPrecompile(currentIndex)) {
          context.setStop(currentIndex + 1);
          context.addRange();
          context.setStart(currentIndex + 1);
          context.addSixtyFloorth(STIPEND);
        } else {
          context.setStop(currentIndex);
          context.addRange(bn(current.opcode.fee));
          stack.push(context);
          context = Context(currentIndex, bn(current.opcode.fee)); // setup next context
        }
      } else if (isTerminator(name)) {
        // only on the last operation
        context.setStop(currentIndex + 1 < steps.ops.length ? currentIndex + 1 : currentIndex);
        context.finalizeRange();
        const ctx = stack.pop();
        if (ctx) {
          ctx.transfer(context);
          context = ctx;
          context.setStart(currentIndex + 1);
        } else {
          break;
        }
      } else {
        throw new Error("INVALID OPCODE");
      }
      cursor++;
    }
    const gas = context.getCost();
    return gas.cost.add(gas.sixtyFloorths);
  };

  const result = await vm.runTx(runArgs).catch((vmerr) => ({ vmerr }));
  const vmerr = result.vmerr;
  if (vmerr) {
    return callback(vmerr);
  } else if (result.execResult.exceptionError) {
    const vmerr = RuntimeError.fromResults([runArgs.tx], { results: [result] });
    return callback(vmerr, result);
  } else if (steps.done()) {
    const estimate = result.gasUsed;
    result.gasEstimate = estimate;
  } else {
    const actualUsed = steps.ops[0].gasLeft.sub(steps.ops[steps.ops.length - 1].gasLeft);
    const sixtyFloorths = getTotal().sub(actualUsed);
    result.gasEstimate = result.gasUsed.add(sixtyFloorths);
  }
  callback(vmerr, result);
};

const stepTracker = () => {
  const sysOps = [];
  const allOps = [];
  const preCompile = new Set();
  let preCompileCheck = false;
  let precompileCallDepth = 0;
  return {
    collect: (info) => {
      if (preCompileCheck) {
        if (info.depth === precompileCallDepth) {
          // If the current depth is unchanged.
          // we record its position.
          preCompile.add(allOps.length - 1);
        }
        // Reset the flag immediately here
        preCompileCheck = false;
      }
      if (isCall(info.opcode.name)) {
        info.stack = info.stack.map((val) => val.clone());
        preCompileCheck = true;
        precompileCallDepth = info.depth;
        sysOps.push({ index: allOps.length, depth: info.depth, name: info.opcode.name });
      } else if (isCreate(info.opcode.name) || isTerminator(info.opcode.name)) {
        sysOps.push({ index: allOps.length, depth: info.depth, name: info.opcode.name });
      }
      // This goes last so we can use the length for the index ^
      allOps.push(info);
    },
    isPrecompile: (index) => preCompile.has(index),
    done: () => !allOps.length || sysOps.length < 2 || !isTerminator(allOps[allOps.length - 1].opcode.name),
    ops: allOps,
    systemOps: sysOps
  };
};


/***/ }),

/***/ 358410:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var to = __webpack_require__(484302);

// Expects:
//
// logIndex: ...
// transactionIndex: ...
// transactionHash: ...
// block: ...
// address: ...
// data: ...
// topics: ...
// type: ...

function Log(data) {
  var self = this;
  Object.keys(data).forEach(function(key) {
    self[key] = data[key];
  });
}

Log.prototype.toJSON = function() {
  // RPC quantity values like this.transactionIndex can be set to "0x00",
  // use the explicit rpcQuantityHexString to properly format the JSON, removing leading zeroes.
  // See RPC log format spec: https://github.com/ethereum/wiki/wiki/JSON-RPC
  return {
    logIndex: to.rpcQuantityHexString(this.logIndex),
    transactionIndex: to.rpcQuantityHexString(this.transactionIndex),
    transactionHash: to.rpcDataHexString(this.transactionHash),
    blockHash: to.rpcDataHexString(this.block.hash()),
    blockNumber: to.rpcQuantityHexString(this.block.header.number),
    address: to.rpcDataHexString(this.address),
    data: to.rpcDataHexString(this.data),
    topics: this.topics,
    type: "mined"
  };
};

module.exports = Log;


/***/ }),

/***/ 404429:
/***/ ((module) => {

module.exports = {
  // Mimics crypto.random bytes, but takes in a random number generator
  // as its second parameter. rng is expected to be a function that takes
  // no parameters and returns a result like Math.random().
  // This is important because it allows for a seeded random number generator.
  // Since this is a mock RPC library, the rng doesn't need to be cryptographically secure.
  randomBytes: function(length, rng) {
    var buf = [];

    for (var i = 0; i < length; i++) {
      buf.push(rng() * 255);
    }

    return Buffer.from(buf);
  },

  randomAlphaNumericString: function(length, rng) {
    const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";

    let text = "";

    for (var i = 0; i < length; i++) {
      text += alphabet.charAt(Math.floor((rng || Math.random)() * alphabet.length));
    }

    return text;
  }
};


/***/ }),

/***/ 164191:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var to = __webpack_require__(484302);

function Receipt(tx, block, logs, gasUsed, cumulativeGasUsed, contractAddress, status, logsBloom) {
  this.tx = tx;
  this.block = block;
  this.logs = logs;
  this.gasUsed = gasUsed;
  this.cumulativeGasUsed = cumulativeGasUsed;
  this.contractAddress = contractAddress;
  this.status = status;
  this.logsBloom = logsBloom;

  this.transactionIndex = 0;

  this.txHash = tx.hash();

  for (var i = 0; i < block.transactions.length; i++) {
    var current = block.transactions[i];
    if (current.hash().equals(this.txHash)) {
      this.transactionIndex = i;
      break;
    }
  }
}

Receipt.prototype.toJSON = function() {
  // Enforce Hex formatting as defined in the RPC spec.
  return {
    transactionHash: to.rpcDataHexString(this.txHash),
    transactionIndex: to.rpcQuantityHexString(this.transactionIndex),
    blockHash: to.rpcDataHexString(this.block.hash()),
    blockNumber: to.rpcQuantityHexString(this.block.header.number),
    from: to.rpcDataHexString(this.tx.from),
    to: to.nullableRpcDataHexString(this.tx.to),
    gasUsed: to.rpcQuantityHexString(this.gasUsed),
    cumulativeGasUsed: to.rpcQuantityHexString(this.cumulativeGasUsed),
    contractAddress: this.contractAddress != null ? to.rpcDataHexString(this.contractAddress) : null,
    logs: this.logs.map(function(log) {
      return log.toJSON();
    }),
    status: to.rpcQuantityHexString(this.status),
    logsBloom: to.rpcDataHexString(this.logsBloom),
    v: to.rpcQuantityHexString(this.tx.v),
    r: to.rpcQuantityHexString(this.tx.r),
    s: to.rpcQuantityHexString(this.tx.s)
  };
};

module.exports = Receipt;


/***/ }),

/***/ 828175:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var inherits = __webpack_require__(431669).inherits;
var to = __webpack_require__(484302);
var abi = __webpack_require__(236500);

inherits(RuntimeError, Error);

// Note: ethereumjs-vm will return an object that has a "results" and "receipts" keys.
// You should pass in the whole object.
function RuntimeError(transactions, vmOutput) {
  // Why not just Error.apply(this, [message])? See
  // https://gist.github.com/justmoon/15511f92e5216fa2624b#anti-patterns
  Error.captureStackTrace(this, this.constructor);
  this.name = this.constructor.name;

  this.results = {};
  this.hashes = [];

  // handles creating this.message
  this.combine(transactions, vmOutput);
}

RuntimeError.prototype.combine = function(transactions, vmOutput) {
  // Can be combined with vmOutput or another RuntimeError.
  if (transactions instanceof RuntimeError) {
    var err = transactions;
    var keys = Object.keys(err.results);

    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];
      this.results[key] = err.results[key];
      Array.prototype.push.apply(this.hashes, err.hashes);
    }
  } else {
    var results = vmOutput.results;

    for (i = 0; i < transactions.length; i++) {
      var tx = transactions[i];
      var result = results[i];

      // 1 means no error, oddly.
      if (result.execResult.exceptionError) {
        var hash = to.hex(tx.hash());
        this.hashes.push(hash);
        var reason;
        var returnData = result.execResult.returnValue;
        if (returnData && returnData.slice(0, 4).toString("hex") === "08c379a0") {
          try {
            reason = abi.rawDecode(["string"], returnData.slice(4))[0];
          } catch (_) {
            // if decoding fails, we'll just leave the reason empty
          }
        }

        const runState = result.execResult.runState;
        this.results[hash] = {
          error: result.execResult.exceptionError.error || result.execResult.exceptionError,
          program_counter: runState && runState.programCounter,
          return: to.hex(returnData),
          reason: reason
        };
      }
    }
  }

  // Once combined, set the message
  if (this.hashes.length === 1) {
    var exceptionResult = this.results[this.hashes[0]];
    var message = "VM Exception while processing transaction: " + exceptionResult.error;
    if (exceptionResult.reason) {
      message += " " + exceptionResult.reason;
    }
    this.message = message;
  } else {
    message = "Multiple VM Exceptions while processing transactions: \n\n";

    for (i = 0; i < this.hashes.length; i++) {
      hash = this.hashes[i];
      exceptionResult = this.results[hash];
      message += hash + ": " + exceptionResult.error;
      if (exceptionResult.reason) {
        message += " " + exceptionResult.reason;
      }
      message += "\n";
    }
    this.message = message;
  }
};

RuntimeError.prototype.count = function() {
  return Object.keys(this.results).length;
};

RuntimeError.fromResults = function(transactions, vmOutput) {
  var err = new RuntimeError(transactions, vmOutput);

  if (err.count() === 0) {
    return null;
  }

  return err;
};

module.exports = RuntimeError;


/***/ }),

/***/ 484302:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const utils = __webpack_require__(791996);

module.exports = {
  buffer: function(val) {
    let data;
    if (typeof val === "string") {
      // strings need to be treated as hex, so we have to prep them:
      data = val.indexOf("0x") === 0 ? val.slice(2) : val;
      data = data.length % 2 === 1 ? `0${data}` : data;
      data = Buffer.from(data, "hex");
    } else if (Buffer.isBuffer(val)) {
      // no need to copy the Buffer to a new Buffer, so we just use the Buffer
      // exactly as it was given to us:
      data = val;
    } else {
      // all other types get the Buffer treatment and built-in type checking:
      data = Buffer.from(val);
    }
    return data;
  },
  // Note: Do not use to.hex() when you really mean utils.addHexPrefix().
  hex: function(val) {
    if (typeof val === "string") {
      if (val.indexOf("0x") === 0) {
        return val.trim();
      } else {
        val = new utils.BN(val);
      }
    }

    if (typeof val === "boolean") {
      val = val ? 1 : 0;
    }

    if (typeof val === "number") {
      val = utils.intToHex(val);
    } else if (val == null) {
      return "0x";
    } else if (typeof val === "object") {
      // Support Buffer, BigInteger and BN library
      // Hint: BN is used in ethereumjs
      val = val.toString("hex");
    }

    return utils.addHexPrefix(val);
  },

  _rpcQuantityHexString: function(val) {
    val = this.hex(val);
    // remove all zeroes leading zeros, `0+`, from the hex-encoded value
    // This doesn't remove the last 0 which would be captured by `(.+?)`
    val = val.replace(/^(?:0x)(?:0+(.+?))?$/, "0x$1");
    return val;
  },

  rpcQuantityHexString: function(val) {
    val = this._rpcQuantityHexString(val);

    // RPC Quantities must represent `0` as `0x0`
    if (val === "0x") {
      val = "0x0";
    }

    return val;
  },

  rpcDataHexString: function(val, length) {
    if (typeof length === "number") {
      val = this.hex(val).replace("0x", "");

      val = new Array(length - val.length).fill("0").join("") + val;
    } else {
      if (val.length === 0) {
        return "0x";
      }
      val = this.hex(val).replace("0x", "");

      if (val.length % 2 !== 0) {
        val = "0" + val;
      }
    }
    return "0x" + val;
  },

  nullableRpcDataHexString: function(val, length) {
    if (val === null) {
      return null;
    } else {
      const rpcDataHex = this.rpcDataHexString(val, length);
      return rpcDataHex === "0x" ? null : rpcDataHex;
    }
  },

  nullableRpcQuantityHexString: function(val, length) {
    if (val === null) {
      return null;
    } else {
      const rpcQuantityHex = this._rpcQuantityHexString(val, length);
      return rpcQuantityHex === "0x" ? null : rpcQuantityHex;
    }
  },

  hexWithZeroPadding: function(val) {
    val = this.hex(val);
    const digits = val.replace("0x", "");
    if (digits.length & 0x1) {
      return "0x0" + digits;
    }
    return val;
  },

  number: function(val) {
    if (typeof val === "number") {
      return val;
    }
    if (typeof val === "string") {
      if (val.indexOf("0x") !== 0) {
        return parseInt(val, 10);
      }
    }
    var bufVal = utils.toBuffer(val);
    return utils.bufferToInt(bufVal);
  },

  rpcError: function(id, code, msg) {
    return JSON.stringify({
      jsonrpc: "2.0",
      id: id,
      error: {
        code: code,
        message: msg
      }
    });
  }
};


/***/ }),

/***/ 283286:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const EthereumJsTransaction = __webpack_require__(644914)/* .Transaction */ .YW;
const EthereumJsFakeTransaction = __webpack_require__(644914)/* .FakeTransaction */ .Oq;
const Common = __webpack_require__(265982).default;
const ethUtil = __webpack_require__(791996);
const assert = __webpack_require__(742357);
const rlp = ethUtil.rlp;
const to = __webpack_require__(484302);

const sign = EthereumJsTransaction.prototype.sign;
const fakeHash = function() {
  // this isn't memoization of the hash. previous versions of ganache-core
  // created hashes in a different/incorrect way and are recorded this way
  // in snapshot dbs. We are preserving the chain's immutability by using the
  // stored hash instead of calculating it.
  if (this._hash != null) {
    return this._hash;
  }
  return EthereumJsFakeTransaction.prototype.hash.apply(this, arguments);
};
const BUFFER_ZERO = Buffer.from([0]);

function configZeroableField(tx, fieldName, fieldLength = 32) {
  const index = tx._fields.indexOf(fieldName);
  const descriptor = Object.getOwnPropertyDescriptor(tx, fieldName);
  // eslint-disable-next-line accessor-pairs
  Object.defineProperty(tx, fieldName, {
    set: (v) => {
      descriptor.set.call(tx, v);
      v = ethUtil.toBuffer(v);
      assert(fieldLength >= v.length, `The field ${fieldName} must not have more ${fieldLength} bytes`);
      tx._originals[index] = v;
    },
    get: () => {
      return tx._originals[index];
    }
  });
}

/**
 * etheruemjs-tx's Transactions don't behave quite like we need them to, so
 * we're monkey-patching them to do what we want here.
 * @param {Transaction} tx The Transaction to fix
 * @param {Object} [data] The data object
 */
function fixProps(tx, data) {
  // ethereumjs-tx doesn't allow for a `0` value in fields, but we want it to
  // in order to differentiate between a value that isn't set and a value
  // that is set to 0 in a fake transaction.
  // Once https://github.com/ethereumjs/ethereumjs-tx/issues/112 is figured
  // out we can probably remove this fix/hack.
  // We keep track of the original value and return that value when
  // referenced by its property name. This lets us properly encode a `0` as
  // an empty buffer while still being able to differentiate between a `0`
  // and `null`/`undefined`.
  tx._originals = [];
  const fieldNames = ["nonce", "gasPrice", "gasLimit", "value"];
  fieldNames.forEach((fieldName) => configZeroableField(tx, fieldName, 32));

  if (tx.isFake()) {
    /**
     * @prop {Buffer} from (read/write) Set from address to bypass transaction
     * signing on fake transactions.
     */
    Object.defineProperty(tx, "from", {
      enumerable: true,
      configurable: true,
      get: tx.getSenderAddress.bind(tx),
      set: (val) => {
        if (val) {
          tx._from = ethUtil.toBuffer(val);
        } else {
          tx._from = null;
        }
      }
    });

    if (data && data.from) {
      tx.from = data.from;
    }

    tx.hash = fakeHash;
  }
}

/**
 * Parses the given data object and adds its properties to the given tx.
 * @param {Transaction} tx
 * @param {Object} [data]
 */
function initData(tx, data) {
  if (data) {
    if (typeof data === "string") {
      data = to.buffer(data);
    }
    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }
    const self = tx;
    if (Array.isArray(data)) {
      if (data.length > tx._fields.length) {
        throw new Error("wrong number of fields in data");
      }

      // make sure all the items are buffers
      data.forEach((d, i) => {
        self[self._fields[i]] = ethUtil.toBuffer(d);
      });
    } else if ((typeof data === "undefined" ? "undefined" : typeof data) === "object") {
      const keys = Object.keys(data);
      tx._fields.forEach(function(field) {
        if (keys.indexOf(field) !== -1) {
          let val = data[field];
          if (typeof val === "string" && !val.startsWith("0x")) {
            val = "0x" + val;
          }
          self[field] = val;
        }
        if (field === "gasLimit") {
          if (keys.indexOf("gas") !== -1) {
            self.gas = data.gas;
          }
        } else if (field === "data") {
          if (keys.indexOf("input") !== -1) {
            self.input = data.input;
          }
        }
      });

      // Set chainId value from the data, if it's there and the data didn't
      // contain a `v` value with chainId in it already. If we do have a
      // data.chainId value let's set the interval v value to it.
      if (!tx._chainId && data && data.chainId != null) {
        tx.raw[self._fields.indexOf("v")] = tx._chainId = data.chainId || 0;
      }
    } else {
      throw new Error("invalid data");
    }
  }
}

module.exports = class Transaction extends EthereumJsTransaction {
  /**
   * @param {Object} [data] The data for this Transaction.
   * @param {Number} type The `Transaction.types` bit flag for this transaction
   * @param {Object} [common] EthereumJS common.fromCustomChain()
   *  Can be a combination of `Transaction.types.none`, `Transaction.types.signed`, and `Transaction.types.fake`.
   */
  constructor(data, type = Transaction.types.none, common) {
    if (data.chainId && !common) {
      common = Common.forCustomChain(
        "mainnet", // TODO needs to match chain id
        {
          name: "ganache",
          networkId: 1,
          chainId: data.chainId,
          comment: "Local test network",
          bootstrapNodes: []
        },
        "muirGlacier"
      );
    }
    super(undefined, { common });

    this.ganacheTxCommon = common;
    this.type = type;

    fixProps(this, data);
    initData(this, data);
  }

  static get types() {
    // values must be powers of 2
    return {
      none: 0,
      signed: 1,
      fake: 2
    };
  }

  /**
   * Prepares arbitrary JSON data for use in a Transaction.
   * @param {Object} json JSON object representing the Transaction
   * @param {Number} type The `Transaction.types` bit flag for this transaction
   * @param {Object} [common] EthereumJS common.fromCustomChain()
   * @param {Number} [networkId]
   * @param {string} [hardfork]
   *  Can be a combination of `Transaction.types.none`, `Transaction.types.signed`, and `Transaction.types.fake`.
   */
  static fromJSON(json, type, common, networkId, hardfork) {
    let toAccount;
    if (json.to) {
      // Remove all padding and make it easily comparible.
      const buf = to.buffer(json.to);
      if (buf.equals(Buffer.from([0]))) {
        // if the address is 0x0 make it 0x0{20}
        toAccount = ethUtil.setLengthLeft(buf, 20);
      } else {
        toAccount = buf;
      }
    }
    const data = json.data || json.input;
    const options = {
      nonce: ethUtil.toBuffer(to.hex(json.nonce)),
      from: ethUtil.toBuffer(to.hex(json.from)),
      value: ethUtil.toBuffer(to.hex(json.value)),
      gasLimit: ethUtil.toBuffer(to.hex(json.gas || json.gasLimit)),
      gasPrice: ethUtil.toBuffer(to.hex(json.gasPrice)),
      data: data ? to.buffer(data) : null,
      to: toAccount,
      v: ethUtil.toBuffer(json.v),
      r: ethUtil.toBuffer(json.r),
      s: ethUtil.toBuffer(json.s)
    };
    if (!common && options.v.length > 0) {
      const chainId = Math.floor((json.v - 35) / 2);
      common = Common.forCustomChain(
        "mainnet", // TODO needs to match chain id
        {
          name: "ganache",
          networkId: networkId,
          chainId: chainId >= 0 ? chainId : 1,
          comment: "Local test network",
          bootstrapNodes: []
        },
        hardfork
      );
    }
    const tx = new Transaction(options, type, common);
    tx._hash = json.hash ? to.buffer(json.hash) : null;
    return tx;
  }

  /**
   * Encodes the Transaction in order to be used in a database. Can be decoded
   * into an identical Transaction via `Transaction.decode(encodedTx)`.
   */
  encode() {
    const resultJSON = {
      hash: to.nullableRpcDataHexString(this.hash()),
      nonce: to.nullableRpcQuantityHexString(this.nonce) || "0x",
      from: to.rpcDataHexString(this.from),
      to: to.nullableRpcDataHexString(this.to),
      value: to.nullableRpcQuantityHexString(this.value),
      gas: to.nullableRpcQuantityHexString(this.gasLimit),
      gasPrice: to.nullableRpcQuantityHexString(this.gasPrice),
      data: this.data ? this.data.toString("hex") : null,
      v: to.nullableRpcQuantityHexString(this.v),
      r: to.nullableRpcQuantityHexString(this.r),
      s: to.nullableRpcQuantityHexString(this.s),
      _type: this.type,
      _options: {
        hardfork: this.ganacheTxCommon.hardfork(),
        chainId: this.ganacheTxCommon.chainId(),
        networkId: this.ganacheTxCommon.networkId()
      }
    };
    return resultJSON;
  }

  isFake() {
    return (this.type & Transaction.types.fake) === Transaction.types.fake;
  }

  isSigned() {
    return (this.type & Transaction.types.signed) === Transaction.types.signed;
  }

  /**
   * Compares the transaction's nonce value to the given expectedNonce taking in
   * to account the type of transaction and comparison rules for each type.
   *
   * In a signed transaction a nonce of Buffer([]) is the same as Buffer([0]),
   * but in a fake transaction Buffer([]) is null and Buffer([0]) is 0.
   *
   * @param {Buffer} expectedNonce The value of the from account's next nonce.
   */
  validateNonce(expectedNonce) {
    let nonce;
    if (this.isSigned() && this.nonce.length === 0) {
      nonce = BUFFER_ZERO;
    } else {
      nonce = this.nonce;
    }
    return nonce.equals(expectedNonce);
  }

  /**
   * Signs the transaction and sets the `type` bit for `signed` to 1,
   * i.e., `isSigned() === true`
   */
  sign() {
    sign.apply(this, arguments);
    this.type |= Transaction.types.signed;
  }

  /**
   * Returns a JSON-RPC spec compliant representation of this Transaction.
   *
   * @param {Object} block The block this Transaction appears in.
   */
  toJsonRpc(block) {
    const hash = this.hash();

    let transactionIndex = null;
    for (let i = 0, txns = block.transactions, l = txns.length; i < l; i++) {
      if (txns[i].hash().equals(hash)) {
        transactionIndex = i;
        break;
      }
    }

    const resultJSON = {
      hash: to.nullableRpcDataHexString(hash),
      nonce: to.rpcQuantityHexString(this.nonce),
      blockHash: to.nullableRpcDataHexString(block.hash()),
      blockNumber: to.nullableRpcQuantityHexString(block.header.number),
      transactionIndex: to.nullableRpcQuantityHexString(transactionIndex),
      from: to.rpcDataHexString(this.from),
      to: to.nullableRpcDataHexString(this.to),
      value: to.rpcQuantityHexString(this.value),
      gas: to.rpcQuantityHexString(this.gasLimit),
      gasPrice: to.rpcQuantityHexString(this.gasPrice),
      input: to.rpcDataHexString(this.data),
      v: to.nullableRpcQuantityHexString(this.v),
      r: to.nullableRpcQuantityHexString(this.r),
      s: to.nullableRpcQuantityHexString(this.s)
    };

    return resultJSON;
  }
};


/***/ }),

/***/ 364011:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var inherits = __webpack_require__(431669).inherits;

// raised when the transaction is rejected prior to running it in the EVM.
function TXRejectedError(message) {
  // Why not just Error.apply(this, [message])? See
  // https://gist.github.com/justmoon/15511f92e5216fa2624b#anti-patterns
  Error.captureStackTrace(this, this.constructor);
  this.name = this.constructor.name;
  this.message = message;
}

inherits(TXRejectedError, Error);

module.exports = TXRejectedError;


/***/ }),

/***/ 685291:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var websocket = __webpack_require__(55159);
var WebSocketServer = websocket.server;

module.exports = function(httpServer, provider, logger) {
  var connectionManager = new ConnectionManager(provider, logger);

  var wsServer = new WebSocketServer({
    httpServer: httpServer,
    autoAcceptConnections: true
  });

  wsServer.on("connect", connectionManager.manageConnection);

  return wsServer;
};

function ConnectionManager(provider, logger) {
  const self = this;
  self.provider = provider;
  self.logger = logger;
  self.connectionsBySubscriptionId = {};
  self.connections = {};
  self.connectionCounter = 0;

  self._updateSubscriptions = self._updateSubscriptions.bind(self);
  self.manageConnection = self.manageConnection.bind(self);
  self._logPayload = self._logPayload.bind(self);
  self._handleRequest = self._handleRequest.bind(self);

  provider.on("data", function(err, notification) {
    if (err) {
      return;
    }
    self._updateSubscriptions(notification);
  });
}

ConnectionManager.prototype.manageConnection = function(connection) {
  const self = this;
  connection.id = ++self.connectionCounter;
  self.connections[connection.id] = {
    connection: connection,
    subscriptions: {}
  };

  connection.on("message", function(message) {
    let payload;
    try {
      if (message.type === "utf8") {
        payload = JSON.parse(message.utf8Data);
      } else if (message.type === "binary") {
        payload = JSON.parse(message.binaryData.toString("utf8").trim());
      } else {
        throw new Error("Invalid message type");
      }
    } catch (e) {
      connection.close(websocket.connection.CLOSE_REASON_UNPROCESSABLE_INPUT, e.message);
      return;
    }

    self._logPayload(payload);
    self._handleRequest(connection, payload);
  });

  connection.on("close", function() {
    // remove subscriptions
    Object.keys(self.connections[connection.id].subscriptions).forEach((subscriptionId) => {
      self.provider.send(
        {
          jsonrpc: "2.0",
          method: "eth_unsubscribe",
          params: [subscriptionId],
          id: new Date().getTime()
        },
        function(err, result) {
          if (err) {
            return;
          }
          delete self.connectionsBySubscriptionId[subscriptionId];
        }
      );
    });

    delete self.connections[connection.id];
  });
};

ConnectionManager.prototype._handleRequest = function(connection, payload) {
  const self = this;

  // handle subscription requests, otherwise delegate to provider
  switch (payload.method) {
    case "eth_subscribe":
      self.provider.send(payload, function(err, result) {
        if (!err && result.result && self.connections[connection.id]) {
          self.connections[connection.id].subscriptions[result.result] = true;
          self.connectionsBySubscriptionId[result.result] = self.connections[connection.id];
        }
        connection.send(JSON.stringify(result));
      });
      break;
    case "eth_unsubscribe":
      self.provider.send(payload, function(err, result) {
        if (err || result.error) {
          if (connection && connection.send) {
            connection.send(JSON.stringify(result));
          }
          return;
        }

        if (self.connections[connection.id]) {
          delete self.connections[connection.id].subscriptions[payload.params[0]];
        }
        delete self.connectionsBySubscriptionId[payload.params[0]];

        connection.send(JSON.stringify(result));
      });
      break;
    default:
      self.provider.send(payload, function(_, result) {
        connection.send(JSON.stringify(result));
      });
  }
};

// Log messages that come into the TestRPC via http
ConnectionManager.prototype._logPayload = function(payload) {
  const self = this;
  if (payload instanceof Array) {
    // Batch request
    for (var i = 0; i < payload.length; i++) {
      var item = payload[i];
      self.logger.log(item.method);
    }
  } else {
    self.logger.log(payload.method);
  }
};

ConnectionManager.prototype._updateSubscriptions = function(notification) {
  const subscription = this.connectionsBySubscriptionId[notification.params.subscription];
  // Safety check for subscription/connection.
  if (subscription) {
    subscription.connection.send(JSON.stringify(notification));
  }
};


/***/ }),

/***/ 397969:
/***/ ((module) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

function AbstractChainedBatch (db) {
  this._db         = db
  this._operations = []
  this._written    = false
}

AbstractChainedBatch.prototype._serializeKey = function (key) {
  return this._db._serializeKey(key)
}

AbstractChainedBatch.prototype._serializeValue = function (value) {
  return this._db._serializeValue(value)
}

AbstractChainedBatch.prototype._checkWritten = function () {
  if (this._written)
    throw new Error('write() already called on this batch')
}

AbstractChainedBatch.prototype.put = function (key, value) {
  this._checkWritten()

  var err = this._db._checkKey(key, 'key', this._db._isBuffer)
  if (err)
    throw err

  key = this._serializeKey(key)
  value = this._serializeValue(value)

  if (typeof this._put == 'function' )
    this._put(key, value)
  else
    this._operations.push({ type: 'put', key: key, value: value })

  return this
}

AbstractChainedBatch.prototype.del = function (key) {
  this._checkWritten()

  var err = this._db._checkKey(key, 'key', this._db._isBuffer)
  if (err) throw err

  key = this._serializeKey(key)

  if (typeof this._del == 'function' )
    this._del(key)
  else
    this._operations.push({ type: 'del', key: key })

  return this
}

AbstractChainedBatch.prototype.clear = function () {
  this._checkWritten()

  this._operations = []

  if (typeof this._clear == 'function' )
    this._clear()

  return this
}

AbstractChainedBatch.prototype.write = function (options, callback) {
  this._checkWritten()

  if (typeof options == 'function')
    callback = options
  if (typeof callback != 'function')
    throw new Error('write() requires a callback argument')
  if (typeof options != 'object')
    options = {}

  this._written = true

  if (typeof this._write == 'function' )
    return this._write(callback)

  if (typeof this._db._batch == 'function')
    return this._db._batch(this._operations, options, callback)

  process.nextTick(callback)
}

module.exports = AbstractChainedBatch


/***/ }),

/***/ 893800:
/***/ ((module) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

function AbstractIterator (db) {
  this.db = db
  this._ended = false
  this._nexting = false
}

AbstractIterator.prototype.next = function (callback) {
  var self = this

  if (typeof callback != 'function')
    throw new Error('next() requires a callback argument')

  if (self._ended)
    return callback(new Error('cannot call next() after end()'))
  if (self._nexting)
    return callback(new Error('cannot call next() before previous next() has completed'))

  self._nexting = true
  if (typeof self._next == 'function') {
    return self._next(function () {
      self._nexting = false
      callback.apply(null, arguments)
    })
  }

  process.nextTick(function () {
    self._nexting = false
    callback()
  })
}

AbstractIterator.prototype.end = function (callback) {
  if (typeof callback != 'function')
    throw new Error('end() requires a callback argument')

  if (this._ended)
    return callback(new Error('end() already called on iterator'))

  this._ended = true

  if (typeof this._end == 'function')
    return this._end(callback)

  process.nextTick(callback)
}

module.exports = AbstractIterator


/***/ }),

/***/ 426318:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

var xtend                = __webpack_require__(347529)
  , AbstractIterator     = __webpack_require__(893800)
  , AbstractChainedBatch = __webpack_require__(397969)

function AbstractLevelDOWN (location) {
  if (!arguments.length || location === undefined)
    throw new Error('constructor requires at least a location argument')

  if (typeof location != 'string')
    throw new Error('constructor requires a location string argument')

  this.location = location
  this.status = 'new'
}

AbstractLevelDOWN.prototype.open = function (options, callback) {
  var self      = this
    , oldStatus = this.status

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('open() requires a callback argument')

  if (typeof options != 'object')
    options = {}

  options.createIfMissing = options.createIfMissing != false
  options.errorIfExists = !!options.errorIfExists

  if (typeof this._open == 'function') {
    this.status = 'opening'
    this._open(options, function (err) {
      if (err) {
        self.status = oldStatus
        return callback(err)
      }
      self.status = 'open'
      callback()
    })
  } else {
    this.status = 'open'
    process.nextTick(callback)
  }
}

AbstractLevelDOWN.prototype.close = function (callback) {
  var self      = this
    , oldStatus = this.status

  if (typeof callback != 'function')
    throw new Error('close() requires a callback argument')

  if (typeof this._close == 'function') {
    this.status = 'closing'
    this._close(function (err) {
      if (err) {
        self.status = oldStatus
        return callback(err)
      }
      self.status = 'closed'
      callback()
    })
  } else {
    this.status = 'closed'
    process.nextTick(callback)
  }
}

AbstractLevelDOWN.prototype.get = function (key, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('get() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)

  if (typeof options != 'object')
    options = {}

  options.asBuffer = options.asBuffer != false

  if (typeof this._get == 'function')
    return this._get(key, options, callback)

  process.nextTick(function () { callback(new Error('NotFound')) })
}

AbstractLevelDOWN.prototype.put = function (key, value, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('put() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)
  value = this._serializeValue(value)

  if (typeof options != 'object')
    options = {}

  if (typeof this._put == 'function')
    return this._put(key, value, options, callback)

  process.nextTick(callback)
}

AbstractLevelDOWN.prototype.del = function (key, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('del() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)

  if (typeof options != 'object')
    options = {}

  if (typeof this._del == 'function')
    return this._del(key, options, callback)

  process.nextTick(callback)
}

AbstractLevelDOWN.prototype.batch = function (array, options, callback) {
  if (!arguments.length)
    return this._chainedBatch()

  if (typeof options == 'function')
    callback = options

  if (typeof array == 'function')
    callback = array

  if (typeof callback != 'function')
    throw new Error('batch(array) requires a callback argument')

  if (!Array.isArray(array))
    return callback(new Error('batch(array) requires an array argument'))

  if (!options || typeof options != 'object')
    options = {}

  var i = 0
    , l = array.length
    , e
    , err

  for (; i < l; i++) {
    e = array[i]
    if (typeof e != 'object')
      continue

    if (err = this._checkKey(e.type, 'type'))
      return callback(err)

    if (err = this._checkKey(e.key, 'key'))
      return callback(err)
  }

  if (typeof this._batch == 'function')
    return this._batch(array, options, callback)

  process.nextTick(callback)
}

//TODO: remove from here, not a necessary primitive
AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) {
  if (   start == null
      || end == null
      || typeof start == 'function'
      || typeof end == 'function') {
    throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments')
  }

  if (typeof callback != 'function')
    throw new Error('approximateSize() requires a callback argument')

  start = this._serializeKey(start)
  end = this._serializeKey(end)

  if (typeof this._approximateSize == 'function')
    return this._approximateSize(start, end, callback)

  process.nextTick(function () {
    callback(null, 0)
  })
}

AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) {
  var self = this

  options = xtend(options)

  ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) {
    if (options[o] && self._isBuffer(options[o]) && options[o].length === 0)
      delete options[o]
  })

  options.reverse = !!options.reverse
  options.keys = options.keys != false
  options.values = options.values != false
  options.limit = 'limit' in options ? options.limit : -1
  options.keyAsBuffer = options.keyAsBuffer != false
  options.valueAsBuffer = options.valueAsBuffer != false

  return options
}

AbstractLevelDOWN.prototype.iterator = function (options) {
  if (typeof options != 'object')
    options = {}

  options = this._setupIteratorOptions(options)

  if (typeof this._iterator == 'function')
    return this._iterator(options)

  return new AbstractIterator(this)
}

AbstractLevelDOWN.prototype._chainedBatch = function () {
  return new AbstractChainedBatch(this)
}

AbstractLevelDOWN.prototype._isBuffer = function (obj) {
  return Buffer.isBuffer(obj)
}

AbstractLevelDOWN.prototype._serializeKey = function (key) {
  return this._isBuffer(key)
    ? key
    : String(key)
}

AbstractLevelDOWN.prototype._serializeValue = function (value) {
  if (value == null) return ''
  return this._isBuffer(value) || process.browser ? value : String(value)
}

AbstractLevelDOWN.prototype._checkKey = function (obj, type) {
  if (obj === null || obj === undefined)
    return new Error(type + ' cannot be `null` or `undefined`')

  if (this._isBuffer(obj) && obj.length === 0)
    return new Error(type + ' cannot be an empty Buffer')
  else if (String(obj) === '')
    return new Error(type + ' cannot be an empty String')
}

module.exports = AbstractLevelDOWN


/***/ }),

/***/ 685222:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

exports.AbstractLevelDOWN = __webpack_require__(426318)
/* unused reexport */ __webpack_require__(893800)
/* unused reexport */ __webpack_require__(397969)
/* unused reexport */ __webpack_require__(537951)


/***/ }),

/***/ 537951:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var AbstractLevelDOWN = __webpack_require__(426318)

function isLevelDOWN (db) {
  if (!db || typeof db !== 'object')
    return false
  return Object.keys(AbstractLevelDOWN.prototype).filter(function (name) {
    // TODO remove approximateSize check when method is gone
    return name[0] != '_' && name != 'approximateSize'
  }).every(function (name) {
    return typeof db[name] == 'function'
  })
}

module.exports = isLevelDOWN


/***/ }),

/***/ 940008:
/***/ (function(module, exports, __webpack_require__) {

/* module decorator */ module = __webpack_require__.nmd(module);
(function (global, factory) {
   true ? factory(exports) :
  0;
}(this, (function (exports) { 'use strict';

function slice(arrayLike, start) {
    start = start|0;
    var newLen = Math.max(arrayLike.length - start, 0);
    var newArr = Array(newLen);
    for(var idx = 0; idx < newLen; idx++)  {
        newArr[idx] = arrayLike[start + idx];
    }
    return newArr;
}

/**
 * Creates a continuation function with some arguments already applied.
 *
 * Useful as a shorthand when combined with other control flow functions. Any
 * arguments passed to the returned function are added to the arguments
 * originally passed to apply.
 *
 * @name apply
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {Function} fn - The function you want to eventually apply all
 * arguments to. Invokes with (arguments...).
 * @param {...*} arguments... - Any number of arguments to automatically apply
 * when the continuation is called.
 * @returns {Function} the partially-applied function
 * @example
 *
 * // using apply
 * async.parallel([
 *     async.apply(fs.writeFile, 'testfile1', 'test1'),
 *     async.apply(fs.writeFile, 'testfile2', 'test2')
 * ]);
 *
 *
 * // the same process without using apply
 * async.parallel([
 *     function(callback) {
 *         fs.writeFile('testfile1', 'test1', callback);
 *     },
 *     function(callback) {
 *         fs.writeFile('testfile2', 'test2', callback);
 *     }
 * ]);
 *
 * // It's possible to pass any number of additional arguments when calling the
 * // continuation:
 *
 * node> var fn = async.apply(sys.puts, 'one');
 * node> fn('two', 'three');
 * one
 * two
 * three
 */
var apply = function(fn/*, ...args*/) {
    var args = slice(arguments, 1);
    return function(/*callArgs*/) {
        var callArgs = slice(arguments);
        return fn.apply(null, args.concat(callArgs));
    };
};

var initialParams = function (fn) {
    return function (/*...args, callback*/) {
        var args = slice(arguments);
        var callback = args.pop();
        fn.call(this, args, callback);
    };
};

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';

function fallback(fn) {
    setTimeout(fn, 0);
}

function wrap(defer) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        defer(function () {
            fn.apply(null, args);
        });
    };
}

var _defer;

if (hasSetImmediate) {
    _defer = setImmediate;
} else if (hasNextTick) {
    _defer = process.nextTick;
} else {
    _defer = fallback;
}

var setImmediate$1 = wrap(_defer);

/**
 * Take a sync function and make it async, passing its return value to a
 * callback. This is useful for plugging sync functions into a waterfall,
 * series, or other async functions. Any arguments passed to the generated
 * function will be passed to the wrapped function (except for the final
 * callback argument). Errors thrown will be passed to the callback.
 *
 * If the function passed to `asyncify` returns a Promise, that promises's
 * resolved/rejected state will be used to call the callback, rather than simply
 * the synchronous return value.
 *
 * This also means you can asyncify ES2017 `async` functions.
 *
 * @name asyncify
 * @static
 * @memberOf module:Utils
 * @method
 * @alias wrapSync
 * @category Util
 * @param {Function} func - The synchronous function, or Promise-returning
 * function to convert to an {@link AsyncFunction}.
 * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
 * invoked with `(args..., callback)`.
 * @example
 *
 * // passing a regular synchronous function
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(JSON.parse),
 *     function (data, next) {
 *         // data is the result of parsing the text.
 *         // If there was a parsing error, it would have been caught.
 *     }
 * ], callback);
 *
 * // passing a function returning a promise
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(function (contents) {
 *         return db.model.create(contents);
 *     }),
 *     function (model, next) {
 *         // `model` is the instantiated model object.
 *         // If there was an error, this function would be skipped.
 *     }
 * ], callback);
 *
 * // es2017 example, though `asyncify` is not needed if your JS environment
 * // supports async functions out of the box
 * var q = async.queue(async.asyncify(async function(file) {
 *     var intermediateStep = await processFile(file);
 *     return await somePromise(intermediateStep)
 * }));
 *
 * q.push(files);
 */
function asyncify(func) {
    return initialParams(function (args, callback) {
        var result;
        try {
            result = func.apply(this, args);
        } catch (e) {
            return callback(e);
        }
        // if result is Promise object
        if (isObject(result) && typeof result.then === 'function') {
            result.then(function(value) {
                invokeCallback(callback, null, value);
            }, function(err) {
                invokeCallback(callback, err.message ? err : new Error(err));
            });
        } else {
            callback(null, result);
        }
    });
}

function invokeCallback(callback, error, value) {
    try {
        callback(error, value);
    } catch (e) {
        setImmediate$1(rethrow, e);
    }
}

function rethrow(error) {
    throw error;
}

var supportsSymbol = typeof Symbol === 'function';

function isAsync(fn) {
    return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
}

function wrapAsync(asyncFn) {
    return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}

function applyEach$1(eachfn) {
    return function(fns/*, ...args*/) {
        var args = slice(arguments, 1);
        var go = initialParams(function(args, callback) {
            var that = this;
            return eachfn(fns, function (fn, cb) {
                wrapAsync(fn).apply(that, args.concat(cb));
            }, callback);
        });
        if (args.length) {
            return go.apply(this, args);
        }
        else {
            return go;
        }
    };
}

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Built-in value references. */
var Symbol$1 = root.Symbol;

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$1 = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$1 = objectProto$1.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString$1.call(value);
}

/** `Object#toString` result references. */
var nullTag = '[object Null]';
var undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]';
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
var proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
var breakLoop = {};

/**
 * This method returns `undefined`.
 *
 * @static
 * @memberOf _
 * @since 2.3.0
 * @category Util
 * @example
 *
 * _.times(2, _.noop);
 * // => [undefined, undefined]
 */
function noop() {
  // No operation performed.
}

function once(fn) {
    return function () {
        if (fn === null) return;
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;

var getIterator = function (coll) {
    return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
};

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/** `Object#toString` result references. */
var argsTag = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/** Used for built-in method references. */
var objectProto$3 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER$1 : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';
var arrayTag = '[object Array]';
var boolTag = '[object Boolean]';
var dateTag = '[object Date]';
var errorTag = '[object Error]';
var funcTag$1 = '[object Function]';
var mapTag = '[object Map]';
var numberTag = '[object Number]';
var objectTag = '[object Object]';
var regexpTag = '[object RegExp]';
var setTag = '[object Set]';
var stringTag = '[object String]';
var weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]';
var dataViewTag = '[object DataView]';
var float32Tag = '[object Float32Array]';
var float64Tag = '[object Float64Array]';
var int8Tag = '[object Int8Array]';
var int16Tag = '[object Int16Array]';
var int32Tag = '[object Int32Array]';
var uint8Tag = '[object Uint8Array]';
var uint8ClampedTag = '[object Uint8ClampedArray]';
var uint16Tag = '[object Uint16Array]';
var uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports$1 && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/** Used for built-in method references. */
var objectProto$2 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$1.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$5 = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;

  return value === proto;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/** Used for built-in method references. */
var objectProto$4 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

function createArrayIterator(coll) {
    var i = -1;
    var len = coll.length;
    return function next() {
        return ++i < len ? {value: coll[i], key: i} : null;
    }
}

function createES2015Iterator(iterator) {
    var i = -1;
    return function next() {
        var item = iterator.next();
        if (item.done)
            return null;
        i++;
        return {value: item.value, key: i};
    }
}

function createObjectIterator(obj) {
    var okeys = keys(obj);
    var i = -1;
    var len = okeys.length;
    return function next() {
        var key = okeys[++i];
        return i < len ? {value: obj[key], key: key} : null;
    };
}

function iterator(coll) {
    if (isArrayLike(coll)) {
        return createArrayIterator(coll);
    }

    var iterator = getIterator(coll);
    return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}

function onlyOnce(fn) {
    return function() {
        if (fn === null) throw new Error("Callback was already called.");
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

function _eachOfLimit(limit) {
    return function (obj, iteratee, callback) {
        callback = once(callback || noop);
        if (limit <= 0 || !obj) {
            return callback(null);
        }
        var nextElem = iterator(obj);
        var done = false;
        var running = 0;
        var looping = false;

        function iterateeCallback(err, value) {
            running -= 1;
            if (err) {
                done = true;
                callback(err);
            }
            else if (value === breakLoop || (done && running <= 0)) {
                done = true;
                return callback(null);
            }
            else if (!looping) {
                replenish();
            }
        }

        function replenish () {
            looping = true;
            while (running < limit && !done) {
                var elem = nextElem();
                if (elem === null) {
                    done = true;
                    if (running <= 0) {
                        callback(null);
                    }
                    return;
                }
                running += 1;
                iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
            }
            looping = false;
        }

        replenish();
    };
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name eachOfLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`. The `key` is the item's key, or index in the case of an
 * array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachOfLimit(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback);
}

function doLimit(fn, limit) {
    return function (iterable, iteratee, callback) {
        return fn(iterable, limit, iteratee, callback);
    };
}

// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
    callback = once(callback || noop);
    var index = 0,
        completed = 0,
        length = coll.length;
    if (length === 0) {
        callback(null);
    }

    function iteratorCallback(err, value) {
        if (err) {
            callback(err);
        } else if ((++completed === length) || value === breakLoop) {
            callback(null);
        }
    }

    for (; index < length; index++) {
        iteratee(coll[index], index, onlyOnce(iteratorCallback));
    }
}

// a generic version of eachOf which can handle array, object, and iterator cases.
var eachOfGeneric = doLimit(eachOfLimit, Infinity);

/**
 * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
 * to the iteratee.
 *
 * @name eachOf
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEachOf
 * @category Collection
 * @see [async.each]{@link module:Collections.each}
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each
 * item in `coll`.
 * The `key` is the item's key, or index in the case of an array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
 * var configs = {};
 *
 * async.forEachOf(obj, function (value, key, callback) {
 *     fs.readFile(__dirname + value, "utf8", function (err, data) {
 *         if (err) return callback(err);
 *         try {
 *             configs[key] = JSON.parse(data);
 *         } catch (e) {
 *             return callback(e);
 *         }
 *         callback();
 *     });
 * }, function (err) {
 *     if (err) console.error(err.message);
 *     // configs is now a map of JSON data
 *     doSomethingWith(configs);
 * });
 */
var eachOf = function(coll, iteratee, callback) {
    var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
    eachOfImplementation(coll, wrapAsync(iteratee), callback);
};

function doParallel(fn) {
    return function (obj, iteratee, callback) {
        return fn(eachOf, obj, wrapAsync(iteratee), callback);
    };
}

function _asyncMap(eachfn, arr, iteratee, callback) {
    callback = callback || noop;
    arr = arr || [];
    var results = [];
    var counter = 0;
    var _iteratee = wrapAsync(iteratee);

    eachfn(arr, function (value, _, callback) {
        var index = counter++;
        _iteratee(value, function (err, v) {
            results[index] = v;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Produces a new collection of values by mapping each value in `coll` through
 * the `iteratee` function. The `iteratee` is called with an item from `coll`
 * and a callback for when it has finished processing. Each of these callback
 * takes 2 arguments: an `error`, and the transformed item from `coll`. If
 * `iteratee` passes an error to its callback, the main `callback` (for the
 * `map` function) is immediately called with the error.
 *
 * Note, that since this function applies the `iteratee` to each item in
 * parallel, there is no guarantee that the `iteratee` functions will complete
 * in order. However, the results array will be in the same order as the
 * original `coll`.
 *
 * If `map` is passed an Object, the results will be an Array.  The results
 * will roughly be in the order of the original Objects' keys (but this can
 * vary across JavaScript engines).
 *
 * @name map
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an Array of the
 * transformed items from the `coll`. Invoked with (err, results).
 * @example
 *
 * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
 *     // results is now an array of stats for each file
 * });
 */
var map = doParallel(_asyncMap);

/**
 * Applies the provided arguments to each function in the array, calling
 * `callback` after all functions have completed. If you only provide the first
 * argument, `fns`, then it will return a function which lets you pass in the
 * arguments as if it were a single function call. If more arguments are
 * provided, `callback` is required while `args` is still optional.
 *
 * @name applyEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
 * to all call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument, `fns`, is provided, it will
 * return a function which lets you pass in the arguments as if it were a single
 * function call. The signature is `(..args, callback)`. If invoked with any
 * arguments, `callback` is required.
 * @example
 *
 * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
 *
 * // partial application example:
 * async.each(
 *     buckets,
 *     async.applyEach([enableSearch, updateSchema]),
 *     callback
 * );
 */
var applyEach = applyEach$1(map);

function doParallelLimit(fn) {
    return function (obj, limit, iteratee, callback) {
        return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback);
    };
}

/**
 * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
 *
 * @name mapLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapLimit = doParallelLimit(_asyncMap);

/**
 * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
 *
 * @name mapSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapSeries = doLimit(mapLimit, 1);

/**
 * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
 *
 * @name applyEachSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.applyEach]{@link module:ControlFlow.applyEach}
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
 * call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument is provided, it will return
 * a function which lets you pass in the arguments as if it were a single
 * function call.
 */
var applyEachSeries = applyEach$1(mapSeries);

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new base function.
 */
function createBaseFor(fromRight) {
  return function(object, iteratee, keysFunc) {
    var index = -1,
        iterable = Object(object),
        props = keysFunc(object),
        length = props.length;

    while (length--) {
      var key = props[fromRight ? length : ++index];
      if (iteratee(iterable[key], key, iterable) === false) {
        break;
      }
    }
    return object;
  };
}

/**
 * The base implementation of `baseForOwn` which iterates over `object`
 * properties returned by `keysFunc` and invokes `iteratee` for each property.
 * Iteratee functions may exit iteration early by explicitly returning `false`.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @returns {Object} Returns `object`.
 */
var baseFor = createBaseFor();

/**
 * The base implementation of `_.forOwn` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Object} Returns `object`.
 */
function baseForOwn(object, iteratee) {
  return object && baseFor(object, iteratee, keys);
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.isNaN` without support for number objects.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 */
function baseIsNaN(value) {
  return value !== value;
}

/**
 * A specialized version of `_.indexOf` which performs strict equality
 * comparisons of values, i.e. `===`.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function strictIndexOf(array, value, fromIndex) {
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (array[index] === value) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOf(array, value, fromIndex) {
  return value === value
    ? strictIndexOf(array, value, fromIndex)
    : baseFindIndex(array, baseIsNaN, fromIndex);
}

/**
 * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
 * their requirements. Each function can optionally depend on other functions
 * being completed first, and each function is run as soon as its requirements
 * are satisfied.
 *
 * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
 * will stop. Further tasks will not execute (so any other functions depending
 * on it will not run), and the main `callback` is immediately called with the
 * error.
 *
 * {@link AsyncFunction}s also receive an object containing the results of functions which
 * have completed so far as the first argument, if they have dependencies. If a
 * task function has no dependencies, it will only be passed a callback.
 *
 * @name auto
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Object} tasks - An object. Each of its properties is either a
 * function or an array of requirements, with the {@link AsyncFunction} itself the last item
 * in the array. The object's key of a property serves as the name of the task
 * defined by that property, i.e. can be used when specifying requirements for
 * other tasks. The function receives one or two arguments:
 * * a `results` object, containing the results of the previously executed
 *   functions, only passed if the task has any dependencies,
 * * a `callback(err, result)` function, which must be called when finished,
 *   passing an `error` (which can be `null`) and the result of the function's
 *   execution.
 * @param {number} [concurrency=Infinity] - An optional `integer` for
 * determining the maximum number of tasks that can be run in parallel. By
 * default, as many as possible.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback. Results are always returned; however, if an
 * error occurs, no further `tasks` will be performed, and the results object
 * will only contain partial results. Invoked with (err, results).
 * @returns undefined
 * @example
 *
 * async.auto({
 *     // this function will just be passed a callback
 *     readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
 *     showData: ['readData', function(results, cb) {
 *         // results.readData is the file's contents
 *         // ...
 *     }]
 * }, callback);
 *
 * async.auto({
 *     get_data: function(callback) {
 *         console.log('in get_data');
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         console.log('in make_folder');
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: ['get_data', 'make_folder', function(results, callback) {
 *         console.log('in write_file', JSON.stringify(results));
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(results, callback) {
 *         console.log('in email_link', JSON.stringify(results));
 *         // once the file is written let's email a link to it...
 *         // results.write_file contains the filename returned by write_file.
 *         callback(null, {'file':results.write_file, 'email':'user@example.com'});
 *     }]
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('results = ', results);
 * });
 */
var auto = function (tasks, concurrency, callback) {
    if (typeof concurrency === 'function') {
        // concurrency is optional, shift the args.
        callback = concurrency;
        concurrency = null;
    }
    callback = once(callback || noop);
    var keys$$1 = keys(tasks);
    var numTasks = keys$$1.length;
    if (!numTasks) {
        return callback(null);
    }
    if (!concurrency) {
        concurrency = numTasks;
    }

    var results = {};
    var runningTasks = 0;
    var hasError = false;

    var listeners = Object.create(null);

    var readyTasks = [];

    // for cycle detection:
    var readyToCheck = []; // tasks that have been identified as reachable
    // without the possibility of returning to an ancestor task
    var uncheckedDependencies = {};

    baseForOwn(tasks, function (task, key) {
        if (!isArray(task)) {
            // no dependencies
            enqueueTask(key, [task]);
            readyToCheck.push(key);
            return;
        }

        var dependencies = task.slice(0, task.length - 1);
        var remainingDependencies = dependencies.length;
        if (remainingDependencies === 0) {
            enqueueTask(key, task);
            readyToCheck.push(key);
            return;
        }
        uncheckedDependencies[key] = remainingDependencies;

        arrayEach(dependencies, function (dependencyName) {
            if (!tasks[dependencyName]) {
                throw new Error('async.auto task `' + key +
                    '` has a non-existent dependency `' +
                    dependencyName + '` in ' +
                    dependencies.join(', '));
            }
            addListener(dependencyName, function () {
                remainingDependencies--;
                if (remainingDependencies === 0) {
                    enqueueTask(key, task);
                }
            });
        });
    });

    checkForDeadlocks();
    processQueue();

    function enqueueTask(key, task) {
        readyTasks.push(function () {
            runTask(key, task);
        });
    }

    function processQueue() {
        if (readyTasks.length === 0 && runningTasks === 0) {
            return callback(null, results);
        }
        while(readyTasks.length && runningTasks < concurrency) {
            var run = readyTasks.shift();
            run();
        }

    }

    function addListener(taskName, fn) {
        var taskListeners = listeners[taskName];
        if (!taskListeners) {
            taskListeners = listeners[taskName] = [];
        }

        taskListeners.push(fn);
    }

    function taskComplete(taskName) {
        var taskListeners = listeners[taskName] || [];
        arrayEach(taskListeners, function (fn) {
            fn();
        });
        processQueue();
    }


    function runTask(key, task) {
        if (hasError) return;

        var taskCallback = onlyOnce(function(err, result) {
            runningTasks--;
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            if (err) {
                var safeResults = {};
                baseForOwn(results, function(val, rkey) {
                    safeResults[rkey] = val;
                });
                safeResults[key] = result;
                hasError = true;
                listeners = Object.create(null);

                callback(err, safeResults);
            } else {
                results[key] = result;
                taskComplete(key);
            }
        });

        runningTasks++;
        var taskFn = wrapAsync(task[task.length - 1]);
        if (task.length > 1) {
            taskFn(results, taskCallback);
        } else {
            taskFn(taskCallback);
        }
    }

    function checkForDeadlocks() {
        // Kahn's algorithm
        // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
        // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
        var currentTask;
        var counter = 0;
        while (readyToCheck.length) {
            currentTask = readyToCheck.pop();
            counter++;
            arrayEach(getDependents(currentTask), function (dependent) {
                if (--uncheckedDependencies[dependent] === 0) {
                    readyToCheck.push(dependent);
                }
            });
        }

        if (counter !== numTasks) {
            throw new Error(
                'async.auto cannot execute tasks due to a recursive dependency'
            );
        }
    }

    function getDependents(taskName) {
        var result = [];
        baseForOwn(tasks, function (task, key) {
            if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) {
                result.push(key);
            }
        });
        return result;
    }
};

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && baseGetTag(value) == symbolTag);
}

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined;
var symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isArray(value)) {
    // Recursively convert values (susceptible to call stack limits).
    return arrayMap(value, baseToString) + '';
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}

/**
 * The base implementation of `_.slice` without an iteratee call guard.
 *
 * @private
 * @param {Array} array The array to slice.
 * @param {number} [start=0] The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the slice of `array`.
 */
function baseSlice(array, start, end) {
  var index = -1,
      length = array.length;

  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = end > length ? length : end;
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}

/**
 * Casts `array` to a slice if it's needed.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {number} start The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the cast slice.
 */
function castSlice(array, start, end) {
  var length = array.length;
  end = end === undefined ? length : end;
  return (!start && end >= length) ? array : baseSlice(array, start, end);
}

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the last unmatched string symbol.
 */
function charsEndIndex(strSymbols, chrSymbols) {
  var index = strSymbols.length;

  while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the first unmatched string symbol.
 */
function charsStartIndex(strSymbols, chrSymbols) {
  var index = -1,
      length = strSymbols.length;

  while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Converts an ASCII `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function asciiToArray(string) {
  return string.split('');
}

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

/**
 * Checks if `string` contains Unicode symbols.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
 */
function hasUnicode(string) {
  return reHasUnicode.test(string);
}

/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
var rsZWJ$1 = '\\u200d';

/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?';
var rsOptVar = '[' + rsVarRange$1 + ']?';
var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/**
 * Converts a Unicode `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function unicodeToArray(string) {
  return string.match(reUnicode) || [];
}

/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return hasUnicode(string)
    ? unicodeToArray(string)
    : asciiToArray(string);
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/**
 * Removes leading and trailing whitespace or specified characters from `string`.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category String
 * @param {string} [string=''] The string to trim.
 * @param {string} [chars=whitespace] The characters to trim.
 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
 * @returns {string} Returns the trimmed string.
 * @example
 *
 * _.trim('  abc  ');
 * // => 'abc'
 *
 * _.trim('-_-abc-_-', '_-');
 * // => 'abc'
 *
 * _.map(['  foo  ', '  bar  '], _.trim);
 * // => ['foo', 'bar']
 */
function trim(string, chars, guard) {
  string = toString(string);
  if (string && (guard || chars === undefined)) {
    return string.replace(reTrim, '');
  }
  if (!string || !(chars = baseToString(chars))) {
    return string;
  }
  var strSymbols = stringToArray(string),
      chrSymbols = stringToArray(chars),
      start = charsStartIndex(strSymbols, chrSymbols),
      end = charsEndIndex(strSymbols, chrSymbols) + 1;

  return castSlice(strSymbols, start, end).join('');
}

var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;

function parseParams(func) {
    func = func.toString().replace(STRIP_COMMENTS, '');
    func = func.match(FN_ARGS)[2].replace(' ', '');
    func = func ? func.split(FN_ARG_SPLIT) : [];
    func = func.map(function (arg){
        return trim(arg.replace(FN_ARG, ''));
    });
    return func;
}

/**
 * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
 * tasks are specified as parameters to the function, after the usual callback
 * parameter, with the parameter names matching the names of the tasks it
 * depends on. This can provide even more readable task graphs which can be
 * easier to maintain.
 *
 * If a final callback is specified, the task results are similarly injected,
 * specified as named parameters after the initial error parameter.
 *
 * The autoInject function is purely syntactic sugar and its semantics are
 * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
 *
 * @name autoInject
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.auto]{@link module:ControlFlow.auto}
 * @category Control Flow
 * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
 * the form 'func([dependencies...], callback). The object's key of a property
 * serves as the name of the task defined by that property, i.e. can be used
 * when specifying requirements for other tasks.
 * * The `callback` parameter is a `callback(err, result)` which must be called
 *   when finished, passing an `error` (which can be `null`) and the result of
 *   the function's execution. The remaining parameters name other tasks on
 *   which the task is dependent, and the results from those tasks are the
 *   arguments of those parameters.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback, and a `results` object with any completed
 * task results, similar to `auto`.
 * @example
 *
 * //  The example from `auto` can be rewritten as follows:
 * async.autoInject({
 *     get_data: function(callback) {
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: function(get_data, make_folder, callback) {
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     },
 *     email_link: function(write_file, callback) {
 *         // once the file is written let's email a link to it...
 *         // write_file contains the filename returned by write_file.
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 *
 * // If you are using a JS minifier that mangles parameter names, `autoInject`
 * // will not work with plain functions, since the parameter names will be
 * // collapsed to a single letter identifier.  To work around this, you can
 * // explicitly specify the names of the parameters your task function needs
 * // in an array, similar to Angular.js dependency injection.
 *
 * // This still has an advantage over plain `auto`, since the results a task
 * // depends on are still spread into arguments.
 * async.autoInject({
 *     //...
 *     write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(write_file, callback) {
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }]
 *     //...
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 */
function autoInject(tasks, callback) {
    var newTasks = {};

    baseForOwn(tasks, function (taskFn, key) {
        var params;
        var fnIsAsync = isAsync(taskFn);
        var hasNoDeps =
            (!fnIsAsync && taskFn.length === 1) ||
            (fnIsAsync && taskFn.length === 0);

        if (isArray(taskFn)) {
            params = taskFn.slice(0, -1);
            taskFn = taskFn[taskFn.length - 1];

            newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
        } else if (hasNoDeps) {
            // no dependencies, use the function as-is
            newTasks[key] = taskFn;
        } else {
            params = parseParams(taskFn);
            if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
                throw new Error("autoInject task functions require explicit parameters.");
            }

            // remove callback param
            if (!fnIsAsync) params.pop();

            newTasks[key] = params.concat(newTask);
        }

        function newTask(results, taskCb) {
            var newArgs = arrayMap(params, function (name) {
                return results[name];
            });
            newArgs.push(taskCb);
            wrapAsync(taskFn).apply(null, newArgs);
        }
    });

    auto(newTasks, callback);
}

// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
function DLL() {
    this.head = this.tail = null;
    this.length = 0;
}

function setInitial(dll, node) {
    dll.length = 1;
    dll.head = dll.tail = node;
}

DLL.prototype.removeLink = function(node) {
    if (node.prev) node.prev.next = node.next;
    else this.head = node.next;
    if (node.next) node.next.prev = node.prev;
    else this.tail = node.prev;

    node.prev = node.next = null;
    this.length -= 1;
    return node;
};

DLL.prototype.empty = function () {
    while(this.head) this.shift();
    return this;
};

DLL.prototype.insertAfter = function(node, newNode) {
    newNode.prev = node;
    newNode.next = node.next;
    if (node.next) node.next.prev = newNode;
    else this.tail = newNode;
    node.next = newNode;
    this.length += 1;
};

DLL.prototype.insertBefore = function(node, newNode) {
    newNode.prev = node.prev;
    newNode.next = node;
    if (node.prev) node.prev.next = newNode;
    else this.head = newNode;
    node.prev = newNode;
    this.length += 1;
};

DLL.prototype.unshift = function(node) {
    if (this.head) this.insertBefore(this.head, node);
    else setInitial(this, node);
};

DLL.prototype.push = function(node) {
    if (this.tail) this.insertAfter(this.tail, node);
    else setInitial(this, node);
};

DLL.prototype.shift = function() {
    return this.head && this.removeLink(this.head);
};

DLL.prototype.pop = function() {
    return this.tail && this.removeLink(this.tail);
};

DLL.prototype.toArray = function () {
    var arr = Array(this.length);
    var curr = this.head;
    for(var idx = 0; idx < this.length; idx++) {
        arr[idx] = curr.data;
        curr = curr.next;
    }
    return arr;
};

DLL.prototype.remove = function (testFn) {
    var curr = this.head;
    while(!!curr) {
        var next = curr.next;
        if (testFn(curr)) {
            this.removeLink(curr);
        }
        curr = next;
    }
    return this;
};

function queue(worker, concurrency, payload) {
    if (concurrency == null) {
        concurrency = 1;
    }
    else if(concurrency === 0) {
        throw new Error('Concurrency must not be zero');
    }

    var _worker = wrapAsync(worker);
    var numRunning = 0;
    var workersList = [];

    var processingScheduled = false;
    function _insert(data, insertAtFront, callback) {
        if (callback != null && typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0 && q.idle()) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                callback: callback || noop
            };

            if (insertAtFront) {
                q._tasks.unshift(item);
            } else {
                q._tasks.push(item);
            }
        }

        if (!processingScheduled) {
            processingScheduled = true;
            setImmediate$1(function() {
                processingScheduled = false;
                q.process();
            });
        }
    }

    function _next(tasks) {
        return function(err){
            numRunning -= 1;

            for (var i = 0, l = tasks.length; i < l; i++) {
                var task = tasks[i];

                var index = baseIndexOf(workersList, task, 0);
                if (index === 0) {
                    workersList.shift();
                } else if (index > 0) {
                    workersList.splice(index, 1);
                }

                task.callback.apply(task, arguments);

                if (err != null) {
                    q.error(err, task.data);
                }
            }

            if (numRunning <= (q.concurrency - q.buffer) ) {
                q.unsaturated();
            }

            if (q.idle()) {
                q.drain();
            }
            q.process();
        };
    }

    var isProcessing = false;
    var q = {
        _tasks: new DLL(),
        concurrency: concurrency,
        payload: payload,
        saturated: noop,
        unsaturated:noop,
        buffer: concurrency / 4,
        empty: noop,
        drain: noop,
        error: noop,
        started: false,
        paused: false,
        push: function (data, callback) {
            _insert(data, false, callback);
        },
        kill: function () {
            q.drain = noop;
            q._tasks.empty();
        },
        unshift: function (data, callback) {
            _insert(data, true, callback);
        },
        remove: function (testFn) {
            q._tasks.remove(testFn);
        },
        process: function () {
            // Avoid trying to start too many processing operations. This can occur
            // when callbacks resolve synchronously (#1267).
            if (isProcessing) {
                return;
            }
            isProcessing = true;
            while(!q.paused && numRunning < q.concurrency && q._tasks.length){
                var tasks = [], data = [];
                var l = q._tasks.length;
                if (q.payload) l = Math.min(l, q.payload);
                for (var i = 0; i < l; i++) {
                    var node = q._tasks.shift();
                    tasks.push(node);
                    workersList.push(node);
                    data.push(node.data);
                }

                numRunning += 1;

                if (q._tasks.length === 0) {
                    q.empty();
                }

                if (numRunning === q.concurrency) {
                    q.saturated();
                }

                var cb = onlyOnce(_next(tasks));
                _worker(data, cb);
            }
            isProcessing = false;
        },
        length: function () {
            return q._tasks.length;
        },
        running: function () {
            return numRunning;
        },
        workersList: function () {
            return workersList;
        },
        idle: function() {
            return q._tasks.length + numRunning === 0;
        },
        pause: function () {
            q.paused = true;
        },
        resume: function () {
            if (q.paused === false) { return; }
            q.paused = false;
            setImmediate$1(q.process);
        }
    };
    return q;
}

/**
 * A cargo of tasks for the worker function to complete. Cargo inherits all of
 * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
 * @typedef {Object} CargoObject
 * @memberOf module:ControlFlow
 * @property {Function} length - A function returning the number of items
 * waiting to be processed. Invoke like `cargo.length()`.
 * @property {number} payload - An `integer` for determining how many tasks
 * should be process per round. This property can be changed after a `cargo` is
 * created to alter the payload on-the-fly.
 * @property {Function} push - Adds `task` to the `queue`. The callback is
 * called once the `worker` has finished processing the task. Instead of a
 * single task, an array of `tasks` can be submitted. The respective callback is
 * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
 * @property {Function} saturated - A callback that is called when the
 * `queue.length()` hits the concurrency and further tasks will be queued.
 * @property {Function} empty - A callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - A callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke like `cargo.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
 */

/**
 * Creates a `cargo` object with the specified payload. Tasks added to the
 * cargo will be processed altogether (up to the `payload` limit). If the
 * `worker` is in progress, the task is queued until it becomes available. Once
 * the `worker` has completed some tasks, each callback of those tasks is
 * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
 * for how `cargo` and `queue` work.
 *
 * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
 * at a time, cargo passes an array of tasks to a single worker, repeating
 * when the worker is finished.
 *
 * @name cargo
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An asynchronous function for processing an array
 * of queued tasks. Invoked with `(tasks, callback)`.
 * @param {number} [payload=Infinity] - An optional `integer` for determining
 * how many tasks should be processed per round; if omitted, the default is
 * unlimited.
 * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the cargo and inner queue.
 * @example
 *
 * // create a cargo object with payload 2
 * var cargo = async.cargo(function(tasks, callback) {
 *     for (var i=0; i<tasks.length; i++) {
 *         console.log('hello ' + tasks[i].name);
 *     }
 *     callback();
 * }, 2);
 *
 * // add some items
 * cargo.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * cargo.push({name: 'bar'}, function(err) {
 *     console.log('finished processing bar');
 * });
 * cargo.push({name: 'baz'}, function(err) {
 *     console.log('finished processing baz');
 * });
 */
function cargo(worker, payload) {
    return queue(worker, 1, payload);
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
 *
 * @name eachOfSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Invoked with (err).
 */
var eachOfSeries = doLimit(eachOfLimit, 1);

/**
 * Reduces `coll` into a single value using an async `iteratee` to return each
 * successive step. `memo` is the initial state of the reduction. This function
 * only operates in series.
 *
 * For performance reasons, it may make sense to split a call to this function
 * into a parallel map, and then use the normal `Array.prototype.reduce` on the
 * results. This function is for situations where each step in the reduction
 * needs to be async; if you can get the data before reducing it, then it's
 * probably a good idea to do so.
 *
 * @name reduce
 * @static
 * @memberOf module:Collections
 * @method
 * @alias inject
 * @alias foldl
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 * @example
 *
 * async.reduce([1,2,3], 0, function(memo, item, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         callback(null, memo + item)
 *     });
 * }, function(err, result) {
 *     // result is now equal to the last value of memo, which is 6
 * });
 */
function reduce(coll, memo, iteratee, callback) {
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    eachOfSeries(coll, function(x, i, callback) {
        _iteratee(memo, x, function(err, v) {
            memo = v;
            callback(err);
        });
    }, function(err) {
        callback(err, memo);
    });
}

/**
 * Version of the compose function that is more natural to read. Each function
 * consumes the return value of the previous function. It is the equivalent of
 * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name seq
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.compose]{@link module:ControlFlow.compose}
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} a function that composes the `functions` in order
 * @example
 *
 * // Requires lodash (or underscore), express3 and dresende's orm2.
 * // Part of an app, that fetches cats of the logged user.
 * // This example uses `seq` function to avoid overnesting and error
 * // handling clutter.
 * app.get('/cats', function(request, response) {
 *     var User = request.models.User;
 *     async.seq(
 *         _.bind(User.get, User),  // 'User.get' has signature (id, callback(err, data))
 *         function(user, fn) {
 *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))
 *         }
 *     )(req.session.user_id, function (err, cats) {
 *         if (err) {
 *             console.error(err);
 *             response.json({ status: 'error', message: err.message });
 *         } else {
 *             response.json({ status: 'ok', message: 'Cats found', data: cats });
 *         }
 *     });
 * });
 */
function seq(/*...functions*/) {
    var _functions = arrayMap(arguments, wrapAsync);
    return function(/*...args*/) {
        var args = slice(arguments);
        var that = this;

        var cb = args[args.length - 1];
        if (typeof cb == 'function') {
            args.pop();
        } else {
            cb = noop;
        }

        reduce(_functions, args, function(newargs, fn, cb) {
            fn.apply(that, newargs.concat(function(err/*, ...nextargs*/) {
                var nextargs = slice(arguments, 1);
                cb(err, nextargs);
            }));
        },
        function(err, results) {
            cb.apply(that, [err].concat(results));
        });
    };
}

/**
 * Creates a function which is a composition of the passed asynchronous
 * functions. Each function consumes the return value of the function that
 * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
 * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name compose
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} an asynchronous function that is the composed
 * asynchronous `functions`
 * @example
 *
 * function add1(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n + 1);
 *     }, 10);
 * }
 *
 * function mul3(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n * 3);
 *     }, 10);
 * }
 *
 * var add1mul3 = async.compose(mul3, add1);
 * add1mul3(4, function (err, result) {
 *     // result now equals 15
 * });
 */
var compose = function(/*...args*/) {
    return seq.apply(null, slice(arguments).reverse());
};

var _concat = Array.prototype.concat;

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
 *
 * @name concatLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err /*, ...args*/) {
            if (err) return callback(err);
            return callback(null, slice(arguments, 1));
        });
    }, function(err, mapResults) {
        var result = [];
        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                result = _concat.apply(result, mapResults[i]);
            }
        }

        return callback(err, result);
    });
};

/**
 * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
 * the concatenated list. The `iteratee`s are called in parallel, and the
 * results are concatenated as they return. There is no guarantee that the
 * results array will be returned in the original order of `coll` passed to the
 * `iteratee` function.
 *
 * @name concat
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 * @example
 *
 * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
 *     // files is now a list of filenames that exist in the 3 directories
 * });
 */
var concat = doLimit(concatLimit, Infinity);

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
 *
 * @name concatSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
 * The iteratee should complete with an array an array of results.
 * Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatSeries = doLimit(concatLimit, 1);

/**
 * Returns a function that when called, calls-back with the values provided.
 * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
 * [`auto`]{@link module:ControlFlow.auto}.
 *
 * @name constant
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {...*} arguments... - Any number of arguments to automatically invoke
 * callback with.
 * @returns {AsyncFunction} Returns a function that when invoked, automatically
 * invokes the callback with the previous given arguments.
 * @example
 *
 * async.waterfall([
 *     async.constant(42),
 *     function (value, next) {
 *         // value === 42
 *     },
 *     //...
 * ], callback);
 *
 * async.waterfall([
 *     async.constant(filename, "utf8"),
 *     fs.readFile,
 *     function (fileData, next) {
 *         //...
 *     }
 *     //...
 * ], callback);
 *
 * async.auto({
 *     hostname: async.constant("https://server.net/"),
 *     port: findFreePort,
 *     launchServer: ["hostname", "port", function (options, cb) {
 *         startServer(options, cb);
 *     }],
 *     //...
 * }, callback);
 */
var constant = function(/*...values*/) {
    var values = slice(arguments);
    var args = [null].concat(values);
    return function (/*...ignoredArgs, callback*/) {
        var callback = arguments[arguments.length - 1];
        return callback.apply(this, args);
    };
};

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

function _createTester(check, getResult) {
    return function(eachfn, arr, iteratee, cb) {
        cb = cb || noop;
        var testPassed = false;
        var testResult;
        eachfn(arr, function(value, _, callback) {
            iteratee(value, function(err, result) {
                if (err) {
                    callback(err);
                } else if (check(result) && !testResult) {
                    testPassed = true;
                    testResult = getResult(true, value);
                    callback(null, breakLoop);
                } else {
                    callback();
                }
            });
        }, function(err) {
            if (err) {
                cb(err);
            } else {
                cb(null, testPassed ? testResult : getResult(false));
            }
        });
    };
}

function _findGetResult(v, x) {
    return x;
}

/**
 * Returns the first value in `coll` that passes an async truth test. The
 * `iteratee` is applied in parallel, meaning the first iteratee to return
 * `true` will fire the detect `callback` with that result. That means the
 * result might not be the first item in the original `coll` (in terms of order)
 * that passes the test.

 * If order within the original `coll` is important, then look at
 * [`detectSeries`]{@link module:Collections.detectSeries}.
 *
 * @name detect
 * @static
 * @memberOf module:Collections
 * @method
 * @alias find
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 * @example
 *
 * async.detect(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // result now equals the first file in the list that exists
 * });
 */
var detect = doParallel(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name detectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findLimit
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectLimit = doParallelLimit(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
 *
 * @name detectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findSeries
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectSeries = doLimit(detectLimit, 1);

function consoleFunc(name) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        args.push(function (err/*, ...args*/) {
            var args = slice(arguments, 1);
            if (typeof console === 'object') {
                if (err) {
                    if (console.error) {
                        console.error(err);
                    }
                } else if (console[name]) {
                    arrayEach(args, function (x) {
                        console[name](x);
                    });
                }
            }
        });
        wrapAsync(fn).apply(null, args);
    };
}

/**
 * Logs the result of an [`async` function]{@link AsyncFunction} to the
 * `console` using `console.dir` to display the properties of the resulting object.
 * Only works in Node.js or in browsers that support `console.dir` and
 * `console.error` (such as FF and Chrome).
 * If multiple arguments are returned from the async function,
 * `console.dir` is called on each argument in order.
 *
 * @name dir
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, {hello: name});
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.dir(hello, 'world');
 * {hello: 'world'}
 */
var dir = consoleFunc('dir');

/**
 * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
 * the order of operations, the arguments `test` and `fn` are switched.
 *
 * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
 * @name doDuring
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.during]{@link module:ControlFlow.during}
 * @category Control Flow
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (...args, callback), where `...args` are the
 * non-error args from the previous callback of `fn`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error if one occurred, otherwise `null`.
 */
function doDuring(fn, test, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        args.push(check);
        _test.apply(this, args);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    check(null, true);

}

/**
 * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
 * the order of operations, the arguments `test` and `iteratee` are switched.
 *
 * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
 *
 * @name doWhilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - A function which is called each time `test`
 * passes. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped.
 * `callback` will be passed an error and any arguments passed to the final
 * `iteratee`'s callback. Invoked with (err, [results]);
 */
function doWhilst(iteratee, test, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        if (test.apply(this, args)) return _iteratee(next);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
 * argument ordering differs from `until`.
 *
 * @name doUntil
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function doUntil(iteratee, test, callback) {
    doWhilst(iteratee, function() {
        return !test.apply(this, arguments);
    }, callback);
}

/**
 * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
 * is passed a callback in the form of `function (err, truth)`. If error is
 * passed to `test` or `fn`, the main callback is immediately called with the
 * value of the error.
 *
 * @name during
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (callback).
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error, if one occurred, otherwise `null`.
 * @example
 *
 * var count = 0;
 *
 * async.during(
 *     function (callback) {
 *         return callback(null, count < 5);
 *     },
 *     function (callback) {
 *         count++;
 *         setTimeout(callback, 1000);
 *     },
 *     function (err) {
 *         // 5 seconds have passed
 *     }
 * );
 */
function during(test, fn, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err) {
        if (err) return callback(err);
        _test(check);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    _test(check);
}

function _withoutIndex(iteratee) {
    return function (value, index, callback) {
        return iteratee(value, callback);
    };
}

/**
 * Applies the function `iteratee` to each item in `coll`, in parallel.
 * The `iteratee` is called with an item from the list, and a callback for when
 * it has finished. If the `iteratee` passes an error to its `callback`, the
 * main `callback` (for the `each` function) is immediately called with the
 * error.
 *
 * Note, that since this function applies `iteratee` to each item in parallel,
 * there is no guarantee that the iteratee functions will complete in order.
 *
 * @name each
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEach
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to
 * each item in `coll`. Invoked with (item, callback).
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOf`.
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * // assuming openFiles is an array of file names and saveFile is a function
 * // to save the modified contents of that file:
 *
 * async.each(openFiles, saveFile, function(err){
 *   // if any of the saves produced an error, err would equal that error
 * });
 *
 * // assuming openFiles is an array of file names
 * async.each(openFiles, function(file, callback) {
 *
 *     // Perform operation on file here.
 *     console.log('Processing file ' + file);
 *
 *     if( file.length > 32 ) {
 *       console.log('This file name is too long');
 *       callback('File name too long');
 *     } else {
 *       // Do work to process file here
 *       console.log('File processed');
 *       callback();
 *     }
 * }, function(err) {
 *     // if any of the file processing produced an error, err would equal that error
 *     if( err ) {
 *       // One of the iterations produced an error.
 *       // All processing will now stop.
 *       console.log('A file failed to process');
 *     } else {
 *       console.log('All files have been processed successfully');
 *     }
 * });
 */
function eachLimit(coll, iteratee, callback) {
    eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
 *
 * @name eachLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfLimit`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachLimit$1(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
 *
 * @name eachSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfSeries`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
var eachSeries = doLimit(eachLimit$1, 1);

/**
 * Wrap an async function and ensure it calls its callback on a later tick of
 * the event loop.  If the function already calls its callback on a next tick,
 * no extra deferral is added. This is useful for preventing stack overflows
 * (`RangeError: Maximum call stack size exceeded`) and generally keeping
 * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
 * contained. ES2017 `async` functions are returned as-is -- they are immune
 * to Zalgo's corrupting influences, as they always resolve on a later tick.
 *
 * @name ensureAsync
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - an async function, one that expects a node-style
 * callback as its last argument.
 * @returns {AsyncFunction} Returns a wrapped function with the exact same call
 * signature as the function passed in.
 * @example
 *
 * function sometimesAsync(arg, callback) {
 *     if (cache[arg]) {
 *         return callback(null, cache[arg]); // this would be synchronous!!
 *     } else {
 *         doSomeIO(arg, callback); // this IO would be asynchronous
 *     }
 * }
 *
 * // this has a risk of stack overflows if many results are cached in a row
 * async.mapSeries(args, sometimesAsync, done);
 *
 * // this will defer sometimesAsync's callback if necessary,
 * // preventing stack overflows
 * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
 */
function ensureAsync(fn) {
    if (isAsync(fn)) return fn;
    return initialParams(function (args, callback) {
        var sync = true;
        args.push(function () {
            var innerArgs = arguments;
            if (sync) {
                setImmediate$1(function () {
                    callback.apply(null, innerArgs);
                });
            } else {
                callback.apply(null, innerArgs);
            }
        });
        fn.apply(this, args);
        sync = false;
    });
}

function notId(v) {
    return !v;
}

/**
 * Returns `true` if every element in `coll` satisfies an async test. If any
 * iteratee call returns `false`, the main `callback` is immediately called.
 *
 * @name every
 * @static
 * @memberOf module:Collections
 * @method
 * @alias all
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 * @example
 *
 * async.every(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then every file exists
 * });
 */
var every = doParallel(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
 *
 * @name everyLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everyLimit = doParallelLimit(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
 *
 * @name everySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in series.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everySeries = doLimit(everyLimit, 1);

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function(object) {
    return object == null ? undefined : object[key];
  };
}

function filterArray(eachfn, arr, iteratee, callback) {
    var truthValues = new Array(arr.length);
    eachfn(arr, function (x, index, callback) {
        iteratee(x, function (err, v) {
            truthValues[index] = !!v;
            callback(err);
        });
    }, function (err) {
        if (err) return callback(err);
        var results = [];
        for (var i = 0; i < arr.length; i++) {
            if (truthValues[i]) results.push(arr[i]);
        }
        callback(null, results);
    });
}

function filterGeneric(eachfn, coll, iteratee, callback) {
    var results = [];
    eachfn(coll, function (x, index, callback) {
        iteratee(x, function (err, v) {
            if (err) {
                callback(err);
            } else {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            }
        });
    }, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null, arrayMap(results.sort(function (a, b) {
                return a.index - b.index;
            }), baseProperty('value')));
        }
    });
}

function _filter(eachfn, coll, iteratee, callback) {
    var filter = isArrayLike(coll) ? filterArray : filterGeneric;
    filter(eachfn, coll, wrapAsync(iteratee), callback || noop);
}

/**
 * Returns a new array of all the values in `coll` which pass an async truth
 * test. This operation is performed in parallel, but the results array will be
 * in the same order as the original.
 *
 * @name filter
 * @static
 * @memberOf module:Collections
 * @method
 * @alias select
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.filter(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of the existing files
 * });
 */
var filter = doParallel(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name filterLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var filterLimit = doParallelLimit(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
 *
 * @name filterSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results)
 */
var filterSeries = doLimit(filterLimit, 1);

/**
 * Calls the asynchronous function `fn` with a callback parameter that allows it
 * to call itself again, in series, indefinitely.

 * If an error is passed to the callback then `errback` is called with the
 * error, and execution stops, otherwise it will never be called.
 *
 * @name forever
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} fn - an async function to call repeatedly.
 * Invoked with (next).
 * @param {Function} [errback] - when `fn` passes an error to it's callback,
 * this function will be called, and execution stops. Invoked with (err).
 * @example
 *
 * async.forever(
 *     function(next) {
 *         // next is suitable for passing to things that need a callback(err [, whatever]);
 *         // it will result in this function being called again.
 *     },
 *     function(err) {
 *         // if next is called with a value in its first parameter, it will appear
 *         // in here as 'err', and execution will stop.
 *     }
 * );
 */
function forever(fn, errback) {
    var done = onlyOnce(errback || noop);
    var task = wrapAsync(ensureAsync(fn));

    function next(err) {
        if (err) return done(err);
        task(next);
    }
    next();
}

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
 *
 * @name groupByLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupByLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err, key) {
            if (err) return callback(err);
            return callback(null, {key: key, val: val});
        });
    }, function(err, mapResults) {
        var result = {};
        // from MDN, handle object having an `hasOwnProperty` prop
        var hasOwnProperty = Object.prototype.hasOwnProperty;

        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                var key = mapResults[i].key;
                var val = mapResults[i].val;

                if (hasOwnProperty.call(result, key)) {
                    result[key].push(val);
                } else {
                    result[key] = [val];
                }
            }
        }

        return callback(err, result);
    });
};

/**
 * Returns a new object, where each value corresponds to an array of items, from
 * `coll`, that returned the corresponding key. That is, the keys of the object
 * correspond to the values passed to the `iteratee` callback.
 *
 * Note: Since this function applies the `iteratee` to each item in parallel,
 * there is no guarantee that the `iteratee` functions will complete in order.
 * However, the values for each key in the `result` will be in the same order as
 * the original `coll`. For Objects, the values will roughly be in the order of
 * the original Objects' keys (but this can vary across JavaScript engines).
 *
 * @name groupBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 * @example
 *
 * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
 *     db.findById(userId, function(err, user) {
 *         if (err) return callback(err);
 *         return callback(null, user.age);
 *     });
 * }, function(err, result) {
 *     // result is object containing the userIds grouped by age
 *     // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
 * });
 */
var groupBy = doLimit(groupByLimit, Infinity);

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
 *
 * @name groupBySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupBySeries = doLimit(groupByLimit, 1);

/**
 * Logs the result of an `async` function to the `console`. Only works in
 * Node.js or in browsers that support `console.log` and `console.error` (such
 * as FF and Chrome). If multiple arguments are returned from the async
 * function, `console.log` is called on each argument in order.
 *
 * @name log
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, 'hello ' + name);
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.log(hello, 'world');
 * 'hello world'
 */
var log = consoleFunc('log');

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name mapValuesLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
function mapValuesLimit(obj, limit, iteratee, callback) {
    callback = once(callback || noop);
    var newObj = {};
    var _iteratee = wrapAsync(iteratee);
    eachOfLimit(obj, limit, function(val, key, next) {
        _iteratee(val, key, function (err, result) {
            if (err) return next(err);
            newObj[key] = result;
            next();
        });
    }, function (err) {
        callback(err, newObj);
    });
}

/**
 * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
 *
 * Produces a new Object by mapping each value of `obj` through the `iteratee`
 * function. The `iteratee` is called each `value` and `key` from `obj` and a
 * callback for when it has finished processing. Each of these callbacks takes
 * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
 * passes an error to its callback, the main `callback` (for the `mapValues`
 * function) is immediately called with the error.
 *
 * Note, the order of the keys in the result is not guaranteed.  The keys will
 * be roughly in the order they complete, (but this is very engine-specific)
 *
 * @name mapValues
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 * @example
 *
 * async.mapValues({
 *     f1: 'file1',
 *     f2: 'file2',
 *     f3: 'file3'
 * }, function (file, key, callback) {
 *   fs.stat(file, callback);
 * }, function(err, result) {
 *     // result is now a map of stats for each file, e.g.
 *     // {
 *     //     f1: [stats for file1],
 *     //     f2: [stats for file2],
 *     //     f3: [stats for file3]
 *     // }
 * });
 */

var mapValues = doLimit(mapValuesLimit, Infinity);

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
 *
 * @name mapValuesSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
var mapValuesSeries = doLimit(mapValuesLimit, 1);

function has(obj, key) {
    return key in obj;
}

/**
 * Caches the results of an async function. When creating a hash to store
 * function results against, the callback is omitted from the hash and an
 * optional hash function can be used.
 *
 * If no hash function is specified, the first argument is used as a hash key,
 * which may work reasonably if it is a string or a data type that converts to a
 * distinct string. Note that objects and arrays will not behave reasonably.
 * Neither will cases where the other arguments are significant. In such cases,
 * specify your own hash function.
 *
 * The cache of results is exposed as the `memo` property of the function
 * returned by `memoize`.
 *
 * @name memoize
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function to proxy and cache results from.
 * @param {Function} hasher - An optional function for generating a custom hash
 * for storing results. It has all the arguments applied to it apart from the
 * callback, and must be synchronous.
 * @returns {AsyncFunction} a memoized version of `fn`
 * @example
 *
 * var slow_fn = function(name, callback) {
 *     // do something
 *     callback(null, result);
 * };
 * var fn = async.memoize(slow_fn);
 *
 * // fn can now be used as if it were slow_fn
 * fn('some name', function() {
 *     // callback
 * });
 */
function memoize(fn, hasher) {
    var memo = Object.create(null);
    var queues = Object.create(null);
    hasher = hasher || identity;
    var _fn = wrapAsync(fn);
    var memoized = initialParams(function memoized(args, callback) {
        var key = hasher.apply(null, args);
        if (has(memo, key)) {
            setImmediate$1(function() {
                callback.apply(null, memo[key]);
            });
        } else if (has(queues, key)) {
            queues[key].push(callback);
        } else {
            queues[key] = [callback];
            _fn.apply(null, args.concat(function(/*args*/) {
                var args = slice(arguments);
                memo[key] = args;
                var q = queues[key];
                delete queues[key];
                for (var i = 0, l = q.length; i < l; i++) {
                    q[i].apply(null, args);
                }
            }));
        }
    });
    memoized.memo = memo;
    memoized.unmemoized = fn;
    return memoized;
}

/**
 * Calls `callback` on a later loop around the event loop. In Node.js this just
 * calls `process.nextTick`.  In the browser it will use `setImmediate` if
 * available, otherwise `setTimeout(callback, 0)`, which means other higher
 * priority events may precede the execution of `callback`.
 *
 * This is used internally for browser-compatibility purposes.
 *
 * @name nextTick
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.setImmediate]{@link module:Utils.setImmediate}
 * @category Util
 * @param {Function} callback - The function to call on a later loop around
 * the event loop. Invoked with (args...).
 * @param {...*} args... - any number of additional arguments to pass to the
 * callback on the next tick.
 * @example
 *
 * var call_order = [];
 * async.nextTick(function() {
 *     call_order.push('two');
 *     // call_order now equals ['one','two']
 * });
 * call_order.push('one');
 *
 * async.setImmediate(function (a, b, c) {
 *     // a, b, and c equal 1, 2, and 3
 * }, 1, 2, 3);
 */
var _defer$1;

if (hasNextTick) {
    _defer$1 = process.nextTick;
} else if (hasSetImmediate) {
    _defer$1 = setImmediate;
} else {
    _defer$1 = fallback;
}

var nextTick = wrap(_defer$1);

function _parallel(eachfn, tasks, callback) {
    callback = callback || noop;
    var results = isArrayLike(tasks) ? [] : {};

    eachfn(tasks, function (task, key, callback) {
        wrapAsync(task)(function (err, result) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            results[key] = result;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Run the `tasks` collection of functions in parallel, without waiting until
 * the previous function has completed. If any of the functions pass an error to
 * its callback, the main `callback` is immediately called with the value of the
 * error. Once the `tasks` have completed, the results are passed to the final
 * `callback` as an array.
 *
 * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
 * parallel execution of code.  If your tasks do not use any timers or perform
 * any I/O, they will actually be executed in series.  Any synchronous setup
 * sections for each task will happen one after the other.  JavaScript remains
 * single-threaded.
 *
 * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
 * execution of other tasks when a task fails.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 * results from {@link async.parallel}.
 *
 * @name parallel
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 *
 * @example
 * async.parallel([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // the results array will equal ['one','two'] even though
 *     // the second function had a shorter timeout.
 * });
 *
 * // an example using an object instead of an array
 * async.parallel({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equals to: {one: 1, two: 2}
 * });
 */
function parallelLimit(tasks, callback) {
    _parallel(eachOf, tasks, callback);
}

/**
 * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name parallelLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.parallel]{@link module:ControlFlow.parallel}
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 */
function parallelLimit$1(tasks, limit, callback) {
    _parallel(_eachOfLimit(limit), tasks, callback);
}

/**
 * A queue of tasks for the worker function to complete.
 * @typedef {Object} QueueObject
 * @memberOf module:ControlFlow
 * @property {Function} length - a function returning the number of items
 * waiting to be processed. Invoke with `queue.length()`.
 * @property {boolean} started - a boolean indicating whether or not any
 * items have been pushed and processed by the queue.
 * @property {Function} running - a function returning the number of items
 * currently being processed. Invoke with `queue.running()`.
 * @property {Function} workersList - a function returning the array of items
 * currently being processed. Invoke with `queue.workersList()`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke with `queue.idle()`.
 * @property {number} concurrency - an integer for determining how many `worker`
 * functions should be run in parallel. This property can be changed after a
 * `queue` is created to alter the concurrency on-the-fly.
 * @property {Function} push - add a new task to the `queue`. Calls `callback`
 * once the `worker` has finished processing the task. Instead of a single task,
 * a `tasks` array can be submitted. The respective callback is used for every
 * task in the list. Invoke with `queue.push(task, [callback])`,
 * @property {Function} unshift - add a new task to the front of the `queue`.
 * Invoke with `queue.unshift(task, [callback])`.
 * @property {Function} remove - remove items from the queue that match a test
 * function.  The test function will be passed an object with a `data` property,
 * and a `priority` property, if this is a
 * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
 * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
 * `function ({data, priority}) {}` and returns a Boolean.
 * @property {Function} saturated - a callback that is called when the number of
 * running workers hits the `concurrency` limit, and further tasks will be
 * queued.
 * @property {Function} unsaturated - a callback that is called when the number
 * of running workers is less than the `concurrency` & `buffer` limits, and
 * further tasks will not be queued.
 * @property {number} buffer - A minimum threshold buffer in order to say that
 * the `queue` is `unsaturated`.
 * @property {Function} empty - a callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - a callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} error - a callback that is called when a task errors.
 * Has the signature `function(error, task)`.
 * @property {boolean} paused - a boolean for determining whether the queue is
 * in a paused state.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke with `queue.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke with `queue.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. No more tasks
 * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
 */

/**
 * Creates a `queue` object with the specified `concurrency`. Tasks added to the
 * `queue` are processed in parallel (up to the `concurrency` limit). If all
 * `worker`s are in progress, the task is queued until one becomes available.
 * Once a `worker` completes a `task`, that `task`'s callback is called.
 *
 * @name queue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`. Invoked with (task, callback).
 * @param {number} [concurrency=1] - An `integer` for determining how many
 * `worker` functions should be run in parallel.  If omitted, the concurrency
 * defaults to `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the queue.
 * @example
 *
 * // create a queue object with concurrency 2
 * var q = async.queue(function(task, callback) {
 *     console.log('hello ' + task.name);
 *     callback();
 * }, 2);
 *
 * // assign a callback
 * q.drain = function() {
 *     console.log('all items have been processed');
 * };
 *
 * // add some items to the queue
 * q.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * q.push({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 *
 * // add some items to the queue (batch-wise)
 * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
 *     console.log('finished processing item');
 * });
 *
 * // add some items to the front of the queue
 * q.unshift({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 */
var queue$1 = function (worker, concurrency) {
    var _worker = wrapAsync(worker);
    return queue(function (items, cb) {
        _worker(items[0], cb);
    }, concurrency, 1);
};

/**
 * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
 * completed in ascending priority order.
 *
 * @name priorityQueue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`.
 * Invoked with (task, callback).
 * @param {number} concurrency - An `integer` for determining how many `worker`
 * functions should be run in parallel.  If omitted, the concurrency defaults to
 * `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
 * differences between `queue` and `priorityQueue` objects:
 * * `push(task, priority, [callback])` - `priority` should be a number. If an
 *   array of `tasks` is given, all tasks will be assigned the same priority.
 * * The `unshift` method was removed.
 */
var priorityQueue = function(worker, concurrency) {
    // Start with a normal queue
    var q = queue$1(worker, concurrency);

    // Override push to accept second parameter representing priority
    q.push = function(data, priority, callback) {
        if (callback == null) callback = noop;
        if (typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        priority = priority || 0;
        var nextNode = q._tasks.head;
        while (nextNode && priority >= nextNode.priority) {
            nextNode = nextNode.next;
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                priority: priority,
                callback: callback
            };

            if (nextNode) {
                q._tasks.insertBefore(nextNode, item);
            } else {
                q._tasks.push(item);
            }
        }
        setImmediate$1(q.process);
    };

    // Remove unshift function
    delete q.unshift;

    return q;
};

/**
 * Runs the `tasks` array of functions in parallel, without waiting until the
 * previous function has completed. Once any of the `tasks` complete or pass an
 * error to its callback, the main `callback` is immediately called. It's
 * equivalent to `Promise.race()`.
 *
 * @name race
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
 * to run. Each function can complete with an optional `result` value.
 * @param {Function} callback - A callback to run once any of the functions have
 * completed. This function gets an error or result from the first function that
 * completed. Invoked with (err, result).
 * @returns undefined
 * @example
 *
 * async.race([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // main callback
 * function(err, result) {
 *     // the result will be equal to 'two' as it finishes earlier
 * });
 */
function race(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
    if (!tasks.length) return callback();
    for (var i = 0, l = tasks.length; i < l; i++) {
        wrapAsync(tasks[i])(callback);
    }
}

/**
 * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
 *
 * @name reduceRight
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reduce]{@link module:Collections.reduce}
 * @alias foldr
 * @category Collection
 * @param {Array} array - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 */
function reduceRight (array, memo, iteratee, callback) {
    var reversed = slice(array).reverse();
    reduce(reversed, memo, iteratee, callback);
}

/**
 * Wraps the async function in another function that always completes with a
 * result object, even when it errors.
 *
 * The result object has either the property `error` or `value`.
 *
 * @name reflect
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function you want to wrap
 * @returns {Function} - A function that always passes null to it's callback as
 * the error. The second argument to the callback will be an `object` with
 * either an `error` or a `value` property.
 * @example
 *
 * async.parallel([
 *     async.reflect(function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff but error ...
 *         callback('bad stuff happened');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     })
 * ],
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = 'bad stuff happened'
 *     // results[2].value = 'two'
 * });
 */
function reflect(fn) {
    var _fn = wrapAsync(fn);
    return initialParams(function reflectOn(args, reflectCallback) {
        args.push(function callback(error, cbArg) {
            if (error) {
                reflectCallback(null, { error: error });
            } else {
                var value;
                if (arguments.length <= 2) {
                    value = cbArg;
                } else {
                    value = slice(arguments, 1);
                }
                reflectCallback(null, { value: value });
            }
        });

        return _fn.apply(this, args);
    });
}

/**
 * A helper function that wraps an array or an object of functions with `reflect`.
 *
 * @name reflectAll
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.reflect]{@link module:Utils.reflect}
 * @category Util
 * @param {Array|Object|Iterable} tasks - The collection of
 * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
 * @returns {Array} Returns an array of async functions, each wrapped in
 * `async.reflect`
 * @example
 *
 * let tasks = [
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         // do some more stuff but error ...
 *         callback(new Error('bad stuff happened'));
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ];
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = Error('bad stuff happened')
 *     // results[2].value = 'two'
 * });
 *
 * // an example using an object instead of an array
 * let tasks = {
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         callback('two');
 *     },
 *     three: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'three');
 *         }, 100);
 *     }
 * };
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results.one.value = 'one'
 *     // results.two.error = 'two'
 *     // results.three.value = 'three'
 * });
 */
function reflectAll(tasks) {
    var results;
    if (isArray(tasks)) {
        results = arrayMap(tasks, reflect);
    } else {
        results = {};
        baseForOwn(tasks, function(task, key) {
            results[key] = reflect.call(this, task);
        });
    }
    return results;
}

function reject$1(eachfn, arr, iteratee, callback) {
    _filter(eachfn, arr, function(value, cb) {
        iteratee(value, function(err, v) {
            cb(err, !v);
        });
    }, callback);
}

/**
 * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
 *
 * @name reject
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.reject(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of missing files
 *     createFiles(results);
 * });
 */
var reject = doParallel(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name rejectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectLimit = doParallelLimit(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
 *
 * @name rejectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectSeries = doLimit(rejectLimit, 1);

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant$1(value) {
  return function() {
    return value;
  };
}

/**
 * Attempts to get a successful response from `task` no more than `times` times
 * before returning an error. If the task is successful, the `callback` will be
 * passed the result of the successful task. If all attempts fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name retry
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @see [async.retryable]{@link module:ControlFlow.retryable}
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
 * object with `times` and `interval` or a number.
 * * `times` - The number of attempts to make before giving up.  The default
 *   is `5`.
 * * `interval` - The time to wait between retries, in milliseconds.  The
 *   default is `0`. The interval may also be specified as a function of the
 *   retry count (see example).
 * * `errorFilter` - An optional synchronous function that is invoked on
 *   erroneous result. If it returns `true` the retry attempts will continue;
 *   if the function returns `false` the retry flow is aborted with the current
 *   attempt's error and result being returned to the final callback.
 *   Invoked with (err).
 * * If `opts` is a number, the number specifies the number of times to retry,
 *   with the default interval of `0`.
 * @param {AsyncFunction} task - An async function to retry.
 * Invoked with (callback).
 * @param {Function} [callback] - An optional callback which is called when the
 * task has succeeded, or after the final failed attempt. It receives the `err`
 * and `result` arguments of the last attempt at completing the `task`. Invoked
 * with (err, results).
 *
 * @example
 *
 * // The `retry` function can be used as a stand-alone control flow by passing
 * // a callback, as shown below:
 *
 * // try calling apiMethod 3 times
 * async.retry(3, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 3 times, waiting 200 ms between each retry
 * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 10 times with exponential backoff
 * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
 * async.retry({
 *   times: 10,
 *   interval: function(retryCount) {
 *     return 50 * Math.pow(2, retryCount);
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod the default 5 times no delay between each retry
 * async.retry(apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod only when error condition satisfies, all other
 * // errors will abort the retry control flow and return to final callback
 * async.retry({
 *   errorFilter: function(err) {
 *     return err.message === 'Temporary error'; // only retry on a specific error
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // to retry individual methods that are not as reliable within other
 * // control flow functions, use the `retryable` wrapper:
 * async.auto({
 *     users: api.getUsers.bind(api),
 *     payments: async.retryable(3, api.getPayments.bind(api))
 * }, function(err, results) {
 *     // do something with the results
 * });
 *
 */
function retry(opts, task, callback) {
    var DEFAULT_TIMES = 5;
    var DEFAULT_INTERVAL = 0;

    var options = {
        times: DEFAULT_TIMES,
        intervalFunc: constant$1(DEFAULT_INTERVAL)
    };

    function parseTimes(acc, t) {
        if (typeof t === 'object') {
            acc.times = +t.times || DEFAULT_TIMES;

            acc.intervalFunc = typeof t.interval === 'function' ?
                t.interval :
                constant$1(+t.interval || DEFAULT_INTERVAL);

            acc.errorFilter = t.errorFilter;
        } else if (typeof t === 'number' || typeof t === 'string') {
            acc.times = +t || DEFAULT_TIMES;
        } else {
            throw new Error("Invalid arguments for async.retry");
        }
    }

    if (arguments.length < 3 && typeof opts === 'function') {
        callback = task || noop;
        task = opts;
    } else {
        parseTimes(options, opts);
        callback = callback || noop;
    }

    if (typeof task !== 'function') {
        throw new Error("Invalid arguments for async.retry");
    }

    var _task = wrapAsync(task);

    var attempt = 1;
    function retryAttempt() {
        _task(function(err) {
            if (err && attempt++ < options.times &&
                (typeof options.errorFilter != 'function' ||
                    options.errorFilter(err))) {
                setTimeout(retryAttempt, options.intervalFunc(attempt));
            } else {
                callback.apply(null, arguments);
            }
        });
    }

    retryAttempt();
}

/**
 * A close relative of [`retry`]{@link module:ControlFlow.retry}.  This method
 * wraps a task and makes it retryable, rather than immediately calling it
 * with retries.
 *
 * @name retryable
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.retry]{@link module:ControlFlow.retry}
 * @category Control Flow
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
 * options, exactly the same as from `retry`
 * @param {AsyncFunction} task - the asynchronous function to wrap.
 * This function will be passed any arguments passed to the returned wrapper.
 * Invoked with (...args, callback).
 * @returns {AsyncFunction} The wrapped function, which when invoked, will
 * retry on an error, based on the parameters specified in `opts`.
 * This function will accept the same parameters as `task`.
 * @example
 *
 * async.auto({
 *     dep1: async.retryable(3, getFromFlakyService),
 *     process: ["dep1", async.retryable(3, function (results, cb) {
 *         maybeProcessData(results.dep1, cb);
 *     })]
 * }, callback);
 */
var retryable = function (opts, task) {
    if (!task) {
        task = opts;
        opts = null;
    }
    var _task = wrapAsync(task);
    return initialParams(function (args, callback) {
        function taskFn(cb) {
            _task.apply(null, args.concat(cb));
        }

        if (opts) retry(opts, taskFn, callback);
        else retry(taskFn, callback);

    });
};

/**
 * Run the functions in the `tasks` collection in series, each one running once
 * the previous function has completed. If any functions in the series pass an
 * error to its callback, no more functions are run, and `callback` is
 * immediately called with the value of the error. Otherwise, `callback`
 * receives an array of results when `tasks` have completed.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function, and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 *  results from {@link async.series}.
 *
 * **Note** that while many implementations preserve the order of object
 * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
 * explicitly states that
 *
 * > The mechanics and order of enumerating the properties is not specified.
 *
 * So if you rely on the order in which your series of functions are executed,
 * and want this to work on all platforms, consider using an array.
 *
 * @name series
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing
 * [async functions]{@link AsyncFunction} to run in series.
 * Each function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This function gets a results array (or object)
 * containing all the result arguments passed to the `task` callbacks. Invoked
 * with (err, result).
 * @example
 * async.series([
 *     function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     },
 *     function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // results is now equal to ['one', 'two']
 * });
 *
 * async.series({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback){
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equal to: {one: 1, two: 2}
 * });
 */
function series(tasks, callback) {
    _parallel(eachOfSeries, tasks, callback);
}

/**
 * Returns `true` if at least one element in the `coll` satisfies an async test.
 * If any iteratee call returns `true`, the main `callback` is immediately
 * called.
 *
 * @name some
 * @static
 * @memberOf module:Collections
 * @method
 * @alias any
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 * @example
 *
 * async.some(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then at least one of the files exists
 * });
 */
var some = doParallel(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
 *
 * @name someLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anyLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someLimit = doParallelLimit(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
 *
 * @name someSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anySeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in series.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someSeries = doLimit(someLimit, 1);

/**
 * Sorts a list by the results of running each `coll` value through an async
 * `iteratee`.
 *
 * @name sortBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a value to use as the sort criteria as
 * its `result`.
 * Invoked with (item, callback).
 * @param {Function} callback - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is the items
 * from the original `coll` sorted by the values returned by the `iteratee`
 * calls. Invoked with (err, results).
 * @example
 *
 * async.sortBy(['file1','file2','file3'], function(file, callback) {
 *     fs.stat(file, function(err, stats) {
 *         callback(err, stats.mtime);
 *     });
 * }, function(err, results) {
 *     // results is now the original array of files sorted by
 *     // modified date
 * });
 *
 * // By modifying the callback parameter the
 * // sorting order can be influenced:
 *
 * // ascending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x);
 * }, function(err,result) {
 *     // result callback
 * });
 *
 * // descending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x*-1);    //<- x*-1 instead of x, turns the order around
 * }, function(err,result) {
 *     // result callback
 * });
 */
function sortBy (coll, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    map(coll, function (x, callback) {
        _iteratee(x, function (err, criteria) {
            if (err) return callback(err);
            callback(null, {value: x, criteria: criteria});
        });
    }, function (err, results) {
        if (err) return callback(err);
        callback(null, arrayMap(results.sort(comparator), baseProperty('value')));
    });

    function comparator(left, right) {
        var a = left.criteria, b = right.criteria;
        return a < b ? -1 : a > b ? 1 : 0;
    }
}

/**
 * Sets a time limit on an asynchronous function. If the function does not call
 * its callback within the specified milliseconds, it will be called with a
 * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
 *
 * @name timeout
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} asyncFn - The async function to limit in time.
 * @param {number} milliseconds - The specified time limit.
 * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
 * to timeout Error for more information..
 * @returns {AsyncFunction} Returns a wrapped function that can be used with any
 * of the control flow functions.
 * Invoke this function with the same parameters as you would `asyncFunc`.
 * @example
 *
 * function myFunction(foo, callback) {
 *     doAsyncTask(foo, function(err, data) {
 *         // handle errors
 *         if (err) return callback(err);
 *
 *         // do some stuff ...
 *
 *         // return processed data
 *         return callback(null, data);
 *     });
 * }
 *
 * var wrapped = async.timeout(myFunction, 1000);
 *
 * // call `wrapped` as you would `myFunction`
 * wrapped({ bar: 'bar' }, function(err, data) {
 *     // if `myFunction` takes < 1000 ms to execute, `err`
 *     // and `data` will have their expected values
 *
 *     // else `err` will be an Error with the code 'ETIMEDOUT'
 * });
 */
function timeout(asyncFn, milliseconds, info) {
    var fn = wrapAsync(asyncFn);

    return initialParams(function (args, callback) {
        var timedOut = false;
        var timer;

        function timeoutCallback() {
            var name = asyncFn.name || 'anonymous';
            var error  = new Error('Callback function "' + name + '" timed out.');
            error.code = 'ETIMEDOUT';
            if (info) {
                error.info = info;
            }
            timedOut = true;
            callback(error);
        }

        args.push(function () {
            if (!timedOut) {
                callback.apply(null, arguments);
                clearTimeout(timer);
            }
        });

        // setup timer and call original function
        timer = setTimeout(timeoutCallback, milliseconds);
        fn.apply(null, args);
    });
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
var nativeMax = Math.max;

/**
 * The base implementation of `_.range` and `_.rangeRight` which doesn't
 * coerce arguments.
 *
 * @private
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @param {number} step The value to increment or decrement by.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Array} Returns the range of numbers.
 */
function baseRange(start, end, step, fromRight) {
  var index = -1,
      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
      result = Array(length);

  while (length--) {
    result[fromRight ? length : ++index] = start;
    start += step;
  }
  return result;
}

/**
 * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name timesLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} count - The number of times to run the function.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see [async.map]{@link module:Collections.map}.
 */
function timeLimit(count, limit, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    mapLimit(baseRange(0, count, 1), limit, _iteratee, callback);
}

/**
 * Calls the `iteratee` function `n` times, and accumulates results in the same
 * manner you would use with [map]{@link module:Collections.map}.
 *
 * @name times
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 * @example
 *
 * // Pretend this is some complicated async factory
 * var createUser = function(id, callback) {
 *     callback(null, {
 *         id: 'user' + id
 *     });
 * };
 *
 * // generate 5 users
 * async.times(5, function(n, next) {
 *     createUser(n, function(err, user) {
 *         next(err, user);
 *     });
 * }, function(err, users) {
 *     // we should now have 5 users
 * });
 */
var times = doLimit(timeLimit, Infinity);

/**
 * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
 *
 * @name timesSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 */
var timesSeries = doLimit(timeLimit, 1);

/**
 * A relative of `reduce`.  Takes an Object or Array, and iterates over each
 * element in series, each step potentially mutating an `accumulator` value.
 * The type of the accumulator defaults to the type of collection passed in.
 *
 * @name transform
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} [accumulator] - The initial state of the transform.  If omitted,
 * it will default to an empty Object or Array, depending on the type of `coll`
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * collection that potentially modifies the accumulator.
 * Invoked with (accumulator, item, key, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the transformed accumulator.
 * Invoked with (err, result).
 * @example
 *
 * async.transform([1,2,3], function(acc, item, index, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         acc.push(item * 2)
 *         callback(null)
 *     });
 * }, function(err, result) {
 *     // result is now equal to [2, 4, 6]
 * });
 *
 * @example
 *
 * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
 *     setImmediate(function () {
 *         obj[key] = val * 2;
 *         callback();
 *     })
 * }, function (err, result) {
 *     // result is equal to {a: 2, b: 4, c: 6}
 * })
 */
function transform (coll, accumulator, iteratee, callback) {
    if (arguments.length <= 3) {
        callback = iteratee;
        iteratee = accumulator;
        accumulator = isArray(coll) ? [] : {};
    }
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);

    eachOf(coll, function(v, k, cb) {
        _iteratee(accumulator, v, k, cb);
    }, function(err) {
        callback(err, accumulator);
    });
}

/**
 * It runs each task in series but stops whenever any of the functions were
 * successful. If one of the tasks were successful, the `callback` will be
 * passed the result of the successful task. If all tasks fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name tryEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing functions to
 * run, each function is passed a `callback(err, result)` it must call on
 * completion with an error `err` (which can be `null`) and an optional `result`
 * value.
 * @param {Function} [callback] - An optional callback which is called when one
 * of the tasks has succeeded, or all have failed. It receives the `err` and
 * `result` arguments of the last attempt at completing the `task`. Invoked with
 * (err, results).
 * @example
 * async.tryEach([
 *     function getDataFromFirstWebsite(callback) {
 *         // Try getting the data from the first website
 *         callback(err, data);
 *     },
 *     function getDataFromSecondWebsite(callback) {
 *         // First website failed,
 *         // Try getting the data from the backup website
 *         callback(err, data);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     Now do something with the data.
 * });
 *
 */
function tryEach(tasks, callback) {
    var error = null;
    var result;
    callback = callback || noop;
    eachSeries(tasks, function(task, callback) {
        wrapAsync(task)(function (err, res/*, ...args*/) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            } else {
                result = res;
            }
            error = err;
            callback(!err);
        });
    }, function () {
        callback(error, result);
    });
}

/**
 * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
 * unmemoized form. Handy for testing.
 *
 * @name unmemoize
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.memoize]{@link module:Utils.memoize}
 * @category Util
 * @param {AsyncFunction} fn - the memoized function
 * @returns {AsyncFunction} a function that calls the original unmemoized function
 */
function unmemoize(fn) {
    return function () {
        return (fn.unmemoized || fn).apply(null, arguments);
    };
}

/**
 * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs.
 *
 * @name whilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 * @returns undefined
 * @example
 *
 * var count = 0;
 * async.whilst(
 *     function() { return count < 5; },
 *     function(callback) {
 *         count++;
 *         setTimeout(function() {
 *             callback(null, count);
 *         }, 1000);
 *     },
 *     function (err, n) {
 *         // 5 seconds have passed, n = 5
 *     }
 * );
 */
function whilst(test, iteratee, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    if (!test()) return callback(null);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        if (test()) return _iteratee(next);
        var args = slice(arguments, 1);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs. `callback` will be passed an error and any
 * arguments passed to the final `iteratee`'s callback.
 *
 * The inverse of [whilst]{@link module:ControlFlow.whilst}.
 *
 * @name until
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function until(test, iteratee, callback) {
    whilst(function() {
        return !test.apply(this, arguments);
    }, iteratee, callback);
}

/**
 * Runs the `tasks` array of functions in series, each passing their results to
 * the next in the array. However, if any of the `tasks` pass an error to their
 * own callback, the next function is not executed, and the main `callback` is
 * immediately called with the error.
 *
 * @name waterfall
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
 * to run.
 * Each function should complete with any number of `result` values.
 * The `result` values will be passed as arguments, in order, to the next task.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This will be passed the results of the last task's
 * callback. Invoked with (err, [results]).
 * @returns undefined
 * @example
 *
 * async.waterfall([
 *     function(callback) {
 *         callback(null, 'one', 'two');
 *     },
 *     function(arg1, arg2, callback) {
 *         // arg1 now equals 'one' and arg2 now equals 'two'
 *         callback(null, 'three');
 *     },
 *     function(arg1, callback) {
 *         // arg1 now equals 'three'
 *         callback(null, 'done');
 *     }
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 *
 * // Or, with named functions:
 * async.waterfall([
 *     myFirstFunction,
 *     mySecondFunction,
 *     myLastFunction,
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 * function myFirstFunction(callback) {
 *     callback(null, 'one', 'two');
 * }
 * function mySecondFunction(arg1, arg2, callback) {
 *     // arg1 now equals 'one' and arg2 now equals 'two'
 *     callback(null, 'three');
 * }
 * function myLastFunction(arg1, callback) {
 *     // arg1 now equals 'three'
 *     callback(null, 'done');
 * }
 */
var waterfall = function(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
    if (!tasks.length) return callback();
    var taskIndex = 0;

    function nextTask(args) {
        var task = wrapAsync(tasks[taskIndex++]);
        args.push(onlyOnce(next));
        task.apply(null, args);
    }

    function next(err/*, ...args*/) {
        if (err || taskIndex === tasks.length) {
            return callback.apply(null, arguments);
        }
        nextTask(slice(arguments, 1));
    }

    nextTask([]);
};

/**
 * An "async function" in the context of Async is an asynchronous function with
 * a variable number of parameters, with the final parameter being a callback.
 * (`function (arg1, arg2, ..., callback) {}`)
 * The final callback is of the form `callback(err, results...)`, which must be
 * called once the function is completed.  The callback should be called with a
 * Error as its first argument to signal that an error occurred.
 * Otherwise, if no error occurred, it should be called with `null` as the first
 * argument, and any additional `result` arguments that may apply, to signal
 * successful completion.
 * The callback must be called exactly once, ideally on a later tick of the
 * JavaScript event loop.
 *
 * This type of function is also referred to as a "Node-style async function",
 * or a "continuation passing-style function" (CPS). Most of the methods of this
 * library are themselves CPS/Node-style async functions, or functions that
 * return CPS/Node-style async functions.
 *
 * Wherever we accept a Node-style async function, we also directly accept an
 * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
 * In this case, the `async` function will not be passed a final callback
 * argument, and any thrown error will be used as the `err` argument of the
 * implicit callback, and the return value will be used as the `result` value.
 * (i.e. a `rejected` of the returned Promise becomes the `err` callback
 * argument, and a `resolved` value becomes the `result`.)
 *
 * Note, due to JavaScript limitations, we can only detect native `async`
 * functions and not transpilied implementations.
 * Your environment must have `async`/`await` support for this to work.
 * (e.g. Node > v7.6, or a recent version of a modern browser).
 * If you are using `async` functions through a transpiler (e.g. Babel), you
 * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
 * because the `async function` will be compiled to an ordinary function that
 * returns a promise.
 *
 * @typedef {Function} AsyncFunction
 * @static
 */

/**
 * Async is a utility module which provides straight-forward, powerful functions
 * for working with asynchronous JavaScript. Although originally designed for
 * use with [Node.js](http://nodejs.org) and installable via
 * `npm install --save async`, it can also be used directly in the browser.
 * @module async
 * @see AsyncFunction
 */


/**
 * A collection of `async` functions for manipulating collections, such as
 * arrays and objects.
 * @module Collections
 */

/**
 * A collection of `async` functions for controlling the flow through a script.
 * @module ControlFlow
 */

/**
 * A collection of `async` utility functions.
 * @module Utils
 */

var index = {
    apply: apply,
    applyEach: applyEach,
    applyEachSeries: applyEachSeries,
    asyncify: asyncify,
    auto: auto,
    autoInject: autoInject,
    cargo: cargo,
    compose: compose,
    concat: concat,
    concatLimit: concatLimit,
    concatSeries: concatSeries,
    constant: constant,
    detect: detect,
    detectLimit: detectLimit,
    detectSeries: detectSeries,
    dir: dir,
    doDuring: doDuring,
    doUntil: doUntil,
    doWhilst: doWhilst,
    during: during,
    each: eachLimit,
    eachLimit: eachLimit$1,
    eachOf: eachOf,
    eachOfLimit: eachOfLimit,
    eachOfSeries: eachOfSeries,
    eachSeries: eachSeries,
    ensureAsync: ensureAsync,
    every: every,
    everyLimit: everyLimit,
    everySeries: everySeries,
    filter: filter,
    filterLimit: filterLimit,
    filterSeries: filterSeries,
    forever: forever,
    groupBy: groupBy,
    groupByLimit: groupByLimit,
    groupBySeries: groupBySeries,
    log: log,
    map: map,
    mapLimit: mapLimit,
    mapSeries: mapSeries,
    mapValues: mapValues,
    mapValuesLimit: mapValuesLimit,
    mapValuesSeries: mapValuesSeries,
    memoize: memoize,
    nextTick: nextTick,
    parallel: parallelLimit,
    parallelLimit: parallelLimit$1,
    priorityQueue: priorityQueue,
    queue: queue$1,
    race: race,
    reduce: reduce,
    reduceRight: reduceRight,
    reflect: reflect,
    reflectAll: reflectAll,
    reject: reject,
    rejectLimit: rejectLimit,
    rejectSeries: rejectSeries,
    retry: retry,
    retryable: retryable,
    seq: seq,
    series: series,
    setImmediate: setImmediate$1,
    some: some,
    someLimit: someLimit,
    someSeries: someSeries,
    sortBy: sortBy,
    timeout: timeout,
    times: times,
    timesLimit: timeLimit,
    timesSeries: timesSeries,
    transform: transform,
    tryEach: tryEach,
    unmemoize: unmemoize,
    until: until,
    waterfall: waterfall,
    whilst: whilst,

    // aliases
    all: every,
    allLimit: everyLimit,
    allSeries: everySeries,
    any: some,
    anyLimit: someLimit,
    anySeries: someSeries,
    find: detect,
    findLimit: detectLimit,
    findSeries: detectSeries,
    forEach: eachLimit,
    forEachSeries: eachSeries,
    forEachLimit: eachLimit$1,
    forEachOf: eachOf,
    forEachOfSeries: eachOfSeries,
    forEachOfLimit: eachOfLimit,
    inject: reduce,
    foldl: reduce,
    foldr: reduceRight,
    select: filter,
    selectLimit: filterLimit,
    selectSeries: filterSeries,
    wrapSync: asyncify
};

exports['default'] = index;
exports.apply = apply;
exports.applyEach = applyEach;
exports.applyEachSeries = applyEachSeries;
exports.asyncify = asyncify;
exports.auto = auto;
exports.autoInject = autoInject;
exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
exports.concatLimit = concatLimit;
exports.concatSeries = concatSeries;
exports.constant = constant;
exports.detect = detect;
exports.detectLimit = detectLimit;
exports.detectSeries = detectSeries;
exports.dir = dir;
exports.doDuring = doDuring;
exports.doUntil = doUntil;
exports.doWhilst = doWhilst;
exports.during = during;
exports.each = eachLimit;
exports.eachLimit = eachLimit$1;
exports.eachOf = eachOf;
exports.eachOfLimit = eachOfLimit;
exports.eachOfSeries = eachOfSeries;
exports.eachSeries = eachSeries;
exports.ensureAsync = ensureAsync;
exports.every = every;
exports.everyLimit = everyLimit;
exports.everySeries = everySeries;
exports.filter = filter;
exports.filterLimit = filterLimit;
exports.filterSeries = filterSeries;
exports.forever = forever;
exports.groupBy = groupBy;
exports.groupByLimit = groupByLimit;
exports.groupBySeries = groupBySeries;
exports.log = log;
exports.map = map;
exports.mapLimit = mapLimit;
exports.mapSeries = mapSeries;
exports.mapValues = mapValues;
exports.mapValuesLimit = mapValuesLimit;
exports.mapValuesSeries = mapValuesSeries;
exports.memoize = memoize;
exports.nextTick = nextTick;
exports.parallel = parallelLimit;
exports.parallelLimit = parallelLimit$1;
exports.priorityQueue = priorityQueue;
exports.queue = queue$1;
exports.race = race;
exports.reduce = reduce;
exports.reduceRight = reduceRight;
exports.reflect = reflect;
exports.reflectAll = reflectAll;
exports.reject = reject;
exports.rejectLimit = rejectLimit;
exports.rejectSeries = rejectSeries;
exports.retry = retry;
exports.retryable = retryable;
exports.seq = seq;
exports.series = series;
exports.setImmediate = setImmediate$1;
exports.some = some;
exports.someLimit = someLimit;
exports.someSeries = someSeries;
exports.sortBy = sortBy;
exports.timeout = timeout;
exports.times = times;
exports.timesLimit = timeLimit;
exports.timesSeries = timesSeries;
exports.transform = transform;
exports.tryEach = tryEach;
exports.unmemoize = unmemoize;
exports.until = until;
exports.waterfall = waterfall;
exports.whilst = whilst;
exports.all = every;
exports.allLimit = everyLimit;
exports.allSeries = everySeries;
exports.any = some;
exports.anyLimit = someLimit;
exports.anySeries = someSeries;
exports.find = detect;
exports.findLimit = detectLimit;
exports.findSeries = detectSeries;
exports.forEach = eachLimit;
exports.forEachSeries = eachSeries;
exports.forEachLimit = eachLimit$1;
exports.forEachOf = eachOf;
exports.forEachOfSeries = eachOfSeries;
exports.forEachOfLimit = eachOfLimit;
exports.inject = reduce;
exports.foldl = reduce;
exports.foldr = reduceRight;
exports.select = filter;
exports.selectLimit = filterLimit;
exports.selectSeries = filterSeries;
exports.wrapSync = asyncify;

Object.defineProperty(exports, '__esModule', { value: true });

})));


/***/ }),

/***/ 187155:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var util = __webpack_require__(431669)
  , AbstractIterator = __webpack_require__(3154).AbstractIterator


function DeferredIterator (options) {
  AbstractIterator.call(this, options)

  this._options = options
  this._iterator = null
  this._operations = []
}

util.inherits(DeferredIterator, AbstractIterator)

DeferredIterator.prototype.setDb = function (db) {
  var it = this._iterator = db.iterator(this._options)
  this._operations.forEach(function (op) {
    it[op.method].apply(it, op.args)
  })
}

DeferredIterator.prototype._operation = function (method, args) {
  if (this._iterator)
    return this._iterator[method].apply(this._iterator, args)
  this._operations.push({ method: method, args: args })
}

'next end'.split(' ').forEach(function (m) {
  DeferredIterator.prototype['_' + m] = function () {
    this._operation(m, arguments)
  }
})

module.exports = DeferredIterator;


/***/ }),

/***/ 735797:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var util              = __webpack_require__(431669)
  , AbstractLevelDOWN = __webpack_require__(3154).AbstractLevelDOWN
  , DeferredIterator  = __webpack_require__(187155)

function DeferredLevelDOWN (location) {
  AbstractLevelDOWN.call(this, typeof location == 'string' ? location : '') // optional location, who cares?
  this._db         = undefined
  this._operations = []
  this._iterators  = []
}

util.inherits(DeferredLevelDOWN, AbstractLevelDOWN)

// called by LevelUP when we have a real DB to take its place
DeferredLevelDOWN.prototype.setDb = function (db) {
  this._db = db
  this._operations.forEach(function (op) {
    db[op.method].apply(db, op.args)
  })
  this._iterators.forEach(function (it) {
    it.setDb(db)
  })
}

DeferredLevelDOWN.prototype._open = function (options, callback) {
  return process.nextTick(callback)
}

// queue a new deferred operation
DeferredLevelDOWN.prototype._operation = function (method, args) {
  if (this._db)
    return this._db[method].apply(this._db, args)
  this._operations.push({ method: method, args: args })
}

// deferrables
'put get del batch approximateSize'.split(' ').forEach(function (m) {
  DeferredLevelDOWN.prototype['_' + m] = function () {
    this._operation(m, arguments)
  }
})

DeferredLevelDOWN.prototype._isBuffer = function (obj) {
  return Buffer.isBuffer(obj)
}

DeferredLevelDOWN.prototype._iterator = function (options) {
  if (this._db)
    return this._db.iterator.apply(this._db, arguments)
  var it = new DeferredIterator(options)
  this._iterators.push(it)
  return it
}

module.exports                  = DeferredLevelDOWN
module.exports.DeferredIterator = DeferredIterator


/***/ }),

/***/ 615867:
/***/ ((module) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

function AbstractChainedBatch (db) {
  this._db         = db
  this._operations = []
  this._written    = false
}

AbstractChainedBatch.prototype._serializeKey = function (key) {
  return this._db._serializeKey(key)
}

AbstractChainedBatch.prototype._serializeValue = function (value) {
  return this._db._serializeValue(value)
}

AbstractChainedBatch.prototype._checkWritten = function () {
  if (this._written)
    throw new Error('write() already called on this batch')
}

AbstractChainedBatch.prototype.put = function (key, value) {
  this._checkWritten()

  var err = this._db._checkKey(key, 'key', this._db._isBuffer)
  if (err)
    throw err

  key = this._serializeKey(key)
  value = this._serializeValue(value)

  if (typeof this._put == 'function' )
    this._put(key, value)
  else
    this._operations.push({ type: 'put', key: key, value: value })

  return this
}

AbstractChainedBatch.prototype.del = function (key) {
  this._checkWritten()

  var err = this._db._checkKey(key, 'key', this._db._isBuffer)
  if (err) throw err

  key = this._serializeKey(key)

  if (typeof this._del == 'function' )
    this._del(key)
  else
    this._operations.push({ type: 'del', key: key })

  return this
}

AbstractChainedBatch.prototype.clear = function () {
  this._checkWritten()

  this._operations = []

  if (typeof this._clear == 'function' )
    this._clear()

  return this
}

AbstractChainedBatch.prototype.write = function (options, callback) {
  this._checkWritten()

  if (typeof options == 'function')
    callback = options
  if (typeof callback != 'function')
    throw new Error('write() requires a callback argument')
  if (typeof options != 'object')
    options = {}

  this._written = true

  if (typeof this._write == 'function' )
    return this._write(callback)

  if (typeof this._db._batch == 'function')
    return this._db._batch(this._operations, options, callback)

  process.nextTick(callback)
}

module.exports = AbstractChainedBatch


/***/ }),

/***/ 634415:
/***/ ((module) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

function AbstractIterator (db) {
  this.db = db
  this._ended = false
  this._nexting = false
}

AbstractIterator.prototype.next = function (callback) {
  var self = this

  if (typeof callback != 'function')
    throw new Error('next() requires a callback argument')

  if (self._ended)
    return callback(new Error('cannot call next() after end()'))
  if (self._nexting)
    return callback(new Error('cannot call next() before previous next() has completed'))

  self._nexting = true
  if (typeof self._next == 'function') {
    return self._next(function () {
      self._nexting = false
      callback.apply(null, arguments)
    })
  }

  process.nextTick(function () {
    self._nexting = false
    callback()
  })
}

AbstractIterator.prototype.end = function (callback) {
  if (typeof callback != 'function')
    throw new Error('end() requires a callback argument')

  if (this._ended)
    return callback(new Error('end() already called on iterator'))

  this._ended = true

  if (typeof this._end == 'function')
    return this._end(callback)

  process.nextTick(callback)
}

module.exports = AbstractIterator


/***/ }),

/***/ 699080:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2017 Rod Vagg, MIT License */

var xtend                = __webpack_require__(347529)
  , AbstractIterator     = __webpack_require__(634415)
  , AbstractChainedBatch = __webpack_require__(615867)

function AbstractLevelDOWN (location) {
  if (!arguments.length || location === undefined)
    throw new Error('constructor requires at least a location argument')

  if (typeof location != 'string')
    throw new Error('constructor requires a location string argument')

  this.location = location
  this.status = 'new'
}

AbstractLevelDOWN.prototype.open = function (options, callback) {
  var self      = this
    , oldStatus = this.status

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('open() requires a callback argument')

  if (typeof options != 'object')
    options = {}

  options.createIfMissing = options.createIfMissing != false
  options.errorIfExists = !!options.errorIfExists

  if (typeof this._open == 'function') {
    this.status = 'opening'
    this._open(options, function (err) {
      if (err) {
        self.status = oldStatus
        return callback(err)
      }
      self.status = 'open'
      callback()
    })
  } else {
    this.status = 'open'
    process.nextTick(callback)
  }
}

AbstractLevelDOWN.prototype.close = function (callback) {
  var self      = this
    , oldStatus = this.status

  if (typeof callback != 'function')
    throw new Error('close() requires a callback argument')

  if (typeof this._close == 'function') {
    this.status = 'closing'
    this._close(function (err) {
      if (err) {
        self.status = oldStatus
        return callback(err)
      }
      self.status = 'closed'
      callback()
    })
  } else {
    this.status = 'closed'
    process.nextTick(callback)
  }
}

AbstractLevelDOWN.prototype.get = function (key, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('get() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)

  if (typeof options != 'object')
    options = {}

  options.asBuffer = options.asBuffer != false

  if (typeof this._get == 'function')
    return this._get(key, options, callback)

  process.nextTick(function () { callback(new Error('NotFound')) })
}

AbstractLevelDOWN.prototype.put = function (key, value, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('put() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)
  value = this._serializeValue(value)

  if (typeof options != 'object')
    options = {}

  if (typeof this._put == 'function')
    return this._put(key, value, options, callback)

  process.nextTick(callback)
}

AbstractLevelDOWN.prototype.del = function (key, options, callback) {
  var err

  if (typeof options == 'function')
    callback = options

  if (typeof callback != 'function')
    throw new Error('del() requires a callback argument')

  if (err = this._checkKey(key, 'key'))
    return callback(err)

  key = this._serializeKey(key)

  if (typeof options != 'object')
    options = {}

  if (typeof this._del == 'function')
    return this._del(key, options, callback)

  process.nextTick(callback)
}

AbstractLevelDOWN.prototype.batch = function (array, options, callback) {
  if (!arguments.length)
    return this._chainedBatch()

  if (typeof options == 'function')
    callback = options

  if (typeof array == 'function')
    callback = array

  if (typeof callback != 'function')
    throw new Error('batch(array) requires a callback argument')

  if (!Array.isArray(array))
    return callback(new Error('batch(array) requires an array argument'))

  if (!options || typeof options != 'object')
    options = {}

  var i = 0
    , l = array.length
    , e
    , err

  for (; i < l; i++) {
    e = array[i]
    if (typeof e != 'object')
      continue

    if (err = this._checkKey(e.type, 'type'))
      return callback(err)

    if (err = this._checkKey(e.key, 'key'))
      return callback(err)
  }

  if (typeof this._batch == 'function')
    return this._batch(array, options, callback)

  process.nextTick(callback)
}

//TODO: remove from here, not a necessary primitive
AbstractLevelDOWN.prototype.approximateSize = function (start, end, callback) {
  if (   start == null
      || end == null
      || typeof start == 'function'
      || typeof end == 'function') {
    throw new Error('approximateSize() requires valid `start`, `end` and `callback` arguments')
  }

  if (typeof callback != 'function')
    throw new Error('approximateSize() requires a callback argument')

  start = this._serializeKey(start)
  end = this._serializeKey(end)

  if (typeof this._approximateSize == 'function')
    return this._approximateSize(start, end, callback)

  process.nextTick(function () {
    callback(null, 0)
  })
}

AbstractLevelDOWN.prototype._setupIteratorOptions = function (options) {
  var self = this

  options = xtend(options)

  ;[ 'start', 'end', 'gt', 'gte', 'lt', 'lte' ].forEach(function (o) {
    if (options[o] && self._isBuffer(options[o]) && options[o].length === 0)
      delete options[o]
  })

  options.reverse = !!options.reverse
  options.keys = options.keys != false
  options.values = options.values != false
  options.limit = 'limit' in options ? options.limit : -1
  options.keyAsBuffer = options.keyAsBuffer != false
  options.valueAsBuffer = options.valueAsBuffer != false

  return options
}

AbstractLevelDOWN.prototype.iterator = function (options) {
  if (typeof options != 'object')
    options = {}

  options = this._setupIteratorOptions(options)

  if (typeof this._iterator == 'function')
    return this._iterator(options)

  return new AbstractIterator(this)
}

AbstractLevelDOWN.prototype._chainedBatch = function () {
  return new AbstractChainedBatch(this)
}

AbstractLevelDOWN.prototype._isBuffer = function (obj) {
  return Buffer.isBuffer(obj)
}

AbstractLevelDOWN.prototype._serializeKey = function (key) {
  return this._isBuffer(key)
    ? key
    : String(key)
}

AbstractLevelDOWN.prototype._serializeValue = function (value) {
  if (value == null) return ''
  return this._isBuffer(value) || process.browser ? value : String(value)
}

AbstractLevelDOWN.prototype._checkKey = function (obj, type) {
  if (obj === null || obj === undefined)
    return new Error(type + ' cannot be `null` or `undefined`')

  if (this._isBuffer(obj) && obj.length === 0)
    return new Error(type + ' cannot be an empty Buffer')
  else if (String(obj) === '')
    return new Error(type + ' cannot be an empty String')
}

module.exports = AbstractLevelDOWN


/***/ }),

/***/ 3154:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

exports.AbstractLevelDOWN = __webpack_require__(699080)
exports.AbstractIterator = __webpack_require__(634415)
/* unused reexport */ __webpack_require__(615867)
/* unused reexport */ __webpack_require__(78210)


/***/ }),

/***/ 78210:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var AbstractLevelDOWN = __webpack_require__(699080)

function isLevelDOWN (db) {
  if (!db || typeof db !== 'object')
    return false
  return Object.keys(AbstractLevelDOWN.prototype).filter(function (name) {
    // TODO remove approximateSize check when method is gone
    return name[0] != '_' && name != 'approximateSize'
  }).every(function (name) {
    return typeof db[name] == 'function'
  })
}

module.exports = isLevelDOWN


/***/ }),

/***/ 378892:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var elliptic = exports;

elliptic.version = __webpack_require__(26223)/* .version */ .i8;
elliptic.utils = __webpack_require__(427433);
elliptic.rand = __webpack_require__(929931);
elliptic.curve = __webpack_require__(650145);
elliptic.curves = __webpack_require__(72204);

// Protocols
elliptic.ec = __webpack_require__(884423);
elliptic.eddsa = __webpack_require__(96962);


/***/ }),

/***/ 623026:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(427433);
var getNAF = utils.getNAF;
var getJSF = utils.getJSF;
var assert = utils.assert;

function BaseCurve(type, conf) {
  this.type = type;
  this.p = new BN(conf.p, 16);

  // Use Montgomery, when there is no fast reduction for the prime
  this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);

  // Useful for many curves
  this.zero = new BN(0).toRed(this.red);
  this.one = new BN(1).toRed(this.red);
  this.two = new BN(2).toRed(this.red);

  // Curve configuration, optional
  this.n = conf.n && new BN(conf.n, 16);
  this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);

  // Temporary arrays
  this._wnafT1 = new Array(4);
  this._wnafT2 = new Array(4);
  this._wnafT3 = new Array(4);
  this._wnafT4 = new Array(4);

  this._bitLength = this.n ? this.n.bitLength() : 0;

  // Generalized Greg Maxwell's trick
  var adjustCount = this.n && this.p.div(this.n);
  if (!adjustCount || adjustCount.cmpn(100) > 0) {
    this.redN = null;
  } else {
    this._maxwellTrick = true;
    this.redN = this.n.toRed(this.red);
  }
}
module.exports = BaseCurve;

BaseCurve.prototype.point = function point() {
  throw new Error('Not implemented');
};

BaseCurve.prototype.validate = function validate() {
  throw new Error('Not implemented');
};

BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
  assert(p.precomputed);
  var doubles = p._getDoubles();

  var naf = getNAF(k, 1, this._bitLength);
  var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
  I /= 3;

  // Translate into more windowed form
  var repr = [];
  for (var j = 0; j < naf.length; j += doubles.step) {
    var nafW = 0;
    for (var k = j + doubles.step - 1; k >= j; k--)
      nafW = (nafW << 1) + naf[k];
    repr.push(nafW);
  }

  var a = this.jpoint(null, null, null);
  var b = this.jpoint(null, null, null);
  for (var i = I; i > 0; i--) {
    for (var j = 0; j < repr.length; j++) {
      var nafW = repr[j];
      if (nafW === i)
        b = b.mixedAdd(doubles.points[j]);
      else if (nafW === -i)
        b = b.mixedAdd(doubles.points[j].neg());
    }
    a = a.add(b);
  }
  return a.toP();
};

BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
  var w = 4;

  // Precompute window
  var nafPoints = p._getNAFPoints(w);
  w = nafPoints.wnd;
  var wnd = nafPoints.points;

  // Get NAF form
  var naf = getNAF(k, w, this._bitLength);

  // Add `this`*(N+1) for every w-NAF index
  var acc = this.jpoint(null, null, null);
  for (var i = naf.length - 1; i >= 0; i--) {
    // Count zeroes
    for (var k = 0; i >= 0 && naf[i] === 0; i--)
      k++;
    if (i >= 0)
      k++;
    acc = acc.dblp(k);

    if (i < 0)
      break;
    var z = naf[i];
    assert(z !== 0);
    if (p.type === 'affine') {
      // J +- P
      if (z > 0)
        acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
      else
        acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
    } else {
      // J +- J
      if (z > 0)
        acc = acc.add(wnd[(z - 1) >> 1]);
      else
        acc = acc.add(wnd[(-z - 1) >> 1].neg());
    }
  }
  return p.type === 'affine' ? acc.toP() : acc;
};

BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
                                                       points,
                                                       coeffs,
                                                       len,
                                                       jacobianResult) {
  var wndWidth = this._wnafT1;
  var wnd = this._wnafT2;
  var naf = this._wnafT3;

  // Fill all arrays
  var max = 0;
  for (var i = 0; i < len; i++) {
    var p = points[i];
    var nafPoints = p._getNAFPoints(defW);
    wndWidth[i] = nafPoints.wnd;
    wnd[i] = nafPoints.points;
  }

  // Comb small window NAFs
  for (var i = len - 1; i >= 1; i -= 2) {
    var a = i - 1;
    var b = i;
    if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
      naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
      naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
      max = Math.max(naf[a].length, max);
      max = Math.max(naf[b].length, max);
      continue;
    }

    var comb = [
      points[a], /* 1 */
      null, /* 3 */
      null, /* 5 */
      points[b] /* 7 */
    ];

    // Try to avoid Projective points, if possible
    if (points[a].y.cmp(points[b].y) === 0) {
      comb[1] = points[a].add(points[b]);
      comb[2] = points[a].toJ().mixedAdd(points[b].neg());
    } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
      comb[1] = points[a].toJ().mixedAdd(points[b]);
      comb[2] = points[a].add(points[b].neg());
    } else {
      comb[1] = points[a].toJ().mixedAdd(points[b]);
      comb[2] = points[a].toJ().mixedAdd(points[b].neg());
    }

    var index = [
      -3, /* -1 -1 */
      -1, /* -1 0 */
      -5, /* -1 1 */
      -7, /* 0 -1 */
      0, /* 0 0 */
      7, /* 0 1 */
      5, /* 1 -1 */
      1, /* 1 0 */
      3  /* 1 1 */
    ];

    var jsf = getJSF(coeffs[a], coeffs[b]);
    max = Math.max(jsf[0].length, max);
    naf[a] = new Array(max);
    naf[b] = new Array(max);
    for (var j = 0; j < max; j++) {
      var ja = jsf[0][j] | 0;
      var jb = jsf[1][j] | 0;

      naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
      naf[b][j] = 0;
      wnd[a] = comb;
    }
  }

  var acc = this.jpoint(null, null, null);
  var tmp = this._wnafT4;
  for (var i = max; i >= 0; i--) {
    var k = 0;

    while (i >= 0) {
      var zero = true;
      for (var j = 0; j < len; j++) {
        tmp[j] = naf[j][i] | 0;
        if (tmp[j] !== 0)
          zero = false;
      }
      if (!zero)
        break;
      k++;
      i--;
    }
    if (i >= 0)
      k++;
    acc = acc.dblp(k);
    if (i < 0)
      break;

    for (var j = 0; j < len; j++) {
      var z = tmp[j];
      var p;
      if (z === 0)
        continue;
      else if (z > 0)
        p = wnd[j][(z - 1) >> 1];
      else if (z < 0)
        p = wnd[j][(-z - 1) >> 1].neg();

      if (p.type === 'affine')
        acc = acc.mixedAdd(p);
      else
        acc = acc.add(p);
    }
  }
  // Zeroify references
  for (var i = 0; i < len; i++)
    wnd[i] = null;

  if (jacobianResult)
    return acc;
  else
    return acc.toP();
};

function BasePoint(curve, type) {
  this.curve = curve;
  this.type = type;
  this.precomputed = null;
}
BaseCurve.BasePoint = BasePoint;

BasePoint.prototype.eq = function eq(/*other*/) {
  throw new Error('Not implemented');
};

BasePoint.prototype.validate = function validate() {
  return this.curve.validate(this);
};

BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  bytes = utils.toArray(bytes, enc);

  var len = this.p.byteLength();

  // uncompressed, hybrid-odd, hybrid-even
  if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
      bytes.length - 1 === 2 * len) {
    if (bytes[0] === 0x06)
      assert(bytes[bytes.length - 1] % 2 === 0);
    else if (bytes[0] === 0x07)
      assert(bytes[bytes.length - 1] % 2 === 1);

    var res =  this.point(bytes.slice(1, 1 + len),
                          bytes.slice(1 + len, 1 + 2 * len));

    return res;
  } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
              bytes.length - 1 === len) {
    return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
  }
  throw new Error('Unknown point format');
};

BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
  return this.encode(enc, true);
};

BasePoint.prototype._encode = function _encode(compact) {
  var len = this.curve.p.byteLength();
  var x = this.getX().toArray('be', len);

  if (compact)
    return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);

  return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;
};

BasePoint.prototype.encode = function encode(enc, compact) {
  return utils.encode(this._encode(compact), enc);
};

BasePoint.prototype.precompute = function precompute(power) {
  if (this.precomputed)
    return this;

  var precomputed = {
    doubles: null,
    naf: null,
    beta: null
  };
  precomputed.naf = this._getNAFPoints(8);
  precomputed.doubles = this._getDoubles(4, power);
  precomputed.beta = this._getBeta();
  this.precomputed = precomputed;

  return this;
};

BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
  if (!this.precomputed)
    return false;

  var doubles = this.precomputed.doubles;
  if (!doubles)
    return false;

  return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
};

BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
  if (this.precomputed && this.precomputed.doubles)
    return this.precomputed.doubles;

  var doubles = [ this ];
  var acc = this;
  for (var i = 0; i < power; i += step) {
    for (var j = 0; j < step; j++)
      acc = acc.dbl();
    doubles.push(acc);
  }
  return {
    step: step,
    points: doubles
  };
};

BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
  if (this.precomputed && this.precomputed.naf)
    return this.precomputed.naf;

  var res = [ this ];
  var max = (1 << wnd) - 1;
  var dbl = max === 1 ? null : this.dbl();
  for (var i = 1; i < max; i++)
    res[i] = res[i - 1].add(dbl);
  return {
    wnd: wnd,
    points: res
  };
};

BasePoint.prototype._getBeta = function _getBeta() {
  return null;
};

BasePoint.prototype.dblp = function dblp(k) {
  var r = this;
  for (var i = 0; i < k; i++)
    r = r.dbl();
  return r;
};


/***/ }),

/***/ 496959:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(427433);
var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(623026);

var assert = utils.assert;

function EdwardsCurve(conf) {
  // NOTE: Important as we are creating point in Base.call()
  this.twisted = (conf.a | 0) !== 1;
  this.mOneA = this.twisted && (conf.a | 0) === -1;
  this.extended = this.mOneA;

  Base.call(this, 'edwards', conf);

  this.a = new BN(conf.a, 16).umod(this.red.m);
  this.a = this.a.toRed(this.red);
  this.c = new BN(conf.c, 16).toRed(this.red);
  this.c2 = this.c.redSqr();
  this.d = new BN(conf.d, 16).toRed(this.red);
  this.dd = this.d.redAdd(this.d);

  assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
  this.oneC = (conf.c | 0) === 1;
}
inherits(EdwardsCurve, Base);
module.exports = EdwardsCurve;

EdwardsCurve.prototype._mulA = function _mulA(num) {
  if (this.mOneA)
    return num.redNeg();
  else
    return this.a.redMul(num);
};

EdwardsCurve.prototype._mulC = function _mulC(num) {
  if (this.oneC)
    return num;
  else
    return this.c.redMul(num);
};

// Just for compatibility with Short curve
EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
  return this.point(x, y, z, t);
};

EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
  x = new BN(x, 16);
  if (!x.red)
    x = x.toRed(this.red);

  var x2 = x.redSqr();
  var rhs = this.c2.redSub(this.a.redMul(x2));
  var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));

  var y2 = rhs.redMul(lhs.redInvm());
  var y = y2.redSqrt();
  if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  var isOdd = y.fromRed().isOdd();
  if (odd && !isOdd || !odd && isOdd)
    y = y.redNeg();

  return this.point(x, y);
};

EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
  y = new BN(y, 16);
  if (!y.red)
    y = y.toRed(this.red);

  // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)
  var y2 = y.redSqr();
  var lhs = y2.redSub(this.c2);
  var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);
  var x2 = lhs.redMul(rhs.redInvm());

  if (x2.cmp(this.zero) === 0) {
    if (odd)
      throw new Error('invalid point');
    else
      return this.point(this.zero, y);
  }

  var x = x2.redSqrt();
  if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  if (x.fromRed().isOdd() !== odd)
    x = x.redNeg();

  return this.point(x, y);
};

EdwardsCurve.prototype.validate = function validate(point) {
  if (point.isInfinity())
    return true;

  // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
  point.normalize();

  var x2 = point.x.redSqr();
  var y2 = point.y.redSqr();
  var lhs = x2.redMul(this.a).redAdd(y2);
  var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));

  return lhs.cmp(rhs) === 0;
};

function Point(curve, x, y, z, t) {
  Base.BasePoint.call(this, curve, 'projective');
  if (x === null && y === null && z === null) {
    this.x = this.curve.zero;
    this.y = this.curve.one;
    this.z = this.curve.one;
    this.t = this.curve.zero;
    this.zOne = true;
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    this.z = z ? new BN(z, 16) : this.curve.one;
    this.t = t && new BN(t, 16);
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.y.red)
      this.y = this.y.toRed(this.curve.red);
    if (!this.z.red)
      this.z = this.z.toRed(this.curve.red);
    if (this.t && !this.t.red)
      this.t = this.t.toRed(this.curve.red);
    this.zOne = this.z === this.curve.one;

    // Use extended coordinates
    if (this.curve.extended && !this.t) {
      this.t = this.x.redMul(this.y);
      if (!this.zOne)
        this.t = this.t.redMul(this.z.redInvm());
    }
  }
}
inherits(Point, Base.BasePoint);

EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  return Point.fromJSON(this, obj);
};

EdwardsCurve.prototype.point = function point(x, y, z, t) {
  return new Point(this, x, y, z, t);
};

Point.fromJSON = function fromJSON(curve, obj) {
  return new Point(curve, obj[0], obj[1], obj[2]);
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' y: ' + this.y.fromRed().toString(16, 2) +
      ' z: ' + this.z.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.x.cmpn(0) === 0 &&
    (this.y.cmp(this.z) === 0 ||
    (this.zOne && this.y.cmp(this.curve.c) === 0));
};

Point.prototype._extDbl = function _extDbl() {
  // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  //     #doubling-dbl-2008-hwcd
  // 4M + 4S

  // A = X1^2
  var a = this.x.redSqr();
  // B = Y1^2
  var b = this.y.redSqr();
  // C = 2 * Z1^2
  var c = this.z.redSqr();
  c = c.redIAdd(c);
  // D = a * A
  var d = this.curve._mulA(a);
  // E = (X1 + Y1)^2 - A - B
  var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
  // G = D + B
  var g = d.redAdd(b);
  // F = G - C
  var f = g.redSub(c);
  // H = D - B
  var h = d.redSub(b);
  // X3 = E * F
  var nx = e.redMul(f);
  // Y3 = G * H
  var ny = g.redMul(h);
  // T3 = E * H
  var nt = e.redMul(h);
  // Z3 = F * G
  var nz = f.redMul(g);
  return this.curve.point(nx, ny, nz, nt);
};

Point.prototype._projDbl = function _projDbl() {
  // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  //     #doubling-dbl-2008-bbjlp
  //     #doubling-dbl-2007-bl
  // and others
  // Generally 3M + 4S or 2M + 4S

  // B = (X1 + Y1)^2
  var b = this.x.redAdd(this.y).redSqr();
  // C = X1^2
  var c = this.x.redSqr();
  // D = Y1^2
  var d = this.y.redSqr();

  var nx;
  var ny;
  var nz;
  if (this.curve.twisted) {
    // E = a * C
    var e = this.curve._mulA(c);
    // F = E + D
    var f = e.redAdd(d);
    if (this.zOne) {
      // X3 = (B - C - D) * (F - 2)
      nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
      // Y3 = F * (E - D)
      ny = f.redMul(e.redSub(d));
      // Z3 = F^2 - 2 * F
      nz = f.redSqr().redSub(f).redSub(f);
    } else {
      // H = Z1^2
      var h = this.z.redSqr();
      // J = F - 2 * H
      var j = f.redSub(h).redISub(h);
      // X3 = (B-C-D)*J
      nx = b.redSub(c).redISub(d).redMul(j);
      // Y3 = F * (E - D)
      ny = f.redMul(e.redSub(d));
      // Z3 = F * J
      nz = f.redMul(j);
    }
  } else {
    // E = C + D
    var e = c.redAdd(d);
    // H = (c * Z1)^2
    var h = this.curve._mulC(this.z).redSqr();
    // J = E - 2 * H
    var j = e.redSub(h).redSub(h);
    // X3 = c * (B - E) * J
    nx = this.curve._mulC(b.redISub(e)).redMul(j);
    // Y3 = c * E * (C - D)
    ny = this.curve._mulC(e).redMul(c.redISub(d));
    // Z3 = E * J
    nz = e.redMul(j);
  }
  return this.curve.point(nx, ny, nz);
};

Point.prototype.dbl = function dbl() {
  if (this.isInfinity())
    return this;

  // Double in extended coordinates
  if (this.curve.extended)
    return this._extDbl();
  else
    return this._projDbl();
};

Point.prototype._extAdd = function _extAdd(p) {
  // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
  //     #addition-add-2008-hwcd-3
  // 8M

  // A = (Y1 - X1) * (Y2 - X2)
  var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
  // B = (Y1 + X1) * (Y2 + X2)
  var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
  // C = T1 * k * T2
  var c = this.t.redMul(this.curve.dd).redMul(p.t);
  // D = Z1 * 2 * Z2
  var d = this.z.redMul(p.z.redAdd(p.z));
  // E = B - A
  var e = b.redSub(a);
  // F = D - C
  var f = d.redSub(c);
  // G = D + C
  var g = d.redAdd(c);
  // H = B + A
  var h = b.redAdd(a);
  // X3 = E * F
  var nx = e.redMul(f);
  // Y3 = G * H
  var ny = g.redMul(h);
  // T3 = E * H
  var nt = e.redMul(h);
  // Z3 = F * G
  var nz = f.redMul(g);
  return this.curve.point(nx, ny, nz, nt);
};

Point.prototype._projAdd = function _projAdd(p) {
  // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
  //     #addition-add-2008-bbjlp
  //     #addition-add-2007-bl
  // 10M + 1S

  // A = Z1 * Z2
  var a = this.z.redMul(p.z);
  // B = A^2
  var b = a.redSqr();
  // C = X1 * X2
  var c = this.x.redMul(p.x);
  // D = Y1 * Y2
  var d = this.y.redMul(p.y);
  // E = d * C * D
  var e = this.curve.d.redMul(c).redMul(d);
  // F = B - E
  var f = b.redSub(e);
  // G = B + E
  var g = b.redAdd(e);
  // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
  var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
  var nx = a.redMul(f).redMul(tmp);
  var ny;
  var nz;
  if (this.curve.twisted) {
    // Y3 = A * G * (D - a * C)
    ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
    // Z3 = F * G
    nz = f.redMul(g);
  } else {
    // Y3 = A * G * (D - C)
    ny = a.redMul(g).redMul(d.redSub(c));
    // Z3 = c * F * G
    nz = this.curve._mulC(f).redMul(g);
  }
  return this.curve.point(nx, ny, nz);
};

Point.prototype.add = function add(p) {
  if (this.isInfinity())
    return p;
  if (p.isInfinity())
    return this;

  if (this.curve.extended)
    return this._extAdd(p);
  else
    return this._projAdd(p);
};

Point.prototype.mul = function mul(k) {
  if (this._hasDoubles(k))
    return this.curve._fixedNafMul(this, k);
  else
    return this.curve._wnafMul(this, k);
};

Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
  return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
};

Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
  return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
};

Point.prototype.normalize = function normalize() {
  if (this.zOne)
    return this;

  // Normalize coordinates
  var zi = this.z.redInvm();
  this.x = this.x.redMul(zi);
  this.y = this.y.redMul(zi);
  if (this.t)
    this.t = this.t.redMul(zi);
  this.z = this.curve.one;
  this.zOne = true;
  return this;
};

Point.prototype.neg = function neg() {
  return this.curve.point(this.x.redNeg(),
                          this.y,
                          this.z,
                          this.t && this.t.redNeg());
};

Point.prototype.getX = function getX() {
  this.normalize();
  return this.x.fromRed();
};

Point.prototype.getY = function getY() {
  this.normalize();
  return this.y.fromRed();
};

Point.prototype.eq = function eq(other) {
  return this === other ||
         this.getX().cmp(other.getX()) === 0 &&
         this.getY().cmp(other.getY()) === 0;
};

Point.prototype.eqXToP = function eqXToP(x) {
  var rx = x.toRed(this.curve.red).redMul(this.z);
  if (this.x.cmp(rx) === 0)
    return true;

  var xc = x.clone();
  var t = this.curve.redN.redMul(this.z);
  for (;;) {
    xc.iadd(this.curve.n);
    if (xc.cmp(this.curve.p) >= 0)
      return false;

    rx.redIAdd(t);
    if (this.x.cmp(rx) === 0)
      return true;
  }
};

// Compatibility with BaseCurve
Point.prototype.toP = Point.prototype.normalize;
Point.prototype.mixedAdd = Point.prototype.add;


/***/ }),

/***/ 650145:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var curve = exports;

curve.base = __webpack_require__(623026);
curve.short = __webpack_require__(216338);
curve.mont = __webpack_require__(65673);
curve.edwards = __webpack_require__(496959);


/***/ }),

/***/ 65673:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(623026);

var utils = __webpack_require__(427433);

function MontCurve(conf) {
  Base.call(this, 'mont', conf);

  this.a = new BN(conf.a, 16).toRed(this.red);
  this.b = new BN(conf.b, 16).toRed(this.red);
  this.i4 = new BN(4).toRed(this.red).redInvm();
  this.two = new BN(2).toRed(this.red);
  this.a24 = this.i4.redMul(this.a.redAdd(this.two));
}
inherits(MontCurve, Base);
module.exports = MontCurve;

MontCurve.prototype.validate = function validate(point) {
  var x = point.normalize().x;
  var x2 = x.redSqr();
  var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
  var y = rhs.redSqrt();

  return y.redSqr().cmp(rhs) === 0;
};

function Point(curve, x, z) {
  Base.BasePoint.call(this, curve, 'projective');
  if (x === null && z === null) {
    this.x = this.curve.one;
    this.z = this.curve.zero;
  } else {
    this.x = new BN(x, 16);
    this.z = new BN(z, 16);
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.z.red)
      this.z = this.z.toRed(this.curve.red);
  }
}
inherits(Point, Base.BasePoint);

MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
  return this.point(utils.toArray(bytes, enc), 1);
};

MontCurve.prototype.point = function point(x, z) {
  return new Point(this, x, z);
};

MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
  return Point.fromJSON(this, obj);
};

Point.prototype.precompute = function precompute() {
  // No-op
};

Point.prototype._encode = function _encode() {
  return this.getX().toArray('be', this.curve.p.byteLength());
};

Point.fromJSON = function fromJSON(curve, obj) {
  return new Point(curve, obj[0], obj[1] || curve.one);
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' z: ' + this.z.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.z.cmpn(0) === 0;
};

Point.prototype.dbl = function dbl() {
  // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
  // 2M + 2S + 4A

  // A = X1 + Z1
  var a = this.x.redAdd(this.z);
  // AA = A^2
  var aa = a.redSqr();
  // B = X1 - Z1
  var b = this.x.redSub(this.z);
  // BB = B^2
  var bb = b.redSqr();
  // C = AA - BB
  var c = aa.redSub(bb);
  // X3 = AA * BB
  var nx = aa.redMul(bb);
  // Z3 = C * (BB + A24 * C)
  var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
  return this.curve.point(nx, nz);
};

Point.prototype.add = function add() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.diffAdd = function diffAdd(p, diff) {
  // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
  // 4M + 2S + 6A

  // A = X2 + Z2
  var a = this.x.redAdd(this.z);
  // B = X2 - Z2
  var b = this.x.redSub(this.z);
  // C = X3 + Z3
  var c = p.x.redAdd(p.z);
  // D = X3 - Z3
  var d = p.x.redSub(p.z);
  // DA = D * A
  var da = d.redMul(a);
  // CB = C * B
  var cb = c.redMul(b);
  // X5 = Z1 * (DA + CB)^2
  var nx = diff.z.redMul(da.redAdd(cb).redSqr());
  // Z5 = X1 * (DA - CB)^2
  var nz = diff.x.redMul(da.redISub(cb).redSqr());
  return this.curve.point(nx, nz);
};

Point.prototype.mul = function mul(k) {
  var t = k.clone();
  var a = this; // (N / 2) * Q + Q
  var b = this.curve.point(null, null); // (N / 2) * Q
  var c = this; // Q

  for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
    bits.push(t.andln(1));

  for (var i = bits.length - 1; i >= 0; i--) {
    if (bits[i] === 0) {
      // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
      a = a.diffAdd(b, c);
      // N * Q = 2 * ((N / 2) * Q + Q))
      b = b.dbl();
    } else {
      // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
      b = a.diffAdd(b, c);
      // N * Q + Q = 2 * ((N / 2) * Q + Q)
      a = a.dbl();
    }
  }
  return b;
};

Point.prototype.mulAdd = function mulAdd() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.jumlAdd = function jumlAdd() {
  throw new Error('Not supported on Montgomery curve');
};

Point.prototype.eq = function eq(other) {
  return this.getX().cmp(other.getX()) === 0;
};

Point.prototype.normalize = function normalize() {
  this.x = this.x.redMul(this.z.redInvm());
  this.z = this.curve.one;
  return this;
};

Point.prototype.getX = function getX() {
  // Normalize coordinates
  this.normalize();

  return this.x.fromRed();
};


/***/ }),

/***/ 216338:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(427433);
var BN = __webpack_require__(213550);
var inherits = __webpack_require__(394378);
var Base = __webpack_require__(623026);

var assert = utils.assert;

function ShortCurve(conf) {
  Base.call(this, 'short', conf);

  this.a = new BN(conf.a, 16).toRed(this.red);
  this.b = new BN(conf.b, 16).toRed(this.red);
  this.tinv = this.two.redInvm();

  this.zeroA = this.a.fromRed().cmpn(0) === 0;
  this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;

  // If the curve is endomorphic, precalculate beta and lambda
  this.endo = this._getEndomorphism(conf);
  this._endoWnafT1 = new Array(4);
  this._endoWnafT2 = new Array(4);
}
inherits(ShortCurve, Base);
module.exports = ShortCurve;

ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
  // No efficient endomorphism
  if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
    return;

  // Compute beta and lambda, that lambda * P = (beta * Px; Py)
  var beta;
  var lambda;
  if (conf.beta) {
    beta = new BN(conf.beta, 16).toRed(this.red);
  } else {
    var betas = this._getEndoRoots(this.p);
    // Choose the smallest beta
    beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
    beta = beta.toRed(this.red);
  }
  if (conf.lambda) {
    lambda = new BN(conf.lambda, 16);
  } else {
    // Choose the lambda that is matching selected beta
    var lambdas = this._getEndoRoots(this.n);
    if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
      lambda = lambdas[0];
    } else {
      lambda = lambdas[1];
      assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
    }
  }

  // Get basis vectors, used for balanced length-two representation
  var basis;
  if (conf.basis) {
    basis = conf.basis.map(function(vec) {
      return {
        a: new BN(vec.a, 16),
        b: new BN(vec.b, 16)
      };
    });
  } else {
    basis = this._getEndoBasis(lambda);
  }

  return {
    beta: beta,
    lambda: lambda,
    basis: basis
  };
};

ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
  // Find roots of for x^2 + x + 1 in F
  // Root = (-1 +- Sqrt(-3)) / 2
  //
  var red = num === this.p ? this.red : BN.mont(num);
  var tinv = new BN(2).toRed(red).redInvm();
  var ntinv = tinv.redNeg();

  var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);

  var l1 = ntinv.redAdd(s).fromRed();
  var l2 = ntinv.redSub(s).fromRed();
  return [ l1, l2 ];
};

ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
  // aprxSqrt >= sqrt(this.n)
  var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));

  // 3.74
  // Run EGCD, until r(L + 1) < aprxSqrt
  var u = lambda;
  var v = this.n.clone();
  var x1 = new BN(1);
  var y1 = new BN(0);
  var x2 = new BN(0);
  var y2 = new BN(1);

  // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
  var a0;
  var b0;
  // First vector
  var a1;
  var b1;
  // Second vector
  var a2;
  var b2;

  var prevR;
  var i = 0;
  var r;
  var x;
  while (u.cmpn(0) !== 0) {
    var q = v.div(u);
    r = v.sub(q.mul(u));
    x = x2.sub(q.mul(x1));
    var y = y2.sub(q.mul(y1));

    if (!a1 && r.cmp(aprxSqrt) < 0) {
      a0 = prevR.neg();
      b0 = x1;
      a1 = r.neg();
      b1 = x;
    } else if (a1 && ++i === 2) {
      break;
    }
    prevR = r;

    v = u;
    u = r;
    x2 = x1;
    x1 = x;
    y2 = y1;
    y1 = y;
  }
  a2 = r.neg();
  b2 = x;

  var len1 = a1.sqr().add(b1.sqr());
  var len2 = a2.sqr().add(b2.sqr());
  if (len2.cmp(len1) >= 0) {
    a2 = a0;
    b2 = b0;
  }

  // Normalize signs
  if (a1.negative) {
    a1 = a1.neg();
    b1 = b1.neg();
  }
  if (a2.negative) {
    a2 = a2.neg();
    b2 = b2.neg();
  }

  return [
    { a: a1, b: b1 },
    { a: a2, b: b2 }
  ];
};

ShortCurve.prototype._endoSplit = function _endoSplit(k) {
  var basis = this.endo.basis;
  var v1 = basis[0];
  var v2 = basis[1];

  var c1 = v2.b.mul(k).divRound(this.n);
  var c2 = v1.b.neg().mul(k).divRound(this.n);

  var p1 = c1.mul(v1.a);
  var p2 = c2.mul(v2.a);
  var q1 = c1.mul(v1.b);
  var q2 = c2.mul(v2.b);

  // Calculate answer
  var k1 = k.sub(p1).sub(p2);
  var k2 = q1.add(q2).neg();
  return { k1: k1, k2: k2 };
};

ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
  x = new BN(x, 16);
  if (!x.red)
    x = x.toRed(this.red);

  var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
  var y = y2.redSqrt();
  if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
    throw new Error('invalid point');

  // XXX Is there any way to tell if the number is odd without converting it
  // to non-red form?
  var isOdd = y.fromRed().isOdd();
  if (odd && !isOdd || !odd && isOdd)
    y = y.redNeg();

  return this.point(x, y);
};

ShortCurve.prototype.validate = function validate(point) {
  if (point.inf)
    return true;

  var x = point.x;
  var y = point.y;

  var ax = this.a.redMul(x);
  var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
  return y.redSqr().redISub(rhs).cmpn(0) === 0;
};

ShortCurve.prototype._endoWnafMulAdd =
    function _endoWnafMulAdd(points, coeffs, jacobianResult) {
  var npoints = this._endoWnafT1;
  var ncoeffs = this._endoWnafT2;
  for (var i = 0; i < points.length; i++) {
    var split = this._endoSplit(coeffs[i]);
    var p = points[i];
    var beta = p._getBeta();

    if (split.k1.negative) {
      split.k1.ineg();
      p = p.neg(true);
    }
    if (split.k2.negative) {
      split.k2.ineg();
      beta = beta.neg(true);
    }

    npoints[i * 2] = p;
    npoints[i * 2 + 1] = beta;
    ncoeffs[i * 2] = split.k1;
    ncoeffs[i * 2 + 1] = split.k2;
  }
  var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);

  // Clean-up references to points and coefficients
  for (var j = 0; j < i * 2; j++) {
    npoints[j] = null;
    ncoeffs[j] = null;
  }
  return res;
};

function Point(curve, x, y, isRed) {
  Base.BasePoint.call(this, curve, 'affine');
  if (x === null && y === null) {
    this.x = null;
    this.y = null;
    this.inf = true;
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    // Force redgomery representation when loading from JSON
    if (isRed) {
      this.x.forceRed(this.curve.red);
      this.y.forceRed(this.curve.red);
    }
    if (!this.x.red)
      this.x = this.x.toRed(this.curve.red);
    if (!this.y.red)
      this.y = this.y.toRed(this.curve.red);
    this.inf = false;
  }
}
inherits(Point, Base.BasePoint);

ShortCurve.prototype.point = function point(x, y, isRed) {
  return new Point(this, x, y, isRed);
};

ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
  return Point.fromJSON(this, obj, red);
};

Point.prototype._getBeta = function _getBeta() {
  if (!this.curve.endo)
    return;

  var pre = this.precomputed;
  if (pre && pre.beta)
    return pre.beta;

  var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
  if (pre) {
    var curve = this.curve;
    var endoMul = function(p) {
      return curve.point(p.x.redMul(curve.endo.beta), p.y);
    };
    pre.beta = beta;
    beta.precomputed = {
      beta: null,
      naf: pre.naf && {
        wnd: pre.naf.wnd,
        points: pre.naf.points.map(endoMul)
      },
      doubles: pre.doubles && {
        step: pre.doubles.step,
        points: pre.doubles.points.map(endoMul)
      }
    };
  }
  return beta;
};

Point.prototype.toJSON = function toJSON() {
  if (!this.precomputed)
    return [ this.x, this.y ];

  return [ this.x, this.y, this.precomputed && {
    doubles: this.precomputed.doubles && {
      step: this.precomputed.doubles.step,
      points: this.precomputed.doubles.points.slice(1)
    },
    naf: this.precomputed.naf && {
      wnd: this.precomputed.naf.wnd,
      points: this.precomputed.naf.points.slice(1)
    }
  } ];
};

Point.fromJSON = function fromJSON(curve, obj, red) {
  if (typeof obj === 'string')
    obj = JSON.parse(obj);
  var res = curve.point(obj[0], obj[1], red);
  if (!obj[2])
    return res;

  function obj2point(obj) {
    return curve.point(obj[0], obj[1], red);
  }

  var pre = obj[2];
  res.precomputed = {
    beta: null,
    doubles: pre.doubles && {
      step: pre.doubles.step,
      points: [ res ].concat(pre.doubles.points.map(obj2point))
    },
    naf: pre.naf && {
      wnd: pre.naf.wnd,
      points: [ res ].concat(pre.naf.points.map(obj2point))
    }
  };
  return res;
};

Point.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC Point Infinity>';
  return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
      ' y: ' + this.y.fromRed().toString(16, 2) + '>';
};

Point.prototype.isInfinity = function isInfinity() {
  return this.inf;
};

Point.prototype.add = function add(p) {
  // O + P = P
  if (this.inf)
    return p;

  // P + O = P
  if (p.inf)
    return this;

  // P + P = 2P
  if (this.eq(p))
    return this.dbl();

  // P + (-P) = O
  if (this.neg().eq(p))
    return this.curve.point(null, null);

  // P + Q = O
  if (this.x.cmp(p.x) === 0)
    return this.curve.point(null, null);

  var c = this.y.redSub(p.y);
  if (c.cmpn(0) !== 0)
    c = c.redMul(this.x.redSub(p.x).redInvm());
  var nx = c.redSqr().redISub(this.x).redISub(p.x);
  var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  return this.curve.point(nx, ny);
};

Point.prototype.dbl = function dbl() {
  if (this.inf)
    return this;

  // 2P = O
  var ys1 = this.y.redAdd(this.y);
  if (ys1.cmpn(0) === 0)
    return this.curve.point(null, null);

  var a = this.curve.a;

  var x2 = this.x.redSqr();
  var dyinv = ys1.redInvm();
  var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);

  var nx = c.redSqr().redISub(this.x.redAdd(this.x));
  var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
  return this.curve.point(nx, ny);
};

Point.prototype.getX = function getX() {
  return this.x.fromRed();
};

Point.prototype.getY = function getY() {
  return this.y.fromRed();
};

Point.prototype.mul = function mul(k) {
  k = new BN(k, 16);
  if (this.isInfinity())
    return this;
  else if (this._hasDoubles(k))
    return this.curve._fixedNafMul(this, k);
  else if (this.curve.endo)
    return this.curve._endoWnafMulAdd([ this ], [ k ]);
  else
    return this.curve._wnafMul(this, k);
};

Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
  var points = [ this, p2 ];
  var coeffs = [ k1, k2 ];
  if (this.curve.endo)
    return this.curve._endoWnafMulAdd(points, coeffs);
  else
    return this.curve._wnafMulAdd(1, points, coeffs, 2);
};

Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
  var points = [ this, p2 ];
  var coeffs = [ k1, k2 ];
  if (this.curve.endo)
    return this.curve._endoWnafMulAdd(points, coeffs, true);
  else
    return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
};

Point.prototype.eq = function eq(p) {
  return this === p ||
         this.inf === p.inf &&
             (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
};

Point.prototype.neg = function neg(_precompute) {
  if (this.inf)
    return this;

  var res = this.curve.point(this.x, this.y.redNeg());
  if (_precompute && this.precomputed) {
    var pre = this.precomputed;
    var negate = function(p) {
      return p.neg();
    };
    res.precomputed = {
      naf: pre.naf && {
        wnd: pre.naf.wnd,
        points: pre.naf.points.map(negate)
      },
      doubles: pre.doubles && {
        step: pre.doubles.step,
        points: pre.doubles.points.map(negate)
      }
    };
  }
  return res;
};

Point.prototype.toJ = function toJ() {
  if (this.inf)
    return this.curve.jpoint(null, null, null);

  var res = this.curve.jpoint(this.x, this.y, this.curve.one);
  return res;
};

function JPoint(curve, x, y, z) {
  Base.BasePoint.call(this, curve, 'jacobian');
  if (x === null && y === null && z === null) {
    this.x = this.curve.one;
    this.y = this.curve.one;
    this.z = new BN(0);
  } else {
    this.x = new BN(x, 16);
    this.y = new BN(y, 16);
    this.z = new BN(z, 16);
  }
  if (!this.x.red)
    this.x = this.x.toRed(this.curve.red);
  if (!this.y.red)
    this.y = this.y.toRed(this.curve.red);
  if (!this.z.red)
    this.z = this.z.toRed(this.curve.red);

  this.zOne = this.z === this.curve.one;
}
inherits(JPoint, Base.BasePoint);

ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
  return new JPoint(this, x, y, z);
};

JPoint.prototype.toP = function toP() {
  if (this.isInfinity())
    return this.curve.point(null, null);

  var zinv = this.z.redInvm();
  var zinv2 = zinv.redSqr();
  var ax = this.x.redMul(zinv2);
  var ay = this.y.redMul(zinv2).redMul(zinv);

  return this.curve.point(ax, ay);
};

JPoint.prototype.neg = function neg() {
  return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
};

JPoint.prototype.add = function add(p) {
  // O + P = P
  if (this.isInfinity())
    return p;

  // P + O = P
  if (p.isInfinity())
    return this;

  // 12M + 4S + 7A
  var pz2 = p.z.redSqr();
  var z2 = this.z.redSqr();
  var u1 = this.x.redMul(pz2);
  var u2 = p.x.redMul(z2);
  var s1 = this.y.redMul(pz2.redMul(p.z));
  var s2 = p.y.redMul(z2.redMul(this.z));

  var h = u1.redSub(u2);
  var r = s1.redSub(s2);
  if (h.cmpn(0) === 0) {
    if (r.cmpn(0) !== 0)
      return this.curve.jpoint(null, null, null);
    else
      return this.dbl();
  }

  var h2 = h.redSqr();
  var h3 = h2.redMul(h);
  var v = u1.redMul(h2);

  var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  var nz = this.z.redMul(p.z).redMul(h);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.mixedAdd = function mixedAdd(p) {
  // O + P = P
  if (this.isInfinity())
    return p.toJ();

  // P + O = P
  if (p.isInfinity())
    return this;

  // 8M + 3S + 7A
  var z2 = this.z.redSqr();
  var u1 = this.x;
  var u2 = p.x.redMul(z2);
  var s1 = this.y;
  var s2 = p.y.redMul(z2).redMul(this.z);

  var h = u1.redSub(u2);
  var r = s1.redSub(s2);
  if (h.cmpn(0) === 0) {
    if (r.cmpn(0) !== 0)
      return this.curve.jpoint(null, null, null);
    else
      return this.dbl();
  }

  var h2 = h.redSqr();
  var h3 = h2.redMul(h);
  var v = u1.redMul(h2);

  var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
  var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
  var nz = this.z.redMul(h);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.dblp = function dblp(pow) {
  if (pow === 0)
    return this;
  if (this.isInfinity())
    return this;
  if (!pow)
    return this.dbl();

  if (this.curve.zeroA || this.curve.threeA) {
    var r = this;
    for (var i = 0; i < pow; i++)
      r = r.dbl();
    return r;
  }

  // 1M + 2S + 1A + N * (4S + 5M + 8A)
  // N = 1 => 6M + 6S + 9A
  var a = this.curve.a;
  var tinv = this.curve.tinv;

  var jx = this.x;
  var jy = this.y;
  var jz = this.z;
  var jz4 = jz.redSqr().redSqr();

  // Reuse results
  var jyd = jy.redAdd(jy);
  for (var i = 0; i < pow; i++) {
    var jx2 = jx.redSqr();
    var jyd2 = jyd.redSqr();
    var jyd4 = jyd2.redSqr();
    var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));

    var t1 = jx.redMul(jyd2);
    var nx = c.redSqr().redISub(t1.redAdd(t1));
    var t2 = t1.redISub(nx);
    var dny = c.redMul(t2);
    dny = dny.redIAdd(dny).redISub(jyd4);
    var nz = jyd.redMul(jz);
    if (i + 1 < pow)
      jz4 = jz4.redMul(jyd4);

    jx = nx;
    jz = nz;
    jyd = dny;
  }

  return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
};

JPoint.prototype.dbl = function dbl() {
  if (this.isInfinity())
    return this;

  if (this.curve.zeroA)
    return this._zeroDbl();
  else if (this.curve.threeA)
    return this._threeDbl();
  else
    return this._dbl();
};

JPoint.prototype._zeroDbl = function _zeroDbl() {
  var nx;
  var ny;
  var nz;
  // Z = 1
  if (this.zOne) {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
    //     #doubling-mdbl-2007-bl
    // 1M + 5S + 14A

    // XX = X1^2
    var xx = this.x.redSqr();
    // YY = Y1^2
    var yy = this.y.redSqr();
    // YYYY = YY^2
    var yyyy = yy.redSqr();
    // S = 2 * ((X1 + YY)^2 - XX - YYYY)
    var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
    s = s.redIAdd(s);
    // M = 3 * XX + a; a = 0
    var m = xx.redAdd(xx).redIAdd(xx);
    // T = M ^ 2 - 2*S
    var t = m.redSqr().redISub(s).redISub(s);

    // 8 * YYYY
    var yyyy8 = yyyy.redIAdd(yyyy);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    yyyy8 = yyyy8.redIAdd(yyyy8);

    // X3 = T
    nx = t;
    // Y3 = M * (S - T) - 8 * YYYY
    ny = m.redMul(s.redISub(t)).redISub(yyyy8);
    // Z3 = 2*Y1
    nz = this.y.redAdd(this.y);
  } else {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
    //     #doubling-dbl-2009-l
    // 2M + 5S + 13A

    // A = X1^2
    var a = this.x.redSqr();
    // B = Y1^2
    var b = this.y.redSqr();
    // C = B^2
    var c = b.redSqr();
    // D = 2 * ((X1 + B)^2 - A - C)
    var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
    d = d.redIAdd(d);
    // E = 3 * A
    var e = a.redAdd(a).redIAdd(a);
    // F = E^2
    var f = e.redSqr();

    // 8 * C
    var c8 = c.redIAdd(c);
    c8 = c8.redIAdd(c8);
    c8 = c8.redIAdd(c8);

    // X3 = F - 2 * D
    nx = f.redISub(d).redISub(d);
    // Y3 = E * (D - X3) - 8 * C
    ny = e.redMul(d.redISub(nx)).redISub(c8);
    // Z3 = 2 * Y1 * Z1
    nz = this.y.redMul(this.z);
    nz = nz.redIAdd(nz);
  }

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype._threeDbl = function _threeDbl() {
  var nx;
  var ny;
  var nz;
  // Z = 1
  if (this.zOne) {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
    //     #doubling-mdbl-2007-bl
    // 1M + 5S + 15A

    // XX = X1^2
    var xx = this.x.redSqr();
    // YY = Y1^2
    var yy = this.y.redSqr();
    // YYYY = YY^2
    var yyyy = yy.redSqr();
    // S = 2 * ((X1 + YY)^2 - XX - YYYY)
    var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
    s = s.redIAdd(s);
    // M = 3 * XX + a
    var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
    // T = M^2 - 2 * S
    var t = m.redSqr().redISub(s).redISub(s);
    // X3 = T
    nx = t;
    // Y3 = M * (S - T) - 8 * YYYY
    var yyyy8 = yyyy.redIAdd(yyyy);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    yyyy8 = yyyy8.redIAdd(yyyy8);
    ny = m.redMul(s.redISub(t)).redISub(yyyy8);
    // Z3 = 2 * Y1
    nz = this.y.redAdd(this.y);
  } else {
    // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
    // 3M + 5S

    // delta = Z1^2
    var delta = this.z.redSqr();
    // gamma = Y1^2
    var gamma = this.y.redSqr();
    // beta = X1 * gamma
    var beta = this.x.redMul(gamma);
    // alpha = 3 * (X1 - delta) * (X1 + delta)
    var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
    alpha = alpha.redAdd(alpha).redIAdd(alpha);
    // X3 = alpha^2 - 8 * beta
    var beta4 = beta.redIAdd(beta);
    beta4 = beta4.redIAdd(beta4);
    var beta8 = beta4.redAdd(beta4);
    nx = alpha.redSqr().redISub(beta8);
    // Z3 = (Y1 + Z1)^2 - gamma - delta
    nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
    // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
    var ggamma8 = gamma.redSqr();
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ggamma8 = ggamma8.redIAdd(ggamma8);
    ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
  }

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype._dbl = function _dbl() {
  var a = this.curve.a;

  // 4M + 6S + 10A
  var jx = this.x;
  var jy = this.y;
  var jz = this.z;
  var jz4 = jz.redSqr().redSqr();

  var jx2 = jx.redSqr();
  var jy2 = jy.redSqr();

  var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));

  var jxd4 = jx.redAdd(jx);
  jxd4 = jxd4.redIAdd(jxd4);
  var t1 = jxd4.redMul(jy2);
  var nx = c.redSqr().redISub(t1.redAdd(t1));
  var t2 = t1.redISub(nx);

  var jyd8 = jy2.redSqr();
  jyd8 = jyd8.redIAdd(jyd8);
  jyd8 = jyd8.redIAdd(jyd8);
  jyd8 = jyd8.redIAdd(jyd8);
  var ny = c.redMul(t2).redISub(jyd8);
  var nz = jy.redAdd(jy).redMul(jz);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.trpl = function trpl() {
  if (!this.curve.zeroA)
    return this.dbl().add(this);

  // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
  // 5M + 10S + ...

  // XX = X1^2
  var xx = this.x.redSqr();
  // YY = Y1^2
  var yy = this.y.redSqr();
  // ZZ = Z1^2
  var zz = this.z.redSqr();
  // YYYY = YY^2
  var yyyy = yy.redSqr();
  // M = 3 * XX + a * ZZ2; a = 0
  var m = xx.redAdd(xx).redIAdd(xx);
  // MM = M^2
  var mm = m.redSqr();
  // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
  var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
  e = e.redIAdd(e);
  e = e.redAdd(e).redIAdd(e);
  e = e.redISub(mm);
  // EE = E^2
  var ee = e.redSqr();
  // T = 16*YYYY
  var t = yyyy.redIAdd(yyyy);
  t = t.redIAdd(t);
  t = t.redIAdd(t);
  t = t.redIAdd(t);
  // U = (M + E)^2 - MM - EE - T
  var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
  // X3 = 4 * (X1 * EE - 4 * YY * U)
  var yyu4 = yy.redMul(u);
  yyu4 = yyu4.redIAdd(yyu4);
  yyu4 = yyu4.redIAdd(yyu4);
  var nx = this.x.redMul(ee).redISub(yyu4);
  nx = nx.redIAdd(nx);
  nx = nx.redIAdd(nx);
  // Y3 = 8 * Y1 * (U * (T - U) - E * EE)
  var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
  ny = ny.redIAdd(ny);
  ny = ny.redIAdd(ny);
  ny = ny.redIAdd(ny);
  // Z3 = (Z1 + E)^2 - ZZ - EE
  var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);

  return this.curve.jpoint(nx, ny, nz);
};

JPoint.prototype.mul = function mul(k, kbase) {
  k = new BN(k, kbase);

  return this.curve._wnafMul(this, k);
};

JPoint.prototype.eq = function eq(p) {
  if (p.type === 'affine')
    return this.eq(p.toJ());

  if (this === p)
    return true;

  // x1 * z2^2 == x2 * z1^2
  var z2 = this.z.redSqr();
  var pz2 = p.z.redSqr();
  if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
    return false;

  // y1 * z2^3 == y2 * z1^3
  var z3 = z2.redMul(this.z);
  var pz3 = pz2.redMul(p.z);
  return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
};

JPoint.prototype.eqXToP = function eqXToP(x) {
  var zs = this.z.redSqr();
  var rx = x.toRed(this.curve.red).redMul(zs);
  if (this.x.cmp(rx) === 0)
    return true;

  var xc = x.clone();
  var t = this.curve.redN.redMul(zs);
  for (;;) {
    xc.iadd(this.curve.n);
    if (xc.cmp(this.curve.p) >= 0)
      return false;

    rx.redIAdd(t);
    if (this.x.cmp(rx) === 0)
      return true;
  }
};

JPoint.prototype.inspect = function inspect() {
  if (this.isInfinity())
    return '<EC JPoint Infinity>';
  return '<EC JPoint x: ' + this.x.toString(16, 2) +
      ' y: ' + this.y.toString(16, 2) +
      ' z: ' + this.z.toString(16, 2) + '>';
};

JPoint.prototype.isInfinity = function isInfinity() {
  // XXX This code assumes that zero is always zero in red
  return this.z.cmpn(0) === 0;
};


/***/ }),

/***/ 72204:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var curves = exports;

var hash = __webpack_require__(633715);
var curve = __webpack_require__(650145);
var utils = __webpack_require__(427433);

var assert = utils.assert;

function PresetCurve(options) {
  if (options.type === 'short')
    this.curve = new curve.short(options);
  else if (options.type === 'edwards')
    this.curve = new curve.edwards(options);
  else
    this.curve = new curve.mont(options);
  this.g = this.curve.g;
  this.n = this.curve.n;
  this.hash = options.hash;

  assert(this.g.validate(), 'Invalid curve');
  assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
}
curves.PresetCurve = PresetCurve;

function defineCurve(name, options) {
  Object.defineProperty(curves, name, {
    configurable: true,
    enumerable: true,
    get: function() {
      var curve = new PresetCurve(options);
      Object.defineProperty(curves, name, {
        configurable: true,
        enumerable: true,
        value: curve
      });
      return curve;
    }
  });
}

defineCurve('p192', {
  type: 'short',
  prime: 'p192',
  p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
  a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
  b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
  n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
  hash: hash.sha256,
  gRed: false,
  g: [
    '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
    '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'
  ]
});

defineCurve('p224', {
  type: 'short',
  prime: 'p224',
  p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
  a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
  b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
  n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
  hash: hash.sha256,
  gRed: false,
  g: [
    'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
    'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'
  ]
});

defineCurve('p256', {
  type: 'short',
  prime: null,
  p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
  a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
  b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
  n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
  hash: hash.sha256,
  gRed: false,
  g: [
    '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
    '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'
  ]
});

defineCurve('p384', {
  type: 'short',
  prime: null,
  p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'fffffffe ffffffff 00000000 00000000 ffffffff',
  a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'fffffffe ffffffff 00000000 00000000 fffffffc',
  b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
     '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
  n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
     'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
  hash: hash.sha384,
  gRed: false,
  g: [
    'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
    '5502f25d bf55296c 3a545e38 72760ab7',
    '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
    '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'
  ]
});

defineCurve('p521', {
  type: 'short',
  prime: null,
  p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff',
  a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff ffffffff ffffffff fffffffc',
  b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
     '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
     '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
  n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
     'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
     'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
  hash: hash.sha512,
  gRed: false,
  g: [
    '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
    '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
    'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
    '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
    '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
    '3fad0761 353c7086 a272c240 88be9476 9fd16650'
  ]
});

defineCurve('curve25519', {
  type: 'mont',
  prime: 'p25519',
  p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  a: '76d06',
  b: '1',
  n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  hash: hash.sha256,
  gRed: false,
  g: [
    '9'
  ]
});

defineCurve('ed25519', {
  type: 'edwards',
  prime: 'p25519',
  p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
  a: '-1',
  c: '1',
  // -121665 * (121666^(-1)) (mod P)
  d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
  n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
  hash: hash.sha256,
  gRed: false,
  g: [
    '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',

    // 4/5
    '6666666666666666666666666666666666666666666666666666666666666658'
  ]
});

var pre;
try {
  pre = __webpack_require__(840105);
} catch (e) {
  pre = undefined;
}

defineCurve('secp256k1', {
  type: 'short',
  prime: 'k256',
  p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
  a: '0',
  b: '7',
  n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
  h: '1',
  hash: hash.sha256,

  // Precomputed endomorphism
  beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
  lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
  basis: [
    {
      a: '3086d221a7d46bcde86c90e49284eb15',
      b: '-e4437ed6010e88286f547fa90abfe4c3'
    },
    {
      a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
      b: '3086d221a7d46bcde86c90e49284eb15'
    }
  ],

  gRed: false,
  g: [
    '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
    '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
    pre
  ]
});


/***/ }),

/***/ 884423:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var HmacDRBG = __webpack_require__(302156);
var utils = __webpack_require__(427433);
var curves = __webpack_require__(72204);
var rand = __webpack_require__(929931);
var assert = utils.assert;

var KeyPair = __webpack_require__(521816);
var Signature = __webpack_require__(791559);

function EC(options) {
  if (!(this instanceof EC))
    return new EC(options);

  // Shortcut `elliptic.ec(curve-name)`
  if (typeof options === 'string') {
    assert(curves.hasOwnProperty(options), 'Unknown curve ' + options);

    options = curves[options];
  }

  // Shortcut for `elliptic.ec(elliptic.curves.curveName)`
  if (options instanceof curves.PresetCurve)
    options = { curve: options };

  this.curve = options.curve.curve;
  this.n = this.curve.n;
  this.nh = this.n.ushrn(1);
  this.g = this.curve.g;

  // Point on curve
  this.g = options.curve.g;
  this.g.precompute(options.curve.n.bitLength() + 1);

  // Hash for function for DRBG
  this.hash = options.hash || options.curve.hash;
}
module.exports = EC;

EC.prototype.keyPair = function keyPair(options) {
  return new KeyPair(this, options);
};

EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
  return KeyPair.fromPrivate(this, priv, enc);
};

EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
  return KeyPair.fromPublic(this, pub, enc);
};

EC.prototype.genKeyPair = function genKeyPair(options) {
  if (!options)
    options = {};

  // Instantiate Hmac_DRBG
  var drbg = new HmacDRBG({
    hash: this.hash,
    pers: options.pers,
    persEnc: options.persEnc || 'utf8',
    entropy: options.entropy || rand(this.hash.hmacStrength),
    entropyEnc: options.entropy && options.entropyEnc || 'utf8',
    nonce: this.n.toArray()
  });

  var bytes = this.n.byteLength();
  var ns2 = this.n.sub(new BN(2));
  do {
    var priv = new BN(drbg.generate(bytes));
    if (priv.cmp(ns2) > 0)
      continue;

    priv.iaddn(1);
    return this.keyFromPrivate(priv);
  } while (true);
};

EC.prototype._truncateToN = function truncateToN(msg, truncOnly) {
  var delta = msg.byteLength() * 8 - this.n.bitLength();
  if (delta > 0)
    msg = msg.ushrn(delta);
  if (!truncOnly && msg.cmp(this.n) >= 0)
    return msg.sub(this.n);
  else
    return msg;
};

EC.prototype.sign = function sign(msg, key, enc, options) {
  if (typeof enc === 'object') {
    options = enc;
    enc = null;
  }
  if (!options)
    options = {};

  key = this.keyFromPrivate(key, enc);
  msg = this._truncateToN(new BN(msg, 16));

  // Zero-extend key to provide enough entropy
  var bytes = this.n.byteLength();
  var bkey = key.getPrivate().toArray('be', bytes);

  // Zero-extend nonce to have the same byte size as N
  var nonce = msg.toArray('be', bytes);

  // Instantiate Hmac_DRBG
  var drbg = new HmacDRBG({
    hash: this.hash,
    entropy: bkey,
    nonce: nonce,
    pers: options.pers,
    persEnc: options.persEnc || 'utf8'
  });

  // Number of bytes to generate
  var ns1 = this.n.sub(new BN(1));

  for (var iter = 0; true; iter++) {
    var k = options.k ?
        options.k(iter) :
        new BN(drbg.generate(this.n.byteLength()));
    k = this._truncateToN(k, true);
    if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
      continue;

    var kp = this.g.mul(k);
    if (kp.isInfinity())
      continue;

    var kpX = kp.getX();
    var r = kpX.umod(this.n);
    if (r.cmpn(0) === 0)
      continue;

    var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
    s = s.umod(this.n);
    if (s.cmpn(0) === 0)
      continue;

    var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
                        (kpX.cmp(r) !== 0 ? 2 : 0);

    // Use complement of `s`, if it is > `n / 2`
    if (options.canonical && s.cmp(this.nh) > 0) {
      s = this.n.sub(s);
      recoveryParam ^= 1;
    }

    return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
  }
};

EC.prototype.verify = function verify(msg, signature, key, enc) {
  msg = this._truncateToN(new BN(msg, 16));
  key = this.keyFromPublic(key, enc);
  signature = new Signature(signature, 'hex');

  // Perform primitive values validation
  var r = signature.r;
  var s = signature.s;
  if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
    return false;
  if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
    return false;

  // Validate signature
  var sinv = s.invm(this.n);
  var u1 = sinv.mul(msg).umod(this.n);
  var u2 = sinv.mul(r).umod(this.n);

  if (!this.curve._maxwellTrick) {
    var p = this.g.mulAdd(u1, key.getPublic(), u2);
    if (p.isInfinity())
      return false;

    return p.getX().umod(this.n).cmp(r) === 0;
  }

  // NOTE: Greg Maxwell's trick, inspired by:
  // https://git.io/vad3K

  var p = this.g.jmulAdd(u1, key.getPublic(), u2);
  if (p.isInfinity())
    return false;

  // Compare `p.x` of Jacobian point with `r`,
  // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
  // inverse of `p.z^2`
  return p.eqXToP(r);
};

EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
  assert((3 & j) === j, 'The recovery param is more than two bits');
  signature = new Signature(signature, enc);

  var n = this.n;
  var e = new BN(msg);
  var r = signature.r;
  var s = signature.s;

  // A set LSB signifies that the y-coordinate is odd
  var isYOdd = j & 1;
  var isSecondKey = j >> 1;
  if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
    throw new Error('Unable to find sencond key candinate');

  // 1.1. Let x = r + jn.
  if (isSecondKey)
    r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
  else
    r = this.curve.pointFromX(r, isYOdd);

  var rInv = signature.r.invm(n);
  var s1 = n.sub(e).mul(rInv).umod(n);
  var s2 = s.mul(rInv).umod(n);

  // 1.6.1 Compute Q = r^-1 (sR -  eG)
  //               Q = r^-1 (sR + -eG)
  return this.g.mulAdd(s1, r, s2);
};

EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
  signature = new Signature(signature, enc);
  if (signature.recoveryParam !== null)
    return signature.recoveryParam;

  for (var i = 0; i < 4; i++) {
    var Qprime;
    try {
      Qprime = this.recoverPubKey(e, signature, i);
    } catch (e) {
      continue;
    }

    if (Qprime.eq(Q))
      return i;
  }
  throw new Error('Unable to find valid recovery factor');
};


/***/ }),

/***/ 521816:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(427433);
var assert = utils.assert;

function KeyPair(ec, options) {
  this.ec = ec;
  this.priv = null;
  this.pub = null;

  // KeyPair(ec, { priv: ..., pub: ... })
  if (options.priv)
    this._importPrivate(options.priv, options.privEnc);
  if (options.pub)
    this._importPublic(options.pub, options.pubEnc);
}
module.exports = KeyPair;

KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
  if (pub instanceof KeyPair)
    return pub;

  return new KeyPair(ec, {
    pub: pub,
    pubEnc: enc
  });
};

KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
  if (priv instanceof KeyPair)
    return priv;

  return new KeyPair(ec, {
    priv: priv,
    privEnc: enc
  });
};

KeyPair.prototype.validate = function validate() {
  var pub = this.getPublic();

  if (pub.isInfinity())
    return { result: false, reason: 'Invalid public key' };
  if (!pub.validate())
    return { result: false, reason: 'Public key is not a point' };
  if (!pub.mul(this.ec.curve.n).isInfinity())
    return { result: false, reason: 'Public key * N != O' };

  return { result: true, reason: null };
};

KeyPair.prototype.getPublic = function getPublic(compact, enc) {
  // compact is optional argument
  if (typeof compact === 'string') {
    enc = compact;
    compact = null;
  }

  if (!this.pub)
    this.pub = this.ec.g.mul(this.priv);

  if (!enc)
    return this.pub;

  return this.pub.encode(enc, compact);
};

KeyPair.prototype.getPrivate = function getPrivate(enc) {
  if (enc === 'hex')
    return this.priv.toString(16, 2);
  else
    return this.priv;
};

KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
  this.priv = new BN(key, enc || 16);

  // Ensure that the priv won't be bigger than n, otherwise we may fail
  // in fixed multiplication method
  this.priv = this.priv.umod(this.ec.curve.n);
};

KeyPair.prototype._importPublic = function _importPublic(key, enc) {
  if (key.x || key.y) {
    // Montgomery points only have an `x` coordinate.
    // Weierstrass/Edwards points on the other hand have both `x` and
    // `y` coordinates.
    if (this.ec.curve.type === 'mont') {
      assert(key.x, 'Need x coordinate');
    } else if (this.ec.curve.type === 'short' ||
               this.ec.curve.type === 'edwards') {
      assert(key.x && key.y, 'Need both x and y coordinate');
    }
    this.pub = this.ec.curve.point(key.x, key.y);
    return;
  }
  this.pub = this.ec.curve.decodePoint(key, enc);
};

// ECDH
KeyPair.prototype.derive = function derive(pub) {
  return pub.mul(this.priv).getX();
};

// ECDSA
KeyPair.prototype.sign = function sign(msg, enc, options) {
  return this.ec.sign(msg, this, enc, options);
};

KeyPair.prototype.verify = function verify(msg, signature) {
  return this.ec.verify(msg, signature, this);
};

KeyPair.prototype.inspect = function inspect() {
  return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
         ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
};


/***/ }),

/***/ 791559:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);

var utils = __webpack_require__(427433);
var assert = utils.assert;

function Signature(options, enc) {
  if (options instanceof Signature)
    return options;

  if (this._importDER(options, enc))
    return;

  assert(options.r && options.s, 'Signature without r or s');
  this.r = new BN(options.r, 16);
  this.s = new BN(options.s, 16);
  if (options.recoveryParam === undefined)
    this.recoveryParam = null;
  else
    this.recoveryParam = options.recoveryParam;
}
module.exports = Signature;

function Position() {
  this.place = 0;
}

function getLength(buf, p) {
  var initial = buf[p.place++];
  if (!(initial & 0x80)) {
    return initial;
  }
  var octetLen = initial & 0xf;

  // Indefinite length or overflow
  if (octetLen === 0 || octetLen > 4) {
    return false;
  }

  var val = 0;
  for (var i = 0, off = p.place; i < octetLen; i++, off++) {
    val <<= 8;
    val |= buf[off];
    val >>>= 0;
  }

  // Leading zeroes
  if (val <= 0x7f) {
    return false;
  }

  p.place = off;
  return val;
}

function rmPadding(buf) {
  var i = 0;
  var len = buf.length - 1;
  while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
    i++;
  }
  if (i === 0) {
    return buf;
  }
  return buf.slice(i);
}

Signature.prototype._importDER = function _importDER(data, enc) {
  data = utils.toArray(data, enc);
  var p = new Position();
  if (data[p.place++] !== 0x30) {
    return false;
  }
  var len = getLength(data, p);
  if (len === false) {
    return false;
  }
  if ((len + p.place) !== data.length) {
    return false;
  }
  if (data[p.place++] !== 0x02) {
    return false;
  }
  var rlen = getLength(data, p);
  if (rlen === false) {
    return false;
  }
  var r = data.slice(p.place, rlen + p.place);
  p.place += rlen;
  if (data[p.place++] !== 0x02) {
    return false;
  }
  var slen = getLength(data, p);
  if (slen === false) {
    return false;
  }
  if (data.length !== slen + p.place) {
    return false;
  }
  var s = data.slice(p.place, slen + p.place);
  if (r[0] === 0) {
    if (r[1] & 0x80) {
      r = r.slice(1);
    } else {
      // Leading zeroes
      return false;
    }
  }
  if (s[0] === 0) {
    if (s[1] & 0x80) {
      s = s.slice(1);
    } else {
      // Leading zeroes
      return false;
    }
  }

  this.r = new BN(r);
  this.s = new BN(s);
  this.recoveryParam = null;

  return true;
};

function constructLength(arr, len) {
  if (len < 0x80) {
    arr.push(len);
    return;
  }
  var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
  arr.push(octets | 0x80);
  while (--octets) {
    arr.push((len >>> (octets << 3)) & 0xff);
  }
  arr.push(len);
}

Signature.prototype.toDER = function toDER(enc) {
  var r = this.r.toArray();
  var s = this.s.toArray();

  // Pad values
  if (r[0] & 0x80)
    r = [ 0 ].concat(r);
  // Pad values
  if (s[0] & 0x80)
    s = [ 0 ].concat(s);

  r = rmPadding(r);
  s = rmPadding(s);

  while (!s[0] && !(s[1] & 0x80)) {
    s = s.slice(1);
  }
  var arr = [ 0x02 ];
  constructLength(arr, r.length);
  arr = arr.concat(r);
  arr.push(0x02);
  constructLength(arr, s.length);
  var backHalf = arr.concat(s);
  var res = [ 0x30 ];
  constructLength(res, backHalf.length);
  res = res.concat(backHalf);
  return utils.encode(res, enc);
};


/***/ }),

/***/ 96962:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hash = __webpack_require__(633715);
var curves = __webpack_require__(72204);
var utils = __webpack_require__(427433);
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var KeyPair = __webpack_require__(267108);
var Signature = __webpack_require__(819992);

function EDDSA(curve) {
  assert(curve === 'ed25519', 'only tested with ed25519 so far');

  if (!(this instanceof EDDSA))
    return new EDDSA(curve);

  var curve = curves[curve].curve;
  this.curve = curve;
  this.g = curve.g;
  this.g.precompute(curve.n.bitLength() + 1);

  this.pointClass = curve.point().constructor;
  this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
  this.hash = hash.sha512;
}

module.exports = EDDSA;

/**
* @param {Array|String} message - message bytes
* @param {Array|String|KeyPair} secret - secret bytes or a keypair
* @returns {Signature} - signature
*/
EDDSA.prototype.sign = function sign(message, secret) {
  message = parseBytes(message);
  var key = this.keyFromSecret(secret);
  var r = this.hashInt(key.messagePrefix(), message);
  var R = this.g.mul(r);
  var Rencoded = this.encodePoint(R);
  var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
               .mul(key.priv());
  var S = r.add(s_).umod(this.curve.n);
  return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
};

/**
* @param {Array} message - message bytes
* @param {Array|String|Signature} sig - sig bytes
* @param {Array|String|Point|KeyPair} pub - public key
* @returns {Boolean} - true if public key matches sig of message
*/
EDDSA.prototype.verify = function verify(message, sig, pub) {
  message = parseBytes(message);
  sig = this.makeSignature(sig);
  var key = this.keyFromPublic(pub);
  var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
  var SG = this.g.mul(sig.S());
  var RplusAh = sig.R().add(key.pub().mul(h));
  return RplusAh.eq(SG);
};

EDDSA.prototype.hashInt = function hashInt() {
  var hash = this.hash();
  for (var i = 0; i < arguments.length; i++)
    hash.update(arguments[i]);
  return utils.intFromLE(hash.digest()).umod(this.curve.n);
};

EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
  return KeyPair.fromPublic(this, pub);
};

EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
  return KeyPair.fromSecret(this, secret);
};

EDDSA.prototype.makeSignature = function makeSignature(sig) {
  if (sig instanceof Signature)
    return sig;
  return new Signature(this, sig);
};

/**
* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
*
* EDDSA defines methods for encoding and decoding points and integers. These are
* helper convenience methods, that pass along to utility functions implied
* parameters.
*
*/
EDDSA.prototype.encodePoint = function encodePoint(point) {
  var enc = point.getY().toArray('le', this.encodingLength);
  enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
  return enc;
};

EDDSA.prototype.decodePoint = function decodePoint(bytes) {
  bytes = utils.parseBytes(bytes);

  var lastIx = bytes.length - 1;
  var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
  var xIsOdd = (bytes[lastIx] & 0x80) !== 0;

  var y = utils.intFromLE(normed);
  return this.curve.pointFromY(y, xIsOdd);
};

EDDSA.prototype.encodeInt = function encodeInt(num) {
  return num.toArray('le', this.encodingLength);
};

EDDSA.prototype.decodeInt = function decodeInt(bytes) {
  return utils.intFromLE(bytes);
};

EDDSA.prototype.isPoint = function isPoint(val) {
  return val instanceof this.pointClass;
};


/***/ }),

/***/ 267108:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var utils = __webpack_require__(427433);
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var cachedProperty = utils.cachedProperty;

/**
* @param {EDDSA} eddsa - instance
* @param {Object} params - public/private key parameters
*
* @param {Array<Byte>} [params.secret] - secret seed bytes
* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
* @param {Array<Byte>} [params.pub] - public key point encoded as bytes
*
*/
function KeyPair(eddsa, params) {
  this.eddsa = eddsa;
  this._secret = parseBytes(params.secret);
  if (eddsa.isPoint(params.pub))
    this._pub = params.pub;
  else
    this._pubBytes = parseBytes(params.pub);
}

KeyPair.fromPublic = function fromPublic(eddsa, pub) {
  if (pub instanceof KeyPair)
    return pub;
  return new KeyPair(eddsa, { pub: pub });
};

KeyPair.fromSecret = function fromSecret(eddsa, secret) {
  if (secret instanceof KeyPair)
    return secret;
  return new KeyPair(eddsa, { secret: secret });
};

KeyPair.prototype.secret = function secret() {
  return this._secret;
};

cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
  return this.eddsa.encodePoint(this.pub());
});

cachedProperty(KeyPair, 'pub', function pub() {
  if (this._pubBytes)
    return this.eddsa.decodePoint(this._pubBytes);
  return this.eddsa.g.mul(this.priv());
});

cachedProperty(KeyPair, 'privBytes', function privBytes() {
  var eddsa = this.eddsa;
  var hash = this.hash();
  var lastIx = eddsa.encodingLength - 1;

  var a = hash.slice(0, eddsa.encodingLength);
  a[0] &= 248;
  a[lastIx] &= 127;
  a[lastIx] |= 64;

  return a;
});

cachedProperty(KeyPair, 'priv', function priv() {
  return this.eddsa.decodeInt(this.privBytes());
});

cachedProperty(KeyPair, 'hash', function hash() {
  return this.eddsa.hash().update(this.secret()).digest();
});

cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
  return this.hash().slice(this.eddsa.encodingLength);
});

KeyPair.prototype.sign = function sign(message) {
  assert(this._secret, 'KeyPair can only verify');
  return this.eddsa.sign(message, this);
};

KeyPair.prototype.verify = function verify(message, sig) {
  return this.eddsa.verify(message, sig, this);
};

KeyPair.prototype.getSecret = function getSecret(enc) {
  assert(this._secret, 'KeyPair is public only');
  return utils.encode(this.secret(), enc);
};

KeyPair.prototype.getPublic = function getPublic(enc) {
  return utils.encode(this.pubBytes(), enc);
};

module.exports = KeyPair;


/***/ }),

/***/ 819992:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var BN = __webpack_require__(213550);
var utils = __webpack_require__(427433);
var assert = utils.assert;
var cachedProperty = utils.cachedProperty;
var parseBytes = utils.parseBytes;

/**
* @param {EDDSA} eddsa - eddsa instance
* @param {Array<Bytes>|Object} sig -
* @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
* @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
* @param {Array<Bytes>} [sig.Rencoded] - R point encoded
* @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
*/
function Signature(eddsa, sig) {
  this.eddsa = eddsa;

  if (typeof sig !== 'object')
    sig = parseBytes(sig);

  if (Array.isArray(sig)) {
    sig = {
      R: sig.slice(0, eddsa.encodingLength),
      S: sig.slice(eddsa.encodingLength)
    };
  }

  assert(sig.R && sig.S, 'Signature without R or S');

  if (eddsa.isPoint(sig.R))
    this._R = sig.R;
  if (sig.S instanceof BN)
    this._S = sig.S;

  this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
  this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
}

cachedProperty(Signature, 'S', function S() {
  return this.eddsa.decodeInt(this.Sencoded());
});

cachedProperty(Signature, 'R', function R() {
  return this.eddsa.decodePoint(this.Rencoded());
});

cachedProperty(Signature, 'Rencoded', function Rencoded() {
  return this.eddsa.encodePoint(this.R());
});

cachedProperty(Signature, 'Sencoded', function Sencoded() {
  return this.eddsa.encodeInt(this.S());
});

Signature.prototype.toBytes = function toBytes() {
  return this.Rencoded().concat(this.Sencoded());
};

Signature.prototype.toHex = function toHex() {
  return utils.encode(this.toBytes(), 'hex').toUpperCase();
};

module.exports = Signature;


/***/ }),

/***/ 840105:
/***/ ((module) => {

module.exports = {
  doubles: {
    step: 4,
    points: [
      [
        'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
        'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'
      ],
      [
        '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
        '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'
      ],
      [
        '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
        'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'
      ],
      [
        '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
        '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'
      ],
      [
        '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
        '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'
      ],
      [
        '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
        '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'
      ],
      [
        'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
        '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'
      ],
      [
        '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
        'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'
      ],
      [
        'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
        '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'
      ],
      [
        'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
        'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'
      ],
      [
        'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
        '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'
      ],
      [
        '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
        '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'
      ],
      [
        '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
        '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'
      ],
      [
        '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
        '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'
      ],
      [
        '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
        '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'
      ],
      [
        '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
        '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'
      ],
      [
        '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
        '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'
      ],
      [
        '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
        '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'
      ],
      [
        '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
        'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'
      ],
      [
        'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
        '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'
      ],
      [
        'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
        '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'
      ],
      [
        '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
        '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'
      ],
      [
        '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
        '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'
      ],
      [
        'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
        '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'
      ],
      [
        '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
        'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'
      ],
      [
        'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
        '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'
      ],
      [
        'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
        'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'
      ],
      [
        'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
        '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'
      ],
      [
        'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
        'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'
      ],
      [
        'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
        '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'
      ],
      [
        '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
        'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'
      ],
      [
        '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
        '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'
      ],
      [
        'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
        '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'
      ],
      [
        '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
        'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'
      ],
      [
        'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
        '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'
      ],
      [
        'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
        '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'
      ],
      [
        'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
        'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'
      ],
      [
        '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
        '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'
      ],
      [
        '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
        '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'
      ],
      [
        '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
        'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'
      ],
      [
        '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
        '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'
      ],
      [
        'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
        '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'
      ],
      [
        '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
        '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'
      ],
      [
        '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
        'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'
      ],
      [
        '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
        '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'
      ],
      [
        'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
        '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'
      ],
      [
        '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
        'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'
      ],
      [
        'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
        'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'
      ],
      [
        'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
        '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'
      ],
      [
        '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
        'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'
      ],
      [
        '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
        'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'
      ],
      [
        'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
        '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'
      ],
      [
        'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
        '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'
      ],
      [
        'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
        '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'
      ],
      [
        '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
        'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'
      ],
      [
        '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
        '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'
      ],
      [
        'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
        'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'
      ],
      [
        '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
        'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'
      ],
      [
        '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
        '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'
      ],
      [
        '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
        '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'
      ],
      [
        'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
        'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'
      ],
      [
        '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
        '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'
      ],
      [
        '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
        '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'
      ],
      [
        'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
        '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'
      ],
      [
        'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
        'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82'
      ]
    ]
  },
  naf: {
    wnd: 7,
    points: [
      [
        'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
        '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'
      ],
      [
        '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
        'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'
      ],
      [
        '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
        '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'
      ],
      [
        'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
        'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'
      ],
      [
        '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
        'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'
      ],
      [
        'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
        'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'
      ],
      [
        'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
        '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'
      ],
      [
        'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
        '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'
      ],
      [
        '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
        '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'
      ],
      [
        '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
        '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'
      ],
      [
        '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
        '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'
      ],
      [
        '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
        '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'
      ],
      [
        'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
        'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'
      ],
      [
        'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
        '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'
      ],
      [
        '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
        'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'
      ],
      [
        '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
        'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'
      ],
      [
        '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
        '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'
      ],
      [
        '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
        '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'
      ],
      [
        '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
        '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'
      ],
      [
        '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
        'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'
      ],
      [
        'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
        'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'
      ],
      [
        '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
        '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'
      ],
      [
        '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
        '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'
      ],
      [
        'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
        'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'
      ],
      [
        '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
        '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'
      ],
      [
        'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
        'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'
      ],
      [
        'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
        'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'
      ],
      [
        '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
        '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'
      ],
      [
        '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
        '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'
      ],
      [
        '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
        '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'
      ],
      [
        'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
        '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'
      ],
      [
        '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
        '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'
      ],
      [
        'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
        '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'
      ],
      [
        '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
        'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'
      ],
      [
        '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
        'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'
      ],
      [
        'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
        'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'
      ],
      [
        '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
        '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'
      ],
      [
        '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
        'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'
      ],
      [
        'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
        'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'
      ],
      [
        '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
        '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'
      ],
      [
        '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
        'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'
      ],
      [
        '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
        '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'
      ],
      [
        '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
        'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'
      ],
      [
        'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
        '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'
      ],
      [
        '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
        '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'
      ],
      [
        '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
        'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'
      ],
      [
        '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
        'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'
      ],
      [
        'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
        'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'
      ],
      [
        'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
        'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'
      ],
      [
        '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
        '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'
      ],
      [
        '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
        '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'
      ],
      [
        'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
        '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'
      ],
      [
        'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
        'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'
      ],
      [
        '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
        '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'
      ],
      [
        '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
        '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'
      ],
      [
        'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
        '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'
      ],
      [
        '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
        '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'
      ],
      [
        'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
        'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'
      ],
      [
        '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
        'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'
      ],
      [
        '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
        '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'
      ],
      [
        'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
        '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'
      ],
      [
        'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
        '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'
      ],
      [
        '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
        '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'
      ],
      [
        '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
        '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'
      ],
      [
        '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
        'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'
      ],
      [
        '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
        'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'
      ],
      [
        '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
        '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'
      ],
      [
        '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
        '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'
      ],
      [
        '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
        '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'
      ],
      [
        '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
        'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'
      ],
      [
        'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
        'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'
      ],
      [
        '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
        'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'
      ],
      [
        'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
        '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'
      ],
      [
        'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
        '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'
      ],
      [
        'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
        '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'
      ],
      [
        'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
        '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'
      ],
      [
        '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
        'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'
      ],
      [
        '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
        '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'
      ],
      [
        '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
        'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'
      ],
      [
        'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
        'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'
      ],
      [
        'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
        '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'
      ],
      [
        'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
        'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'
      ],
      [
        'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
        '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'
      ],
      [
        '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
        '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'
      ],
      [
        'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
        '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'
      ],
      [
        'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
        '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'
      ],
      [
        '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
        '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'
      ],
      [
        '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
        'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'
      ],
      [
        'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
        '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'
      ],
      [
        'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
        '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'
      ],
      [
        'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
        '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'
      ],
      [
        '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
        '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'
      ],
      [
        'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
        'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'
      ],
      [
        '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
        'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'
      ],
      [
        'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
        'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'
      ],
      [
        'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
        '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'
      ],
      [
        '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
        'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'
      ],
      [
        'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
        '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'
      ],
      [
        'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
        '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'
      ],
      [
        'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
        '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'
      ],
      [
        '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
        'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'
      ],
      [
        '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
        'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'
      ],
      [
        'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
        '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'
      ],
      [
        '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
        'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'
      ],
      [
        '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
        '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'
      ],
      [
        '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
        'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'
      ],
      [
        'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
        'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'
      ],
      [
        '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
        'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'
      ],
      [
        '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
        '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'
      ],
      [
        '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
        'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'
      ],
      [
        '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
        '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'
      ],
      [
        'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
        'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'
      ],
      [
        '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
        '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'
      ],
      [
        'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
        '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'
      ],
      [
        '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
        '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'
      ],
      [
        'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
        'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'
      ],
      [
        'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
        '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'
      ],
      [
        'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
        'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'
      ],
      [
        '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
        'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'
      ],
      [
        '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
        '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'
      ],
      [
        '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
        'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'
      ],
      [
        '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
        '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'
      ],
      [
        '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
        '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'
      ],
      [
        '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
        'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'
      ],
      [
        '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
        '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'
      ],
      [
        '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
        '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'
      ],
      [
        '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
        '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9'
      ]
    ]
  }
};


/***/ }),

/***/ 427433:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var utils = exports;
var BN = __webpack_require__(213550);
var minAssert = __webpack_require__(79746);
var minUtils = __webpack_require__(434504);

utils.assert = minAssert;
utils.toArray = minUtils.toArray;
utils.zero2 = minUtils.zero2;
utils.toHex = minUtils.toHex;
utils.encode = minUtils.encode;

// Represent num in a w-NAF form
function getNAF(num, w, bits) {
  var naf = new Array(Math.max(num.bitLength(), bits) + 1);
  naf.fill(0);

  var ws = 1 << (w + 1);
  var k = num.clone();

  for (var i = 0; i < naf.length; i++) {
    var z;
    var mod = k.andln(ws - 1);
    if (k.isOdd()) {
      if (mod > (ws >> 1) - 1)
        z = (ws >> 1) - mod;
      else
        z = mod;
      k.isubn(z);
    } else {
      z = 0;
    }

    naf[i] = z;
    k.iushrn(1);
  }

  return naf;
}
utils.getNAF = getNAF;

// Represent k1, k2 in a Joint Sparse Form
function getJSF(k1, k2) {
  var jsf = [
    [],
    []
  ];

  k1 = k1.clone();
  k2 = k2.clone();
  var d1 = 0;
  var d2 = 0;
  while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {

    // First phase
    var m14 = (k1.andln(3) + d1) & 3;
    var m24 = (k2.andln(3) + d2) & 3;
    if (m14 === 3)
      m14 = -1;
    if (m24 === 3)
      m24 = -1;
    var u1;
    if ((m14 & 1) === 0) {
      u1 = 0;
    } else {
      var m8 = (k1.andln(7) + d1) & 7;
      if ((m8 === 3 || m8 === 5) && m24 === 2)
        u1 = -m14;
      else
        u1 = m14;
    }
    jsf[0].push(u1);

    var u2;
    if ((m24 & 1) === 0) {
      u2 = 0;
    } else {
      var m8 = (k2.andln(7) + d2) & 7;
      if ((m8 === 3 || m8 === 5) && m14 === 2)
        u2 = -m24;
      else
        u2 = m24;
    }
    jsf[1].push(u2);

    // Second phase
    if (2 * d1 === u1 + 1)
      d1 = 1 - d1;
    if (2 * d2 === u2 + 1)
      d2 = 1 - d2;
    k1.iushrn(1);
    k2.iushrn(1);
  }

  return jsf;
}
utils.getJSF = getJSF;

function cachedProperty(obj, name, computer) {
  var key = '_' + name;
  obj.prototype[name] = function cachedProperty() {
    return this[key] !== undefined ? this[key] :
           this[key] = computer.call(this);
  };
}
utils.cachedProperty = cachedProperty;

function parseBytes(bytes) {
  return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
                                     bytes;
}
utils.parseBytes = parseBytes;

function intFromLE(bytes) {
  return new BN(bytes, 'hex', 'le');
}
utils.intFromLE = intFromLE;



/***/ }),

/***/ 26223:
/***/ ((module) => {

"use strict";
module.exports = {"i8":"6.5.3"};

/***/ }),

/***/ 236500:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(902703)


/***/ }),

/***/ 902703:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* eslint-disable no-useless-escape */
const utils = __webpack_require__(838023)
const BN = __webpack_require__(213550)

var ABI = function () {
}

// Convert from short to canonical names
// FIXME: optimise or make this nicer?
function elementaryName (name) {
  if (name.startsWith('int[')) {
    return 'int256' + name.slice(3)
  } else if (name === 'int') {
    return 'int256'
  } else if (name.startsWith('uint[')) {
    return 'uint256' + name.slice(4)
  } else if (name === 'uint') {
    return 'uint256'
  } else if (name.startsWith('fixed[')) {
    return 'fixed128x128' + name.slice(5)
  } else if (name === 'fixed') {
    return 'fixed128x128'
  } else if (name.startsWith('ufixed[')) {
    return 'ufixed128x128' + name.slice(6)
  } else if (name === 'ufixed') {
    return 'ufixed128x128'
  }
  return name
}

ABI.eventID = function (name, types) {
  // FIXME: use node.js util.format?
  var sig = name + '(' + types.map(elementaryName).join(',') + ')'
  return utils.keccak256(Buffer.from(sig))
}

ABI.methodID = function (name, types) {
  return ABI.eventID(name, types).slice(0, 4)
}

// Parse N from type<N>
function parseTypeN (type) {
  return parseInt(/^\D+(\d+)$/.exec(type)[1], 10)
}

// Parse N,M from type<N>x<M>
function parseTypeNxM (type) {
  var tmp = /^\D+(\d+)x(\d+)$/.exec(type)
  return [ parseInt(tmp[1], 10), parseInt(tmp[2], 10) ]
}

// Parse N in type[<N>] where "type" can itself be an array type.
function parseTypeArray (type) {
  var tmp = type.match(/(.*)\[(.*?)\]$/)
  if (tmp) {
    return tmp[2] === '' ? 'dynamic' : parseInt(tmp[2], 10)
  }
  return null
}

function parseNumber (arg) {
  var type = typeof arg
  if (type === 'string') {
    if (utils.isHexPrefixed(arg)) {
      return new BN(utils.stripHexPrefix(arg), 16)
    } else {
      return new BN(arg, 10)
    }
  } else if (type === 'number') {
    return new BN(arg)
  } else if (arg.toArray) {
    // assume this is a BN for the moment, replace with BN.isBN soon
    return arg
  } else {
    throw new Error('Argument is not a number')
  }
}

// someMethod(bytes,uint)
// someMethod(bytes,uint):(boolean)
function parseSignature (sig) {
  var tmp = /^(\w+)\((.*)\)$/.exec(sig)

  if (tmp.length !== 3) {
    throw new Error('Invalid method signature')
  }

  var args = /^(.+)\):\((.+)$/.exec(tmp[2])

  if (args !== null && args.length === 3) {
    return {
      method: tmp[1],
      args: args[1].split(','),
      retargs: args[2].split(',')
    }
  } else {
    var params = tmp[2].split(',')
    if (params.length === 1 && params[0] === '') {
      // Special-case (possibly naive) fixup for functions that take no arguments.
      // TODO: special cases are always bad, but this makes the function return
      // match what the calling functions expect
      params = []
    }
    return {
      method: tmp[1],
      args: params
    }
  }
}

// Encodes a single item (can be dynamic array)
// @returns: Buffer
function encodeSingle (type, arg) {
  var size, num, ret, i

  if (type === 'address') {
    return encodeSingle('uint160', parseNumber(arg))
  } else if (type === 'bool') {
    return encodeSingle('uint8', arg ? 1 : 0)
  } else if (type === 'string') {
    return encodeSingle('bytes', Buffer.from(arg, 'utf8'))
  } else if (isArray(type)) {
    // this part handles fixed-length ([2]) and variable length ([]) arrays
    // NOTE: we catch here all calls to arrays, that simplifies the rest
    if (typeof arg.length === 'undefined') {
      throw new Error('Not an array?')
    }
    size = parseTypeArray(type)
    if (size !== 'dynamic' && size !== 0 && arg.length > size) {
      throw new Error('Elements exceed array size: ' + size)
    }
    ret = []
    type = type.slice(0, type.lastIndexOf('['))
    if (typeof arg === 'string') {
      arg = JSON.parse(arg)
    }
    for (i in arg) {
      ret.push(encodeSingle(type, arg[i]))
    }
    if (size === 'dynamic') {
      var length = encodeSingle('uint256', arg.length)
      ret.unshift(length)
    }
    return Buffer.concat(ret)
  } else if (type === 'bytes') {
    arg = Buffer.from(arg)

    ret = Buffer.concat([ encodeSingle('uint256', arg.length), arg ])

    if ((arg.length % 32) !== 0) {
      ret = Buffer.concat([ ret, utils.zeros(32 - (arg.length % 32)) ])
    }

    return ret
  } else if (type.startsWith('bytes')) {
    size = parseTypeN(type)
    if (size < 1 || size > 32) {
      throw new Error('Invalid bytes<N> width: ' + size)
    }

    return utils.setLengthRight(arg, 32)
  } else if (type.startsWith('uint')) {
    size = parseTypeN(type)
    if ((size % 8) || (size < 8) || (size > 256)) {
      throw new Error('Invalid uint<N> width: ' + size)
    }

    num = parseNumber(arg)
    if (num.bitLength() > size) {
      throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())
    }

    if (num < 0) {
      throw new Error('Supplied uint is negative')
    }

    return num.toArrayLike(Buffer, 'be', 32)
  } else if (type.startsWith('int')) {
    size = parseTypeN(type)
    if ((size % 8) || (size < 8) || (size > 256)) {
      throw new Error('Invalid int<N> width: ' + size)
    }

    num = parseNumber(arg)
    if (num.bitLength() > size) {
      throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())
    }

    return num.toTwos(256).toArrayLike(Buffer, 'be', 32)
  } else if (type.startsWith('ufixed')) {
    size = parseTypeNxM(type)

    num = parseNumber(arg)

    if (num < 0) {
      throw new Error('Supplied ufixed is negative')
    }

    return encodeSingle('uint256', num.mul(new BN(2).pow(new BN(size[1]))))
  } else if (type.startsWith('fixed')) {
    size = parseTypeNxM(type)

    return encodeSingle('int256', parseNumber(arg).mul(new BN(2).pow(new BN(size[1]))))
  }

  throw new Error('Unsupported or invalid type: ' + type)
}

// Decodes a single item (can be dynamic array)
// @returns: array
// FIXME: this method will need a lot of attention at checking limits and validation
function decodeSingle (parsedType, data, offset) {
  if (typeof parsedType === 'string') {
    parsedType = parseType(parsedType)
  }
  var size, num, ret, i

  if (parsedType.name === 'address') {
    return decodeSingle(parsedType.rawType, data, offset).toArrayLike(Buffer, 'be', 20).toString('hex')
  } else if (parsedType.name === 'bool') {
    return decodeSingle(parsedType.rawType, data, offset).toString() === new BN(1).toString()
  } else if (parsedType.name === 'string') {
    var bytes = decodeSingle(parsedType.rawType, data, offset)
    return Buffer.from(bytes, 'utf8').toString()
  } else if (parsedType.isArray) {
    // this part handles fixed-length arrays ([2]) and variable length ([]) arrays
    // NOTE: we catch here all calls to arrays, that simplifies the rest
    ret = []
    size = parsedType.size

    if (parsedType.size === 'dynamic') {
      offset = decodeSingle('uint256', data, offset).toNumber()
      size = decodeSingle('uint256', data, offset).toNumber()
      offset = offset + 32
    }
    for (i = 0; i < size; i++) {
      var decoded = decodeSingle(parsedType.subArray, data, offset)
      ret.push(decoded)
      offset += parsedType.subArray.memoryUsage
    }
    return ret
  } else if (parsedType.name === 'bytes') {
    offset = decodeSingle('uint256', data, offset).toNumber()
    size = decodeSingle('uint256', data, offset).toNumber()
    return data.slice(offset + 32, offset + 32 + size)
  } else if (parsedType.name.startsWith('bytes')) {
    return data.slice(offset, offset + parsedType.size)
  } else if (parsedType.name.startsWith('uint')) {
    num = new BN(data.slice(offset, offset + 32), 16, 'be')
    if (num.bitLength() > parsedType.size) {
      throw new Error('Decoded int exceeds width: ' + parsedType.size + ' vs ' + num.bitLength())
    }
    return num
  } else if (parsedType.name.startsWith('int')) {
    num = new BN(data.slice(offset, offset + 32), 16, 'be').fromTwos(256)
    if (num.bitLength() > parsedType.size) {
      throw new Error('Decoded uint exceeds width: ' + parsedType.size + ' vs ' + num.bitLength())
    }

    return num
  } else if (parsedType.name.startsWith('ufixed')) {
    size = new BN(2).pow(new BN(parsedType.size[1]))
    num = decodeSingle('uint256', data, offset)
    if (!num.mod(size).isZero()) {
      throw new Error('Decimals not supported yet')
    }
    return num.div(size)
  } else if (parsedType.name.startsWith('fixed')) {
    size = new BN(2).pow(new BN(parsedType.size[1]))
    num = decodeSingle('int256', data, offset)
    if (!num.mod(size).isZero()) {
      throw new Error('Decimals not supported yet')
    }
    return num.div(size)
  }
  throw new Error('Unsupported or invalid type: ' + parsedType.name)
}

// Parse the given type
// @returns: {} containing the type itself, memory usage and (including size and subArray if applicable)
function parseType (type) {
  var size
  var ret
  if (isArray(type)) {
    size = parseTypeArray(type)
    var subArray = type.slice(0, type.lastIndexOf('['))
    subArray = parseType(subArray)
    ret = {
      isArray: true,
      name: type,
      size: size,
      memoryUsage: size === 'dynamic' ? 32 : subArray.memoryUsage * size,
      subArray: subArray
    }
    return ret
  } else {
    var rawType
    switch (type) {
      case 'address':
        rawType = 'uint160'
        break
      case 'bool':
        rawType = 'uint8'
        break
      case 'string':
        rawType = 'bytes'
        break
    }
    ret = {
      rawType: rawType,
      name: type,
      memoryUsage: 32
    }

    if ((type.startsWith('bytes') && type !== 'bytes') || type.startsWith('uint') || type.startsWith('int')) {
      ret.size = parseTypeN(type)
    } else if (type.startsWith('ufixed') || type.startsWith('fixed')) {
      ret.size = parseTypeNxM(type)
    }

    if (type.startsWith('bytes') && type !== 'bytes' && (ret.size < 1 || ret.size > 32)) {
      throw new Error('Invalid bytes<N> width: ' + ret.size)
    }
    if ((type.startsWith('uint') || type.startsWith('int')) && (ret.size % 8 || ret.size < 8 || ret.size > 256)) {
      throw new Error('Invalid int/uint<N> width: ' + ret.size)
    }
    return ret
  }
}

// Is a type dynamic?
function isDynamic (type) {
  // FIXME: handle all types? I don't think anything is missing now
  return (type === 'string') || (type === 'bytes') || (parseTypeArray(type) === 'dynamic')
}

// Is a type an array?
function isArray (type) {
  return type.lastIndexOf(']') === type.length - 1
}

// Encode a method/event with arguments
// @types an array of string type names
// @args  an array of the appropriate values
ABI.rawEncode = function (types, values) {
  var output = []
  var data = []

  var headLength = 0

  types.forEach(function (type) {
    if (isArray(type)) {
      var size = parseTypeArray(type)

      if (size !== 'dynamic') {
        headLength += 32 * size
      } else {
        headLength += 32
      }
    } else {
      headLength += 32
    }
  })

  for (var i = 0; i < types.length; i++) {
    var type = elementaryName(types[i])
    var value = values[i]
    var cur = encodeSingle(type, value)

    // Use the head/tail method for storing dynamic data
    if (isDynamic(type)) {
      output.push(encodeSingle('uint256', headLength))
      data.push(cur)
      headLength += cur.length
    } else {
      output.push(cur)
    }
  }

  return Buffer.concat(output.concat(data))
}

ABI.rawDecode = function (types, data) {
  var ret = []
  data = Buffer.from(data)
  var offset = 0
  for (var i = 0; i < types.length; i++) {
    var type = elementaryName(types[i])
    var parsed = parseType(type, data, offset)
    var decoded = decodeSingle(parsed, data, offset)
    offset += parsed.memoryUsage
    ret.push(decoded)
  }
  return ret
}

ABI.simpleEncode = function (method) {
  var args = Array.prototype.slice.call(arguments).slice(1)
  var sig = parseSignature(method)

  // FIXME: validate/convert arguments
  if (args.length !== sig.args.length) {
    throw new Error('Argument count mismatch')
  }

  return Buffer.concat([ ABI.methodID(sig.method, sig.args), ABI.rawEncode(sig.args, args) ])
}

ABI.simpleDecode = function (method, data) {
  var sig = parseSignature(method)

  // FIXME: validate/convert arguments
  if (!sig.retargs) {
    throw new Error('No return values in method')
  }

  return ABI.rawDecode(sig.retargs, data)
}

function stringify (type, value) {
  if (type.startsWith('address') || type.startsWith('bytes')) {
    return '0x' + value.toString('hex')
  } else {
    return value.toString()
  }
}

ABI.stringify = function (types, values) {
  var ret = []

  for (var i in types) {
    var type = types[i]
    var value = values[i]

    // if it is an array type, concat the items
    if (/^[^\[]+\[.*\]$/.test(type)) {
      value = value.map(function (item) {
        return stringify(type, item)
      }).join(', ')
    } else {
      value = stringify(type, value)
    }

    ret.push(value)
  }

  return ret
}

ABI.solidityPack = function (types, values) {
  if (types.length !== values.length) {
    throw new Error('Number of types are not matching the values')
  }

  var size, num
  var ret = []

  for (var i = 0; i < types.length; i++) {
    var type = elementaryName(types[i])
    var value = values[i]

    if (type === 'bytes') {
      ret.push(value)
    } else if (type === 'string') {
      ret.push(Buffer.from(value, 'utf8'))
    } else if (type === 'bool') {
      ret.push(Buffer.from(value ? '01' : '00', 'hex'))
    } else if (type === 'address') {
      ret.push(utils.setLengthLeft(value, 20))
    } else if (type.startsWith('bytes')) {
      size = parseTypeN(type)
      if (size < 1 || size > 32) {
        throw new Error('Invalid bytes<N> width: ' + size)
      }

      ret.push(utils.setLengthRight(value, size))
    } else if (type.startsWith('uint')) {
      size = parseTypeN(type)
      if ((size % 8) || (size < 8) || (size > 256)) {
        throw new Error('Invalid uint<N> width: ' + size)
      }

      num = parseNumber(value)
      if (num.bitLength() > size) {
        throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength())
      }

      ret.push(num.toArrayLike(Buffer, 'be', size / 8))
    } else if (type.startsWith('int')) {
      size = parseTypeN(type)
      if ((size % 8) || (size < 8) || (size > 256)) {
        throw new Error('Invalid int<N> width: ' + size)
      }

      num = parseNumber(value)
      if (num.bitLength() > size) {
        throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength())
      }

      ret.push(num.toTwos(size).toArrayLike(Buffer, 'be', size / 8))
    } else {
      // FIXME: support all other types
      throw new Error('Unsupported or invalid type: ' + type)
    }
  }

  return Buffer.concat(ret)
}

ABI.soliditySHA3 = function (types, values) {
  return utils.keccak256(ABI.solidityPack(types, values))
}

ABI.soliditySHA256 = function (types, values) {
  return utils.sha256(ABI.solidityPack(types, values))
}

ABI.solidityRIPEMD160 = function (types, values) {
  return utils.ripemd160(ABI.solidityPack(types, values), true)
}

// Serpent's users are familiar with this encoding
// - s: string
// - b: bytes
// - b<N>: bytes<N>
// - i: int256
// - a: int256[]

function isNumeric (c) {
  // FIXME: is this correct? Seems to work
  return (c >= '0') && (c <= '9')
}

// For a "documentation" refer to https://github.com/ethereum/serpent/blob/develop/preprocess.cpp
ABI.fromSerpent = function (sig) {
  var ret = []
  for (var i = 0; i < sig.length; i++) {
    var type = sig[i]
    if (type === 's') {
      ret.push('bytes')
    } else if (type === 'b') {
      var tmp = 'bytes'
      var j = i + 1
      while ((j < sig.length) && isNumeric(sig[j])) {
        tmp += sig[j] - '0'
        j++
      }
      i = j - 1
      ret.push(tmp)
    } else if (type === 'i') {
      ret.push('int256')
    } else if (type === 'a') {
      ret.push('int256[]')
    } else {
      throw new Error('Unsupported or invalid type: ' + type)
    }
  }
  return ret
}

ABI.toSerpent = function (types) {
  var ret = []
  for (var i = 0; i < types.length; i++) {
    var type = types[i]
    if (type === 'bytes') {
      ret.push('s')
    } else if (type.startsWith('bytes')) {
      ret.push('b' + parseTypeN(type))
    } else if (type === 'int256') {
      ret.push('i')
    } else if (type === 'int256[]') {
      ret.push('a')
    } else {
      throw new Error('Unsupported or invalid type: ' + type)
    }
  }
  return ret.join('')
}

module.exports = ABI


/***/ }),

/***/ 169424:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(443663);
var hash_1 = __webpack_require__(851487);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 443663:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 287127:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 851487:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(814167);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(443663);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 838023:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(287127));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(169424));
/**
 * Hash functions
 */
__export(__webpack_require__(851487));
/**
 * ECDSA signature
 */
__export(__webpack_require__(305127));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(443663));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(521951));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 521951:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(443663);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 305127:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(443663);
var hash_1 = __webpack_require__(851487);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 274778:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(943161)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 814167:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(274778)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(7217)
}


/***/ }),

/***/ 7217:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(943161)(__webpack_require__(106223))


/***/ }),

/***/ 943161:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(72860)
const createShake = __webpack_require__(198023)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 72860:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 198023:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 284365:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 106223:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(284365)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 774719:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Common = __webpack_require__(265982).default
const utils = __webpack_require__(334366)
const BN = utils.BN
  /**
   * An object that repersents the block header
   * @constructor
   * @param {Array} data raw data, deserialized
   * @param {Array} opts Options
   * @param {String|Number} opts.chain The chain for the block header [default: 'mainnet']
   * @param {String} opts.hardfork Hardfork for the block header [default: null, block number-based behaviour]
   * @param {Object} opts.common Alternatively pass a Common instance instead of setting chain/hardfork directly
   * @prop {Buffer} parentHash the blocks' parent's hash
   * @prop {Buffer} uncleHash sha3(rlp_encode(uncle_list))
   * @prop {Buffer} coinbase the miner address
   * @prop {Buffer} stateRoot The root of a Merkle Patricia tree
   * @prop {Buffer} transactionTrie the root of a Trie containing the transactions
   * @prop {Buffer} receiptTrie the root of a Trie containing the transaction Reciept
   * @prop {Buffer} bloom
   * @prop {Buffer} difficulty
   * @prop {Buffer} number the block's height
   * @prop {Buffer} gasLimit
   * @prop {Buffer} gasUsed
   * @prop {Buffer} timestamp
   * @prop {Buffer} extraData
   * @prop {Array.<Buffer>} raw an array of buffers containing the raw blocks.
   */
var BlockHeader = module.exports = function (data, opts) {
  opts = opts || {}

  if (opts.common) {
    if (opts.chain) {
      throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!')
    }
    this._common = opts.common
  } else {
    let chain = opts.chain ? opts.chain : 'mainnet'
    let hardfork = opts.hardfork ? opts.hardfork : null
    this._common = new Common(chain, hardfork)
  }

  var fields = [{
    name: 'parentHash',
    length: 32,
    default: utils.zeros(32)
  }, {
    name: 'uncleHash',
    default: utils.SHA3_RLP_ARRAY
  }, {
    name: 'coinbase',
    length: 20,
    default: utils.zeros(20)
  }, {
    name: 'stateRoot',
    length: 32,
    default: utils.zeros(32)
  }, {
    name: 'transactionsTrie',
    length: 32,
    default: utils.SHA3_RLP
  }, {
    name: 'receiptTrie',
    length: 32,
    default: utils.SHA3_RLP
  }, {
    name: 'bloom',
    default: utils.zeros(256)
  }, {
    name: 'difficulty',
    default: Buffer.from([])
  }, {
    name: 'number',
    // TODO: params.homeSteadForkNumber.v left for legacy reasons, replace on future release
    default: utils.intToBuffer(1150000)
  }, {
    name: 'gasLimit',
    default: Buffer.from('ffffffffffffff', 'hex')
  }, {
    name: 'gasUsed',
    empty: true,
    default: Buffer.from([])
  }, {
    name: 'timestamp',
    default: Buffer.from([])
  }, {
    name: 'extraData',
    allowZero: true,
    empty: true,
    default: Buffer.from([])
  }, {
    name: 'mixHash',
    default: utils.zeros(32)
      // length: 32
  }, {
    name: 'nonce',
    default: utils.zeros(8) // sha3(42)
  }]
  utils.defineProperties(this, fields, data)
}

/**
 * Returns the canoncical difficulty of the block
 * @method canonicalDifficulty
 * @param {Block} parentBlock the parent `Block` of the this header
 * @return {BN}
 */
BlockHeader.prototype.canonicalDifficulty = function (parentBlock) {
  const hardfork = this._common.hardfork() || this._common.activeHardfork(utils.bufferToInt(this.number))
  const blockTs = new BN(this.timestamp)
  const parentTs = new BN(parentBlock.header.timestamp)
  const parentDif = new BN(parentBlock.header.difficulty)
  const minimumDifficulty = new BN(this._common.param('pow', 'minimumDifficulty', hardfork))
  var offset = parentDif.div(new BN(this._common.param('pow', 'difficultyBoundDivisor', hardfork)))
  var num = new BN(this.number)
  var a
  var cutoff
  var dif

  if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) {
    // max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99) (EIP100)
    var uncleAddend = parentBlock.header.uncleHash.equals(utils.SHA3_RLP_ARRAY) ? 1 : 2
    a = blockTs.sub(parentTs).idivn(9).ineg().iaddn(uncleAddend)
    cutoff = new BN(-99)
    // MAX(cutoff, a)
    if (cutoff.cmp(a) === 1) {
      a = cutoff
    }
    dif = parentDif.add(offset.mul(a))
  }

  if (this._common.hardforkGteHardfork(hardfork, 'muirGlacier')) {
    // Istanbul/Berlin difficulty bomb delay (EIP2384)
    num.isubn(9000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'constantinople')) {
    // Constantinople difficulty bomb delay (EIP1234)
    num.isubn(5000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) {
    // Byzantium difficulty bomb delay (EIP649)
    num.isubn(3000000)
    if (num.ltn(0)) {
      num = new BN(0)
    }
  } else if (this._common.hardforkGteHardfork(hardfork, 'homestead')) {
    // 1 - (block_timestamp - parent_timestamp) // 10
    a = blockTs.sub(parentTs).idivn(10).ineg().iaddn(1)
    cutoff = new BN(-99)
    // MAX(cutoff, a)
    if (cutoff.cmp(a) === 1) {
      a = cutoff
    }
    dif = parentDif.add(offset.mul(a))
  } else {
    // pre-homestead
    if (parentTs.addn(this._common.param('pow', 'durationLimit', hardfork)).cmp(blockTs) === 1) {
      dif = offset.add(parentDif)
    } else {
      dif = parentDif.sub(offset)
    }
  }

  var exp = num.idivn(100000).isubn(2)
  if (!exp.isNeg()) {
    dif.iadd(new BN(2).pow(exp))
  }

  if (dif.cmp(minimumDifficulty) === -1) {
    dif = minimumDifficulty
  }

  return dif
}

/**
 * checks that the block's `difficuly` matches the canonical difficulty
 * @method validateDifficulty
 * @param {Block} parentBlock this block's parent
 * @return {Boolean}
 */
BlockHeader.prototype.validateDifficulty = function (parentBlock) {
  const dif = this.canonicalDifficulty(parentBlock)
  return dif.cmp(new BN(this.difficulty)) === 0
}

/**
 * Validates the gasLimit
 * @method validateGasLimit
 * @param {Block} parentBlock this block's parent
 * @returns {Boolean}
 */
BlockHeader.prototype.validateGasLimit = function (parentBlock) {
  const pGasLimit = new BN(parentBlock.header.gasLimit)
  const gasLimit = new BN(this.gasLimit)
  const hardfork = this._common.hardfork() ? this._common.hardfork() : this._common.activeHardfork(this.number)
  const a = pGasLimit.div(new BN(this._common.param('gasConfig', 'gasLimitBoundDivisor', hardfork)))
  const maxGasLimit = pGasLimit.add(a)
  const minGasLimit = pGasLimit.sub(a)

  return gasLimit.lt(maxGasLimit) && gasLimit.gt(minGasLimit) && gasLimit.gte(this._common.param('gasConfig', 'minGasLimit', hardfork))
}

/**
 * Validates the entire block header
 * @method validate
 * @param {Blockchain} blockChain the blockchain that this block is validating against
 * @param {Bignum} [height] if this is an uncle header, this is the height of the block that is including it
 * @param {Function} cb the callback function. The callback is given an `error` if the block is invalid
 */
BlockHeader.prototype.validate = function (blockchain, height, cb) {
  var self = this
  if (arguments.length === 2) {
    cb = height
    height = false
  }

  if (this.isGenesis()) {
    return cb()
  }

  // find the blocks parent
  blockchain.getBlock(self.parentHash, function (err, parentBlock) {
    if (err) {
      return cb('could not find parent block')
    }

    self.parentBlock = parentBlock

    var number = new BN(self.number)
    if (number.cmp(new BN(parentBlock.header.number).iaddn(1)) !== 0) {
      return cb('invalid number')
    }

    if (height) {
      var dif = height.sub(new BN(parentBlock.header.number))
      if (!(dif.cmpn(8) === -1 && dif.cmpn(1) === 1)) {
        return cb('uncle block has a parent that is too old or to young')
      }
    }

    if (!self.validateDifficulty(parentBlock)) {
      return cb('invalid Difficulty')
    }

    if (!self.validateGasLimit(parentBlock)) {
      return cb('invalid gas limit')
    }

    if (utils.bufferToInt(parentBlock.header.number) + 1 !== utils.bufferToInt(self.number)) {
      return cb('invalid heigth')
    }

    if (utils.bufferToInt(self.timestamp) <= utils.bufferToInt(parentBlock.header.timestamp)) {
      return cb('invalid timestamp')
    }

    const hardfork = self._common.hardfork() ? self._common.hardfork() : self._common.activeHardfork(height)
    if (self.extraData.length > self._common.param('vm', 'maxExtraDataSize', hardfork)) {
      return cb('invalid amount of extra data')
    }

    cb()
  })
}

/**
 * Returns the sha3 hash of the blockheader
 * @method hash
 * @return {Buffer}
 */
BlockHeader.prototype.hash = function () {
  return utils.rlphash(this.raw)
}

/**
 * checks if the blockheader is a genesis header
 * @method isGenesis
 * @return {Boolean}
 */
BlockHeader.prototype.isGenesis = function () {
  return this.number.toString('hex') === ''
}

/**
 * turns the header into the canonical genesis block header
 * @method setGenesisParams
 */
BlockHeader.prototype.setGenesisParams = function () {
  this.timestamp = this._common.genesis().timestamp
  this.gasLimit = this._common.genesis().gasLimit
  this.difficulty = this._common.genesis().difficulty
  this.extraData = this._common.genesis().extraData
  this.nonce = this._common.genesis().nonce
  this.stateRoot = this._common.genesis().stateRoot
  this.number = Buffer.from([])
}


/***/ }),

/***/ 339951:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Common = __webpack_require__(265982).default
const ethUtil = __webpack_require__(334366)
const { Transaction } = __webpack_require__(567079)
const Trie = __webpack_require__(322970)
const BN = ethUtil.BN
const rlp = ethUtil.rlp
const async = __webpack_require__(641962)
const BlockHeader = __webpack_require__(774719)

/**
 * Creates a new block object
 * @constructor the raw serialized or the deserialized block.
 * @param {Array|Buffer|Object} data
 * @param {Array} opts Options
 * @param {String|Number} opts.chain The chain for the block [default: 'mainnet']
 * @param {String} opts.hardfork Hardfork for the block [default: null, block number-based behaviour]
 * @param {Object} opts.common Alternatively pass a Common instance (ethereumjs-common) instead of setting chain/hardfork directly
 * @prop {Header} header the block's header
 * @prop {Array.<Header>} uncleList an array of uncle headers
 * @prop {Array.<Buffer>} raw an array of buffers containing the raw blocks.
 */
var Block = module.exports = function (data, opts) {
  opts = opts || {}

  if (opts.common) {
    if (opts.chain) {
      throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!')
    }
    this._common = opts.common
  } else {
    let chain = opts.chain ? opts.chain : 'mainnet'
    let hardfork = opts.hardfork ? opts.hardfork : null
    this._common = new Common(chain, hardfork)
  }

  this.transactions = []
  this.uncleHeaders = []
  this._inBlockChain = false
  this.txTrie = new Trie()

  Object.defineProperty(this, 'raw', {
    get: function () {
      return this.serialize(false)
    }
  })

  var rawTransactions, rawUncleHeaders

  // defaults
  if (!data) {
    data = [[], [], []]
  }

  if (Buffer.isBuffer(data)) {
    data = rlp.decode(data)
  }

  if (Array.isArray(data)) {
    this.header = new BlockHeader(data[0], opts)
    rawTransactions = data[1]
    rawUncleHeaders = data[2]
  } else {
    this.header = new BlockHeader(data.header, opts)
    rawTransactions = data.transactions || []
    rawUncleHeaders = data.uncleHeaders || []
  }

  // parse uncle headers
  for (var i = 0; i < rawUncleHeaders.length; i++) {
    this.uncleHeaders.push(new BlockHeader(rawUncleHeaders[i], opts))
  }

  // parse transactions
  for (i = 0; i < rawTransactions.length; i++) {
    var tx = new Transaction(rawTransactions[i], opts)
    tx._homestead = true
    this.transactions.push(tx)
  }
}

Block.Header = BlockHeader

/**
 * Produces a hash the RLP of the block
 * @method hash
 */
Block.prototype.hash = function () {
  return this.header.hash()
}

/**
 * Determines if a given block is the genesis block
 * @method isGenisis
 * @return Boolean
 */
Block.prototype.isGenesis = function () {
  return this.header.isGenesis()
}

/**
 * turns the block into the canonical genesis block
 * @method setGenesisParams
 */
Block.prototype.setGenesisParams = function () {
  this.header.setGenesisParams()
}

/**
 * Produces a serialization of the block.
 * @method serialize
 * @param {Boolean} rlpEncode whether to rlp encode the block or not
 */
Block.prototype.serialize = function (rlpEncode) {
  var raw = [this.header.raw, [],
    []
  ]

  // rlpEnode defaults to true
  if (typeof rlpEncode === 'undefined') {
    rlpEncode = true
  }

  this.transactions.forEach(function (tx) {
    raw[1].push(tx.raw)
  })

  this.uncleHeaders.forEach(function (uncle) {
    raw[2].push(uncle.raw)
  })

  return rlpEncode ? rlp.encode(raw) : raw
}

/**
 * Generate transaction trie. The tx trie must be generated before the transaction trie can
 * be validated with `validateTransactionTrie`
 * @method genTxTrie
 * @param {Function} cb the callback
 */
Block.prototype.genTxTrie = function (cb) {
  var i = 0
  var self = this

  async.eachSeries(this.transactions, function (tx, done) {
    self.txTrie.put(rlp.encode(i), tx.serialize(), done)
    i++
  }, cb)
}

/**
 * Validates the transaction trie
 * @method validateTransactionTrie
 * @return {Boolean}
 */
Block.prototype.validateTransactionsTrie = function () {
  var txT = this.header.transactionsTrie.toString('hex')
  if (this.transactions.length) {
    return txT === this.txTrie.root.toString('hex')
  } else {
    return txT === ethUtil.SHA3_RLP.toString('hex')
  }
}

/**
 * Validates the transactions
 * @method validateTransactions
 * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean
 * @return {Boolean}
 */
Block.prototype.validateTransactions = function (stringError) {
  var errors = []

  this.transactions.forEach(function (tx, i) {
    var error = tx.validate(true)
    if (error) {
      errors.push(error + ' at tx ' + i)
    }
  })

  if (stringError === undefined || stringError === false) {
    return errors.length === 0
  } else {
    return arrayToString(errors)
  }
}

/**
 * Validates the entire block. Returns a string to the callback if block is invalid
 * @method validate
 * @param {BlockChain} blockChain the blockchain that this block wants to be part of
 * @param {Function} cb the callback which is given a `String` if the block is not valid
 */
Block.prototype.validate = function (blockChain, cb) {
  var self = this
  var errors = []

  async.parallel([
    // validate uncles
    self.validateUncles.bind(self, blockChain),
    // validate block
    self.header.validate.bind(self.header, blockChain),
    // generate the transaction trie
    self.genTxTrie.bind(self)
  ], function (err) {
    if (err) {
      errors.push(err)
    }

    if (!self.validateTransactionsTrie()) {
      errors.push('invalid transaction trie')
    }

    var txErrors = self.validateTransactions(true)
    if (txErrors !== '') {
      errors.push(txErrors)
    }

    if (!self.validateUnclesHash()) {
      errors.push('invalid uncle hash')
    }

    cb(arrayToString(errors))
  })
}

/**
 * Validates the uncle's hash
 * @method validateUncleHash
 * @return {Boolean}
 */
Block.prototype.validateUnclesHash = function () {
  var raw = []
  this.uncleHeaders.forEach(function (uncle) {
    raw.push(uncle.raw)
  })

  raw = rlp.encode(raw)
  return ethUtil.sha3(raw).toString('hex') === this.header.uncleHash.toString('hex')
}

/**
 * Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid
 * @method validateUncles
 * @param {Blockchain} blockChaina an instance of the Blockchain
 * @param {Function} cb the callback
 */
Block.prototype.validateUncles = function (blockChain, cb) {
  if (this.isGenesis()) {
    return cb()
  }

  var self = this

  if (self.uncleHeaders.length > 2) {
    return cb('too many uncle headers')
  }

  var uncleHashes = self.uncleHeaders.map(function (header) {
    return header.hash().toString('hex')
  })

  if (!((new Set(uncleHashes)).size === uncleHashes.length)) {
    return cb('duplicate uncles')
  }

  async.each(self.uncleHeaders, function (uncle, cb2) {
    var height = new BN(self.header.number)
    async.parallel([
      uncle.validate.bind(uncle, blockChain, height),
      // check to make sure the uncle is not already in the blockchain
      function (cb3) {
        blockChain.getDetails(uncle.hash(), function (err, blockInfo) {
          // TODO: remove uncles from BC
          if (blockInfo && blockInfo.isUncle) {
            cb3(err || 'uncle already included')
          } else {
            cb3()
          }
        })
      }
    ], cb2)
  }, cb)
}

/**
 * Converts the block toJSON
 * @method toJSON
 * @param {Bool} labeled whether to create an labeled object or an array
 * @return {Object}
 */
Block.prototype.toJSON = function (labeled) {
  if (labeled) {
    var obj = {
      header: this.header.toJSON(true),
      transactions: [],
      uncleHeaders: []
    }

    this.transactions.forEach(function (tx) {
      obj.transactions.push(tx.toJSON(labeled))
    })

    this.uncleHeaders.forEach(function (uh) {
      obj.uncleHeaders.push(uh.toJSON())
    })
    return obj
  } else {
    return ethUtil.baToJSON(this.raw)
  }
}

function arrayToString (array) {
  try {
    return array.reduce(function (str, err) {
      if (str) {
        str += ' '
      }
      return str + err
    })
  } catch (e) {
    return ''
  }
}


/***/ }),

/***/ 641962:
/***/ (function(module, exports, __webpack_require__) {

/* module decorator */ module = __webpack_require__.nmd(module);
(function (global, factory) {
   true ? factory(exports) :
  0;
}(this, (function (exports) { 'use strict';

function slice(arrayLike, start) {
    start = start|0;
    var newLen = Math.max(arrayLike.length - start, 0);
    var newArr = Array(newLen);
    for(var idx = 0; idx < newLen; idx++)  {
        newArr[idx] = arrayLike[start + idx];
    }
    return newArr;
}

/**
 * Creates a continuation function with some arguments already applied.
 *
 * Useful as a shorthand when combined with other control flow functions. Any
 * arguments passed to the returned function are added to the arguments
 * originally passed to apply.
 *
 * @name apply
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {Function} fn - The function you want to eventually apply all
 * arguments to. Invokes with (arguments...).
 * @param {...*} arguments... - Any number of arguments to automatically apply
 * when the continuation is called.
 * @returns {Function} the partially-applied function
 * @example
 *
 * // using apply
 * async.parallel([
 *     async.apply(fs.writeFile, 'testfile1', 'test1'),
 *     async.apply(fs.writeFile, 'testfile2', 'test2')
 * ]);
 *
 *
 * // the same process without using apply
 * async.parallel([
 *     function(callback) {
 *         fs.writeFile('testfile1', 'test1', callback);
 *     },
 *     function(callback) {
 *         fs.writeFile('testfile2', 'test2', callback);
 *     }
 * ]);
 *
 * // It's possible to pass any number of additional arguments when calling the
 * // continuation:
 *
 * node> var fn = async.apply(sys.puts, 'one');
 * node> fn('two', 'three');
 * one
 * two
 * three
 */
var apply = function(fn/*, ...args*/) {
    var args = slice(arguments, 1);
    return function(/*callArgs*/) {
        var callArgs = slice(arguments);
        return fn.apply(null, args.concat(callArgs));
    };
};

var initialParams = function (fn) {
    return function (/*...args, callback*/) {
        var args = slice(arguments);
        var callback = args.pop();
        fn.call(this, args, callback);
    };
};

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';

function fallback(fn) {
    setTimeout(fn, 0);
}

function wrap(defer) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        defer(function () {
            fn.apply(null, args);
        });
    };
}

var _defer;

if (hasSetImmediate) {
    _defer = setImmediate;
} else if (hasNextTick) {
    _defer = process.nextTick;
} else {
    _defer = fallback;
}

var setImmediate$1 = wrap(_defer);

/**
 * Take a sync function and make it async, passing its return value to a
 * callback. This is useful for plugging sync functions into a waterfall,
 * series, or other async functions. Any arguments passed to the generated
 * function will be passed to the wrapped function (except for the final
 * callback argument). Errors thrown will be passed to the callback.
 *
 * If the function passed to `asyncify` returns a Promise, that promises's
 * resolved/rejected state will be used to call the callback, rather than simply
 * the synchronous return value.
 *
 * This also means you can asyncify ES2017 `async` functions.
 *
 * @name asyncify
 * @static
 * @memberOf module:Utils
 * @method
 * @alias wrapSync
 * @category Util
 * @param {Function} func - The synchronous function, or Promise-returning
 * function to convert to an {@link AsyncFunction}.
 * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
 * invoked with `(args..., callback)`.
 * @example
 *
 * // passing a regular synchronous function
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(JSON.parse),
 *     function (data, next) {
 *         // data is the result of parsing the text.
 *         // If there was a parsing error, it would have been caught.
 *     }
 * ], callback);
 *
 * // passing a function returning a promise
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(function (contents) {
 *         return db.model.create(contents);
 *     }),
 *     function (model, next) {
 *         // `model` is the instantiated model object.
 *         // If there was an error, this function would be skipped.
 *     }
 * ], callback);
 *
 * // es2017 example, though `asyncify` is not needed if your JS environment
 * // supports async functions out of the box
 * var q = async.queue(async.asyncify(async function(file) {
 *     var intermediateStep = await processFile(file);
 *     return await somePromise(intermediateStep)
 * }));
 *
 * q.push(files);
 */
function asyncify(func) {
    return initialParams(function (args, callback) {
        var result;
        try {
            result = func.apply(this, args);
        } catch (e) {
            return callback(e);
        }
        // if result is Promise object
        if (isObject(result) && typeof result.then === 'function') {
            result.then(function(value) {
                invokeCallback(callback, null, value);
            }, function(err) {
                invokeCallback(callback, err.message ? err : new Error(err));
            });
        } else {
            callback(null, result);
        }
    });
}

function invokeCallback(callback, error, value) {
    try {
        callback(error, value);
    } catch (e) {
        setImmediate$1(rethrow, e);
    }
}

function rethrow(error) {
    throw error;
}

var supportsSymbol = typeof Symbol === 'function';

function isAsync(fn) {
    return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
}

function wrapAsync(asyncFn) {
    return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}

function applyEach$1(eachfn) {
    return function(fns/*, ...args*/) {
        var args = slice(arguments, 1);
        var go = initialParams(function(args, callback) {
            var that = this;
            return eachfn(fns, function (fn, cb) {
                wrapAsync(fn).apply(that, args.concat(cb));
            }, callback);
        });
        if (args.length) {
            return go.apply(this, args);
        }
        else {
            return go;
        }
    };
}

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Built-in value references. */
var Symbol$1 = root.Symbol;

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$1 = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$1 = objectProto$1.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString$1.call(value);
}

/** `Object#toString` result references. */
var nullTag = '[object Null]';
var undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]';
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
var proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
var breakLoop = {};

/**
 * This method returns `undefined`.
 *
 * @static
 * @memberOf _
 * @since 2.3.0
 * @category Util
 * @example
 *
 * _.times(2, _.noop);
 * // => [undefined, undefined]
 */
function noop() {
  // No operation performed.
}

function once(fn) {
    return function () {
        if (fn === null) return;
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;

var getIterator = function (coll) {
    return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
};

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/** `Object#toString` result references. */
var argsTag = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/** Used for built-in method references. */
var objectProto$3 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER$1 : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';
var arrayTag = '[object Array]';
var boolTag = '[object Boolean]';
var dateTag = '[object Date]';
var errorTag = '[object Error]';
var funcTag$1 = '[object Function]';
var mapTag = '[object Map]';
var numberTag = '[object Number]';
var objectTag = '[object Object]';
var regexpTag = '[object RegExp]';
var setTag = '[object Set]';
var stringTag = '[object String]';
var weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]';
var dataViewTag = '[object DataView]';
var float32Tag = '[object Float32Array]';
var float64Tag = '[object Float64Array]';
var int8Tag = '[object Int8Array]';
var int16Tag = '[object Int16Array]';
var int32Tag = '[object Int32Array]';
var uint8Tag = '[object Uint8Array]';
var uint8ClampedTag = '[object Uint8ClampedArray]';
var uint16Tag = '[object Uint16Array]';
var uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports$1 && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/** Used for built-in method references. */
var objectProto$2 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$1.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$5 = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;

  return value === proto;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/** Used for built-in method references. */
var objectProto$4 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

function createArrayIterator(coll) {
    var i = -1;
    var len = coll.length;
    return function next() {
        return ++i < len ? {value: coll[i], key: i} : null;
    }
}

function createES2015Iterator(iterator) {
    var i = -1;
    return function next() {
        var item = iterator.next();
        if (item.done)
            return null;
        i++;
        return {value: item.value, key: i};
    }
}

function createObjectIterator(obj) {
    var okeys = keys(obj);
    var i = -1;
    var len = okeys.length;
    return function next() {
        var key = okeys[++i];
        return i < len ? {value: obj[key], key: key} : null;
    };
}

function iterator(coll) {
    if (isArrayLike(coll)) {
        return createArrayIterator(coll);
    }

    var iterator = getIterator(coll);
    return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}

function onlyOnce(fn) {
    return function() {
        if (fn === null) throw new Error("Callback was already called.");
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

function _eachOfLimit(limit) {
    return function (obj, iteratee, callback) {
        callback = once(callback || noop);
        if (limit <= 0 || !obj) {
            return callback(null);
        }
        var nextElem = iterator(obj);
        var done = false;
        var running = 0;
        var looping = false;

        function iterateeCallback(err, value) {
            running -= 1;
            if (err) {
                done = true;
                callback(err);
            }
            else if (value === breakLoop || (done && running <= 0)) {
                done = true;
                return callback(null);
            }
            else if (!looping) {
                replenish();
            }
        }

        function replenish () {
            looping = true;
            while (running < limit && !done) {
                var elem = nextElem();
                if (elem === null) {
                    done = true;
                    if (running <= 0) {
                        callback(null);
                    }
                    return;
                }
                running += 1;
                iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
            }
            looping = false;
        }

        replenish();
    };
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name eachOfLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`. The `key` is the item's key, or index in the case of an
 * array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachOfLimit(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback);
}

function doLimit(fn, limit) {
    return function (iterable, iteratee, callback) {
        return fn(iterable, limit, iteratee, callback);
    };
}

// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
    callback = once(callback || noop);
    var index = 0,
        completed = 0,
        length = coll.length;
    if (length === 0) {
        callback(null);
    }

    function iteratorCallback(err, value) {
        if (err) {
            callback(err);
        } else if ((++completed === length) || value === breakLoop) {
            callback(null);
        }
    }

    for (; index < length; index++) {
        iteratee(coll[index], index, onlyOnce(iteratorCallback));
    }
}

// a generic version of eachOf which can handle array, object, and iterator cases.
var eachOfGeneric = doLimit(eachOfLimit, Infinity);

/**
 * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
 * to the iteratee.
 *
 * @name eachOf
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEachOf
 * @category Collection
 * @see [async.each]{@link module:Collections.each}
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each
 * item in `coll`.
 * The `key` is the item's key, or index in the case of an array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
 * var configs = {};
 *
 * async.forEachOf(obj, function (value, key, callback) {
 *     fs.readFile(__dirname + value, "utf8", function (err, data) {
 *         if (err) return callback(err);
 *         try {
 *             configs[key] = JSON.parse(data);
 *         } catch (e) {
 *             return callback(e);
 *         }
 *         callback();
 *     });
 * }, function (err) {
 *     if (err) console.error(err.message);
 *     // configs is now a map of JSON data
 *     doSomethingWith(configs);
 * });
 */
var eachOf = function(coll, iteratee, callback) {
    var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
    eachOfImplementation(coll, wrapAsync(iteratee), callback);
};

function doParallel(fn) {
    return function (obj, iteratee, callback) {
        return fn(eachOf, obj, wrapAsync(iteratee), callback);
    };
}

function _asyncMap(eachfn, arr, iteratee, callback) {
    callback = callback || noop;
    arr = arr || [];
    var results = [];
    var counter = 0;
    var _iteratee = wrapAsync(iteratee);

    eachfn(arr, function (value, _, callback) {
        var index = counter++;
        _iteratee(value, function (err, v) {
            results[index] = v;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Produces a new collection of values by mapping each value in `coll` through
 * the `iteratee` function. The `iteratee` is called with an item from `coll`
 * and a callback for when it has finished processing. Each of these callback
 * takes 2 arguments: an `error`, and the transformed item from `coll`. If
 * `iteratee` passes an error to its callback, the main `callback` (for the
 * `map` function) is immediately called with the error.
 *
 * Note, that since this function applies the `iteratee` to each item in
 * parallel, there is no guarantee that the `iteratee` functions will complete
 * in order. However, the results array will be in the same order as the
 * original `coll`.
 *
 * If `map` is passed an Object, the results will be an Array.  The results
 * will roughly be in the order of the original Objects' keys (but this can
 * vary across JavaScript engines).
 *
 * @name map
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an Array of the
 * transformed items from the `coll`. Invoked with (err, results).
 * @example
 *
 * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
 *     // results is now an array of stats for each file
 * });
 */
var map = doParallel(_asyncMap);

/**
 * Applies the provided arguments to each function in the array, calling
 * `callback` after all functions have completed. If you only provide the first
 * argument, `fns`, then it will return a function which lets you pass in the
 * arguments as if it were a single function call. If more arguments are
 * provided, `callback` is required while `args` is still optional.
 *
 * @name applyEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
 * to all call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument, `fns`, is provided, it will
 * return a function which lets you pass in the arguments as if it were a single
 * function call. The signature is `(..args, callback)`. If invoked with any
 * arguments, `callback` is required.
 * @example
 *
 * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
 *
 * // partial application example:
 * async.each(
 *     buckets,
 *     async.applyEach([enableSearch, updateSchema]),
 *     callback
 * );
 */
var applyEach = applyEach$1(map);

function doParallelLimit(fn) {
    return function (obj, limit, iteratee, callback) {
        return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback);
    };
}

/**
 * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
 *
 * @name mapLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapLimit = doParallelLimit(_asyncMap);

/**
 * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
 *
 * @name mapSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapSeries = doLimit(mapLimit, 1);

/**
 * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
 *
 * @name applyEachSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.applyEach]{@link module:ControlFlow.applyEach}
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
 * call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument is provided, it will return
 * a function which lets you pass in the arguments as if it were a single
 * function call.
 */
var applyEachSeries = applyEach$1(mapSeries);

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new base function.
 */
function createBaseFor(fromRight) {
  return function(object, iteratee, keysFunc) {
    var index = -1,
        iterable = Object(object),
        props = keysFunc(object),
        length = props.length;

    while (length--) {
      var key = props[fromRight ? length : ++index];
      if (iteratee(iterable[key], key, iterable) === false) {
        break;
      }
    }
    return object;
  };
}

/**
 * The base implementation of `baseForOwn` which iterates over `object`
 * properties returned by `keysFunc` and invokes `iteratee` for each property.
 * Iteratee functions may exit iteration early by explicitly returning `false`.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @returns {Object} Returns `object`.
 */
var baseFor = createBaseFor();

/**
 * The base implementation of `_.forOwn` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Object} Returns `object`.
 */
function baseForOwn(object, iteratee) {
  return object && baseFor(object, iteratee, keys);
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.isNaN` without support for number objects.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 */
function baseIsNaN(value) {
  return value !== value;
}

/**
 * A specialized version of `_.indexOf` which performs strict equality
 * comparisons of values, i.e. `===`.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function strictIndexOf(array, value, fromIndex) {
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (array[index] === value) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOf(array, value, fromIndex) {
  return value === value
    ? strictIndexOf(array, value, fromIndex)
    : baseFindIndex(array, baseIsNaN, fromIndex);
}

/**
 * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
 * their requirements. Each function can optionally depend on other functions
 * being completed first, and each function is run as soon as its requirements
 * are satisfied.
 *
 * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
 * will stop. Further tasks will not execute (so any other functions depending
 * on it will not run), and the main `callback` is immediately called with the
 * error.
 *
 * {@link AsyncFunction}s also receive an object containing the results of functions which
 * have completed so far as the first argument, if they have dependencies. If a
 * task function has no dependencies, it will only be passed a callback.
 *
 * @name auto
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Object} tasks - An object. Each of its properties is either a
 * function or an array of requirements, with the {@link AsyncFunction} itself the last item
 * in the array. The object's key of a property serves as the name of the task
 * defined by that property, i.e. can be used when specifying requirements for
 * other tasks. The function receives one or two arguments:
 * * a `results` object, containing the results of the previously executed
 *   functions, only passed if the task has any dependencies,
 * * a `callback(err, result)` function, which must be called when finished,
 *   passing an `error` (which can be `null`) and the result of the function's
 *   execution.
 * @param {number} [concurrency=Infinity] - An optional `integer` for
 * determining the maximum number of tasks that can be run in parallel. By
 * default, as many as possible.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback. Results are always returned; however, if an
 * error occurs, no further `tasks` will be performed, and the results object
 * will only contain partial results. Invoked with (err, results).
 * @returns undefined
 * @example
 *
 * async.auto({
 *     // this function will just be passed a callback
 *     readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
 *     showData: ['readData', function(results, cb) {
 *         // results.readData is the file's contents
 *         // ...
 *     }]
 * }, callback);
 *
 * async.auto({
 *     get_data: function(callback) {
 *         console.log('in get_data');
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         console.log('in make_folder');
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: ['get_data', 'make_folder', function(results, callback) {
 *         console.log('in write_file', JSON.stringify(results));
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(results, callback) {
 *         console.log('in email_link', JSON.stringify(results));
 *         // once the file is written let's email a link to it...
 *         // results.write_file contains the filename returned by write_file.
 *         callback(null, {'file':results.write_file, 'email':'user@example.com'});
 *     }]
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('results = ', results);
 * });
 */
var auto = function (tasks, concurrency, callback) {
    if (typeof concurrency === 'function') {
        // concurrency is optional, shift the args.
        callback = concurrency;
        concurrency = null;
    }
    callback = once(callback || noop);
    var keys$$1 = keys(tasks);
    var numTasks = keys$$1.length;
    if (!numTasks) {
        return callback(null);
    }
    if (!concurrency) {
        concurrency = numTasks;
    }

    var results = {};
    var runningTasks = 0;
    var hasError = false;

    var listeners = Object.create(null);

    var readyTasks = [];

    // for cycle detection:
    var readyToCheck = []; // tasks that have been identified as reachable
    // without the possibility of returning to an ancestor task
    var uncheckedDependencies = {};

    baseForOwn(tasks, function (task, key) {
        if (!isArray(task)) {
            // no dependencies
            enqueueTask(key, [task]);
            readyToCheck.push(key);
            return;
        }

        var dependencies = task.slice(0, task.length - 1);
        var remainingDependencies = dependencies.length;
        if (remainingDependencies === 0) {
            enqueueTask(key, task);
            readyToCheck.push(key);
            return;
        }
        uncheckedDependencies[key] = remainingDependencies;

        arrayEach(dependencies, function (dependencyName) {
            if (!tasks[dependencyName]) {
                throw new Error('async.auto task `' + key +
                    '` has a non-existent dependency `' +
                    dependencyName + '` in ' +
                    dependencies.join(', '));
            }
            addListener(dependencyName, function () {
                remainingDependencies--;
                if (remainingDependencies === 0) {
                    enqueueTask(key, task);
                }
            });
        });
    });

    checkForDeadlocks();
    processQueue();

    function enqueueTask(key, task) {
        readyTasks.push(function () {
            runTask(key, task);
        });
    }

    function processQueue() {
        if (readyTasks.length === 0 && runningTasks === 0) {
            return callback(null, results);
        }
        while(readyTasks.length && runningTasks < concurrency) {
            var run = readyTasks.shift();
            run();
        }

    }

    function addListener(taskName, fn) {
        var taskListeners = listeners[taskName];
        if (!taskListeners) {
            taskListeners = listeners[taskName] = [];
        }

        taskListeners.push(fn);
    }

    function taskComplete(taskName) {
        var taskListeners = listeners[taskName] || [];
        arrayEach(taskListeners, function (fn) {
            fn();
        });
        processQueue();
    }


    function runTask(key, task) {
        if (hasError) return;

        var taskCallback = onlyOnce(function(err, result) {
            runningTasks--;
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            if (err) {
                var safeResults = {};
                baseForOwn(results, function(val, rkey) {
                    safeResults[rkey] = val;
                });
                safeResults[key] = result;
                hasError = true;
                listeners = Object.create(null);

                callback(err, safeResults);
            } else {
                results[key] = result;
                taskComplete(key);
            }
        });

        runningTasks++;
        var taskFn = wrapAsync(task[task.length - 1]);
        if (task.length > 1) {
            taskFn(results, taskCallback);
        } else {
            taskFn(taskCallback);
        }
    }

    function checkForDeadlocks() {
        // Kahn's algorithm
        // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
        // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
        var currentTask;
        var counter = 0;
        while (readyToCheck.length) {
            currentTask = readyToCheck.pop();
            counter++;
            arrayEach(getDependents(currentTask), function (dependent) {
                if (--uncheckedDependencies[dependent] === 0) {
                    readyToCheck.push(dependent);
                }
            });
        }

        if (counter !== numTasks) {
            throw new Error(
                'async.auto cannot execute tasks due to a recursive dependency'
            );
        }
    }

    function getDependents(taskName) {
        var result = [];
        baseForOwn(tasks, function (task, key) {
            if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) {
                result.push(key);
            }
        });
        return result;
    }
};

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && baseGetTag(value) == symbolTag);
}

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined;
var symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isArray(value)) {
    // Recursively convert values (susceptible to call stack limits).
    return arrayMap(value, baseToString) + '';
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}

/**
 * The base implementation of `_.slice` without an iteratee call guard.
 *
 * @private
 * @param {Array} array The array to slice.
 * @param {number} [start=0] The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the slice of `array`.
 */
function baseSlice(array, start, end) {
  var index = -1,
      length = array.length;

  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = end > length ? length : end;
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}

/**
 * Casts `array` to a slice if it's needed.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {number} start The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the cast slice.
 */
function castSlice(array, start, end) {
  var length = array.length;
  end = end === undefined ? length : end;
  return (!start && end >= length) ? array : baseSlice(array, start, end);
}

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the last unmatched string symbol.
 */
function charsEndIndex(strSymbols, chrSymbols) {
  var index = strSymbols.length;

  while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the first unmatched string symbol.
 */
function charsStartIndex(strSymbols, chrSymbols) {
  var index = -1,
      length = strSymbols.length;

  while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Converts an ASCII `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function asciiToArray(string) {
  return string.split('');
}

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

/**
 * Checks if `string` contains Unicode symbols.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
 */
function hasUnicode(string) {
  return reHasUnicode.test(string);
}

/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
var rsZWJ$1 = '\\u200d';

/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?';
var rsOptVar = '[' + rsVarRange$1 + ']?';
var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/**
 * Converts a Unicode `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function unicodeToArray(string) {
  return string.match(reUnicode) || [];
}

/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return hasUnicode(string)
    ? unicodeToArray(string)
    : asciiToArray(string);
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/**
 * Removes leading and trailing whitespace or specified characters from `string`.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category String
 * @param {string} [string=''] The string to trim.
 * @param {string} [chars=whitespace] The characters to trim.
 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
 * @returns {string} Returns the trimmed string.
 * @example
 *
 * _.trim('  abc  ');
 * // => 'abc'
 *
 * _.trim('-_-abc-_-', '_-');
 * // => 'abc'
 *
 * _.map(['  foo  ', '  bar  '], _.trim);
 * // => ['foo', 'bar']
 */
function trim(string, chars, guard) {
  string = toString(string);
  if (string && (guard || chars === undefined)) {
    return string.replace(reTrim, '');
  }
  if (!string || !(chars = baseToString(chars))) {
    return string;
  }
  var strSymbols = stringToArray(string),
      chrSymbols = stringToArray(chars),
      start = charsStartIndex(strSymbols, chrSymbols),
      end = charsEndIndex(strSymbols, chrSymbols) + 1;

  return castSlice(strSymbols, start, end).join('');
}

var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;

function parseParams(func) {
    func = func.toString().replace(STRIP_COMMENTS, '');
    func = func.match(FN_ARGS)[2].replace(' ', '');
    func = func ? func.split(FN_ARG_SPLIT) : [];
    func = func.map(function (arg){
        return trim(arg.replace(FN_ARG, ''));
    });
    return func;
}

/**
 * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
 * tasks are specified as parameters to the function, after the usual callback
 * parameter, with the parameter names matching the names of the tasks it
 * depends on. This can provide even more readable task graphs which can be
 * easier to maintain.
 *
 * If a final callback is specified, the task results are similarly injected,
 * specified as named parameters after the initial error parameter.
 *
 * The autoInject function is purely syntactic sugar and its semantics are
 * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
 *
 * @name autoInject
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.auto]{@link module:ControlFlow.auto}
 * @category Control Flow
 * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
 * the form 'func([dependencies...], callback). The object's key of a property
 * serves as the name of the task defined by that property, i.e. can be used
 * when specifying requirements for other tasks.
 * * The `callback` parameter is a `callback(err, result)` which must be called
 *   when finished, passing an `error` (which can be `null`) and the result of
 *   the function's execution. The remaining parameters name other tasks on
 *   which the task is dependent, and the results from those tasks are the
 *   arguments of those parameters.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback, and a `results` object with any completed
 * task results, similar to `auto`.
 * @example
 *
 * //  The example from `auto` can be rewritten as follows:
 * async.autoInject({
 *     get_data: function(callback) {
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: function(get_data, make_folder, callback) {
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     },
 *     email_link: function(write_file, callback) {
 *         // once the file is written let's email a link to it...
 *         // write_file contains the filename returned by write_file.
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 *
 * // If you are using a JS minifier that mangles parameter names, `autoInject`
 * // will not work with plain functions, since the parameter names will be
 * // collapsed to a single letter identifier.  To work around this, you can
 * // explicitly specify the names of the parameters your task function needs
 * // in an array, similar to Angular.js dependency injection.
 *
 * // This still has an advantage over plain `auto`, since the results a task
 * // depends on are still spread into arguments.
 * async.autoInject({
 *     //...
 *     write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(write_file, callback) {
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }]
 *     //...
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 */
function autoInject(tasks, callback) {
    var newTasks = {};

    baseForOwn(tasks, function (taskFn, key) {
        var params;
        var fnIsAsync = isAsync(taskFn);
        var hasNoDeps =
            (!fnIsAsync && taskFn.length === 1) ||
            (fnIsAsync && taskFn.length === 0);

        if (isArray(taskFn)) {
            params = taskFn.slice(0, -1);
            taskFn = taskFn[taskFn.length - 1];

            newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
        } else if (hasNoDeps) {
            // no dependencies, use the function as-is
            newTasks[key] = taskFn;
        } else {
            params = parseParams(taskFn);
            if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
                throw new Error("autoInject task functions require explicit parameters.");
            }

            // remove callback param
            if (!fnIsAsync) params.pop();

            newTasks[key] = params.concat(newTask);
        }

        function newTask(results, taskCb) {
            var newArgs = arrayMap(params, function (name) {
                return results[name];
            });
            newArgs.push(taskCb);
            wrapAsync(taskFn).apply(null, newArgs);
        }
    });

    auto(newTasks, callback);
}

// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
function DLL() {
    this.head = this.tail = null;
    this.length = 0;
}

function setInitial(dll, node) {
    dll.length = 1;
    dll.head = dll.tail = node;
}

DLL.prototype.removeLink = function(node) {
    if (node.prev) node.prev.next = node.next;
    else this.head = node.next;
    if (node.next) node.next.prev = node.prev;
    else this.tail = node.prev;

    node.prev = node.next = null;
    this.length -= 1;
    return node;
};

DLL.prototype.empty = function () {
    while(this.head) this.shift();
    return this;
};

DLL.prototype.insertAfter = function(node, newNode) {
    newNode.prev = node;
    newNode.next = node.next;
    if (node.next) node.next.prev = newNode;
    else this.tail = newNode;
    node.next = newNode;
    this.length += 1;
};

DLL.prototype.insertBefore = function(node, newNode) {
    newNode.prev = node.prev;
    newNode.next = node;
    if (node.prev) node.prev.next = newNode;
    else this.head = newNode;
    node.prev = newNode;
    this.length += 1;
};

DLL.prototype.unshift = function(node) {
    if (this.head) this.insertBefore(this.head, node);
    else setInitial(this, node);
};

DLL.prototype.push = function(node) {
    if (this.tail) this.insertAfter(this.tail, node);
    else setInitial(this, node);
};

DLL.prototype.shift = function() {
    return this.head && this.removeLink(this.head);
};

DLL.prototype.pop = function() {
    return this.tail && this.removeLink(this.tail);
};

DLL.prototype.toArray = function () {
    var arr = Array(this.length);
    var curr = this.head;
    for(var idx = 0; idx < this.length; idx++) {
        arr[idx] = curr.data;
        curr = curr.next;
    }
    return arr;
};

DLL.prototype.remove = function (testFn) {
    var curr = this.head;
    while(!!curr) {
        var next = curr.next;
        if (testFn(curr)) {
            this.removeLink(curr);
        }
        curr = next;
    }
    return this;
};

function queue(worker, concurrency, payload) {
    if (concurrency == null) {
        concurrency = 1;
    }
    else if(concurrency === 0) {
        throw new Error('Concurrency must not be zero');
    }

    var _worker = wrapAsync(worker);
    var numRunning = 0;
    var workersList = [];

    var processingScheduled = false;
    function _insert(data, insertAtFront, callback) {
        if (callback != null && typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0 && q.idle()) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                callback: callback || noop
            };

            if (insertAtFront) {
                q._tasks.unshift(item);
            } else {
                q._tasks.push(item);
            }
        }

        if (!processingScheduled) {
            processingScheduled = true;
            setImmediate$1(function() {
                processingScheduled = false;
                q.process();
            });
        }
    }

    function _next(tasks) {
        return function(err){
            numRunning -= 1;

            for (var i = 0, l = tasks.length; i < l; i++) {
                var task = tasks[i];

                var index = baseIndexOf(workersList, task, 0);
                if (index === 0) {
                    workersList.shift();
                } else if (index > 0) {
                    workersList.splice(index, 1);
                }

                task.callback.apply(task, arguments);

                if (err != null) {
                    q.error(err, task.data);
                }
            }

            if (numRunning <= (q.concurrency - q.buffer) ) {
                q.unsaturated();
            }

            if (q.idle()) {
                q.drain();
            }
            q.process();
        };
    }

    var isProcessing = false;
    var q = {
        _tasks: new DLL(),
        concurrency: concurrency,
        payload: payload,
        saturated: noop,
        unsaturated:noop,
        buffer: concurrency / 4,
        empty: noop,
        drain: noop,
        error: noop,
        started: false,
        paused: false,
        push: function (data, callback) {
            _insert(data, false, callback);
        },
        kill: function () {
            q.drain = noop;
            q._tasks.empty();
        },
        unshift: function (data, callback) {
            _insert(data, true, callback);
        },
        remove: function (testFn) {
            q._tasks.remove(testFn);
        },
        process: function () {
            // Avoid trying to start too many processing operations. This can occur
            // when callbacks resolve synchronously (#1267).
            if (isProcessing) {
                return;
            }
            isProcessing = true;
            while(!q.paused && numRunning < q.concurrency && q._tasks.length){
                var tasks = [], data = [];
                var l = q._tasks.length;
                if (q.payload) l = Math.min(l, q.payload);
                for (var i = 0; i < l; i++) {
                    var node = q._tasks.shift();
                    tasks.push(node);
                    workersList.push(node);
                    data.push(node.data);
                }

                numRunning += 1;

                if (q._tasks.length === 0) {
                    q.empty();
                }

                if (numRunning === q.concurrency) {
                    q.saturated();
                }

                var cb = onlyOnce(_next(tasks));
                _worker(data, cb);
            }
            isProcessing = false;
        },
        length: function () {
            return q._tasks.length;
        },
        running: function () {
            return numRunning;
        },
        workersList: function () {
            return workersList;
        },
        idle: function() {
            return q._tasks.length + numRunning === 0;
        },
        pause: function () {
            q.paused = true;
        },
        resume: function () {
            if (q.paused === false) { return; }
            q.paused = false;
            setImmediate$1(q.process);
        }
    };
    return q;
}

/**
 * A cargo of tasks for the worker function to complete. Cargo inherits all of
 * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
 * @typedef {Object} CargoObject
 * @memberOf module:ControlFlow
 * @property {Function} length - A function returning the number of items
 * waiting to be processed. Invoke like `cargo.length()`.
 * @property {number} payload - An `integer` for determining how many tasks
 * should be process per round. This property can be changed after a `cargo` is
 * created to alter the payload on-the-fly.
 * @property {Function} push - Adds `task` to the `queue`. The callback is
 * called once the `worker` has finished processing the task. Instead of a
 * single task, an array of `tasks` can be submitted. The respective callback is
 * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
 * @property {Function} saturated - A callback that is called when the
 * `queue.length()` hits the concurrency and further tasks will be queued.
 * @property {Function} empty - A callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - A callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke like `cargo.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
 */

/**
 * Creates a `cargo` object with the specified payload. Tasks added to the
 * cargo will be processed altogether (up to the `payload` limit). If the
 * `worker` is in progress, the task is queued until it becomes available. Once
 * the `worker` has completed some tasks, each callback of those tasks is
 * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
 * for how `cargo` and `queue` work.
 *
 * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
 * at a time, cargo passes an array of tasks to a single worker, repeating
 * when the worker is finished.
 *
 * @name cargo
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An asynchronous function for processing an array
 * of queued tasks. Invoked with `(tasks, callback)`.
 * @param {number} [payload=Infinity] - An optional `integer` for determining
 * how many tasks should be processed per round; if omitted, the default is
 * unlimited.
 * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the cargo and inner queue.
 * @example
 *
 * // create a cargo object with payload 2
 * var cargo = async.cargo(function(tasks, callback) {
 *     for (var i=0; i<tasks.length; i++) {
 *         console.log('hello ' + tasks[i].name);
 *     }
 *     callback();
 * }, 2);
 *
 * // add some items
 * cargo.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * cargo.push({name: 'bar'}, function(err) {
 *     console.log('finished processing bar');
 * });
 * cargo.push({name: 'baz'}, function(err) {
 *     console.log('finished processing baz');
 * });
 */
function cargo(worker, payload) {
    return queue(worker, 1, payload);
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
 *
 * @name eachOfSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Invoked with (err).
 */
var eachOfSeries = doLimit(eachOfLimit, 1);

/**
 * Reduces `coll` into a single value using an async `iteratee` to return each
 * successive step. `memo` is the initial state of the reduction. This function
 * only operates in series.
 *
 * For performance reasons, it may make sense to split a call to this function
 * into a parallel map, and then use the normal `Array.prototype.reduce` on the
 * results. This function is for situations where each step in the reduction
 * needs to be async; if you can get the data before reducing it, then it's
 * probably a good idea to do so.
 *
 * @name reduce
 * @static
 * @memberOf module:Collections
 * @method
 * @alias inject
 * @alias foldl
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 * @example
 *
 * async.reduce([1,2,3], 0, function(memo, item, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         callback(null, memo + item)
 *     });
 * }, function(err, result) {
 *     // result is now equal to the last value of memo, which is 6
 * });
 */
function reduce(coll, memo, iteratee, callback) {
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    eachOfSeries(coll, function(x, i, callback) {
        _iteratee(memo, x, function(err, v) {
            memo = v;
            callback(err);
        });
    }, function(err) {
        callback(err, memo);
    });
}

/**
 * Version of the compose function that is more natural to read. Each function
 * consumes the return value of the previous function. It is the equivalent of
 * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name seq
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.compose]{@link module:ControlFlow.compose}
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} a function that composes the `functions` in order
 * @example
 *
 * // Requires lodash (or underscore), express3 and dresende's orm2.
 * // Part of an app, that fetches cats of the logged user.
 * // This example uses `seq` function to avoid overnesting and error
 * // handling clutter.
 * app.get('/cats', function(request, response) {
 *     var User = request.models.User;
 *     async.seq(
 *         _.bind(User.get, User),  // 'User.get' has signature (id, callback(err, data))
 *         function(user, fn) {
 *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))
 *         }
 *     )(req.session.user_id, function (err, cats) {
 *         if (err) {
 *             console.error(err);
 *             response.json({ status: 'error', message: err.message });
 *         } else {
 *             response.json({ status: 'ok', message: 'Cats found', data: cats });
 *         }
 *     });
 * });
 */
function seq(/*...functions*/) {
    var _functions = arrayMap(arguments, wrapAsync);
    return function(/*...args*/) {
        var args = slice(arguments);
        var that = this;

        var cb = args[args.length - 1];
        if (typeof cb == 'function') {
            args.pop();
        } else {
            cb = noop;
        }

        reduce(_functions, args, function(newargs, fn, cb) {
            fn.apply(that, newargs.concat(function(err/*, ...nextargs*/) {
                var nextargs = slice(arguments, 1);
                cb(err, nextargs);
            }));
        },
        function(err, results) {
            cb.apply(that, [err].concat(results));
        });
    };
}

/**
 * Creates a function which is a composition of the passed asynchronous
 * functions. Each function consumes the return value of the function that
 * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
 * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name compose
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} an asynchronous function that is the composed
 * asynchronous `functions`
 * @example
 *
 * function add1(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n + 1);
 *     }, 10);
 * }
 *
 * function mul3(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n * 3);
 *     }, 10);
 * }
 *
 * var add1mul3 = async.compose(mul3, add1);
 * add1mul3(4, function (err, result) {
 *     // result now equals 15
 * });
 */
var compose = function(/*...args*/) {
    return seq.apply(null, slice(arguments).reverse());
};

var _concat = Array.prototype.concat;

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
 *
 * @name concatLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err /*, ...args*/) {
            if (err) return callback(err);
            return callback(null, slice(arguments, 1));
        });
    }, function(err, mapResults) {
        var result = [];
        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                result = _concat.apply(result, mapResults[i]);
            }
        }

        return callback(err, result);
    });
};

/**
 * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
 * the concatenated list. The `iteratee`s are called in parallel, and the
 * results are concatenated as they return. There is no guarantee that the
 * results array will be returned in the original order of `coll` passed to the
 * `iteratee` function.
 *
 * @name concat
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 * @example
 *
 * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
 *     // files is now a list of filenames that exist in the 3 directories
 * });
 */
var concat = doLimit(concatLimit, Infinity);

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
 *
 * @name concatSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
 * The iteratee should complete with an array an array of results.
 * Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatSeries = doLimit(concatLimit, 1);

/**
 * Returns a function that when called, calls-back with the values provided.
 * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
 * [`auto`]{@link module:ControlFlow.auto}.
 *
 * @name constant
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {...*} arguments... - Any number of arguments to automatically invoke
 * callback with.
 * @returns {AsyncFunction} Returns a function that when invoked, automatically
 * invokes the callback with the previous given arguments.
 * @example
 *
 * async.waterfall([
 *     async.constant(42),
 *     function (value, next) {
 *         // value === 42
 *     },
 *     //...
 * ], callback);
 *
 * async.waterfall([
 *     async.constant(filename, "utf8"),
 *     fs.readFile,
 *     function (fileData, next) {
 *         //...
 *     }
 *     //...
 * ], callback);
 *
 * async.auto({
 *     hostname: async.constant("https://server.net/"),
 *     port: findFreePort,
 *     launchServer: ["hostname", "port", function (options, cb) {
 *         startServer(options, cb);
 *     }],
 *     //...
 * }, callback);
 */
var constant = function(/*...values*/) {
    var values = slice(arguments);
    var args = [null].concat(values);
    return function (/*...ignoredArgs, callback*/) {
        var callback = arguments[arguments.length - 1];
        return callback.apply(this, args);
    };
};

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

function _createTester(check, getResult) {
    return function(eachfn, arr, iteratee, cb) {
        cb = cb || noop;
        var testPassed = false;
        var testResult;
        eachfn(arr, function(value, _, callback) {
            iteratee(value, function(err, result) {
                if (err) {
                    callback(err);
                } else if (check(result) && !testResult) {
                    testPassed = true;
                    testResult = getResult(true, value);
                    callback(null, breakLoop);
                } else {
                    callback();
                }
            });
        }, function(err) {
            if (err) {
                cb(err);
            } else {
                cb(null, testPassed ? testResult : getResult(false));
            }
        });
    };
}

function _findGetResult(v, x) {
    return x;
}

/**
 * Returns the first value in `coll` that passes an async truth test. The
 * `iteratee` is applied in parallel, meaning the first iteratee to return
 * `true` will fire the detect `callback` with that result. That means the
 * result might not be the first item in the original `coll` (in terms of order)
 * that passes the test.

 * If order within the original `coll` is important, then look at
 * [`detectSeries`]{@link module:Collections.detectSeries}.
 *
 * @name detect
 * @static
 * @memberOf module:Collections
 * @method
 * @alias find
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 * @example
 *
 * async.detect(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // result now equals the first file in the list that exists
 * });
 */
var detect = doParallel(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name detectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findLimit
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectLimit = doParallelLimit(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
 *
 * @name detectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findSeries
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectSeries = doLimit(detectLimit, 1);

function consoleFunc(name) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        args.push(function (err/*, ...args*/) {
            var args = slice(arguments, 1);
            if (typeof console === 'object') {
                if (err) {
                    if (console.error) {
                        console.error(err);
                    }
                } else if (console[name]) {
                    arrayEach(args, function (x) {
                        console[name](x);
                    });
                }
            }
        });
        wrapAsync(fn).apply(null, args);
    };
}

/**
 * Logs the result of an [`async` function]{@link AsyncFunction} to the
 * `console` using `console.dir` to display the properties of the resulting object.
 * Only works in Node.js or in browsers that support `console.dir` and
 * `console.error` (such as FF and Chrome).
 * If multiple arguments are returned from the async function,
 * `console.dir` is called on each argument in order.
 *
 * @name dir
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, {hello: name});
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.dir(hello, 'world');
 * {hello: 'world'}
 */
var dir = consoleFunc('dir');

/**
 * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
 * the order of operations, the arguments `test` and `fn` are switched.
 *
 * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
 * @name doDuring
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.during]{@link module:ControlFlow.during}
 * @category Control Flow
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (...args, callback), where `...args` are the
 * non-error args from the previous callback of `fn`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error if one occurred, otherwise `null`.
 */
function doDuring(fn, test, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        args.push(check);
        _test.apply(this, args);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    check(null, true);

}

/**
 * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
 * the order of operations, the arguments `test` and `iteratee` are switched.
 *
 * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
 *
 * @name doWhilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - A function which is called each time `test`
 * passes. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped.
 * `callback` will be passed an error and any arguments passed to the final
 * `iteratee`'s callback. Invoked with (err, [results]);
 */
function doWhilst(iteratee, test, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        if (test.apply(this, args)) return _iteratee(next);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
 * argument ordering differs from `until`.
 *
 * @name doUntil
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function doUntil(iteratee, test, callback) {
    doWhilst(iteratee, function() {
        return !test.apply(this, arguments);
    }, callback);
}

/**
 * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
 * is passed a callback in the form of `function (err, truth)`. If error is
 * passed to `test` or `fn`, the main callback is immediately called with the
 * value of the error.
 *
 * @name during
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (callback).
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error, if one occurred, otherwise `null`.
 * @example
 *
 * var count = 0;
 *
 * async.during(
 *     function (callback) {
 *         return callback(null, count < 5);
 *     },
 *     function (callback) {
 *         count++;
 *         setTimeout(callback, 1000);
 *     },
 *     function (err) {
 *         // 5 seconds have passed
 *     }
 * );
 */
function during(test, fn, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err) {
        if (err) return callback(err);
        _test(check);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    _test(check);
}

function _withoutIndex(iteratee) {
    return function (value, index, callback) {
        return iteratee(value, callback);
    };
}

/**
 * Applies the function `iteratee` to each item in `coll`, in parallel.
 * The `iteratee` is called with an item from the list, and a callback for when
 * it has finished. If the `iteratee` passes an error to its `callback`, the
 * main `callback` (for the `each` function) is immediately called with the
 * error.
 *
 * Note, that since this function applies `iteratee` to each item in parallel,
 * there is no guarantee that the iteratee functions will complete in order.
 *
 * @name each
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEach
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to
 * each item in `coll`. Invoked with (item, callback).
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOf`.
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * // assuming openFiles is an array of file names and saveFile is a function
 * // to save the modified contents of that file:
 *
 * async.each(openFiles, saveFile, function(err){
 *   // if any of the saves produced an error, err would equal that error
 * });
 *
 * // assuming openFiles is an array of file names
 * async.each(openFiles, function(file, callback) {
 *
 *     // Perform operation on file here.
 *     console.log('Processing file ' + file);
 *
 *     if( file.length > 32 ) {
 *       console.log('This file name is too long');
 *       callback('File name too long');
 *     } else {
 *       // Do work to process file here
 *       console.log('File processed');
 *       callback();
 *     }
 * }, function(err) {
 *     // if any of the file processing produced an error, err would equal that error
 *     if( err ) {
 *       // One of the iterations produced an error.
 *       // All processing will now stop.
 *       console.log('A file failed to process');
 *     } else {
 *       console.log('All files have been processed successfully');
 *     }
 * });
 */
function eachLimit(coll, iteratee, callback) {
    eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
 *
 * @name eachLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfLimit`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachLimit$1(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
 *
 * @name eachSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfSeries`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
var eachSeries = doLimit(eachLimit$1, 1);

/**
 * Wrap an async function and ensure it calls its callback on a later tick of
 * the event loop.  If the function already calls its callback on a next tick,
 * no extra deferral is added. This is useful for preventing stack overflows
 * (`RangeError: Maximum call stack size exceeded`) and generally keeping
 * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
 * contained. ES2017 `async` functions are returned as-is -- they are immune
 * to Zalgo's corrupting influences, as they always resolve on a later tick.
 *
 * @name ensureAsync
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - an async function, one that expects a node-style
 * callback as its last argument.
 * @returns {AsyncFunction} Returns a wrapped function with the exact same call
 * signature as the function passed in.
 * @example
 *
 * function sometimesAsync(arg, callback) {
 *     if (cache[arg]) {
 *         return callback(null, cache[arg]); // this would be synchronous!!
 *     } else {
 *         doSomeIO(arg, callback); // this IO would be asynchronous
 *     }
 * }
 *
 * // this has a risk of stack overflows if many results are cached in a row
 * async.mapSeries(args, sometimesAsync, done);
 *
 * // this will defer sometimesAsync's callback if necessary,
 * // preventing stack overflows
 * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
 */
function ensureAsync(fn) {
    if (isAsync(fn)) return fn;
    return initialParams(function (args, callback) {
        var sync = true;
        args.push(function () {
            var innerArgs = arguments;
            if (sync) {
                setImmediate$1(function () {
                    callback.apply(null, innerArgs);
                });
            } else {
                callback.apply(null, innerArgs);
            }
        });
        fn.apply(this, args);
        sync = false;
    });
}

function notId(v) {
    return !v;
}

/**
 * Returns `true` if every element in `coll` satisfies an async test. If any
 * iteratee call returns `false`, the main `callback` is immediately called.
 *
 * @name every
 * @static
 * @memberOf module:Collections
 * @method
 * @alias all
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 * @example
 *
 * async.every(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then every file exists
 * });
 */
var every = doParallel(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
 *
 * @name everyLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everyLimit = doParallelLimit(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
 *
 * @name everySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in series.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everySeries = doLimit(everyLimit, 1);

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function(object) {
    return object == null ? undefined : object[key];
  };
}

function filterArray(eachfn, arr, iteratee, callback) {
    var truthValues = new Array(arr.length);
    eachfn(arr, function (x, index, callback) {
        iteratee(x, function (err, v) {
            truthValues[index] = !!v;
            callback(err);
        });
    }, function (err) {
        if (err) return callback(err);
        var results = [];
        for (var i = 0; i < arr.length; i++) {
            if (truthValues[i]) results.push(arr[i]);
        }
        callback(null, results);
    });
}

function filterGeneric(eachfn, coll, iteratee, callback) {
    var results = [];
    eachfn(coll, function (x, index, callback) {
        iteratee(x, function (err, v) {
            if (err) {
                callback(err);
            } else {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            }
        });
    }, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null, arrayMap(results.sort(function (a, b) {
                return a.index - b.index;
            }), baseProperty('value')));
        }
    });
}

function _filter(eachfn, coll, iteratee, callback) {
    var filter = isArrayLike(coll) ? filterArray : filterGeneric;
    filter(eachfn, coll, wrapAsync(iteratee), callback || noop);
}

/**
 * Returns a new array of all the values in `coll` which pass an async truth
 * test. This operation is performed in parallel, but the results array will be
 * in the same order as the original.
 *
 * @name filter
 * @static
 * @memberOf module:Collections
 * @method
 * @alias select
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.filter(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of the existing files
 * });
 */
var filter = doParallel(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name filterLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var filterLimit = doParallelLimit(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
 *
 * @name filterSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results)
 */
var filterSeries = doLimit(filterLimit, 1);

/**
 * Calls the asynchronous function `fn` with a callback parameter that allows it
 * to call itself again, in series, indefinitely.

 * If an error is passed to the callback then `errback` is called with the
 * error, and execution stops, otherwise it will never be called.
 *
 * @name forever
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} fn - an async function to call repeatedly.
 * Invoked with (next).
 * @param {Function} [errback] - when `fn` passes an error to it's callback,
 * this function will be called, and execution stops. Invoked with (err).
 * @example
 *
 * async.forever(
 *     function(next) {
 *         // next is suitable for passing to things that need a callback(err [, whatever]);
 *         // it will result in this function being called again.
 *     },
 *     function(err) {
 *         // if next is called with a value in its first parameter, it will appear
 *         // in here as 'err', and execution will stop.
 *     }
 * );
 */
function forever(fn, errback) {
    var done = onlyOnce(errback || noop);
    var task = wrapAsync(ensureAsync(fn));

    function next(err) {
        if (err) return done(err);
        task(next);
    }
    next();
}

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
 *
 * @name groupByLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupByLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err, key) {
            if (err) return callback(err);
            return callback(null, {key: key, val: val});
        });
    }, function(err, mapResults) {
        var result = {};
        // from MDN, handle object having an `hasOwnProperty` prop
        var hasOwnProperty = Object.prototype.hasOwnProperty;

        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                var key = mapResults[i].key;
                var val = mapResults[i].val;

                if (hasOwnProperty.call(result, key)) {
                    result[key].push(val);
                } else {
                    result[key] = [val];
                }
            }
        }

        return callback(err, result);
    });
};

/**
 * Returns a new object, where each value corresponds to an array of items, from
 * `coll`, that returned the corresponding key. That is, the keys of the object
 * correspond to the values passed to the `iteratee` callback.
 *
 * Note: Since this function applies the `iteratee` to each item in parallel,
 * there is no guarantee that the `iteratee` functions will complete in order.
 * However, the values for each key in the `result` will be in the same order as
 * the original `coll`. For Objects, the values will roughly be in the order of
 * the original Objects' keys (but this can vary across JavaScript engines).
 *
 * @name groupBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 * @example
 *
 * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
 *     db.findById(userId, function(err, user) {
 *         if (err) return callback(err);
 *         return callback(null, user.age);
 *     });
 * }, function(err, result) {
 *     // result is object containing the userIds grouped by age
 *     // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
 * });
 */
var groupBy = doLimit(groupByLimit, Infinity);

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
 *
 * @name groupBySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupBySeries = doLimit(groupByLimit, 1);

/**
 * Logs the result of an `async` function to the `console`. Only works in
 * Node.js or in browsers that support `console.log` and `console.error` (such
 * as FF and Chrome). If multiple arguments are returned from the async
 * function, `console.log` is called on each argument in order.
 *
 * @name log
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, 'hello ' + name);
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.log(hello, 'world');
 * 'hello world'
 */
var log = consoleFunc('log');

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name mapValuesLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
function mapValuesLimit(obj, limit, iteratee, callback) {
    callback = once(callback || noop);
    var newObj = {};
    var _iteratee = wrapAsync(iteratee);
    eachOfLimit(obj, limit, function(val, key, next) {
        _iteratee(val, key, function (err, result) {
            if (err) return next(err);
            newObj[key] = result;
            next();
        });
    }, function (err) {
        callback(err, newObj);
    });
}

/**
 * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
 *
 * Produces a new Object by mapping each value of `obj` through the `iteratee`
 * function. The `iteratee` is called each `value` and `key` from `obj` and a
 * callback for when it has finished processing. Each of these callbacks takes
 * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
 * passes an error to its callback, the main `callback` (for the `mapValues`
 * function) is immediately called with the error.
 *
 * Note, the order of the keys in the result is not guaranteed.  The keys will
 * be roughly in the order they complete, (but this is very engine-specific)
 *
 * @name mapValues
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 * @example
 *
 * async.mapValues({
 *     f1: 'file1',
 *     f2: 'file2',
 *     f3: 'file3'
 * }, function (file, key, callback) {
 *   fs.stat(file, callback);
 * }, function(err, result) {
 *     // result is now a map of stats for each file, e.g.
 *     // {
 *     //     f1: [stats for file1],
 *     //     f2: [stats for file2],
 *     //     f3: [stats for file3]
 *     // }
 * });
 */

var mapValues = doLimit(mapValuesLimit, Infinity);

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
 *
 * @name mapValuesSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
var mapValuesSeries = doLimit(mapValuesLimit, 1);

function has(obj, key) {
    return key in obj;
}

/**
 * Caches the results of an async function. When creating a hash to store
 * function results against, the callback is omitted from the hash and an
 * optional hash function can be used.
 *
 * If no hash function is specified, the first argument is used as a hash key,
 * which may work reasonably if it is a string or a data type that converts to a
 * distinct string. Note that objects and arrays will not behave reasonably.
 * Neither will cases where the other arguments are significant. In such cases,
 * specify your own hash function.
 *
 * The cache of results is exposed as the `memo` property of the function
 * returned by `memoize`.
 *
 * @name memoize
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function to proxy and cache results from.
 * @param {Function} hasher - An optional function for generating a custom hash
 * for storing results. It has all the arguments applied to it apart from the
 * callback, and must be synchronous.
 * @returns {AsyncFunction} a memoized version of `fn`
 * @example
 *
 * var slow_fn = function(name, callback) {
 *     // do something
 *     callback(null, result);
 * };
 * var fn = async.memoize(slow_fn);
 *
 * // fn can now be used as if it were slow_fn
 * fn('some name', function() {
 *     // callback
 * });
 */
function memoize(fn, hasher) {
    var memo = Object.create(null);
    var queues = Object.create(null);
    hasher = hasher || identity;
    var _fn = wrapAsync(fn);
    var memoized = initialParams(function memoized(args, callback) {
        var key = hasher.apply(null, args);
        if (has(memo, key)) {
            setImmediate$1(function() {
                callback.apply(null, memo[key]);
            });
        } else if (has(queues, key)) {
            queues[key].push(callback);
        } else {
            queues[key] = [callback];
            _fn.apply(null, args.concat(function(/*args*/) {
                var args = slice(arguments);
                memo[key] = args;
                var q = queues[key];
                delete queues[key];
                for (var i = 0, l = q.length; i < l; i++) {
                    q[i].apply(null, args);
                }
            }));
        }
    });
    memoized.memo = memo;
    memoized.unmemoized = fn;
    return memoized;
}

/**
 * Calls `callback` on a later loop around the event loop. In Node.js this just
 * calls `process.nextTick`.  In the browser it will use `setImmediate` if
 * available, otherwise `setTimeout(callback, 0)`, which means other higher
 * priority events may precede the execution of `callback`.
 *
 * This is used internally for browser-compatibility purposes.
 *
 * @name nextTick
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.setImmediate]{@link module:Utils.setImmediate}
 * @category Util
 * @param {Function} callback - The function to call on a later loop around
 * the event loop. Invoked with (args...).
 * @param {...*} args... - any number of additional arguments to pass to the
 * callback on the next tick.
 * @example
 *
 * var call_order = [];
 * async.nextTick(function() {
 *     call_order.push('two');
 *     // call_order now equals ['one','two']
 * });
 * call_order.push('one');
 *
 * async.setImmediate(function (a, b, c) {
 *     // a, b, and c equal 1, 2, and 3
 * }, 1, 2, 3);
 */
var _defer$1;

if (hasNextTick) {
    _defer$1 = process.nextTick;
} else if (hasSetImmediate) {
    _defer$1 = setImmediate;
} else {
    _defer$1 = fallback;
}

var nextTick = wrap(_defer$1);

function _parallel(eachfn, tasks, callback) {
    callback = callback || noop;
    var results = isArrayLike(tasks) ? [] : {};

    eachfn(tasks, function (task, key, callback) {
        wrapAsync(task)(function (err, result) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            results[key] = result;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Run the `tasks` collection of functions in parallel, without waiting until
 * the previous function has completed. If any of the functions pass an error to
 * its callback, the main `callback` is immediately called with the value of the
 * error. Once the `tasks` have completed, the results are passed to the final
 * `callback` as an array.
 *
 * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
 * parallel execution of code.  If your tasks do not use any timers or perform
 * any I/O, they will actually be executed in series.  Any synchronous setup
 * sections for each task will happen one after the other.  JavaScript remains
 * single-threaded.
 *
 * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
 * execution of other tasks when a task fails.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 * results from {@link async.parallel}.
 *
 * @name parallel
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 *
 * @example
 * async.parallel([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // the results array will equal ['one','two'] even though
 *     // the second function had a shorter timeout.
 * });
 *
 * // an example using an object instead of an array
 * async.parallel({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equals to: {one: 1, two: 2}
 * });
 */
function parallelLimit(tasks, callback) {
    _parallel(eachOf, tasks, callback);
}

/**
 * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name parallelLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.parallel]{@link module:ControlFlow.parallel}
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 */
function parallelLimit$1(tasks, limit, callback) {
    _parallel(_eachOfLimit(limit), tasks, callback);
}

/**
 * A queue of tasks for the worker function to complete.
 * @typedef {Object} QueueObject
 * @memberOf module:ControlFlow
 * @property {Function} length - a function returning the number of items
 * waiting to be processed. Invoke with `queue.length()`.
 * @property {boolean} started - a boolean indicating whether or not any
 * items have been pushed and processed by the queue.
 * @property {Function} running - a function returning the number of items
 * currently being processed. Invoke with `queue.running()`.
 * @property {Function} workersList - a function returning the array of items
 * currently being processed. Invoke with `queue.workersList()`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke with `queue.idle()`.
 * @property {number} concurrency - an integer for determining how many `worker`
 * functions should be run in parallel. This property can be changed after a
 * `queue` is created to alter the concurrency on-the-fly.
 * @property {Function} push - add a new task to the `queue`. Calls `callback`
 * once the `worker` has finished processing the task. Instead of a single task,
 * a `tasks` array can be submitted. The respective callback is used for every
 * task in the list. Invoke with `queue.push(task, [callback])`,
 * @property {Function} unshift - add a new task to the front of the `queue`.
 * Invoke with `queue.unshift(task, [callback])`.
 * @property {Function} remove - remove items from the queue that match a test
 * function.  The test function will be passed an object with a `data` property,
 * and a `priority` property, if this is a
 * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
 * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
 * `function ({data, priority}) {}` and returns a Boolean.
 * @property {Function} saturated - a callback that is called when the number of
 * running workers hits the `concurrency` limit, and further tasks will be
 * queued.
 * @property {Function} unsaturated - a callback that is called when the number
 * of running workers is less than the `concurrency` & `buffer` limits, and
 * further tasks will not be queued.
 * @property {number} buffer - A minimum threshold buffer in order to say that
 * the `queue` is `unsaturated`.
 * @property {Function} empty - a callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - a callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} error - a callback that is called when a task errors.
 * Has the signature `function(error, task)`.
 * @property {boolean} paused - a boolean for determining whether the queue is
 * in a paused state.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke with `queue.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke with `queue.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. No more tasks
 * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
 */

/**
 * Creates a `queue` object with the specified `concurrency`. Tasks added to the
 * `queue` are processed in parallel (up to the `concurrency` limit). If all
 * `worker`s are in progress, the task is queued until one becomes available.
 * Once a `worker` completes a `task`, that `task`'s callback is called.
 *
 * @name queue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`. Invoked with (task, callback).
 * @param {number} [concurrency=1] - An `integer` for determining how many
 * `worker` functions should be run in parallel.  If omitted, the concurrency
 * defaults to `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the queue.
 * @example
 *
 * // create a queue object with concurrency 2
 * var q = async.queue(function(task, callback) {
 *     console.log('hello ' + task.name);
 *     callback();
 * }, 2);
 *
 * // assign a callback
 * q.drain = function() {
 *     console.log('all items have been processed');
 * };
 *
 * // add some items to the queue
 * q.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * q.push({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 *
 * // add some items to the queue (batch-wise)
 * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
 *     console.log('finished processing item');
 * });
 *
 * // add some items to the front of the queue
 * q.unshift({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 */
var queue$1 = function (worker, concurrency) {
    var _worker = wrapAsync(worker);
    return queue(function (items, cb) {
        _worker(items[0], cb);
    }, concurrency, 1);
};

/**
 * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
 * completed in ascending priority order.
 *
 * @name priorityQueue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`.
 * Invoked with (task, callback).
 * @param {number} concurrency - An `integer` for determining how many `worker`
 * functions should be run in parallel.  If omitted, the concurrency defaults to
 * `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
 * differences between `queue` and `priorityQueue` objects:
 * * `push(task, priority, [callback])` - `priority` should be a number. If an
 *   array of `tasks` is given, all tasks will be assigned the same priority.
 * * The `unshift` method was removed.
 */
var priorityQueue = function(worker, concurrency) {
    // Start with a normal queue
    var q = queue$1(worker, concurrency);

    // Override push to accept second parameter representing priority
    q.push = function(data, priority, callback) {
        if (callback == null) callback = noop;
        if (typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        priority = priority || 0;
        var nextNode = q._tasks.head;
        while (nextNode && priority >= nextNode.priority) {
            nextNode = nextNode.next;
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                priority: priority,
                callback: callback
            };

            if (nextNode) {
                q._tasks.insertBefore(nextNode, item);
            } else {
                q._tasks.push(item);
            }
        }
        setImmediate$1(q.process);
    };

    // Remove unshift function
    delete q.unshift;

    return q;
};

/**
 * Runs the `tasks` array of functions in parallel, without waiting until the
 * previous function has completed. Once any of the `tasks` complete or pass an
 * error to its callback, the main `callback` is immediately called. It's
 * equivalent to `Promise.race()`.
 *
 * @name race
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
 * to run. Each function can complete with an optional `result` value.
 * @param {Function} callback - A callback to run once any of the functions have
 * completed. This function gets an error or result from the first function that
 * completed. Invoked with (err, result).
 * @returns undefined
 * @example
 *
 * async.race([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // main callback
 * function(err, result) {
 *     // the result will be equal to 'two' as it finishes earlier
 * });
 */
function race(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
    if (!tasks.length) return callback();
    for (var i = 0, l = tasks.length; i < l; i++) {
        wrapAsync(tasks[i])(callback);
    }
}

/**
 * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
 *
 * @name reduceRight
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reduce]{@link module:Collections.reduce}
 * @alias foldr
 * @category Collection
 * @param {Array} array - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 */
function reduceRight (array, memo, iteratee, callback) {
    var reversed = slice(array).reverse();
    reduce(reversed, memo, iteratee, callback);
}

/**
 * Wraps the async function in another function that always completes with a
 * result object, even when it errors.
 *
 * The result object has either the property `error` or `value`.
 *
 * @name reflect
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function you want to wrap
 * @returns {Function} - A function that always passes null to it's callback as
 * the error. The second argument to the callback will be an `object` with
 * either an `error` or a `value` property.
 * @example
 *
 * async.parallel([
 *     async.reflect(function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff but error ...
 *         callback('bad stuff happened');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     })
 * ],
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = 'bad stuff happened'
 *     // results[2].value = 'two'
 * });
 */
function reflect(fn) {
    var _fn = wrapAsync(fn);
    return initialParams(function reflectOn(args, reflectCallback) {
        args.push(function callback(error, cbArg) {
            if (error) {
                reflectCallback(null, { error: error });
            } else {
                var value;
                if (arguments.length <= 2) {
                    value = cbArg;
                } else {
                    value = slice(arguments, 1);
                }
                reflectCallback(null, { value: value });
            }
        });

        return _fn.apply(this, args);
    });
}

/**
 * A helper function that wraps an array or an object of functions with `reflect`.
 *
 * @name reflectAll
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.reflect]{@link module:Utils.reflect}
 * @category Util
 * @param {Array|Object|Iterable} tasks - The collection of
 * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
 * @returns {Array} Returns an array of async functions, each wrapped in
 * `async.reflect`
 * @example
 *
 * let tasks = [
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         // do some more stuff but error ...
 *         callback(new Error('bad stuff happened'));
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ];
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = Error('bad stuff happened')
 *     // results[2].value = 'two'
 * });
 *
 * // an example using an object instead of an array
 * let tasks = {
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         callback('two');
 *     },
 *     three: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'three');
 *         }, 100);
 *     }
 * };
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results.one.value = 'one'
 *     // results.two.error = 'two'
 *     // results.three.value = 'three'
 * });
 */
function reflectAll(tasks) {
    var results;
    if (isArray(tasks)) {
        results = arrayMap(tasks, reflect);
    } else {
        results = {};
        baseForOwn(tasks, function(task, key) {
            results[key] = reflect.call(this, task);
        });
    }
    return results;
}

function reject$1(eachfn, arr, iteratee, callback) {
    _filter(eachfn, arr, function(value, cb) {
        iteratee(value, function(err, v) {
            cb(err, !v);
        });
    }, callback);
}

/**
 * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
 *
 * @name reject
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.reject(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of missing files
 *     createFiles(results);
 * });
 */
var reject = doParallel(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name rejectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectLimit = doParallelLimit(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
 *
 * @name rejectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectSeries = doLimit(rejectLimit, 1);

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant$1(value) {
  return function() {
    return value;
  };
}

/**
 * Attempts to get a successful response from `task` no more than `times` times
 * before returning an error. If the task is successful, the `callback` will be
 * passed the result of the successful task. If all attempts fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name retry
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @see [async.retryable]{@link module:ControlFlow.retryable}
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
 * object with `times` and `interval` or a number.
 * * `times` - The number of attempts to make before giving up.  The default
 *   is `5`.
 * * `interval` - The time to wait between retries, in milliseconds.  The
 *   default is `0`. The interval may also be specified as a function of the
 *   retry count (see example).
 * * `errorFilter` - An optional synchronous function that is invoked on
 *   erroneous result. If it returns `true` the retry attempts will continue;
 *   if the function returns `false` the retry flow is aborted with the current
 *   attempt's error and result being returned to the final callback.
 *   Invoked with (err).
 * * If `opts` is a number, the number specifies the number of times to retry,
 *   with the default interval of `0`.
 * @param {AsyncFunction} task - An async function to retry.
 * Invoked with (callback).
 * @param {Function} [callback] - An optional callback which is called when the
 * task has succeeded, or after the final failed attempt. It receives the `err`
 * and `result` arguments of the last attempt at completing the `task`. Invoked
 * with (err, results).
 *
 * @example
 *
 * // The `retry` function can be used as a stand-alone control flow by passing
 * // a callback, as shown below:
 *
 * // try calling apiMethod 3 times
 * async.retry(3, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 3 times, waiting 200 ms between each retry
 * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 10 times with exponential backoff
 * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
 * async.retry({
 *   times: 10,
 *   interval: function(retryCount) {
 *     return 50 * Math.pow(2, retryCount);
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod the default 5 times no delay between each retry
 * async.retry(apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod only when error condition satisfies, all other
 * // errors will abort the retry control flow and return to final callback
 * async.retry({
 *   errorFilter: function(err) {
 *     return err.message === 'Temporary error'; // only retry on a specific error
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // to retry individual methods that are not as reliable within other
 * // control flow functions, use the `retryable` wrapper:
 * async.auto({
 *     users: api.getUsers.bind(api),
 *     payments: async.retryable(3, api.getPayments.bind(api))
 * }, function(err, results) {
 *     // do something with the results
 * });
 *
 */
function retry(opts, task, callback) {
    var DEFAULT_TIMES = 5;
    var DEFAULT_INTERVAL = 0;

    var options = {
        times: DEFAULT_TIMES,
        intervalFunc: constant$1(DEFAULT_INTERVAL)
    };

    function parseTimes(acc, t) {
        if (typeof t === 'object') {
            acc.times = +t.times || DEFAULT_TIMES;

            acc.intervalFunc = typeof t.interval === 'function' ?
                t.interval :
                constant$1(+t.interval || DEFAULT_INTERVAL);

            acc.errorFilter = t.errorFilter;
        } else if (typeof t === 'number' || typeof t === 'string') {
            acc.times = +t || DEFAULT_TIMES;
        } else {
            throw new Error("Invalid arguments for async.retry");
        }
    }

    if (arguments.length < 3 && typeof opts === 'function') {
        callback = task || noop;
        task = opts;
    } else {
        parseTimes(options, opts);
        callback = callback || noop;
    }

    if (typeof task !== 'function') {
        throw new Error("Invalid arguments for async.retry");
    }

    var _task = wrapAsync(task);

    var attempt = 1;
    function retryAttempt() {
        _task(function(err) {
            if (err && attempt++ < options.times &&
                (typeof options.errorFilter != 'function' ||
                    options.errorFilter(err))) {
                setTimeout(retryAttempt, options.intervalFunc(attempt));
            } else {
                callback.apply(null, arguments);
            }
        });
    }

    retryAttempt();
}

/**
 * A close relative of [`retry`]{@link module:ControlFlow.retry}.  This method
 * wraps a task and makes it retryable, rather than immediately calling it
 * with retries.
 *
 * @name retryable
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.retry]{@link module:ControlFlow.retry}
 * @category Control Flow
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
 * options, exactly the same as from `retry`
 * @param {AsyncFunction} task - the asynchronous function to wrap.
 * This function will be passed any arguments passed to the returned wrapper.
 * Invoked with (...args, callback).
 * @returns {AsyncFunction} The wrapped function, which when invoked, will
 * retry on an error, based on the parameters specified in `opts`.
 * This function will accept the same parameters as `task`.
 * @example
 *
 * async.auto({
 *     dep1: async.retryable(3, getFromFlakyService),
 *     process: ["dep1", async.retryable(3, function (results, cb) {
 *         maybeProcessData(results.dep1, cb);
 *     })]
 * }, callback);
 */
var retryable = function (opts, task) {
    if (!task) {
        task = opts;
        opts = null;
    }
    var _task = wrapAsync(task);
    return initialParams(function (args, callback) {
        function taskFn(cb) {
            _task.apply(null, args.concat(cb));
        }

        if (opts) retry(opts, taskFn, callback);
        else retry(taskFn, callback);

    });
};

/**
 * Run the functions in the `tasks` collection in series, each one running once
 * the previous function has completed. If any functions in the series pass an
 * error to its callback, no more functions are run, and `callback` is
 * immediately called with the value of the error. Otherwise, `callback`
 * receives an array of results when `tasks` have completed.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function, and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 *  results from {@link async.series}.
 *
 * **Note** that while many implementations preserve the order of object
 * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
 * explicitly states that
 *
 * > The mechanics and order of enumerating the properties is not specified.
 *
 * So if you rely on the order in which your series of functions are executed,
 * and want this to work on all platforms, consider using an array.
 *
 * @name series
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing
 * [async functions]{@link AsyncFunction} to run in series.
 * Each function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This function gets a results array (or object)
 * containing all the result arguments passed to the `task` callbacks. Invoked
 * with (err, result).
 * @example
 * async.series([
 *     function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     },
 *     function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // results is now equal to ['one', 'two']
 * });
 *
 * async.series({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback){
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equal to: {one: 1, two: 2}
 * });
 */
function series(tasks, callback) {
    _parallel(eachOfSeries, tasks, callback);
}

/**
 * Returns `true` if at least one element in the `coll` satisfies an async test.
 * If any iteratee call returns `true`, the main `callback` is immediately
 * called.
 *
 * @name some
 * @static
 * @memberOf module:Collections
 * @method
 * @alias any
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 * @example
 *
 * async.some(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then at least one of the files exists
 * });
 */
var some = doParallel(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
 *
 * @name someLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anyLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someLimit = doParallelLimit(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
 *
 * @name someSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anySeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in series.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someSeries = doLimit(someLimit, 1);

/**
 * Sorts a list by the results of running each `coll` value through an async
 * `iteratee`.
 *
 * @name sortBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a value to use as the sort criteria as
 * its `result`.
 * Invoked with (item, callback).
 * @param {Function} callback - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is the items
 * from the original `coll` sorted by the values returned by the `iteratee`
 * calls. Invoked with (err, results).
 * @example
 *
 * async.sortBy(['file1','file2','file3'], function(file, callback) {
 *     fs.stat(file, function(err, stats) {
 *         callback(err, stats.mtime);
 *     });
 * }, function(err, results) {
 *     // results is now the original array of files sorted by
 *     // modified date
 * });
 *
 * // By modifying the callback parameter the
 * // sorting order can be influenced:
 *
 * // ascending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x);
 * }, function(err,result) {
 *     // result callback
 * });
 *
 * // descending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x*-1);    //<- x*-1 instead of x, turns the order around
 * }, function(err,result) {
 *     // result callback
 * });
 */
function sortBy (coll, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    map(coll, function (x, callback) {
        _iteratee(x, function (err, criteria) {
            if (err) return callback(err);
            callback(null, {value: x, criteria: criteria});
        });
    }, function (err, results) {
        if (err) return callback(err);
        callback(null, arrayMap(results.sort(comparator), baseProperty('value')));
    });

    function comparator(left, right) {
        var a = left.criteria, b = right.criteria;
        return a < b ? -1 : a > b ? 1 : 0;
    }
}

/**
 * Sets a time limit on an asynchronous function. If the function does not call
 * its callback within the specified milliseconds, it will be called with a
 * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
 *
 * @name timeout
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} asyncFn - The async function to limit in time.
 * @param {number} milliseconds - The specified time limit.
 * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
 * to timeout Error for more information..
 * @returns {AsyncFunction} Returns a wrapped function that can be used with any
 * of the control flow functions.
 * Invoke this function with the same parameters as you would `asyncFunc`.
 * @example
 *
 * function myFunction(foo, callback) {
 *     doAsyncTask(foo, function(err, data) {
 *         // handle errors
 *         if (err) return callback(err);
 *
 *         // do some stuff ...
 *
 *         // return processed data
 *         return callback(null, data);
 *     });
 * }
 *
 * var wrapped = async.timeout(myFunction, 1000);
 *
 * // call `wrapped` as you would `myFunction`
 * wrapped({ bar: 'bar' }, function(err, data) {
 *     // if `myFunction` takes < 1000 ms to execute, `err`
 *     // and `data` will have their expected values
 *
 *     // else `err` will be an Error with the code 'ETIMEDOUT'
 * });
 */
function timeout(asyncFn, milliseconds, info) {
    var fn = wrapAsync(asyncFn);

    return initialParams(function (args, callback) {
        var timedOut = false;
        var timer;

        function timeoutCallback() {
            var name = asyncFn.name || 'anonymous';
            var error  = new Error('Callback function "' + name + '" timed out.');
            error.code = 'ETIMEDOUT';
            if (info) {
                error.info = info;
            }
            timedOut = true;
            callback(error);
        }

        args.push(function () {
            if (!timedOut) {
                callback.apply(null, arguments);
                clearTimeout(timer);
            }
        });

        // setup timer and call original function
        timer = setTimeout(timeoutCallback, milliseconds);
        fn.apply(null, args);
    });
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
var nativeMax = Math.max;

/**
 * The base implementation of `_.range` and `_.rangeRight` which doesn't
 * coerce arguments.
 *
 * @private
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @param {number} step The value to increment or decrement by.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Array} Returns the range of numbers.
 */
function baseRange(start, end, step, fromRight) {
  var index = -1,
      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
      result = Array(length);

  while (length--) {
    result[fromRight ? length : ++index] = start;
    start += step;
  }
  return result;
}

/**
 * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name timesLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} count - The number of times to run the function.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see [async.map]{@link module:Collections.map}.
 */
function timeLimit(count, limit, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    mapLimit(baseRange(0, count, 1), limit, _iteratee, callback);
}

/**
 * Calls the `iteratee` function `n` times, and accumulates results in the same
 * manner you would use with [map]{@link module:Collections.map}.
 *
 * @name times
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 * @example
 *
 * // Pretend this is some complicated async factory
 * var createUser = function(id, callback) {
 *     callback(null, {
 *         id: 'user' + id
 *     });
 * };
 *
 * // generate 5 users
 * async.times(5, function(n, next) {
 *     createUser(n, function(err, user) {
 *         next(err, user);
 *     });
 * }, function(err, users) {
 *     // we should now have 5 users
 * });
 */
var times = doLimit(timeLimit, Infinity);

/**
 * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
 *
 * @name timesSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 */
var timesSeries = doLimit(timeLimit, 1);

/**
 * A relative of `reduce`.  Takes an Object or Array, and iterates over each
 * element in series, each step potentially mutating an `accumulator` value.
 * The type of the accumulator defaults to the type of collection passed in.
 *
 * @name transform
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} [accumulator] - The initial state of the transform.  If omitted,
 * it will default to an empty Object or Array, depending on the type of `coll`
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * collection that potentially modifies the accumulator.
 * Invoked with (accumulator, item, key, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the transformed accumulator.
 * Invoked with (err, result).
 * @example
 *
 * async.transform([1,2,3], function(acc, item, index, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         acc.push(item * 2)
 *         callback(null)
 *     });
 * }, function(err, result) {
 *     // result is now equal to [2, 4, 6]
 * });
 *
 * @example
 *
 * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
 *     setImmediate(function () {
 *         obj[key] = val * 2;
 *         callback();
 *     })
 * }, function (err, result) {
 *     // result is equal to {a: 2, b: 4, c: 6}
 * })
 */
function transform (coll, accumulator, iteratee, callback) {
    if (arguments.length <= 3) {
        callback = iteratee;
        iteratee = accumulator;
        accumulator = isArray(coll) ? [] : {};
    }
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);

    eachOf(coll, function(v, k, cb) {
        _iteratee(accumulator, v, k, cb);
    }, function(err) {
        callback(err, accumulator);
    });
}

/**
 * It runs each task in series but stops whenever any of the functions were
 * successful. If one of the tasks were successful, the `callback` will be
 * passed the result of the successful task. If all tasks fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name tryEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing functions to
 * run, each function is passed a `callback(err, result)` it must call on
 * completion with an error `err` (which can be `null`) and an optional `result`
 * value.
 * @param {Function} [callback] - An optional callback which is called when one
 * of the tasks has succeeded, or all have failed. It receives the `err` and
 * `result` arguments of the last attempt at completing the `task`. Invoked with
 * (err, results).
 * @example
 * async.tryEach([
 *     function getDataFromFirstWebsite(callback) {
 *         // Try getting the data from the first website
 *         callback(err, data);
 *     },
 *     function getDataFromSecondWebsite(callback) {
 *         // First website failed,
 *         // Try getting the data from the backup website
 *         callback(err, data);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     Now do something with the data.
 * });
 *
 */
function tryEach(tasks, callback) {
    var error = null;
    var result;
    callback = callback || noop;
    eachSeries(tasks, function(task, callback) {
        wrapAsync(task)(function (err, res/*, ...args*/) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            } else {
                result = res;
            }
            error = err;
            callback(!err);
        });
    }, function () {
        callback(error, result);
    });
}

/**
 * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
 * unmemoized form. Handy for testing.
 *
 * @name unmemoize
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.memoize]{@link module:Utils.memoize}
 * @category Util
 * @param {AsyncFunction} fn - the memoized function
 * @returns {AsyncFunction} a function that calls the original unmemoized function
 */
function unmemoize(fn) {
    return function () {
        return (fn.unmemoized || fn).apply(null, arguments);
    };
}

/**
 * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs.
 *
 * @name whilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 * @returns undefined
 * @example
 *
 * var count = 0;
 * async.whilst(
 *     function() { return count < 5; },
 *     function(callback) {
 *         count++;
 *         setTimeout(function() {
 *             callback(null, count);
 *         }, 1000);
 *     },
 *     function (err, n) {
 *         // 5 seconds have passed, n = 5
 *     }
 * );
 */
function whilst(test, iteratee, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    if (!test()) return callback(null);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        if (test()) return _iteratee(next);
        var args = slice(arguments, 1);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs. `callback` will be passed an error and any
 * arguments passed to the final `iteratee`'s callback.
 *
 * The inverse of [whilst]{@link module:ControlFlow.whilst}.
 *
 * @name until
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function until(test, iteratee, callback) {
    whilst(function() {
        return !test.apply(this, arguments);
    }, iteratee, callback);
}

/**
 * Runs the `tasks` array of functions in series, each passing their results to
 * the next in the array. However, if any of the `tasks` pass an error to their
 * own callback, the next function is not executed, and the main `callback` is
 * immediately called with the error.
 *
 * @name waterfall
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
 * to run.
 * Each function should complete with any number of `result` values.
 * The `result` values will be passed as arguments, in order, to the next task.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This will be passed the results of the last task's
 * callback. Invoked with (err, [results]).
 * @returns undefined
 * @example
 *
 * async.waterfall([
 *     function(callback) {
 *         callback(null, 'one', 'two');
 *     },
 *     function(arg1, arg2, callback) {
 *         // arg1 now equals 'one' and arg2 now equals 'two'
 *         callback(null, 'three');
 *     },
 *     function(arg1, callback) {
 *         // arg1 now equals 'three'
 *         callback(null, 'done');
 *     }
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 *
 * // Or, with named functions:
 * async.waterfall([
 *     myFirstFunction,
 *     mySecondFunction,
 *     myLastFunction,
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 * function myFirstFunction(callback) {
 *     callback(null, 'one', 'two');
 * }
 * function mySecondFunction(arg1, arg2, callback) {
 *     // arg1 now equals 'one' and arg2 now equals 'two'
 *     callback(null, 'three');
 * }
 * function myLastFunction(arg1, callback) {
 *     // arg1 now equals 'three'
 *     callback(null, 'done');
 * }
 */
var waterfall = function(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
    if (!tasks.length) return callback();
    var taskIndex = 0;

    function nextTask(args) {
        var task = wrapAsync(tasks[taskIndex++]);
        args.push(onlyOnce(next));
        task.apply(null, args);
    }

    function next(err/*, ...args*/) {
        if (err || taskIndex === tasks.length) {
            return callback.apply(null, arguments);
        }
        nextTask(slice(arguments, 1));
    }

    nextTask([]);
};

/**
 * An "async function" in the context of Async is an asynchronous function with
 * a variable number of parameters, with the final parameter being a callback.
 * (`function (arg1, arg2, ..., callback) {}`)
 * The final callback is of the form `callback(err, results...)`, which must be
 * called once the function is completed.  The callback should be called with a
 * Error as its first argument to signal that an error occurred.
 * Otherwise, if no error occurred, it should be called with `null` as the first
 * argument, and any additional `result` arguments that may apply, to signal
 * successful completion.
 * The callback must be called exactly once, ideally on a later tick of the
 * JavaScript event loop.
 *
 * This type of function is also referred to as a "Node-style async function",
 * or a "continuation passing-style function" (CPS). Most of the methods of this
 * library are themselves CPS/Node-style async functions, or functions that
 * return CPS/Node-style async functions.
 *
 * Wherever we accept a Node-style async function, we also directly accept an
 * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
 * In this case, the `async` function will not be passed a final callback
 * argument, and any thrown error will be used as the `err` argument of the
 * implicit callback, and the return value will be used as the `result` value.
 * (i.e. a `rejected` of the returned Promise becomes the `err` callback
 * argument, and a `resolved` value becomes the `result`.)
 *
 * Note, due to JavaScript limitations, we can only detect native `async`
 * functions and not transpilied implementations.
 * Your environment must have `async`/`await` support for this to work.
 * (e.g. Node > v7.6, or a recent version of a modern browser).
 * If you are using `async` functions through a transpiler (e.g. Babel), you
 * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
 * because the `async function` will be compiled to an ordinary function that
 * returns a promise.
 *
 * @typedef {Function} AsyncFunction
 * @static
 */

/**
 * Async is a utility module which provides straight-forward, powerful functions
 * for working with asynchronous JavaScript. Although originally designed for
 * use with [Node.js](http://nodejs.org) and installable via
 * `npm install --save async`, it can also be used directly in the browser.
 * @module async
 * @see AsyncFunction
 */


/**
 * A collection of `async` functions for manipulating collections, such as
 * arrays and objects.
 * @module Collections
 */

/**
 * A collection of `async` functions for controlling the flow through a script.
 * @module ControlFlow
 */

/**
 * A collection of `async` utility functions.
 * @module Utils
 */

var index = {
    apply: apply,
    applyEach: applyEach,
    applyEachSeries: applyEachSeries,
    asyncify: asyncify,
    auto: auto,
    autoInject: autoInject,
    cargo: cargo,
    compose: compose,
    concat: concat,
    concatLimit: concatLimit,
    concatSeries: concatSeries,
    constant: constant,
    detect: detect,
    detectLimit: detectLimit,
    detectSeries: detectSeries,
    dir: dir,
    doDuring: doDuring,
    doUntil: doUntil,
    doWhilst: doWhilst,
    during: during,
    each: eachLimit,
    eachLimit: eachLimit$1,
    eachOf: eachOf,
    eachOfLimit: eachOfLimit,
    eachOfSeries: eachOfSeries,
    eachSeries: eachSeries,
    ensureAsync: ensureAsync,
    every: every,
    everyLimit: everyLimit,
    everySeries: everySeries,
    filter: filter,
    filterLimit: filterLimit,
    filterSeries: filterSeries,
    forever: forever,
    groupBy: groupBy,
    groupByLimit: groupByLimit,
    groupBySeries: groupBySeries,
    log: log,
    map: map,
    mapLimit: mapLimit,
    mapSeries: mapSeries,
    mapValues: mapValues,
    mapValuesLimit: mapValuesLimit,
    mapValuesSeries: mapValuesSeries,
    memoize: memoize,
    nextTick: nextTick,
    parallel: parallelLimit,
    parallelLimit: parallelLimit$1,
    priorityQueue: priorityQueue,
    queue: queue$1,
    race: race,
    reduce: reduce,
    reduceRight: reduceRight,
    reflect: reflect,
    reflectAll: reflectAll,
    reject: reject,
    rejectLimit: rejectLimit,
    rejectSeries: rejectSeries,
    retry: retry,
    retryable: retryable,
    seq: seq,
    series: series,
    setImmediate: setImmediate$1,
    some: some,
    someLimit: someLimit,
    someSeries: someSeries,
    sortBy: sortBy,
    timeout: timeout,
    times: times,
    timesLimit: timeLimit,
    timesSeries: timesSeries,
    transform: transform,
    tryEach: tryEach,
    unmemoize: unmemoize,
    until: until,
    waterfall: waterfall,
    whilst: whilst,

    // aliases
    all: every,
    allLimit: everyLimit,
    allSeries: everySeries,
    any: some,
    anyLimit: someLimit,
    anySeries: someSeries,
    find: detect,
    findLimit: detectLimit,
    findSeries: detectSeries,
    forEach: eachLimit,
    forEachSeries: eachSeries,
    forEachLimit: eachLimit$1,
    forEachOf: eachOf,
    forEachOfSeries: eachOfSeries,
    forEachOfLimit: eachOfLimit,
    inject: reduce,
    foldl: reduce,
    foldr: reduceRight,
    select: filter,
    selectLimit: filterLimit,
    selectSeries: filterSeries,
    wrapSync: asyncify
};

exports['default'] = index;
exports.apply = apply;
exports.applyEach = applyEach;
exports.applyEachSeries = applyEachSeries;
exports.asyncify = asyncify;
exports.auto = auto;
exports.autoInject = autoInject;
exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
exports.concatLimit = concatLimit;
exports.concatSeries = concatSeries;
exports.constant = constant;
exports.detect = detect;
exports.detectLimit = detectLimit;
exports.detectSeries = detectSeries;
exports.dir = dir;
exports.doDuring = doDuring;
exports.doUntil = doUntil;
exports.doWhilst = doWhilst;
exports.during = during;
exports.each = eachLimit;
exports.eachLimit = eachLimit$1;
exports.eachOf = eachOf;
exports.eachOfLimit = eachOfLimit;
exports.eachOfSeries = eachOfSeries;
exports.eachSeries = eachSeries;
exports.ensureAsync = ensureAsync;
exports.every = every;
exports.everyLimit = everyLimit;
exports.everySeries = everySeries;
exports.filter = filter;
exports.filterLimit = filterLimit;
exports.filterSeries = filterSeries;
exports.forever = forever;
exports.groupBy = groupBy;
exports.groupByLimit = groupByLimit;
exports.groupBySeries = groupBySeries;
exports.log = log;
exports.map = map;
exports.mapLimit = mapLimit;
exports.mapSeries = mapSeries;
exports.mapValues = mapValues;
exports.mapValuesLimit = mapValuesLimit;
exports.mapValuesSeries = mapValuesSeries;
exports.memoize = memoize;
exports.nextTick = nextTick;
exports.parallel = parallelLimit;
exports.parallelLimit = parallelLimit$1;
exports.priorityQueue = priorityQueue;
exports.queue = queue$1;
exports.race = race;
exports.reduce = reduce;
exports.reduceRight = reduceRight;
exports.reflect = reflect;
exports.reflectAll = reflectAll;
exports.reject = reject;
exports.rejectLimit = rejectLimit;
exports.rejectSeries = rejectSeries;
exports.retry = retry;
exports.retryable = retryable;
exports.seq = seq;
exports.series = series;
exports.setImmediate = setImmediate$1;
exports.some = some;
exports.someLimit = someLimit;
exports.someSeries = someSeries;
exports.sortBy = sortBy;
exports.timeout = timeout;
exports.times = times;
exports.timesLimit = timeLimit;
exports.timesSeries = timesSeries;
exports.transform = transform;
exports.tryEach = tryEach;
exports.unmemoize = unmemoize;
exports.until = until;
exports.waterfall = waterfall;
exports.whilst = whilst;
exports.all = every;
exports.allLimit = everyLimit;
exports.allSeries = everySeries;
exports.any = some;
exports.anyLimit = someLimit;
exports.anySeries = someSeries;
exports.find = detect;
exports.findLimit = detectLimit;
exports.findSeries = detectSeries;
exports.forEach = eachLimit;
exports.forEachSeries = eachSeries;
exports.forEachLimit = eachLimit$1;
exports.forEachOf = eachOf;
exports.forEachOfSeries = eachOfSeries;
exports.forEachOfLimit = eachOfLimit;
exports.inject = reduce;
exports.foldl = reduce;
exports.foldr = reduceRight;
exports.select = filter;
exports.selectLimit = filterLimit;
exports.selectSeries = filterSeries;
exports.wrapSync = asyncify;

Object.defineProperty(exports, '__esModule', { value: true });

})));


/***/ }),

/***/ 728213:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(569774);
var buffer_1 = __webpack_require__(764293);
var transaction_1 = __webpack_require__(271300);
/**
 * Creates a new transaction object that doesn't need to be signed.
 *
 * @param data - A transaction can be initialized with its rlp representation, an array containing
 * the value of its fields in order, or an object containing them by name.
 *
 * @param opts - The transaction's options, used to indicate the chain and hardfork the
 * transactions belongs to.
 *
 * @see Transaction
 */
var FakeTransaction = /** @class */ (function (_super) {
    __extends(FakeTransaction, _super);
    function FakeTransaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        var _this = _super.call(this, data, opts) || this;
        Object.defineProperty(_this, 'from', {
            enumerable: true,
            configurable: true,
            get: function () { return _this.getSenderAddress(); },
            set: function (val) {
                if (val) {
                    _this._from = ethereumjs_util_1.toBuffer(val);
                }
            },
        });
        var txData = data;
        if (txData.from) {
            _this.from = ethereumjs_util_1.toBuffer(txData.from);
        }
        return _this;
    }
    /**
     * Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake
     * signature.
     *
     * @param includeSignature - Whether or not to include the signature
     */
    FakeTransaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        if (includeSignature && this._from && this._from.toString('hex') !== '') {
            // include a fake signature using the from address as a private key
            var fakeKey = buffer_1.Buffer.concat([this._from, this._from.slice(0, 12)]);
            this.sign(fakeKey);
        }
        return _super.prototype.hash.call(this, includeSignature);
    };
    return FakeTransaction;
}(transaction_1.default));
exports.default = FakeTransaction;
//# sourceMappingURL=fake.js.map

/***/ }),

/***/ 567079:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var transaction_1 = __webpack_require__(271300);
exports.Transaction = transaction_1.default;
var fake_1 = __webpack_require__(728213);
exports.FakeTransaction = fake_1.default;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 271300:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(569774);
var ethereumjs_common_1 = __webpack_require__(265982);
var buffer_1 = __webpack_require__(764293);
// secp256k1n/2
var N_DIV_2 = new ethereumjs_util_1.BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
/**
 * An Ethereum transaction.
 */
var Transaction = /** @class */ (function () {
    /**
     * Creates a new transaction from an object with its fields' values.
     *
     * @param data - A transaction can be initialized with its rlp representation, an array containing
     * the value of its fields in order, or an object containing them by name.
     *
     * @param opts - The transaction's options, used to indicate the chain and hardfork the
     * transactions belongs to.
     *
     * @note Transaction objects implement EIP155 by default. To disable it, use the constructor's
     * second parameter to set a chain and hardfork before EIP155 activation (i.e. before Spurious
     * Dragon.)
     *
     * @example
     * ```js
     * const txData = {
     *   nonce: '0x00',
     *   gasPrice: '0x09184e72a000',
     *   gasLimit: '0x2710',
     *   to: '0x0000000000000000000000000000000000000000',
     *   value: '0x00',
     *   data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
     *   v: '0x1c',
     *   r: '0x5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
     *   s: '0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13'
     * };
     * const tx = new Transaction(txData);
     * ```
     */
    function Transaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        // instantiate Common class instance based on passed options
        if (opts.common) {
            if (opts.chain || opts.hardfork) {
                throw new Error('Instantiation with both opts.common, and opts.chain and opts.hardfork parameter not allowed!');
            }
            this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : 'petersburg';
            this._common = new ethereumjs_common_1.default(chain, hardfork);
        }
        // Define Properties
        var fields = [
            {
                name: 'nonce',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasPrice',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasLimit',
                alias: 'gas',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'to',
                allowZero: true,
                length: 20,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'value',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'data',
                alias: 'input',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'v',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'r',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 's',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
        ];
        // attached serialize
        ethereumjs_util_1.defineProperties(this, fields, data);
        /**
         * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters.
         * @name from
         * @memberof Transaction
         */
        Object.defineProperty(this, 'from', {
            enumerable: true,
            configurable: true,
            get: this.getSenderAddress.bind(this),
        });
        this._validateV(this.v);
        this._overrideVSetterWithValidation();
    }
    /**
     * If the tx's `to` is to the creation address
     */
    Transaction.prototype.toCreationAddress = function () {
        return this.to.toString('hex') === '';
    };
    /**
     * Computes a sha3-256 hash of the serialized tx
     * @param includeSignature - Whether or not to include the signature
     */
    Transaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        var items;
        if (includeSignature) {
            items = this.raw;
        }
        else {
            if (this._implementsEIP155()) {
                items = this.raw.slice(0, 6).concat([
                    ethereumjs_util_1.toBuffer(this.getChainId()),
                    // TODO: stripping zeros should probably be a responsibility of the rlp module
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                ]);
            }
            else {
                items = this.raw.slice(0, 6);
            }
        }
        // create hash
        return ethereumjs_util_1.rlphash(items);
    };
    /**
     * returns chain ID
     */
    Transaction.prototype.getChainId = function () {
        return this._common.chainId();
    };
    /**
     * returns the sender's address
     */
    Transaction.prototype.getSenderAddress = function () {
        if (this._from) {
            return this._from;
        }
        var pubkey = this.getSenderPublicKey();
        this._from = ethereumjs_util_1.publicToAddress(pubkey);
        return this._from;
    };
    /**
     * returns the public key of the sender
     */
    Transaction.prototype.getSenderPublicKey = function () {
        if (!this.verifySignature()) {
            throw new Error('Invalid Signature');
        }
        // If the signature was verified successfully the _senderPubKey field is defined
        return this._senderPubKey;
    };
    /**
     * Determines if the signature is valid
     */
    Transaction.prototype.verifySignature = function () {
        var msgHash = this.hash(false);
        // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
        if (this._common.gteHardfork('homestead') && new ethereumjs_util_1.BN(this.s).cmp(N_DIV_2) === 1) {
            return false;
        }
        try {
            var v = ethereumjs_util_1.bufferToInt(this.v);
            var useChainIdWhileRecoveringPubKey = v >= this.getChainId() * 2 + 35 && this._common.gteHardfork('spuriousDragon');
            this._senderPubKey = ethereumjs_util_1.ecrecover(msgHash, v, this.r, this.s, useChainIdWhileRecoveringPubKey ? this.getChainId() : undefined);
        }
        catch (e) {
            return false;
        }
        return !!this._senderPubKey;
    };
    /**
     * sign a transaction with a given private key
     * @param privateKey - Must be 32 bytes in length
     */
    Transaction.prototype.sign = function (privateKey) {
        // We clear any previous signature before signing it. Otherwise, _implementsEIP155's can give
        // different results if this tx was already signed.
        this.v = new buffer_1.Buffer([]);
        this.s = new buffer_1.Buffer([]);
        this.r = new buffer_1.Buffer([]);
        var msgHash = this.hash(false);
        var sig = ethereumjs_util_1.ecsign(msgHash, privateKey);
        if (this._implementsEIP155()) {
            sig.v += this.getChainId() * 2 + 8;
        }
        Object.assign(this, sig);
    };
    /**
     * The amount of gas paid for the data in this tx
     */
    Transaction.prototype.getDataFee = function () {
        var data = this.raw[5];
        var cost = new ethereumjs_util_1.BN(0);
        for (var i = 0; i < data.length; i++) {
            data[i] === 0
                ? cost.iaddn(this._common.param('gasPrices', 'txDataZero'))
                : cost.iaddn(this._common.param('gasPrices', 'txDataNonZero'));
        }
        return cost;
    };
    /**
     * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)
     */
    Transaction.prototype.getBaseFee = function () {
        var fee = this.getDataFee().iaddn(this._common.param('gasPrices', 'tx'));
        if (this._common.gteHardfork('homestead') && this.toCreationAddress()) {
            fee.iaddn(this._common.param('gasPrices', 'txCreation'));
        }
        return fee;
    };
    /**
     * the up front amount that an account must have for this transaction to be valid
     */
    Transaction.prototype.getUpfrontCost = function () {
        return new ethereumjs_util_1.BN(this.gasLimit).imul(new ethereumjs_util_1.BN(this.gasPrice)).iadd(new ethereumjs_util_1.BN(this.value));
    };
    Transaction.prototype.validate = function (stringError) {
        if (stringError === void 0) { stringError = false; }
        var errors = [];
        if (!this.verifySignature()) {
            errors.push('Invalid Signature');
        }
        if (this.getBaseFee().cmp(new ethereumjs_util_1.BN(this.gasLimit)) > 0) {
            errors.push(["gas limit is too low. Need at least " + this.getBaseFee()]);
        }
        if (stringError === false) {
            return errors.length === 0;
        }
        else {
            return errors.join(' ');
        }
    };
    /**
     * Returns the rlp encoding of the transaction
     */
    Transaction.prototype.serialize = function () {
        // Note: This never gets executed, defineProperties overwrites it.
        return ethereumjs_util_1.rlp.encode(this.raw);
    };
    /**
     * Returns the transaction in JSON format
     * @see {@link https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md#defineproperties|ethereumjs-util}
     */
    Transaction.prototype.toJSON = function (labels) {
        if (labels === void 0) { labels = false; }
        // Note: This never gets executed, defineProperties overwrites it.
        return {};
    };
    Transaction.prototype._validateV = function (v) {
        if (v === undefined || v.length === 0) {
            return;
        }
        if (!this._common.gteHardfork('spuriousDragon')) {
            return;
        }
        var vInt = ethereumjs_util_1.bufferToInt(v);
        if (vInt === 27 || vInt === 28) {
            return;
        }
        var isValidEIP155V = vInt === this.getChainId() * 2 + 35 || vInt === this.getChainId() * 2 + 36;
        if (!isValidEIP155V) {
            throw new Error("Incompatible EIP155-based V " + vInt + " and chain id " + this.getChainId() + ". See the second parameter of the Transaction constructor to set the chain id.");
        }
    };
    Transaction.prototype._isSigned = function () {
        return this.v.length > 0 && this.r.length > 0 && this.s.length > 0;
    };
    Transaction.prototype._overrideVSetterWithValidation = function () {
        var _this = this;
        var vDescriptor = Object.getOwnPropertyDescriptor(this, 'v');
        Object.defineProperty(this, 'v', __assign({}, vDescriptor, { set: function (v) {
                if (v !== undefined) {
                    _this._validateV(ethereumjs_util_1.toBuffer(v));
                }
                vDescriptor.set(v);
            } }));
    };
    Transaction.prototype._implementsEIP155 = function () {
        var onEIP155BlockOrLater = this._common.gteHardfork('spuriousDragon');
        if (!this._isSigned()) {
            // We sign with EIP155 all unsigned transactions after spuriousDragon
            return onEIP155BlockOrLater;
        }
        // EIP155 spec:
        // If block.number >= 2,675,000 and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing
        // the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six
        // elements (i.e. nonce, gasprice, startgas, to, value, data), hash nine elements, with v replaced by
        // CHAIN_ID, r = 0 and s = 0.
        var v = ethereumjs_util_1.bufferToInt(this.v);
        var vAndChainIdMeetEIP155Conditions = v === this.getChainId() * 2 + 35 || v === this.getChainId() * 2 + 36;
        return vAndChainIdMeetEIP155Conditions && onEIP155BlockOrLater;
    };
    return Transaction;
}());
exports.default = Transaction;
//# sourceMappingURL=transaction.js.map

/***/ }),

/***/ 262022:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(758993);
var hash_1 = __webpack_require__(955941);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 758993:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 911732:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 955941:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(833382);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(758993);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 569774:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(911732));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(262022));
/**
 * Hash functions
 */
__export(__webpack_require__(955941));
/**
 * ECDSA signature
 */
__export(__webpack_require__(544141));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(758993));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(252314));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 252314:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(758993);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 544141:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(758993);
var hash_1 = __webpack_require__(955941);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 875201:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(456372)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 833382:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(875201)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(750241)
}


/***/ }),

/***/ 750241:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(456372)(__webpack_require__(693003))


/***/ }),

/***/ 456372:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(724019)
const createShake = __webpack_require__(940507)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 724019:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 940507:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 245822:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 693003:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(245822)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 334366:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var createKeccakHash = __webpack_require__(254554);
var secp256k1 = __webpack_require__(907972);
var assert = __webpack_require__(742357);
var rlp = __webpack_require__(6636);
var BN = __webpack_require__(213550);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
Object.assign(exports, __webpack_require__(180884));

/**
 * the max integer that this VM can handle (a ```BN```)
 * @var {BN} MAX_INTEGER
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);

/**
 * 2^256 (a ```BN```)
 * @var {BN} TWO_POW256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);

/**
 * Keccak-256 hash of null (a ```String```)
 * @var {String} KECCAK256_NULL_S
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
exports.SHA3_NULL_S = exports.KECCAK256_NULL_S;

/**
 * Keccak-256 hash of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_NULL
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
exports.SHA3_NULL = exports.KECCAK256_NULL;

/**
 * Keccak-256 of an RLP of an empty array (a ```String```)
 * @var {String} KECCAK256_RLP_ARRAY_S
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S;

/**
 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP_ARRAY
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY;

/**
 * Keccak-256 hash of the RLP of null  (a ```String```)
 * @var {String} KECCAK256_RLP_S
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
exports.SHA3_RLP_S = exports.KECCAK256_RLP_S;

/**
 * Keccak-256 hash of the RLP of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
exports.SHA3_RLP = exports.KECCAK256_RLP;

/**
 * [`BN`](https://github.com/indutny/bn.js)
 * @var {Function}
 */
exports.BN = BN;

/**
 * [`rlp`](https://github.com/ethereumjs/rlp)
 * @var {Function}
 */
exports.rlp = rlp;

/**
 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
 * @var {Object}
 */
exports.secp256k1 = secp256k1;

/**
 * Returns a buffer filled with 0s
 * @method zeros
 * @param {Number} bytes  the number of bytes the buffer should be
 * @return {Buffer}
 */
exports.zeros = function (bytes) {
  return Buffer.allocUnsafe(bytes).fill(0);
};

/**
  * Returns a zero address
  * @method zeroAddress
  * @return {String}
  */
exports.zeroAddress = function () {
  var addressLength = 20;
  var zeroAddress = exports.zeros(addressLength);
  return exports.bufferToHex(zeroAddress);
};

/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @method lsetLength
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @param {Boolean} [right=false] whether to start padding form the left or right
 * @return {Buffer|Array}
 */
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
  var buf = exports.zeros(length);
  msg = exports.toBuffer(msg);
  if (right) {
    if (msg.length < length) {
      msg.copy(buf);
      return buf;
    }
    return msg.slice(0, length);
  } else {
    if (msg.length < length) {
      msg.copy(buf, length - msg.length);
      return buf;
    }
    return msg.slice(-length);
  }
};

/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @return {Buffer|Array}
 */
exports.setLengthRight = function (msg, length) {
  return exports.setLength(msg, length, true);
};

/**
 * Trims leading zeros from a `Buffer` or an `Array`
 * @param {Buffer|Array|String} a
 * @return {Buffer|Array|String}
 */
exports.unpad = exports.stripZeros = function (a) {
  a = exports.stripHexPrefix(a);
  var first = a[0];
  while (a.length > 0 && first.toString() === '0') {
    a = a.slice(1);
    first = a[0];
  }
  return a;
};
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param {*} v the value
 */
exports.toBuffer = function (v) {
  if (!Buffer.isBuffer(v)) {
    if (Array.isArray(v)) {
      v = Buffer.from(v);
    } else if (typeof v === 'string') {
      if (exports.isHexString(v)) {
        v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (typeof v === 'number') {
      v = exports.intToBuffer(v);
    } else if (v === null || v === undefined) {
      v = Buffer.allocUnsafe(0);
    } else if (BN.isBN(v)) {
      v = v.toArrayLike(Buffer);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type');
    }
  }
  return v;
};

/**
 * Converts a `Buffer` to a `Number`
 * @param {Buffer} buf
 * @return {Number}
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
  return new BN(exports.toBuffer(buf)).toNumber();
};

/**
 * Converts a `Buffer` into a hex `String`
 * @param {Buffer} buf
 * @return {String}
 */
exports.bufferToHex = function (buf) {
  buf = exports.toBuffer(buf);
  return '0x' + buf.toString('hex');
};

/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param {Buffer} num
 * @return {BN}
 */
exports.fromSigned = function (num) {
  return new BN(num).fromTwos(256);
};

/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param {BN} num
 * @return {Buffer}
 */
exports.toUnsigned = function (num) {
  return Buffer.from(num.toTwos(256).toArray());
};

/**
 * Creates Keccak hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the Keccak width
 * @return {Buffer}
 */
exports.keccak = function (a, bits) {
  a = exports.toBuffer(a);
  if (!bits) bits = 256;

  return createKeccakHash('keccak' + bits).update(a).digest();
};

/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.keccak256 = function (a) {
  return exports.keccak(a);
};

/**
 * Creates SHA-3 (Keccak) hash of the input [OBSOLETE]
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the SHA-3 width
 * @return {Buffer}
 */
exports.sha3 = exports.keccak;

/**
 * Creates SHA256 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.sha256 = function (a) {
  a = exports.toBuffer(a);
  return createHash('sha256').update(a).digest();
};

/**
 * Creates RIPEMD160 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Boolean} padded whether it should be padded to 256 bits or not
 * @return {Buffer}
 */
exports.ripemd160 = function (a, padded) {
  a = exports.toBuffer(a);
  var hash = createHash('rmd160').update(a).digest();
  if (padded === true) {
    return exports.setLength(hash, 32);
  } else {
    return hash;
  }
};

/**
 * Creates SHA-3 hash of the RLP encoded version of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.rlphash = function (a) {
  return exports.keccak(rlp.encode(a));
};

/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 * @param {Buffer} privateKey
 * @return {Boolean}
 */
exports.isValidPrivate = function (privateKey) {
  return secp256k1.privateKeyVerify(privateKey);
};

/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Boolean}
 */
exports.isValidPublic = function (publicKey, sanitize) {
  if (publicKey.length === 64) {
    // Convert to SEC1 for secp256k1
    return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
  }

  if (!sanitize) {
    return false;
  }

  return secp256k1.publicKeyVerify(publicKey);
};

/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Buffer}
 */
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
  pubKey = exports.toBuffer(pubKey);
  if (sanitize && pubKey.length !== 64) {
    pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
  }
  assert(pubKey.length === 64);
  // Only take the lower 160bits of the hash
  return exports.keccak(pubKey).slice(-20);
};

/**
 * Returns the ethereum public key of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
var privateToPublic = exports.privateToPublic = function (privateKey) {
  privateKey = exports.toBuffer(privateKey);
  // skip the type flag and use the X, Y points
  return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};

/**
 * Converts a public key to the Ethereum format.
 * @param {Buffer} publicKey
 * @return {Buffer}
 */
exports.importPublic = function (publicKey) {
  publicKey = exports.toBuffer(publicKey);
  if (publicKey.length !== 64) {
    publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
  }
  return publicKey;
};

/**
 * ECDSA sign
 * @param {Buffer} msgHash
 * @param {Buffer} privateKey
 * @return {Object}
 */
exports.ecsign = function (msgHash, privateKey) {
  var sig = secp256k1.sign(msgHash, privateKey);

  var ret = {};
  ret.r = sig.signature.slice(0, 32);
  ret.s = sig.signature.slice(32, 64);
  ret.v = sig.recovery + 27;
  return ret;
};

/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 * @param message
 * @returns {Buffer} hash
 */
exports.hashPersonalMessage = function (message) {
  var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString());
  return exports.keccak(Buffer.concat([prefix, message]));
};

/**
 * ECDSA public key recovery from signature
 * @param {Buffer} msgHash
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {Buffer} publicKey
 */
exports.ecrecover = function (msgHash, v, r, s) {
  var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
  var recovery = v - 27;
  if (recovery !== 0 && recovery !== 1) {
    throw new Error('Invalid signature v value');
  }
  var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
  return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};

/**
 * Convert signature parameters into the format of `eth_sign` RPC method
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {String} sig
 */
exports.toRpcSig = function (v, r, s) {
  // NOTE: with potential introduction of chainId this might need to be updated
  if (v !== 27 && v !== 28) {
    throw new Error('Invalid recovery id');
  }

  // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
  // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
  return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)]));
};

/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 * @param {String} sig
 * @return {Object}
 */
exports.fromRpcSig = function (sig) {
  sig = exports.toBuffer(sig);

  // NOTE: with potential introduction of chainId this might need to be updated
  if (sig.length !== 65) {
    throw new Error('Invalid signature length');
  }

  var v = sig[64];
  // support both versions of `eth_sign` responses
  if (v < 27) {
    v += 27;
  }

  return {
    v: v,
    r: sig.slice(0, 32),
    s: sig.slice(32, 64)
  };
};

/**
 * Returns the ethereum address of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
exports.privateToAddress = function (privateKey) {
  return exports.publicToAddress(privateToPublic(privateKey));
};

/**
 * Checks if the address is a valid. Accepts checksummed addresses too
 * @param {String} address
 * @return {Boolean}
 */
exports.isValidAddress = function (address) {
  return (/^0x[0-9a-fA-F]{40}$/.test(address)
  );
};

/**
  * Checks if a given address is a zero address
  * @method isZeroAddress
  * @param {String} address
  * @return {Boolean}
  */
exports.isZeroAddress = function (address) {
  var zeroAddress = exports.zeroAddress();
  return zeroAddress === exports.addHexPrefix(address);
};

/**
 * Returns a checksummed address
 * @param {String} address
 * @return {String}
 */
exports.toChecksumAddress = function (address) {
  address = exports.stripHexPrefix(address).toLowerCase();
  var hash = exports.keccak(address).toString('hex');
  var ret = '0x';

  for (var i = 0; i < address.length; i++) {
    if (parseInt(hash[i], 16) >= 8) {
      ret += address[i].toUpperCase();
    } else {
      ret += address[i];
    }
  }

  return ret;
};

/**
 * Checks if the address is a valid checksummed address
 * @param {Buffer} address
 * @return {Boolean}
 */
exports.isValidChecksumAddress = function (address) {
  return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};

/**
 * Generates an address of a newly created contract
 * @param {Buffer} from the address which is creating this new address
 * @param {Buffer} nonce the nonce of the from account
 * @return {Buffer}
 */
exports.generateAddress = function (from, nonce) {
  from = exports.toBuffer(from);
  nonce = new BN(nonce);

  if (nonce.isZero()) {
    // in RLP we want to encode null in the case of zero nonce
    // read the RLP documentation for an answer if you dare
    nonce = null;
  } else {
    nonce = Buffer.from(nonce.toArray());
  }

  // Only take the lower 160bits of the hash
  return exports.rlphash([from, nonce]).slice(-20);
};

/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
 * @param {Buffer|String} address
 * @return {Boolean}
 */
exports.isPrecompiled = function (address) {
  var a = exports.unpad(address);
  return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};

/**
 * Adds "0x" to a given `String` if it does not already start with "0x"
 * @param {String} str
 * @return {String}
 */
exports.addHexPrefix = function (str) {
  if (typeof str !== 'string') {
    return str;
  }

  return exports.isHexPrefixed(str) ? str : '0x' + str;
};

/**
 * Validate ECDSA signature
 * @method isValidSignature
 * @param {Buffer} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @param {Boolean} [homestead=true]
 * @return {Boolean}
 */

exports.isValidSignature = function (v, r, s, homestead) {
  var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
  var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);

  if (r.length !== 32 || s.length !== 32) {
    return false;
  }

  if (v !== 27 && v !== 28) {
    return false;
  }

  r = new BN(r);
  s = new BN(s);

  if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
    return false;
  }

  if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) {
    return false;
  }

  return true;
};

/**
 * Converts a `Buffer` or `Array` to JSON
 * @param {Buffer|Array} ba
 * @return {Array|String|null}
 */
exports.baToJSON = function (ba) {
  if (Buffer.isBuffer(ba)) {
    return '0x' + ba.toString('hex');
  } else if (ba instanceof Array) {
    var array = [];
    for (var i = 0; i < ba.length; i++) {
      array.push(exports.baToJSON(ba[i]));
    }
    return array;
  }
};

/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param {Object} self the `Object` to define properties on
 * @param {Array} fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param {*} data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
  self.raw = [];
  self._fields = [];

  // attach the `toJSON`
  self.toJSON = function (label) {
    if (label) {
      var obj = {};
      self._fields.forEach(function (field) {
        obj[field] = '0x' + self[field].toString('hex');
      });
      return obj;
    }
    return exports.baToJSON(this.raw);
  };

  self.serialize = function serialize() {
    return rlp.encode(self.raw);
  };

  fields.forEach(function (field, i) {
    self._fields.push(field.name);
    function getter() {
      return self.raw[i];
    }
    function setter(v) {
      v = exports.toBuffer(v);

      if (v.toString('hex') === '00' && !field.allowZero) {
        v = Buffer.allocUnsafe(0);
      }

      if (field.allowLess && field.length) {
        v = exports.stripZeros(v);
        assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes');
      } else if (!(field.allowZero && v.length === 0) && field.length) {
        assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length);
      }

      self.raw[i] = v;
    }

    Object.defineProperty(self, field.name, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter
    });

    if (field.default) {
      self[field.name] = field.default;
    }

    // attach alias
    if (field.alias) {
      Object.defineProperty(self, field.alias, {
        enumerable: false,
        configurable: true,
        set: setter,
        get: getter
      });
    }
  });

  // if the constuctor is passed data
  if (data) {
    if (typeof data === 'string') {
      data = Buffer.from(exports.stripHexPrefix(data), 'hex');
    }

    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }

    if (Array.isArray(data)) {
      if (data.length > self._fields.length) {
        throw new Error('wrong number of fields in data');
      }

      // make sure all the items are buffers
      data.forEach(function (d, i) {
        self[self._fields[i]] = exports.toBuffer(d);
      });
    } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
      var keys = Object.keys(data);
      fields.forEach(function (field) {
        if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name];
        if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias];
      });
    } else {
      throw new Error('invalid data');
    }
  }
};

/***/ }),

/***/ 836446:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(562114)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 254554:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(836446)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(838765)
}


/***/ }),

/***/ 838765:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(562114)(__webpack_require__(262631))


/***/ }),

/***/ 562114:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var createKeccak = __webpack_require__(704782)
var createShake = __webpack_require__(926254)

module.exports = function (KeccakState) {
  var Keccak = createKeccak(KeccakState)
  var Shake = createShake(KeccakState)

  return function (algorithm, options) {
    var hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 704782:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var Transform = __webpack_require__(92413).Transform
var inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    var error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    var error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    var digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    var clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 926254:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var Transform = __webpack_require__(92413).Transform
var inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    var error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    var data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    var clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 987801:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

var P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (var round = 0; round < 24; ++round) {
    // theta
    var lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    var hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    var lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    var hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    var lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    var hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    var lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    var hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    var lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    var hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    var lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    var hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    var t1slo0 = s[0] ^ lo
    var t1shi0 = s[1] ^ hi
    var t1slo5 = s[10] ^ lo
    var t1shi5 = s[11] ^ hi
    var t1slo10 = s[20] ^ lo
    var t1shi10 = s[21] ^ hi
    var t1slo15 = s[30] ^ lo
    var t1shi15 = s[31] ^ hi
    var t1slo20 = s[40] ^ lo
    var t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    var t1slo1 = s[2] ^ lo
    var t1shi1 = s[3] ^ hi
    var t1slo6 = s[12] ^ lo
    var t1shi6 = s[13] ^ hi
    var t1slo11 = s[22] ^ lo
    var t1shi11 = s[23] ^ hi
    var t1slo16 = s[32] ^ lo
    var t1shi16 = s[33] ^ hi
    var t1slo21 = s[42] ^ lo
    var t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    var t1slo2 = s[4] ^ lo
    var t1shi2 = s[5] ^ hi
    var t1slo7 = s[14] ^ lo
    var t1shi7 = s[15] ^ hi
    var t1slo12 = s[24] ^ lo
    var t1shi12 = s[25] ^ hi
    var t1slo17 = s[34] ^ lo
    var t1shi17 = s[35] ^ hi
    var t1slo22 = s[44] ^ lo
    var t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    var t1slo3 = s[6] ^ lo
    var t1shi3 = s[7] ^ hi
    var t1slo8 = s[16] ^ lo
    var t1shi8 = s[17] ^ hi
    var t1slo13 = s[26] ^ lo
    var t1shi13 = s[27] ^ hi
    var t1slo18 = s[36] ^ lo
    var t1shi18 = s[37] ^ hi
    var t1slo23 = s[46] ^ lo
    var t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    var t1slo4 = s[8] ^ lo
    var t1shi4 = s[9] ^ hi
    var t1slo9 = s[18] ^ lo
    var t1shi9 = s[19] ^ hi
    var t1slo14 = s[28] ^ lo
    var t1shi14 = s[29] ^ hi
    var t1slo19 = s[38] ^ lo
    var t1shi19 = s[39] ^ hi
    var t1slo24 = s[48] ^ lo
    var t1shi24 = s[49] ^ hi

    // rho & pi
    var t2slo0 = t1slo0
    var t2shi0 = t1shi0
    var t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    var t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    var t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    var t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    var t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    var t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    var t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    var t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    var t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    var t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    var t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    var t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    var t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    var t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    var t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    var t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    var t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    var t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    var t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    var t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    var t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    var t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    var t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    var t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    var t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    var t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    var t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    var t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    var t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    var t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    var t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    var t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    var t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    var t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    var t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    var t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    var t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    var t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    var t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    var t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    var t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    var t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    var t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    var t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    var t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    var t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    var t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    var t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 262631:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var keccakState = __webpack_require__(987801)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (var i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (var i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  var output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (var i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 826026:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2013 LevelUP contributors
 * See list at <https://github.com/rvagg/node-levelup#contributing>
 * MIT +no-false-attribs License
 * <https://github.com/Level/level-ws/master/LICENSE>
 */

var Writable = __webpack_require__(92413).Writable || __webpack_require__(111833).Writable
  , inherits = __webpack_require__(431669).inherits
  , extend   = __webpack_require__(186754)

  , defaultOptions = {
        type          : 'put'
      , keyEncoding   : 'utf8'
      , valueEncoding : 'utf8'
    }

    // copied from LevelUP
  , encodingNames  = [
        'hex'
      , 'utf8'
      , 'utf-8'
      , 'ascii'
      , 'binary'
      , 'base64'
      , 'ucs2'
      , 'ucs-2'
      , 'utf16le'
      , 'utf-16le'
    ]

    // copied from LevelUP
  , encodingOpts = (function () {
      var eo = {}
      encodingNames.forEach(function (e) {
        eo[e] = { valueEncoding : e }
      })
      return eo
    }())

// copied from LevelUP
function getOptions (levelup, options) {
  var s = typeof options == 'string' // just an encoding
  if (!s && options && options.encoding && !options.valueEncoding)
    options.valueEncoding = options.encoding
  return extend(
      (levelup && levelup.options) || {}
    , s ? encodingOpts[options] || encodingOpts[defaultOptions.valueEncoding]
        : options
  )
}

function WriteStream (options, db) {
  if (!(this instanceof WriteStream))
    return new WriteStream(options, db)

  Writable.call(this, { objectMode: true })
  this._options = extend(defaultOptions, getOptions(db, options))
  this._db      = db
  this._buffer = []
  this.writable = true
  this.readable = false

  var self = this
  this.on('finish', function f () {
    if (self._buffer && self._buffer.length) {
      return self._flush(f)
    }
    self.writable = false
    self.emit('close')
  })
}

inherits(WriteStream, Writable)

WriteStream.prototype._write = function write (d, enc, next) {
  var self = this
  if (self._destroyed)
    return
  if (!self._db.isOpen())
    return self._db.once('ready', function () {
      write.call(self, d, enc, next)
    })

  if (self._options.maxBufferLength &&
      self._buffer.length > self._options.maxBufferLength) {
    self.once('_flush', next)
  }
  else {
    if (self._buffer.length === 0)
      process.nextTick(function () { self._flush() })
    self._buffer.push(d)
    next()
  }
}

WriteStream.prototype._flush = function (f) {
  var self = this
    , buffer = self._buffer

  if (self._destroyed || !buffer) return
 
  if (!self._db.isOpen()) {
    return self._db.on('ready', function () { self._flush(f) })
  }
  self._buffer = []

  self._db.batch(buffer.map(function (d) {
    return {
        type          : d.type || self._options.type
      , key           : d.key
      , value         : d.value
      , keyEncoding   : d.keyEncoding || self._options.keyEncoding
      , valueEncoding : d.valueEncoding
          || d.encoding
          || self._options.valueEncoding
    }
  }), cb)

  function cb (err) {
    if (err) {
      self.writable = false
      self.emit('error', err)
    }
    else {
      if (f) f()
      self.emit('_flush')
    }
  }
}

WriteStream.prototype.toString = function () {
  return 'LevelUP.WriteStream'
}

WriteStream.prototype.destroy = function () {
  if (this._destroyed) return
  this._buffer = null
  this._destroyed = true
  this.writable = false
  this.emit('close')
}

WriteStream.prototype.destroySoon = function () {
  this.end()
}

module.exports = function (db) {
  db.writeStream = db.createWriteStream = function (options) {
    return new WriteStream(options, db)
  }
  return db
}

module.exports.WriteStream = WriteStream

/***/ }),

/***/ 396518:
/***/ ((module) => {

module.exports = Array.isArray || function (arr) {
  return Object.prototype.toString.call(arr) == '[object Array]';
};


/***/ }),

/***/ 533943:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.

module.exports = Duplex;

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) keys.push(key);
  return keys;
}
/*</replacement>*/


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(408226);
var Writable = __webpack_require__(643970);

util.inherits(Duplex, Readable);

forEach(objectKeys(Writable.prototype), function(method) {
  if (!Duplex.prototype[method])
    Duplex.prototype[method] = Writable.prototype[method];
});

function Duplex(options) {
  if (!(this instanceof Duplex))
    return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false)
    this.readable = false;

  if (options && options.writable === false)
    this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false)
    this.allowHalfOpen = false;

  this.once('end', onend);
}

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended)
    return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  process.nextTick(this.end.bind(this));
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}


/***/ }),

/***/ 766469:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.

module.exports = PassThrough;

var Transform = __webpack_require__(95780);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough))
    return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function(chunk, encoding, cb) {
  cb(null, chunk);
};


/***/ }),

/***/ 408226:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(396518);
/*</replacement>*/


/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Readable.ReadableState = ReadableState;

var EE = __webpack_require__(128614).EventEmitter;

/*<replacement>*/
if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

var Stream = __webpack_require__(92413);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var StringDecoder;

util.inherits(Readable, Stream);

function ReadableState(options, stream) {
  options = options || {};

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.buffer = [];
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = false;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // In streams that never have any data, and do push(null) right away,
  // the consumer can miss the 'end' event if they do some I/O before
  // consuming the stream.  So, we don't emit('end') until some reading
  // happens.
  this.calledRead = false;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, becuase any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;


  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // when piping, we only care about 'readable' events that happen
  // after read()ing all the bytes and not getting any pushback.
  this.ranOut = false;

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder)
      StringDecoder = __webpack_require__(62863)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  if (!(this instanceof Readable))
    return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  Stream.call(this);
}

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function(chunk, encoding) {
  var state = this._readableState;

  if (typeof chunk === 'string' && !state.objectMode) {
    encoding = encoding || state.defaultEncoding;
    if (encoding !== state.encoding) {
      chunk = new Buffer(chunk, encoding);
      encoding = '';
    }
  }

  return readableAddChunk(this, state, chunk, encoding, false);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
  var state = this._readableState;
  return readableAddChunk(this, state, chunk, '', true);
};

function readableAddChunk(stream, state, chunk, encoding, addToFront) {
  var er = chunkInvalid(state, chunk);
  if (er) {
    stream.emit('error', er);
  } else if (chunk === null || chunk === undefined) {
    state.reading = false;
    if (!state.ended)
      onEofChunk(stream, state);
  } else if (state.objectMode || chunk && chunk.length > 0) {
    if (state.ended && !addToFront) {
      var e = new Error('stream.push() after EOF');
      stream.emit('error', e);
    } else if (state.endEmitted && addToFront) {
      var e = new Error('stream.unshift() after end event');
      stream.emit('error', e);
    } else {
      if (state.decoder && !addToFront && !encoding)
        chunk = state.decoder.write(chunk);

      // update the buffer info.
      state.length += state.objectMode ? 1 : chunk.length;
      if (addToFront) {
        state.buffer.unshift(chunk);
      } else {
        state.reading = false;
        state.buffer.push(chunk);
      }

      if (state.needReadable)
        emitReadable(stream);

      maybeReadMore(stream, state);
    }
  } else if (!addToFront) {
    state.reading = false;
  }

  return needMoreData(state);
}



// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended &&
         (state.needReadable ||
          state.length < state.highWaterMark ||
          state.length === 0);
}

// backwards compatibility.
Readable.prototype.setEncoding = function(enc) {
  if (!StringDecoder)
    StringDecoder = __webpack_require__(62863)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
};

// Don't raise the hwm > 128MB
var MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2
    n--;
    for (var p = 1; p < 32; p <<= 1) n |= n >> p;
    n++;
  }
  return n;
}

function howMuchToRead(n, state) {
  if (state.length === 0 && state.ended)
    return 0;

  if (state.objectMode)
    return n === 0 ? 0 : 1;

  if (n === null || isNaN(n)) {
    // only flow one buffer at a time
    if (state.flowing && state.buffer.length)
      return state.buffer[0].length;
    else
      return state.length;
  }

  if (n <= 0)
    return 0;

  // If we're asking for more than the target buffer level,
  // then raise the water mark.  Bump up to the next highest
  // power of 2, to prevent increasing it excessively in tiny
  // amounts.
  if (n > state.highWaterMark)
    state.highWaterMark = roundUpToNextPowerOf2(n);

  // don't have that much.  return null, unless we've ended.
  if (n > state.length) {
    if (!state.ended) {
      state.needReadable = true;
      return 0;
    } else
      return state.length;
  }

  return n;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
  var state = this._readableState;
  state.calledRead = true;
  var nOrig = n;
  var ret;

  if (typeof n !== 'number' || n > 0)
    state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 &&
      state.needReadable &&
      (state.length >= state.highWaterMark || state.ended)) {
    emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    ret = null;

    // In cases where the decoder did not receive enough data
    // to produce a full chunk, then immediately received an
    // EOF, state.buffer will contain [<Buffer >, <Buffer 00 ...>].
    // howMuchToRead will see this and coerce the amount to
    // read to zero (because it's looking at the length of the
    // first <Buffer > in state.buffer), and we'll end up here.
    //
    // This can only happen via state.decoder -- no other venue
    // exists for pushing a zero-length chunk into state.buffer
    // and triggering this behavior. In this case, we return our
    // remaining data and end the stream, if appropriate.
    if (state.length > 0 && state.decoder) {
      ret = fromList(n, state);
      state.length -= ret.length;
    }

    if (state.length === 0)
      endReadable(this);

    return ret;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;

  // if we currently have less than the highWaterMark, then also read some
  if (state.length - n <= state.highWaterMark)
    doRead = true;

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading)
    doRead = false;

  if (doRead) {
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0)
      state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
  }

  // If _read called its callback synchronously, then `reading`
  // will be false, and we need to re-evaluate how much data we
  // can return to the user.
  if (doRead && !state.reading)
    n = howMuchToRead(nOrig, state);

  if (n > 0)
    ret = fromList(n, state);
  else
    ret = null;

  if (ret === null) {
    state.needReadable = true;
    n = 0;
  }

  state.length -= n;

  // If we have nothing in the buffer, then we want to know
  // as soon as we *do* get something into the buffer.
  if (state.length === 0 && !state.ended)
    state.needReadable = true;

  // If we happened to read() exactly the remaining amount in the
  // buffer, and the EOF has been seen at this point, then make sure
  // that we emit 'end' on the very next tick.
  if (state.ended && !state.endEmitted && state.length === 0)
    endReadable(this);

  return ret;
};

function chunkInvalid(state, chunk) {
  var er = null;
  if (!Buffer.isBuffer(chunk) &&
      'string' !== typeof chunk &&
      chunk !== null &&
      chunk !== undefined &&
      !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}


function onEofChunk(stream, state) {
  if (state.decoder && !state.ended) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // if we've ended and we have some data left, then emit
  // 'readable' now to make sure it gets picked up.
  if (state.length > 0)
    emitReadable(stream);
  else
    endReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (state.emittedReadable)
    return;

  state.emittedReadable = true;
  if (state.sync)
    process.nextTick(function() {
      emitReadable_(stream);
    });
  else
    emitReadable_(stream);
}

function emitReadable_(stream) {
  stream.emit('readable');
}


// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    process.nextTick(function() {
      maybeReadMore_(stream, state);
    });
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended &&
         state.length < state.highWaterMark) {
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;
    else
      len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function(n) {
  this.emit('error', new Error('not implemented'));
};

Readable.prototype.pipe = function(dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;

  var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
              dest !== process.stdout &&
              dest !== process.stderr;

  var endFn = doEnd ? onend : cleanup;
  if (state.endEmitted)
    process.nextTick(endFn);
  else
    src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable) {
    if (readable !== src) return;
    cleanup();
  }

  function onend() {
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  function cleanup() {
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', cleanup);

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (!dest._writableState || dest._writableState.needDrain)
      ondrain();
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    unpipe();
    dest.removeListener('error', onerror);
    if (EE.listenerCount(dest, 'error') === 0)
      dest.emit('error', er);
  }
  // This is a brutally ugly hack to make sure that our error handler
  // is attached before any userland ones.  NEVER DO THIS.
  if (!dest._events || !dest._events.error)
    dest.on('error', onerror);
  else if (isArray(dest._events.error))
    dest._events.error.unshift(onerror);
  else
    dest._events.error = [onerror, dest._events.error];



  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    // the handler that waits for readable events after all
    // the data gets sucked out in flow.
    // This would be easier to follow with a .once() handler
    // in flow(), but that is too slow.
    this.on('readable', pipeOnReadable);

    state.flowing = true;
    process.nextTick(function() {
      flow(src);
    });
  }

  return dest;
};

function pipeOnDrain(src) {
  return function() {
    var dest = this;
    var state = src._readableState;
    state.awaitDrain--;
    if (state.awaitDrain === 0)
      flow(src);
  };
}

function flow(src) {
  var state = src._readableState;
  var chunk;
  state.awaitDrain = 0;

  function write(dest, i, list) {
    var written = dest.write(chunk);
    if (false === written) {
      state.awaitDrain++;
    }
  }

  while (state.pipesCount && null !== (chunk = src.read())) {

    if (state.pipesCount === 1)
      write(state.pipes, 0, null);
    else
      forEach(state.pipes, write);

    src.emit('data', chunk);

    // if anyone needs a drain, then we have to wait for that.
    if (state.awaitDrain > 0)
      return;
  }

  // if every destination was unpiped, either before entering this
  // function, or in the while loop, then stop flowing.
  //
  // NB: This is a pretty rare edge case.
  if (state.pipesCount === 0) {
    state.flowing = false;

    // if there were data event listeners added, then switch to old mode.
    if (EE.listenerCount(src, 'data') > 0)
      emitDataEvents(src);
    return;
  }

  // at this point, no one needed a drain, so we just ran out of data
  // on the next readable event, start it over again.
  state.ranOut = true;
}

function pipeOnReadable() {
  if (this._readableState.ranOut) {
    this._readableState.ranOut = false;
    flow(this);
  }
}


Readable.prototype.unpipe = function(dest) {
  var state = this._readableState;

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0)
    return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes)
      return this;

    if (!dest)
      dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    this.removeListener('readable', pipeOnReadable);
    state.flowing = false;
    if (dest)
      dest.emit('unpipe', this);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    this.removeListener('readable', pipeOnReadable);
    state.flowing = false;

    for (var i = 0; i < len; i++)
      dests[i].emit('unpipe', this);
    return this;
  }

  // try to find the right one.
  var i = indexOf(state.pipes, dest);
  if (i === -1)
    return this;

  state.pipes.splice(i, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1)
    state.pipes = state.pipes[0];

  dest.emit('unpipe', this);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function(ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  if (ev === 'data' && !this._readableState.flowing)
    emitDataEvents(this);

  if (ev === 'readable' && this.readable) {
    var state = this._readableState;
    if (!state.readableListening) {
      state.readableListening = true;
      state.emittedReadable = false;
      state.needReadable = true;
      if (!state.reading) {
        this.read(0);
      } else if (state.length) {
        emitReadable(this, state);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
  emitDataEvents(this);
  this.read(0);
  this.emit('resume');
};

Readable.prototype.pause = function() {
  emitDataEvents(this, true);
  this.emit('pause');
};

function emitDataEvents(stream, startPaused) {
  var state = stream._readableState;

  if (state.flowing) {
    // https://github.com/isaacs/readable-stream/issues/16
    throw new Error('Cannot switch to old mode now.');
  }

  var paused = startPaused || false;
  var readable = false;

  // convert to an old-style stream.
  stream.readable = true;
  stream.pipe = Stream.prototype.pipe;
  stream.on = stream.addListener = Stream.prototype.on;

  stream.on('readable', function() {
    readable = true;

    var c;
    while (!paused && (null !== (c = stream.read())))
      stream.emit('data', c);

    if (c === null) {
      readable = false;
      stream._readableState.needReadable = true;
    }
  });

  stream.pause = function() {
    paused = true;
    this.emit('pause');
  };

  stream.resume = function() {
    paused = false;
    if (readable)
      process.nextTick(function() {
        stream.emit('readable');
      });
    else
      this.read(0);
    this.emit('resume');
  };

  // now make it start, just in case it hadn't already.
  stream.emit('readable');
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function(stream) {
  var state = this._readableState;
  var paused = false;

  var self = this;
  stream.on('end', function() {
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length)
        self.push(chunk);
    }

    self.push(null);
  });

  stream.on('data', function(chunk) {
    if (state.decoder)
      chunk = state.decoder.write(chunk);

    // don't skip over falsy values in objectMode
    //if (state.objectMode && util.isNullOrUndefined(chunk))
    if (state.objectMode && (chunk === null || chunk === undefined))
      return;
    else if (!state.objectMode && (!chunk || !chunk.length))
      return;

    var ret = self.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (typeof stream[i] === 'function' &&
        typeof this[i] === 'undefined') {
      this[i] = function(method) { return function() {
        return stream[method].apply(stream, arguments);
      }}(i);
    }
  }

  // proxy certain important events.
  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
  forEach(events, function(ev) {
    stream.on(ev, self.emit.bind(self, ev));
  });

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  self._read = function(n) {
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return self;
};



// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
function fromList(n, state) {
  var list = state.buffer;
  var length = state.length;
  var stringMode = !!state.decoder;
  var objectMode = !!state.objectMode;
  var ret;

  // nothing in the list, definitely empty.
  if (list.length === 0)
    return null;

  if (length === 0)
    ret = null;
  else if (objectMode)
    ret = list.shift();
  else if (!n || n >= length) {
    // read it all, truncate the array.
    if (stringMode)
      ret = list.join('');
    else
      ret = Buffer.concat(list, length);
    list.length = 0;
  } else {
    // read just some of it.
    if (n < list[0].length) {
      // just take a part of the first list item.
      // slice is the same for buffers and strings.
      var buf = list[0];
      ret = buf.slice(0, n);
      list[0] = buf.slice(n);
    } else if (n === list[0].length) {
      // first list is a perfect match
      ret = list.shift();
    } else {
      // complex case.
      // we have enough to cover it, but it spans past the first buffer.
      if (stringMode)
        ret = '';
      else
        ret = new Buffer(n);

      var c = 0;
      for (var i = 0, l = list.length; i < l && c < n; i++) {
        var buf = list[0];
        var cpy = Math.min(n - c, buf.length);

        if (stringMode)
          ret += buf.slice(0, cpy);
        else
          buf.copy(ret, c, 0, cpy);

        if (cpy < buf.length)
          list[0] = buf.slice(cpy);
        else
          list.shift();

        c += cpy;
      }
    }
  }

  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0)
    throw new Error('endReadable called on non-empty stream');

  if (!state.endEmitted && state.calledRead) {
    state.ended = true;
    process.nextTick(function() {
      // Check that we didn't get one last unshift.
      if (!state.endEmitted && state.length === 0) {
        state.endEmitted = true;
        stream.readable = false;
        stream.emit('end');
      }
    });
  }
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}

function indexOf (xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}


/***/ }),

/***/ 95780:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.


// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.

module.exports = Transform;

var Duplex = __webpack_require__(533943);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);


function TransformState(options, stream) {
  this.afterTransform = function(er, data) {
    return afterTransform(stream, er, data);
  };

  this.needTransform = false;
  this.transforming = false;
  this.writecb = null;
  this.writechunk = null;
}

function afterTransform(stream, er, data) {
  var ts = stream._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb)
    return stream.emit('error', new Error('no writecb in Transform class'));

  ts.writechunk = null;
  ts.writecb = null;

  if (data !== null && data !== undefined)
    stream.push(data);

  if (cb)
    cb(er);

  var rs = stream._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    stream._read(rs.highWaterMark);
  }
}


function Transform(options) {
  if (!(this instanceof Transform))
    return new Transform(options);

  Duplex.call(this, options);

  var ts = this._transformState = new TransformState(options, this);

  // when the writable side finishes, then flush out anything remaining.
  var stream = this;

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  this.once('finish', function() {
    if ('function' === typeof this._flush)
      this._flush(function(er) {
        done(stream, er);
      });
    else
      done(stream);
  });
}

Transform.prototype.push = function(chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function(chunk, encoding, cb) {
  throw new Error('not implemented');
};

Transform.prototype._write = function(chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform ||
        rs.needReadable ||
        rs.length < rs.highWaterMark)
      this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};


function done(stream, er) {
  if (er)
    return stream.emit('error', er);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  var ws = stream._writableState;
  var rs = stream._readableState;
  var ts = stream._transformState;

  if (ws.length)
    throw new Error('calling transform done when ws.length != 0');

  if (ts.transforming)
    throw new Error('calling transform done when still transforming');

  return stream.push(null);
}


/***/ }),

/***/ 643970:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, cb), and it'll handle all
// the drain event emission and buffering.

module.exports = Writable;

/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Writable.WritableState = WritableState;


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Stream = __webpack_require__(92413);

util.inherits(Writable, Stream);

function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
}

function WritableState(options, stream) {
  options = options || {};

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, becuase any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function(er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.buffer = [];

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;
}

function Writable(options) {
  var Duplex = __webpack_require__(533943);

  // Writable ctor is applied to Duplexes, though they're not
  // instanceof Writable, they're instanceof Readable.
  if (!(this instanceof Writable) && !(this instanceof Duplex))
    return new Writable(options);

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
  this.emit('error', new Error('Cannot pipe. Not readable.'));
};


function writeAfterEnd(stream, state, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  process.nextTick(function() {
    cb(er);
  });
}

// If we get something that is not a buffer, string, null, or undefined,
// and we're not in objectMode, then that's an error.
// Otherwise stream chunks are all considered to be of length=1, and the
// watermarks determine how many objects to keep in the buffer, rather than
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  if (!Buffer.isBuffer(chunk) &&
      'string' !== typeof chunk &&
      chunk !== null &&
      chunk !== undefined &&
      !state.objectMode) {
    var er = new TypeError('Invalid non-string/buffer chunk');
    stream.emit('error', er);
    process.nextTick(function() {
      cb(er);
    });
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function(chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (Buffer.isBuffer(chunk))
    encoding = 'buffer';
  else if (!encoding)
    encoding = state.defaultEncoding;

  if (typeof cb !== 'function')
    cb = function() {};

  if (state.ended)
    writeAfterEnd(this, state, cb);
  else if (validChunk(this, state, chunk, cb))
    ret = writeOrBuffer(this, state, chunk, encoding, cb);

  return ret;
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode &&
      state.decodeStrings !== false &&
      typeof chunk === 'string') {
    chunk = new Buffer(chunk, encoding);
  }
  return chunk;
}

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
  chunk = decodeChunk(state, chunk, encoding);
  if (Buffer.isBuffer(chunk))
    encoding = 'buffer';
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret)
    state.needDrain = true;

  if (state.writing)
    state.buffer.push(new WriteReq(chunk, encoding, cb));
  else
    doWrite(stream, state, len, chunk, encoding, cb);

  return ret;
}

function doWrite(stream, state, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  if (sync)
    process.nextTick(function() {
      cb(er);
    });
  else
    cb(er);

  stream._writableState.errorEmitted = true;
  stream.emit('error', er);
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er)
    onwriteError(stream, state, sync, er, cb);
  else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(stream, state);

    if (!finished && !state.bufferProcessing && state.buffer.length)
      clearBuffer(stream, state);

    if (sync) {
      process.nextTick(function() {
        afterWrite(stream, state, finished, cb);
      });
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished)
    onwriteDrain(stream, state);
  cb();
  if (finished)
    finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}


// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;

  for (var c = 0; c < state.buffer.length; c++) {
    var entry = state.buffer[c];
    var chunk = entry.chunk;
    var encoding = entry.encoding;
    var cb = entry.callback;
    var len = state.objectMode ? 1 : chunk.length;

    doWrite(stream, state, len, chunk, encoding, cb);

    // if we didn't call the onwrite immediately, then
    // it means that we need to wait until it does.
    // also, that means that the chunk and cb are currently
    // being processed, so move the buffer counter past them.
    if (state.writing) {
      c++;
      break;
    }
  }

  state.bufferProcessing = false;
  if (c < state.buffer.length)
    state.buffer = state.buffer.slice(c);
  else
    state.buffer.length = 0;
}

Writable.prototype._write = function(chunk, encoding, cb) {
  cb(new Error('not implemented'));
};

Writable.prototype.end = function(chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (typeof chunk !== 'undefined' && chunk !== null)
    this.write(chunk, encoding);

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished)
    endWritable(this, state, cb);
};


function needFinish(stream, state) {
  return (state.ending &&
          state.length === 0 &&
          !state.finished &&
          !state.writing);
}

function finishMaybe(stream, state) {
  var need = needFinish(stream, state);
  if (need) {
    state.finished = true;
    stream.emit('finish');
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished)
      process.nextTick(cb);
    else
      stream.once('finish', cb);
  }
  state.ended = true;
}


/***/ }),

/***/ 111833:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413); // hack to fix a circular dependency issue when used with browserify
exports = module.exports = __webpack_require__(408226);
exports.Stream = Stream;
exports.Readable = exports;
exports.Writable = __webpack_require__(643970);
exports.Duplex = __webpack_require__(533943);
exports.Transform = __webpack_require__(95780);
exports.PassThrough = __webpack_require__(766469);
if (!process.browser && process.env.READABLE_STREAM === 'disable') {
  module.exports = __webpack_require__(92413);
}


/***/ }),

/***/ 62863:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var Buffer = __webpack_require__(764293).Buffer;

var isBufferEncoding = Buffer.isEncoding
  || function(encoding) {
       switch (encoding && encoding.toLowerCase()) {
         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
         default: return false;
       }
     }


function assertEncoding(encoding) {
  if (encoding && !isBufferEncoding(encoding)) {
    throw new Error('Unknown encoding: ' + encoding);
  }
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters. CESU-8 is handled as part of the UTF-8 encoding.
//
// @TODO Handling all encodings inside a single object makes it very difficult
// to reason about this code, so it should be split up in the future.
// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
// points as used by CESU-8.
var StringDecoder = exports.s = function(encoding) {
  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
  assertEncoding(encoding);
  switch (this.encoding) {
    case 'utf8':
      // CESU-8 represents each of Surrogate Pair by 3-bytes
      this.surrogateSize = 3;
      break;
    case 'ucs2':
    case 'utf16le':
      // UTF-16 represents each of Surrogate Pair by 2-bytes
      this.surrogateSize = 2;
      this.detectIncompleteChar = utf16DetectIncompleteChar;
      break;
    case 'base64':
      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
      this.surrogateSize = 3;
      this.detectIncompleteChar = base64DetectIncompleteChar;
      break;
    default:
      this.write = passThroughWrite;
      return;
  }

  // Enough space to store all bytes of a single character. UTF-8 needs 4
  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
  this.charBuffer = new Buffer(6);
  // Number of bytes received for the current incomplete multi-byte character.
  this.charReceived = 0;
  // Number of bytes expected for the current incomplete multi-byte character.
  this.charLength = 0;
};


// write decodes the given buffer and returns it as JS string that is
// guaranteed to not contain any partial multi-byte characters. Any partial
// character found at the end of the buffer is buffered up, and will be
// returned when calling write again with the remaining bytes.
//
// Note: Converting a Buffer containing an orphan surrogate to a String
// currently works, but converting a String to a Buffer (via `new Buffer`, or
// Buffer#write) will replace incomplete surrogates with the unicode
// replacement character. See https://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
  var charStr = '';
  // if our last write ended with an incomplete multibyte character
  while (this.charLength) {
    // determine how many remaining bytes this buffer has to offer for this char
    var available = (buffer.length >= this.charLength - this.charReceived) ?
        this.charLength - this.charReceived :
        buffer.length;

    // add the new bytes to the char buffer
    buffer.copy(this.charBuffer, this.charReceived, 0, available);
    this.charReceived += available;

    if (this.charReceived < this.charLength) {
      // still not enough chars in this buffer? wait for more ...
      return '';
    }

    // remove bytes belonging to the current character from the buffer
    buffer = buffer.slice(available, buffer.length);

    // get the character that was split
    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);

    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
    var charCode = charStr.charCodeAt(charStr.length - 1);
    if (charCode >= 0xD800 && charCode <= 0xDBFF) {
      this.charLength += this.surrogateSize;
      charStr = '';
      continue;
    }
    this.charReceived = this.charLength = 0;

    // if there are no more bytes in this buffer, just emit our char
    if (buffer.length === 0) {
      return charStr;
    }
    break;
  }

  // determine and set charLength / charReceived
  this.detectIncompleteChar(buffer);

  var end = buffer.length;
  if (this.charLength) {
    // buffer the incomplete character bytes we got
    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
    end -= this.charReceived;
  }

  charStr += buffer.toString(this.encoding, 0, end);

  var end = charStr.length - 1;
  var charCode = charStr.charCodeAt(end);
  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
  if (charCode >= 0xD800 && charCode <= 0xDBFF) {
    var size = this.surrogateSize;
    this.charLength += size;
    this.charReceived += size;
    this.charBuffer.copy(this.charBuffer, size, 0, size);
    buffer.copy(this.charBuffer, 0, 0, size);
    return charStr.substring(0, end);
  }

  // or just emit the charStr
  return charStr;
};

// detectIncompleteChar determines if there is an incomplete UTF-8 character at
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
// that are available for this character.
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
  // determine how many bytes we have to check at the end of this buffer
  var i = (buffer.length >= 3) ? 3 : buffer.length;

  // Figure out if one of the last i bytes of our buffer announces an
  // incomplete char.
  for (; i > 0; i--) {
    var c = buffer[buffer.length - i];

    // See http://en.wikipedia.org/wiki/UTF-8#Description

    // 110XXXXX
    if (i == 1 && c >> 5 == 0x06) {
      this.charLength = 2;
      break;
    }

    // 1110XXXX
    if (i <= 2 && c >> 4 == 0x0E) {
      this.charLength = 3;
      break;
    }

    // 11110XXX
    if (i <= 3 && c >> 3 == 0x1E) {
      this.charLength = 4;
      break;
    }
  }
  this.charReceived = i;
};

StringDecoder.prototype.end = function(buffer) {
  var res = '';
  if (buffer && buffer.length)
    res = this.write(buffer);

  if (this.charReceived) {
    var cr = this.charReceived;
    var buf = this.charBuffer;
    var enc = this.encoding;
    res += buf.slice(0, cr).toString(enc);
  }

  return res;
};

function passThroughWrite(buffer) {
  return buffer.toString(this.encoding);
}

function utf16DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 2;
  this.charLength = this.charReceived ? 2 : 0;
}

function base64DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 3;
  this.charLength = this.charReceived ? 3 : 0;
}


/***/ }),

/***/ 133593:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var util = __webpack_require__(310313)
var WriteError = __webpack_require__(818834).WriteError
var getOptions = util.getOptions
var dispatchError = util.dispatchError

function Batch (levelup, codec) {
  this._levelup = levelup
  this._codec = codec
  this.batch = levelup.db.batch()
  this.ops = []
  this.length = 0
}

Batch.prototype.put = function (key_, value_, options) {
  options = getOptions(options)

  var key = this._codec.encodeKey(key_, options)
  var value = this._codec.encodeValue(value_, options)

  try {
    this.batch.put(key, value)
  } catch (e) {
    throw new WriteError(e)
  }

  this.ops.push({ type: 'put', key: key, value: value })
  this.length++

  return this
}

Batch.prototype.del = function (key_, options) {
  options = getOptions(options)

  var key = this._codec.encodeKey(key_, options)

  try {
    this.batch.del(key)
  } catch (err) {
    throw new WriteError(err)
  }

  this.ops.push({ type: 'del', key: key })
  this.length++

  return this
}

Batch.prototype.clear = function () {
  try {
    this.batch.clear()
  } catch (err) {
    throw new WriteError(err)
  }

  this.ops = []
  this.length = 0

  return this
}

Batch.prototype.write = function (callback) {
  var levelup = this._levelup
  var ops = this.ops

  try {
    this.batch.write(function (err) {
      if (err) { return dispatchError(levelup, new WriteError(err), callback) }
      levelup.emit('batch', ops)
      if (callback) { callback() }
    })
  } catch (err) {
    throw new WriteError(err)
  }
}

module.exports = Batch


/***/ }),

/***/ 307615:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var LevelUPError = __webpack_require__(818834).LevelUPError
var format = __webpack_require__(431669).format
var leveldown

function getLevelDOWN () {
  if (leveldown) { return leveldown }

  var requiredVersion = __webpack_require__(669187)/* .devDependencies.leveldown */ .v6.ct
  var leveldownVersion

  try {
    leveldownVersion = __webpack_require__(867766)/* .version */ .i8
  } catch (e) {
    throw requireError(e)
  }

  if (!__webpack_require__(2728).satisfies(leveldownVersion, requiredVersion)) {
    throw new LevelUPError(
        'Installed version of LevelDOWN (' +
      leveldownVersion +
      ') does not match required version (' +
      requiredVersion +
      ')'
    )
  }

  try {
    leveldown = __webpack_require__(190717)
    return leveldown
  } catch (e) {
    throw requireError(e)
  }
}

function requireError (e) {
  var template = 'Failed to require LevelDOWN (%s). Try `npm install leveldown` if it\'s missing'
  return new LevelUPError(format(template, e.message))
}

module.exports = getLevelDOWN


/***/ }),

/***/ 689133:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var EventEmitter = __webpack_require__(128614).EventEmitter
var inherits = __webpack_require__(431669).inherits
var deprecate = __webpack_require__(431669).deprecate
var extend = __webpack_require__(838514)
var prr = __webpack_require__(590233)
var DeferredLevelDOWN = __webpack_require__(735797)
var IteratorStream = __webpack_require__(640915)
var Batch = __webpack_require__(133593)
var Codec = __webpack_require__(133132)
var getLevelDOWN = __webpack_require__(307615)
var errors = __webpack_require__(818834)
var util = __webpack_require__(310313)

var WriteError = errors.WriteError
var ReadError = errors.ReadError
var NotFoundError = errors.NotFoundError
var OpenError = errors.OpenError
var EncodingError = errors.EncodingError
var InitializationError = errors.InitializationError
var LevelUPError = errors.LevelUPError

var getOptions = util.getOptions
var defaultOptions = util.defaultOptions
var dispatchError = util.dispatchError

function getCallback (options, callback) {
  return typeof options === 'function' ? options : callback
}

// Possible LevelUP#_status values:
//  - 'new'     - newly created, not opened or closed
//  - 'opening' - waiting for the database to be opened, post open()
//  - 'open'    - successfully opened the database, available for use
//  - 'closing' - waiting for the database to be closed, post close()
//  - 'closed'  - database has been successfully closed, should not be
//                 used except for another open() operation

function LevelUP (location, options, callback) {
  if (!(this instanceof LevelUP)) { return new LevelUP(location, options, callback) }

  var error

  EventEmitter.call(this)
  this.setMaxListeners(Infinity)

  if (typeof location === 'function') {
    options = typeof options === 'object' ? options : {}
    options.db = location
    location = null
  } else if (typeof location === 'object' && typeof location.db === 'function') {
    options = location
    location = null
  }

  if (typeof options === 'function') {
    callback = options
    options = {}
  }

  if ((!options || typeof options.db !== 'function') && typeof location !== 'string') {
    error = new InitializationError(
        'Must provide a location for the database')
    if (callback) {
      return process.nextTick(function () {
        callback(error)
      })
    }
    throw error
  }

  options = getOptions(options)
  this.options = extend(defaultOptions, options)
  this._codec = new Codec(this.options)
  this._status = 'new'
  // set this.location as enumerable but not configurable or writable
  prr(this, 'location', location, 'e')

  this.open(callback)
}

inherits(LevelUP, EventEmitter)

LevelUP.prototype.open = function (callback) {
  var self = this
  var dbFactory
  var db

  if (this.isOpen()) {
    if (callback) { process.nextTick(function () { callback(null, self) }) }
    return this
  }

  if (this._isOpening()) {
    return callback && this.once('open', function () { callback(null, self) })
  }

  this.emit('opening')
  this._status = 'opening'
  this.db = new DeferredLevelDOWN(this.location)

  if (typeof this.options.db !== 'function' &&
      typeof getLevelDOWN !== 'function') {
    throw new LevelUPError('missing db factory, you need to set options.db')
  }

  dbFactory = this.options.db || getLevelDOWN()
  db = dbFactory(this.location)

  db.open(this.options, function (err) {
    if (err) {
      return dispatchError(self, new OpenError(err), callback)
    }
    self.db.setDb(db)
    self.db = db
    self._status = 'open'
    if (callback) { callback(null, self) }
    self.emit('open')
    self.emit('ready')
  })
}

LevelUP.prototype.close = function (callback) {
  var self = this

  if (this.isOpen()) {
    this._status = 'closing'
    this.db.close(function () {
      self._status = 'closed'
      self.emit('closed')
      if (callback) { callback.apply(null, arguments) }
    })
    this.emit('closing')
    this.db = new DeferredLevelDOWN(this.location)
  } else if (this._status === 'closed' && callback) {
    return process.nextTick(callback)
  } else if (this._status === 'closing' && callback) {
    this.once('closed', callback)
  } else if (this._isOpening()) {
    this.once('open', function () {
      self.close(callback)
    })
  }
}

LevelUP.prototype.isOpen = function () {
  return this._status === 'open'
}

LevelUP.prototype._isOpening = function () {
  return this._status === 'opening'
}

LevelUP.prototype.isClosed = function () {
  return (/^clos/).test(this._status)
}

function maybeError (db, options, callback) {
  if (!db._isOpening() && !db.isOpen()) {
    dispatchError(db, new ReadError('Database is not open'), callback)
    return true
  }
}

function writeError (db, message, callback) {
  dispatchError(db, new WriteError(message), callback)
}

function readError (db, message, callback) {
  dispatchError(db, new ReadError(message), callback)
}

LevelUP.prototype.get = function (key_, options, callback) {
  var self = this
  var key

  callback = getCallback(options, callback)

  if (maybeError(this, options, callback)) { return }

  if (key_ === null || key_ === undefined || typeof callback !== 'function') {
    return readError(this, 'get() requires key and callback arguments', callback)
  }

  options = util.getOptions(options)
  key = this._codec.encodeKey(key_, options)

  options.asBuffer = this._codec.valueAsBuffer(options)

  this.db.get(key, options, function (err, value) {
    if (err) {
      if ((/notfound/i).test(err) || err.notFound) {
        err = new NotFoundError(
            'Key not found in database [' + key_ + ']', err)
      } else {
        err = new ReadError(err)
      }
      return dispatchError(self, err, callback)
    }
    if (callback) {
      try {
        value = self._codec.decodeValue(value, options)
      } catch (e) {
        return callback(new EncodingError(e))
      }
      callback(null, value)
    }
  })
}

LevelUP.prototype.put = function (key_, value_, options, callback) {
  var self = this
  var key
  var value

  callback = getCallback(options, callback)

  if (key_ === null || key_ === undefined) { return writeError(this, 'put() requires a key argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  key = this._codec.encodeKey(key_, options)
  value = this._codec.encodeValue(value_, options)

  this.db.put(key, value, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('put', key_, value_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.del = function (key_, options, callback) {
  var self = this
  var key

  callback = getCallback(options, callback)

  if (key_ === null || key_ === undefined) { return writeError(this, 'del() requires a key argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  key = this._codec.encodeKey(key_, options)

  this.db.del(key, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('del', key_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.batch = function (arr_, options, callback) {
  var self = this
  var arr

  if (!arguments.length) { return new Batch(this, this._codec) }

  callback = getCallback(options, callback)

  if (!Array.isArray(arr_)) { return writeError(this, 'batch() requires an array argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  arr = self._codec.encodeBatch(arr_, options)
  arr = arr.map(function (op) {
    if (!op.type && op.key !== undefined && op.value !== undefined) { op.type = 'put' }
    return op
  })

  this.db.batch(arr, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('batch', arr_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.approximateSize = deprecate(function (start_, end_, options, callback) {
  var self = this
  var start
  var end

  callback = getCallback(options, callback)

  options = getOptions(options)

  if (start_ === null || start_ === undefined || end_ === null ||
      end_ === undefined || typeof callback !== 'function') {
    return readError(this, 'approximateSize() requires start, end and callback arguments', callback)
  }

  start = this._codec.encodeKey(start_, options)
  end = this._codec.encodeKey(end_, options)

  this.db.approximateSize(start, end, function (err, size) {
    if (err) {
      return dispatchError(self, new OpenError(err), callback)
    } else if (callback) {
      callback(null, size)
    }
  })
}, 'db.approximateSize() is deprecated. Use db.db.approximateSize() instead')

LevelUP.prototype.readStream =
LevelUP.prototype.createReadStream = function (options) {
  options = extend({keys: true, values: true}, this.options, options)

  options.keyEncoding = options.keyEncoding
  options.valueEncoding = options.valueEncoding

  options = this._codec.encodeLtgt(options)
  options.keyAsBuffer = this._codec.keyAsBuffer(options)
  options.valueAsBuffer = this._codec.valueAsBuffer(options)

  if (typeof options.limit !== 'number') { options.limit = -1 }

  return new IteratorStream(this.db.iterator(options), extend(options, {
    decoder: this._codec.createStreamDecoder(options)
  }))
}

LevelUP.prototype.keyStream =
LevelUP.prototype.createKeyStream = function (options) {
  return this.createReadStream(extend(options, { keys: true, values: false }))
}

LevelUP.prototype.valueStream =
LevelUP.prototype.createValueStream = function (options) {
  return this.createReadStream(extend(options, { keys: false, values: true }))
}

LevelUP.prototype.toString = function () {
  return 'LevelUP'
}

function utilStatic (name) {
  return function (location, callback) {
    getLevelDOWN()[name](location, callback || function () {})
  }
}

module.exports = LevelUP
module.exports.errors = __webpack_require__(818834)
module.exports.destroy = deprecate(
  utilStatic('destroy'),
  'levelup.destroy() is deprecated. Use leveldown.destroy() instead'
)
module.exports.repair = deprecate(
  utilStatic('repair'),
  'levelup.repair() is deprecated. Use leveldown.repair() instead'
)


/***/ }),

/***/ 310313:
/***/ ((module) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var defaultOptions = {
  createIfMissing: true,
  errorIfExists: false,
  keyEncoding: 'utf8',
  valueEncoding: 'utf8',
  compression: true
}

function getOptions (options) {
  if (typeof options === 'string') { options = { valueEncoding: options } }
  if (typeof options !== 'object') { options = {} }
  return options
}

function dispatchError (db, error, callback) {
  typeof callback === 'function' ? callback(error) : db.emit('error', error)
}

function isDefined (v) {
  return typeof v !== 'undefined'
}

module.exports = {
  defaultOptions: defaultOptions,
  getOptions: getOptions,
  dispatchError: dispatchError,
  isDefined: isDefined
}


/***/ }),

/***/ 838514:
/***/ ((module) => {

module.exports = extend

var hasOwnProperty = Object.prototype.hasOwnProperty;

function extend() {
    var target = {}

    for (var i = 0; i < arguments.length; i++) {
        var source = arguments[i]

        for (var key in source) {
            if (hasOwnProperty.call(source, key)) {
                target[key] = source[key]
            }
        }
    }

    return target
}


/***/ }),

/***/ 669187:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"v6\":{\"ct\":\"^1.1.0\"}}");

/***/ }),

/***/ 70843:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const assert = __webpack_require__(742357)
const levelup = __webpack_require__(689133)
const memdown = __webpack_require__(87449)
const async = __webpack_require__(85548)
const rlp = __webpack_require__(6636)
const ethUtil = __webpack_require__(334366)
const semaphore = __webpack_require__(80045)
const TrieNode = __webpack_require__(838316)
const ReadStream = __webpack_require__(717397)
const PrioritizedTaskExecutor = __webpack_require__(453139)
const matchingNibbleLength = __webpack_require__(951731).matchingNibbleLength
const doKeysMatch = __webpack_require__(951731).doKeysMatch
const callTogether = __webpack_require__(951731).callTogether
const asyncFirstSeries = __webpack_require__(951731).asyncFirstSeries

module.exports = Trie

/**
 * Use `require('merkel-patricia-tree')` for the base interface. In Ethereum applications stick with the Secure Trie Overlay `require('merkel-patricia-tree/secure')`. The API for the raw and the secure interface are about the same
 * @class Trie
 * @param {Object} [db] An instance of [levelup](https://github.com/rvagg/node-levelup/) or a compatible API. If the db is `null` or left undefined, then the trie will be stored in memory via [memdown](https://github.com/rvagg/memdown)
 * @param {Buffer|String} [root]` A hex `String` or `Buffer` for the root of a previously stored trie
 * @prop {Buffer} root The current root of the `trie`
 * @prop {Boolean} isCheckpoint  determines if you are saving to a checkpoint or directly to the db
 * @prop {Buffer} EMPTY_TRIE_ROOT the Root for an empty trie
 */
function Trie (db, root) {
  var self = this
  this.EMPTY_TRIE_ROOT = ethUtil.SHA3_RLP
  this.sem = semaphore(1)

  // setup dbs
  this.db = db ||
    levelup('', {
      db: memdown
    })

  this._getDBs = [this.db]
  this._putDBs = [this.db]

  Object.defineProperty(this, 'root', {
    set: function (value) {
      if (value) {
        value = ethUtil.toBuffer(value)
        assert(value.length === 32, 'Invalid root length. Roots are 32 bytes')
      } else {
        value = self.EMPTY_TRIE_ROOT
      }

      this._root = value
    },
    get: function () {
      return this._root
    }
  })

  this.root = root
}

/**
 * Gets a value given a `key`
 * @method get
 * @param {Buffer|String} key - the key to search for
 * @param {Function} cb A callback `Function` which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`
 */
Trie.prototype.get = function (key, cb) {
  var self = this

  key = ethUtil.toBuffer(key)

  self.findPath(key, function (err, node, remainder, stack) {
    var value = null
    if (node && remainder.length === 0) {
      value = node.value
    }

    cb(err, value)
  })
}

/**
 * Stores a given `value` at the given `key`
 * @method put
 * @param {Buffer|String} key
 * @param {Buffer|String} Value
 * @param {Function} cb A callback `Function` which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.put = function (key, value, cb) {
  var self = this

  key = ethUtil.toBuffer(key)
  value = ethUtil.toBuffer(value)

  if (!value || value.toString() === '') {
    self.del(key, cb)
  } else {
    cb = callTogether(cb, self.sem.leave)

    self.sem.take(function () {
      if (self.root.toString('hex') !== ethUtil.SHA3_RLP.toString('hex')) {
        // first try to find the give key or its nearst node
        self.findPath(key, function (err, foundValue, keyRemainder, stack) {
          if (err) {
            return cb(err)
          }
          // then update
          self._updateNode(key, value, keyRemainder, stack, cb)
        })
      } else {
        self._createInitialNode(key, value, cb) // if no root initialize this trie
      }
    })
  }
}

/**
 * deletes a value given a `key`
 * @method del
 * @param {Buffer|String} key
 * @param {Function} callback the callback `Function`
 */
Trie.prototype.del = function (key, cb) {
  var self = this

  key = ethUtil.toBuffer(key)
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    self.findPath(key, function (err, foundValue, keyRemainder, stack) {
      if (err) {
        return cb(err)
      }
      if (foundValue) {
        self._deleteNode(key, stack, cb)
      } else {
        cb()
      }
    })
  })
}

/**
 * Retrieves a raw value in the underlying db
 * @method getRaw
 * @param {Buffer} key
 * @param {Function} callback A callback `Function`, which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`.
 */
Trie.prototype.getRaw = function (key, cb) {
  key = ethUtil.toBuffer(key)

  function dbGet (db, cb2) {
    db.get(key, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, function (err, foundNode) {
      if (err || !foundNode) {
        cb2(null, null)
      } else {
        cb2(null, foundNode)
      }
    })
  }
  asyncFirstSeries(this._getDBs, dbGet, cb)
}

// retrieves a node from dbs by hash
Trie.prototype._lookupNode = function (node, cb) {
  if (TrieNode.isRawNode(node)) {
    cb(new TrieNode(node))
  } else {
    this.getRaw(node, function (err, value) {
      if (err) {
        throw err
      }

      if (value) {
        value = new TrieNode(rlp.decode(value))
      }

      cb(value)
    })
  }
}

// TODO: remove the proxy method when changing the caching
Trie.prototype._putRaw = function (key, val, cb) {
  function dbPut (db, cb2) {
    db.put(key, val, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb2)
  }
  async.each(this._putDBs, dbPut, cb)
}

/**
 * Writes a value directly to the underlining db
 * @method putRaw
 * @param {Buffer|String} key The key as a `Buffer` or `String`
 * @param {Buffer} value The value to be stored
 * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.putRaw = Trie.prototype._putRaw

/**
 * Removes a raw value in the underlying db
 * @method delRaw
 * @param {Buffer|String} key
 * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.delRaw = function (key, cb) {
  function del (db, cb2) {
    db.del(key, {
      keyEncoding: 'binary'
    }, cb2)
  }
  async.each(this._putDBs, del, cb)
}

// writes a single node to dbs
Trie.prototype._putNode = function (node, cb) {
  var hash = node.hash()
  var serialized = node.serialize()
  this._putRaw(hash, serialized, cb)
}

// writes many nodes to db
Trie.prototype._batchNodes = function (opStack, cb) {
  function dbBatch (db, cb) {
    db.batch(opStack, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb)
  }

  async.each(this._putDBs, dbBatch, cb)
}

/**
 * Trys to find a path to the node for the given key
 * It returns a `stack` of nodes to the closet node
 * @method findPath
 * @param {String|Buffer} - key - the search key
 * @param {Function} - cb - the callback function. Its is given the following
 * arguments
 *  - err - any errors encontered
 *  - node - the last node found
 *  - keyRemainder - the remaining key nibbles not accounted for
 *  - stack - an array of nodes that forms the path to node we are searching for
 */

Trie.prototype.findPath = function (targetKey, cb) {
  var self = this
  var root = self.root
  var stack = []
  targetKey = TrieNode.stringToNibbles(targetKey)

  this._walkTrie(root, processNode, cb)

  function processNode (nodeRef, node, keyProgress, walkController) {
    var nodeKey = node.key || []
    var keyRemainder = targetKey.slice(matchingNibbleLength(keyProgress, targetKey))
    var matchingLen = matchingNibbleLength(keyRemainder, nodeKey)

    stack.push(node)

    if (node.type === 'branch') {
      if (keyRemainder.length === 0) {
        walkController.return(null, node, [], stack)
      // we exhausted the key without finding a node
      } else {
        var branchIndex = keyRemainder[0]
        var branchNode = node.getValue(branchIndex)
        if (!branchNode) {
          // there are no more nodes to find and we didn't find the key
          walkController.return(null, null, keyRemainder, stack)
        } else {
          // node found, continuing search
          walkController.only(branchIndex)
        }
      }
    } else if (node.type === 'leaf') {
      if (doKeysMatch(keyRemainder, nodeKey)) {
        // keys match, return node with empty key
        walkController.return(null, node, [], stack)
      } else {
        // reached leaf but keys dont match
        walkController.return(null, null, keyRemainder, stack)
      }
    } else if (node.type === 'extention') {
      if (matchingLen !== nodeKey.length) {
        // keys dont match, fail
        walkController.return(null, null, keyRemainder, stack)
      } else {
        // keys match, continue search
        walkController.next()
      }
    }
  }
}

/*
 * Finds all nodes that store k,v values
 */
Trie.prototype._findNode = function (key, root, stack, cb) {
  this.findPath(key, function () {
    cb.apply(null, arguments)
  })
}

/*
 * Finds all nodes that store k,v values
 */
Trie.prototype._findValueNodes = function (onFound, cb) {
  this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
    var fullKey = key

    if (node.key) {
      fullKey = key.concat(node.key)
    }

    if (node.type === 'leaf') {
      // found leaf node!
      onFound(nodeRef, node, fullKey, walkController.next)
    } else if (node.type === 'branch' && node.value) {
      // found branch with value
      onFound(nodeRef, node, fullKey, walkController.next)
    } else {
      // keep looking for value nodes
      walkController.next()
    }
  }, cb)
}

/*
 * Finds all nodes that are stored directly in the db
 * (some nodes are stored raw inside other nodes)
 */
Trie.prototype._findDbNodes = function (onFound, cb) {
  this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
    if (TrieNode.isRawNode(nodeRef)) {
      walkController.next()
    } else {
      onFound(nodeRef, node, key, walkController.next)
    }
  }, cb)
}

/**
 * Updates a node
 * @method _updateNode
 * @param {Buffer} key
 * @param {Buffer| String} value
 * @param {Array} keyRemainder
 * @param {Array} stack -
 * @param {Function} cb - the callback
 */
Trie.prototype._updateNode = function (key, value, keyRemainder, stack, cb) {
  var toSave = []
  var lastNode = stack.pop()

  // add the new nodes
  key = TrieNode.stringToNibbles(key)

  // Check if the last node is a leaf and the key matches to this
  var matchLeaf = false
  if (lastNode.type === 'leaf') {
    var l = 0
    for (var i = 0; i < stack.length; i++) {
      var n = stack[i]
      if (n.type === 'branch') {
        l++
      } else {
        l += n.key.length
      }
    }
    if ((matchingNibbleLength(lastNode.key, key.slice(l)) === lastNode.key.length) && (keyRemainder.length === 0)) {
      matchLeaf = true
    }
  }

  if (matchLeaf) {
    // just updating a found value
    lastNode.value = value
    stack.push(lastNode)
  } else if (lastNode.type === 'branch') {
    stack.push(lastNode)
    if (keyRemainder !== 0) {
      // add an extention to a branch node
      keyRemainder.shift()
      // create a new leaf
      var newLeaf = new TrieNode('leaf', keyRemainder, value)
      stack.push(newLeaf)
    } else {
      lastNode.value = value
    }
  } else {
    // create a branch node
    var lastKey = lastNode.key
    var matchingLength = matchingNibbleLength(lastKey, keyRemainder)
    var newBranchNode = new TrieNode('branch')

    // create a new extention node
    if (matchingLength !== 0) {
      var newKey = lastNode.key.slice(0, matchingLength)
      var newExtNode = new TrieNode('extention', newKey, value)
      stack.push(newExtNode)
      lastKey.splice(0, matchingLength)
      keyRemainder.splice(0, matchingLength)
    }

    stack.push(newBranchNode)

    if (lastKey.length !== 0) {
      var branchKey = lastKey.shift()
      if (lastKey.length !== 0 || lastNode.type === 'leaf') {
        // shriking extention or leaf
        lastNode.key = lastKey
        var formatedNode = this._formatNode(lastNode, false, toSave)
        newBranchNode.setValue(branchKey, formatedNode)
      } else {
        // remove extention or attaching
        this._formatNode(lastNode, false, true, toSave)
        newBranchNode.setValue(branchKey, lastNode.value)
      }
    } else {
      newBranchNode.value = lastNode.value
    }

    if (keyRemainder.length !== 0) {
      keyRemainder.shift()
      // add a leaf node to the new branch node
      var newLeafNode = new TrieNode('leaf', keyRemainder, value)
      stack.push(newLeafNode)
    } else {
      newBranchNode.value = value
    }
  }

  this._saveStack(key, stack, toSave, cb)
}

// walk tree

Trie.prototype._walkTrie = function (root, onNode, onDone) {
  var self = this
  root = root || self.root
  onDone = onDone || function () {}
  var aborted = false
  var returnValues = []

  if (root.toString('hex') === ethUtil.SHA3_RLP.toString('hex')) {
    return onDone()
  }

  self._lookupNode(root, function (node) {
    processNode(root, node, null, function (err) {
      if (err) {
        return onDone(err)
      }
      onDone.apply(null, returnValues)
    })
  })

  // the maximum pool size should be high enough to utilise the parallelizability of reading nodes from disk and
  // low enough to utilize the prioritisation of node lookup.
  var maxPoolSize = 500
  var taskExecutor = new PrioritizedTaskExecutor(maxPoolSize)

  function processNode (nodeRef, node, key, cb) {
    if (!node) return cb()
    if (aborted) return cb()
    var stopped = false
    key = key || []

    var walkController = {
      stop: function () {
        stopped = true
        cb()
      },
      // end all traversal and return values to the onDone cb
      return: function () {
        aborted = true
        returnValues = arguments
        cb()
      },
      next: function () {
        if (aborted) {
          return cb()
        }
        if (stopped) {
          return cb()
        }
        var children = node.getChildren()
        async.forEachOf(children, function (childData, index, cb) {
          var keyExtension = childData[0]
          var childRef = childData[1]
          var childKey = key.concat(keyExtension)
          var priority = childKey.length
          taskExecutor.execute(priority, function (taskCallback) {
            self._lookupNode(childRef, function (childNode) {
              taskCallback()
              processNode(childRef, childNode, childKey, cb)
            })
          })
        }, cb)
      },
      only: function (childIndex) {
        var childRef = node.getValue(childIndex)
        var childKey = key.slice()
        childKey.push(childIndex)
        var priority = childKey.length
        taskExecutor.execute(priority, function (taskCallback) {
          self._lookupNode(childRef, function (childNode) {
            taskCallback()
            processNode(childRef, childNode, childKey, cb)
          })
        })
      }
    }
    onNode(nodeRef, node, key, walkController)
  }
}

/**
 * saves a stack
 * @method _saveStack
 * @param {Array} key - the key. Should follow the stack
 * @param {Array} stack - a stack of nodes to the value given by the key
 * @param {Array} opStack - a stack of levelup operations to commit at the end of this funciton
 * @param {Function} cb
 */
Trie.prototype._saveStack = function (key, stack, opStack, cb) {
  var lastRoot

  // update nodes
  while (stack.length) {
    var node = stack.pop()
    if (node.type === 'leaf') {
      key.splice(key.length - node.key.length)
    } else if (node.type === 'extention') {
      key.splice(key.length - node.key.length)
      if (lastRoot) {
        node.value = lastRoot
      }
    } else if (node.type === 'branch') {
      if (lastRoot) {
        var branchKey = key.pop()
        node.setValue(branchKey, lastRoot)
      }
    }
    lastRoot = this._formatNode(node, stack.length === 0, opStack)
  }

  if (lastRoot) {
    this.root = lastRoot
  }

  this._batchNodes(opStack, cb)
}

Trie.prototype._deleteNode = function (key, stack, cb) {
  function processBranchNode (key, branchKey, branchNode, parentNode, stack) {
    // branchNode is the node ON the branch node not THE branch node
    var branchNodeKey = branchNode.key
    if (!parentNode || parentNode.type === 'branch') {
      // branch->?
      if (parentNode) {
        stack.push(parentNode)
      }

      if (branchNode.type === 'branch') {
        // create an extention node
        // branch->extention->branch
        var extentionNode = new TrieNode('extention', [branchKey], null)
        stack.push(extentionNode)
        key.push(branchKey)
      } else {
        // branch key is an extention or a leaf
        // branch->(leaf or extention)
        branchNodeKey.unshift(branchKey)
        branchNode.key = branchNodeKey

        // hackery. This is equvilant to array.concat except we need keep the
        // rerfance to the `key` that was passed in.
        branchNodeKey.unshift(0)
        branchNodeKey.unshift(key.length)
        key.splice.apply(key, branchNodeKey)
      }
      stack.push(branchNode)
    } else {
      // parent is a extention
      var parentKey = parentNode.key
      if (branchNode.type === 'branch') {
        // ext->branch
        parentKey.push(branchKey)
        key.push(branchKey)
        parentNode.key = parentKey
        stack.push(parentNode)
      } else {
        // branch node is an leaf or extention and parent node is an exstention
        // add two keys together
        // dont push the parent node
        branchNodeKey.unshift(branchKey)
        key = key.concat(branchNodeKey)
        parentKey = parentKey.concat(branchNodeKey)
        branchNode.key = parentKey
      }
      stack.push(branchNode)
    }

    return key
  }

  var lastNode = stack.pop()
  var parentNode = stack.pop()
  var opStack = []
  var self = this

  if (!Array.isArray(key)) {
    // convert key to nibbles
    key = TrieNode.stringToNibbles(key)
  }

  if (!parentNode) {
    // the root here has to be a leaf.
    this.root = this.EMPTY_TRIE_ROOT
    cb()
  } else {
    if (lastNode.type === 'branch') {
      lastNode.value = null
    } else {
      // the lastNode has to be a leaf if its not a branch. And a leaf's parent
      // if it has one must be a branch.
      var lastNodeKey = lastNode.key
      key.splice(key.length - lastNodeKey.length)
      // delete the value
      this._formatNode(lastNode, false, true, opStack)
      parentNode.setValue(key.pop(), null)
      lastNode = parentNode
      parentNode = stack.pop()
    }

    // nodes on the branch
    var branchNodes = []
    // count the number of nodes on the branch
    lastNode.raw.forEach(function (node, i) {
      var val = lastNode.getValue(i)
      if (val) branchNodes.push([i, val])
    })

    // if there is only one branch node left, collapse the branch node
    if (branchNodes.length === 1) {
      // add the one remaing branch node to node above it
      var branchNode = branchNodes[0][1]
      var branchNodeKey = branchNodes[0][0]

      // look up node
      this._lookupNode(branchNode, function (foundNode) {
        key = processBranchNode(key, branchNodeKey, foundNode, parentNode, stack, opStack)
        self._saveStack(key, stack, opStack, cb)
      })
    } else {
      // simple removing a leaf and recaluclation the stack
      if (parentNode) {
        stack.push(parentNode)
      }

      stack.push(lastNode)
      self._saveStack(key, stack, opStack, cb)
    }
  }
}

// Creates the initial node from an empty tree
Trie.prototype._createInitialNode = function (key, value, cb) {
  var newNode = new TrieNode('leaf', key, value)
  this.root = newNode.hash()
  this._putNode(newNode, cb)
}

// formats node to be saved by levelup.batch.
// returns either the hash that will be used key or the rawNode
Trie.prototype._formatNode = function (node, topLevel, remove, opStack) {
  if (arguments.length === 3) {
    opStack = remove
    remove = false
  }

  var rlpNode = node.serialize()
  if (rlpNode.length >= 32 || topLevel) {
    var hashRoot = node.hash()

    if (remove && this.isCheckpoint) {
      opStack.push({
        type: 'del',
        key: hashRoot
      })
    } else {
      opStack.push({
        type: 'put',
        key: hashRoot,
        value: rlpNode
      })
    }
    return hashRoot
  }
  return node.raw
}

/**
 * The `data` event is given an `Object` hat has two properties; the `key` and the `value`. Both should be Buffers.
 * @method createReadStream
 * @return {stream.Readable} Returns a [stream](https://nodejs.org/dist/latest-v5.x/docs/api/stream.html#stream_class_stream_readable) of the contents of the `trie`
 */
Trie.prototype.createReadStream = function () {
  return new ReadStream(this)
}

// creates a new trie backed by the same db
// and starting at the same root
Trie.prototype.copy = function () {
  return new Trie(this.db, this.root)
}

/**
 * The given hash of operations (key additions or deletions) are executed on the DB
 * @method batch
 * @example
 * var ops = [
 *    { type: 'del', key: 'father' }
 *  , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' }
 *  , { type: 'put', key: 'dob', value: '16 February 1941' }
 *  , { type: 'put', key: 'spouse', value: 'Kim Young-sook' }
 *  , { type: 'put', key: 'occupation', value: 'Clown' }
 * ]
 * trie.batch(ops)
 * @param {Array} ops
 * @param {Function} cb
 */
Trie.prototype.batch = function (ops, cb) {
  var self = this

  async.eachSeries(ops, function (op, cb2) {
    if (op.type === 'put') {
      self.put(op.key, op.value, cb2)
    } else if (op.type === 'del') {
      self.del(op.key, cb2)
    } else {
      cb2()
    }
  }, cb)
}

/**
 * Checks if a given root exists
 * @method checkRoot
 * @param {Buffer} root
 * @param {Function} cb
 */
Trie.prototype.checkRoot = function (root, cb) {
  root = ethUtil.toBuffer(root)
  this._lookupNode(root, function (value) {
    cb(null, !!value)
  })
}


/***/ }),

/***/ 593388:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const levelup = __webpack_require__(689133)
const memdown = __webpack_require__(87449)
const async = __webpack_require__(85548)
const inherits = __webpack_require__(431669).inherits
const Readable = __webpack_require__(982535).Readable
const levelws = __webpack_require__(826026)
const callTogether = __webpack_require__(951731).callTogether

module.exports = checkpointInterface

function checkpointInterface (trie) {
  this._scratch = null
  trie._checkpoints = []

  Object.defineProperty(trie, 'isCheckpoint', {
    get: function () {
      return !!trie._checkpoints.length
    }
  })

  // new methods
  trie.checkpoint = checkpoint
  trie.commit = commit
  trie.revert = revert
  trie._enterCpMode = _enterCpMode
  trie._exitCpMode = _exitCpMode
  trie.createScratchReadStream = createScratchReadStream

  // overwrites
  trie.copy = copy.bind(trie, trie.copy.bind(trie))
}

/**
 * Creates a checkpoint that can later be reverted to or committed. After this is called, no changes to the trie will be permanently saved until `commit` is called
 * @method checkpoint
 */
function checkpoint () {
  var self = this
  var wasCheckpoint = self.isCheckpoint
  self._checkpoints.push(self.root)
  if (!wasCheckpoint && self.isCheckpoint) {
    self._enterCpMode()
  }
}

/**
 * commits a checkpoint to disk
 * @method commit
 * @param {Function} cb the callback
 */
function commit (cb) {
  var self = this
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    if (self.isCheckpoint) {
      self._checkpoints.pop()
      if (!self.isCheckpoint) {
        self._exitCpMode(true, cb)
      } else {
        cb()
      }
    } else {
      throw new Error('trying to commit when not checkpointed')
    }
  })
}

/**
 * Reverts the trie to the state it was at when `checkpoint` was first called.
 * @method revert
 * @param {Function} cb the callback
 */
function revert (cb) {
  var self = this
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    if (self.isCheckpoint) {
      self.root = self._checkpoints.pop()
      if (!self.isCheckpoint) {
        self._exitCpMode(false, cb)
        return
      }
    }

    cb()
  })
}

// enter into checkpoint mode
function _enterCpMode () {
  this._scratch = levelup('', {
    db: memdown
  })
  this._getDBs = [this._scratch].concat(this._getDBs)
  this.__putDBs = this._putDBs
  this._putDBs = [this._scratch]
  this._putRaw = this.putRaw
  this.putRaw = putRaw
}

// exit from checkpoint mode
function _exitCpMode (commitState, cb) {
  var self = this
  var scratch = this._scratch
  this._scratch = null
  this._getDBs = this._getDBs.slice(1)
  this._putDBs = this.__putDBs
  this.putRaw = this._putRaw

  function flushScratch (db, cb) {
    if (!db.createWriteStream) {
      db = levelws(db)
    }

    self.createScratchReadStream(scratch)
      .pipe(db.createWriteStream())
      .on('close', cb)
  }

  if (commitState) {
    async.map(this._putDBs, flushScratch, cb)
  } else {
    cb()
  }
}

// adds the interface when copying the trie
function copy (_super) {
  var trie = _super()
  checkpointInterface.call(trie, trie)
  trie._scratch = this._scratch
  // trie._checkpoints = this._checkpoints.slice()
  return trie
}

function putRaw (key, val, cb) {
  function dbPut (db, cb2) {
    db.put(key, val, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb2)
  }
  async.each(this.__putDBs, dbPut, cb)
}

function createScratchReadStream (scratch) {
  var trie = this.copy()
  scratch = scratch || this._scratch
  // only read from the scratch
  trie._getDBs = [scratch]
  trie._scratch = scratch
  return new ScratchReadStream(trie)
}

// ScratchReadStream
// this is used to minimally dump the scratch into the db

inherits(ScratchReadStream, Readable)

function ScratchReadStream (trie) {
  this.trie = trie
  this.next = null
  Readable.call(this, {
    objectMode: true
  })
}

ScratchReadStream.prototype._read = function () {
  var self = this
  if (!self._started) {
    self._started = true
    self.trie._findDbNodes(function (nodeRef, node, key, next) {
      self.push({
        key: nodeRef,
        value: node.serialize()
      })
      next()
    }, function () {
      // close stream
      self.push(null)
    })
  }
}


/***/ }),

/***/ 322970:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const BaseTrie = __webpack_require__(70843)
const checkpointInterface = __webpack_require__(593388)
const inherits = __webpack_require__(431669).inherits
const proof = __webpack_require__(330219)

module.exports = CheckpointTrie

inherits(CheckpointTrie, BaseTrie)

function CheckpointTrie () {
  BaseTrie.apply(this, arguments)
  checkpointInterface.call(this, this)
}

CheckpointTrie.prove = proof.prove
CheckpointTrie.verifyProof = proof.verifyProof


/***/ }),

/***/ 85548:
/***/ ((module, exports) => {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * async
 * https://github.com/caolan/async
 *
 * Copyright 2010-2014 Caolan McMahon
 * Released under the MIT license
 */
(function () {

    var async = {};
    function noop() {}
    function identity(v) {
        return v;
    }
    function toBool(v) {
        return !!v;
    }
    function notId(v) {
        return !v;
    }

    // global on the server, window in the browser
    var previous_async;

    // Establish the root object, `window` (`self`) in the browser, `global`
    // on the server, or `this` in some virtual machines. We use `self`
    // instead of `window` for `WebWorker` support.
    var root = typeof self === 'object' && self.self === self && self ||
            typeof global === 'object' && global.global === global && global ||
            this;

    if (root != null) {
        previous_async = root.async;
    }

    async.noConflict = function () {
        root.async = previous_async;
        return async;
    };

    function only_once(fn) {
        return function() {
            if (fn === null) throw new Error("Callback was already called.");
            fn.apply(this, arguments);
            fn = null;
        };
    }

    function _once(fn) {
        return function() {
            if (fn === null) return;
            fn.apply(this, arguments);
            fn = null;
        };
    }

    //// cross-browser compatiblity functions ////

    var _toString = Object.prototype.toString;

    var _isArray = Array.isArray || function (obj) {
        return _toString.call(obj) === '[object Array]';
    };

    // Ported from underscore.js isObject
    var _isObject = function(obj) {
        var type = typeof obj;
        return type === 'function' || type === 'object' && !!obj;
    };

    function _isArrayLike(arr) {
        return _isArray(arr) || (
            // has a positive integer length property
            typeof arr.length === "number" &&
            arr.length >= 0 &&
            arr.length % 1 === 0
        );
    }

    function _arrayEach(arr, iterator) {
        var index = -1,
            length = arr.length;

        while (++index < length) {
            iterator(arr[index], index, arr);
        }
    }

    function _map(arr, iterator) {
        var index = -1,
            length = arr.length,
            result = Array(length);

        while (++index < length) {
            result[index] = iterator(arr[index], index, arr);
        }
        return result;
    }

    function _range(count) {
        return _map(Array(count), function (v, i) { return i; });
    }

    function _reduce(arr, iterator, memo) {
        _arrayEach(arr, function (x, i, a) {
            memo = iterator(memo, x, i, a);
        });
        return memo;
    }

    function _forEachOf(object, iterator) {
        _arrayEach(_keys(object), function (key) {
            iterator(object[key], key);
        });
    }

    function _indexOf(arr, item) {
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] === item) return i;
        }
        return -1;
    }

    var _keys = Object.keys || function (obj) {
        var keys = [];
        for (var k in obj) {
            if (obj.hasOwnProperty(k)) {
                keys.push(k);
            }
        }
        return keys;
    };

    function _keyIterator(coll) {
        var i = -1;
        var len;
        var keys;
        if (_isArrayLike(coll)) {
            len = coll.length;
            return function next() {
                i++;
                return i < len ? i : null;
            };
        } else {
            keys = _keys(coll);
            len = keys.length;
            return function next() {
                i++;
                return i < len ? keys[i] : null;
            };
        }
    }

    // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
    // This accumulates the arguments passed into an array, after a given index.
    // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
    function _restParam(func, startIndex) {
        startIndex = startIndex == null ? func.length - 1 : +startIndex;
        return function() {
            var length = Math.max(arguments.length - startIndex, 0);
            var rest = Array(length);
            for (var index = 0; index < length; index++) {
                rest[index] = arguments[index + startIndex];
            }
            switch (startIndex) {
                case 0: return func.call(this, rest);
                case 1: return func.call(this, arguments[0], rest);
            }
            // Currently unused but handle cases outside of the switch statement:
            // var args = Array(startIndex + 1);
            // for (index = 0; index < startIndex; index++) {
            //     args[index] = arguments[index];
            // }
            // args[startIndex] = rest;
            // return func.apply(this, args);
        };
    }

    function _withoutIndex(iterator) {
        return function (value, index, callback) {
            return iterator(value, callback);
        };
    }

    //// exported async module functions ////

    //// nextTick implementation with browser-compatible fallback ////

    // capture the global reference to guard against fakeTimer mocks
    var _setImmediate = typeof setImmediate === 'function' && setImmediate;

    var _delay = _setImmediate ? function(fn) {
        // not a direct alias for IE10 compatibility
        _setImmediate(fn);
    } : function(fn) {
        setTimeout(fn, 0);
    };

    if (typeof process === 'object' && typeof process.nextTick === 'function') {
        async.nextTick = process.nextTick;
    } else {
        async.nextTick = _delay;
    }
    async.setImmediate = _setImmediate ? _delay : async.nextTick;


    async.forEach =
    async.each = function (arr, iterator, callback) {
        return async.eachOf(arr, _withoutIndex(iterator), callback);
    };

    async.forEachSeries =
    async.eachSeries = function (arr, iterator, callback) {
        return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
    };


    async.forEachLimit =
    async.eachLimit = function (arr, limit, iterator, callback) {
        return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
    };

    async.forEachOf =
    async.eachOf = function (object, iterator, callback) {
        callback = _once(callback || noop);
        object = object || [];

        var iter = _keyIterator(object);
        var key, completed = 0;

        while ((key = iter()) != null) {
            completed += 1;
            iterator(object[key], key, only_once(done));
        }

        if (completed === 0) callback(null);

        function done(err) {
            completed--;
            if (err) {
                callback(err);
            }
            // Check key is null in case iterator isn't exhausted
            // and done resolved synchronously.
            else if (key === null && completed <= 0) {
                callback(null);
            }
        }
    };

    async.forEachOfSeries =
    async.eachOfSeries = function (obj, iterator, callback) {
        callback = _once(callback || noop);
        obj = obj || [];
        var nextKey = _keyIterator(obj);
        var key = nextKey();
        function iterate() {
            var sync = true;
            if (key === null) {
                return callback(null);
            }
            iterator(obj[key], key, only_once(function (err) {
                if (err) {
                    callback(err);
                }
                else {
                    key = nextKey();
                    if (key === null) {
                        return callback(null);
                    } else {
                        if (sync) {
                            async.setImmediate(iterate);
                        } else {
                            iterate();
                        }
                    }
                }
            }));
            sync = false;
        }
        iterate();
    };



    async.forEachOfLimit =
    async.eachOfLimit = function (obj, limit, iterator, callback) {
        _eachOfLimit(limit)(obj, iterator, callback);
    };

    function _eachOfLimit(limit) {

        return function (obj, iterator, callback) {
            callback = _once(callback || noop);
            obj = obj || [];
            var nextKey = _keyIterator(obj);
            if (limit <= 0) {
                return callback(null);
            }
            var done = false;
            var running = 0;
            var errored = false;

            (function replenish () {
                if (done && running <= 0) {
                    return callback(null);
                }

                while (running < limit && !errored) {
                    var key = nextKey();
                    if (key === null) {
                        done = true;
                        if (running <= 0) {
                            callback(null);
                        }
                        return;
                    }
                    running += 1;
                    iterator(obj[key], key, only_once(function (err) {
                        running -= 1;
                        if (err) {
                            callback(err);
                            errored = true;
                        }
                        else {
                            replenish();
                        }
                    }));
                }
            })();
        };
    }


    function doParallel(fn) {
        return function (obj, iterator, callback) {
            return fn(async.eachOf, obj, iterator, callback);
        };
    }
    function doParallelLimit(fn) {
        return function (obj, limit, iterator, callback) {
            return fn(_eachOfLimit(limit), obj, iterator, callback);
        };
    }
    function doSeries(fn) {
        return function (obj, iterator, callback) {
            return fn(async.eachOfSeries, obj, iterator, callback);
        };
    }

    function _asyncMap(eachfn, arr, iterator, callback) {
        callback = _once(callback || noop);
        arr = arr || [];
        var results = _isArrayLike(arr) ? [] : {};
        eachfn(arr, function (value, index, callback) {
            iterator(value, function (err, v) {
                results[index] = v;
                callback(err);
            });
        }, function (err) {
            callback(err, results);
        });
    }

    async.map = doParallel(_asyncMap);
    async.mapSeries = doSeries(_asyncMap);
    async.mapLimit = doParallelLimit(_asyncMap);

    // reduce only has a series version, as doing reduce in parallel won't
    // work in many situations.
    async.inject =
    async.foldl =
    async.reduce = function (arr, memo, iterator, callback) {
        async.eachOfSeries(arr, function (x, i, callback) {
            iterator(memo, x, function (err, v) {
                memo = v;
                callback(err);
            });
        }, function (err) {
            callback(err, memo);
        });
    };

    async.foldr =
    async.reduceRight = function (arr, memo, iterator, callback) {
        var reversed = _map(arr, identity).reverse();
        async.reduce(reversed, memo, iterator, callback);
    };

    async.transform = function (arr, memo, iterator, callback) {
        if (arguments.length === 3) {
            callback = iterator;
            iterator = memo;
            memo = _isArray(arr) ? [] : {};
        }

        async.eachOf(arr, function(v, k, cb) {
            iterator(memo, v, k, cb);
        }, function(err) {
            callback(err, memo);
        });
    };

    function _filter(eachfn, arr, iterator, callback) {
        var results = [];
        eachfn(arr, function (x, index, callback) {
            iterator(x, function (v) {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            });
        }, function () {
            callback(_map(results.sort(function (a, b) {
                return a.index - b.index;
            }), function (x) {
                return x.value;
            }));
        });
    }

    async.select =
    async.filter = doParallel(_filter);

    async.selectLimit =
    async.filterLimit = doParallelLimit(_filter);

    async.selectSeries =
    async.filterSeries = doSeries(_filter);

    function _reject(eachfn, arr, iterator, callback) {
        _filter(eachfn, arr, function(value, cb) {
            iterator(value, function(v) {
                cb(!v);
            });
        }, callback);
    }
    async.reject = doParallel(_reject);
    async.rejectLimit = doParallelLimit(_reject);
    async.rejectSeries = doSeries(_reject);

    function _createTester(eachfn, check, getResult) {
        return function(arr, limit, iterator, cb) {
            function done() {
                if (cb) cb(getResult(false, void 0));
            }
            function iteratee(x, _, callback) {
                if (!cb) return callback();
                iterator(x, function (v) {
                    if (cb && check(v)) {
                        cb(getResult(true, x));
                        cb = iterator = false;
                    }
                    callback();
                });
            }
            if (arguments.length > 3) {
                eachfn(arr, limit, iteratee, done);
            } else {
                cb = iterator;
                iterator = limit;
                eachfn(arr, iteratee, done);
            }
        };
    }

    async.any =
    async.some = _createTester(async.eachOf, toBool, identity);

    async.someLimit = _createTester(async.eachOfLimit, toBool, identity);

    async.all =
    async.every = _createTester(async.eachOf, notId, notId);

    async.everyLimit = _createTester(async.eachOfLimit, notId, notId);

    function _findGetResult(v, x) {
        return x;
    }
    async.detect = _createTester(async.eachOf, identity, _findGetResult);
    async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
    async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);

    async.sortBy = function (arr, iterator, callback) {
        async.map(arr, function (x, callback) {
            iterator(x, function (err, criteria) {
                if (err) {
                    callback(err);
                }
                else {
                    callback(null, {value: x, criteria: criteria});
                }
            });
        }, function (err, results) {
            if (err) {
                return callback(err);
            }
            else {
                callback(null, _map(results.sort(comparator), function (x) {
                    return x.value;
                }));
            }

        });

        function comparator(left, right) {
            var a = left.criteria, b = right.criteria;
            return a < b ? -1 : a > b ? 1 : 0;
        }
    };

    async.auto = function (tasks, concurrency, callback) {
        if (typeof arguments[1] === 'function') {
            // concurrency is optional, shift the args.
            callback = concurrency;
            concurrency = null;
        }
        callback = _once(callback || noop);
        var keys = _keys(tasks);
        var remainingTasks = keys.length;
        if (!remainingTasks) {
            return callback(null);
        }
        if (!concurrency) {
            concurrency = remainingTasks;
        }

        var results = {};
        var runningTasks = 0;

        var hasError = false;

        var listeners = [];
        function addListener(fn) {
            listeners.unshift(fn);
        }
        function removeListener(fn) {
            var idx = _indexOf(listeners, fn);
            if (idx >= 0) listeners.splice(idx, 1);
        }
        function taskComplete() {
            remainingTasks--;
            _arrayEach(listeners.slice(0), function (fn) {
                fn();
            });
        }

        addListener(function () {
            if (!remainingTasks) {
                callback(null, results);
            }
        });

        _arrayEach(keys, function (k) {
            if (hasError) return;
            var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
            var taskCallback = _restParam(function(err, args) {
                runningTasks--;
                if (args.length <= 1) {
                    args = args[0];
                }
                if (err) {
                    var safeResults = {};
                    _forEachOf(results, function(val, rkey) {
                        safeResults[rkey] = val;
                    });
                    safeResults[k] = args;
                    hasError = true;

                    callback(err, safeResults);
                }
                else {
                    results[k] = args;
                    async.setImmediate(taskComplete);
                }
            });
            var requires = task.slice(0, task.length - 1);
            // prevent dead-locks
            var len = requires.length;
            var dep;
            while (len--) {
                if (!(dep = tasks[requires[len]])) {
                    throw new Error('Has nonexistent dependency in ' + requires.join(', '));
                }
                if (_isArray(dep) && _indexOf(dep, k) >= 0) {
                    throw new Error('Has cyclic dependencies');
                }
            }
            function ready() {
                return runningTasks < concurrency && _reduce(requires, function (a, x) {
                    return (a && results.hasOwnProperty(x));
                }, true) && !results.hasOwnProperty(k);
            }
            if (ready()) {
                runningTasks++;
                task[task.length - 1](taskCallback, results);
            }
            else {
                addListener(listener);
            }
            function listener() {
                if (ready()) {
                    runningTasks++;
                    removeListener(listener);
                    task[task.length - 1](taskCallback, results);
                }
            }
        });
    };



    async.retry = function(times, task, callback) {
        var DEFAULT_TIMES = 5;
        var DEFAULT_INTERVAL = 0;

        var attempts = [];

        var opts = {
            times: DEFAULT_TIMES,
            interval: DEFAULT_INTERVAL
        };

        function parseTimes(acc, t){
            if(typeof t === 'number'){
                acc.times = parseInt(t, 10) || DEFAULT_TIMES;
            } else if(typeof t === 'object'){
                acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
                acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
            } else {
                throw new Error('Unsupported argument type for \'times\': ' + typeof t);
            }
        }

        var length = arguments.length;
        if (length < 1 || length > 3) {
            throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
        } else if (length <= 2 && typeof times === 'function') {
            callback = task;
            task = times;
        }
        if (typeof times !== 'function') {
            parseTimes(opts, times);
        }
        opts.callback = callback;
        opts.task = task;

        function wrappedTask(wrappedCallback, wrappedResults) {
            function retryAttempt(task, finalAttempt) {
                return function(seriesCallback) {
                    task(function(err, result){
                        seriesCallback(!err || finalAttempt, {err: err, result: result});
                    }, wrappedResults);
                };
            }

            function retryInterval(interval){
                return function(seriesCallback){
                    setTimeout(function(){
                        seriesCallback(null);
                    }, interval);
                };
            }

            while (opts.times) {

                var finalAttempt = !(opts.times-=1);
                attempts.push(retryAttempt(opts.task, finalAttempt));
                if(!finalAttempt && opts.interval > 0){
                    attempts.push(retryInterval(opts.interval));
                }
            }

            async.series(attempts, function(done, data){
                data = data[data.length - 1];
                (wrappedCallback || opts.callback)(data.err, data.result);
            });
        }

        // If a callback is passed, run this as a controll flow
        return opts.callback ? wrappedTask() : wrappedTask;
    };

    async.waterfall = function (tasks, callback) {
        callback = _once(callback || noop);
        if (!_isArray(tasks)) {
            var err = new Error('First argument to waterfall must be an array of functions');
            return callback(err);
        }
        if (!tasks.length) {
            return callback();
        }
        function wrapIterator(iterator) {
            return _restParam(function (err, args) {
                if (err) {
                    callback.apply(null, [err].concat(args));
                }
                else {
                    var next = iterator.next();
                    if (next) {
                        args.push(wrapIterator(next));
                    }
                    else {
                        args.push(callback);
                    }
                    ensureAsync(iterator).apply(null, args);
                }
            });
        }
        wrapIterator(async.iterator(tasks))();
    };

    function _parallel(eachfn, tasks, callback) {
        callback = callback || noop;
        var results = _isArrayLike(tasks) ? [] : {};

        eachfn(tasks, function (task, key, callback) {
            task(_restParam(function (err, args) {
                if (args.length <= 1) {
                    args = args[0];
                }
                results[key] = args;
                callback(err);
            }));
        }, function (err) {
            callback(err, results);
        });
    }

    async.parallel = function (tasks, callback) {
        _parallel(async.eachOf, tasks, callback);
    };

    async.parallelLimit = function(tasks, limit, callback) {
        _parallel(_eachOfLimit(limit), tasks, callback);
    };

    async.series = function(tasks, callback) {
        _parallel(async.eachOfSeries, tasks, callback);
    };

    async.iterator = function (tasks) {
        function makeCallback(index) {
            function fn() {
                if (tasks.length) {
                    tasks[index].apply(null, arguments);
                }
                return fn.next();
            }
            fn.next = function () {
                return (index < tasks.length - 1) ? makeCallback(index + 1): null;
            };
            return fn;
        }
        return makeCallback(0);
    };

    async.apply = _restParam(function (fn, args) {
        return _restParam(function (callArgs) {
            return fn.apply(
                null, args.concat(callArgs)
            );
        });
    });

    function _concat(eachfn, arr, fn, callback) {
        var result = [];
        eachfn(arr, function (x, index, cb) {
            fn(x, function (err, y) {
                result = result.concat(y || []);
                cb(err);
            });
        }, function (err) {
            callback(err, result);
        });
    }
    async.concat = doParallel(_concat);
    async.concatSeries = doSeries(_concat);

    async.whilst = function (test, iterator, callback) {
        callback = callback || noop;
        if (test()) {
            var next = _restParam(function(err, args) {
                if (err) {
                    callback(err);
                } else if (test.apply(this, args)) {
                    iterator(next);
                } else {
                    callback.apply(null, [null].concat(args));
                }
            });
            iterator(next);
        } else {
            callback(null);
        }
    };

    async.doWhilst = function (iterator, test, callback) {
        var calls = 0;
        return async.whilst(function() {
            return ++calls <= 1 || test.apply(this, arguments);
        }, iterator, callback);
    };

    async.until = function (test, iterator, callback) {
        return async.whilst(function() {
            return !test.apply(this, arguments);
        }, iterator, callback);
    };

    async.doUntil = function (iterator, test, callback) {
        return async.doWhilst(iterator, function() {
            return !test.apply(this, arguments);
        }, callback);
    };

    async.during = function (test, iterator, callback) {
        callback = callback || noop;

        var next = _restParam(function(err, args) {
            if (err) {
                callback(err);
            } else {
                args.push(check);
                test.apply(this, args);
            }
        });

        var check = function(err, truth) {
            if (err) {
                callback(err);
            } else if (truth) {
                iterator(next);
            } else {
                callback(null);
            }
        };

        test(check);
    };

    async.doDuring = function (iterator, test, callback) {
        var calls = 0;
        async.during(function(next) {
            if (calls++ < 1) {
                next(null, true);
            } else {
                test.apply(this, arguments);
            }
        }, iterator, callback);
    };

    function _queue(worker, concurrency, payload) {
        if (concurrency == null) {
            concurrency = 1;
        }
        else if(concurrency === 0) {
            throw new Error('Concurrency must not be zero');
        }
        function _insert(q, data, pos, callback) {
            if (callback != null && typeof callback !== "function") {
                throw new Error("task callback must be a function");
            }
            q.started = true;
            if (!_isArray(data)) {
                data = [data];
            }
            if(data.length === 0 && q.idle()) {
                // call drain immediately if there are no tasks
                return async.setImmediate(function() {
                    q.drain();
                });
            }
            _arrayEach(data, function(task) {
                var item = {
                    data: task,
                    callback: callback || noop
                };

                if (pos) {
                    q.tasks.unshift(item);
                } else {
                    q.tasks.push(item);
                }

                if (q.tasks.length === q.concurrency) {
                    q.saturated();
                }
            });
            async.setImmediate(q.process);
        }
        function _next(q, tasks) {
            return function(){
                workers -= 1;

                var removed = false;
                var args = arguments;
                _arrayEach(tasks, function (task) {
                    _arrayEach(workersList, function (worker, index) {
                        if (worker === task && !removed) {
                            workersList.splice(index, 1);
                            removed = true;
                        }
                    });

                    task.callback.apply(task, args);
                });
                if (q.tasks.length + workers === 0) {
                    q.drain();
                }
                q.process();
            };
        }

        var workers = 0;
        var workersList = [];
        var q = {
            tasks: [],
            concurrency: concurrency,
            payload: payload,
            saturated: noop,
            empty: noop,
            drain: noop,
            started: false,
            paused: false,
            push: function (data, callback) {
                _insert(q, data, false, callback);
            },
            kill: function () {
                q.drain = noop;
                q.tasks = [];
            },
            unshift: function (data, callback) {
                _insert(q, data, true, callback);
            },
            process: function () {
                while(!q.paused && workers < q.concurrency && q.tasks.length){

                    var tasks = q.payload ?
                        q.tasks.splice(0, q.payload) :
                        q.tasks.splice(0, q.tasks.length);

                    var data = _map(tasks, function (task) {
                        return task.data;
                    });

                    if (q.tasks.length === 0) {
                        q.empty();
                    }
                    workers += 1;
                    workersList.push(tasks[0]);
                    var cb = only_once(_next(q, tasks));
                    worker(data, cb);
                }
            },
            length: function () {
                return q.tasks.length;
            },
            running: function () {
                return workers;
            },
            workersList: function () {
                return workersList;
            },
            idle: function() {
                return q.tasks.length + workers === 0;
            },
            pause: function () {
                q.paused = true;
            },
            resume: function () {
                if (q.paused === false) { return; }
                q.paused = false;
                var resumeCount = Math.min(q.concurrency, q.tasks.length);
                // Need to call q.process once per concurrent
                // worker to preserve full concurrency after pause
                for (var w = 1; w <= resumeCount; w++) {
                    async.setImmediate(q.process);
                }
            }
        };
        return q;
    }

    async.queue = function (worker, concurrency) {
        var q = _queue(function (items, cb) {
            worker(items[0], cb);
        }, concurrency, 1);

        return q;
    };

    async.priorityQueue = function (worker, concurrency) {

        function _compareTasks(a, b){
            return a.priority - b.priority;
        }

        function _binarySearch(sequence, item, compare) {
            var beg = -1,
                end = sequence.length - 1;
            while (beg < end) {
                var mid = beg + ((end - beg + 1) >>> 1);
                if (compare(item, sequence[mid]) >= 0) {
                    beg = mid;
                } else {
                    end = mid - 1;
                }
            }
            return beg;
        }

        function _insert(q, data, priority, callback) {
            if (callback != null && typeof callback !== "function") {
                throw new Error("task callback must be a function");
            }
            q.started = true;
            if (!_isArray(data)) {
                data = [data];
            }
            if(data.length === 0) {
                // call drain immediately if there are no tasks
                return async.setImmediate(function() {
                    q.drain();
                });
            }
            _arrayEach(data, function(task) {
                var item = {
                    data: task,
                    priority: priority,
                    callback: typeof callback === 'function' ? callback : noop
                };

                q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);

                if (q.tasks.length === q.concurrency) {
                    q.saturated();
                }
                async.setImmediate(q.process);
            });
        }

        // Start with a normal queue
        var q = async.queue(worker, concurrency);

        // Override push to accept second parameter representing priority
        q.push = function (data, priority, callback) {
            _insert(q, data, priority, callback);
        };

        // Remove unshift function
        delete q.unshift;

        return q;
    };

    async.cargo = function (worker, payload) {
        return _queue(worker, 1, payload);
    };

    function _console_fn(name) {
        return _restParam(function (fn, args) {
            fn.apply(null, args.concat([_restParam(function (err, args) {
                if (typeof console === 'object') {
                    if (err) {
                        if (console.error) {
                            console.error(err);
                        }
                    }
                    else if (console[name]) {
                        _arrayEach(args, function (x) {
                            console[name](x);
                        });
                    }
                }
            })]));
        });
    }
    async.log = _console_fn('log');
    async.dir = _console_fn('dir');
    /*async.info = _console_fn('info');
    async.warn = _console_fn('warn');
    async.error = _console_fn('error');*/

    async.memoize = function (fn, hasher) {
        var memo = {};
        var queues = {};
        var has = Object.prototype.hasOwnProperty;
        hasher = hasher || identity;
        var memoized = _restParam(function memoized(args) {
            var callback = args.pop();
            var key = hasher.apply(null, args);
            if (has.call(memo, key)) {   
                async.setImmediate(function () {
                    callback.apply(null, memo[key]);
                });
            }
            else if (has.call(queues, key)) {
                queues[key].push(callback);
            }
            else {
                queues[key] = [callback];
                fn.apply(null, args.concat([_restParam(function (args) {
                    memo[key] = args;
                    var q = queues[key];
                    delete queues[key];
                    for (var i = 0, l = q.length; i < l; i++) {
                        q[i].apply(null, args);
                    }
                })]));
            }
        });
        memoized.memo = memo;
        memoized.unmemoized = fn;
        return memoized;
    };

    async.unmemoize = function (fn) {
        return function () {
            return (fn.unmemoized || fn).apply(null, arguments);
        };
    };

    function _times(mapper) {
        return function (count, iterator, callback) {
            mapper(_range(count), iterator, callback);
        };
    }

    async.times = _times(async.map);
    async.timesSeries = _times(async.mapSeries);
    async.timesLimit = function (count, limit, iterator, callback) {
        return async.mapLimit(_range(count), limit, iterator, callback);
    };

    async.seq = function (/* functions... */) {
        var fns = arguments;
        return _restParam(function (args) {
            var that = this;

            var callback = args[args.length - 1];
            if (typeof callback == 'function') {
                args.pop();
            } else {
                callback = noop;
            }

            async.reduce(fns, args, function (newargs, fn, cb) {
                fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
                    cb(err, nextargs);
                })]));
            },
            function (err, results) {
                callback.apply(that, [err].concat(results));
            });
        });
    };

    async.compose = function (/* functions... */) {
        return async.seq.apply(null, Array.prototype.reverse.call(arguments));
    };


    function _applyEach(eachfn) {
        return _restParam(function(fns, args) {
            var go = _restParam(function(args) {
                var that = this;
                var callback = args.pop();
                return eachfn(fns, function (fn, _, cb) {
                    fn.apply(that, args.concat([cb]));
                },
                callback);
            });
            if (args.length) {
                return go.apply(this, args);
            }
            else {
                return go;
            }
        });
    }

    async.applyEach = _applyEach(async.eachOf);
    async.applyEachSeries = _applyEach(async.eachOfSeries);


    async.forever = function (fn, callback) {
        var done = only_once(callback || noop);
        var task = ensureAsync(fn);
        function next(err) {
            if (err) {
                return done(err);
            }
            task(next);
        }
        next();
    };

    function ensureAsync(fn) {
        return _restParam(function (args) {
            var callback = args.pop();
            args.push(function () {
                var innerArgs = arguments;
                if (sync) {
                    async.setImmediate(function () {
                        callback.apply(null, innerArgs);
                    });
                } else {
                    callback.apply(null, innerArgs);
                }
            });
            var sync = true;
            fn.apply(this, args);
            sync = false;
        });
    }

    async.ensureAsync = ensureAsync;

    async.constant = _restParam(function(values) {
        var args = [null].concat(values);
        return function (callback) {
            return callback.apply(this, args);
        };
    });

    async.wrapSync =
    async.asyncify = function asyncify(func) {
        return _restParam(function (args) {
            var callback = args.pop();
            var result;
            try {
                result = func.apply(this, args);
            } catch (e) {
                return callback(e);
            }
            // if result is Promise object
            if (_isObject(result) && typeof result.then === "function") {
                result.then(function(value) {
                    callback(null, value);
                })["catch"](function(err) {
                    callback(err.message ? err : new Error(err));
                });
            } else {
                callback(null, result);
            }
        });
    };

    // Node.js
    if ( true && module.exports) {
        module.exports = async;
    }
    // AMD / RequireJS
    else if (true) {
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
            return async;
        }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    }
    // included directly via <script> tag
    else {}

}());


/***/ }),

/***/ 453139:
/***/ ((module) => {

module.exports = PrioritizedTaskExecutor

/**
 * Executes tasks up to maxPoolSize at a time, other items are put in a priority queue.
 * @class PrioritizedTaskExecutor
 * @param {Number} maxPoolSize The maximum size of the pool
 * @prop {Number} maxPoolSize The maximum size of the pool
 * @prop {Number} currentPoolSize The current size of the pool
 * @prop {Array} queue The task queue
 */
function PrioritizedTaskExecutor (maxPoolSize) {
  this.maxPoolSize = maxPoolSize
  this.currentPoolSize = 0
  this.queue = []
}

/**
 * Executes the task.
 * @param {Number} priority The priority of the task
 * @param {Function} task The function that accepts the callback, which must be called upon the task completion.
 */
PrioritizedTaskExecutor.prototype.execute = function (priority, task) {
  var self = this

  if (self.currentPoolSize < self.maxPoolSize) {
    self.currentPoolSize++
    task(function () {
      self.currentPoolSize--
      if (self.queue.length > 0) {
        self.queue.sort(function (a, b) {
          return b.priority - a.priority
        })
        var item = self.queue.shift()
        self.execute(item.priority, item.task)
      }
    })
  } else {
    self.queue.push({
      priority: priority,
      task: task
    })
  }
}


/***/ }),

/***/ 330219:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

const TrieNode = __webpack_require__(838316)
const ethUtil = __webpack_require__(334366)
const matchingNibbleLength = __webpack_require__(951731).matchingNibbleLength

/**
 * Returns a merkle proof for a given key
 * @method Trie.prove
 * @param {Trie} trie
 * @param {String} key
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {Array.<TrieNode>} `proof`)
 */
exports.prove = function (trie, key, cb) {
  var nodes

  trie.findPath(key, function (err, node, remaining, stack) {
    if (err) return cb(err)
    if (remaining.length > 0) return cb(new Error('Node does not contain the key'))
    nodes = stack
    var p = []
    for (var i = 0; i < nodes.length; i++) {
      var rlpNode = nodes[i].serialize()

      if ((rlpNode.length >= 32) || (i === 0)) {
        p.push(rlpNode)
      }
    }
    cb(null, p)
  })
}

/**
 * Verifies a merkle proof for a given key
 * @method Trie.verifyProof
 * @param {Buffer} rootHash
 * @param {String} key
 * @param {Array.<TrieNode>} proof
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {String} `val`)
 */
exports.verifyProof = function (rootHash, key, proof, cb) {
  key = TrieNode.stringToNibbles(key)
  var wantHash = ethUtil.toBuffer(rootHash)
  for (var i = 0; i < proof.length; i++) {
    var p = ethUtil.toBuffer(proof[i])
    var hash = ethUtil.sha3(proof[i])
    if (Buffer.compare(hash, wantHash)) {
      return cb(new Error('Bad proof node ' + i + ': hash mismatch'))
    }
    var node = new TrieNode(ethUtil.rlp.decode(p))
    var cld
    if (node.type === 'branch') {
      if (key.length === 0) {
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (branch)'))
        }
        return cb(null, node.value)
      }
      cld = node.raw[key[0]]
      key = key.slice(1)
      if (cld.length === 2) {
        var embeddedNode = new TrieNode(cld)
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (embeddedNode)'))
        }

        if (matchingNibbleLength(embeddedNode.key, key) !== embeddedNode.key.length) {
          return cb(new Error('Key length does not match with the proof one (embeddedNode)'))
        }
        key = key.slice(embeddedNode.key.length)
        if (key.length !== 0) {
          return cb(new Error('Key does not match with the proof one (embeddedNode)'))
        }
        return cb(null, embeddedNode.value)
      } else {
        wantHash = cld
      }
    } else if ((node.type === 'extention') || (node.type === 'leaf')) {
      if (matchingNibbleLength(node.key, key) !== node.key.length) {
        return cb(new Error('Key does not match with the proof one (extention|leaf)'))
      }
      cld = node.value
      key = key.slice(node.key.length)
      if (key.length === 0 || (cld.length === 17 && key.length === 1)) {
        // The value is in an embedded branch. Extract it.
        if (cld.length === 17) {
          cld = cld[key[0]][1]
          key = key.slice(1)
        }
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (extention|leaf)'))
        }
        return cb(null, cld)
      } else {
        wantHash = cld
      }
    } else {
      return cb(new Error('Invalid node type'))
    }
  }
  cb(new Error('Unexpected end of proof'))
}


/***/ }),

/***/ 717397:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Readable = __webpack_require__(982535).Readable
const TrieNode = __webpack_require__(838316)
const util = __webpack_require__(431669)

module.exports = TrieReadStream

function TrieReadStream (trie) {
  this.trie = trie
  this.next = null
  Readable.call(this, {
    objectMode: true
  })
}

util.inherits(TrieReadStream, Readable)

TrieReadStream.prototype._read = function () {
  var self = this
  if (!self._started) {
    self._started = true
    self.trie._findValueNodes(function (nodeRef, node, key, next) {
      self.push({
        key: TrieNode.nibblesToBuffer(key),
        value: node.value
      })
      next()
    }, function () {
      // close stream
      self.push(null)
    })
  }
}


/***/ }),

/***/ 838316:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const rlp = __webpack_require__(6636)
const ethUtil = __webpack_require__(334366)

module.exports = TrieNode

function TrieNode (type, key, value) {
  if (Array.isArray(type)) {
    // parse raw node
    this.parseNode(type)
  } else {
    this.type = type
    if (type === 'branch') {
      var values = key
      this.raw = Array.apply(null, Array(17))
      if (values) {
        values.forEach(function (keyVal) {
          this.set.apply(this, keyVal)
        })
      }
    } else {
      this.raw = Array(2)
      this.setValue(value)
      this.setKey(key)
    }
  }
}

TrieNode.isRawNode = isRawNode
TrieNode.addHexPrefix = addHexPrefix
TrieNode.removeHexPrefix = removeHexPrefix
TrieNode.isTerminator = isTerminator
TrieNode.stringToNibbles = stringToNibbles
TrieNode.nibblesToBuffer = nibblesToBuffer
TrieNode.getNodeType = getNodeType

Object.defineProperty(TrieNode.prototype, 'value', {
  get: function () {
    return this.getValue()
  },
  set: function (v) {
    this.setValue(v)
  }
})

Object.defineProperty(TrieNode.prototype, 'key', {
  get: function () {
    return this.getKey()
  },
  set: function (k) {
    this.setKey(k)
  }
})

// parses a raw node
TrieNode.prototype.parseNode = function (rawNode) {
  this.raw = rawNode
  this.type = getNodeType(rawNode)
}

// sets the value of the node
TrieNode.prototype.setValue = function (key, value) {
  if (this.type !== 'branch') {
    this.raw[1] = key
  } else {
    if (arguments.length === 1) {
      value = key
      key = 16
    }
    this.raw[key] = value
  }
}

TrieNode.prototype.getValue = function (key) {
  if (this.type === 'branch') {
    if (arguments.length === 0) {
      key = 16
    }

    var val = this.raw[key]
    if (val !== null && val !== undefined && val.length !== 0) {
      return val
    }
  } else {
    return this.raw[1]
  }
}

TrieNode.prototype.setKey = function (key) {
  if (this.type !== 'branch') {
    if (Buffer.isBuffer(key)) {
      key = stringToNibbles(key)
    } else {
      key = key.slice(0) // copy the key
    }

    key = addHexPrefix(key, this.type === 'leaf')
    this.raw[0] = nibblesToBuffer(key)
  }
}

// returns the key as a nibble
TrieNode.prototype.getKey = function () {
  if (this.type !== 'branch') {
    var key = this.raw[0]
    key = removeHexPrefix(stringToNibbles(key))
    return (key)
  }
}

TrieNode.prototype.serialize = function () {
  return rlp.encode(this.raw)
}

TrieNode.prototype.hash = function () {
  return ethUtil.sha3(this.serialize())
}

TrieNode.prototype.toString = function () {
  var out = this.type
  out += ': ['
  this.raw.forEach(function (el) {
    if (Buffer.isBuffer(el)) {
      out += el.toString('hex') + ', '
    } else if (el) {
      out += 'object, '
    } else {
      out += 'empty, '
    }
  })
  out = out.slice(0, -2)
  out += ']'
  return out
}

TrieNode.prototype.getChildren = function () {
  var children = []
  switch (this.type) {
    case 'leaf':
      // no children
      break
    case 'extention':
      // one child
      children.push([this.key, this.getValue()])
      break
    case 'branch':
      for (var index = 0, end = 16; index < end; index++) {
        var value = this.getValue(index)
        if (value) {
          children.push([
            [index], value
          ])
        }
      }
      break
  }
  return children
}

/**
 * @param {Array} dataArr
 * @returns {Buffer} - returns buffer of encoded data
 * hexPrefix
 **/
function addHexPrefix (key, terminator) {
  // odd
  if (key.length % 2) {
    key.unshift(1)
  } else {
    // even
    key.unshift(0)
    key.unshift(0)
  }

  if (terminator) {
    key[0] += 2
  }

  return key
}

function removeHexPrefix (val) {
  if (val[0] % 2) {
    val = val.slice(1)
  } else {
    val = val.slice(2)
  }

  return val
}

/**
 * Determines if a key has Arnold Schwarzenegger in it.
 * @method isTerminator
 * @param {Array} key - an hexprefixed array of nibbles
 */
function isTerminator (key) {
  return key[0] > 1
}

/**
 * Converts a string OR a buffer to a nibble array.
 * @method stringToNibbles
 * @param {Buffer| String} key
 */
function stringToNibbles (key) {
  var bkey = new Buffer(key)
  var nibbles = []

  for (var i = 0; i < bkey.length; i++) {
    var q = i * 2
    nibbles[q] = bkey[i] >> 4
    ++q
    nibbles[q] = bkey[i] % 16
  }
  return nibbles
}

/**
 * Converts a nibble array into a buffer.
 * @method nibblesToBuffer
 * @param arr
 */
function nibblesToBuffer (arr) {
  var buf = new Buffer(arr.length / 2)
  for (var i = 0; i < buf.length; i++) {
    var q = i * 2
    buf[i] = (arr[q] << 4) + arr[++q]
  }
  return buf
}

/**
 * Determines the node type.
 * @returns {String} - the node type
 *   - leaf - if the node is a leaf
 *   - branch - if the node is a branch
 *   - extention - if the node is an extention
 *   - unknown - if something else got borked
 */
function getNodeType (node) {
  if (node.length === 17) {
    return 'branch'
  } else if (node.length === 2) {
    var key = stringToNibbles(node[0])
    if (isTerminator(key)) {
      return 'leaf'
    }

    return 'extention'
  }
}

function isRawNode (node) {
  return Array.isArray(node) && !Buffer.isBuffer(node)
}


/***/ }),

/***/ 951731:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const async = __webpack_require__(85548)

module.exports = {
  matchingNibbleLength: matchingNibbleLength,
  callTogether: callTogether,
  asyncFirstSeries: asyncFirstSeries,
  doKeysMatch: doKeysMatch
}

/**
 * Returns the number of in order matching nibbles of two give nibble arrayes
 * @method matchingNibbleLength
 * @param {Array} nib1
 * @param {Array} nib2
 */
function matchingNibbleLength (nib1, nib2) {
  var i = 0
  while (nib1[i] === nib2[i] && nib1.length > i) {
    i++
  }
  return i
}

/**
 * Compare two 'nibble array' keys
 */
function doKeysMatch (keyA, keyB) {
  var length = matchingNibbleLength(keyA, keyB)
  return length === keyA.length && length === keyB.length
}

/**
 * Take two or more functions and returns a function  that will execute all of
 * the given functions
 */
function callTogether () {
  var funcs = arguments
  var length = funcs.length
  var index = length

  if (!length) {
    return function () {}
  }

  return function () {
    length = index

    while (length--) {
      var fn = funcs[length]
      if (typeof fn === 'function') {
        var result = funcs[length].apply(this, arguments)
      }
    }
    return result
  }
}

/**
 * Take a collection of async fns, call the cb on the first to return a truthy value.
 * If all run without a truthy result, return undefined
 */
function asyncFirstSeries (array, iterator, cb) {
  var didComplete = false
  async.eachSeries(array, function (item, next) {
    if (didComplete) return next
    iterator(item, function (err, result) {
      if (result) {
        didComplete = true
        process.nextTick(cb.bind(null, null, result))
      }
      next(err)
    })
  }, function () {
    if (!didComplete) {
      cb()
    }
  })
}


/***/ }),

/***/ 195822:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    keys.push(key);
  }return keys;
};
/*</replacement>*/

module.exports = Duplex;

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(654939);
var Writable = __webpack_require__(391849);

util.inherits(Duplex, Readable);

{
  // avoid scope creep, the keys array can then be collected
  var keys = objectKeys(Writable.prototype);
  for (var v = 0; v < keys.length; v++) {
    var method = keys[v];
    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  }
}

function Duplex(options) {
  if (!(this instanceof Duplex)) return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false) this.readable = false;

  if (options && options.writable === false) this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;

  this.once('end', onend);
}

Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended) return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  pna.nextTick(onEndNT, this);
}

function onEndNT(self) {
  self.end();
}

Object.defineProperty(Duplex.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined || this._writableState === undefined) {
      return false;
    }
    return this._readableState.destroyed && this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (this._readableState === undefined || this._writableState === undefined) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
    this._writableState.destroyed = value;
  }
});

Duplex.prototype._destroy = function (err, cb) {
  this.push(null);
  this.end();

  pna.nextTick(cb, err);
};

/***/ }),

/***/ 794335:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.



module.exports = PassThrough;

var Transform = __webpack_require__(318979);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};

/***/ }),

/***/ 654939:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(815552);
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Readable.ReadableState = ReadableState;

/*<replacement>*/
var EE = __webpack_require__(128614).EventEmitter;

var EElistenerCount = function (emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(886327);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(878511).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var debugUtil = __webpack_require__(431669);
var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
  debug = debugUtil.debuglog('stream');
} else {
  debug = function () {};
}
/*</replacement>*/

var BufferList = __webpack_require__(110176);
var destroyImpl = __webpack_require__(945233);
var StringDecoder;

util.inherits(Readable, Stream);

var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];

function prependListener(emitter, event, fn) {
  // Sadly this is not cacheable as some libraries bundle their own
  // event emitter implementation with them.
  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);

  // This is a hack to make sure that our error handler is attached before any
  // userland ones.  NEVER DO THIS. This is here only because this code needs
  // to continue to work with older versions of Node.js that do not include
  // the prependListener() method. The goal is to eventually remove this hack.
  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}

function ReadableState(options, stream) {
  Duplex = Duplex || __webpack_require__(195822);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  var readableHwm = options.readableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // A linked list is used to store data chunks instead of an array because the
  // linked list can remove elements from the beginning faster than
  // array.shift()
  this.buffer = new BufferList();
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = null;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // a flag to be able to tell if the event 'readable'/'data' is emitted
  // immediately, or on a later tick.  We set this to true at first, because
  // any actions that shouldn't happen until "later" should generally also
  // not happen before the first read call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;
  this.resumeScheduled = false;

  // has it been destroyed
  this.destroyed = false;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder) StringDecoder = __webpack_require__(408442)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  Duplex = Duplex || __webpack_require__(195822);

  if (!(this instanceof Readable)) return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  if (options) {
    if (typeof options.read === 'function') this._read = options.read;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;
  }

  Stream.call(this);
}

Object.defineProperty(Readable.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined) {
      return false;
    }
    return this._readableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._readableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
  }
});

Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;
Readable.prototype._destroy = function (err, cb) {
  this.push(null);
  cb(err);
};

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function (chunk, encoding) {
  var state = this._readableState;
  var skipChunkCheck;

  if (!state.objectMode) {
    if (typeof chunk === 'string') {
      encoding = encoding || state.defaultEncoding;
      if (encoding !== state.encoding) {
        chunk = Buffer.from(chunk, encoding);
        encoding = '';
      }
      skipChunkCheck = true;
    }
  } else {
    skipChunkCheck = true;
  }

  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function (chunk) {
  return readableAddChunk(this, chunk, null, true, false);
};

function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  var state = stream._readableState;
  if (chunk === null) {
    state.reading = false;
    onEofChunk(stream, state);
  } else {
    var er;
    if (!skipChunkCheck) er = chunkInvalid(state, chunk);
    if (er) {
      stream.emit('error', er);
    } else if (state.objectMode || chunk && chunk.length > 0) {
      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
        chunk = _uint8ArrayToBuffer(chunk);
      }

      if (addToFront) {
        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
      } else if (state.ended) {
        stream.emit('error', new Error('stream.push() after EOF'));
      } else {
        state.reading = false;
        if (state.decoder && !encoding) {
          chunk = state.decoder.write(chunk);
          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
        } else {
          addChunk(stream, state, chunk, false);
        }
      }
    } else if (!addToFront) {
      state.reading = false;
    }
  }

  return needMoreData(state);
}

function addChunk(stream, state, chunk, addToFront) {
  if (state.flowing && state.length === 0 && !state.sync) {
    stream.emit('data', chunk);
    stream.read(0);
  } else {
    // update the buffer info.
    state.length += state.objectMode ? 1 : chunk.length;
    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);

    if (state.needReadable) emitReadable(stream);
  }
  maybeReadMore(stream, state);
}

function chunkInvalid(state, chunk) {
  var er;
  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}

// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
}

Readable.prototype.isPaused = function () {
  return this._readableState.flowing === false;
};

// backwards compatibility.
Readable.prototype.setEncoding = function (enc) {
  if (!StringDecoder) StringDecoder = __webpack_require__(408442)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
  return this;
};

// Don't raise the hwm > 8MB
var MAX_HWM = 0x800000;
function computeNewHighWaterMark(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2 to prevent increasing hwm excessively in
    // tiny amounts
    n--;
    n |= n >>> 1;
    n |= n >>> 2;
    n |= n >>> 4;
    n |= n >>> 8;
    n |= n >>> 16;
    n++;
  }
  return n;
}

// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function howMuchToRead(n, state) {
  if (n <= 0 || state.length === 0 && state.ended) return 0;
  if (state.objectMode) return 1;
  if (n !== n) {
    // Only flow one buffer at a time
    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  }
  // If we're asking for more than the current hwm, then raise the hwm.
  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  if (n <= state.length) return n;
  // Don't have enough
  if (!state.ended) {
    state.needReadable = true;
    return 0;
  }
  return state.length;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
  debug('read', n);
  n = parseInt(n, 10);
  var state = this._readableState;
  var nOrig = n;

  if (n !== 0) state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
    debug('read: emitReadable', state.length, state.ended);
    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    if (state.length === 0) endReadable(this);
    return null;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;
  debug('need readable', doRead);

  // if we currently have less than the highWaterMark, then also read some
  if (state.length === 0 || state.length - n < state.highWaterMark) {
    doRead = true;
    debug('length less than watermark', doRead);
  }

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading) {
    doRead = false;
    debug('reading or ended', doRead);
  } else if (doRead) {
    debug('do read');
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0) state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
    // If _read pushed data synchronously, then `reading` will be false,
    // and we need to re-evaluate how much data we can return to the user.
    if (!state.reading) n = howMuchToRead(nOrig, state);
  }

  var ret;
  if (n > 0) ret = fromList(n, state);else ret = null;

  if (ret === null) {
    state.needReadable = true;
    n = 0;
  } else {
    state.length -= n;
  }

  if (state.length === 0) {
    // If we have nothing in the buffer, then we want to know
    // as soon as we *do* get something into the buffer.
    if (!state.ended) state.needReadable = true;

    // If we tried to read() past the EOF, then emit end on the next tick.
    if (nOrig !== n && state.ended) endReadable(this);
  }

  if (ret !== null) this.emit('data', ret);

  return ret;
};

function onEofChunk(stream, state) {
  if (state.ended) return;
  if (state.decoder) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // emit 'readable' now to make sure it gets picked up.
  emitReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (!state.emittedReadable) {
    debug('emitReadable', state.flowing);
    state.emittedReadable = true;
    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  }
}

function emitReadable_(stream) {
  debug('emit readable');
  stream.emit('readable');
  flow(stream);
}

// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    pna.nextTick(maybeReadMore_, stream, state);
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
    debug('maybeReadMore read 0');
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;else len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function (n) {
  this.emit('error', new Error('_read() is not implemented'));
};

Readable.prototype.pipe = function (dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;
  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);

  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;

  var endFn = doEnd ? onend : unpipe;
  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable, unpipeInfo) {
    debug('onunpipe');
    if (readable === src) {
      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
        unpipeInfo.hasUnpiped = true;
        cleanup();
      }
    }
  }

  function onend() {
    debug('onend');
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  var cleanedUp = false;
  function cleanup() {
    debug('cleanup');
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', unpipe);
    src.removeListener('data', ondata);

    cleanedUp = true;

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  }

  // If the user pushes more data while we're writing to dest then we'll end up
  // in ondata again. However, we only want to increase awaitDrain once because
  // dest will only emit one 'drain' event for the multiple writes.
  // => Introduce a guard on increasing awaitDrain.
  var increasedAwaitDrain = false;
  src.on('data', ondata);
  function ondata(chunk) {
    debug('ondata');
    increasedAwaitDrain = false;
    var ret = dest.write(chunk);
    if (false === ret && !increasedAwaitDrain) {
      // If the user unpiped during `dest.write()`, it is possible
      // to get stuck in a permanently paused state if that write
      // also returned false.
      // => Check whether `dest` is still a piping destination.
      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
        debug('false write response, pause', src._readableState.awaitDrain);
        src._readableState.awaitDrain++;
        increasedAwaitDrain = true;
      }
      src.pause();
    }
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    debug('onerror', er);
    unpipe();
    dest.removeListener('error', onerror);
    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  }

  // Make sure our error handler is attached before userland ones.
  prependListener(dest, 'error', onerror);

  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    debug('onfinish');
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    debug('unpipe');
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    debug('pipe resume');
    src.resume();
  }

  return dest;
};

function pipeOnDrain(src) {
  return function () {
    var state = src._readableState;
    debug('pipeOnDrain', state.awaitDrain);
    if (state.awaitDrain) state.awaitDrain--;
    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
      state.flowing = true;
      flow(src);
    }
  };
}

Readable.prototype.unpipe = function (dest) {
  var state = this._readableState;
  var unpipeInfo = { hasUnpiped: false };

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0) return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes) return this;

    if (!dest) dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;
    if (dest) dest.emit('unpipe', this, unpipeInfo);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;

    for (var i = 0; i < len; i++) {
      dests[i].emit('unpipe', this, unpipeInfo);
    }return this;
  }

  // try to find the right one.
  var index = indexOf(state.pipes, dest);
  if (index === -1) return this;

  state.pipes.splice(index, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1) state.pipes = state.pipes[0];

  dest.emit('unpipe', this, unpipeInfo);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function (ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  if (ev === 'data') {
    // Start flowing on next tick if stream isn't explicitly paused
    if (this._readableState.flowing !== false) this.resume();
  } else if (ev === 'readable') {
    var state = this._readableState;
    if (!state.endEmitted && !state.readableListening) {
      state.readableListening = state.needReadable = true;
      state.emittedReadable = false;
      if (!state.reading) {
        pna.nextTick(nReadingNextTick, this);
      } else if (state.length) {
        emitReadable(this);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

function nReadingNextTick(self) {
  debug('readable nexttick read 0');
  self.read(0);
}

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function () {
  var state = this._readableState;
  if (!state.flowing) {
    debug('resume');
    state.flowing = true;
    resume(this, state);
  }
  return this;
};

function resume(stream, state) {
  if (!state.resumeScheduled) {
    state.resumeScheduled = true;
    pna.nextTick(resume_, stream, state);
  }
}

function resume_(stream, state) {
  if (!state.reading) {
    debug('resume read 0');
    stream.read(0);
  }

  state.resumeScheduled = false;
  state.awaitDrain = 0;
  stream.emit('resume');
  flow(stream);
  if (state.flowing && !state.reading) stream.read(0);
}

Readable.prototype.pause = function () {
  debug('call pause flowing=%j', this._readableState.flowing);
  if (false !== this._readableState.flowing) {
    debug('pause');
    this._readableState.flowing = false;
    this.emit('pause');
  }
  return this;
};

function flow(stream) {
  var state = stream._readableState;
  debug('flow', state.flowing);
  while (state.flowing && stream.read() !== null) {}
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function (stream) {
  var _this = this;

  var state = this._readableState;
  var paused = false;

  stream.on('end', function () {
    debug('wrapped end');
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length) _this.push(chunk);
    }

    _this.push(null);
  });

  stream.on('data', function (chunk) {
    debug('wrapped data');
    if (state.decoder) chunk = state.decoder.write(chunk);

    // don't skip over falsy values in objectMode
    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;

    var ret = _this.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (this[i] === undefined && typeof stream[i] === 'function') {
      this[i] = function (method) {
        return function () {
          return stream[method].apply(stream, arguments);
        };
      }(i);
    }
  }

  // proxy certain important events.
  for (var n = 0; n < kProxyEvents.length; n++) {
    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  }

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  this._read = function (n) {
    debug('wrapped _read', n);
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return this;
};

Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._readableState.highWaterMark;
  }
});

// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromList(n, state) {
  // nothing buffered
  if (state.length === 0) return null;

  var ret;
  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
    // read it all, truncate the list
    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
    state.buffer.clear();
  } else {
    // read part of list
    ret = fromListPartial(n, state.buffer, state.decoder);
  }

  return ret;
}

// Extracts only enough buffered data to satisfy the amount requested.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromListPartial(n, list, hasStrings) {
  var ret;
  if (n < list.head.data.length) {
    // slice is the same for buffers and strings
    ret = list.head.data.slice(0, n);
    list.head.data = list.head.data.slice(n);
  } else if (n === list.head.data.length) {
    // first chunk is a perfect match
    ret = list.shift();
  } else {
    // result spans more than one buffer
    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  }
  return ret;
}

// Copies a specified amount of characters from the list of buffered data
// chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBufferString(n, list) {
  var p = list.head;
  var c = 1;
  var ret = p.data;
  n -= ret.length;
  while (p = p.next) {
    var str = p.data;
    var nb = n > str.length ? str.length : n;
    if (nb === str.length) ret += str;else ret += str.slice(0, n);
    n -= nb;
    if (n === 0) {
      if (nb === str.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = str.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

// Copies a specified amount of bytes from the list of buffered data chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBuffer(n, list) {
  var ret = Buffer.allocUnsafe(n);
  var p = list.head;
  var c = 1;
  p.data.copy(ret);
  n -= p.data.length;
  while (p = p.next) {
    var buf = p.data;
    var nb = n > buf.length ? buf.length : n;
    buf.copy(ret, ret.length - n, 0, nb);
    n -= nb;
    if (n === 0) {
      if (nb === buf.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = buf.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');

  if (!state.endEmitted) {
    state.ended = true;
    pna.nextTick(endReadableNT, state, stream);
  }
}

function endReadableNT(state, stream) {
  // Check that we didn't get one last unshift.
  if (!state.endEmitted && state.length === 0) {
    state.endEmitted = true;
    stream.readable = false;
    stream.emit('end');
  }
}

function indexOf(xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}

/***/ }),

/***/ 318979:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.



module.exports = Transform;

var Duplex = __webpack_require__(195822);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);

function afterTransform(er, data) {
  var ts = this._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb) {
    return this.emit('error', new Error('write callback called multiple times'));
  }

  ts.writechunk = null;
  ts.writecb = null;

  if (data != null) // single equals check for both `null` and `undefined`
    this.push(data);

  cb(er);

  var rs = this._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    this._read(rs.highWaterMark);
  }
}

function Transform(options) {
  if (!(this instanceof Transform)) return new Transform(options);

  Duplex.call(this, options);

  this._transformState = {
    afterTransform: afterTransform.bind(this),
    needTransform: false,
    transforming: false,
    writecb: null,
    writechunk: null,
    writeencoding: null
  };

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  if (options) {
    if (typeof options.transform === 'function') this._transform = options.transform;

    if (typeof options.flush === 'function') this._flush = options.flush;
  }

  // When the writable side finishes, then flush out anything remaining.
  this.on('prefinish', prefinish);
}

function prefinish() {
  var _this = this;

  if (typeof this._flush === 'function') {
    this._flush(function (er, data) {
      done(_this, er, data);
    });
  } else {
    done(this, null, null);
  }
}

Transform.prototype.push = function (chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
  throw new Error('_transform() is not implemented');
};

Transform.prototype._write = function (chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function (n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};

Transform.prototype._destroy = function (err, cb) {
  var _this2 = this;

  Duplex.prototype._destroy.call(this, err, function (err2) {
    cb(err2);
    _this2.emit('close');
  });
};

function done(stream, er, data) {
  if (er) return stream.emit('error', er);

  if (data != null) // single equals check for both `null` and `undefined`
    stream.push(data);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');

  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');

  return stream.push(null);
}

/***/ }),

/***/ 391849:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Writable;

/* <replacement> */
function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
  this.next = null;
}

// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
  var _this = this;

  this.next = null;
  this.entry = null;
  this.finish = function () {
    onCorkedFinish(_this, state);
  };
}
/* </replacement> */

/*<replacement>*/
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Writable.WritableState = WritableState;

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var internalUtil = {
  deprecate: __webpack_require__(741159)
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(886327);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(878511).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

var destroyImpl = __webpack_require__(945233);

util.inherits(Writable, Stream);

function nop() {}

function WritableState(options, stream) {
  Duplex = Duplex || __webpack_require__(195822);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  var writableHwm = options.writableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // if _final has been called
  this.finalCalled = false;

  // drain event flag.
  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // has it been destroyed
  this.destroyed = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // when true all writes will be buffered until .uncork() call
  this.corked = 0;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function (er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.bufferedRequest = null;
  this.lastBufferedRequest = null;

  // number of pending user-supplied write callbacks
  // this must be 0 before 'finish' can be emitted
  this.pendingcb = 0;

  // emit prefinish if the only thing we're waiting for is _write cbs
  // This is relevant for synchronous Transform streams
  this.prefinished = false;

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;

  // count buffered requests
  this.bufferedRequestCount = 0;

  // allocate the first CorkedRequest, there is always
  // one allocated and free to use, and we maintain at most two
  this.corkedRequestsFree = new CorkedRequest(this);
}

WritableState.prototype.getBuffer = function getBuffer() {
  var current = this.bufferedRequest;
  var out = [];
  while (current) {
    out.push(current);
    current = current.next;
  }
  return out;
};

(function () {
  try {
    Object.defineProperty(WritableState.prototype, 'buffer', {
      get: internalUtil.deprecate(function () {
        return this.getBuffer();
      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
    });
  } catch (_) {}
})();

// Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
var realHasInstance;
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  realHasInstance = Function.prototype[Symbol.hasInstance];
  Object.defineProperty(Writable, Symbol.hasInstance, {
    value: function (object) {
      if (realHasInstance.call(this, object)) return true;
      if (this !== Writable) return false;

      return object && object._writableState instanceof WritableState;
    }
  });
} else {
  realHasInstance = function (object) {
    return object instanceof this;
  };
}

function Writable(options) {
  Duplex = Duplex || __webpack_require__(195822);

  // Writable ctor is applied to Duplexes, too.
  // `realHasInstance` is necessary because using plain `instanceof`
  // would return false, as no `_writableState` property is attached.

  // Trying to use the custom `instanceof` for Writable here will also break the
  // Node.js LazyTransform implementation, which has a non-trivial getter for
  // `_writableState` that would lead to infinite recursion.
  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
    return new Writable(options);
  }

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  if (options) {
    if (typeof options.write === 'function') this._write = options.write;

    if (typeof options.writev === 'function') this._writev = options.writev;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;

    if (typeof options.final === 'function') this._final = options.final;
  }

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
  this.emit('error', new Error('Cannot pipe, not readable'));
};

function writeAfterEnd(stream, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  pna.nextTick(cb, er);
}

// Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  var er = false;

  if (chunk === null) {
    er = new TypeError('May not write null values to stream');
  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  if (er) {
    stream.emit('error', er);
    pna.nextTick(cb, er);
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function (chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;
  var isBuf = !state.objectMode && _isUint8Array(chunk);

  if (isBuf && !Buffer.isBuffer(chunk)) {
    chunk = _uint8ArrayToBuffer(chunk);
  }

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;

  if (typeof cb !== 'function') cb = nop;

  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
    state.pendingcb++;
    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  }

  return ret;
};

Writable.prototype.cork = function () {
  var state = this._writableState;

  state.corked++;
};

Writable.prototype.uncork = function () {
  var state = this._writableState;

  if (state.corked) {
    state.corked--;

    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  }
};

Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  // node::ParseEncoding() requires lower case.
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  this._writableState.defaultEncoding = encoding;
  return this;
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
    chunk = Buffer.from(chunk, encoding);
  }
  return chunk;
}

Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  if (!isBuf) {
    var newChunk = decodeChunk(state, chunk, encoding);
    if (chunk !== newChunk) {
      isBuf = true;
      encoding = 'buffer';
      chunk = newChunk;
    }
  }
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret) state.needDrain = true;

  if (state.writing || state.corked) {
    var last = state.lastBufferedRequest;
    state.lastBufferedRequest = {
      chunk: chunk,
      encoding: encoding,
      isBuf: isBuf,
      callback: cb,
      next: null
    };
    if (last) {
      last.next = state.lastBufferedRequest;
    } else {
      state.bufferedRequest = state.lastBufferedRequest;
    }
    state.bufferedRequestCount += 1;
  } else {
    doWrite(stream, state, false, len, chunk, encoding, cb);
  }

  return ret;
}

function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  --state.pendingcb;

  if (sync) {
    // defer the callback if we are being called synchronously
    // to avoid piling up things on the stack
    pna.nextTick(cb, er);
    // this can emit finish, and it will always happen
    // after error
    pna.nextTick(finishMaybe, stream, state);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
  } else {
    // the caller expect this to happen before if
    // it is async
    cb(er);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
    // this can emit finish, but finish must
    // always follow error
    finishMaybe(stream, state);
  }
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er) onwriteError(stream, state, sync, er, cb);else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(state);

    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
      clearBuffer(stream, state);
    }

    if (sync) {
      /*<replacement>*/
      asyncWrite(afterWrite, stream, state, finished, cb);
      /*</replacement>*/
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished) onwriteDrain(stream, state);
  state.pendingcb--;
  cb();
  finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}

// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;
  var entry = state.bufferedRequest;

  if (stream._writev && entry && entry.next) {
    // Fast case, write everything using _writev()
    var l = state.bufferedRequestCount;
    var buffer = new Array(l);
    var holder = state.corkedRequestsFree;
    holder.entry = entry;

    var count = 0;
    var allBuffers = true;
    while (entry) {
      buffer[count] = entry;
      if (!entry.isBuf) allBuffers = false;
      entry = entry.next;
      count += 1;
    }
    buffer.allBuffers = allBuffers;

    doWrite(stream, state, true, state.length, buffer, '', holder.finish);

    // doWrite is almost always async, defer these to save a bit of time
    // as the hot path ends with doWrite
    state.pendingcb++;
    state.lastBufferedRequest = null;
    if (holder.next) {
      state.corkedRequestsFree = holder.next;
      holder.next = null;
    } else {
      state.corkedRequestsFree = new CorkedRequest(state);
    }
    state.bufferedRequestCount = 0;
  } else {
    // Slow case, write chunks one-by-one
    while (entry) {
      var chunk = entry.chunk;
      var encoding = entry.encoding;
      var cb = entry.callback;
      var len = state.objectMode ? 1 : chunk.length;

      doWrite(stream, state, false, len, chunk, encoding, cb);
      entry = entry.next;
      state.bufferedRequestCount--;
      // if we didn't call the onwrite immediately, then
      // it means that we need to wait until it does.
      // also, that means that the chunk and cb are currently
      // being processed, so move the buffer counter past them.
      if (state.writing) {
        break;
      }
    }

    if (entry === null) state.lastBufferedRequest = null;
  }

  state.bufferedRequest = entry;
  state.bufferProcessing = false;
}

Writable.prototype._write = function (chunk, encoding, cb) {
  cb(new Error('_write() is not implemented'));
};

Writable.prototype._writev = null;

Writable.prototype.end = function (chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);

  // .end() fully uncorks
  if (state.corked) {
    state.corked = 1;
    this.uncork();
  }

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished) endWritable(this, state, cb);
};

function needFinish(state) {
  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}
function callFinal(stream, state) {
  stream._final(function (err) {
    state.pendingcb--;
    if (err) {
      stream.emit('error', err);
    }
    state.prefinished = true;
    stream.emit('prefinish');
    finishMaybe(stream, state);
  });
}
function prefinish(stream, state) {
  if (!state.prefinished && !state.finalCalled) {
    if (typeof stream._final === 'function') {
      state.pendingcb++;
      state.finalCalled = true;
      pna.nextTick(callFinal, stream, state);
    } else {
      state.prefinished = true;
      stream.emit('prefinish');
    }
  }
}

function finishMaybe(stream, state) {
  var need = needFinish(state);
  if (need) {
    prefinish(stream, state);
    if (state.pendingcb === 0) {
      state.finished = true;
      stream.emit('finish');
    }
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  }
  state.ended = true;
  stream.writable = false;
}

function onCorkedFinish(corkReq, state, err) {
  var entry = corkReq.entry;
  corkReq.entry = null;
  while (entry) {
    var cb = entry.callback;
    state.pendingcb--;
    cb(err);
    entry = entry.next;
  }
  if (state.corkedRequestsFree) {
    state.corkedRequestsFree.next = corkReq;
  } else {
    state.corkedRequestsFree = corkReq;
  }
}

Object.defineProperty(Writable.prototype, 'destroyed', {
  get: function () {
    if (this._writableState === undefined) {
      return false;
    }
    return this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._writableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._writableState.destroyed = value;
  }
});

Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;
Writable.prototype._destroy = function (err, cb) {
  this.end();
  cb(err);
};

/***/ }),

/***/ 110176:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Buffer = __webpack_require__(878511).Buffer;
var util = __webpack_require__(431669);

function copyBuffer(src, target, offset) {
  src.copy(target, offset);
}

module.exports = function () {
  function BufferList() {
    _classCallCheck(this, BufferList);

    this.head = null;
    this.tail = null;
    this.length = 0;
  }

  BufferList.prototype.push = function push(v) {
    var entry = { data: v, next: null };
    if (this.length > 0) this.tail.next = entry;else this.head = entry;
    this.tail = entry;
    ++this.length;
  };

  BufferList.prototype.unshift = function unshift(v) {
    var entry = { data: v, next: this.head };
    if (this.length === 0) this.tail = entry;
    this.head = entry;
    ++this.length;
  };

  BufferList.prototype.shift = function shift() {
    if (this.length === 0) return;
    var ret = this.head.data;
    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
    --this.length;
    return ret;
  };

  BufferList.prototype.clear = function clear() {
    this.head = this.tail = null;
    this.length = 0;
  };

  BufferList.prototype.join = function join(s) {
    if (this.length === 0) return '';
    var p = this.head;
    var ret = '' + p.data;
    while (p = p.next) {
      ret += s + p.data;
    }return ret;
  };

  BufferList.prototype.concat = function concat(n) {
    if (this.length === 0) return Buffer.alloc(0);
    if (this.length === 1) return this.head.data;
    var ret = Buffer.allocUnsafe(n >>> 0);
    var p = this.head;
    var i = 0;
    while (p) {
      copyBuffer(p.data, ret, i);
      i += p.data.length;
      p = p.next;
    }
    return ret;
  };

  return BufferList;
}();

if (util && util.inspect && util.inspect.custom) {
  module.exports.prototype[util.inspect.custom] = function () {
    var obj = util.inspect({ length: this.length });
    return this.constructor.name + ' ' + obj;
  };
}

/***/ }),

/***/ 945233:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
  var _this = this;

  var readableDestroyed = this._readableState && this._readableState.destroyed;
  var writableDestroyed = this._writableState && this._writableState.destroyed;

  if (readableDestroyed || writableDestroyed) {
    if (cb) {
      cb(err);
    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
      pna.nextTick(emitErrorNT, this, err);
    }
    return this;
  }

  // we set destroyed to true before firing error callbacks in order
  // to make it re-entrance safe in case destroy() is called within callbacks

  if (this._readableState) {
    this._readableState.destroyed = true;
  }

  // if this is a duplex stream mark the writable part as destroyed as well
  if (this._writableState) {
    this._writableState.destroyed = true;
  }

  this._destroy(err || null, function (err) {
    if (!cb && err) {
      pna.nextTick(emitErrorNT, _this, err);
      if (_this._writableState) {
        _this._writableState.errorEmitted = true;
      }
    } else if (cb) {
      cb(err);
    }
  });

  return this;
}

function undestroy() {
  if (this._readableState) {
    this._readableState.destroyed = false;
    this._readableState.reading = false;
    this._readableState.ended = false;
    this._readableState.endEmitted = false;
  }

  if (this._writableState) {
    this._writableState.destroyed = false;
    this._writableState.ended = false;
    this._writableState.ending = false;
    this._writableState.finished = false;
    this._writableState.errorEmitted = false;
  }
}

function emitErrorNT(self, err) {
  self.emit('error', err);
}

module.exports = {
  destroy: destroy,
  undestroy: undestroy
};

/***/ }),

/***/ 886327:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(92413);


/***/ }),

/***/ 878511:
/***/ ((module, exports, __webpack_require__) => {

/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__(764293)
var Buffer = buffer.Buffer

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key]
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports)
  exports.Buffer = SafeBuffer
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
}

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size)
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding)
    } else {
      buf.fill(fill)
    }
  } else {
    buf.fill(0)
  }
  return buf
}

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
}

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
}


/***/ }),

/***/ 982535:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413);
if (process.env.READABLE_STREAM === 'disable' && Stream) {
  module.exports = Stream;
  exports = module.exports = Stream.Readable;
  exports.Readable = Stream.Readable;
  exports.Writable = Stream.Writable;
  exports.Duplex = Stream.Duplex;
  exports.Transform = Stream.Transform;
  exports.PassThrough = Stream.PassThrough;
  exports.Stream = Stream;
} else {
  exports = module.exports = __webpack_require__(654939);
  exports.Stream = Stream || exports;
  exports.Readable = exports;
  exports.Writable = __webpack_require__(391849);
  exports.Duplex = __webpack_require__(195822);
  exports.Transform = __webpack_require__(318979);
  exports.PassThrough = __webpack_require__(794335);
}


/***/ }),

/***/ 408442:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var Buffer = __webpack_require__(998357).Buffer;
/*</replacement>*/

var isEncoding = Buffer.isEncoding || function (encoding) {
  encoding = '' + encoding;
  switch (encoding && encoding.toLowerCase()) {
    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
      return true;
    default:
      return false;
  }
};

function _normalizeEncoding(enc) {
  if (!enc) return 'utf8';
  var retried;
  while (true) {
    switch (enc) {
      case 'utf8':
      case 'utf-8':
        return 'utf8';
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return 'utf16le';
      case 'latin1':
      case 'binary':
        return 'latin1';
      case 'base64':
      case 'ascii':
      case 'hex':
        return enc;
      default:
        if (retried) return; // undefined
        enc = ('' + enc).toLowerCase();
        retried = true;
    }
  }
};

// Do not cache `Buffer.isEncoding` when checking encoding names as some
// modules monkey-patch it to support additional encodings
function normalizeEncoding(enc) {
  var nenc = _normalizeEncoding(enc);
  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  return nenc || enc;
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters.
exports.s = StringDecoder;
function StringDecoder(encoding) {
  this.encoding = normalizeEncoding(encoding);
  var nb;
  switch (this.encoding) {
    case 'utf16le':
      this.text = utf16Text;
      this.end = utf16End;
      nb = 4;
      break;
    case 'utf8':
      this.fillLast = utf8FillLast;
      nb = 4;
      break;
    case 'base64':
      this.text = base64Text;
      this.end = base64End;
      nb = 3;
      break;
    default:
      this.write = simpleWrite;
      this.end = simpleEnd;
      return;
  }
  this.lastNeed = 0;
  this.lastTotal = 0;
  this.lastChar = Buffer.allocUnsafe(nb);
}

StringDecoder.prototype.write = function (buf) {
  if (buf.length === 0) return '';
  var r;
  var i;
  if (this.lastNeed) {
    r = this.fillLast(buf);
    if (r === undefined) return '';
    i = this.lastNeed;
    this.lastNeed = 0;
  } else {
    i = 0;
  }
  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  return r || '';
};

StringDecoder.prototype.end = utf8End;

// Returns only complete characters in a Buffer
StringDecoder.prototype.text = utf8Text;

// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
StringDecoder.prototype.fillLast = function (buf) {
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  this.lastNeed -= buf.length;
};

// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
// continuation byte. If an invalid byte is detected, -2 is returned.
function utf8CheckByte(byte) {
  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  return byte >> 6 === 0x02 ? -1 : -2;
}

// Checks at most 3 bytes at the end of a Buffer in order to detect an
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
// needed to complete the UTF-8 character (if applicable) are returned.
function utf8CheckIncomplete(self, buf, i) {
  var j = buf.length - 1;
  if (j < i) return 0;
  var nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 1;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 2;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) {
      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
    }
    return nb;
  }
  return 0;
}

// Validates as many continuation bytes for a multi-byte UTF-8 character as
// needed or are available. If we see a non-continuation byte where we expect
// one, we "replace" the validated continuation bytes we've seen so far with
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
// behavior. The continuation byte check is included three times in the case
// where all of the continuation bytes for a character exist in the same buffer.
// It is also done this way as a slight performance increase instead of using a
// loop.
function utf8CheckExtraBytes(self, buf, p) {
  if ((buf[0] & 0xC0) !== 0x80) {
    self.lastNeed = 0;
    return '\ufffd';
  }
  if (self.lastNeed > 1 && buf.length > 1) {
    if ((buf[1] & 0xC0) !== 0x80) {
      self.lastNeed = 1;
      return '\ufffd';
    }
    if (self.lastNeed > 2 && buf.length > 2) {
      if ((buf[2] & 0xC0) !== 0x80) {
        self.lastNeed = 2;
        return '\ufffd';
      }
    }
  }
}

// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
function utf8FillLast(buf) {
  var p = this.lastTotal - this.lastNeed;
  var r = utf8CheckExtraBytes(this, buf, p);
  if (r !== undefined) return r;
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, p, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, p, 0, buf.length);
  this.lastNeed -= buf.length;
}

// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
// partial character, the character's bytes are buffered until the required
// number of bytes are available.
function utf8Text(buf, i) {
  var total = utf8CheckIncomplete(this, buf, i);
  if (!this.lastNeed) return buf.toString('utf8', i);
  this.lastTotal = total;
  var end = buf.length - (total - this.lastNeed);
  buf.copy(this.lastChar, 0, end);
  return buf.toString('utf8', i, end);
}

// For UTF-8, a replacement character is added when ending on a partial
// character.
function utf8End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + '\ufffd';
  return r;
}

// UTF-16LE typically needs two bytes per character, but even if we have an even
// number of bytes available, we need to check if we end on a leading/high
// surrogate. In that case, we need to wait for the next two bytes in order to
// decode the last character properly.
function utf16Text(buf, i) {
  if ((buf.length - i) % 2 === 0) {
    var r = buf.toString('utf16le', i);
    if (r) {
      var c = r.charCodeAt(r.length - 1);
      if (c >= 0xD800 && c <= 0xDBFF) {
        this.lastNeed = 2;
        this.lastTotal = 4;
        this.lastChar[0] = buf[buf.length - 2];
        this.lastChar[1] = buf[buf.length - 1];
        return r.slice(0, -1);
      }
    }
    return r;
  }
  this.lastNeed = 1;
  this.lastTotal = 2;
  this.lastChar[0] = buf[buf.length - 1];
  return buf.toString('utf16le', i, buf.length - 1);
}

// For UTF-16LE we do not explicitly append special replacement characters if we
// end on a partial character, we simply let v8 handle that.
function utf16End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) {
    var end = this.lastTotal - this.lastNeed;
    return r + this.lastChar.toString('utf16le', 0, end);
  }
  return r;
}

function base64Text(buf, i) {
  var n = (buf.length - i) % 3;
  if (n === 0) return buf.toString('base64', i);
  this.lastNeed = 3 - n;
  this.lastTotal = 3;
  if (n === 1) {
    this.lastChar[0] = buf[buf.length - 1];
  } else {
    this.lastChar[0] = buf[buf.length - 2];
    this.lastChar[1] = buf[buf.length - 1];
  }
  return buf.toString('base64', i, buf.length - n);
}

function base64End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  return r;
}

// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) {
  return buf.toString(this.encoding);
}

function simpleEnd(buf) {
  return buf && buf.length ? this.write(buf) : '';
}

/***/ }),

/***/ 998357:
/***/ ((module, exports, __webpack_require__) => {

/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__(764293)
var Buffer = buffer.Buffer

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key]
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports)
  exports.Buffer = SafeBuffer
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
}

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size)
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding)
    } else {
      buf.fill(fill)
    }
  } else {
    buf.fill(0)
  }
  return buf
}

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
}

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
}


/***/ }),

/***/ 223504:
/***/ ((module) => {

module.exports = hasKeys

function hasKeys(source) {
    return source !== null &&
        (typeof source === "object" ||
        typeof source === "function")
}


/***/ }),

/***/ 186754:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Keys = __webpack_require__(584908)
var hasKeys = __webpack_require__(223504)

module.exports = extend

function extend() {
    var target = {}

    for (var i = 0; i < arguments.length; i++) {
        var source = arguments[i]

        if (!hasKeys(source)) {
            continue
        }

        var keys = Keys(source)

        for (var j = 0; j < keys.length; j++) {
            var name = keys[j]
            target[name] = source[name]
        }
    }

    return target
}


/***/ }),

/***/ 564403:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(627339);
var buffer_1 = __webpack_require__(764293);
var transaction_1 = __webpack_require__(994857);
/**
 * Creates a new transaction object that doesn't need to be signed.
 *
 * @param data - A transaction can be initialized with its rlp representation, an array containing
 * the value of its fields in order, or an object containing them by name.
 *
 * @param opts - The transaction's options, used to indicate the chain and hardfork the
 * transactions belongs to.
 *
 * @see Transaction
 */
var FakeTransaction = /** @class */ (function (_super) {
    __extends(FakeTransaction, _super);
    function FakeTransaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        var _this = _super.call(this, data, opts) || this;
        Object.defineProperty(_this, 'from', {
            enumerable: true,
            configurable: true,
            get: function () { return _this.getSenderAddress(); },
            set: function (val) {
                if (val) {
                    _this._from = ethereumjs_util_1.toBuffer(val);
                }
            },
        });
        var txData = data;
        if (txData.from) {
            _this.from = ethereumjs_util_1.toBuffer(txData.from);
        }
        return _this;
    }
    /**
     * Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake
     * signature.
     *
     * @param includeSignature - Whether or not to include the signature
     */
    FakeTransaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        if (includeSignature && this._from && this._from.toString('hex') !== '') {
            // include a fake signature using the from address as a private key
            var fakeKey = buffer_1.Buffer.concat([this._from, this._from.slice(0, 12)]);
            this.sign(fakeKey);
        }
        return _super.prototype.hash.call(this, includeSignature);
    };
    return FakeTransaction;
}(transaction_1.default));
exports.default = FakeTransaction;
//# sourceMappingURL=fake.js.map

/***/ }),

/***/ 644914:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
var __webpack_unused_export__;

__webpack_unused_export__ = ({ value: true });
var transaction_1 = __webpack_require__(994857);
exports.YW = transaction_1.default;
var fake_1 = __webpack_require__(564403);
exports.Oq = fake_1.default;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 994857:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(627339);
var ethereumjs_common_1 = __webpack_require__(265982);
var buffer_1 = __webpack_require__(764293);
// secp256k1n/2
var N_DIV_2 = new ethereumjs_util_1.BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
/**
 * An Ethereum transaction.
 */
var Transaction = /** @class */ (function () {
    /**
     * Creates a new transaction from an object with its fields' values.
     *
     * @param data - A transaction can be initialized with its rlp representation, an array containing
     * the value of its fields in order, or an object containing them by name.
     *
     * @param opts - The transaction's options, used to indicate the chain and hardfork the
     * transactions belongs to.
     *
     * @note Transaction objects implement EIP155 by default. To disable it, use the constructor's
     * second parameter to set a chain and hardfork before EIP155 activation (i.e. before Spurious
     * Dragon.)
     *
     * @example
     * ```js
     * const txData = {
     *   nonce: '0x00',
     *   gasPrice: '0x09184e72a000',
     *   gasLimit: '0x2710',
     *   to: '0x0000000000000000000000000000000000000000',
     *   value: '0x00',
     *   data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
     *   v: '0x1c',
     *   r: '0x5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
     *   s: '0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13'
     * };
     * const tx = new Transaction(txData);
     * ```
     */
    function Transaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        // instantiate Common class instance based on passed options
        if (opts.common) {
            if (opts.chain || opts.hardfork) {
                throw new Error('Instantiation with both opts.common, and opts.chain and opts.hardfork parameter not allowed!');
            }
            this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : 'petersburg';
            this._common = new ethereumjs_common_1.default(chain, hardfork);
        }
        // Define Properties
        var fields = [
            {
                name: 'nonce',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasPrice',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasLimit',
                alias: 'gas',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'to',
                allowZero: true,
                length: 20,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'value',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'data',
                alias: 'input',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'v',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'r',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 's',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
        ];
        // attached serialize
        ethereumjs_util_1.defineProperties(this, fields, data);
        /**
         * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters.
         * @name from
         * @memberof Transaction
         */
        Object.defineProperty(this, 'from', {
            enumerable: true,
            configurable: true,
            get: this.getSenderAddress.bind(this),
        });
        this._validateV(this.v);
        this._overrideVSetterWithValidation();
    }
    /**
     * If the tx's `to` is to the creation address
     */
    Transaction.prototype.toCreationAddress = function () {
        return this.to.toString('hex') === '';
    };
    /**
     * Computes a sha3-256 hash of the serialized tx
     * @param includeSignature - Whether or not to include the signature
     */
    Transaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        var items;
        if (includeSignature) {
            items = this.raw;
        }
        else {
            if (this._implementsEIP155()) {
                items = this.raw.slice(0, 6).concat([
                    ethereumjs_util_1.toBuffer(this.getChainId()),
                    // TODO: stripping zeros should probably be a responsibility of the rlp module
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                ]);
            }
            else {
                items = this.raw.slice(0, 6);
            }
        }
        // create hash
        return ethereumjs_util_1.rlphash(items);
    };
    /**
     * returns chain ID
     */
    Transaction.prototype.getChainId = function () {
        return this._common.chainId();
    };
    /**
     * returns the sender's address
     */
    Transaction.prototype.getSenderAddress = function () {
        if (this._from) {
            return this._from;
        }
        var pubkey = this.getSenderPublicKey();
        this._from = ethereumjs_util_1.publicToAddress(pubkey);
        return this._from;
    };
    /**
     * returns the public key of the sender
     */
    Transaction.prototype.getSenderPublicKey = function () {
        if (!this.verifySignature()) {
            throw new Error('Invalid Signature');
        }
        // If the signature was verified successfully the _senderPubKey field is defined
        return this._senderPubKey;
    };
    /**
     * Determines if the signature is valid
     */
    Transaction.prototype.verifySignature = function () {
        var msgHash = this.hash(false);
        // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
        if (this._common.gteHardfork('homestead') && new ethereumjs_util_1.BN(this.s).cmp(N_DIV_2) === 1) {
            return false;
        }
        try {
            var v = ethereumjs_util_1.bufferToInt(this.v);
            var useChainIdWhileRecoveringPubKey = v >= this.getChainId() * 2 + 35 && this._common.gteHardfork('spuriousDragon');
            this._senderPubKey = ethereumjs_util_1.ecrecover(msgHash, v, this.r, this.s, useChainIdWhileRecoveringPubKey ? this.getChainId() : undefined);
        }
        catch (e) {
            return false;
        }
        return !!this._senderPubKey;
    };
    /**
     * sign a transaction with a given private key
     * @param privateKey - Must be 32 bytes in length
     */
    Transaction.prototype.sign = function (privateKey) {
        // We clear any previous signature before signing it. Otherwise, _implementsEIP155's can give
        // different results if this tx was already signed.
        this.v = new buffer_1.Buffer([]);
        this.s = new buffer_1.Buffer([]);
        this.r = new buffer_1.Buffer([]);
        var msgHash = this.hash(false);
        var sig = ethereumjs_util_1.ecsign(msgHash, privateKey);
        if (this._implementsEIP155()) {
            sig.v += this.getChainId() * 2 + 8;
        }
        Object.assign(this, sig);
    };
    /**
     * The amount of gas paid for the data in this tx
     */
    Transaction.prototype.getDataFee = function () {
        var data = this.raw[5];
        var cost = new ethereumjs_util_1.BN(0);
        for (var i = 0; i < data.length; i++) {
            data[i] === 0
                ? cost.iaddn(this._common.param('gasPrices', 'txDataZero'))
                : cost.iaddn(this._common.param('gasPrices', 'txDataNonZero'));
        }
        return cost;
    };
    /**
     * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)
     */
    Transaction.prototype.getBaseFee = function () {
        var fee = this.getDataFee().iaddn(this._common.param('gasPrices', 'tx'));
        if (this._common.gteHardfork('homestead') && this.toCreationAddress()) {
            fee.iaddn(this._common.param('gasPrices', 'txCreation'));
        }
        return fee;
    };
    /**
     * the up front amount that an account must have for this transaction to be valid
     */
    Transaction.prototype.getUpfrontCost = function () {
        return new ethereumjs_util_1.BN(this.gasLimit).imul(new ethereumjs_util_1.BN(this.gasPrice)).iadd(new ethereumjs_util_1.BN(this.value));
    };
    Transaction.prototype.validate = function (stringError) {
        if (stringError === void 0) { stringError = false; }
        var errors = [];
        if (!this.verifySignature()) {
            errors.push('Invalid Signature');
        }
        if (this.getBaseFee().cmp(new ethereumjs_util_1.BN(this.gasLimit)) > 0) {
            errors.push(["gas limit is too low. Need at least " + this.getBaseFee()]);
        }
        if (stringError === false) {
            return errors.length === 0;
        }
        else {
            return errors.join(' ');
        }
    };
    /**
     * Returns the rlp encoding of the transaction
     */
    Transaction.prototype.serialize = function () {
        // Note: This never gets executed, defineProperties overwrites it.
        return ethereumjs_util_1.rlp.encode(this.raw);
    };
    /**
     * Returns the transaction in JSON format
     * @see {@link https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md#defineproperties|ethereumjs-util}
     */
    Transaction.prototype.toJSON = function (labels) {
        if (labels === void 0) { labels = false; }
        // Note: This never gets executed, defineProperties overwrites it.
        return {};
    };
    Transaction.prototype._validateV = function (v) {
        if (v === undefined || v.length === 0) {
            return;
        }
        if (!this._common.gteHardfork('spuriousDragon')) {
            return;
        }
        var vInt = ethereumjs_util_1.bufferToInt(v);
        if (vInt === 27 || vInt === 28) {
            return;
        }
        var isValidEIP155V = vInt === this.getChainId() * 2 + 35 || vInt === this.getChainId() * 2 + 36;
        if (!isValidEIP155V) {
            throw new Error("Incompatible EIP155-based V " + vInt + " and chain id " + this.getChainId() + ". See the second parameter of the Transaction constructor to set the chain id.");
        }
    };
    Transaction.prototype._isSigned = function () {
        return this.v.length > 0 && this.r.length > 0 && this.s.length > 0;
    };
    Transaction.prototype._overrideVSetterWithValidation = function () {
        var _this = this;
        var vDescriptor = Object.getOwnPropertyDescriptor(this, 'v');
        Object.defineProperty(this, 'v', __assign({}, vDescriptor, { set: function (v) {
                if (v !== undefined) {
                    _this._validateV(ethereumjs_util_1.toBuffer(v));
                }
                vDescriptor.set(v);
            } }));
    };
    Transaction.prototype._implementsEIP155 = function () {
        var onEIP155BlockOrLater = this._common.gteHardfork('spuriousDragon');
        if (!this._isSigned()) {
            // We sign with EIP155 all unsigned transactions after spuriousDragon
            return onEIP155BlockOrLater;
        }
        // EIP155 spec:
        // If block.number >= 2,675,000 and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing
        // the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six
        // elements (i.e. nonce, gasprice, startgas, to, value, data), hash nine elements, with v replaced by
        // CHAIN_ID, r = 0 and s = 0.
        var v = ethereumjs_util_1.bufferToInt(this.v);
        var vAndChainIdMeetEIP155Conditions = v === this.getChainId() * 2 + 35 || v === this.getChainId() * 2 + 36;
        return vAndChainIdMeetEIP155Conditions && onEIP155BlockOrLater;
    };
    return Transaction;
}());
exports.default = Transaction;
//# sourceMappingURL=transaction.js.map

/***/ }),

/***/ 97017:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(135906);
var hash_1 = __webpack_require__(166554);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 135906:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 995310:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 166554:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(746681);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(135906);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 627339:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(995310));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(97017));
/**
 * Hash functions
 */
__export(__webpack_require__(166554));
/**
 * ECDSA signature
 */
__export(__webpack_require__(499733));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(135906));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(147756));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 147756:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(135906);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 499733:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(135906);
var hash_1 = __webpack_require__(166554);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 52375:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(897078)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 746681:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(52375)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(269832)
}


/***/ }),

/***/ 269832:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(897078)(__webpack_require__(813111))


/***/ }),

/***/ 897078:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(271985)
const createShake = __webpack_require__(655992)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 271985:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 655992:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 930563:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 813111:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(930563)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 686670:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.importPublic = exports.privateToPublic = exports.privateToAddress = exports.publicToAddress = exports.pubToAddress = exports.isValidPublic = exports.isValidPrivate = exports.isPrecompiled = exports.generateAddress2 = exports.generateAddress = exports.isValidChecksumAddress = exports.toChecksumAddress = exports.isZeroAddress = exports.isValidAddress = exports.zeroAddress = void 0;
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(704393);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(456834);
var hash_1 = __webpack_require__(742613);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 456834:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.baToJSON = exports.addHexPrefix = exports.toUnsigned = exports.fromSigned = exports.bufferToHex = exports.bufferToInt = exports.toBuffer = exports.stripZeros = exports.unpad = exports.setLengthRight = exports.setLength = exports.setLengthLeft = exports.zeros = void 0;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 80381:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.KECCAK256_RLP = exports.KECCAK256_RLP_S = exports.KECCAK256_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY_S = exports.KECCAK256_NULL = exports.KECCAK256_NULL_S = exports.TWO_POW256 = exports.MAX_INTEGER = void 0;
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 742613:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.rlphash = exports.ripemd160 = exports.sha256 = exports.keccak256 = exports.keccak = void 0;
var _a = __webpack_require__(682192), keccak224 = _a.keccak224, keccak384 = _a.keccak384, k256 = _a.keccak256, keccak512 = _a.keccak512;
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(456834);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    switch (bits) {
        case 224: {
            return keccak224(a);
        }
        case 256: {
            return k256(a);
        }
        case 384: {
            return keccak384(a);
        }
        case 512: {
            return keccak512(a);
        }
        default: {
            throw new Error("Invald algorithm: keccak" + bits);
        }
    }
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 791996:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.secp256k1 = exports.rlp = exports.BN = void 0;
var secp256k1 = __webpack_require__(704393);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__exportStar(__webpack_require__(80381), exports);
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__exportStar(__webpack_require__(686670), exports);
/**
 * Hash functions
 */
__exportStar(__webpack_require__(742613), exports);
/**
 * ECDSA signature
 */
__exportStar(__webpack_require__(599885), exports);
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__exportStar(__webpack_require__(456834), exports);
/**
 * Function for definining properties on an object
 */
__exportStar(__webpack_require__(614388), exports);
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 614388:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.defineProperties = void 0;
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(456834);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 704393:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ecdhUnsafe = exports.ecdh = exports.recover = exports.verify = exports.sign = exports.signatureImportLax = exports.signatureImport = exports.signatureExport = exports.signatureNormalize = exports.publicKeyCombine = exports.publicKeyTweakMul = exports.publicKeyTweakAdd = exports.publicKeyVerify = exports.publicKeyConvert = exports.publicKeyCreate = exports.privateKeyTweakMul = exports.privateKeyTweakAdd = exports.privateKeyModInverse = exports.privateKeyNegate = exports.privateKeyImport = exports.privateKeyExport = exports.privateKeyVerify = void 0;
var secp256k1 = __webpack_require__(795053);
var secp256k1v3 = __webpack_require__(864043);
var der = __webpack_require__(939480);
/**
 * Verify an ECDSA privateKey
 * @method privateKeyVerify
 * @param {Buffer} privateKey
 * @return {boolean}
 */
exports.privateKeyVerify = function (privateKey) {
    // secp256k1 v4 version throws when privateKey length is not 32
    if (privateKey.length !== 32) {
        return false;
    }
    return secp256k1.privateKeyVerify(Uint8Array.from(privateKey));
};
/**
 * Export a privateKey in DER format
 * @method privateKeyExport
 * @param {Buffer} privateKey
 * @param {boolean} compressed
 * @return {boolean}
 */
exports.privateKeyExport = function (privateKey, compressed) {
    // secp256k1 v4 version throws when privateKey length is not 32
    if (privateKey.length !== 32) {
        throw new RangeError('private key length is invalid');
    }
    var publicKey = secp256k1v3.privateKeyExport(privateKey, compressed);
    return der.privateKeyExport(privateKey, publicKey, compressed);
};
/**
 * Import a privateKey in DER format
 * @method privateKeyImport
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
exports.privateKeyImport = function (privateKey) {
    // privateKeyImport method is not part of secp256k1 v4 package
    // this implementation is based on v3
    privateKey = der.privateKeyImport(privateKey);
    if (privateKey !== null && privateKey.length === 32 && exports.privateKeyVerify(privateKey)) {
        return privateKey;
    }
    throw new Error("couldn't import from DER format");
};
/**
 * Negate a privateKey by subtracting it from the order of the curve's base point
 * @method privateKeyNegate
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
exports.privateKeyNegate = function (privateKey) {
    return Buffer.from(secp256k1.privateKeyNegate(Uint8Array.from(privateKey)));
};
/**
 * Compute the inverse of a privateKey (modulo the order of the curve's base point).
 * @method privateKeyModInverse
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
exports.privateKeyModInverse = function (privateKey) {
    if (privateKey.length !== 32) {
        throw new Error('private key length is invalid');
    }
    return Buffer.from(secp256k1v3.privateKeyModInverse(Uint8Array.from(privateKey)));
};
/**
 * Tweak a privateKey by adding tweak to it.
 * @method privateKeyTweakAdd
 * @param {Buffer} privateKey
 * @param {Buffer} tweak
 * @return {Buffer}
 */
exports.privateKeyTweakAdd = function (privateKey, tweak) {
    return Buffer.from(secp256k1.privateKeyTweakAdd(Uint8Array.from(privateKey), tweak));
};
/**
 * Tweak a privateKey by multiplying it by a tweak.
 * @method privateKeyTweakMul
 * @param {Buffer} privateKey
 * @param {Buffer} tweak
 * @return {Buffer}
 */
exports.privateKeyTweakMul = function (privateKey, tweak) {
    return Buffer.from(secp256k1.privateKeyTweakMul(Uint8Array.from(privateKey), Uint8Array.from(tweak)));
};
/**
 * Compute the public key for a privateKey.
 * @method publicKeyCreate
 * @param {Buffer} privateKey
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.publicKeyCreate = function (privateKey, compressed) {
    return Buffer.from(secp256k1.publicKeyCreate(Uint8Array.from(privateKey), compressed));
};
/**
 * Convert a publicKey to compressed or uncompressed form.
 * @method publicKeyConvert
 * @param {Buffer} publicKey
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.publicKeyConvert = function (publicKey, compressed) {
    return Buffer.from(secp256k1.publicKeyConvert(Uint8Array.from(publicKey), compressed));
};
/**
 * Verify an ECDSA publicKey.
 * @method publicKeyVerify
 * @param {Buffer} publicKey
 * @return {boolean}
 */
exports.publicKeyVerify = function (publicKey) {
    // secp256k1 v4 version throws when publicKey length is not 33 or 65
    if (publicKey.length !== 33 && publicKey.length !== 65) {
        return false;
    }
    return secp256k1.publicKeyVerify(Uint8Array.from(publicKey));
};
/**
 * Tweak a publicKey by adding tweak times the generator to it.
 * @method publicKeyTweakAdd
 * @param {Buffer} publicKey
 * @param {Buffer} tweak
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.publicKeyTweakAdd = function (publicKey, tweak, compressed) {
    return Buffer.from(secp256k1.publicKeyTweakAdd(Uint8Array.from(publicKey), Uint8Array.from(tweak), compressed));
};
/**
 * Tweak a publicKey by multiplying it by a tweak value
 * @method publicKeyTweakMul
 * @param {Buffer} publicKey
 * @param {Buffer} tweak
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.publicKeyTweakMul = function (publicKey, tweak, compressed) {
    return Buffer.from(secp256k1.publicKeyTweakMul(Uint8Array.from(publicKey), Uint8Array.from(tweak), compressed));
};
/**
 * Add a given publicKeys together.
 * @method publicKeyCombine
 * @param {Array<Buffer>} publicKeys
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.publicKeyCombine = function (publicKeys, compressed) {
    var keys = [];
    publicKeys.forEach(function (publicKey) {
        keys.push(Uint8Array.from(publicKey));
    });
    return Buffer.from(secp256k1.publicKeyCombine(keys, compressed));
};
/**
 * Convert a signature to a normalized lower-S form.
 * @method signatureNormalize
 * @param {Buffer} signature
 * @return {Buffer}
 */
exports.signatureNormalize = function (signature) {
    return Buffer.from(secp256k1.signatureNormalize(Uint8Array.from(signature)));
};
/**
 * Serialize an ECDSA signature in DER format.
 * @method signatureExport
 * @param {Buffer} signature
 * @return {Buffer}
 */
exports.signatureExport = function (signature) {
    return Buffer.from(secp256k1.signatureExport(Uint8Array.from(signature)));
};
/**
 * Parse a DER ECDSA signature (follow by [BIP66](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki)).
 * @method signatureImport
 * @param {Buffer} signature
 * @return {Buffer}
 */
exports.signatureImport = function (signature) {
    return Buffer.from(secp256k1.signatureImport(Uint8Array.from(signature)));
};
/**
 * Parse a DER ECDSA signature (not follow by [BIP66](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki)).
 * @method signatureImportLax
 * @param {Buffer} signature
 * @return {Buffer}
 */
exports.signatureImportLax = function (signature) {
    // signatureImportLax method is not part of secp256k1 v4 package
    // this implementation is based on v3
    // ensure that signature is greater than 0
    if (signature.length === 0) {
        throw new RangeError('signature length is invalid');
    }
    var sigObj = der.signatureImportLax(signature);
    if (sigObj === null) {
        throw new Error("couldn't parse DER signature");
    }
    return secp256k1v3.signatureImport(sigObj);
};
/**
 * Create an ECDSA signature. Always return low-S signature.
 * @method sign
 * @param {Buffer} message
 * @param {Buffer} privateKey
 * @param {Object} options
 * @return {Buffer}
 */
exports.sign = function (message, privateKey, options) {
    if (options === null) {
        throw new TypeError('options should be an Object');
    }
    var signOptions = undefined;
    if (options) {
        signOptions = {};
        if (options.data === null) {
            // validate option.data length
            throw new TypeError('options.data should be a Buffer');
        }
        if (options.data) {
            if (options.data.length != 32) {
                throw new RangeError('options.data length is invalid');
            }
            signOptions.data = new Uint8Array(options.data);
        }
        if (options.noncefn === null) {
            throw new TypeError('options.noncefn should be a Function');
        }
        if (options.noncefn) {
            // convert option.noncefn function signature
            signOptions.noncefn = function (message, privateKey, algo, data, attempt) {
                var bufferAlgo = algo != null ? Buffer.from(algo) : null;
                var bufferData = data != null ? Buffer.from(data) : null;
                var buffer = Buffer.from('');
                if (options.noncefn) {
                    buffer = options.noncefn(Buffer.from(message), Buffer.from(privateKey), bufferAlgo, bufferData, attempt);
                }
                return new Uint8Array(buffer);
            };
        }
    }
    var sig = secp256k1.ecdsaSign(Uint8Array.from(message), Uint8Array.from(privateKey), signOptions);
    return {
        signature: Buffer.from(sig.signature),
        recovery: sig.recid,
    };
};
/**
 * Verify an ECDSA signature.
 * @method verify
 * @param {Buffer} message
 * @param {Buffer} signature
 * @param {Buffer} publicKey
 * @return {boolean}
 */
exports.verify = function (message, signature, publicKey) {
    return secp256k1.ecdsaVerify(Uint8Array.from(signature), Uint8Array.from(message), publicKey);
};
/**
 * Recover an ECDSA public key from a signature.
 * @method recover
 * @param {Buffer} message
 * @param {Buffer} signature
 * @param {Number} recid
 * @param {boolean} compressed
 * @return {Buffer}
 */
exports.recover = function (message, signature, recid, compressed) {
    return Buffer.from(secp256k1.ecdsaRecover(Uint8Array.from(signature), recid, Uint8Array.from(message), compressed));
};
/**
 * Compute an EC Diffie-Hellman secret and applied sha256 to compressed public key.
 * @method ecdh
 * @param {Buffer} publicKey
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
exports.ecdh = function (publicKey, privateKey) {
    // note: secp256k1 v3 doesn't allow optional parameter
    return Buffer.from(secp256k1.ecdh(Uint8Array.from(publicKey), Uint8Array.from(privateKey), {}));
};
exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
    // ecdhUnsafe method is not part of secp256k1 v4 package
    // this implementation is based on v3
    // ensure valid publicKey length
    if (publicKey.length !== 33 && publicKey.length !== 65) {
        throw new RangeError('public key length is invalid');
    }
    // ensure valid privateKey length
    if (privateKey.length !== 32) {
        throw new RangeError('private key length is invalid');
    }
    return Buffer.from(secp256k1v3.ecdhUnsafe(Uint8Array.from(publicKey), Uint8Array.from(privateKey), compressed));
};
//# sourceMappingURL=secp256k1v3-adapter.js.map

/***/ }),

/***/ 939480:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// This file is imported from secp256k1 v3
// https://github.com/cryptocoinjs/secp256k1-node/blob/master/LICENSE
Object.defineProperty(exports, "__esModule", ({ value: true }));
var EC_PRIVKEY_EXPORT_DER_COMPRESSED = Buffer.from([
    // begin
    0x30,
    0x81,
    0xd3,
    0x02,
    0x01,
    0x01,
    0x04,
    0x20,
    // private key
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    // middle
    0xa0,
    0x81,
    0x85,
    0x30,
    0x81,
    0x82,
    0x02,
    0x01,
    0x01,
    0x30,
    0x2c,
    0x06,
    0x07,
    0x2a,
    0x86,
    0x48,
    0xce,
    0x3d,
    0x01,
    0x01,
    0x02,
    0x21,
    0x00,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xfe,
    0xff,
    0xff,
    0xfc,
    0x2f,
    0x30,
    0x06,
    0x04,
    0x01,
    0x00,
    0x04,
    0x01,
    0x07,
    0x04,
    0x21,
    0x02,
    0x79,
    0xbe,
    0x66,
    0x7e,
    0xf9,
    0xdc,
    0xbb,
    0xac,
    0x55,
    0xa0,
    0x62,
    0x95,
    0xce,
    0x87,
    0x0b,
    0x07,
    0x02,
    0x9b,
    0xfc,
    0xdb,
    0x2d,
    0xce,
    0x28,
    0xd9,
    0x59,
    0xf2,
    0x81,
    0x5b,
    0x16,
    0xf8,
    0x17,
    0x98,
    0x02,
    0x21,
    0x00,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xfe,
    0xba,
    0xae,
    0xdc,
    0xe6,
    0xaf,
    0x48,
    0xa0,
    0x3b,
    0xbf,
    0xd2,
    0x5e,
    0x8c,
    0xd0,
    0x36,
    0x41,
    0x41,
    0x02,
    0x01,
    0x01,
    0xa1,
    0x24,
    0x03,
    0x22,
    0x00,
    // public key
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
]);
var EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED = Buffer.from([
    // begin
    0x30,
    0x82,
    0x01,
    0x13,
    0x02,
    0x01,
    0x01,
    0x04,
    0x20,
    // private key
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    // middle
    0xa0,
    0x81,
    0xa5,
    0x30,
    0x81,
    0xa2,
    0x02,
    0x01,
    0x01,
    0x30,
    0x2c,
    0x06,
    0x07,
    0x2a,
    0x86,
    0x48,
    0xce,
    0x3d,
    0x01,
    0x01,
    0x02,
    0x21,
    0x00,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xfe,
    0xff,
    0xff,
    0xfc,
    0x2f,
    0x30,
    0x06,
    0x04,
    0x01,
    0x00,
    0x04,
    0x01,
    0x07,
    0x04,
    0x41,
    0x04,
    0x79,
    0xbe,
    0x66,
    0x7e,
    0xf9,
    0xdc,
    0xbb,
    0xac,
    0x55,
    0xa0,
    0x62,
    0x95,
    0xce,
    0x87,
    0x0b,
    0x07,
    0x02,
    0x9b,
    0xfc,
    0xdb,
    0x2d,
    0xce,
    0x28,
    0xd9,
    0x59,
    0xf2,
    0x81,
    0x5b,
    0x16,
    0xf8,
    0x17,
    0x98,
    0x48,
    0x3a,
    0xda,
    0x77,
    0x26,
    0xa3,
    0xc4,
    0x65,
    0x5d,
    0xa4,
    0xfb,
    0xfc,
    0x0e,
    0x11,
    0x08,
    0xa8,
    0xfd,
    0x17,
    0xb4,
    0x48,
    0xa6,
    0x85,
    0x54,
    0x19,
    0x9c,
    0x47,
    0xd0,
    0x8f,
    0xfb,
    0x10,
    0xd4,
    0xb8,
    0x02,
    0x21,
    0x00,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xff,
    0xfe,
    0xba,
    0xae,
    0xdc,
    0xe6,
    0xaf,
    0x48,
    0xa0,
    0x3b,
    0xbf,
    0xd2,
    0x5e,
    0x8c,
    0xd0,
    0x36,
    0x41,
    0x41,
    0x02,
    0x01,
    0x01,
    0xa1,
    0x44,
    0x03,
    0x42,
    0x00,
    // public key
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
    0x00,
]);
exports.privateKeyExport = function (privateKey, publicKey, compressed) {
    if (compressed === void 0) { compressed = true; }
    var result = Buffer.from(compressed ? EC_PRIVKEY_EXPORT_DER_COMPRESSED : EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED);
    privateKey.copy(result, compressed ? 8 : 9);
    publicKey.copy(result, compressed ? 181 : 214);
    return result;
};
exports.privateKeyImport = function (privateKey) {
    var length = privateKey.length;
    // sequence header
    var index = 0;
    if (length < index + 1 || privateKey[index] !== 0x30)
        return null;
    index += 1;
    // sequence length constructor
    if (length < index + 1 || !(privateKey[index] & 0x80))
        return null;
    var lenb = privateKey[index] & 0x7f;
    index += 1;
    if (lenb < 1 || lenb > 2)
        return null;
    if (length < index + lenb)
        return null;
    // sequence length
    var len = privateKey[index + lenb - 1] | (lenb > 1 ? privateKey[index + lenb - 2] << 8 : 0);
    index += lenb;
    if (length < index + len)
        return null;
    // sequence element 0: version number (=1)
    if (length < index + 3 ||
        privateKey[index] !== 0x02 ||
        privateKey[index + 1] !== 0x01 ||
        privateKey[index + 2] !== 0x01) {
        return null;
    }
    index += 3;
    // sequence element 1: octet string, up to 32 bytes
    if (length < index + 2 ||
        privateKey[index] !== 0x04 ||
        privateKey[index + 1] > 0x20 ||
        length < index + 2 + privateKey[index + 1]) {
        return null;
    }
    return privateKey.slice(index + 2, index + 2 + privateKey[index + 1]);
};
exports.signatureImportLax = function (signature) {
    var r = Buffer.alloc(32, 0);
    var s = Buffer.alloc(32, 0);
    var length = signature.length;
    var index = 0;
    // sequence tag byte
    if (signature[index++] !== 0x30) {
        return null;
    }
    // sequence length byte
    var lenbyte = signature[index++];
    if (lenbyte & 0x80) {
        index += lenbyte - 0x80;
        if (index > length) {
            return null;
        }
    }
    // sequence tag byte for r
    if (signature[index++] !== 0x02) {
        return null;
    }
    // length for r
    var rlen = signature[index++];
    if (rlen & 0x80) {
        lenbyte = rlen - 0x80;
        if (index + lenbyte > length) {
            return null;
        }
        for (; lenbyte > 0 && signature[index] === 0x00; index += 1, lenbyte -= 1)
            ;
        for (rlen = 0; lenbyte > 0; index += 1, lenbyte -= 1)
            rlen = (rlen << 8) + signature[index];
    }
    if (rlen > length - index) {
        return null;
    }
    var rindex = index;
    index += rlen;
    // sequence tag byte for s
    if (signature[index++] !== 0x02) {
        return null;
    }
    // length for s
    var slen = signature[index++];
    if (slen & 0x80) {
        lenbyte = slen - 0x80;
        if (index + lenbyte > length) {
            return null;
        }
        for (; lenbyte > 0 && signature[index] === 0x00; index += 1, lenbyte -= 1)
            ;
        for (slen = 0; lenbyte > 0; index += 1, lenbyte -= 1)
            slen = (slen << 8) + signature[index];
    }
    if (slen > length - index) {
        return null;
    }
    var sindex = index;
    index += slen;
    // ignore leading zeros in r
    for (; rlen > 0 && signature[rindex] === 0x00; rlen -= 1, rindex += 1)
        ;
    // copy r value
    if (rlen > 32) {
        return null;
    }
    var rvalue = signature.slice(rindex, rindex + rlen);
    rvalue.copy(r, 32 - rvalue.length);
    // ignore leading zeros in s
    for (; slen > 0 && signature[sindex] === 0x00; slen -= 1, sindex += 1)
        ;
    // copy s value
    if (slen > 32) {
        return null;
    }
    var svalue = signature.slice(sindex, sindex + slen);
    svalue.copy(s, 32 - svalue.length);
    return { r: r, s: s };
};
//# sourceMappingURL=der.js.map

/***/ }),

/***/ 864043:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

// This file is imported from secp256k1 v3
// https://github.com/cryptocoinjs/secp256k1-node/blob/master/LICENSE
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var EC = __webpack_require__(378892).ec;
var ec = new EC('secp256k1');
var ecparams = ec.curve;
exports.privateKeyExport = function (privateKey, compressed) {
    if (compressed === void 0) { compressed = true; }
    var d = new BN(privateKey);
    if (d.ucmp(ecparams.n) >= 0) {
        throw new Error("couldn't export to DER format");
    }
    var point = ec.g.mul(d);
    return toPublicKey(point.getX(), point.getY(), compressed);
};
exports.privateKeyModInverse = function (privateKey) {
    var bn = new BN(privateKey);
    if (bn.ucmp(ecparams.n) >= 0 || bn.isZero()) {
        throw new Error('private key range is invalid');
    }
    return bn.invm(ecparams.n).toArrayLike(Buffer, 'be', 32);
};
exports.signatureImport = function (sigObj) {
    var r = new BN(sigObj.r);
    if (r.ucmp(ecparams.n) >= 0) {
        r = new BN(0);
    }
    var s = new BN(sigObj.s);
    if (s.ucmp(ecparams.n) >= 0) {
        s = new BN(0);
    }
    return Buffer.concat([r.toArrayLike(Buffer, 'be', 32), s.toArrayLike(Buffer, 'be', 32)]);
};
exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
    if (compressed === void 0) { compressed = true; }
    var point = ec.keyFromPublic(publicKey);
    var scalar = new BN(privateKey);
    if (scalar.ucmp(ecparams.n) >= 0 || scalar.isZero()) {
        throw new Error('scalar was invalid (zero or overflow)');
    }
    var shared = point.pub.mul(scalar);
    return toPublicKey(shared.getX(), shared.getY(), compressed);
};
var toPublicKey = function (x, y, compressed) {
    var publicKey;
    if (compressed) {
        publicKey = Buffer.alloc(33);
        publicKey[0] = y.isOdd() ? 0x03 : 0x02;
        x.toArrayLike(Buffer, 'be', 32).copy(publicKey, 1);
    }
    else {
        publicKey = Buffer.alloc(65);
        publicKey[0] = 0x04;
        x.toArrayLike(Buffer, 'be', 32).copy(publicKey, 1);
        y.toArrayLike(Buffer, 'be', 32).copy(publicKey, 33);
    }
    return publicKey;
};
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 599885:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hashPersonalMessage = exports.isValidSignature = exports.fromRpcSig = exports.toRpcSig = exports.ecrecover = exports.ecsign = void 0;
var secp256k1 = __webpack_require__(704393);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(456834);
var hash_1 = __webpack_require__(742613);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 256864:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethereumjs_util_1 = __webpack_require__(425332);
var BYTE_SIZE = 256;
var Bloom = /** @class */ (function () {
    /**
     * Represents a Bloom filter.
     */
    function Bloom(bitvector) {
        if (!bitvector) {
            this.bitvector = ethereumjs_util_1.zeros(BYTE_SIZE);
        }
        else {
            assert(bitvector.length === BYTE_SIZE, 'bitvectors must be 2048 bits long');
            this.bitvector = bitvector;
        }
    }
    /**
     * Adds an element to a bit vector of a 64 byte bloom filter.
     * @param e - The element to add
     */
    Bloom.prototype.add = function (e) {
        assert(Buffer.isBuffer(e), 'Element should be buffer');
        e = ethereumjs_util_1.keccak256(e);
        var mask = 2047; // binary 11111111111
        for (var i = 0; i < 3; i++) {
            var first2bytes = e.readUInt16BE(i * 2);
            var loc = mask & first2bytes;
            var byteLoc = loc >> 3;
            var bitLoc = 1 << loc % 8;
            this.bitvector[BYTE_SIZE - byteLoc - 1] |= bitLoc;
        }
    };
    /**
     * Checks if an element is in the bloom.
     * @param e - The element to check
     */
    Bloom.prototype.check = function (e) {
        assert(Buffer.isBuffer(e), 'Element should be Buffer');
        e = ethereumjs_util_1.keccak256(e);
        var mask = 2047; // binary 11111111111
        var match = true;
        for (var i = 0; i < 3 && match; i++) {
            var first2bytes = e.readUInt16BE(i * 2);
            var loc = mask & first2bytes;
            var byteLoc = loc >> 3;
            var bitLoc = 1 << loc % 8;
            match = (this.bitvector[BYTE_SIZE - byteLoc - 1] & bitLoc) !== 0;
        }
        return Boolean(match);
    };
    /**
     * Checks if multiple topics are in a bloom.
     * @returns `true` if every topic is in the bloom
     */
    Bloom.prototype.multiCheck = function (topics) {
        var _this = this;
        return topics.every(function (t) { return _this.check(t); });
    };
    /**
     * Bitwise or blooms together.
     */
    Bloom.prototype.or = function (bloom) {
        if (bloom) {
            for (var i = 0; i <= BYTE_SIZE; i++) {
                this.bitvector[i] = this.bitvector[i] | bloom.bitvector[i];
            }
        }
    };
    return Bloom;
}());
exports.default = Bloom;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 277061:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var exceptions_1 = __webpack_require__(764614);
var message_1 = __webpack_require__(823321);
var promisify = __webpack_require__(38159);
/**
 * External interface made available to EVM bytecode. Modeled after
 * the ewasm EEI [spec](https://github.com/ewasm/design/blob/master/eth_interface.md).
 * It includes methods for accessing/modifying state, calling or creating contracts, access
 * to environment data among other things.
 * The EEI instance also keeps artifacts produced by the bytecode such as logs
 * and to-be-selfdestructed addresses.
 */
var EEI = /** @class */ (function () {
    function EEI(env, state, evm, common, gasLeft) {
        this._env = env;
        this._state = state;
        this._evm = evm;
        this._lastReturned = Buffer.alloc(0);
        this._common = common;
        this._gasLeft = gasLeft;
        this._result = {
            logs: [],
            returnValue: undefined,
            selfdestruct: {},
        };
    }
    /**
     * Subtracts an amount from the gas counter.
     * @param amount - Amount of gas to consume
     * @throws if out of gas
     */
    EEI.prototype.useGas = function (amount) {
        this._gasLeft.isub(amount);
        if (this._gasLeft.ltn(0)) {
            this._gasLeft = new BN(0);
            trap(exceptions_1.ERROR.OUT_OF_GAS);
        }
    };
    /**
     * Adds a positive amount to the gas counter.
     * @param amount - Amount of gas refunded
     */
    EEI.prototype.refundGas = function (amount) {
        this._evm._refund.iadd(amount);
    };
    /**
     * Reduces amount of gas to be refunded by a positive value.
     * @param amount - Amount to subtract from gas refunds
     */
    EEI.prototype.subRefund = function (amount) {
        this._evm._refund.isub(amount);
        if (this._evm._refund.ltn(0)) {
            this._evm._refund = new BN(0);
            trap(exceptions_1.ERROR.REFUND_EXHAUSTED);
        }
    };
    /**
     * Returns address of currently executing account.
     */
    EEI.prototype.getAddress = function () {
        return this._env.address;
    };
    /**
     * Returns balance of the given account.
     * @param address - Address of account
     */
    EEI.prototype.getExternalBalance = function (address) {
        return __awaiter(this, void 0, void 0, function () {
            var account;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        // shortcut if current account
                        if (address.toString('hex') === this._env.address.toString('hex')) {
                            return [2 /*return*/, new BN(this._env.contract.balance)];
                        }
                        return [4 /*yield*/, this._state.getAccount(address)];
                    case 1:
                        account = _a.sent();
                        return [2 /*return*/, new BN(account.balance)];
                }
            });
        });
    };
    /**
     * Returns balance of self.
     */
    EEI.prototype.getSelfBalance = function () {
        return new BN(this._env.contract.balance);
    };
    /**
     * Returns caller address. This is the address of the account
     * that is directly responsible for this execution.
     */
    EEI.prototype.getCaller = function () {
        return new BN(this._env.caller);
    };
    /**
     * Returns the deposited value by the instruction/transaction
     * responsible for this execution.
     */
    EEI.prototype.getCallValue = function () {
        return new BN(this._env.callValue);
    };
    /**
     * Returns input data in current environment. This pertains to the input
     * data passed with the message call instruction or transaction.
     */
    EEI.prototype.getCallData = function () {
        return this._env.callData;
    };
    /**
     * Returns size of input data in current environment. This pertains to the
     * input data passed with the message call instruction or transaction.
     */
    EEI.prototype.getCallDataSize = function () {
        return new BN(this._env.callData.length);
    };
    /**
     * Returns the size of code running in current environment.
     */
    EEI.prototype.getCodeSize = function () {
        return new BN(this._env.code.length);
    };
    /**
     * Returns the code running in current environment.
     */
    EEI.prototype.getCode = function () {
        return this._env.code;
    };
    /**
     * Returns true if the current call must be executed statically.
     */
    EEI.prototype.isStatic = function () {
        return this._env.isStatic;
    };
    /**
     * Get size of an account’s code.
     * @param address - Address of account
     */
    EEI.prototype.getExternalCodeSize = function (address) {
        return __awaiter(this, void 0, void 0, function () {
            var addressBuf, code;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        addressBuf = addressToBuffer(address);
                        return [4 /*yield*/, this._state.getContractCode(addressBuf)];
                    case 1:
                        code = _a.sent();
                        return [2 /*return*/, new BN(code.length)];
                }
            });
        });
    };
    /**
     * Returns code of an account.
     * @param address - Address of account
     */
    EEI.prototype.getExternalCode = function (address) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                if (!Buffer.isBuffer(address)) {
                    address = addressToBuffer(address);
                }
                return [2 /*return*/, this._state.getContractCode(address)];
            });
        });
    };
    /**
     * Returns size of current return data buffer. This contains the return data
     * from the last executed call, callCode, callDelegate, callStatic or create.
     * Note: create only fills the return data buffer in case of a failure.
     */
    EEI.prototype.getReturnDataSize = function () {
        return new BN(this._lastReturned.length);
    };
    /**
     * Returns the current return data buffer. This contains the return data
     * from last executed call, callCode, callDelegate, callStatic or create.
     * Note: create only fills the return data buffer in case of a failure.
     */
    EEI.prototype.getReturnData = function () {
        return this._lastReturned;
    };
    /**
     * Returns price of gas in current environment.
     */
    EEI.prototype.getTxGasPrice = function () {
        return new BN(this._env.gasPrice);
    };
    /**
     * Returns the execution's origination address. This is the
     * sender of original transaction; it is never an account with
     * non-empty associated code.
     */
    EEI.prototype.getTxOrigin = function () {
        return new BN(this._env.origin);
    };
    /**
     * Returns the block’s number.
     */
    EEI.prototype.getBlockNumber = function () {
        return new BN(this._env.block.header.number);
    };
    /**
     * Returns the block's beneficiary address.
     */
    EEI.prototype.getBlockCoinbase = function () {
        return new BN(this._env.block.header.coinbase);
    };
    /**
     * Returns the block's timestamp.
     */
    EEI.prototype.getBlockTimestamp = function () {
        return new BN(this._env.block.header.timestamp);
    };
    /**
     * Returns the block's difficulty.
     */
    EEI.prototype.getBlockDifficulty = function () {
        return new BN(this._env.block.header.difficulty);
    };
    /**
     * Returns the block's gas limit.
     */
    EEI.prototype.getBlockGasLimit = function () {
        return new BN(this._env.block.header.gasLimit);
    };
    /**
     * Returns the chain ID for current chain. Introduced for the
     * CHAINID opcode proposed in [EIP-1344](https://eips.ethereum.org/EIPS/eip-1344).
     */
    EEI.prototype.getChainId = function () {
        return new BN(this._common.chainId());
    };
    /**
     * Returns Gets the hash of one of the 256 most recent complete blocks.
     * @param num - Number of block
     */
    EEI.prototype.getBlockHash = function (num) {
        return __awaiter(this, void 0, void 0, function () {
            var block;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, promisify(this._env.blockchain.getBlock).bind(this._env.blockchain)(num)];
                    case 1:
                        block = _a.sent();
                        return [2 /*return*/, new BN(block.hash())];
                }
            });
        });
    };
    /**
     * Store 256-bit a value in memory to persistent storage.
     */
    EEI.prototype.storageStore = function (key, value) {
        return __awaiter(this, void 0, void 0, function () {
            var account;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this._state.putContractStorage(this._env.address, key, value)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, this._state.getAccount(this._env.address)];
                    case 2:
                        account = _a.sent();
                        this._env.contract = account;
                        return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Loads a 256-bit value to memory from persistent storage.
     * @param key - Storage key
     */
    EEI.prototype.storageLoad = function (key) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this._state.getContractStorage(this._env.address, key)];
            });
        });
    };
    /**
     * Returns the current gasCounter.
     */
    EEI.prototype.getGasLeft = function () {
        return this._gasLeft.clone();
    };
    /**
     * Set the returning output data for the execution.
     * @param returnData - Output data to return
     */
    EEI.prototype.finish = function (returnData) {
        this._result.returnValue = returnData;
        trap(exceptions_1.ERROR.STOP);
    };
    /**
     * Set the returning output data for the execution. This will halt the
     * execution immediately and set the execution result to "reverted".
     * @param returnData - Output data to return
     */
    EEI.prototype.revert = function (returnData) {
        this._result.returnValue = returnData;
        trap(exceptions_1.ERROR.REVERT);
    };
    /**
     * Mark account for later deletion and give the remaining balance to the
     * specified beneficiary address. This will cause a trap and the
     * execution will be aborted immediately.
     * @param toAddress - Beneficiary address
     */
    EEI.prototype.selfDestruct = function (toAddress) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this._selfDestruct(toAddress)];
            });
        });
    };
    EEI.prototype._selfDestruct = function (toAddress) {
        return __awaiter(this, void 0, void 0, function () {
            var toAccount, newBalance, account;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        // only add to refund if this is the first selfdestruct for the address
                        if (!this._result.selfdestruct[this._env.address.toString('hex')]) {
                            this.refundGas(new BN(this._common.param('gasPrices', 'selfdestructRefund')));
                        }
                        this._result.selfdestruct[this._env.address.toString('hex')] = toAddress;
                        return [4 /*yield*/, this._state.getAccount(toAddress)];
                    case 1:
                        toAccount = _a.sent();
                        newBalance = new BN(this._env.contract.balance).add(new BN(toAccount.balance));
                        toAccount.balance = ethereumjs_util_1.toBuffer(newBalance);
                        return [4 /*yield*/, this._state.putAccount(toAddress, toAccount)
                            // Subtract from contract balance
                        ];
                    case 2:
                        _a.sent();
                        return [4 /*yield*/, this._state.getAccount(this._env.address)];
                    case 3:
                        account = _a.sent();
                        account.balance = ethereumjs_util_1.toBuffer(new BN(0));
                        return [4 /*yield*/, this._state.putAccount(this._env.address, account)];
                    case 4:
                        _a.sent();
                        trap(exceptions_1.ERROR.STOP);
                        return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Creates a new log in the current environment.
     */
    EEI.prototype.log = function (data, numberOfTopics, topics) {
        if (numberOfTopics < 0 || numberOfTopics > 4) {
            trap(exceptions_1.ERROR.OUT_OF_RANGE);
        }
        if (topics.length !== numberOfTopics) {
            trap(exceptions_1.ERROR.INTERNAL_ERROR);
        }
        // add address
        var log = [this._env.address];
        log.push(topics);
        // add data
        log.push(data);
        this._result.logs.push(log);
    };
    /**
     * Sends a message with arbitrary data to a given address path.
     */
    EEI.prototype.call = function (gasLimit, address, value, data) {
        return __awaiter(this, void 0, void 0, function () {
            var msg;
            return __generator(this, function (_a) {
                msg = new message_1.default({
                    caller: this._env.address,
                    gasLimit: gasLimit,
                    to: address,
                    value: value,
                    data: data,
                    isStatic: this._env.isStatic,
                    depth: this._env.depth + 1,
                });
                return [2 /*return*/, this._baseCall(msg)];
            });
        });
    };
    /**
     * Message-call into this account with an alternative account's code.
     */
    EEI.prototype.callCode = function (gasLimit, address, value, data) {
        return __awaiter(this, void 0, void 0, function () {
            var msg;
            return __generator(this, function (_a) {
                msg = new message_1.default({
                    caller: this._env.address,
                    gasLimit: gasLimit,
                    to: this._env.address,
                    codeAddress: address,
                    value: value,
                    data: data,
                    isStatic: this._env.isStatic,
                    depth: this._env.depth + 1,
                });
                return [2 /*return*/, this._baseCall(msg)];
            });
        });
    };
    /**
     * Sends a message with arbitrary data to a given address path, but disallow
     * state modifications. This includes log, create, selfdestruct and call with
     * a non-zero value.
     */
    EEI.prototype.callStatic = function (gasLimit, address, value, data) {
        return __awaiter(this, void 0, void 0, function () {
            var msg;
            return __generator(this, function (_a) {
                msg = new message_1.default({
                    caller: this._env.address,
                    gasLimit: gasLimit,
                    to: address,
                    value: value,
                    data: data,
                    isStatic: true,
                    depth: this._env.depth + 1,
                });
                return [2 /*return*/, this._baseCall(msg)];
            });
        });
    };
    /**
     * Message-call into this account with an alternative account’s code, but
     * persisting the current values for sender and value.
     */
    EEI.prototype.callDelegate = function (gasLimit, address, value, data) {
        return __awaiter(this, void 0, void 0, function () {
            var msg;
            return __generator(this, function (_a) {
                msg = new message_1.default({
                    caller: this._env.caller,
                    gasLimit: gasLimit,
                    to: this._env.address,
                    codeAddress: address,
                    value: value,
                    data: data,
                    isStatic: this._env.isStatic,
                    delegatecall: true,
                    depth: this._env.depth + 1,
                });
                return [2 /*return*/, this._baseCall(msg)];
            });
        });
    };
    EEI.prototype._baseCall = function (msg) {
        return __awaiter(this, void 0, void 0, function () {
            var selfdestruct, results, account;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        selfdestruct = __assign({}, this._result.selfdestruct);
                        msg.selfdestruct = selfdestruct;
                        // empty the return data buffer
                        this._lastReturned = Buffer.alloc(0);
                        // Check if account has enough ether and max depth not exceeded
                        if (this._env.depth >= this._common.param('vm', 'stackLimit') ||
                            (msg.delegatecall !== true && new BN(this._env.contract.balance).lt(msg.value))) {
                            return [2 /*return*/, new BN(0)];
                        }
                        return [4 /*yield*/, this._evm.executeMessage(msg)];
                    case 1:
                        results = _a.sent();
                        if (results.execResult.logs) {
                            this._result.logs = this._result.logs.concat(results.execResult.logs);
                        }
                        // this should always be safe
                        this.useGas(results.gasUsed);
                        // Set return value
                        if (results.execResult.returnValue &&
                            (!results.execResult.exceptionError ||
                                results.execResult.exceptionError.error === exceptions_1.ERROR.REVERT)) {
                            this._lastReturned = results.execResult.returnValue;
                        }
                        if (!!results.execResult.exceptionError) return [3 /*break*/, 3];
                        Object.assign(this._result.selfdestruct, selfdestruct);
                        return [4 /*yield*/, this._state.getAccount(this._env.address)];
                    case 2:
                        account = _a.sent();
                        this._env.contract = account;
                        _a.label = 3;
                    case 3: return [2 /*return*/, this._getReturnCode(results)];
                }
            });
        });
    };
    /**
     * Creates a new contract with a given value.
     */
    EEI.prototype.create = function (gasLimit, value, data, salt) {
        if (salt === void 0) { salt = null; }
        return __awaiter(this, void 0, void 0, function () {
            var selfdestruct, msg, results, account;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        selfdestruct = __assign({}, this._result.selfdestruct);
                        msg = new message_1.default({
                            caller: this._env.address,
                            gasLimit: gasLimit,
                            value: value,
                            data: data,
                            salt: salt,
                            depth: this._env.depth + 1,
                            selfdestruct: selfdestruct,
                        });
                        // empty the return data buffer
                        this._lastReturned = Buffer.alloc(0);
                        // Check if account has enough ether and max depth not exceeded
                        if (this._env.depth >= this._common.param('vm', 'stackLimit') ||
                            (msg.delegatecall !== true && new BN(this._env.contract.balance).lt(msg.value))) {
                            return [2 /*return*/, new BN(0)];
                        }
                        this._env.contract.nonce = ethereumjs_util_1.toBuffer(new BN(this._env.contract.nonce).addn(1));
                        return [4 /*yield*/, this._state.putAccount(this._env.address, this._env.contract)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, this._evm.executeMessage(msg)];
                    case 2:
                        results = _a.sent();
                        if (results.execResult.logs) {
                            this._result.logs = this._result.logs.concat(results.execResult.logs);
                        }
                        // this should always be safe
                        this.useGas(results.gasUsed);
                        // Set return buffer in case revert happened
                        if (results.execResult.exceptionError &&
                            results.execResult.exceptionError.error === exceptions_1.ERROR.REVERT) {
                            this._lastReturned = results.execResult.returnValue;
                        }
                        if (!!results.execResult.exceptionError) return [3 /*break*/, 4];
                        Object.assign(this._result.selfdestruct, selfdestruct);
                        return [4 /*yield*/, this._state.getAccount(this._env.address)];
                    case 3:
                        account = _a.sent();
                        this._env.contract = account;
                        if (results.createdAddress) {
                            // push the created address to the stack
                            return [2 /*return*/, new BN(results.createdAddress)];
                        }
                        _a.label = 4;
                    case 4: return [2 /*return*/, this._getReturnCode(results)];
                }
            });
        });
    };
    /**
     * Creates a new contract with a given value. Generates
     * a deterministic address via CREATE2 rules.
     */
    EEI.prototype.create2 = function (gasLimit, value, data, salt) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this.create(gasLimit, value, data, salt)];
            });
        });
    };
    /**
     * Returns true if account is empty (according to EIP-161).
     * @param address - Address of account
     */
    EEI.prototype.isAccountEmpty = function (address) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this._state.accountIsEmpty(address)];
            });
        });
    };
    EEI.prototype._getReturnCode = function (results) {
        // This preserves the previous logic, but seems to contradict the EEI spec
        // https://github.com/ewasm/design/blob/38eeded28765f3e193e12881ea72a6ab807a3371/eth_interface.md
        if (results.execResult.exceptionError) {
            return new BN(0);
        }
        else {
            return new BN(1);
        }
    };
    return EEI;
}());
exports.default = EEI;
function trap(err) {
    throw new exceptions_1.VmError(err);
}
var MASK_160 = new BN(1).shln(160).subn(1);
function addressToBuffer(address) {
    if (Buffer.isBuffer(address))
        return address;
    return address.and(MASK_160).toArrayLike(Buffer, 'be', 20);
}
//# sourceMappingURL=eei.js.map

/***/ }),

/***/ 935653:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var exceptions_1 = __webpack_require__(764614);
var precompiles_1 = __webpack_require__(838081);
var eei_1 = __webpack_require__(277061);
var interpreter_1 = __webpack_require__(895597);
var Block = __webpack_require__(339951);
function OOGResult(gasLimit) {
    return {
        returnValue: Buffer.alloc(0),
        gasUsed: gasLimit,
        exceptionError: new exceptions_1.VmError(exceptions_1.ERROR.OUT_OF_GAS),
    };
}
exports.OOGResult = OOGResult;
/**
 * EVM is responsible for executing an EVM message fully
 * (including any nested calls and creates), processing the results
 * and storing them to state (or discarding changes in case of exceptions).
 * @ignore
 */
var EVM = /** @class */ (function () {
    function EVM(vm, txContext, block) {
        this._vm = vm;
        this._state = this._vm.pStateManager;
        this._tx = txContext;
        this._block = block;
        this._refund = new BN(0);
    }
    /**
     * Executes an EVM message, determining whether it's a call or create
     * based on the `to` address. It checkpoints the state and reverts changes
     * if an exception happens during the message execution.
     */
    EVM.prototype.executeMessage = function (message) {
        return __awaiter(this, void 0, void 0, function () {
            var result, err;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this._vm._emit('beforeMessage', message)];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, this._state.checkpoint()];
                    case 2:
                        _a.sent();
                        if (!message.to) return [3 /*break*/, 4];
                        return [4 /*yield*/, this._executeCall(message)];
                    case 3:
                        result = _a.sent();
                        return [3 /*break*/, 6];
                    case 4: return [4 /*yield*/, this._executeCreate(message)];
                    case 5:
                        result = _a.sent();
                        _a.label = 6;
                    case 6:
                        // TODO: Move `gasRefund` to a tx-level result object
                        // instead of `ExecResult`.
                        result.execResult.gasRefund = this._refund.clone();
                        err = result.execResult.exceptionError;
                        if (!err) return [3 /*break*/, 8];
                        result.execResult.logs = [];
                        return [4 /*yield*/, this._state.revert()];
                    case 7:
                        _a.sent();
                        return [3 /*break*/, 10];
                    case 8: return [4 /*yield*/, this._state.commit()];
                    case 9:
                        _a.sent();
                        _a.label = 10;
                    case 10: return [4 /*yield*/, this._vm._emit('afterMessage', result)];
                    case 11:
                        _a.sent();
                        return [2 /*return*/, result];
                }
            });
        });
    };
    EVM.prototype._executeCall = function (message) {
        return __awaiter(this, void 0, void 0, function () {
            var account, toAccount, result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this._state.getAccount(message.caller)
                        // Reduce tx value from sender
                    ];
                    case 1:
                        account = _a.sent();
                        if (!!message.delegatecall) return [3 /*break*/, 3];
                        return [4 /*yield*/, this._reduceSenderBalance(account, message)];
                    case 2:
                        _a.sent();
                        _a.label = 3;
                    case 3: return [4 /*yield*/, this._state.getAccount(message.to)
                        // Add tx value to the `to` account
                    ];
                    case 4:
                        toAccount = _a.sent();
                        if (!!message.delegatecall) return [3 /*break*/, 6];
                        return [4 /*yield*/, this._addToBalance(toAccount, message)];
                    case 5:
                        _a.sent();
                        _a.label = 6;
                    case 6: 
                    // Load code
                    return [4 /*yield*/, this._loadCode(message)];
                    case 7:
                        // Load code
                        _a.sent();
                        if (!message.code || message.code.length === 0) {
                            return [2 /*return*/, {
                                    gasUsed: new BN(0),
                                    execResult: {
                                        gasUsed: new BN(0),
                                        returnValue: Buffer.alloc(0),
                                    },
                                }];
                        }
                        if (!message.isCompiled) return [3 /*break*/, 8];
                        result = this.runPrecompile(message.code, message.data, message.gasLimit);
                        return [3 /*break*/, 10];
                    case 8: return [4 /*yield*/, this.runInterpreter(message)];
                    case 9:
                        result = _a.sent();
                        _a.label = 10;
                    case 10: return [2 /*return*/, {
                            gasUsed: result.gasUsed,
                            execResult: result,
                        }];
                }
            });
        });
    };
    EVM.prototype._executeCreate = function (message) {
        return __awaiter(this, void 0, void 0, function () {
            var account, _a, toAccount, newContractEvent, result, totalGas, returnFee;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, this._state.getAccount(message.caller)
                        // Reduce tx value from sender
                    ];
                    case 1:
                        account = _b.sent();
                        // Reduce tx value from sender
                        return [4 /*yield*/, this._reduceSenderBalance(account, message)];
                    case 2:
                        // Reduce tx value from sender
                        _b.sent();
                        message.code = message.data;
                        message.data = Buffer.alloc(0);
                        _a = message;
                        return [4 /*yield*/, this._generateAddress(message)];
                    case 3:
                        _a.to = _b.sent();
                        return [4 /*yield*/, this._state.getAccount(message.to)
                            // Check for collision
                        ];
                    case 4:
                        toAccount = _b.sent();
                        // Check for collision
                        if ((toAccount.nonce && new BN(toAccount.nonce).gtn(0)) ||
                            toAccount.codeHash.compare(ethereumjs_util_1.KECCAK256_NULL) !== 0) {
                            return [2 /*return*/, {
                                    gasUsed: message.gasLimit,
                                    createdAddress: message.to,
                                    execResult: {
                                        returnValue: Buffer.alloc(0),
                                        exceptionError: new exceptions_1.VmError(exceptions_1.ERROR.CREATE_COLLISION),
                                        gasUsed: message.gasLimit,
                                    },
                                }];
                        }
                        return [4 /*yield*/, this._state.clearContractStorage(message.to)];
                    case 5:
                        _b.sent();
                        newContractEvent = {
                            address: message.to,
                            code: message.code,
                        };
                        return [4 /*yield*/, this._vm._emit('newContract', newContractEvent)];
                    case 6:
                        _b.sent();
                        return [4 /*yield*/, this._state.getAccount(message.to)];
                    case 7:
                        toAccount = _b.sent();
                        toAccount.nonce = new BN(toAccount.nonce).addn(1).toArrayLike(Buffer);
                        // Add tx value to the `to` account
                        return [4 /*yield*/, this._addToBalance(toAccount, message)];
                    case 8:
                        // Add tx value to the `to` account
                        _b.sent();
                        if (!message.code || message.code.length === 0) {
                            return [2 /*return*/, {
                                    gasUsed: new BN(0),
                                    createdAddress: message.to,
                                    execResult: {
                                        gasUsed: new BN(0),
                                        returnValue: Buffer.alloc(0),
                                    },
                                }];
                        }
                        return [4 /*yield*/, this.runInterpreter(message)
                            // fee for size of the return value
                        ];
                    case 9:
                        result = _b.sent();
                        totalGas = result.gasUsed;
                        if (!result.exceptionError) {
                            returnFee = new BN(result.returnValue.length * this._vm._common.param('gasPrices', 'createData'));
                            totalGas = totalGas.add(returnFee);
                        }
                        // if not enough gas
                        if (totalGas.lte(message.gasLimit) &&
                            (this._vm.allowUnlimitedContractSize || result.returnValue.length <= 24576)) {
                            result.gasUsed = totalGas;
                        }
                        else {
                            result = __assign(__assign({}, result), OOGResult(message.gasLimit));
                        }
                        if (!(!result.exceptionError && result.returnValue && result.returnValue.toString() !== '')) return [3 /*break*/, 11];
                        return [4 /*yield*/, this._state.putContractCode(message.to, result.returnValue)];
                    case 10:
                        _b.sent();
                        _b.label = 11;
                    case 11: return [2 /*return*/, {
                            gasUsed: result.gasUsed,
                            createdAddress: message.to,
                            execResult: result,
                        }];
                }
            });
        });
    };
    /**
     * Starts the actual bytecode processing for a CALL or CREATE, providing
     * it with the [[EEI]].
     */
    EVM.prototype.runInterpreter = function (message, opts) {
        if (opts === void 0) { opts = {}; }
        return __awaiter(this, void 0, void 0, function () {
            var env, _a, eei, oldRefund, interpreter, interpreterRes, result, gasUsed;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = {
                            blockchain: this._vm.blockchain,
                            address: message.to || ethereumjs_util_1.zeros(32),
                            caller: message.caller || ethereumjs_util_1.zeros(32),
                            callData: message.data || Buffer.from([0]),
                            callValue: message.value || new BN(0),
                            code: message.code,
                            isStatic: message.isStatic || false,
                            depth: message.depth || 0,
                            gasPrice: this._tx.gasPrice,
                            origin: this._tx.origin || message.caller || ethereumjs_util_1.zeros(32),
                            block: this._block || new Block()
                        };
                        return [4 /*yield*/, this._state.getAccount(message.to || ethereumjs_util_1.zeros(32))];
                    case 1:
                        env = (_a.contract = _b.sent(),
                            _a.codeAddress = message.codeAddress,
                            _a);
                        eei = new eei_1.default(env, this._state, this, this._vm._common, message.gasLimit.clone());
                        if (message.selfdestruct) {
                            eei._result.selfdestruct = message.selfdestruct;
                        }
                        oldRefund = this._refund.clone();
                        interpreter = new interpreter_1.default(this._vm, eei);
                        return [4 /*yield*/, interpreter.run(message.code, opts)];
                    case 2:
                        interpreterRes = _b.sent();
                        result = eei._result;
                        gasUsed = message.gasLimit.sub(eei._gasLeft);
                        if (interpreterRes.exceptionError) {
                            if (interpreterRes.exceptionError.error !== exceptions_1.ERROR.REVERT) {
                                gasUsed = message.gasLimit;
                            }
                            // Clear the result on error
                            result = __assign(__assign({}, result), { logs: [], selfdestruct: {} });
                            // Revert gas refund if message failed
                            this._refund = oldRefund;
                        }
                        return [2 /*return*/, __assign(__assign({}, result), { runState: __assign(__assign(__assign({}, interpreterRes.runState), result), eei._env), exceptionError: interpreterRes.exceptionError, gas: eei._gasLeft, gasUsed: gasUsed, returnValue: result.returnValue ? result.returnValue : Buffer.alloc(0) })];
                }
            });
        });
    };
    /**
     * Returns code for precompile at the given address, or undefined
     * if no such precompile exists.
     */
    EVM.prototype.getPrecompile = function (address) {
        return precompiles_1.getPrecompile(address.toString('hex'));
    };
    /**
     * Executes a precompiled contract with given data and gas limit.
     */
    EVM.prototype.runPrecompile = function (code, data, gasLimit) {
        if (typeof code !== 'function') {
            throw new Error('Invalid precompile');
        }
        var opts = {
            data: data,
            gasLimit: gasLimit,
            _common: this._vm._common,
        };
        return code(opts);
    };
    EVM.prototype._loadCode = function (message) {
        return __awaiter(this, void 0, void 0, function () {
            var precompile, _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!!message.code) return [3 /*break*/, 3];
                        precompile = this.getPrecompile(message.codeAddress);
                        if (!precompile) return [3 /*break*/, 1];
                        message.code = precompile;
                        message.isCompiled = true;
                        return [3 /*break*/, 3];
                    case 1:
                        _a = message;
                        return [4 /*yield*/, this._state.getContractCode(message.codeAddress)];
                    case 2:
                        _a.code = _b.sent();
                        message.isCompiled = false;
                        _b.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    EVM.prototype._generateAddress = function (message) {
        return __awaiter(this, void 0, void 0, function () {
            var addr, acc, newNonce;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!message.salt) return [3 /*break*/, 1];
                        addr = ethereumjs_util_1.generateAddress2(message.caller, message.salt, message.code);
                        return [3 /*break*/, 3];
                    case 1: return [4 /*yield*/, this._state.getAccount(message.caller)];
                    case 2:
                        acc = _a.sent();
                        newNonce = new BN(acc.nonce).subn(1);
                        addr = ethereumjs_util_1.generateAddress(message.caller, newNonce.toArrayLike(Buffer));
                        _a.label = 3;
                    case 3: return [2 /*return*/, addr];
                }
            });
        });
    };
    EVM.prototype._reduceSenderBalance = function (account, message) {
        return __awaiter(this, void 0, void 0, function () {
            var newBalance;
            return __generator(this, function (_a) {
                newBalance = new BN(account.balance).sub(message.value);
                account.balance = ethereumjs_util_1.toBuffer(newBalance);
                return [2 /*return*/, this._state.putAccount(ethereumjs_util_1.toBuffer(message.caller), account)];
            });
        });
    };
    EVM.prototype._addToBalance = function (toAccount, message) {
        return __awaiter(this, void 0, void 0, function () {
            var newBalance;
            return __generator(this, function (_a) {
                newBalance = new BN(toAccount.balance).add(message.value);
                if (newBalance.gt(ethereumjs_util_1.MAX_INTEGER)) {
                    throw new Error('Value overflow');
                }
                toAccount.balance = ethereumjs_util_1.toBuffer(newBalance);
                // putAccount as the nonce may have changed for contract creation
                return [2 /*return*/, this._state.putAccount(ethereumjs_util_1.toBuffer(message.to), toAccount)];
            });
        });
    };
    EVM.prototype._touchAccount = function (address) {
        return __awaiter(this, void 0, void 0, function () {
            var acc;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this._state.getAccount(address)];
                    case 1:
                        acc = _a.sent();
                        return [2 /*return*/, this._state.putAccount(address, acc)];
                }
            });
        });
    };
    return EVM;
}());
exports.default = EVM;
//# sourceMappingURL=evm.js.map

/***/ }),

/***/ 895597:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var exceptions_1 = __webpack_require__(764614);
var memory_1 = __webpack_require__(290569);
var stack_1 = __webpack_require__(490908);
var opFns_1 = __webpack_require__(430267);
/**
 * Parses and executes EVM bytecode.
 */
var Interpreter = /** @class */ (function () {
    function Interpreter(vm, eei) {
        this._vm = vm; // TODO: remove when not needed
        this._state = vm.pStateManager;
        this._eei = eei;
        this._runState = {
            programCounter: 0,
            opCode: 0xfe,
            memory: new memory_1.default(),
            memoryWordCount: new BN(0),
            highestMemCost: new BN(0),
            stack: new stack_1.default(),
            code: Buffer.alloc(0),
            validJumps: [],
            // TODO: Replace with EEI methods
            _common: this._vm._common,
            stateManager: this._state._wrapped,
            eei: this._eei,
        };
    }
    Interpreter.prototype.run = function (code, opts) {
        if (opts === void 0) { opts = {}; }
        return __awaiter(this, void 0, void 0, function () {
            var pc, err, opCode, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this._runState.code = code;
                        this._runState.programCounter = opts.pc || this._runState.programCounter;
                        this._runState.validJumps = this._getValidJumpDests(code);
                        pc = this._runState.programCounter;
                        if (pc !== 0 && (pc < 0 || pc >= this._runState.code.length)) {
                            throw new Error('Internal error: program counter not in range');
                        }
                        _a.label = 1;
                    case 1:
                        if (!(this._runState.programCounter < this._runState.code.length)) return [3 /*break*/, 7];
                        opCode = this._runState.code[this._runState.programCounter];
                        this._runState.opCode = opCode;
                        return [4 /*yield*/, this._runStepHook()];
                    case 2:
                        _a.sent();
                        _a.label = 3;
                    case 3:
                        _a.trys.push([3, 5, , 6]);
                        return [4 /*yield*/, this.runStep()];
                    case 4:
                        _a.sent();
                        return [3 /*break*/, 6];
                    case 5:
                        e_1 = _a.sent();
                        // STOP is not an exception
                        if (e_1.error !== exceptions_1.ERROR.STOP) {
                            err = e_1;
                        }
                        // TODO: Throw on non-VmError exceptions
                        return [3 /*break*/, 7];
                    case 6: return [3 /*break*/, 1];
                    case 7: return [2 /*return*/, {
                            runState: this._runState,
                            exceptionError: err,
                        }];
                }
            });
        });
    };
    /**
     * Executes the opcode to which the program counter is pointing,
     * reducing it's base gas cost, and increments the program counter.
     */
    Interpreter.prototype.runStep = function () {
        return __awaiter(this, void 0, void 0, function () {
            var opInfo, opFn;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        opInfo = this.lookupOpInfo(this._runState.opCode);
                        // Check for invalid opcode
                        if (opInfo.name === 'INVALID') {
                            throw new exceptions_1.VmError(exceptions_1.ERROR.INVALID_OPCODE);
                        }
                        // Reduce opcode's base fee
                        this._eei.useGas(new BN(opInfo.fee));
                        // Advance program counter
                        this._runState.programCounter++;
                        opFn = this.getOpHandler(opInfo);
                        if (!opInfo.isAsync) return [3 /*break*/, 2];
                        return [4 /*yield*/, opFn.apply(null, [this._runState])];
                    case 1:
                        _a.sent();
                        return [3 /*break*/, 3];
                    case 2:
                        opFn.apply(null, [this._runState]);
                        _a.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Get the handler function for an opcode.
     */
    Interpreter.prototype.getOpHandler = function (opInfo) {
        return opFns_1.handlers[opInfo.name];
    };
    /**
     * Get info for an opcode from VM's list of opcodes.
     */
    Interpreter.prototype.lookupOpInfo = function (op, full) {
        if (full === void 0) { full = false; }
        var opcode = this._vm._opcodes[op]
            ? this._vm._opcodes[op]
            : { name: 'INVALID', fee: 0, isAsync: false };
        if (full) {
            var name = opcode.name;
            if (name === 'LOG') {
                name += op - 0xa0;
            }
            if (name === 'PUSH') {
                name += op - 0x5f;
            }
            if (name === 'DUP') {
                name += op - 0x7f;
            }
            if (name === 'SWAP') {
                name += op - 0x8f;
            }
            return __assign(__assign({}, opcode), { name: name });
        }
        return opcode;
    };
    Interpreter.prototype._runStepHook = function () {
        return __awaiter(this, void 0, void 0, function () {
            var eventObj;
            return __generator(this, function (_a) {
                eventObj = {
                    pc: this._runState.programCounter,
                    gasLeft: this._eei.getGasLeft(),
                    opcode: this.lookupOpInfo(this._runState.opCode, true),
                    stack: this._runState.stack._store,
                    depth: this._eei._env.depth,
                    address: this._eei._env.address,
                    account: this._eei._env.contract,
                    stateManager: this._runState.stateManager,
                    memory: this._runState.memory._store,
                    memoryWordCount: this._runState.memoryWordCount,
                    codeAddress: this._eei._env.codeAddress,
                };
                /**
                 * The `step` event for trace output
                 *
                 * @event Event: step
                 * @type {Object}
                 * @property {Number} pc representing the program counter
                 * @property {String} opcode the next opcode to be ran
                 * @property {BN} gasLeft amount of gasLeft
                 * @property {Array} stack an `Array` of `Buffers` containing the stack
                 * @property {Account} account the [`Account`](https://github.com/ethereum/ethereumjs-account) which owns the code running
                 * @property {Buffer} address the address of the `account`
                 * @property {Number} depth the current number of calls deep the contract is
                 * @property {Buffer} memory the memory of the VM as a `buffer`
                 * @property {BN} memoryWordCount current size of memory in words
                 * @property {StateManager} stateManager a [`StateManager`](stateManager.md) instance (Beta API)
                 */
                return [2 /*return*/, this._vm._emit('step', eventObj)];
            });
        });
    };
    // Returns all valid jump destinations.
    Interpreter.prototype._getValidJumpDests = function (code) {
        var jumps = [];
        for (var i = 0; i < code.length; i++) {
            var curOpCode = this.lookupOpInfo(code[i]).name;
            // no destinations into the middle of PUSH
            if (curOpCode === 'PUSH') {
                i += code[i] - 0x5f;
            }
            if (curOpCode === 'JUMPDEST') {
                jumps.push(i);
            }
        }
        return jumps;
    };
    return Interpreter;
}());
exports.default = Interpreter;
//# sourceMappingURL=interpreter.js.map

/***/ }),

/***/ 290569:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
/**
 * Memory implements a simple memory model
 * for the ethereum virtual machine.
 */
var Memory = /** @class */ (function () {
    function Memory() {
        this._store = [];
    }
    /**
     * Extends the memory given an offset and size. Rounds extended
     * memory to word-size.
     */
    Memory.prototype.extend = function (offset, size) {
        if (size === 0) {
            return;
        }
        var newSize = ceil(offset + size, 32);
        var sizeDiff = newSize - this._store.length;
        if (sizeDiff > 0) {
            this._store = this._store.concat(new Array(sizeDiff).fill(0));
        }
    };
    /**
     * Writes a byte array with length `size` to memory, starting from `offset`.
     * @param offset - Starting position
     * @param size - How many bytes to write
     * @param value - Value
     */
    Memory.prototype.write = function (offset, size, value) {
        if (size === 0) {
            return;
        }
        assert(value.length === size, 'Invalid value size');
        assert(offset + size <= this._store.length, 'Value exceeds memory capacity');
        assert(Buffer.isBuffer(value), 'Invalid value type');
        for (var i = 0; i < size; i++) {
            this._store[offset + i] = value[i];
        }
    };
    /**
     * Reads a slice of memory from `offset` till `offset + size` as a `Buffer`.
     * It fills up the difference between memory's length and `offset + size` with zeros.
     * @param offset - Starting position
     * @param size - How many bytes to read
     */
    Memory.prototype.read = function (offset, size) {
        var loaded = this._store.slice(offset, offset + size);
        // Fill the remaining length with zeros
        for (var i = loaded.length; i < size; i++) {
            loaded[i] = 0;
        }
        return Buffer.from(loaded);
    };
    return Memory;
}());
exports.default = Memory;
var ceil = function (value, ceiling) {
    var r = value % ceiling;
    if (r === 0) {
        return value;
    }
    else {
        return value + ceiling - r;
    }
};
//# sourceMappingURL=memory.js.map

/***/ }),

/***/ 823321:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var Message = /** @class */ (function () {
    function Message(opts) {
        this.to = opts.to;
        this.value = opts.value ? new BN(opts.value) : new BN(0);
        this.caller = opts.caller;
        this.gasLimit = opts.gasLimit;
        this.data = opts.data || Buffer.alloc(0);
        this.depth = opts.depth || 0;
        this.code = opts.code;
        this._codeAddress = opts.codeAddress;
        this.isStatic = opts.isStatic || false;
        this.isCompiled = opts.isCompiled || false; // For CALLCODE, TODO: Move from here
        this.salt = opts.salt; // For CREATE2, TODO: Move from here
        this.selfdestruct = opts.selfdestruct; // TODO: Move from here
        this.delegatecall = opts.delegatecall || false;
    }
    Object.defineProperty(Message.prototype, "codeAddress", {
        get: function () {
            return this._codeAddress ? this._codeAddress : this.to;
        },
        enumerable: true,
        configurable: true
    });
    return Message;
}());
exports.default = Message;
//# sourceMappingURL=message.js.map

/***/ }),

/***/ 430267:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var utils = __webpack_require__(425332);
var exceptions_1 = __webpack_require__(764614);
var MASK_160 = new BN(1).shln(160).subn(1);
// Find Ceil(`this` / `num`)
function divCeil(a, b) {
    var div = a.div(b);
    var mod = a.mod(b);
    // Fast case - exact division
    if (mod.isZero())
        return div;
    // Round up
    return div.isNeg() ? div.isubn(1) : div.iaddn(1);
}
function addressToBuffer(address) {
    return address.and(MASK_160).toArrayLike(Buffer, 'be', 20);
}
// the opcode functions
exports.handlers = {
    STOP: function (runState) {
        trap(exceptions_1.ERROR.STOP);
    },
    ADD: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.add(b).mod(utils.TWO_POW256);
        runState.stack.push(r);
    },
    MUL: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.mul(b).mod(utils.TWO_POW256);
        runState.stack.push(r);
    },
    SUB: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.sub(b).toTwos(256);
        runState.stack.push(r);
    },
    DIV: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r;
        if (b.isZero()) {
            r = new BN(b);
        }
        else {
            r = a.div(b);
        }
        runState.stack.push(r);
    },
    SDIV: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r;
        if (b.isZero()) {
            r = new BN(b);
        }
        else {
            a = a.fromTwos(256);
            b = b.fromTwos(256);
            r = a.div(b).toTwos(256);
        }
        runState.stack.push(r);
    },
    MOD: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r;
        if (b.isZero()) {
            r = new BN(b);
        }
        else {
            r = a.mod(b);
        }
        runState.stack.push(r);
    },
    SMOD: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r;
        if (b.isZero()) {
            r = new BN(b);
        }
        else {
            a = a.fromTwos(256);
            b = b.fromTwos(256);
            r = a.abs().mod(b.abs());
            if (a.isNeg()) {
                r = r.ineg();
            }
            r = r.toTwos(256);
        }
        runState.stack.push(r);
    },
    ADDMOD: function (runState) {
        var _a = runState.stack.popN(3), a = _a[0], b = _a[1], c = _a[2];
        var r;
        if (c.isZero()) {
            r = new BN(c);
        }
        else {
            r = a.add(b).mod(c);
        }
        runState.stack.push(r);
    },
    MULMOD: function (runState) {
        var _a = runState.stack.popN(3), a = _a[0], b = _a[1], c = _a[2];
        var r;
        if (c.isZero()) {
            r = new BN(c);
        }
        else {
            r = a.mul(b).mod(c);
        }
        runState.stack.push(r);
    },
    EXP: function (runState) {
        var _a = runState.stack.popN(2), base = _a[0], exponent = _a[1];
        if (exponent.isZero()) {
            runState.stack.push(new BN(1));
            return;
        }
        var byteLength = exponent.byteLength();
        if (byteLength < 1 || byteLength > 32) {
            trap(exceptions_1.ERROR.OUT_OF_RANGE);
        }
        var gasPrice = runState._common.param('gasPrices', 'expByte');
        var amount = new BN(byteLength).muln(gasPrice);
        runState.eei.useGas(amount);
        if (base.isZero()) {
            runState.stack.push(new BN(0));
            return;
        }
        var m = BN.red(utils.TWO_POW256);
        var redBase = base.toRed(m);
        var r = redBase.redPow(exponent);
        runState.stack.push(r.fromRed());
    },
    SIGNEXTEND: function (runState) {
        var _a = runState.stack.popN(2), k = _a[0], val = _a[1];
        if (k.ltn(31)) {
            var signBit = k
                .muln(8)
                .iaddn(7)
                .toNumber();
            var mask = new BN(1).ishln(signBit).isubn(1);
            if (val.testn(signBit)) {
                val = val.or(mask.notn(256));
            }
            else {
                val = val.and(mask);
            }
        }
        else {
            // return the same value
            val = new BN(val);
        }
        runState.stack.push(val);
    },
    // 0x10 range - bit ops
    LT: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = new BN(a.lt(b) ? 1 : 0);
        runState.stack.push(r);
    },
    GT: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = new BN(a.gt(b) ? 1 : 0);
        runState.stack.push(r);
    },
    SLT: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = new BN(a.fromTwos(256).lt(b.fromTwos(256)) ? 1 : 0);
        runState.stack.push(r);
    },
    SGT: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = new BN(a.fromTwos(256).gt(b.fromTwos(256)) ? 1 : 0);
        runState.stack.push(r);
    },
    EQ: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = new BN(a.eq(b) ? 1 : 0);
        runState.stack.push(r);
    },
    ISZERO: function (runState) {
        var a = runState.stack.pop();
        var r = new BN(a.isZero() ? 1 : 0);
        runState.stack.push(r);
    },
    AND: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.and(b);
        runState.stack.push(r);
    },
    OR: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.or(b);
        runState.stack.push(r);
    },
    XOR: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        var r = a.xor(b);
        runState.stack.push(r);
    },
    NOT: function (runState) {
        var a = runState.stack.pop();
        var r = a.notn(256);
        runState.stack.push(r);
    },
    BYTE: function (runState) {
        var _a = runState.stack.popN(2), pos = _a[0], word = _a[1];
        if (pos.gten(32)) {
            runState.stack.push(new BN(0));
            return;
        }
        var r = new BN(word.shrn((31 - pos.toNumber()) * 8).andln(0xff));
        runState.stack.push(r);
    },
    SHL: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        if (!runState._common.gteHardfork('constantinople')) {
            trap(exceptions_1.ERROR.INVALID_OPCODE);
        }
        if (a.gten(256)) {
            runState.stack.push(new BN(0));
            return;
        }
        var r = b.shln(a.toNumber()).iand(utils.MAX_INTEGER);
        runState.stack.push(r);
    },
    SHR: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        if (!runState._common.gteHardfork('constantinople')) {
            trap(exceptions_1.ERROR.INVALID_OPCODE);
        }
        if (a.gten(256)) {
            runState.stack.push(new BN(0));
            return;
        }
        var r = b.shrn(a.toNumber());
        runState.stack.push(r);
    },
    SAR: function (runState) {
        var _a = runState.stack.popN(2), a = _a[0], b = _a[1];
        if (!runState._common.gteHardfork('constantinople')) {
            trap(exceptions_1.ERROR.INVALID_OPCODE);
        }
        var r;
        var isSigned = b.testn(255);
        if (a.gten(256)) {
            if (isSigned) {
                r = new BN(utils.MAX_INTEGER);
            }
            else {
                r = new BN(0);
            }
            runState.stack.push(r);
            return;
        }
        var c = b.shrn(a.toNumber());
        if (isSigned) {
            var shiftedOutWidth = 255 - a.toNumber();
            var mask = utils.MAX_INTEGER.shrn(shiftedOutWidth).shln(shiftedOutWidth);
            r = c.ior(mask);
        }
        else {
            r = c;
        }
        runState.stack.push(r);
    },
    // 0x20 range - crypto
    SHA3: function (runState) {
        var _a = runState.stack.popN(2), offset = _a[0], length = _a[1];
        subMemUsage(runState, offset, length);
        var data = Buffer.alloc(0);
        if (!length.isZero()) {
            data = runState.memory.read(offset.toNumber(), length.toNumber());
        }
        // copy fee
        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sha3Word')).imul(divCeil(length, new BN(32))));
        var r = new BN(utils.keccak256(data));
        runState.stack.push(r);
    },
    // 0x30 range - closure state
    ADDRESS: function (runState) {
        runState.stack.push(new BN(runState.eei.getAddress()));
    },
    BALANCE: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var address, addressBuf, balance;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        address = runState.stack.pop();
                        addressBuf = addressToBuffer(address);
                        return [4 /*yield*/, runState.eei.getExternalBalance(addressBuf)];
                    case 1:
                        balance = _a.sent();
                        runState.stack.push(balance);
                        return [2 /*return*/];
                }
            });
        });
    },
    ORIGIN: function (runState) {
        runState.stack.push(runState.eei.getTxOrigin());
    },
    CALLER: function (runState) {
        runState.stack.push(runState.eei.getCaller());
    },
    CALLVALUE: function (runState) {
        runState.stack.push(runState.eei.getCallValue());
    },
    CALLDATALOAD: function (runState) {
        var pos = runState.stack.pop();
        if (pos.gt(runState.eei.getCallDataSize())) {
            runState.stack.push(new BN(0));
            return;
        }
        var i = pos.toNumber();
        var loaded = runState.eei.getCallData().slice(i, i + 32);
        loaded = loaded.length ? loaded : Buffer.from([0]);
        var r = new BN(utils.setLengthRight(loaded, 32));
        runState.stack.push(r);
    },
    CALLDATASIZE: function (runState) {
        var r = runState.eei.getCallDataSize();
        runState.stack.push(r);
    },
    CALLDATACOPY: function (runState) {
        var _a = runState.stack.popN(3), memOffset = _a[0], dataOffset = _a[1], dataLength = _a[2];
        subMemUsage(runState, memOffset, dataLength);
        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'copy')).imul(divCeil(dataLength, new BN(32))));
        var data = getDataSlice(runState.eei.getCallData(), dataOffset, dataLength);
        var memOffsetNum = memOffset.toNumber();
        var dataLengthNum = dataLength.toNumber();
        runState.memory.extend(memOffsetNum, dataLengthNum);
        runState.memory.write(memOffsetNum, dataLengthNum, data);
    },
    CODESIZE: function (runState) {
        runState.stack.push(runState.eei.getCodeSize());
    },
    CODECOPY: function (runState) {
        var _a = runState.stack.popN(3), memOffset = _a[0], codeOffset = _a[1], length = _a[2];
        subMemUsage(runState, memOffset, length);
        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'copy')).imul(divCeil(length, new BN(32))));
        var data = getDataSlice(runState.eei.getCode(), codeOffset, length);
        var memOffsetNum = memOffset.toNumber();
        var lengthNum = length.toNumber();
        runState.memory.extend(memOffsetNum, lengthNum);
        runState.memory.write(memOffsetNum, lengthNum, data);
    },
    EXTCODESIZE: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var address, size;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        address = runState.stack.pop();
                        return [4 /*yield*/, runState.eei.getExternalCodeSize(address)];
                    case 1:
                        size = _a.sent();
                        runState.stack.push(size);
                        return [2 /*return*/];
                }
            });
        });
    },
    EXTCODECOPY: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, address, memOffset, codeOffset, length, code, data, memOffsetNum, lengthNum;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = runState.stack.popN(4), address = _a[0], memOffset = _a[1], codeOffset = _a[2], length = _a[3];
                        // FIXME: for some reason this must come before subGas
                        subMemUsage(runState, memOffset, length);
                        // copy fee
                        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'copy')).imul(divCeil(length, new BN(32))));
                        return [4 /*yield*/, runState.eei.getExternalCode(address)];
                    case 1:
                        code = _b.sent();
                        data = getDataSlice(code, codeOffset, length);
                        memOffsetNum = memOffset.toNumber();
                        lengthNum = length.toNumber();
                        runState.memory.extend(memOffsetNum, lengthNum);
                        runState.memory.write(memOffsetNum, lengthNum, data);
                        return [2 /*return*/];
                }
            });
        });
    },
    EXTCODEHASH: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var address, addressBuf, empty, code;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        address = runState.stack.pop();
                        if (!runState._common.gteHardfork('constantinople')) {
                            trap(exceptions_1.ERROR.INVALID_OPCODE);
                        }
                        addressBuf = addressToBuffer(address);
                        return [4 /*yield*/, runState.eei.isAccountEmpty(addressBuf)];
                    case 1:
                        empty = _a.sent();
                        if (empty) {
                            runState.stack.push(new BN(0));
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, runState.eei.getExternalCode(address)];
                    case 2:
                        code = _a.sent();
                        if (code.length === 0) {
                            runState.stack.push(new BN(utils.KECCAK256_NULL));
                            return [2 /*return*/];
                        }
                        runState.stack.push(new BN(utils.keccak256(code)));
                        return [2 /*return*/];
                }
            });
        });
    },
    RETURNDATASIZE: function (runState) {
        runState.stack.push(runState.eei.getReturnDataSize());
    },
    RETURNDATACOPY: function (runState) {
        var _a = runState.stack.popN(3), memOffset = _a[0], returnDataOffset = _a[1], length = _a[2];
        if (returnDataOffset.add(length).gt(runState.eei.getReturnDataSize())) {
            trap(exceptions_1.ERROR.OUT_OF_GAS);
        }
        subMemUsage(runState, memOffset, length);
        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'copy')).mul(divCeil(length, new BN(32))));
        var data = getDataSlice(runState.eei.getReturnData(), returnDataOffset, length);
        var memOffsetNum = memOffset.toNumber();
        var lengthNum = length.toNumber();
        runState.memory.extend(memOffsetNum, lengthNum);
        runState.memory.write(memOffsetNum, lengthNum, data);
    },
    GASPRICE: function (runState) {
        runState.stack.push(runState.eei.getTxGasPrice());
    },
    // '0x40' range - block operations
    BLOCKHASH: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var number, diff, hash;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        number = runState.stack.pop();
                        diff = runState.eei.getBlockNumber().sub(number);
                        // block lookups must be within the past 256 blocks
                        if (diff.gtn(256) || diff.lten(0)) {
                            runState.stack.push(new BN(0));
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, runState.eei.getBlockHash(number)];
                    case 1:
                        hash = _a.sent();
                        runState.stack.push(hash);
                        return [2 /*return*/];
                }
            });
        });
    },
    COINBASE: function (runState) {
        runState.stack.push(runState.eei.getBlockCoinbase());
    },
    TIMESTAMP: function (runState) {
        runState.stack.push(runState.eei.getBlockTimestamp());
    },
    NUMBER: function (runState) {
        runState.stack.push(runState.eei.getBlockNumber());
    },
    DIFFICULTY: function (runState) {
        runState.stack.push(runState.eei.getBlockDifficulty());
    },
    GASLIMIT: function (runState) {
        runState.stack.push(runState.eei.getBlockGasLimit());
    },
    CHAINID: function (runState) {
        if (!runState._common.gteHardfork('istanbul')) {
            trap(exceptions_1.ERROR.INVALID_OPCODE);
        }
        runState.stack.push(runState.eei.getChainId());
    },
    SELFBALANCE: function (runState) {
        if (!runState._common.gteHardfork('istanbul')) {
            trap(exceptions_1.ERROR.INVALID_OPCODE);
        }
        runState.stack.push(runState.eei.getSelfBalance());
    },
    // 0x50 range - 'storage' and execution
    POP: function (runState) {
        runState.stack.pop();
    },
    MLOAD: function (runState) {
        var pos = runState.stack.pop();
        subMemUsage(runState, pos, new BN(32));
        var word = runState.memory.read(pos.toNumber(), 32);
        runState.stack.push(new BN(word));
    },
    MSTORE: function (runState) {
        var _a = runState.stack.popN(2), offset = _a[0], word = _a[1];
        var buf = word.toArrayLike(Buffer, 'be', 32);
        subMemUsage(runState, offset, new BN(32));
        var offsetNum = offset.toNumber();
        runState.memory.extend(offsetNum, 32);
        runState.memory.write(offsetNum, 32, buf);
    },
    MSTORE8: function (runState) {
        var _a = runState.stack.popN(2), offset = _a[0], byte = _a[1];
        // NOTE: we're using a 'trick' here to get the least significant byte
        // NOTE: force cast necessary because `BN.andln` returns number but
        // the types are wrong
        var buf = Buffer.from([byte.andln(0xff)]);
        subMemUsage(runState, offset, new BN(1));
        var offsetNum = offset.toNumber();
        runState.memory.extend(offsetNum, 1);
        runState.memory.write(offsetNum, 1, buf);
    },
    SLOAD: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var key, keyBuf, value, valueBN;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        key = runState.stack.pop();
                        keyBuf = key.toArrayLike(Buffer, 'be', 32);
                        return [4 /*yield*/, runState.eei.storageLoad(keyBuf)];
                    case 1:
                        value = _a.sent();
                        valueBN = value.length ? new BN(value) : new BN(0);
                        runState.stack.push(valueBN);
                        return [2 /*return*/];
                }
            });
        });
    },
    SSTORE: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, key, val, keyBuf, value, found;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (runState.eei.isStatic()) {
                            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
                        }
                        _a = runState.stack.popN(2), key = _a[0], val = _a[1];
                        keyBuf = key.toArrayLike(Buffer, 'be', 32);
                        if (val.isZero()) {
                            value = Buffer.from([]);
                        }
                        else {
                            value = val.toArrayLike(Buffer, 'be');
                        }
                        return [4 /*yield*/, getContractStorage(runState, runState.eei.getAddress(), keyBuf)];
                    case 1:
                        found = _b.sent();
                        updateSstoreGas(runState, found, value);
                        return [4 /*yield*/, runState.eei.storageStore(keyBuf, value)];
                    case 2:
                        _b.sent();
                        return [2 /*return*/];
                }
            });
        });
    },
    JUMP: function (runState) {
        var dest = runState.stack.pop();
        if (dest.gt(runState.eei.getCodeSize())) {
            trap(exceptions_1.ERROR.INVALID_JUMP + ' at ' + describeLocation(runState));
        }
        var destNum = dest.toNumber();
        if (!jumpIsValid(runState, destNum)) {
            trap(exceptions_1.ERROR.INVALID_JUMP + ' at ' + describeLocation(runState));
        }
        runState.programCounter = destNum;
    },
    JUMPI: function (runState) {
        var _a = runState.stack.popN(2), dest = _a[0], cond = _a[1];
        if (!cond.isZero()) {
            if (dest.gt(runState.eei.getCodeSize())) {
                trap(exceptions_1.ERROR.INVALID_JUMP + ' at ' + describeLocation(runState));
            }
            var destNum = dest.toNumber();
            if (!jumpIsValid(runState, destNum)) {
                trap(exceptions_1.ERROR.INVALID_JUMP + ' at ' + describeLocation(runState));
            }
            runState.programCounter = destNum;
        }
    },
    PC: function (runState) {
        runState.stack.push(new BN(runState.programCounter - 1));
    },
    MSIZE: function (runState) {
        runState.stack.push(runState.memoryWordCount.muln(32));
    },
    GAS: function (runState) {
        runState.stack.push(new BN(runState.eei.getGasLeft()));
    },
    JUMPDEST: function (runState) { },
    PUSH: function (runState) {
        var numToPush = runState.opCode - 0x5f;
        var loaded = new BN(runState.eei
            .getCode()
            .slice(runState.programCounter, runState.programCounter + numToPush)
            .toString('hex'), 16);
        runState.programCounter += numToPush;
        runState.stack.push(loaded);
    },
    DUP: function (runState) {
        var stackPos = runState.opCode - 0x7f;
        runState.stack.dup(stackPos);
    },
    SWAP: function (runState) {
        var stackPos = runState.opCode - 0x8f;
        runState.stack.swap(stackPos);
    },
    LOG: function (runState) {
        if (runState.eei.isStatic()) {
            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
        }
        var _a = runState.stack.popN(2), memOffset = _a[0], memLength = _a[1];
        var topicsCount = runState.opCode - 0xa0;
        if (topicsCount < 0 || topicsCount > 4) {
            trap(exceptions_1.ERROR.OUT_OF_RANGE);
        }
        var topics = runState.stack.popN(topicsCount);
        var topicsBuf = topics.map(function (a) {
            return a.toArrayLike(Buffer, 'be', 32);
        });
        subMemUsage(runState, memOffset, memLength);
        var mem = Buffer.alloc(0);
        if (!memLength.isZero()) {
            mem = runState.memory.read(memOffset.toNumber(), memLength.toNumber());
        }
        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'logTopic'))
            .imuln(topicsCount)
            .iadd(memLength.muln(runState._common.param('gasPrices', 'logData'))));
        runState.eei.log(mem, topicsCount, topicsBuf);
    },
    // '0xf0' range - closures
    CREATE: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, value, offset, length, gasLimit, data, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (runState.eei.isStatic()) {
                            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
                        }
                        _a = runState.stack.popN(3), value = _a[0], offset = _a[1], length = _a[2];
                        subMemUsage(runState, offset, length);
                        gasLimit = new BN(runState.eei.getGasLeft());
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        data = Buffer.alloc(0);
                        if (!length.isZero()) {
                            data = runState.memory.read(offset.toNumber(), length.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.create(gasLimit, value, data)];
                    case 1:
                        ret = _b.sent();
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    CREATE2: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, value, offset, length, salt, gasLimit, data, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!runState._common.gteHardfork('constantinople')) {
                            trap(exceptions_1.ERROR.INVALID_OPCODE);
                        }
                        if (runState.eei.isStatic()) {
                            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
                        }
                        _a = runState.stack.popN(4), value = _a[0], offset = _a[1], length = _a[2], salt = _a[3];
                        subMemUsage(runState, offset, length);
                        // Deduct gas costs for hashing
                        runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sha3Word')).imul(divCeil(length, new BN(32))));
                        gasLimit = new BN(runState.eei.getGasLeft());
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        data = Buffer.alloc(0);
                        if (!length.isZero()) {
                            data = runState.memory.read(offset.toNumber(), length.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.create2(gasLimit, value, data, salt.toArrayLike(Buffer, 'be', 32))];
                    case 1:
                        ret = _b.sent();
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    CALL: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, gasLimit, toAddress, value, inOffset, inLength, outOffset, outLength, toAddressBuf, data, empty, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = runState.stack.popN(7), gasLimit = _a[0], toAddress = _a[1], value = _a[2], inOffset = _a[3], inLength = _a[4], outOffset = _a[5], outLength = _a[6];
                        toAddressBuf = addressToBuffer(toAddress);
                        if (runState.eei.isStatic() && !value.isZero()) {
                            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
                        }
                        subMemUsage(runState, inOffset, inLength);
                        subMemUsage(runState, outOffset, outLength);
                        if (!value.isZero()) {
                            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'callValueTransfer')));
                        }
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        data = Buffer.alloc(0);
                        if (!inLength.isZero()) {
                            data = runState.memory.read(inOffset.toNumber(), inLength.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.isAccountEmpty(toAddressBuf)];
                    case 1:
                        empty = _b.sent();
                        if (empty) {
                            if (!value.isZero()) {
                                runState.eei.useGas(new BN(runState._common.param('gasPrices', 'callNewAccount')));
                            }
                        }
                        if (!value.isZero()) {
                            // TODO: Don't use private attr directly
                            runState.eei._gasLeft.iaddn(runState._common.param('gasPrices', 'callStipend'));
                            gasLimit.iaddn(runState._common.param('gasPrices', 'callStipend'));
                        }
                        return [4 /*yield*/, runState.eei.call(gasLimit, toAddressBuf, value, data)
                            // Write return data to memory
                        ];
                    case 2:
                        ret = _b.sent();
                        // Write return data to memory
                        writeCallOutput(runState, outOffset, outLength);
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    CALLCODE: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, gasLimit, toAddress, value, inOffset, inLength, outOffset, outLength, toAddressBuf, data, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = runState.stack.popN(7), gasLimit = _a[0], toAddress = _a[1], value = _a[2], inOffset = _a[3], inLength = _a[4], outOffset = _a[5], outLength = _a[6];
                        toAddressBuf = addressToBuffer(toAddress);
                        subMemUsage(runState, inOffset, inLength);
                        subMemUsage(runState, outOffset, outLength);
                        if (!value.isZero()) {
                            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'callValueTransfer')));
                        }
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        if (!value.isZero()) {
                            // TODO: Don't use private attr directly
                            runState.eei._gasLeft.iaddn(runState._common.param('gasPrices', 'callStipend'));
                            gasLimit.iaddn(runState._common.param('gasPrices', 'callStipend'));
                        }
                        data = Buffer.alloc(0);
                        if (!inLength.isZero()) {
                            data = runState.memory.read(inOffset.toNumber(), inLength.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.callCode(gasLimit, toAddressBuf, value, data)
                            // Write return data to memory
                        ];
                    case 1:
                        ret = _b.sent();
                        // Write return data to memory
                        writeCallOutput(runState, outOffset, outLength);
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    DELEGATECALL: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var value, _a, gasLimit, toAddress, inOffset, inLength, outOffset, outLength, toAddressBuf, data, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        value = runState.eei.getCallValue();
                        _a = runState.stack.popN(6), gasLimit = _a[0], toAddress = _a[1], inOffset = _a[2], inLength = _a[3], outOffset = _a[4], outLength = _a[5];
                        toAddressBuf = addressToBuffer(toAddress);
                        subMemUsage(runState, inOffset, inLength);
                        subMemUsage(runState, outOffset, outLength);
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        data = Buffer.alloc(0);
                        if (!inLength.isZero()) {
                            data = runState.memory.read(inOffset.toNumber(), inLength.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.callDelegate(gasLimit, toAddressBuf, value, data)
                            // Write return data to memory
                        ];
                    case 1:
                        ret = _b.sent();
                        // Write return data to memory
                        writeCallOutput(runState, outOffset, outLength);
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    STATICCALL: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var value, _a, gasLimit, toAddress, inOffset, inLength, outOffset, outLength, toAddressBuf, data, ret;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        value = new BN(0);
                        _a = runState.stack.popN(6), gasLimit = _a[0], toAddress = _a[1], inOffset = _a[2], inLength = _a[3], outOffset = _a[4], outLength = _a[5];
                        toAddressBuf = addressToBuffer(toAddress);
                        subMemUsage(runState, inOffset, inLength);
                        subMemUsage(runState, outOffset, outLength);
                        gasLimit = maxCallGas(gasLimit, runState.eei.getGasLeft());
                        data = Buffer.alloc(0);
                        if (!inLength.isZero()) {
                            data = runState.memory.read(inOffset.toNumber(), inLength.toNumber());
                        }
                        return [4 /*yield*/, runState.eei.callStatic(gasLimit, toAddressBuf, value, data)
                            // Write return data to memory
                        ];
                    case 1:
                        ret = _b.sent();
                        // Write return data to memory
                        writeCallOutput(runState, outOffset, outLength);
                        runState.stack.push(ret);
                        return [2 /*return*/];
                }
            });
        });
    },
    RETURN: function (runState) {
        var _a = runState.stack.popN(2), offset = _a[0], length = _a[1];
        subMemUsage(runState, offset, length);
        var returnData = Buffer.alloc(0);
        if (!length.isZero()) {
            returnData = runState.memory.read(offset.toNumber(), length.toNumber());
        }
        runState.eei.finish(returnData);
    },
    REVERT: function (runState) {
        var _a = runState.stack.popN(2), offset = _a[0], length = _a[1];
        subMemUsage(runState, offset, length);
        var returnData = Buffer.alloc(0);
        if (!length.isZero()) {
            returnData = runState.memory.read(offset.toNumber(), length.toNumber());
        }
        runState.eei.revert(returnData);
    },
    // '0x70', range - other
    SELFDESTRUCT: function (runState) {
        return __awaiter(this, void 0, void 0, function () {
            var selfdestructToAddress, selfdestructToAddressBuf, balance, empty;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        selfdestructToAddress = runState.stack.pop();
                        if (runState.eei.isStatic()) {
                            trap(exceptions_1.ERROR.STATIC_STATE_CHANGE);
                        }
                        selfdestructToAddressBuf = addressToBuffer(selfdestructToAddress);
                        return [4 /*yield*/, runState.eei.getExternalBalance(runState.eei.getAddress())];
                    case 1:
                        balance = _a.sent();
                        if (!balance.gtn(0)) return [3 /*break*/, 3];
                        return [4 /*yield*/, runState.eei.isAccountEmpty(selfdestructToAddressBuf)];
                    case 2:
                        empty = _a.sent();
                        if (empty) {
                            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'callNewAccount')));
                        }
                        _a.label = 3;
                    case 3: return [2 /*return*/, runState.eei.selfDestruct(selfdestructToAddressBuf)];
                }
            });
        });
    },
};
function describeLocation(runState) {
    var hash = utils.keccak256(runState.eei.getCode()).toString('hex');
    var address = runState.eei.getAddress().toString('hex');
    var pc = runState.programCounter - 1;
    return hash + '/' + address + ':' + pc;
}
function trap(err) {
    // TODO: facilitate extra data along with errors
    throw new exceptions_1.VmError(err);
}
/**
 * Subtracts the amount needed for memory usage from `runState.gasLeft`
 * @method subMemUsage
 * @param {Object} runState
 * @param {BN} offset
 * @param {BN} length
 * @returns {String}
 */
function subMemUsage(runState, offset, length) {
    // YP (225): access with zero length will not extend the memory
    if (length.isZero())
        return;
    var newMemoryWordCount = divCeil(offset.add(length), new BN(32));
    if (newMemoryWordCount.lte(runState.memoryWordCount))
        return;
    var words = newMemoryWordCount;
    var fee = new BN(runState._common.param('gasPrices', 'memory'));
    var quadCoeff = new BN(runState._common.param('gasPrices', 'quadCoeffDiv'));
    // words * 3 + words ^2 / 512
    var cost = words.mul(fee).add(words.mul(words).div(quadCoeff));
    if (cost.gt(runState.highestMemCost)) {
        runState.eei.useGas(cost.sub(runState.highestMemCost));
        runState.highestMemCost = cost;
    }
    runState.memoryWordCount = newMemoryWordCount;
}
/**
 * Returns an overflow-safe slice of an array. It right-pads
 * the data with zeros to `length`.
 * @param {BN} offset
 * @param {BN} length
 * @param {Buffer} data
 */
function getDataSlice(data, offset, length) {
    var len = new BN(data.length);
    if (offset.gt(len)) {
        offset = len;
    }
    var end = offset.add(length);
    if (end.gt(len)) {
        end = len;
    }
    data = data.slice(offset.toNumber(), end.toNumber());
    // Right-pad with zeros to fill dataLength bytes
    data = utils.setLengthRight(data, length.toNumber());
    return data;
}
// checks if a jump is valid given a destination
function jumpIsValid(runState, dest) {
    return runState.validJumps.indexOf(dest) !== -1;
}
function maxCallGas(gasLimit, gasLeft) {
    var gasAllowed = gasLeft.sub(gasLeft.divn(64));
    return gasLimit.gt(gasAllowed) ? gasAllowed : gasLimit;
}
function getContractStorage(runState, address, key) {
    return new Promise(function (resolve, reject) {
        var cb = function (err, res) {
            if (err)
                return reject(err);
            resolve(res);
        };
        runState.stateManager.getContractStorage(address, key, function (err, current) {
            if (err)
                return cb(err, null);
            if (runState._common.hardfork() === 'constantinople' ||
                runState._common.gteHardfork('istanbul')) {
                runState.stateManager.getOriginalContractStorage(address, key, function (err, original) {
                    if (err)
                        return cb(err, null);
                    cb(null, { current: current, original: original });
                });
            }
            else {
                cb(null, current);
            }
        });
    });
}
function updateSstoreGas(runState, found, value) {
    if (runState._common.hardfork() === 'constantinople') {
        var original = found.original;
        var current = found.current;
        if (current.equals(value)) {
            // If current value equals new value (this is a no-op), 200 gas is deducted.
            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'netSstoreNoopGas')));
            return;
        }
        // If current value does not equal new value
        if (original.equals(current)) {
            // If original value equals current value (this storage slot has not been changed by the current execution context)
            if (original.length === 0) {
                // If original value is 0, 20000 gas is deducted.
                return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'netSstoreInitGas')));
            }
            if (value.length === 0) {
                // If new value is 0, add 15000 gas to refund counter.
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')));
            }
            // Otherwise, 5000 gas is deducted.
            return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'netSstoreCleanGas')));
        }
        // If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses.
        if (original.length !== 0) {
            // If original value is not 0
            if (current.length === 0) {
                // If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0.
                runState.eei.subRefund(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')));
            }
            else if (value.length === 0) {
                // If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter.
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')));
            }
        }
        if (original.equals(value)) {
            // If original value equals new value (this storage slot is reset)
            if (original.length === 0) {
                // If original value is 0, add 19800 gas to refund counter.
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'netSstoreResetClearRefund')));
            }
            else {
                // Otherwise, add 4800 gas to refund counter.
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'netSstoreResetRefund')));
            }
        }
        return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'netSstoreDirtyGas')));
    }
    else if (runState._common.gteHardfork('istanbul')) {
        // EIP-2200
        var original_1 = found.original;
        var current_1 = found.current;
        // Fail if not enough gas is left
        if (runState.eei.getGasLeft().lten(runState._common.param('gasPrices', 'sstoreSentryGasEIP2200'))) {
            trap(exceptions_1.ERROR.OUT_OF_GAS);
        }
        // Noop
        if (current_1.equals(value)) {
            return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreNoopGasEIP2200')));
        }
        if (original_1.equals(current_1)) {
            // Create slot
            if (original_1.length === 0) {
                return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreInitGasEIP2200')));
            }
            // Delete slot
            if (value.length === 0) {
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'sstoreClearRefundEIP2200')));
            }
            // Write existing slot
            return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreCleanGasEIP2200')));
        }
        if (original_1.length > 0) {
            if (current_1.length === 0) {
                // Recreate slot
                runState.eei.subRefund(new BN(runState._common.param('gasPrices', 'sstoreClearRefundEIP2200')));
            }
            else if (value.length === 0) {
                // Delete slot
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'sstoreClearRefundEIP2200')));
            }
        }
        if (original_1.equals(value)) {
            if (original_1.length === 0) {
                // Reset to original non-existent slot
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'sstoreInitRefundEIP2200')));
            }
            else {
                // Reset to original existing slot
                runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'sstoreCleanRefundEIP2200')));
            }
        }
        // Dirty update
        return runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreDirtyGasEIP2200')));
    }
    else {
        if (value.length === 0 && !found.length) {
            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreReset')));
        }
        else if (value.length === 0 && found.length) {
            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreReset')));
            runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'sstoreRefund')));
        }
        else if (value.length !== 0 && !found.length) {
            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreSet')));
        }
        else if (value.length !== 0 && found.length) {
            runState.eei.useGas(new BN(runState._common.param('gasPrices', 'sstoreReset')));
        }
    }
}
function writeCallOutput(runState, outOffset, outLength) {
    var returnData = runState.eei.getReturnData();
    if (returnData.length > 0) {
        var memOffset = outOffset.toNumber();
        var dataLength = outLength.toNumber();
        if (returnData.length < dataLength) {
            dataLength = returnData.length;
        }
        var data = getDataSlice(returnData, new BN(0), new BN(dataLength));
        runState.memory.extend(memOffset, dataLength);
        runState.memory.write(memOffset, dataLength, data);
    }
}
//# sourceMappingURL=opFns.js.map

/***/ }),

/***/ 89601:
/***/ (function(__unused_webpack_module, exports) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var opcodes = {
    // 0x0 range - arithmetic ops
    // name, baseCost, async
    0x00: { name: 'STOP', fee: 0, isAsync: false },
    0x01: { name: 'ADD', fee: 3, isAsync: false },
    0x02: { name: 'MUL', fee: 5, isAsync: false },
    0x03: { name: 'SUB', fee: 3, isAsync: false },
    0x04: { name: 'DIV', fee: 5, isAsync: false },
    0x05: { name: 'SDIV', fee: 5, isAsync: false },
    0x06: { name: 'MOD', fee: 5, isAsync: false },
    0x07: { name: 'SMOD', fee: 5, isAsync: false },
    0x08: { name: 'ADDMOD', fee: 8, isAsync: false },
    0x09: { name: 'MULMOD', fee: 8, isAsync: false },
    0x0a: { name: 'EXP', fee: 10, isAsync: false },
    0x0b: { name: 'SIGNEXTEND', fee: 5, isAsync: false },
    // 0x10 range - bit ops
    0x10: { name: 'LT', fee: 3, isAsync: false },
    0x11: { name: 'GT', fee: 3, isAsync: false },
    0x12: { name: 'SLT', fee: 3, isAsync: false },
    0x13: { name: 'SGT', fee: 3, isAsync: false },
    0x14: { name: 'EQ', fee: 3, isAsync: false },
    0x15: { name: 'ISZERO', fee: 3, isAsync: false },
    0x16: { name: 'AND', fee: 3, isAsync: false },
    0x17: { name: 'OR', fee: 3, isAsync: false },
    0x18: { name: 'XOR', fee: 3, isAsync: false },
    0x19: { name: 'NOT', fee: 3, isAsync: false },
    0x1a: { name: 'BYTE', fee: 3, isAsync: false },
    0x1b: { name: 'SHL', fee: 3, isAsync: false },
    0x1c: { name: 'SHR', fee: 3, isAsync: false },
    0x1d: { name: 'SAR', fee: 3, isAsync: false },
    // 0x20 range - crypto
    0x20: { name: 'SHA3', fee: 30, isAsync: false },
    // 0x30 range - closure state
    0x30: { name: 'ADDRESS', fee: 2, isAsync: true },
    0x31: { name: 'BALANCE', fee: 400, isAsync: true },
    0x32: { name: 'ORIGIN', fee: 2, isAsync: true },
    0x33: { name: 'CALLER', fee: 2, isAsync: true },
    0x34: { name: 'CALLVALUE', fee: 2, isAsync: true },
    0x35: { name: 'CALLDATALOAD', fee: 3, isAsync: true },
    0x36: { name: 'CALLDATASIZE', fee: 2, isAsync: true },
    0x37: { name: 'CALLDATACOPY', fee: 3, isAsync: true },
    0x38: { name: 'CODESIZE', fee: 2, isAsync: false },
    0x39: { name: 'CODECOPY', fee: 3, isAsync: false },
    0x3a: { name: 'GASPRICE', fee: 2, isAsync: false },
    0x3b: { name: 'EXTCODESIZE', fee: 700, isAsync: true },
    0x3c: { name: 'EXTCODECOPY', fee: 700, isAsync: true },
    0x3d: { name: 'RETURNDATASIZE', fee: 2, isAsync: true },
    0x3e: { name: 'RETURNDATACOPY', fee: 3, isAsync: true },
    0x3f: { name: 'EXTCODEHASH', fee: 400, isAsync: true },
    // '0x40' range - block operations
    0x40: { name: 'BLOCKHASH', fee: 20, isAsync: true },
    0x41: { name: 'COINBASE', fee: 2, isAsync: true },
    0x42: { name: 'TIMESTAMP', fee: 2, isAsync: true },
    0x43: { name: 'NUMBER', fee: 2, isAsync: true },
    0x44: { name: 'DIFFICULTY', fee: 2, isAsync: true },
    0x45: { name: 'GASLIMIT', fee: 2, isAsync: true },
    // 0x50 range - 'storage' and execution
    0x50: { name: 'POP', fee: 2, isAsync: false },
    0x51: { name: 'MLOAD', fee: 3, isAsync: false },
    0x52: { name: 'MSTORE', fee: 3, isAsync: false },
    0x53: { name: 'MSTORE8', fee: 3, isAsync: false },
    0x54: { name: 'SLOAD', fee: 200, isAsync: true },
    0x55: { name: 'SSTORE', fee: 0, isAsync: true },
    0x56: { name: 'JUMP', fee: 8, isAsync: false },
    0x57: { name: 'JUMPI', fee: 10, isAsync: false },
    0x58: { name: 'PC', fee: 2, isAsync: false },
    0x59: { name: 'MSIZE', fee: 2, isAsync: false },
    0x5a: { name: 'GAS', fee: 2, isAsync: false },
    0x5b: { name: 'JUMPDEST', fee: 1, isAsync: false },
    // 0x60, range
    0x60: { name: 'PUSH', fee: 3, isAsync: false },
    0x61: { name: 'PUSH', fee: 3, isAsync: false },
    0x62: { name: 'PUSH', fee: 3, isAsync: false },
    0x63: { name: 'PUSH', fee: 3, isAsync: false },
    0x64: { name: 'PUSH', fee: 3, isAsync: false },
    0x65: { name: 'PUSH', fee: 3, isAsync: false },
    0x66: { name: 'PUSH', fee: 3, isAsync: false },
    0x67: { name: 'PUSH', fee: 3, isAsync: false },
    0x68: { name: 'PUSH', fee: 3, isAsync: false },
    0x69: { name: 'PUSH', fee: 3, isAsync: false },
    0x6a: { name: 'PUSH', fee: 3, isAsync: false },
    0x6b: { name: 'PUSH', fee: 3, isAsync: false },
    0x6c: { name: 'PUSH', fee: 3, isAsync: false },
    0x6d: { name: 'PUSH', fee: 3, isAsync: false },
    0x6e: { name: 'PUSH', fee: 3, isAsync: false },
    0x6f: { name: 'PUSH', fee: 3, isAsync: false },
    0x70: { name: 'PUSH', fee: 3, isAsync: false },
    0x71: { name: 'PUSH', fee: 3, isAsync: false },
    0x72: { name: 'PUSH', fee: 3, isAsync: false },
    0x73: { name: 'PUSH', fee: 3, isAsync: false },
    0x74: { name: 'PUSH', fee: 3, isAsync: false },
    0x75: { name: 'PUSH', fee: 3, isAsync: false },
    0x76: { name: 'PUSH', fee: 3, isAsync: false },
    0x77: { name: 'PUSH', fee: 3, isAsync: false },
    0x78: { name: 'PUSH', fee: 3, isAsync: false },
    0x79: { name: 'PUSH', fee: 3, isAsync: false },
    0x7a: { name: 'PUSH', fee: 3, isAsync: false },
    0x7b: { name: 'PUSH', fee: 3, isAsync: false },
    0x7c: { name: 'PUSH', fee: 3, isAsync: false },
    0x7d: { name: 'PUSH', fee: 3, isAsync: false },
    0x7e: { name: 'PUSH', fee: 3, isAsync: false },
    0x7f: { name: 'PUSH', fee: 3, isAsync: false },
    0x80: { name: 'DUP', fee: 3, isAsync: false },
    0x81: { name: 'DUP', fee: 3, isAsync: false },
    0x82: { name: 'DUP', fee: 3, isAsync: false },
    0x83: { name: 'DUP', fee: 3, isAsync: false },
    0x84: { name: 'DUP', fee: 3, isAsync: false },
    0x85: { name: 'DUP', fee: 3, isAsync: false },
    0x86: { name: 'DUP', fee: 3, isAsync: false },
    0x87: { name: 'DUP', fee: 3, isAsync: false },
    0x88: { name: 'DUP', fee: 3, isAsync: false },
    0x89: { name: 'DUP', fee: 3, isAsync: false },
    0x8a: { name: 'DUP', fee: 3, isAsync: false },
    0x8b: { name: 'DUP', fee: 3, isAsync: false },
    0x8c: { name: 'DUP', fee: 3, isAsync: false },
    0x8d: { name: 'DUP', fee: 3, isAsync: false },
    0x8e: { name: 'DUP', fee: 3, isAsync: false },
    0x8f: { name: 'DUP', fee: 3, isAsync: false },
    0x90: { name: 'SWAP', fee: 3, isAsync: false },
    0x91: { name: 'SWAP', fee: 3, isAsync: false },
    0x92: { name: 'SWAP', fee: 3, isAsync: false },
    0x93: { name: 'SWAP', fee: 3, isAsync: false },
    0x94: { name: 'SWAP', fee: 3, isAsync: false },
    0x95: { name: 'SWAP', fee: 3, isAsync: false },
    0x96: { name: 'SWAP', fee: 3, isAsync: false },
    0x97: { name: 'SWAP', fee: 3, isAsync: false },
    0x98: { name: 'SWAP', fee: 3, isAsync: false },
    0x99: { name: 'SWAP', fee: 3, isAsync: false },
    0x9a: { name: 'SWAP', fee: 3, isAsync: false },
    0x9b: { name: 'SWAP', fee: 3, isAsync: false },
    0x9c: { name: 'SWAP', fee: 3, isAsync: false },
    0x9d: { name: 'SWAP', fee: 3, isAsync: false },
    0x9e: { name: 'SWAP', fee: 3, isAsync: false },
    0x9f: { name: 'SWAP', fee: 3, isAsync: false },
    0xa0: { name: 'LOG', fee: 375, isAsync: false },
    0xa1: { name: 'LOG', fee: 375, isAsync: false },
    0xa2: { name: 'LOG', fee: 375, isAsync: false },
    0xa3: { name: 'LOG', fee: 375, isAsync: false },
    0xa4: { name: 'LOG', fee: 375, isAsync: false },
    // '0xf0' range - closures
    0xf0: { name: 'CREATE', fee: 32000, isAsync: true },
    0xf1: { name: 'CALL', fee: 700, isAsync: true },
    0xf2: { name: 'CALLCODE', fee: 700, isAsync: true },
    0xf3: { name: 'RETURN', fee: 0, isAsync: false },
    0xf4: { name: 'DELEGATECALL', fee: 700, isAsync: true },
    0xf5: { name: 'CREATE2', fee: 32000, isAsync: true },
    0xfa: { name: 'STATICCALL', fee: 700, isAsync: true },
    0xfd: { name: 'REVERT', fee: 0, isAsync: false },
    // '0x70', range - other
    0xfe: { name: 'INVALID', fee: 0, isAsync: false },
    0xff: { name: 'SELFDESTRUCT', fee: 5000, isAsync: true },
};
var istanbulOpcodes = {
    0x31: { name: 'BALANCE', fee: 700, isAsync: true },
    0x3f: { name: 'EXTCODEHASH', fee: 700, isAsync: true },
    0x46: { name: 'CHAINID', fee: 2, isAsync: false },
    0x47: { name: 'SELFBALANCE', fee: 5, isAsync: false },
    0x54: { name: 'SLOAD', fee: 800, isAsync: true },
};
function getOpcodesForHF(common) {
    if (common.gteHardfork('istanbul')) {
        return __assign(__assign({}, opcodes), istanbulOpcodes);
    }
    else {
        return __assign({}, opcodes);
    }
}
exports.getOpcodesForHF = getOpcodesForHF;
//# sourceMappingURL=opcodes.js.map

/***/ }),

/***/ 123173:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
function default_1(opts) {
    assert(opts.data);
    var gasUsed = new BN(opts._common.param('gasPrices', 'ecRecover'));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var data = ethereumjs_util_1.setLengthRight(opts.data, 128);
    var msgHash = data.slice(0, 32);
    var v = data.slice(32, 64);
    var r = data.slice(64, 96);
    var s = data.slice(96, 128);
    var publicKey;
    try {
        publicKey = ethereumjs_util_1.ecrecover(msgHash, new BN(v).toNumber(), r, s);
    }
    catch (e) {
        return {
            gasUsed: gasUsed,
            returnValue: Buffer.alloc(0),
        };
    }
    return {
        gasUsed: gasUsed,
        returnValue: ethereumjs_util_1.setLengthLeft(ethereumjs_util_1.publicToAddress(publicKey), 32),
    };
}
exports.default = default_1;
//# sourceMappingURL=01-ecrecover.js.map

/***/ }),

/***/ 805741:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
function default_1(opts) {
    assert(opts.data);
    var data = opts.data;
    var gasUsed = new BN(opts._common.param('gasPrices', 'sha256'));
    gasUsed.iadd(new BN(opts._common.param('gasPrices', 'sha256Word')).imuln(Math.ceil(data.length / 32)));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: ethereumjs_util_1.sha256(data),
    };
}
exports.default = default_1;
//# sourceMappingURL=02-sha256.js.map

/***/ }),

/***/ 58754:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
function default_1(opts) {
    assert(opts.data);
    var data = opts.data;
    var gasUsed = new BN(opts._common.param('gasPrices', 'ripemd160'));
    gasUsed.iadd(new BN(opts._common.param('gasPrices', 'ripemd160Word')).imuln(Math.ceil(data.length / 32)));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: ethereumjs_util_1.ripemd160(data, true),
    };
}
exports.default = default_1;
//# sourceMappingURL=03-ripemd160.js.map

/***/ }),

/***/ 625856:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
function default_1(opts) {
    assert(opts.data);
    var data = opts.data;
    var gasUsed = new BN(opts._common.param('gasPrices', 'identity'));
    gasUsed.iadd(new BN(opts._common.param('gasPrices', 'identityWord')).imuln(Math.ceil(data.length / 32)));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: data,
    };
}
exports.default = default_1;
//# sourceMappingURL=04-identity.js.map

/***/ }),

/***/ 607563:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
function multComplexity(x) {
    var fac1;
    var fac2;
    if (x.lten(64)) {
        return x.sqr();
    }
    else if (x.lten(1024)) {
        // return Math.floor(Math.pow(x, 2) / 4) + 96 * x - 3072
        fac1 = x.sqr().divn(4);
        fac2 = x.muln(96);
        return fac1.add(fac2).subn(3072);
    }
    else {
        // return Math.floor(Math.pow(x, 2) / 16) + 480 * x - 199680
        fac1 = x.sqr().divn(16);
        fac2 = x.muln(480);
        return fac1.add(fac2).subn(199680);
    }
}
function getAdjustedExponentLength(data) {
    var expBytesStart;
    try {
        var baseLen = new BN(data.slice(0, 32)).toNumber();
        expBytesStart = 96 + baseLen; // 96 for base length, then exponent length, and modulus length, then baseLen for the base data, then exponent bytes start
    }
    catch (e) {
        expBytesStart = Number.MAX_SAFE_INTEGER - 32;
    }
    var expLen = new BN(data.slice(32, 64));
    var firstExpBytes = Buffer.from(data.slice(expBytesStart, expBytesStart + 32)); // first word of the exponent data
    firstExpBytes = ethereumjs_util_1.setLengthRight(firstExpBytes, 32); // reading past the data reads virtual zeros
    var firstExpBN = new BN(firstExpBytes);
    var max32expLen = 0;
    if (expLen.ltn(32)) {
        max32expLen = 32 - expLen.toNumber();
    }
    firstExpBN = firstExpBN.shrn(8 * Math.max(max32expLen, 0));
    var bitLen = -1;
    while (firstExpBN.gtn(0)) {
        bitLen = bitLen + 1;
        firstExpBN = firstExpBN.ushrn(1);
    }
    var expLenMinus32OrZero = expLen.subn(32);
    if (expLenMinus32OrZero.ltn(0)) {
        expLenMinus32OrZero = new BN(0);
    }
    var eightTimesExpLenMinus32OrZero = expLenMinus32OrZero.muln(8);
    var adjustedExpLen = eightTimesExpLenMinus32OrZero;
    if (bitLen > 0) {
        adjustedExpLen.iaddn(bitLen);
    }
    return adjustedExpLen;
}
function expmod(B, E, M) {
    if (E.isZero())
        return new BN(1).mod(M);
    // Red asserts M > 1
    if (M.lten(1))
        return new BN(0);
    var red = BN.red(M);
    var redB = B.toRed(red);
    var res = redB.redPow(E);
    return res.fromRed();
}
function default_1(opts) {
    assert(opts.data);
    var data = opts.data;
    var adjustedELen = getAdjustedExponentLength(data);
    if (adjustedELen.ltn(1)) {
        adjustedELen = new BN(1);
    }
    var bLen = new BN(data.slice(0, 32));
    var eLen = new BN(data.slice(32, 64));
    var mLen = new BN(data.slice(64, 96));
    var maxLen = bLen;
    if (maxLen.lt(mLen)) {
        maxLen = mLen;
    }
    var Gquaddivisor = opts._common.param('gasPrices', 'modexpGquaddivisor');
    var gasUsed = adjustedELen.mul(multComplexity(maxLen)).divn(Gquaddivisor);
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    if (bLen.isZero()) {
        return {
            gasUsed: gasUsed,
            returnValue: new BN(0).toArrayLike(Buffer, 'be', 1),
        };
    }
    if (mLen.isZero()) {
        return {
            gasUsed: gasUsed,
            returnValue: Buffer.alloc(0),
        };
    }
    var maxInt = new BN(Number.MAX_SAFE_INTEGER);
    var maxSize = new BN(2147483647); // ethereumjs-util setLengthRight limitation
    if (bLen.gt(maxSize) || eLen.gt(maxSize) || mLen.gt(maxSize)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var bStart = new BN(96);
    var bEnd = bStart.add(bLen);
    var eStart = bEnd;
    var eEnd = eStart.add(eLen);
    var mStart = eEnd;
    var mEnd = mStart.add(mLen);
    if (mEnd.gt(maxInt)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var B = new BN(ethereumjs_util_1.setLengthRight(data.slice(bStart.toNumber(), bEnd.toNumber()), bLen.toNumber()));
    var E = new BN(ethereumjs_util_1.setLengthRight(data.slice(eStart.toNumber(), eEnd.toNumber()), eLen.toNumber()));
    var M = new BN(ethereumjs_util_1.setLengthRight(data.slice(mStart.toNumber(), mEnd.toNumber()), mLen.toNumber()));
    var R;
    if (M.isZero()) {
        R = new BN(0);
    }
    else {
        R = expmod(B, E, M);
    }
    return {
        gasUsed: gasUsed,
        returnValue: R.toArrayLike(Buffer, 'be', mLen.toNumber()),
    };
}
exports.default = default_1;
//# sourceMappingURL=05-modexp.js.map

/***/ }),

/***/ 896753:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
var bn128 = __webpack_require__(529271);
function default_1(opts) {
    assert(opts.data);
    var inputData = opts.data;
    var gasUsed = new BN(opts._common.param('gasPrices', 'ecAdd'));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var returnData = bn128.add(inputData);
    // check ecadd success or failure by comparing the output length
    if (returnData.length !== 64) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: returnData,
    };
}
exports.default = default_1;
//# sourceMappingURL=06-ecadd.js.map

/***/ }),

/***/ 346842:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
var bn128 = __webpack_require__(529271);
function default_1(opts) {
    assert(opts.data);
    var inputData = opts.data;
    var gasUsed = new BN(opts._common.param('gasPrices', 'ecMul'));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var returnData = bn128.mul(inputData);
    // check ecmul success or failure by comparing the output length
    if (returnData.length !== 64) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: returnData,
    };
}
exports.default = default_1;
//# sourceMappingURL=07-ecmul.js.map

/***/ }),

/***/ 364229:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var evm_1 = __webpack_require__(935653);
var assert = __webpack_require__(742357);
var bn128 = __webpack_require__(529271);
function default_1(opts) {
    assert(opts.data);
    var inputData = opts.data;
    // no need to care about non-divisible-by-192, because bn128.pairing will properly fail in that case
    var inputDataSize = Math.floor(inputData.length / 192);
    var gasUsed = new BN(opts._common.param('gasPrices', 'ecPairing') +
        inputDataSize * opts._common.param('gasPrices', 'ecPairingWord'));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var returnData = bn128.pairing(inputData);
    // check ecpairing success or failure by comparing the output length
    if (returnData.length !== 32) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    return {
        gasUsed: gasUsed,
        returnValue: returnData,
    };
}
exports.default = default_1;
//# sourceMappingURL=08-ecpairing.js.map

/***/ }),

/***/ 748651:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var evm_1 = __webpack_require__(935653);
var exceptions_1 = __webpack_require__(764614);
var assert = __webpack_require__(742357);
// The following blake2 code has been taken from (license: Creative Commons CC0):
// https://github.com/dcposch/blakejs/blob/410c640d0f08d3b26904c6d1ab3d81df3619d282/blake2s.js
// The modifications include:
//  - Avoiding the use of context in F
//  - F accepts number of rounds as parameter
//  - Expect 2 64-byte t values, xor them both
//  - Take modulo 10 for indices of SIGMA
//  - Added type annotations
//  - Moved previously global `v` and `m` variables inside the F function
// 64-bit unsigned addition
// Sets v[a,a+1] += v[b,b+1]
// v should be a Uint32Array
function ADD64AA(v, a, b) {
    var o0 = v[a] + v[b];
    var o1 = v[a + 1] + v[b + 1];
    if (o0 >= 0x100000000) {
        o1++;
    }
    v[a] = o0;
    v[a + 1] = o1;
}
// 64-bit unsigned addition
// Sets v[a,a+1] += b
// b0 is the low 32 bits of b, b1 represents the high 32 bits
function ADD64AC(v, a, b0, b1) {
    var o0 = v[a] + b0;
    if (b0 < 0) {
        o0 += 0x100000000;
    }
    var o1 = v[a + 1] + b1;
    if (o0 >= 0x100000000) {
        o1++;
    }
    v[a] = o0;
    v[a + 1] = o1;
}
// Little-endian byte access
function B2B_GET32(arr, i) {
    return arr[i] ^ (arr[i + 1] << 8) ^ (arr[i + 2] << 16) ^ (arr[i + 3] << 24);
}
// G Mixing function
// The ROTRs are inlined for speed
function B2B_G(v, mw, a, b, c, d, ix, iy) {
    var x0 = mw[ix];
    var x1 = mw[ix + 1];
    var y0 = mw[iy];
    var y1 = mw[iy + 1];
    ADD64AA(v, a, b); // v[a,a+1] += v[b,b+1] ... in JS we must store a uint64 as two uint32s
    ADD64AC(v, a, x0, x1); // v[a, a+1] += x ... x0 is the low 32 bits of x, x1 is the high 32 bits
    // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated to the right by 32 bits
    var xor0 = v[d] ^ v[a];
    var xor1 = v[d + 1] ^ v[a + 1];
    v[d] = xor1;
    v[d + 1] = xor0;
    ADD64AA(v, c, d);
    // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 24 bits
    xor0 = v[b] ^ v[c];
    xor1 = v[b + 1] ^ v[c + 1];
    v[b] = (xor0 >>> 24) ^ (xor1 << 8);
    v[b + 1] = (xor1 >>> 24) ^ (xor0 << 8);
    ADD64AA(v, a, b);
    ADD64AC(v, a, y0, y1);
    // v[d,d+1] = (v[d,d+1] xor v[a,a+1]) rotated right by 16 bits
    xor0 = v[d] ^ v[a];
    xor1 = v[d + 1] ^ v[a + 1];
    v[d] = (xor0 >>> 16) ^ (xor1 << 16);
    v[d + 1] = (xor1 >>> 16) ^ (xor0 << 16);
    ADD64AA(v, c, d);
    // v[b,b+1] = (v[b,b+1] xor v[c,c+1]) rotated right by 63 bits
    xor0 = v[b] ^ v[c];
    xor1 = v[b + 1] ^ v[c + 1];
    v[b] = (xor1 >>> 31) ^ (xor0 << 1);
    v[b + 1] = (xor0 >>> 31) ^ (xor1 << 1);
}
// Initialization Vector
var BLAKE2B_IV32 = new Uint32Array([
    0xf3bcc908,
    0x6a09e667,
    0x84caa73b,
    0xbb67ae85,
    0xfe94f82b,
    0x3c6ef372,
    0x5f1d36f1,
    0xa54ff53a,
    0xade682d1,
    0x510e527f,
    0x2b3e6c1f,
    0x9b05688c,
    0xfb41bd6b,
    0x1f83d9ab,
    0x137e2179,
    0x5be0cd19,
]);
var SIGMA8 = [
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    14,
    10,
    4,
    8,
    9,
    15,
    13,
    6,
    1,
    12,
    0,
    2,
    11,
    7,
    5,
    3,
    11,
    8,
    12,
    0,
    5,
    2,
    15,
    13,
    10,
    14,
    3,
    6,
    7,
    1,
    9,
    4,
    7,
    9,
    3,
    1,
    13,
    12,
    11,
    14,
    2,
    6,
    5,
    10,
    4,
    0,
    15,
    8,
    9,
    0,
    5,
    7,
    2,
    4,
    10,
    15,
    14,
    1,
    11,
    12,
    6,
    8,
    3,
    13,
    2,
    12,
    6,
    10,
    0,
    11,
    8,
    3,
    4,
    13,
    7,
    5,
    15,
    14,
    1,
    9,
    12,
    5,
    1,
    15,
    14,
    13,
    4,
    10,
    0,
    7,
    6,
    3,
    9,
    2,
    8,
    11,
    13,
    11,
    7,
    14,
    12,
    1,
    3,
    9,
    5,
    0,
    15,
    4,
    8,
    6,
    2,
    10,
    6,
    15,
    14,
    9,
    11,
    3,
    0,
    8,
    12,
    2,
    13,
    7,
    1,
    4,
    10,
    5,
    10,
    2,
    8,
    4,
    7,
    6,
    1,
    5,
    15,
    11,
    9,
    14,
    3,
    12,
    13,
    0,
    0,
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    14,
    10,
    4,
    8,
    9,
    15,
    13,
    6,
    1,
    12,
    0,
    2,
    11,
    7,
    5,
    3,
];
// These are offsets into a uint64 buffer.
// Multiply them all by 2 to make them offsets into a uint32 buffer,
// because this is Javascript and we don't have uint64s
var SIGMA82 = new Uint8Array(SIGMA8.map(function (x) {
    return x * 2;
}));
function F(h, m, t, f, rounds) {
    var v = new Uint32Array(32);
    var i = 0;
    // init work variables
    for (i = 0; i < 16; i++) {
        v[i] = h[i];
        v[i + 16] = BLAKE2B_IV32[i];
    }
    // 128 bits of offset
    v[24] = v[24] ^ t[0];
    v[25] = v[25] ^ t[1];
    v[26] = v[26] ^ t[2];
    v[27] = v[27] ^ t[3];
    // last block flag set ?
    if (f) {
        v[28] = ~v[28];
        v[29] = ~v[29];
    }
    // message words
    var mw = new Uint32Array(32);
    // get little-endian words
    for (i = 0; i < 32; i++) {
        mw[i] = B2B_GET32(m, 4 * i);
    }
    // twelve rounds of mixing
    // uncomment the DebugPrint calls to log the computation
    // and match the RFC sample documentation
    // util.debugPrint('          m[16]', m, 64)
    for (i = 0; i < rounds; i++) {
        // util.debugPrint('   (i=' + (i < 10 ? ' ' : '') + i + ') v[16]', v, 64)
        var ri = (i % 10) * 16;
        B2B_G(v, mw, 0, 8, 16, 24, SIGMA82[ri + 0], SIGMA82[ri + 1]);
        B2B_G(v, mw, 2, 10, 18, 26, SIGMA82[ri + 2], SIGMA82[ri + 3]);
        B2B_G(v, mw, 4, 12, 20, 28, SIGMA82[ri + 4], SIGMA82[ri + 5]);
        B2B_G(v, mw, 6, 14, 22, 30, SIGMA82[ri + 6], SIGMA82[ri + 7]);
        B2B_G(v, mw, 0, 10, 20, 30, SIGMA82[ri + 8], SIGMA82[ri + 9]);
        B2B_G(v, mw, 2, 12, 22, 24, SIGMA82[ri + 10], SIGMA82[ri + 11]);
        B2B_G(v, mw, 4, 14, 16, 26, SIGMA82[ri + 12], SIGMA82[ri + 13]);
        B2B_G(v, mw, 6, 8, 18, 28, SIGMA82[ri + 14], SIGMA82[ri + 15]);
    }
    for (i = 0; i < 16; i++) {
        h[i] = h[i] ^ v[i] ^ v[i + 16];
    }
}
exports.F = F;
function default_1(opts) {
    assert(opts.data);
    var data = opts.data;
    if (data.length !== 213) {
        return {
            returnValue: Buffer.alloc(0),
            gasUsed: opts.gasLimit,
            exceptionError: new exceptions_1.VmError(exceptions_1.ERROR.OUT_OF_RANGE),
        };
    }
    var lastByte = data.slice(212, 213)[0];
    if (lastByte !== 1 && lastByte !== 0) {
        return {
            returnValue: Buffer.alloc(0),
            gasUsed: opts.gasLimit,
            exceptionError: new exceptions_1.VmError(exceptions_1.ERROR.OUT_OF_RANGE),
        };
    }
    var rounds = data.slice(0, 4).readUInt32BE(0);
    var hRaw = data.slice(4, 68);
    var mRaw = data.slice(68, 196);
    var tRaw = data.slice(196, 212);
    // final
    var f = lastByte === 1;
    var gasUsed = new BN(opts._common.param('gasPrices', 'blake2Round'));
    gasUsed.imul(new BN(rounds));
    if (opts.gasLimit.lt(gasUsed)) {
        return evm_1.OOGResult(opts.gasLimit);
    }
    var h = new Uint32Array(16);
    for (var i = 0; i < 16; i++) {
        h[i] = hRaw.readUInt32LE(i * 4);
    }
    var m = new Uint32Array(32);
    for (var i = 0; i < 32; i++) {
        m[i] = mRaw.readUInt32LE(i * 4);
    }
    var t = new Uint32Array(4);
    for (var i = 0; i < 4; i++) {
        t[i] = tRaw.readUInt32LE(i * 4);
    }
    F(h, m, t, f, rounds);
    var output = Buffer.alloc(64);
    for (var i = 0; i < 16; i++) {
        output.writeUInt32LE(h[i], i * 4);
    }
    return {
        gasUsed: gasUsed,
        returnValue: output,
    };
}
exports.default = default_1;
//# sourceMappingURL=09-blake2f.js.map

/***/ }),

/***/ 838081:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
var _01_ecrecover_1 = __webpack_require__(123173);
var _02_sha256_1 = __webpack_require__(805741);
var _03_ripemd160_1 = __webpack_require__(58754);
var _04_identity_1 = __webpack_require__(625856);
var _05_modexp_1 = __webpack_require__(607563);
var _06_ecadd_1 = __webpack_require__(896753);
var _07_ecmul_1 = __webpack_require__(346842);
var _08_ecpairing_1 = __webpack_require__(364229);
var _09_blake2f_1 = __webpack_require__(748651);
var ripemdPrecompileAddress = '0000000000000000000000000000000000000003';
exports.ripemdPrecompileAddress = ripemdPrecompileAddress;
var precompiles = (_a = {
        '0000000000000000000000000000000000000001': _01_ecrecover_1.default,
        '0000000000000000000000000000000000000002': _02_sha256_1.default
    },
    _a[ripemdPrecompileAddress] = _03_ripemd160_1.default,
    _a['0000000000000000000000000000000000000004'] = _04_identity_1.default,
    _a['0000000000000000000000000000000000000005'] = _05_modexp_1.default,
    _a['0000000000000000000000000000000000000006'] = _06_ecadd_1.default,
    _a['0000000000000000000000000000000000000007'] = _07_ecmul_1.default,
    _a['0000000000000000000000000000000000000008'] = _08_ecpairing_1.default,
    _a['0000000000000000000000000000000000000009'] = _09_blake2f_1.default,
    _a);
exports.precompiles = precompiles;
function getPrecompile(address) {
    return precompiles[address];
}
exports.getPrecompile = getPrecompile;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 490908:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var _a = __webpack_require__(764614), ERROR = _a.ERROR, VmError = _a.VmError;
/**
 * Implementation of the stack used in evm.
 */
var Stack = /** @class */ (function () {
    function Stack() {
        this._store = [];
    }
    Object.defineProperty(Stack.prototype, "length", {
        get: function () {
            return this._store.length;
        },
        enumerable: true,
        configurable: true
    });
    Stack.prototype.push = function (value) {
        if (!BN.isBN(value)) {
            throw new VmError(ERROR.INTERNAL_ERROR);
        }
        if (value.gt(ethereumjs_util_1.MAX_INTEGER)) {
            throw new VmError(ERROR.OUT_OF_RANGE);
        }
        if (this._store.length > 1023) {
            throw new VmError(ERROR.STACK_OVERFLOW);
        }
        this._store.push(value);
    };
    Stack.prototype.pop = function () {
        if (this._store.length < 1) {
            throw new VmError(ERROR.STACK_UNDERFLOW);
        }
        // Length is checked above, so pop shouldn't return undefined
        return this._store.pop();
    };
    /**
     * Pop multiple items from stack. Top of stack is first item
     * in returned array.
     * @param num - Number of items to pop
     */
    Stack.prototype.popN = function (num) {
        if (num === void 0) { num = 1; }
        if (this._store.length < num) {
            throw new VmError(ERROR.STACK_UNDERFLOW);
        }
        if (num === 0) {
            return [];
        }
        return this._store.splice(-1 * num).reverse();
    };
    /**
     * Swap top of stack with an item in the stack.
     * @param position - Index of item from top of the stack (0-indexed)
     */
    Stack.prototype.swap = function (position) {
        if (this._store.length <= position) {
            throw new VmError(ERROR.STACK_UNDERFLOW);
        }
        var head = this._store.length - 1;
        var i = this._store.length - position - 1;
        var tmp = this._store[head];
        this._store[head] = this._store[i];
        this._store[i] = tmp;
    };
    /**
     * Pushes a copy of an item in the stack.
     * @param position - Index of item to be copied (1-indexed)
     */
    Stack.prototype.dup = function (position) {
        if (this._store.length < position) {
            throw new VmError(ERROR.STACK_UNDERFLOW);
        }
        var i = this._store.length - position;
        this.push(this._store[i].clone());
    };
    return Stack;
}());
exports.default = Stack;
//# sourceMappingURL=stack.js.map

/***/ }),

/***/ 652792:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var TxContext = /** @class */ (function () {
    function TxContext(gasPrice, origin) {
        this.gasPrice = gasPrice;
        this.origin = origin;
    }
    return TxContext;
}());
exports.default = TxContext;
//# sourceMappingURL=txContext.js.map

/***/ }),

/***/ 764614:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ERROR;
(function (ERROR) {
    ERROR["OUT_OF_GAS"] = "out of gas";
    ERROR["STACK_UNDERFLOW"] = "stack underflow";
    ERROR["STACK_OVERFLOW"] = "stack overflow";
    ERROR["INVALID_JUMP"] = "invalid JUMP";
    ERROR["INVALID_OPCODE"] = "invalid opcode";
    ERROR["OUT_OF_RANGE"] = "value out of range";
    ERROR["REVERT"] = "revert";
    ERROR["STATIC_STATE_CHANGE"] = "static state change";
    ERROR["INTERNAL_ERROR"] = "internal error";
    ERROR["CREATE_COLLISION"] = "create collision";
    ERROR["STOP"] = "stop";
    ERROR["REFUND_EXHAUSTED"] = "refund exhausted";
})(ERROR = exports.ERROR || (exports.ERROR = {}));
var VmError = /** @class */ (function () {
    function VmError(error) {
        this.error = error;
        this.errorType = 'VmError';
    }
    return VmError;
}());
exports.VmError = VmError;
//# sourceMappingURL=exceptions.js.map

/***/ }),

/***/ 143040:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_account_1 = __webpack_require__(95789);
var ethereumjs_blockchain_1 = __webpack_require__(582034);
var ethereumjs_common_1 = __webpack_require__(265982);
var state_1 = __webpack_require__(203745);
var runCode_1 = __webpack_require__(309031);
var runCall_1 = __webpack_require__(487188);
var runTx_1 = __webpack_require__(892504);
var runBlock_1 = __webpack_require__(196272);
var opcodes_1 = __webpack_require__(89601);
var runBlockchain_1 = __webpack_require__(218872);
var promisified_1 = __webpack_require__(238143);
var promisify = __webpack_require__(38159);
var AsyncEventEmitter = __webpack_require__(346108);
var Trie = __webpack_require__(710802);
/**
 * Execution engine which can be used to run a blockchain, individual
 * blocks, individual transactions, or snippets of EVM bytecode.
 *
 * This class is an AsyncEventEmitter, please consult the README to learn how to use it.
 */
var VM = /** @class */ (function (_super) {
    __extends(VM, _super);
    /**
     * Instantiates a new [[VM]] Object.
     * @param opts - Default values for the options are:
     *  - `chain`: 'mainnet'
     *  - `hardfork`: 'petersburg' [supported: 'byzantium', 'constantinople', 'petersburg', 'istanbul' (DRAFT) (will throw on unsupported)]
     *  - `activatePrecompiles`: false
     *  - `allowUnlimitedContractSize`: false [ONLY set to `true` during debugging]
     */
    function VM(opts) {
        if (opts === void 0) { opts = {}; }
        var _this = _super.call(this) || this;
        _this.opts = opts;
        if (opts.common) {
            if (opts.chain || opts.hardfork) {
                throw new Error('You can only instantiate the VM class with one of: opts.common, or opts.chain and opts.hardfork');
            }
            _this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : 'petersburg';
            var supportedHardforks = [
                'byzantium',
                'constantinople',
                'petersburg',
                'istanbul',
                'muirGlacier',
            ];
            _this._common = new ethereumjs_common_1.default(chain, hardfork, supportedHardforks);
        }
        // Set list of opcodes based on HF
        _this._opcodes = opcodes_1.getOpcodesForHF(_this._common);
        if (opts.stateManager) {
            _this.stateManager = opts.stateManager;
        }
        else {
            var trie = opts.state || new Trie();
            if (opts.activatePrecompiles) {
                for (var i = 1; i <= 8; i++) {
                    trie.put(new BN(i).toArrayLike(Buffer, 'be', 20), new ethereumjs_account_1.default().serialize());
                }
            }
            _this.stateManager = new state_1.StateManager({ trie: trie, common: _this._common });
        }
        _this.pStateManager = new promisified_1.default(_this.stateManager);
        _this.blockchain = opts.blockchain || new ethereumjs_blockchain_1.default({ common: _this._common });
        _this.allowUnlimitedContractSize =
            opts.allowUnlimitedContractSize === undefined ? false : opts.allowUnlimitedContractSize;
        // We cache this promisified function as it's called from the main execution loop, and
        // promisifying each time has a huge performance impact.
        _this._emit = promisify(_this.emit.bind(_this));
        return _this;
    }
    /**
     * Processes blocks and adds them to the blockchain.
     *
     * This method modifies the state.
     *
     * @param blockchain -  A [blockchain](https://github.com/ethereum/ethereumjs-blockchain) object to process
     */
    VM.prototype.runBlockchain = function (blockchain) {
        return runBlockchain_1.default.bind(this)(blockchain);
    };
    /**
     * Processes the `block` running all of the transactions it contains and updating the miner's account
     *
     * This method modifies the state. If `generate` is `true`, the state modifications will be
     * reverted if an exception is raised. If it's `false`, it won't revert if the block's header is
     * invalid. If an error is thrown from an event handler, the state may or may not be reverted.
     *
     * @param opts - Default values for options:
     *  - `generate`: false
     */
    VM.prototype.runBlock = function (opts) {
        return runBlock_1.default.bind(this)(opts);
    };
    /**
     * Process a transaction. Run the vm. Transfers eth. Checks balances.
     *
     * This method modifies the state. If an error is thrown, the modifications are reverted, except
     * when the error is thrown from an event handler. In the latter case the state may or may not be
     * reverted.
     */
    VM.prototype.runTx = function (opts) {
        return runTx_1.default.bind(this)(opts);
    };
    /**
     * runs a call (or create) operation.
     *
     * This method modifies the state.
     */
    VM.prototype.runCall = function (opts) {
        return runCall_1.default.bind(this)(opts);
    };
    /**
     * Runs EVM code.
     *
     * This method modifies the state.
     */
    VM.prototype.runCode = function (opts) {
        return runCode_1.default.bind(this)(opts);
    };
    /**
     * Returns a copy of the [[VM]] instance.
     */
    VM.prototype.copy = function () {
        return new VM({
            stateManager: this.stateManager.copy(),
            blockchain: this.blockchain,
            common: this._common,
        });
    };
    return VM;
}(AsyncEventEmitter));
exports.default = VM;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 196272:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var rlp_1 = __webpack_require__(6636);
var bloom_1 = __webpack_require__(256864);
var promisify = __webpack_require__(38159);
var Trie = __webpack_require__(975984);
/**
 * @ignore
 */
function runBlock(opts) {
    return __awaiter(this, void 0, void 0, function () {
        var state, block, generateStateRoot, result, err_1, stateRoot;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (opts === undefined) {
                        throw new Error('invalid input, opts must be provided');
                    }
                    if (!opts.block) {
                        throw new Error('invalid input, block must be provided');
                    }
                    state = this.pStateManager;
                    block = opts.block;
                    generateStateRoot = !!opts.generate;
                    /**
                     * The `beforeBlock` event.
                     *
                     * @event Event: beforeBlock
                     * @type {Object}
                     * @property {Block} block emits the block that is about to be processed
                     */
                    return [4 /*yield*/, this._emit('beforeBlock', opts.block)
                        // Set state root if provided
                    ];
                case 1:
                    /**
                     * The `beforeBlock` event.
                     *
                     * @event Event: beforeBlock
                     * @type {Object}
                     * @property {Block} block emits the block that is about to be processed
                     */
                    _a.sent();
                    if (!opts.root) return [3 /*break*/, 3];
                    return [4 /*yield*/, state.setStateRoot(opts.root)];
                case 2:
                    _a.sent();
                    _a.label = 3;
                case 3: 
                // Checkpoint state
                return [4 /*yield*/, state.checkpoint()];
                case 4:
                    // Checkpoint state
                    _a.sent();
                    _a.label = 5;
                case 5:
                    _a.trys.push([5, 7, , 9]);
                    return [4 /*yield*/, applyBlock.bind(this)(block, opts)];
                case 6:
                    result = _a.sent();
                    return [3 /*break*/, 9];
                case 7:
                    err_1 = _a.sent();
                    return [4 /*yield*/, state.revert()];
                case 8:
                    _a.sent();
                    throw err_1;
                case 9: 
                // Persist state
                return [4 /*yield*/, state.commit()];
                case 10:
                    // Persist state
                    _a.sent();
                    return [4 /*yield*/, state.getStateRoot()
                        // Given the generate option, either set resulting header
                        // values to the current block, or validate the resulting
                        // header values against the current block.
                    ];
                case 11:
                    stateRoot = _a.sent();
                    // Given the generate option, either set resulting header
                    // values to the current block, or validate the resulting
                    // header values against the current block.
                    if (generateStateRoot) {
                        block.header.stateRoot = stateRoot;
                        block.header.bloom = result.bloom.bitvector;
                    }
                    else {
                        if (result.receiptRoot &&
                            result.receiptRoot.toString('hex') !== block.header.receiptTrie.toString('hex')) {
                            throw new Error('invalid receiptTrie ');
                        }
                        if (result.bloom.bitvector.toString('hex') !== block.header.bloom.toString('hex')) {
                            throw new Error('invalid bloom ');
                        }
                        if (ethereumjs_util_1.bufferToInt(block.header.gasUsed) !== Number(result.gasUsed)) {
                            throw new Error('invalid gasUsed ');
                        }
                        if (stateRoot.toString('hex') !== block.header.stateRoot.toString('hex')) {
                            throw new Error('invalid block stateRoot ');
                        }
                    }
                    /**
                     * The `afterBlock` event
                     *
                     * @event Event: afterBlock
                     * @type {Object}
                     * @property {Object} result emits the results of processing a block
                     */
                    return [4 /*yield*/, this._emit('afterBlock', {
                            receipts: result.receipts,
                            results: result.results,
                        })];
                case 12:
                    /**
                     * The `afterBlock` event
                     *
                     * @event Event: afterBlock
                     * @type {Object}
                     * @property {Object} result emits the results of processing a block
                     */
                    _a.sent();
                    return [2 /*return*/, { receipts: result.receipts, results: result.results }];
            }
        });
    });
}
exports.default = runBlock;
/**
 * Validates and applies a block, computing the results of
 * applying its transactions. This method doesn't modify the
 * block itself. It computes the block rewards and puts
 * them on state (but doesn't persist the changes).
 * @param {Block} block
 * @param {Boolean} [skipBlockValidation=false]
 */
function applyBlock(block, opts) {
    return __awaiter(this, void 0, void 0, function () {
        var txResults;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!!opts.skipBlockValidation) return [3 /*break*/, 3];
                    if (!new BN(block.header.gasLimit).gte(new BN('8000000000000000', 16))) return [3 /*break*/, 1];
                    throw new Error('Invalid block with gas limit greater than (2^63 - 1)');
                case 1: return [4 /*yield*/, promisify(block.validate).bind(block)(this.blockchain)];
                case 2:
                    _a.sent();
                    _a.label = 3;
                case 3: return [4 /*yield*/, applyTransactions.bind(this)(block, opts)
                    // Pay ommers and miners
                ];
                case 4:
                    txResults = _a.sent();
                    // Pay ommers and miners
                    return [4 /*yield*/, assignBlockRewards.bind(this)(block)];
                case 5:
                    // Pay ommers and miners
                    _a.sent();
                    return [2 /*return*/, txResults];
            }
        });
    });
}
/**
 * Applies the transactions in a block, computing the receipts
 * as well as gas usage and some relevant data. This method is
 * side-effect free (it doesn't modify the block nor the state).
 * @param {Block} block
 */
function applyTransactions(block, opts) {
    return __awaiter(this, void 0, void 0, function () {
        var bloom, gasUsed, receiptTrie, receipts, txResults, txIdx, tx, gasLimitIsHigherThanBlock, txRes, txReceipt;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    bloom = new bloom_1.default();
                    gasUsed = new BN(0);
                    receiptTrie = new Trie();
                    receipts = [];
                    txResults = [];
                    txIdx = 0;
                    _a.label = 1;
                case 1:
                    if (!(txIdx < block.transactions.length)) return [3 /*break*/, 5];
                    tx = block.transactions[txIdx];
                    gasLimitIsHigherThanBlock = new BN(block.header.gasLimit).lt(new BN(tx.gasLimit).add(gasUsed));
                    if (gasLimitIsHigherThanBlock) {
                        throw new Error('tx has a higher gas limit than the block');
                    }
                    return [4 /*yield*/, this.runTx({
                            tx: tx,
                            block: block,
                            skipBalance: opts.skipBalance,
                            skipNonce: opts.skipNonce,
                        })];
                case 2:
                    txRes = _a.sent();
                    txResults.push(txRes);
                    // Add to total block gas usage
                    gasUsed = gasUsed.add(txRes.gasUsed);
                    // Combine blooms via bitwise OR
                    bloom.or(txRes.bloom);
                    txReceipt = {
                        status: txRes.execResult.exceptionError ? 0 : 1,
                        gasUsed: gasUsed.toArrayLike(Buffer),
                        bitvector: txRes.bloom.bitvector,
                        logs: txRes.execResult.logs || [],
                    };
                    receipts.push(txReceipt);
                    // Add receipt to trie to later calculate receipt root
                    return [4 /*yield*/, promisify(receiptTrie.put).bind(receiptTrie)(rlp_1.encode(txIdx), rlp_1.encode(Object.values(txReceipt)))];
                case 3:
                    // Add receipt to trie to later calculate receipt root
                    _a.sent();
                    _a.label = 4;
                case 4:
                    txIdx++;
                    return [3 /*break*/, 1];
                case 5: return [2 /*return*/, {
                        bloom: bloom,
                        gasUsed: gasUsed,
                        receiptRoot: receiptTrie.root,
                        receipts: receipts,
                        results: txResults,
                    }];
            }
        });
    });
}
/**
 * Calculates block rewards for miner and ommers and puts
 * the updated balances of their accounts to state.
 */
function assignBlockRewards(block) {
    return __awaiter(this, void 0, void 0, function () {
        var state, minerReward, ommers, _i, ommers_1, ommer, reward_1, reward;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    state = this.pStateManager;
                    minerReward = new BN(this._common.param('pow', 'minerReward'));
                    ommers = block.uncleHeaders;
                    _i = 0, ommers_1 = ommers;
                    _a.label = 1;
                case 1:
                    if (!(_i < ommers_1.length)) return [3 /*break*/, 4];
                    ommer = ommers_1[_i];
                    reward_1 = calculateOmmerReward(new BN(ommer.number), new BN(block.header.number), minerReward);
                    return [4 /*yield*/, rewardAccount(state, ommer.coinbase, reward_1)];
                case 2:
                    _a.sent();
                    _a.label = 3;
                case 3:
                    _i++;
                    return [3 /*break*/, 1];
                case 4:
                    reward = calculateMinerReward(minerReward, ommers.length);
                    return [4 /*yield*/, rewardAccount(state, block.header.coinbase, reward)];
                case 5:
                    _a.sent();
                    return [2 /*return*/];
            }
        });
    });
}
function calculateOmmerReward(ommerBlockNumber, blockNumber, minerReward) {
    var heightDiff = blockNumber.sub(ommerBlockNumber);
    var reward = new BN(8).sub(heightDiff).mul(minerReward.divn(8));
    if (reward.ltn(0)) {
        reward = new BN(0);
    }
    return reward;
}
function calculateMinerReward(minerReward, ommersNum) {
    // calculate nibling reward
    var niblingReward = minerReward.divn(32);
    var totalNiblingReward = niblingReward.muln(ommersNum);
    var reward = minerReward.add(totalNiblingReward);
    return reward;
}
function rewardAccount(state, address, reward) {
    return __awaiter(this, void 0, void 0, function () {
        var account;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0: return [4 /*yield*/, state.getAccount(address)];
                case 1:
                    account = _a.sent();
                    account.balance = ethereumjs_util_1.toBuffer(new BN(account.balance).add(reward));
                    return [4 /*yield*/, state.putAccount(address, account)];
                case 2:
                    _a.sent();
                    return [2 /*return*/];
            }
        });
    });
}
//# sourceMappingURL=runBlock.js.map

/***/ }),

/***/ 218872:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var async = __webpack_require__(500167);
/**
 * @ignore
 */
function runBlockchain(blockchain) {
    var _this = this;
    return new Promise(function (resolve, reject) {
        var self = _this;
        var headBlock;
        var parentState;
        blockchain = blockchain || _this.blockchain;
        // setup blockchain iterator
        blockchain.iterator('vm', processBlock, function (err) {
            if (err) {
                reject(err);
            }
            else {
                resolve();
            }
        });
        function processBlock(block, reorg, cb) {
            async.series([getStartingState, runBlock], cb);
            // determine starting state for block run
            function getStartingState(cb) {
                // if we are just starting or if a chain re-org has happened
                if (!headBlock || reorg) {
                    blockchain.getBlock(block.header.parentHash, function (err, parentBlock) {
                        parentState = parentBlock.header.stateRoot;
                        // generate genesis state if we are at the genesis block
                        // we don't have the genesis state
                        if (!headBlock) {
                            return self.stateManager.generateCanonicalGenesis(cb);
                        }
                        else {
                            cb(err);
                        }
                    });
                }
                else {
                    parentState = headBlock.header.stateRoot;
                    cb();
                }
            }
            // run block, update head if valid
            function runBlock(cb) {
                self
                    .runBlock({
                    block: block,
                    root: parentState,
                })
                    .then(function () {
                    // set as new head block
                    headBlock = block;
                    cb();
                })
                    .catch(function (err) {
                    // remove invalid block
                    blockchain.delBlock(block.header.hash(), function () {
                        cb(err);
                    });
                });
            }
        }
    });
}
exports.default = runBlockchain;
//# sourceMappingURL=runBlockchain.js.map

/***/ }),

/***/ 487188:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var txContext_1 = __webpack_require__(652792);
var message_1 = __webpack_require__(823321);
var evm_1 = __webpack_require__(935653);
var Block = __webpack_require__(339951);
/**
 * @ignore
 */
function runCall(opts) {
    var block = opts.block || new Block();
    var txContext = new txContext_1.default(opts.gasPrice || Buffer.alloc(0), opts.origin || opts.caller || ethereumjs_util_1.zeros(32));
    var message = new message_1.default({
        caller: opts.caller,
        gasLimit: opts.gasLimit ? new BN(opts.gasLimit) : new BN(0xffffff),
        to: opts.to && opts.to.toString('hex') !== '' ? opts.to : undefined,
        value: opts.value,
        data: opts.data,
        code: opts.code,
        depth: opts.depth || 0,
        isCompiled: opts.compiled || false,
        isStatic: opts.static || false,
        salt: opts.salt || null,
        selfdestruct: opts.selfdestruct || {},
        delegatecall: opts.delegatecall || false,
    });
    var evm = new evm_1.default(this, txContext, block);
    return evm.executeMessage(message);
}
exports.default = runCall;
//# sourceMappingURL=runCall.js.map

/***/ }),

/***/ 309031:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
/*

This is the core of the Ethereum Virtual Machine (EVM or just VM).

NOTES:

stack items are lazily duplicated.
So you must never directly change a buffer from the stack,
instead you should `copy` it first

not all stack items are 32 bytes, so if the operation relies on the stack
item length then you must use utils.pad(<item>, 32) first.
*/
var ethereumjs_util_1 = __webpack_require__(425332);
var txContext_1 = __webpack_require__(652792);
var message_1 = __webpack_require__(823321);
var evm_1 = __webpack_require__(935653);
var Block = __webpack_require__(339951);
/**
 * @ignore
 */
function runCode(opts) {
    if (!opts.block) {
        opts.block = new Block();
    }
    // Backwards compatibility
    if (!opts.txContext) {
        opts.txContext = new txContext_1.default(opts.gasPrice || Buffer.alloc(0), opts.origin || opts.caller || ethereumjs_util_1.zeros(32));
    }
    if (!opts.message) {
        opts.message = new message_1.default({
            code: opts.code,
            data: opts.data,
            gasLimit: opts.gasLimit,
            to: opts.address || ethereumjs_util_1.zeros(32),
            caller: opts.caller,
            value: opts.value,
            depth: opts.depth || 0,
            selfdestruct: opts.selfdestruct || {},
            isStatic: opts.isStatic || false,
        });
    }
    var evm = opts.evm;
    if (!evm) {
        evm = new evm_1.default(this, opts.txContext, opts.block);
    }
    return evm.runInterpreter(opts.message, { pc: opts.pc });
}
exports.default = runCode;
//# sourceMappingURL=runCode.js.map

/***/ }),

/***/ 892504:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
var ethereumjs_util_1 = __webpack_require__(425332);
var ethereumjs_account_1 = __webpack_require__(95789);
var bloom_1 = __webpack_require__(256864);
var evm_1 = __webpack_require__(935653);
var message_1 = __webpack_require__(823321);
var txContext_1 = __webpack_require__(652792);
var Block = __webpack_require__(339951);
/**
 * @ignore
 */
function runTx(opts) {
    return __awaiter(this, void 0, void 0, function () {
        var state, result, e_1;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (opts === undefined) {
                        throw new Error('invalid input, opts must be provided');
                    }
                    // tx is required
                    if (!opts.tx) {
                        throw new Error('invalid input, tx is required');
                    }
                    // create a reasonable default if no block is given
                    if (!opts.block) {
                        opts.block = new Block();
                    }
                    if (new BN(opts.block.header.gasLimit).lt(new BN(opts.tx.gasLimit))) {
                        throw new Error('tx has a higher gas limit than the block');
                    }
                    state = this.pStateManager;
                    return [4 /*yield*/, state.checkpoint()];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    _a.trys.push([2, 5, , 7]);
                    return [4 /*yield*/, _runTx.bind(this)(opts)];
                case 3:
                    result = _a.sent();
                    return [4 /*yield*/, state.commit()];
                case 4:
                    _a.sent();
                    return [2 /*return*/, result];
                case 5:
                    e_1 = _a.sent();
                    return [4 /*yield*/, state.revert()];
                case 6:
                    _a.sent();
                    throw e_1;
                case 7: return [2 /*return*/];
            }
        });
    });
}
exports.default = runTx;
function _runTx(opts) {
    return __awaiter(this, void 0, void 0, function () {
        var block, tx, state, basefee, gasLimit, fromAccount, txContext, message, evm, results, gasRefund, finalFromBalance, minerAccount, keys, _i, keys_1, k;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    block = opts.block;
                    tx = opts.tx;
                    state = this.pStateManager;
                    /**
                     * The `beforeTx` event
                     *
                     * @event Event: beforeTx
                     * @type {Object}
                     * @property {Transaction} tx emits the Transaction that is about to be processed
                     */
                    return [4 /*yield*/, this._emit('beforeTx', tx)
                        // Validate gas limit against base fee
                    ];
                case 1:
                    /**
                     * The `beforeTx` event
                     *
                     * @event Event: beforeTx
                     * @type {Object}
                     * @property {Transaction} tx emits the Transaction that is about to be processed
                     */
                    _a.sent();
                    basefee = tx.getBaseFee();
                    gasLimit = new BN(tx.gasLimit);
                    if (gasLimit.lt(basefee)) {
                        throw new Error('base fee exceeds gas limit');
                    }
                    gasLimit.isub(basefee);
                    return [4 /*yield*/, state.getAccount(tx.getSenderAddress())];
                case 2:
                    fromAccount = _a.sent();
                    if (!opts.skipBalance && new BN(fromAccount.balance).lt(tx.getUpfrontCost())) {
                        throw new Error("sender doesn't have enough funds to send tx. The upfront cost is: " + tx
                            .getUpfrontCost()
                            .toString() +
                            (" and the sender's account only has: " + new BN(fromAccount.balance).toString()));
                    }
                    else if (!opts.skipNonce && !new BN(fromAccount.nonce).eq(new BN(tx.nonce))) {
                        throw new Error("the tx doesn't have the correct nonce. account has nonce of: " + new BN(fromAccount.nonce).toString() + " tx has nonce of: " + new BN(tx.nonce).toString());
                    }
                    // Update from account's nonce and balance
                    fromAccount.nonce = ethereumjs_util_1.toBuffer(new BN(fromAccount.nonce).addn(1));
                    fromAccount.balance = ethereumjs_util_1.toBuffer(new BN(fromAccount.balance).sub(new BN(tx.gasLimit).mul(new BN(tx.gasPrice))));
                    return [4 /*yield*/, state.putAccount(tx.getSenderAddress(), fromAccount)
                        /*
                         * Execute message
                         */
                    ];
                case 3:
                    _a.sent();
                    txContext = new txContext_1.default(tx.gasPrice, tx.getSenderAddress());
                    message = new message_1.default({
                        caller: tx.getSenderAddress(),
                        gasLimit: gasLimit,
                        to: tx.to.toString('hex') !== '' ? tx.to : undefined,
                        value: tx.value,
                        data: tx.data,
                    });
                    state._wrapped._clearOriginalStorageCache();
                    evm = new evm_1.default(this, txContext, block);
                    return [4 /*yield*/, evm.executeMessage(message)];
                case 4:
                    results = (_a.sent());
                    /*
                     * Parse results
                     */
                    // Generate the bloom for the tx
                    results.bloom = txLogsBloom(results.execResult.logs);
                    // Caculate the total gas used
                    results.gasUsed = results.gasUsed.add(basefee);
                    gasRefund = evm._refund;
                    if (gasRefund) {
                        if (gasRefund.lt(results.gasUsed.divn(2))) {
                            results.gasUsed.isub(gasRefund);
                        }
                        else {
                            results.gasUsed.isub(results.gasUsed.divn(2));
                        }
                    }
                    results.amountSpent = results.gasUsed.mul(new BN(tx.gasPrice));
                    return [4 /*yield*/, state.getAccount(tx.getSenderAddress())];
                case 5:
                    // Update sender's balance
                    fromAccount = _a.sent();
                    finalFromBalance = new BN(tx.gasLimit)
                        .sub(results.gasUsed)
                        .mul(new BN(tx.gasPrice))
                        .add(new BN(fromAccount.balance));
                    fromAccount.balance = ethereumjs_util_1.toBuffer(finalFromBalance);
                    return [4 /*yield*/, state.putAccount(ethereumjs_util_1.toBuffer(tx.getSenderAddress()), fromAccount)
                        // Update miner's balance
                    ];
                case 6:
                    _a.sent();
                    return [4 /*yield*/, state.getAccount(block.header.coinbase)
                        // add the amount spent on gas to the miner's account
                    ];
                case 7:
                    minerAccount = _a.sent();
                    // add the amount spent on gas to the miner's account
                    minerAccount.balance = ethereumjs_util_1.toBuffer(new BN(minerAccount.balance).add(results.amountSpent));
                    if (!!new BN(minerAccount.balance).isZero()) return [3 /*break*/, 9];
                    return [4 /*yield*/, state.putAccount(block.header.coinbase, minerAccount)];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    if (!results.execResult.selfdestruct) return [3 /*break*/, 13];
                    keys = Object.keys(results.execResult.selfdestruct);
                    _i = 0, keys_1 = keys;
                    _a.label = 10;
                case 10:
                    if (!(_i < keys_1.length)) return [3 /*break*/, 13];
                    k = keys_1[_i];
                    return [4 /*yield*/, state.putAccount(Buffer.from(k, 'hex'), new ethereumjs_account_1.default())];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    _i++;
                    return [3 /*break*/, 10];
                case 13: return [4 /*yield*/, state.cleanupTouchedAccounts()
                    /**
                     * The `afterTx` event
                     *
                     * @event Event: afterTx
                     * @type {Object}
                     * @property {Object} result result of the transaction
                     */
                ];
                case 14:
                    _a.sent();
                    /**
                     * The `afterTx` event
                     *
                     * @event Event: afterTx
                     * @type {Object}
                     * @property {Object} result result of the transaction
                     */
                    return [4 /*yield*/, this._emit('afterTx', results)];
                case 15:
                    /**
                     * The `afterTx` event
                     *
                     * @event Event: afterTx
                     * @type {Object}
                     * @property {Object} result result of the transaction
                     */
                    _a.sent();
                    return [2 /*return*/, results];
            }
        });
    });
}
/**
 * @method txLogsBloom
 * @private
 */
function txLogsBloom(logs) {
    var bloom = new bloom_1.default();
    if (logs) {
        for (var i = 0; i < logs.length; i++) {
            var log = logs[i];
            // add the address
            bloom.add(log[0]);
            // add the topics
            var topics = log[1];
            for (var q = 0; q < topics.length; q++) {
                bloom.add(topics[q]);
            }
        }
    }
    return bloom;
}
//# sourceMappingURL=runTx.js.map

/***/ }),

/***/ 675143:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var asyncLib = __webpack_require__(500167);
var Tree = __webpack_require__(244977);
var ethereumjs_account_1 = __webpack_require__(95789);
/**
 * @ignore
 */
var Cache = /** @class */ (function () {
    function Cache(trie) {
        this._cache = Tree();
        this._checkpoints = [];
        this._trie = trie;
    }
    /**
     * Puts account to cache under its address.
     * @param key - Address of account
     * @param val - Account
     */
    Cache.prototype.put = function (key, val, fromTrie) {
        if (fromTrie === void 0) { fromTrie = false; }
        var modified = !fromTrie;
        this._update(key, val, modified, false);
    };
    /**
     * Returns the queried account or an empty account.
     * @param key - Address of account
     */
    Cache.prototype.get = function (key) {
        var account = this.lookup(key);
        if (!account) {
            account = new ethereumjs_account_1.default();
        }
        return account;
    };
    /**
     * Returns the queried account or undefined.
     * @param key - Address of account
     */
    Cache.prototype.lookup = function (key) {
        var keyStr = key.toString('hex');
        var it = this._cache.find(keyStr);
        if (it.node) {
            var account = new ethereumjs_account_1.default(it.value.val);
            return account;
        }
    };
    /**
     * Looks up address in underlying trie.
     * @param address - Address of account
     * @param cb - Callback with params (err, account)
     */
    Cache.prototype._lookupAccount = function (address, cb) {
        this._trie.get(address, function (err, raw) {
            if (err)
                return cb(err);
            var account = new ethereumjs_account_1.default(raw);
            cb(null, account);
        });
    };
    /**
     * Looks up address in cache, if not found, looks it up
     * in the underlying trie.
     * @param key - Address of account
     * @param cb - Callback with params (err, account)
     */
    Cache.prototype.getOrLoad = function (key, cb) {
        var _this = this;
        var account = this.lookup(key);
        if (account) {
            asyncLib.nextTick(cb, null, account);
        }
        else {
            this._lookupAccount(key, function (err, account) {
                if (err)
                    return cb(err);
                _this._update(key, account, false, false);
                cb(null, account);
            });
        }
    };
    /**
     * Warms cache by loading their respective account from trie
     * and putting them in cache.
     * @param addresses - Array of addresses
     * @param cb - Callback
     */
    Cache.prototype.warm = function (addresses, cb) {
        var _this = this;
        // shim till async supports iterators
        var accountArr = [];
        addresses.forEach(function (val) {
            if (val)
                accountArr.push(val);
        });
        asyncLib.eachSeries(accountArr, function (addressHex, done) {
            var address = Buffer.from(addressHex, 'hex');
            _this._lookupAccount(address, function (err, account) {
                if (err)
                    return done(err);
                _this._update(address, account, false, false);
                done();
            });
        }, cb);
    };
    /**
     * Flushes cache by updating accounts that have been modified
     * and removing accounts that have been deleted.
     * @param cb - Callback
     */
    Cache.prototype.flush = function (cb) {
        var _this = this;
        var it = this._cache.begin;
        var next = true;
        asyncLib.whilst(function () { return next; }, function (done) {
            if (it.value && it.value.modified) {
                it.value.modified = false;
                it.value.val = it.value.val.serialize();
                _this._trie.put(Buffer.from(it.key, 'hex'), it.value.val, function (err) {
                    if (err)
                        return done(err);
                    next = it.hasNext;
                    it.next();
                    done();
                });
            }
            else if (it.value && it.value.deleted) {
                it.value.modified = false;
                it.value.deleted = false;
                it.value.val = new ethereumjs_account_1.default().serialize();
                _this._trie.del(Buffer.from(it.key, 'hex'), function (err) {
                    if (err)
                        return done(err);
                    next = it.hasNext;
                    it.next();
                    done();
                });
            }
            else {
                next = it.hasNext;
                it.next();
                asyncLib.nextTick(done);
            }
        }, cb);
    };
    /**
     * Marks current state of cache as checkpoint, which can
     * later on be reverted or commited.
     */
    Cache.prototype.checkpoint = function () {
        this._checkpoints.push(this._cache);
    };
    /**
     * Revert changes to cache last checkpoint (no effect on trie).
     */
    Cache.prototype.revert = function () {
        this._cache = this._checkpoints.pop();
    };
    /**
     * Commits to current state of cache (no effect on trie).
     */
    Cache.prototype.commit = function () {
        this._checkpoints.pop();
    };
    /**
     * Clears cache.
     */
    Cache.prototype.clear = function () {
        this._cache = Tree();
    };
    /**
     * Marks address as deleted in cache.
     * @param key - Address
     */
    Cache.prototype.del = function (key) {
        this._update(key, new ethereumjs_account_1.default(), false, true);
    };
    Cache.prototype._update = function (key, val, modified, deleted) {
        var keyHex = key.toString('hex');
        var it = this._cache.find(keyHex);
        if (it.node) {
            this._cache = it.update({
                val: val,
                modified: modified,
                deleted: deleted,
            });
        }
        else {
            this._cache = this._cache.insert(keyHex, {
                val: val,
                modified: modified,
                deleted: deleted,
            });
        }
    };
    return Cache;
}());
exports.default = Cache;
//# sourceMappingURL=cache.js.map

/***/ }),

/***/ 203745:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var stateManager_1 = __webpack_require__(731901);
exports.StateManager = stateManager_1.default;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 238143:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var promisify = __webpack_require__(38159);
/**
 * Promisified wrapper around [[StateManager]]
 * @ignore
 */
var PStateManager = /** @class */ (function () {
    function PStateManager(wrapped) {
        this._wrapped = wrapped;
        // We cache these promisified function as they are called lots of times during the VM execution,
        // and promisifying them each time has degrades its performance.
        this.getAccount = promisify(this._wrapped.getAccount.bind(this._wrapped));
        this.putAccount = promisify(this._wrapped.putAccount.bind(this._wrapped));
        this.putContractCode = promisify(this._wrapped.putContractCode.bind(this._wrapped));
        this.getContractCode = promisify(this._wrapped.getContractCode.bind(this._wrapped));
        this.getContractStorage = promisify(this._wrapped.getContractStorage.bind(this._wrapped));
        this.getOriginalContractStorage = promisify(this._wrapped.getOriginalContractStorage.bind(this._wrapped));
        this.putContractStorage = promisify(this._wrapped.putContractStorage.bind(this._wrapped));
        this.clearContractStorage = promisify(this._wrapped.clearContractStorage.bind(this._wrapped));
        this.checkpoint = promisify(this._wrapped.checkpoint.bind(this._wrapped));
        this.commit = promisify(this._wrapped.commit.bind(this._wrapped));
        this.revert = promisify(this._wrapped.revert.bind(this._wrapped));
        this.getStateRoot = promisify(this._wrapped.getStateRoot.bind(this._wrapped));
        this.setStateRoot = promisify(this._wrapped.setStateRoot.bind(this._wrapped));
        this.dumpStorage = promisify(this._wrapped.dumpStorage.bind(this._wrapped));
        this.hasGenesisState = promisify(this._wrapped.hasGenesisState.bind(this._wrapped));
        this.generateCanonicalGenesis = promisify(this._wrapped.generateCanonicalGenesis.bind(this._wrapped));
        this.generateGenesis = promisify(this._wrapped.generateGenesis.bind(this._wrapped));
        this.accountIsEmpty = promisify(this._wrapped.accountIsEmpty.bind(this._wrapped));
        this.cleanupTouchedAccounts = promisify(this._wrapped.cleanupTouchedAccounts.bind(this._wrapped));
    }
    PStateManager.prototype.copy = function () {
        return new PStateManager(this._wrapped.copy());
    };
    return PStateManager;
}());
exports.default = PStateManager;
//# sourceMappingURL=promisified.js.map

/***/ }),

/***/ 731901:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var Set = __webpack_require__(176998);
var Trie = __webpack_require__(710802);
var asyncLib = __webpack_require__(500167);
var utils = __webpack_require__(425332);
var BN = __webpack_require__(213550);
var rlp_1 = __webpack_require__(6636);
var ethereumjs_common_1 = __webpack_require__(265982);
var genesisStates_1 = __webpack_require__(916140);
var ethereumjs_account_1 = __webpack_require__(95789);
var cache_1 = __webpack_require__(675143);
var precompiles_1 = __webpack_require__(838081);
/**
 * Interface for getting and setting data from an underlying
 * state trie.
 */
var StateManager = /** @class */ (function () {
    /**
     * Instantiate the StateManager interface.
     */
    function StateManager(opts) {
        if (opts === void 0) { opts = {}; }
        var common = opts.common;
        if (!common) {
            common = new ethereumjs_common_1.default('mainnet', 'petersburg');
        }
        this._common = common;
        this._trie = opts.trie || new Trie();
        this._storageTries = {}; // the storage trie cache
        this._cache = new cache_1.default(this._trie);
        this._touched = new Set();
        this._touchedStack = [];
        this._checkpointCount = 0;
        this._originalStorageCache = new Map();
    }
    /**
     * Copies the current instance of the `StateManager`
     * at the last fully committed point, i.e. as if all current
     * checkpoints were reverted.
     */
    StateManager.prototype.copy = function () {
        return new StateManager({ trie: this._trie.copy(), common: this._common });
    };
    /**
     * Callback for `getAccount` method.
     * @callback getAccount~callback
     * @param error - an error that may have happened or `null`
     * @param account - An [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account)
     * instance corresponding to the provided `address`
     */
    /**
     * Gets the [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account)
     * associated with `address`. Returns an empty account if the account does not exist.
     * @param address - Address of the `account` to get
     * @param {getAccount~callback} cb
     */
    StateManager.prototype.getAccount = function (address, cb) {
        this._cache.getOrLoad(address, cb);
    };
    /**
     * Saves an [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account)
     * into state under the provided `address`.
     * @param address - Address under which to store `account`
     * @param account - The [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) to store
     * @param cb - Callback function
     */
    StateManager.prototype.putAccount = function (address, account, cb) {
        // TODO: dont save newly created accounts that have no balance
        // if (toAccount.balance.toString('hex') === '00') {
        // if they have money or a non-zero nonce or code, then write to tree
        this._cache.put(address, account);
        this.touchAccount(address);
        // self._trie.put(addressHex, account.serialize(), cb)
        cb();
    };
    /**
     * Marks an account as touched, according to the definition
     * in [EIP-158](https://eips.ethereum.org/EIPS/eip-158).
     * This happens when the account is triggered for a state-changing
     * event. Touched accounts that are empty will be cleared
     * at the end of the tx.
     */
    StateManager.prototype.touchAccount = function (address) {
        this._touched.add(address.toString('hex'));
    };
    /**
     * Adds `value` to the state trie as code, and sets `codeHash` on the account
     * corresponding to `address` to reference this.
     * @param address - Address of the `account` to add the `code` for
     * @param value - The value of the `code`
     * @param cb - Callback function
     */
    StateManager.prototype.putContractCode = function (address, value, cb) {
        var _this = this;
        this.getAccount(address, function (err, account) {
            if (err) {
                return cb(err);
            }
            // TODO: setCode use trie.setRaw which creates a storage leak
            account.setCode(_this._trie, value, function (err) {
                if (err) {
                    return cb(err);
                }
                _this.putAccount(address, account, cb);
            });
        });
    };
    /**
     * Callback for `getContractCode` method
     * @callback getContractCode~callback
     * @param error - an error that may have happened or `null`
     * @param code - The code corresponding to the provided address.
     * Returns an empty `Buffer` if the account has no associated code.
     */
    /**
     * Gets the code corresponding to the provided `address`.
     * @param address - Address to get the `code` for
     * @param {getContractCode~callback} cb
     */
    StateManager.prototype.getContractCode = function (address, cb) {
        var _this = this;
        this.getAccount(address, function (err, account) {
            if (err) {
                return cb(err);
            }
            account.getCode(_this._trie, cb);
        });
    };
    /**
     * Creates a storage trie from the primary storage trie
     * for an account and saves this in the storage cache.
     * @private
     */
    StateManager.prototype._lookupStorageTrie = function (address, cb) {
        var _this = this;
        // from state trie
        this.getAccount(address, function (err, account) {
            if (err) {
                return cb(err);
            }
            var storageTrie = _this._trie.copy();
            storageTrie.root = account.stateRoot;
            storageTrie._checkpoints = [];
            cb(null, storageTrie);
        });
    };
    /**
     * Gets the storage trie for an account from the storage
     * cache or does a lookup.
     * @private
     */
    StateManager.prototype._getStorageTrie = function (address, cb) {
        var storageTrie = this._storageTries[address.toString('hex')];
        // from storage cache
        if (storageTrie) {
            return cb(null, storageTrie);
        }
        // lookup from state
        this._lookupStorageTrie(address, cb);
    };
    /**
     * Callback for `getContractStorage` method
     * @callback getContractStorage~callback
     * @param {Error} error an error that may have happened or `null`
     * @param {Buffer} storageValue The storage value for the account
     * corresponding to the provided address at the provided key.
     * If this does not exists an empty `Buffer` is returned
     */
    /**
     * Gets the storage value associated with the provided `address` and `key`. This method returns
     * the shortest representation of the stored value.
     * @param address -  Address of the account to get the storage for
     * @param key - Key in the account's storage to get the value for. Must be 32 bytes long.
     * @param {getContractCode~callback} cb.
     */
    StateManager.prototype.getContractStorage = function (address, key, cb) {
        if (key.length !== 32) {
            return cb(new Error('Storage key must be 32 bytes long'));
        }
        this._getStorageTrie(address, function (err, trie) {
            if (err) {
                return cb(err);
            }
            trie.get(key, function (err, value) {
                if (err) {
                    return cb(err);
                }
                var decoded = rlp_1.decode(value);
                cb(null, decoded);
            });
        });
    };
    /**
     * Caches the storage value associated with the provided `address` and `key`
     * on first invocation, and returns the cached (original) value from then
     * onwards. This is used to get the original value of a storage slot for
     * computing gas costs according to EIP-1283.
     * @param address - Address of the account to get the storage for
     * @param key - Key in the account's storage to get the value for. Must be 32 bytes long.
     */
    StateManager.prototype.getOriginalContractStorage = function (address, key, cb) {
        if (key.length !== 32) {
            return cb(new Error('Storage key must be 32 bytes long'));
        }
        var addressHex = address.toString('hex');
        var keyHex = key.toString('hex');
        var map;
        if (!this._originalStorageCache.has(addressHex)) {
            map = new Map();
            this._originalStorageCache.set(addressHex, map);
        }
        else {
            map = this._originalStorageCache.get(addressHex);
        }
        if (map.has(keyHex)) {
            cb(null, map.get(keyHex));
        }
        else {
            this.getContractStorage(address, key, function (err, current) {
                if (err)
                    return cb(err);
                map.set(keyHex, current);
                cb(null, current);
            });
        }
    };
    /**
     * Modifies the storage trie of an account
     * @private
     * @param address -  Address of the account whose storage is to be modified
     * @param modifyTrie - Function to modify the storage trie of the account
     */
    StateManager.prototype._modifyContractStorage = function (address, modifyTrie, cb) {
        var _this = this;
        this._getStorageTrie(address, function (err, storageTrie) {
            if (err) {
                return cb(err);
            }
            modifyTrie(storageTrie, function (err) {
                if (err)
                    return cb(err);
                // update storage cache
                _this._storageTries[address.toString('hex')] = storageTrie;
                // update contract stateRoot
                var contract = _this._cache.get(address);
                contract.stateRoot = storageTrie.root;
                _this.putAccount(address, contract, cb);
                _this.touchAccount(address);
            });
        });
    };
    /**
     * Adds value to the state trie for the `account`
     * corresponding to `address` at the provided `key`.
     * @param address -  Address to set a storage value for
     * @param key - Key to set the value at. Must be 32 bytes long.
     * @param value - Value to set at `key` for account corresponding to `address`
     * @param cb - Callback function
     */
    StateManager.prototype.putContractStorage = function (address, key, value, cb) {
        if (key.length !== 32) {
            return cb(new Error('Storage key must be 32 bytes long'));
        }
        this._modifyContractStorage(address, function (storageTrie, done) {
            if (value && value.length) {
                // format input
                var encodedValue = rlp_1.encode(value);
                storageTrie.put(key, encodedValue, done);
            }
            else {
                // deleting a value
                storageTrie.del(key, done);
            }
        }, cb);
    };
    /**
     * Clears all storage entries for the account corresponding to `address`.
     * @param address -  Address to clear the storage of
     * @param cb - Callback function
     */
    StateManager.prototype.clearContractStorage = function (address, cb) {
        this._modifyContractStorage(address, function (storageTrie, done) {
            storageTrie.root = storageTrie.EMPTY_TRIE_ROOT;
            done();
        }, cb);
    };
    /**
     * Checkpoints the current state of the StateManager instance.
     * State changes that follow can then be committed by calling
     * `commit` or `reverted` by calling rollback.
     * @param cb - Callback function
     */
    StateManager.prototype.checkpoint = function (cb) {
        this._trie.checkpoint();
        this._cache.checkpoint();
        this._touchedStack.push(new Set(Array.from(this._touched)));
        this._checkpointCount++;
        cb();
    };
    /**
     * Commits the current change-set to the instance since the
     * last call to checkpoint.
     * @param cb - Callback function
     */
    StateManager.prototype.commit = function (cb) {
        var _this = this;
        // setup trie checkpointing
        this._trie.commit(function () {
            // setup cache checkpointing
            _this._cache.commit();
            _this._touchedStack.pop();
            _this._checkpointCount--;
            if (_this._checkpointCount === 0)
                _this._cache.flush(cb);
            else
                cb();
        });
    };
    /**
     * Reverts the current change-set to the instance since the
     * last call to checkpoint.
     * @param cb - Callback function
     */
    StateManager.prototype.revert = function (cb) {
        // setup trie checkpointing
        this._trie.revert();
        // setup cache checkpointing
        this._cache.revert();
        this._storageTries = {};
        var touched = this._touchedStack.pop();
        if (!touched) {
            throw new Error('Reverting to invalid state checkpoint failed');
        }
        // Exceptional case due to consensus issue in Geth and Parity.
        // See [EIP issue #716](https://github.com/ethereum/EIPs/issues/716) for context.
        // The RIPEMD precompile has to remain *touched* even when the call reverts,
        // and be considered for deletion.
        if (this._touched.has(precompiles_1.ripemdPrecompileAddress)) {
            touched.add(precompiles_1.ripemdPrecompileAddress);
        }
        this._touched = touched;
        this._checkpointCount--;
        if (this._checkpointCount === 0)
            this._cache.flush(cb);
        else
            cb();
    };
    /**
     * Callback for `getStateRoot` method
     * @callback getStateRoot~callback
     * @param {Error} error an error that may have happened or `null`.
     * Will be an error if the un-committed checkpoints on the instance.
     * @param {Buffer} stateRoot The state-root of the `StateManager`
     */
    /**
     * Gets the state-root of the Merkle-Patricia trie representation
     * of the state of this StateManager. Will error if there are uncommitted
     * checkpoints on the instance.
     * @param {getStateRoot~callback} cb
     */
    StateManager.prototype.getStateRoot = function (cb) {
        var _this = this;
        if (this._checkpointCount !== 0) {
            return cb(new Error('Cannot get state root with uncommitted checkpoints'));
        }
        this._cache.flush(function (err) {
            if (err) {
                return cb(err);
            }
            var stateRoot = _this._trie.root;
            cb(null, stateRoot);
        });
    };
    /**
     * Sets the state of the instance to that represented
     * by the provided `stateRoot`. Will error if there are uncommitted
     * checkpoints on the instance or if the state root does not exist in
     * the state trie.
     * @param stateRoot - The state-root to reset the instance to
     * @param cb - Callback function
     */
    StateManager.prototype.setStateRoot = function (stateRoot, cb) {
        var _this = this;
        if (this._checkpointCount !== 0) {
            return cb(new Error('Cannot set state root with uncommitted checkpoints'));
        }
        this._cache.flush(function (err) {
            if (err) {
                return cb(err);
            }
            if (stateRoot === _this._trie.EMPTY_TRIE_ROOT) {
                _this._trie.root = stateRoot;
                _this._cache.clear();
                _this._storageTries = {};
                return cb();
            }
            _this._trie.checkRoot(stateRoot, function (err, hasRoot) {
                if (err || !hasRoot) {
                    cb(err || new Error('State trie does not contain state root'));
                }
                else {
                    _this._trie.root = stateRoot;
                    _this._cache.clear();
                    _this._storageTries = {};
                    cb();
                }
            });
        });
    };
    /**
     * Callback for `dumpStorage` method
     * @callback dumpStorage~callback
     * @param {Error} error an error that may have happened or `null`
     * @param {Object} accountState The state of the account as an `Object` map.
     * Keys are are the storage keys, values are the storage values as strings.
     * Both are represented as hex strings without the `0x` prefix.
     */
    /**
     * Dumps the the storage values for an `account` specified by `address`.
     * @param address - The address of the `account` to return storage for
     * @param {dumpStorage~callback} cb
     */
    StateManager.prototype.dumpStorage = function (address, cb) {
        this._getStorageTrie(address, function (err, trie) {
            if (err) {
                return cb(err);
            }
            var storage = {};
            var stream = trie.createReadStream();
            stream.on('data', function (val) {
                storage[val.key.toString('hex')] = val.value.toString('hex');
            });
            stream.on('end', function () {
                cb(storage);
            });
        });
    };
    /**
     * Callback for `hasGenesisState` method
     * @callback hasGenesisState~callback
     * @param {Error} error an error that may have happened or `null`
     * @param {Boolean} hasGenesisState Whether the storage trie contains the
     * canonical genesis state for the configured chain parameters.
     */
    /**
     * Checks whether the current instance has the canonical genesis state
     * for the configured chain parameters.
     * @param {hasGenesisState~callback} cb
     */
    StateManager.prototype.hasGenesisState = function (cb) {
        var root = this._common.genesis().stateRoot;
        this._trie.checkRoot(root, cb);
    };
    /**
     * Generates a canonical genesis state on the instance based on the
     * configured chain parameters. Will error if there are uncommitted
     * checkpoints on the instance.
     * @param cb - Callback function
     */
    StateManager.prototype.generateCanonicalGenesis = function (cb) {
        var _this = this;
        if (this._checkpointCount !== 0) {
            return cb(new Error('Cannot create genesis state with uncommitted checkpoints'));
        }
        this.hasGenesisState(function (err, genesis) {
            if (!genesis && !err) {
                _this.generateGenesis(genesisStates_1.genesisStateByName(_this._common.chainName()), cb);
            }
            else {
                cb(err);
            }
        });
    };
    /**
     * Initializes the provided genesis state into the state trie
     * @param initState - Object (address -> balance)
     * @param cb - Callback function
     */
    StateManager.prototype.generateGenesis = function (initState, cb) {
        var _this = this;
        if (this._checkpointCount !== 0) {
            return cb(new Error('Cannot create genesis state with uncommitted checkpoints'));
        }
        var addresses = Object.keys(initState);
        asyncLib.eachSeries(addresses, function (address, done) {
            var account = new ethereumjs_account_1.default();
            if (initState[address].slice(0, 2) === '0x') {
                account.balance = new BN(initState[address].slice(2), 16).toArrayLike(Buffer);
            }
            else {
                account.balance = new BN(initState[address]).toArrayLike(Buffer);
            }
            var addressBuffer = utils.toBuffer(address);
            _this._trie.put(addressBuffer, account.serialize(), done);
        }, cb);
    };
    /**
     * Callback for `accountIsEmpty` method
     * @callback accountIsEmpty~callback
     * @param {Error} error an error that may have happened or `null`
     * @param {Boolean} empty True if the account is empty false otherwise
     */
    /**
     * Checks if the `account` corresponding to `address` is empty as defined in
     * EIP-161 (https://eips.ethereum.org/EIPS/eip-161).
     * @param address - Address to check
     * @param {accountIsEmpty~callback} cb
     */
    StateManager.prototype.accountIsEmpty = function (address, cb) {
        this.getAccount.bind(this)(address, function (err, account) {
            if (err) {
                return cb(err);
            }
            // should be replaced by account.isEmpty() once updated
            cb(null, account.nonce.toString('hex') === '' &&
                account.balance.toString('hex') === '' &&
                account.codeHash.toString('hex') === utils.KECCAK256_NULL_S);
        });
    };
    /**
     * Removes accounts form the state trie that have been touched,
     * as defined in EIP-161 (https://eips.ethereum.org/EIPS/eip-161).
     * @param cb - Callback function
     */
    StateManager.prototype.cleanupTouchedAccounts = function (cb) {
        var _this = this;
        var touchedArray = Array.from(this._touched);
        asyncLib.forEach(touchedArray, function (addressHex, next) {
            var address = Buffer.from(addressHex, 'hex');
            _this.accountIsEmpty(address, function (err, empty) {
                if (err) {
                    next(err);
                    return;
                }
                if (empty) {
                    _this._cache.del(address);
                }
                next(null);
            });
        }, function () {
            _this._touched.clear();
            cb();
        });
    };
    /**
     * Clears the original storage cache. Refer to [[getOriginalContractStorage]]
     * for more explanation.
     * @ignore
     */
    StateManager.prototype._clearOriginalStorageCache = function () {
        this._originalStorageCache = new Map();
    };
    return StateManager;
}());
exports.default = StateManager;
//# sourceMappingURL=stateManager.js.map

/***/ }),

/***/ 500167:
/***/ (function(module, exports, __webpack_require__) {

/* module decorator */ module = __webpack_require__.nmd(module);
(function (global, factory) {
   true ? factory(exports) :
  0;
}(this, (function (exports) { 'use strict';

function slice(arrayLike, start) {
    start = start|0;
    var newLen = Math.max(arrayLike.length - start, 0);
    var newArr = Array(newLen);
    for(var idx = 0; idx < newLen; idx++)  {
        newArr[idx] = arrayLike[start + idx];
    }
    return newArr;
}

/**
 * Creates a continuation function with some arguments already applied.
 *
 * Useful as a shorthand when combined with other control flow functions. Any
 * arguments passed to the returned function are added to the arguments
 * originally passed to apply.
 *
 * @name apply
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {Function} fn - The function you want to eventually apply all
 * arguments to. Invokes with (arguments...).
 * @param {...*} arguments... - Any number of arguments to automatically apply
 * when the continuation is called.
 * @returns {Function} the partially-applied function
 * @example
 *
 * // using apply
 * async.parallel([
 *     async.apply(fs.writeFile, 'testfile1', 'test1'),
 *     async.apply(fs.writeFile, 'testfile2', 'test2')
 * ]);
 *
 *
 * // the same process without using apply
 * async.parallel([
 *     function(callback) {
 *         fs.writeFile('testfile1', 'test1', callback);
 *     },
 *     function(callback) {
 *         fs.writeFile('testfile2', 'test2', callback);
 *     }
 * ]);
 *
 * // It's possible to pass any number of additional arguments when calling the
 * // continuation:
 *
 * node> var fn = async.apply(sys.puts, 'one');
 * node> fn('two', 'three');
 * one
 * two
 * three
 */
var apply = function(fn/*, ...args*/) {
    var args = slice(arguments, 1);
    return function(/*callArgs*/) {
        var callArgs = slice(arguments);
        return fn.apply(null, args.concat(callArgs));
    };
};

var initialParams = function (fn) {
    return function (/*...args, callback*/) {
        var args = slice(arguments);
        var callback = args.pop();
        fn.call(this, args, callback);
    };
};

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';

function fallback(fn) {
    setTimeout(fn, 0);
}

function wrap(defer) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        defer(function () {
            fn.apply(null, args);
        });
    };
}

var _defer;

if (hasSetImmediate) {
    _defer = setImmediate;
} else if (hasNextTick) {
    _defer = process.nextTick;
} else {
    _defer = fallback;
}

var setImmediate$1 = wrap(_defer);

/**
 * Take a sync function and make it async, passing its return value to a
 * callback. This is useful for plugging sync functions into a waterfall,
 * series, or other async functions. Any arguments passed to the generated
 * function will be passed to the wrapped function (except for the final
 * callback argument). Errors thrown will be passed to the callback.
 *
 * If the function passed to `asyncify` returns a Promise, that promises's
 * resolved/rejected state will be used to call the callback, rather than simply
 * the synchronous return value.
 *
 * This also means you can asyncify ES2017 `async` functions.
 *
 * @name asyncify
 * @static
 * @memberOf module:Utils
 * @method
 * @alias wrapSync
 * @category Util
 * @param {Function} func - The synchronous function, or Promise-returning
 * function to convert to an {@link AsyncFunction}.
 * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
 * invoked with `(args..., callback)`.
 * @example
 *
 * // passing a regular synchronous function
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(JSON.parse),
 *     function (data, next) {
 *         // data is the result of parsing the text.
 *         // If there was a parsing error, it would have been caught.
 *     }
 * ], callback);
 *
 * // passing a function returning a promise
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(function (contents) {
 *         return db.model.create(contents);
 *     }),
 *     function (model, next) {
 *         // `model` is the instantiated model object.
 *         // If there was an error, this function would be skipped.
 *     }
 * ], callback);
 *
 * // es2017 example, though `asyncify` is not needed if your JS environment
 * // supports async functions out of the box
 * var q = async.queue(async.asyncify(async function(file) {
 *     var intermediateStep = await processFile(file);
 *     return await somePromise(intermediateStep)
 * }));
 *
 * q.push(files);
 */
function asyncify(func) {
    return initialParams(function (args, callback) {
        var result;
        try {
            result = func.apply(this, args);
        } catch (e) {
            return callback(e);
        }
        // if result is Promise object
        if (isObject(result) && typeof result.then === 'function') {
            result.then(function(value) {
                invokeCallback(callback, null, value);
            }, function(err) {
                invokeCallback(callback, err.message ? err : new Error(err));
            });
        } else {
            callback(null, result);
        }
    });
}

function invokeCallback(callback, error, value) {
    try {
        callback(error, value);
    } catch (e) {
        setImmediate$1(rethrow, e);
    }
}

function rethrow(error) {
    throw error;
}

var supportsSymbol = typeof Symbol === 'function';

function isAsync(fn) {
    return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
}

function wrapAsync(asyncFn) {
    return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}

function applyEach$1(eachfn) {
    return function(fns/*, ...args*/) {
        var args = slice(arguments, 1);
        var go = initialParams(function(args, callback) {
            var that = this;
            return eachfn(fns, function (fn, cb) {
                wrapAsync(fn).apply(that, args.concat(cb));
            }, callback);
        });
        if (args.length) {
            return go.apply(this, args);
        }
        else {
            return go;
        }
    };
}

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Built-in value references. */
var Symbol$1 = root.Symbol;

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$1 = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$1 = objectProto$1.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString$1.call(value);
}

/** `Object#toString` result references. */
var nullTag = '[object Null]';
var undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]';
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
var proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
var breakLoop = {};

/**
 * This method returns `undefined`.
 *
 * @static
 * @memberOf _
 * @since 2.3.0
 * @category Util
 * @example
 *
 * _.times(2, _.noop);
 * // => [undefined, undefined]
 */
function noop() {
  // No operation performed.
}

function once(fn) {
    return function () {
        if (fn === null) return;
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;

var getIterator = function (coll) {
    return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
};

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/** `Object#toString` result references. */
var argsTag = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/** Used for built-in method references. */
var objectProto$3 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER$1 : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';
var arrayTag = '[object Array]';
var boolTag = '[object Boolean]';
var dateTag = '[object Date]';
var errorTag = '[object Error]';
var funcTag$1 = '[object Function]';
var mapTag = '[object Map]';
var numberTag = '[object Number]';
var objectTag = '[object Object]';
var regexpTag = '[object RegExp]';
var setTag = '[object Set]';
var stringTag = '[object String]';
var weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]';
var dataViewTag = '[object DataView]';
var float32Tag = '[object Float32Array]';
var float64Tag = '[object Float64Array]';
var int8Tag = '[object Int8Array]';
var int16Tag = '[object Int16Array]';
var int32Tag = '[object Int32Array]';
var uint8Tag = '[object Uint8Array]';
var uint8ClampedTag = '[object Uint8ClampedArray]';
var uint16Tag = '[object Uint16Array]';
var uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports$1 && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/** Used for built-in method references. */
var objectProto$2 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$1.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$5 = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;

  return value === proto;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/** Used for built-in method references. */
var objectProto$4 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

function createArrayIterator(coll) {
    var i = -1;
    var len = coll.length;
    return function next() {
        return ++i < len ? {value: coll[i], key: i} : null;
    }
}

function createES2015Iterator(iterator) {
    var i = -1;
    return function next() {
        var item = iterator.next();
        if (item.done)
            return null;
        i++;
        return {value: item.value, key: i};
    }
}

function createObjectIterator(obj) {
    var okeys = keys(obj);
    var i = -1;
    var len = okeys.length;
    return function next() {
        var key = okeys[++i];
        return i < len ? {value: obj[key], key: key} : null;
    };
}

function iterator(coll) {
    if (isArrayLike(coll)) {
        return createArrayIterator(coll);
    }

    var iterator = getIterator(coll);
    return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}

function onlyOnce(fn) {
    return function() {
        if (fn === null) throw new Error("Callback was already called.");
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

function _eachOfLimit(limit) {
    return function (obj, iteratee, callback) {
        callback = once(callback || noop);
        if (limit <= 0 || !obj) {
            return callback(null);
        }
        var nextElem = iterator(obj);
        var done = false;
        var running = 0;
        var looping = false;

        function iterateeCallback(err, value) {
            running -= 1;
            if (err) {
                done = true;
                callback(err);
            }
            else if (value === breakLoop || (done && running <= 0)) {
                done = true;
                return callback(null);
            }
            else if (!looping) {
                replenish();
            }
        }

        function replenish () {
            looping = true;
            while (running < limit && !done) {
                var elem = nextElem();
                if (elem === null) {
                    done = true;
                    if (running <= 0) {
                        callback(null);
                    }
                    return;
                }
                running += 1;
                iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
            }
            looping = false;
        }

        replenish();
    };
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name eachOfLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`. The `key` is the item's key, or index in the case of an
 * array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachOfLimit(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback);
}

function doLimit(fn, limit) {
    return function (iterable, iteratee, callback) {
        return fn(iterable, limit, iteratee, callback);
    };
}

// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
    callback = once(callback || noop);
    var index = 0,
        completed = 0,
        length = coll.length;
    if (length === 0) {
        callback(null);
    }

    function iteratorCallback(err, value) {
        if (err) {
            callback(err);
        } else if ((++completed === length) || value === breakLoop) {
            callback(null);
        }
    }

    for (; index < length; index++) {
        iteratee(coll[index], index, onlyOnce(iteratorCallback));
    }
}

// a generic version of eachOf which can handle array, object, and iterator cases.
var eachOfGeneric = doLimit(eachOfLimit, Infinity);

/**
 * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
 * to the iteratee.
 *
 * @name eachOf
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEachOf
 * @category Collection
 * @see [async.each]{@link module:Collections.each}
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each
 * item in `coll`.
 * The `key` is the item's key, or index in the case of an array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
 * var configs = {};
 *
 * async.forEachOf(obj, function (value, key, callback) {
 *     fs.readFile(__dirname + value, "utf8", function (err, data) {
 *         if (err) return callback(err);
 *         try {
 *             configs[key] = JSON.parse(data);
 *         } catch (e) {
 *             return callback(e);
 *         }
 *         callback();
 *     });
 * }, function (err) {
 *     if (err) console.error(err.message);
 *     // configs is now a map of JSON data
 *     doSomethingWith(configs);
 * });
 */
var eachOf = function(coll, iteratee, callback) {
    var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
    eachOfImplementation(coll, wrapAsync(iteratee), callback);
};

function doParallel(fn) {
    return function (obj, iteratee, callback) {
        return fn(eachOf, obj, wrapAsync(iteratee), callback);
    };
}

function _asyncMap(eachfn, arr, iteratee, callback) {
    callback = callback || noop;
    arr = arr || [];
    var results = [];
    var counter = 0;
    var _iteratee = wrapAsync(iteratee);

    eachfn(arr, function (value, _, callback) {
        var index = counter++;
        _iteratee(value, function (err, v) {
            results[index] = v;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Produces a new collection of values by mapping each value in `coll` through
 * the `iteratee` function. The `iteratee` is called with an item from `coll`
 * and a callback for when it has finished processing. Each of these callback
 * takes 2 arguments: an `error`, and the transformed item from `coll`. If
 * `iteratee` passes an error to its callback, the main `callback` (for the
 * `map` function) is immediately called with the error.
 *
 * Note, that since this function applies the `iteratee` to each item in
 * parallel, there is no guarantee that the `iteratee` functions will complete
 * in order. However, the results array will be in the same order as the
 * original `coll`.
 *
 * If `map` is passed an Object, the results will be an Array.  The results
 * will roughly be in the order of the original Objects' keys (but this can
 * vary across JavaScript engines).
 *
 * @name map
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an Array of the
 * transformed items from the `coll`. Invoked with (err, results).
 * @example
 *
 * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
 *     // results is now an array of stats for each file
 * });
 */
var map = doParallel(_asyncMap);

/**
 * Applies the provided arguments to each function in the array, calling
 * `callback` after all functions have completed. If you only provide the first
 * argument, `fns`, then it will return a function which lets you pass in the
 * arguments as if it were a single function call. If more arguments are
 * provided, `callback` is required while `args` is still optional.
 *
 * @name applyEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
 * to all call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument, `fns`, is provided, it will
 * return a function which lets you pass in the arguments as if it were a single
 * function call. The signature is `(..args, callback)`. If invoked with any
 * arguments, `callback` is required.
 * @example
 *
 * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
 *
 * // partial application example:
 * async.each(
 *     buckets,
 *     async.applyEach([enableSearch, updateSchema]),
 *     callback
 * );
 */
var applyEach = applyEach$1(map);

function doParallelLimit(fn) {
    return function (obj, limit, iteratee, callback) {
        return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback);
    };
}

/**
 * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
 *
 * @name mapLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapLimit = doParallelLimit(_asyncMap);

/**
 * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
 *
 * @name mapSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapSeries = doLimit(mapLimit, 1);

/**
 * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
 *
 * @name applyEachSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.applyEach]{@link module:ControlFlow.applyEach}
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
 * call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument is provided, it will return
 * a function which lets you pass in the arguments as if it were a single
 * function call.
 */
var applyEachSeries = applyEach$1(mapSeries);

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new base function.
 */
function createBaseFor(fromRight) {
  return function(object, iteratee, keysFunc) {
    var index = -1,
        iterable = Object(object),
        props = keysFunc(object),
        length = props.length;

    while (length--) {
      var key = props[fromRight ? length : ++index];
      if (iteratee(iterable[key], key, iterable) === false) {
        break;
      }
    }
    return object;
  };
}

/**
 * The base implementation of `baseForOwn` which iterates over `object`
 * properties returned by `keysFunc` and invokes `iteratee` for each property.
 * Iteratee functions may exit iteration early by explicitly returning `false`.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @returns {Object} Returns `object`.
 */
var baseFor = createBaseFor();

/**
 * The base implementation of `_.forOwn` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Object} Returns `object`.
 */
function baseForOwn(object, iteratee) {
  return object && baseFor(object, iteratee, keys);
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.isNaN` without support for number objects.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 */
function baseIsNaN(value) {
  return value !== value;
}

/**
 * A specialized version of `_.indexOf` which performs strict equality
 * comparisons of values, i.e. `===`.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function strictIndexOf(array, value, fromIndex) {
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (array[index] === value) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOf(array, value, fromIndex) {
  return value === value
    ? strictIndexOf(array, value, fromIndex)
    : baseFindIndex(array, baseIsNaN, fromIndex);
}

/**
 * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
 * their requirements. Each function can optionally depend on other functions
 * being completed first, and each function is run as soon as its requirements
 * are satisfied.
 *
 * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
 * will stop. Further tasks will not execute (so any other functions depending
 * on it will not run), and the main `callback` is immediately called with the
 * error.
 *
 * {@link AsyncFunction}s also receive an object containing the results of functions which
 * have completed so far as the first argument, if they have dependencies. If a
 * task function has no dependencies, it will only be passed a callback.
 *
 * @name auto
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Object} tasks - An object. Each of its properties is either a
 * function or an array of requirements, with the {@link AsyncFunction} itself the last item
 * in the array. The object's key of a property serves as the name of the task
 * defined by that property, i.e. can be used when specifying requirements for
 * other tasks. The function receives one or two arguments:
 * * a `results` object, containing the results of the previously executed
 *   functions, only passed if the task has any dependencies,
 * * a `callback(err, result)` function, which must be called when finished,
 *   passing an `error` (which can be `null`) and the result of the function's
 *   execution.
 * @param {number} [concurrency=Infinity] - An optional `integer` for
 * determining the maximum number of tasks that can be run in parallel. By
 * default, as many as possible.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback. Results are always returned; however, if an
 * error occurs, no further `tasks` will be performed, and the results object
 * will only contain partial results. Invoked with (err, results).
 * @returns undefined
 * @example
 *
 * async.auto({
 *     // this function will just be passed a callback
 *     readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
 *     showData: ['readData', function(results, cb) {
 *         // results.readData is the file's contents
 *         // ...
 *     }]
 * }, callback);
 *
 * async.auto({
 *     get_data: function(callback) {
 *         console.log('in get_data');
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         console.log('in make_folder');
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: ['get_data', 'make_folder', function(results, callback) {
 *         console.log('in write_file', JSON.stringify(results));
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(results, callback) {
 *         console.log('in email_link', JSON.stringify(results));
 *         // once the file is written let's email a link to it...
 *         // results.write_file contains the filename returned by write_file.
 *         callback(null, {'file':results.write_file, 'email':'user@example.com'});
 *     }]
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('results = ', results);
 * });
 */
var auto = function (tasks, concurrency, callback) {
    if (typeof concurrency === 'function') {
        // concurrency is optional, shift the args.
        callback = concurrency;
        concurrency = null;
    }
    callback = once(callback || noop);
    var keys$$1 = keys(tasks);
    var numTasks = keys$$1.length;
    if (!numTasks) {
        return callback(null);
    }
    if (!concurrency) {
        concurrency = numTasks;
    }

    var results = {};
    var runningTasks = 0;
    var hasError = false;

    var listeners = Object.create(null);

    var readyTasks = [];

    // for cycle detection:
    var readyToCheck = []; // tasks that have been identified as reachable
    // without the possibility of returning to an ancestor task
    var uncheckedDependencies = {};

    baseForOwn(tasks, function (task, key) {
        if (!isArray(task)) {
            // no dependencies
            enqueueTask(key, [task]);
            readyToCheck.push(key);
            return;
        }

        var dependencies = task.slice(0, task.length - 1);
        var remainingDependencies = dependencies.length;
        if (remainingDependencies === 0) {
            enqueueTask(key, task);
            readyToCheck.push(key);
            return;
        }
        uncheckedDependencies[key] = remainingDependencies;

        arrayEach(dependencies, function (dependencyName) {
            if (!tasks[dependencyName]) {
                throw new Error('async.auto task `' + key +
                    '` has a non-existent dependency `' +
                    dependencyName + '` in ' +
                    dependencies.join(', '));
            }
            addListener(dependencyName, function () {
                remainingDependencies--;
                if (remainingDependencies === 0) {
                    enqueueTask(key, task);
                }
            });
        });
    });

    checkForDeadlocks();
    processQueue();

    function enqueueTask(key, task) {
        readyTasks.push(function () {
            runTask(key, task);
        });
    }

    function processQueue() {
        if (readyTasks.length === 0 && runningTasks === 0) {
            return callback(null, results);
        }
        while(readyTasks.length && runningTasks < concurrency) {
            var run = readyTasks.shift();
            run();
        }

    }

    function addListener(taskName, fn) {
        var taskListeners = listeners[taskName];
        if (!taskListeners) {
            taskListeners = listeners[taskName] = [];
        }

        taskListeners.push(fn);
    }

    function taskComplete(taskName) {
        var taskListeners = listeners[taskName] || [];
        arrayEach(taskListeners, function (fn) {
            fn();
        });
        processQueue();
    }


    function runTask(key, task) {
        if (hasError) return;

        var taskCallback = onlyOnce(function(err, result) {
            runningTasks--;
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            if (err) {
                var safeResults = {};
                baseForOwn(results, function(val, rkey) {
                    safeResults[rkey] = val;
                });
                safeResults[key] = result;
                hasError = true;
                listeners = Object.create(null);

                callback(err, safeResults);
            } else {
                results[key] = result;
                taskComplete(key);
            }
        });

        runningTasks++;
        var taskFn = wrapAsync(task[task.length - 1]);
        if (task.length > 1) {
            taskFn(results, taskCallback);
        } else {
            taskFn(taskCallback);
        }
    }

    function checkForDeadlocks() {
        // Kahn's algorithm
        // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
        // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
        var currentTask;
        var counter = 0;
        while (readyToCheck.length) {
            currentTask = readyToCheck.pop();
            counter++;
            arrayEach(getDependents(currentTask), function (dependent) {
                if (--uncheckedDependencies[dependent] === 0) {
                    readyToCheck.push(dependent);
                }
            });
        }

        if (counter !== numTasks) {
            throw new Error(
                'async.auto cannot execute tasks due to a recursive dependency'
            );
        }
    }

    function getDependents(taskName) {
        var result = [];
        baseForOwn(tasks, function (task, key) {
            if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) {
                result.push(key);
            }
        });
        return result;
    }
};

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && baseGetTag(value) == symbolTag);
}

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined;
var symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isArray(value)) {
    // Recursively convert values (susceptible to call stack limits).
    return arrayMap(value, baseToString) + '';
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}

/**
 * The base implementation of `_.slice` without an iteratee call guard.
 *
 * @private
 * @param {Array} array The array to slice.
 * @param {number} [start=0] The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the slice of `array`.
 */
function baseSlice(array, start, end) {
  var index = -1,
      length = array.length;

  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = end > length ? length : end;
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}

/**
 * Casts `array` to a slice if it's needed.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {number} start The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the cast slice.
 */
function castSlice(array, start, end) {
  var length = array.length;
  end = end === undefined ? length : end;
  return (!start && end >= length) ? array : baseSlice(array, start, end);
}

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the last unmatched string symbol.
 */
function charsEndIndex(strSymbols, chrSymbols) {
  var index = strSymbols.length;

  while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the first unmatched string symbol.
 */
function charsStartIndex(strSymbols, chrSymbols) {
  var index = -1,
      length = strSymbols.length;

  while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Converts an ASCII `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function asciiToArray(string) {
  return string.split('');
}

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

/**
 * Checks if `string` contains Unicode symbols.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
 */
function hasUnicode(string) {
  return reHasUnicode.test(string);
}

/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
var rsZWJ$1 = '\\u200d';

/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?';
var rsOptVar = '[' + rsVarRange$1 + ']?';
var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/**
 * Converts a Unicode `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function unicodeToArray(string) {
  return string.match(reUnicode) || [];
}

/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return hasUnicode(string)
    ? unicodeToArray(string)
    : asciiToArray(string);
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/**
 * Removes leading and trailing whitespace or specified characters from `string`.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category String
 * @param {string} [string=''] The string to trim.
 * @param {string} [chars=whitespace] The characters to trim.
 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
 * @returns {string} Returns the trimmed string.
 * @example
 *
 * _.trim('  abc  ');
 * // => 'abc'
 *
 * _.trim('-_-abc-_-', '_-');
 * // => 'abc'
 *
 * _.map(['  foo  ', '  bar  '], _.trim);
 * // => ['foo', 'bar']
 */
function trim(string, chars, guard) {
  string = toString(string);
  if (string && (guard || chars === undefined)) {
    return string.replace(reTrim, '');
  }
  if (!string || !(chars = baseToString(chars))) {
    return string;
  }
  var strSymbols = stringToArray(string),
      chrSymbols = stringToArray(chars),
      start = charsStartIndex(strSymbols, chrSymbols),
      end = charsEndIndex(strSymbols, chrSymbols) + 1;

  return castSlice(strSymbols, start, end).join('');
}

var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;

function parseParams(func) {
    func = func.toString().replace(STRIP_COMMENTS, '');
    func = func.match(FN_ARGS)[2].replace(' ', '');
    func = func ? func.split(FN_ARG_SPLIT) : [];
    func = func.map(function (arg){
        return trim(arg.replace(FN_ARG, ''));
    });
    return func;
}

/**
 * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
 * tasks are specified as parameters to the function, after the usual callback
 * parameter, with the parameter names matching the names of the tasks it
 * depends on. This can provide even more readable task graphs which can be
 * easier to maintain.
 *
 * If a final callback is specified, the task results are similarly injected,
 * specified as named parameters after the initial error parameter.
 *
 * The autoInject function is purely syntactic sugar and its semantics are
 * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
 *
 * @name autoInject
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.auto]{@link module:ControlFlow.auto}
 * @category Control Flow
 * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
 * the form 'func([dependencies...], callback). The object's key of a property
 * serves as the name of the task defined by that property, i.e. can be used
 * when specifying requirements for other tasks.
 * * The `callback` parameter is a `callback(err, result)` which must be called
 *   when finished, passing an `error` (which can be `null`) and the result of
 *   the function's execution. The remaining parameters name other tasks on
 *   which the task is dependent, and the results from those tasks are the
 *   arguments of those parameters.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback, and a `results` object with any completed
 * task results, similar to `auto`.
 * @example
 *
 * //  The example from `auto` can be rewritten as follows:
 * async.autoInject({
 *     get_data: function(callback) {
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: function(get_data, make_folder, callback) {
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     },
 *     email_link: function(write_file, callback) {
 *         // once the file is written let's email a link to it...
 *         // write_file contains the filename returned by write_file.
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 *
 * // If you are using a JS minifier that mangles parameter names, `autoInject`
 * // will not work with plain functions, since the parameter names will be
 * // collapsed to a single letter identifier.  To work around this, you can
 * // explicitly specify the names of the parameters your task function needs
 * // in an array, similar to Angular.js dependency injection.
 *
 * // This still has an advantage over plain `auto`, since the results a task
 * // depends on are still spread into arguments.
 * async.autoInject({
 *     //...
 *     write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(write_file, callback) {
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }]
 *     //...
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 */
function autoInject(tasks, callback) {
    var newTasks = {};

    baseForOwn(tasks, function (taskFn, key) {
        var params;
        var fnIsAsync = isAsync(taskFn);
        var hasNoDeps =
            (!fnIsAsync && taskFn.length === 1) ||
            (fnIsAsync && taskFn.length === 0);

        if (isArray(taskFn)) {
            params = taskFn.slice(0, -1);
            taskFn = taskFn[taskFn.length - 1];

            newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
        } else if (hasNoDeps) {
            // no dependencies, use the function as-is
            newTasks[key] = taskFn;
        } else {
            params = parseParams(taskFn);
            if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
                throw new Error("autoInject task functions require explicit parameters.");
            }

            // remove callback param
            if (!fnIsAsync) params.pop();

            newTasks[key] = params.concat(newTask);
        }

        function newTask(results, taskCb) {
            var newArgs = arrayMap(params, function (name) {
                return results[name];
            });
            newArgs.push(taskCb);
            wrapAsync(taskFn).apply(null, newArgs);
        }
    });

    auto(newTasks, callback);
}

// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
function DLL() {
    this.head = this.tail = null;
    this.length = 0;
}

function setInitial(dll, node) {
    dll.length = 1;
    dll.head = dll.tail = node;
}

DLL.prototype.removeLink = function(node) {
    if (node.prev) node.prev.next = node.next;
    else this.head = node.next;
    if (node.next) node.next.prev = node.prev;
    else this.tail = node.prev;

    node.prev = node.next = null;
    this.length -= 1;
    return node;
};

DLL.prototype.empty = function () {
    while(this.head) this.shift();
    return this;
};

DLL.prototype.insertAfter = function(node, newNode) {
    newNode.prev = node;
    newNode.next = node.next;
    if (node.next) node.next.prev = newNode;
    else this.tail = newNode;
    node.next = newNode;
    this.length += 1;
};

DLL.prototype.insertBefore = function(node, newNode) {
    newNode.prev = node.prev;
    newNode.next = node;
    if (node.prev) node.prev.next = newNode;
    else this.head = newNode;
    node.prev = newNode;
    this.length += 1;
};

DLL.prototype.unshift = function(node) {
    if (this.head) this.insertBefore(this.head, node);
    else setInitial(this, node);
};

DLL.prototype.push = function(node) {
    if (this.tail) this.insertAfter(this.tail, node);
    else setInitial(this, node);
};

DLL.prototype.shift = function() {
    return this.head && this.removeLink(this.head);
};

DLL.prototype.pop = function() {
    return this.tail && this.removeLink(this.tail);
};

DLL.prototype.toArray = function () {
    var arr = Array(this.length);
    var curr = this.head;
    for(var idx = 0; idx < this.length; idx++) {
        arr[idx] = curr.data;
        curr = curr.next;
    }
    return arr;
};

DLL.prototype.remove = function (testFn) {
    var curr = this.head;
    while(!!curr) {
        var next = curr.next;
        if (testFn(curr)) {
            this.removeLink(curr);
        }
        curr = next;
    }
    return this;
};

function queue(worker, concurrency, payload) {
    if (concurrency == null) {
        concurrency = 1;
    }
    else if(concurrency === 0) {
        throw new Error('Concurrency must not be zero');
    }

    var _worker = wrapAsync(worker);
    var numRunning = 0;
    var workersList = [];

    var processingScheduled = false;
    function _insert(data, insertAtFront, callback) {
        if (callback != null && typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0 && q.idle()) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                callback: callback || noop
            };

            if (insertAtFront) {
                q._tasks.unshift(item);
            } else {
                q._tasks.push(item);
            }
        }

        if (!processingScheduled) {
            processingScheduled = true;
            setImmediate$1(function() {
                processingScheduled = false;
                q.process();
            });
        }
    }

    function _next(tasks) {
        return function(err){
            numRunning -= 1;

            for (var i = 0, l = tasks.length; i < l; i++) {
                var task = tasks[i];

                var index = baseIndexOf(workersList, task, 0);
                if (index === 0) {
                    workersList.shift();
                } else if (index > 0) {
                    workersList.splice(index, 1);
                }

                task.callback.apply(task, arguments);

                if (err != null) {
                    q.error(err, task.data);
                }
            }

            if (numRunning <= (q.concurrency - q.buffer) ) {
                q.unsaturated();
            }

            if (q.idle()) {
                q.drain();
            }
            q.process();
        };
    }

    var isProcessing = false;
    var q = {
        _tasks: new DLL(),
        concurrency: concurrency,
        payload: payload,
        saturated: noop,
        unsaturated:noop,
        buffer: concurrency / 4,
        empty: noop,
        drain: noop,
        error: noop,
        started: false,
        paused: false,
        push: function (data, callback) {
            _insert(data, false, callback);
        },
        kill: function () {
            q.drain = noop;
            q._tasks.empty();
        },
        unshift: function (data, callback) {
            _insert(data, true, callback);
        },
        remove: function (testFn) {
            q._tasks.remove(testFn);
        },
        process: function () {
            // Avoid trying to start too many processing operations. This can occur
            // when callbacks resolve synchronously (#1267).
            if (isProcessing) {
                return;
            }
            isProcessing = true;
            while(!q.paused && numRunning < q.concurrency && q._tasks.length){
                var tasks = [], data = [];
                var l = q._tasks.length;
                if (q.payload) l = Math.min(l, q.payload);
                for (var i = 0; i < l; i++) {
                    var node = q._tasks.shift();
                    tasks.push(node);
                    workersList.push(node);
                    data.push(node.data);
                }

                numRunning += 1;

                if (q._tasks.length === 0) {
                    q.empty();
                }

                if (numRunning === q.concurrency) {
                    q.saturated();
                }

                var cb = onlyOnce(_next(tasks));
                _worker(data, cb);
            }
            isProcessing = false;
        },
        length: function () {
            return q._tasks.length;
        },
        running: function () {
            return numRunning;
        },
        workersList: function () {
            return workersList;
        },
        idle: function() {
            return q._tasks.length + numRunning === 0;
        },
        pause: function () {
            q.paused = true;
        },
        resume: function () {
            if (q.paused === false) { return; }
            q.paused = false;
            setImmediate$1(q.process);
        }
    };
    return q;
}

/**
 * A cargo of tasks for the worker function to complete. Cargo inherits all of
 * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
 * @typedef {Object} CargoObject
 * @memberOf module:ControlFlow
 * @property {Function} length - A function returning the number of items
 * waiting to be processed. Invoke like `cargo.length()`.
 * @property {number} payload - An `integer` for determining how many tasks
 * should be process per round. This property can be changed after a `cargo` is
 * created to alter the payload on-the-fly.
 * @property {Function} push - Adds `task` to the `queue`. The callback is
 * called once the `worker` has finished processing the task. Instead of a
 * single task, an array of `tasks` can be submitted. The respective callback is
 * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
 * @property {Function} saturated - A callback that is called when the
 * `queue.length()` hits the concurrency and further tasks will be queued.
 * @property {Function} empty - A callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - A callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke like `cargo.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
 */

/**
 * Creates a `cargo` object with the specified payload. Tasks added to the
 * cargo will be processed altogether (up to the `payload` limit). If the
 * `worker` is in progress, the task is queued until it becomes available. Once
 * the `worker` has completed some tasks, each callback of those tasks is
 * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
 * for how `cargo` and `queue` work.
 *
 * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
 * at a time, cargo passes an array of tasks to a single worker, repeating
 * when the worker is finished.
 *
 * @name cargo
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An asynchronous function for processing an array
 * of queued tasks. Invoked with `(tasks, callback)`.
 * @param {number} [payload=Infinity] - An optional `integer` for determining
 * how many tasks should be processed per round; if omitted, the default is
 * unlimited.
 * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the cargo and inner queue.
 * @example
 *
 * // create a cargo object with payload 2
 * var cargo = async.cargo(function(tasks, callback) {
 *     for (var i=0; i<tasks.length; i++) {
 *         console.log('hello ' + tasks[i].name);
 *     }
 *     callback();
 * }, 2);
 *
 * // add some items
 * cargo.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * cargo.push({name: 'bar'}, function(err) {
 *     console.log('finished processing bar');
 * });
 * cargo.push({name: 'baz'}, function(err) {
 *     console.log('finished processing baz');
 * });
 */
function cargo(worker, payload) {
    return queue(worker, 1, payload);
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
 *
 * @name eachOfSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Invoked with (err).
 */
var eachOfSeries = doLimit(eachOfLimit, 1);

/**
 * Reduces `coll` into a single value using an async `iteratee` to return each
 * successive step. `memo` is the initial state of the reduction. This function
 * only operates in series.
 *
 * For performance reasons, it may make sense to split a call to this function
 * into a parallel map, and then use the normal `Array.prototype.reduce` on the
 * results. This function is for situations where each step in the reduction
 * needs to be async; if you can get the data before reducing it, then it's
 * probably a good idea to do so.
 *
 * @name reduce
 * @static
 * @memberOf module:Collections
 * @method
 * @alias inject
 * @alias foldl
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 * @example
 *
 * async.reduce([1,2,3], 0, function(memo, item, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         callback(null, memo + item)
 *     });
 * }, function(err, result) {
 *     // result is now equal to the last value of memo, which is 6
 * });
 */
function reduce(coll, memo, iteratee, callback) {
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    eachOfSeries(coll, function(x, i, callback) {
        _iteratee(memo, x, function(err, v) {
            memo = v;
            callback(err);
        });
    }, function(err) {
        callback(err, memo);
    });
}

/**
 * Version of the compose function that is more natural to read. Each function
 * consumes the return value of the previous function. It is the equivalent of
 * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name seq
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.compose]{@link module:ControlFlow.compose}
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} a function that composes the `functions` in order
 * @example
 *
 * // Requires lodash (or underscore), express3 and dresende's orm2.
 * // Part of an app, that fetches cats of the logged user.
 * // This example uses `seq` function to avoid overnesting and error
 * // handling clutter.
 * app.get('/cats', function(request, response) {
 *     var User = request.models.User;
 *     async.seq(
 *         _.bind(User.get, User),  // 'User.get' has signature (id, callback(err, data))
 *         function(user, fn) {
 *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))
 *         }
 *     )(req.session.user_id, function (err, cats) {
 *         if (err) {
 *             console.error(err);
 *             response.json({ status: 'error', message: err.message });
 *         } else {
 *             response.json({ status: 'ok', message: 'Cats found', data: cats });
 *         }
 *     });
 * });
 */
function seq(/*...functions*/) {
    var _functions = arrayMap(arguments, wrapAsync);
    return function(/*...args*/) {
        var args = slice(arguments);
        var that = this;

        var cb = args[args.length - 1];
        if (typeof cb == 'function') {
            args.pop();
        } else {
            cb = noop;
        }

        reduce(_functions, args, function(newargs, fn, cb) {
            fn.apply(that, newargs.concat(function(err/*, ...nextargs*/) {
                var nextargs = slice(arguments, 1);
                cb(err, nextargs);
            }));
        },
        function(err, results) {
            cb.apply(that, [err].concat(results));
        });
    };
}

/**
 * Creates a function which is a composition of the passed asynchronous
 * functions. Each function consumes the return value of the function that
 * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
 * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name compose
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} an asynchronous function that is the composed
 * asynchronous `functions`
 * @example
 *
 * function add1(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n + 1);
 *     }, 10);
 * }
 *
 * function mul3(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n * 3);
 *     }, 10);
 * }
 *
 * var add1mul3 = async.compose(mul3, add1);
 * add1mul3(4, function (err, result) {
 *     // result now equals 15
 * });
 */
var compose = function(/*...args*/) {
    return seq.apply(null, slice(arguments).reverse());
};

var _concat = Array.prototype.concat;

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
 *
 * @name concatLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err /*, ...args*/) {
            if (err) return callback(err);
            return callback(null, slice(arguments, 1));
        });
    }, function(err, mapResults) {
        var result = [];
        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                result = _concat.apply(result, mapResults[i]);
            }
        }

        return callback(err, result);
    });
};

/**
 * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
 * the concatenated list. The `iteratee`s are called in parallel, and the
 * results are concatenated as they return. There is no guarantee that the
 * results array will be returned in the original order of `coll` passed to the
 * `iteratee` function.
 *
 * @name concat
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 * @example
 *
 * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
 *     // files is now a list of filenames that exist in the 3 directories
 * });
 */
var concat = doLimit(concatLimit, Infinity);

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
 *
 * @name concatSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
 * The iteratee should complete with an array an array of results.
 * Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatSeries = doLimit(concatLimit, 1);

/**
 * Returns a function that when called, calls-back with the values provided.
 * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
 * [`auto`]{@link module:ControlFlow.auto}.
 *
 * @name constant
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {...*} arguments... - Any number of arguments to automatically invoke
 * callback with.
 * @returns {AsyncFunction} Returns a function that when invoked, automatically
 * invokes the callback with the previous given arguments.
 * @example
 *
 * async.waterfall([
 *     async.constant(42),
 *     function (value, next) {
 *         // value === 42
 *     },
 *     //...
 * ], callback);
 *
 * async.waterfall([
 *     async.constant(filename, "utf8"),
 *     fs.readFile,
 *     function (fileData, next) {
 *         //...
 *     }
 *     //...
 * ], callback);
 *
 * async.auto({
 *     hostname: async.constant("https://server.net/"),
 *     port: findFreePort,
 *     launchServer: ["hostname", "port", function (options, cb) {
 *         startServer(options, cb);
 *     }],
 *     //...
 * }, callback);
 */
var constant = function(/*...values*/) {
    var values = slice(arguments);
    var args = [null].concat(values);
    return function (/*...ignoredArgs, callback*/) {
        var callback = arguments[arguments.length - 1];
        return callback.apply(this, args);
    };
};

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

function _createTester(check, getResult) {
    return function(eachfn, arr, iteratee, cb) {
        cb = cb || noop;
        var testPassed = false;
        var testResult;
        eachfn(arr, function(value, _, callback) {
            iteratee(value, function(err, result) {
                if (err) {
                    callback(err);
                } else if (check(result) && !testResult) {
                    testPassed = true;
                    testResult = getResult(true, value);
                    callback(null, breakLoop);
                } else {
                    callback();
                }
            });
        }, function(err) {
            if (err) {
                cb(err);
            } else {
                cb(null, testPassed ? testResult : getResult(false));
            }
        });
    };
}

function _findGetResult(v, x) {
    return x;
}

/**
 * Returns the first value in `coll` that passes an async truth test. The
 * `iteratee` is applied in parallel, meaning the first iteratee to return
 * `true` will fire the detect `callback` with that result. That means the
 * result might not be the first item in the original `coll` (in terms of order)
 * that passes the test.

 * If order within the original `coll` is important, then look at
 * [`detectSeries`]{@link module:Collections.detectSeries}.
 *
 * @name detect
 * @static
 * @memberOf module:Collections
 * @method
 * @alias find
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 * @example
 *
 * async.detect(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // result now equals the first file in the list that exists
 * });
 */
var detect = doParallel(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name detectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findLimit
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectLimit = doParallelLimit(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
 *
 * @name detectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findSeries
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectSeries = doLimit(detectLimit, 1);

function consoleFunc(name) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        args.push(function (err/*, ...args*/) {
            var args = slice(arguments, 1);
            if (typeof console === 'object') {
                if (err) {
                    if (console.error) {
                        console.error(err);
                    }
                } else if (console[name]) {
                    arrayEach(args, function (x) {
                        console[name](x);
                    });
                }
            }
        });
        wrapAsync(fn).apply(null, args);
    };
}

/**
 * Logs the result of an [`async` function]{@link AsyncFunction} to the
 * `console` using `console.dir` to display the properties of the resulting object.
 * Only works in Node.js or in browsers that support `console.dir` and
 * `console.error` (such as FF and Chrome).
 * If multiple arguments are returned from the async function,
 * `console.dir` is called on each argument in order.
 *
 * @name dir
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, {hello: name});
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.dir(hello, 'world');
 * {hello: 'world'}
 */
var dir = consoleFunc('dir');

/**
 * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
 * the order of operations, the arguments `test` and `fn` are switched.
 *
 * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
 * @name doDuring
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.during]{@link module:ControlFlow.during}
 * @category Control Flow
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (...args, callback), where `...args` are the
 * non-error args from the previous callback of `fn`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error if one occurred, otherwise `null`.
 */
function doDuring(fn, test, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        args.push(check);
        _test.apply(this, args);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    check(null, true);

}

/**
 * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
 * the order of operations, the arguments `test` and `iteratee` are switched.
 *
 * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
 *
 * @name doWhilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - A function which is called each time `test`
 * passes. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped.
 * `callback` will be passed an error and any arguments passed to the final
 * `iteratee`'s callback. Invoked with (err, [results]);
 */
function doWhilst(iteratee, test, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        if (test.apply(this, args)) return _iteratee(next);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
 * argument ordering differs from `until`.
 *
 * @name doUntil
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function doUntil(iteratee, test, callback) {
    doWhilst(iteratee, function() {
        return !test.apply(this, arguments);
    }, callback);
}

/**
 * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
 * is passed a callback in the form of `function (err, truth)`. If error is
 * passed to `test` or `fn`, the main callback is immediately called with the
 * value of the error.
 *
 * @name during
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (callback).
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error, if one occurred, otherwise `null`.
 * @example
 *
 * var count = 0;
 *
 * async.during(
 *     function (callback) {
 *         return callback(null, count < 5);
 *     },
 *     function (callback) {
 *         count++;
 *         setTimeout(callback, 1000);
 *     },
 *     function (err) {
 *         // 5 seconds have passed
 *     }
 * );
 */
function during(test, fn, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err) {
        if (err) return callback(err);
        _test(check);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    _test(check);
}

function _withoutIndex(iteratee) {
    return function (value, index, callback) {
        return iteratee(value, callback);
    };
}

/**
 * Applies the function `iteratee` to each item in `coll`, in parallel.
 * The `iteratee` is called with an item from the list, and a callback for when
 * it has finished. If the `iteratee` passes an error to its `callback`, the
 * main `callback` (for the `each` function) is immediately called with the
 * error.
 *
 * Note, that since this function applies `iteratee` to each item in parallel,
 * there is no guarantee that the iteratee functions will complete in order.
 *
 * @name each
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEach
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to
 * each item in `coll`. Invoked with (item, callback).
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOf`.
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * // assuming openFiles is an array of file names and saveFile is a function
 * // to save the modified contents of that file:
 *
 * async.each(openFiles, saveFile, function(err){
 *   // if any of the saves produced an error, err would equal that error
 * });
 *
 * // assuming openFiles is an array of file names
 * async.each(openFiles, function(file, callback) {
 *
 *     // Perform operation on file here.
 *     console.log('Processing file ' + file);
 *
 *     if( file.length > 32 ) {
 *       console.log('This file name is too long');
 *       callback('File name too long');
 *     } else {
 *       // Do work to process file here
 *       console.log('File processed');
 *       callback();
 *     }
 * }, function(err) {
 *     // if any of the file processing produced an error, err would equal that error
 *     if( err ) {
 *       // One of the iterations produced an error.
 *       // All processing will now stop.
 *       console.log('A file failed to process');
 *     } else {
 *       console.log('All files have been processed successfully');
 *     }
 * });
 */
function eachLimit(coll, iteratee, callback) {
    eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
 *
 * @name eachLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfLimit`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachLimit$1(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
 *
 * @name eachSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfSeries`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
var eachSeries = doLimit(eachLimit$1, 1);

/**
 * Wrap an async function and ensure it calls its callback on a later tick of
 * the event loop.  If the function already calls its callback on a next tick,
 * no extra deferral is added. This is useful for preventing stack overflows
 * (`RangeError: Maximum call stack size exceeded`) and generally keeping
 * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
 * contained. ES2017 `async` functions are returned as-is -- they are immune
 * to Zalgo's corrupting influences, as they always resolve on a later tick.
 *
 * @name ensureAsync
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - an async function, one that expects a node-style
 * callback as its last argument.
 * @returns {AsyncFunction} Returns a wrapped function with the exact same call
 * signature as the function passed in.
 * @example
 *
 * function sometimesAsync(arg, callback) {
 *     if (cache[arg]) {
 *         return callback(null, cache[arg]); // this would be synchronous!!
 *     } else {
 *         doSomeIO(arg, callback); // this IO would be asynchronous
 *     }
 * }
 *
 * // this has a risk of stack overflows if many results are cached in a row
 * async.mapSeries(args, sometimesAsync, done);
 *
 * // this will defer sometimesAsync's callback if necessary,
 * // preventing stack overflows
 * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
 */
function ensureAsync(fn) {
    if (isAsync(fn)) return fn;
    return initialParams(function (args, callback) {
        var sync = true;
        args.push(function () {
            var innerArgs = arguments;
            if (sync) {
                setImmediate$1(function () {
                    callback.apply(null, innerArgs);
                });
            } else {
                callback.apply(null, innerArgs);
            }
        });
        fn.apply(this, args);
        sync = false;
    });
}

function notId(v) {
    return !v;
}

/**
 * Returns `true` if every element in `coll` satisfies an async test. If any
 * iteratee call returns `false`, the main `callback` is immediately called.
 *
 * @name every
 * @static
 * @memberOf module:Collections
 * @method
 * @alias all
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 * @example
 *
 * async.every(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then every file exists
 * });
 */
var every = doParallel(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
 *
 * @name everyLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everyLimit = doParallelLimit(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
 *
 * @name everySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in series.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everySeries = doLimit(everyLimit, 1);

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function(object) {
    return object == null ? undefined : object[key];
  };
}

function filterArray(eachfn, arr, iteratee, callback) {
    var truthValues = new Array(arr.length);
    eachfn(arr, function (x, index, callback) {
        iteratee(x, function (err, v) {
            truthValues[index] = !!v;
            callback(err);
        });
    }, function (err) {
        if (err) return callback(err);
        var results = [];
        for (var i = 0; i < arr.length; i++) {
            if (truthValues[i]) results.push(arr[i]);
        }
        callback(null, results);
    });
}

function filterGeneric(eachfn, coll, iteratee, callback) {
    var results = [];
    eachfn(coll, function (x, index, callback) {
        iteratee(x, function (err, v) {
            if (err) {
                callback(err);
            } else {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            }
        });
    }, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null, arrayMap(results.sort(function (a, b) {
                return a.index - b.index;
            }), baseProperty('value')));
        }
    });
}

function _filter(eachfn, coll, iteratee, callback) {
    var filter = isArrayLike(coll) ? filterArray : filterGeneric;
    filter(eachfn, coll, wrapAsync(iteratee), callback || noop);
}

/**
 * Returns a new array of all the values in `coll` which pass an async truth
 * test. This operation is performed in parallel, but the results array will be
 * in the same order as the original.
 *
 * @name filter
 * @static
 * @memberOf module:Collections
 * @method
 * @alias select
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.filter(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of the existing files
 * });
 */
var filter = doParallel(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name filterLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var filterLimit = doParallelLimit(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
 *
 * @name filterSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results)
 */
var filterSeries = doLimit(filterLimit, 1);

/**
 * Calls the asynchronous function `fn` with a callback parameter that allows it
 * to call itself again, in series, indefinitely.

 * If an error is passed to the callback then `errback` is called with the
 * error, and execution stops, otherwise it will never be called.
 *
 * @name forever
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} fn - an async function to call repeatedly.
 * Invoked with (next).
 * @param {Function} [errback] - when `fn` passes an error to it's callback,
 * this function will be called, and execution stops. Invoked with (err).
 * @example
 *
 * async.forever(
 *     function(next) {
 *         // next is suitable for passing to things that need a callback(err [, whatever]);
 *         // it will result in this function being called again.
 *     },
 *     function(err) {
 *         // if next is called with a value in its first parameter, it will appear
 *         // in here as 'err', and execution will stop.
 *     }
 * );
 */
function forever(fn, errback) {
    var done = onlyOnce(errback || noop);
    var task = wrapAsync(ensureAsync(fn));

    function next(err) {
        if (err) return done(err);
        task(next);
    }
    next();
}

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
 *
 * @name groupByLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupByLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err, key) {
            if (err) return callback(err);
            return callback(null, {key: key, val: val});
        });
    }, function(err, mapResults) {
        var result = {};
        // from MDN, handle object having an `hasOwnProperty` prop
        var hasOwnProperty = Object.prototype.hasOwnProperty;

        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                var key = mapResults[i].key;
                var val = mapResults[i].val;

                if (hasOwnProperty.call(result, key)) {
                    result[key].push(val);
                } else {
                    result[key] = [val];
                }
            }
        }

        return callback(err, result);
    });
};

/**
 * Returns a new object, where each value corresponds to an array of items, from
 * `coll`, that returned the corresponding key. That is, the keys of the object
 * correspond to the values passed to the `iteratee` callback.
 *
 * Note: Since this function applies the `iteratee` to each item in parallel,
 * there is no guarantee that the `iteratee` functions will complete in order.
 * However, the values for each key in the `result` will be in the same order as
 * the original `coll`. For Objects, the values will roughly be in the order of
 * the original Objects' keys (but this can vary across JavaScript engines).
 *
 * @name groupBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 * @example
 *
 * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
 *     db.findById(userId, function(err, user) {
 *         if (err) return callback(err);
 *         return callback(null, user.age);
 *     });
 * }, function(err, result) {
 *     // result is object containing the userIds grouped by age
 *     // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
 * });
 */
var groupBy = doLimit(groupByLimit, Infinity);

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
 *
 * @name groupBySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupBySeries = doLimit(groupByLimit, 1);

/**
 * Logs the result of an `async` function to the `console`. Only works in
 * Node.js or in browsers that support `console.log` and `console.error` (such
 * as FF and Chrome). If multiple arguments are returned from the async
 * function, `console.log` is called on each argument in order.
 *
 * @name log
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, 'hello ' + name);
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.log(hello, 'world');
 * 'hello world'
 */
var log = consoleFunc('log');

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name mapValuesLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
function mapValuesLimit(obj, limit, iteratee, callback) {
    callback = once(callback || noop);
    var newObj = {};
    var _iteratee = wrapAsync(iteratee);
    eachOfLimit(obj, limit, function(val, key, next) {
        _iteratee(val, key, function (err, result) {
            if (err) return next(err);
            newObj[key] = result;
            next();
        });
    }, function (err) {
        callback(err, newObj);
    });
}

/**
 * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
 *
 * Produces a new Object by mapping each value of `obj` through the `iteratee`
 * function. The `iteratee` is called each `value` and `key` from `obj` and a
 * callback for when it has finished processing. Each of these callbacks takes
 * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
 * passes an error to its callback, the main `callback` (for the `mapValues`
 * function) is immediately called with the error.
 *
 * Note, the order of the keys in the result is not guaranteed.  The keys will
 * be roughly in the order they complete, (but this is very engine-specific)
 *
 * @name mapValues
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 * @example
 *
 * async.mapValues({
 *     f1: 'file1',
 *     f2: 'file2',
 *     f3: 'file3'
 * }, function (file, key, callback) {
 *   fs.stat(file, callback);
 * }, function(err, result) {
 *     // result is now a map of stats for each file, e.g.
 *     // {
 *     //     f1: [stats for file1],
 *     //     f2: [stats for file2],
 *     //     f3: [stats for file3]
 *     // }
 * });
 */

var mapValues = doLimit(mapValuesLimit, Infinity);

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
 *
 * @name mapValuesSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
var mapValuesSeries = doLimit(mapValuesLimit, 1);

function has(obj, key) {
    return key in obj;
}

/**
 * Caches the results of an async function. When creating a hash to store
 * function results against, the callback is omitted from the hash and an
 * optional hash function can be used.
 *
 * If no hash function is specified, the first argument is used as a hash key,
 * which may work reasonably if it is a string or a data type that converts to a
 * distinct string. Note that objects and arrays will not behave reasonably.
 * Neither will cases where the other arguments are significant. In such cases,
 * specify your own hash function.
 *
 * The cache of results is exposed as the `memo` property of the function
 * returned by `memoize`.
 *
 * @name memoize
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function to proxy and cache results from.
 * @param {Function} hasher - An optional function for generating a custom hash
 * for storing results. It has all the arguments applied to it apart from the
 * callback, and must be synchronous.
 * @returns {AsyncFunction} a memoized version of `fn`
 * @example
 *
 * var slow_fn = function(name, callback) {
 *     // do something
 *     callback(null, result);
 * };
 * var fn = async.memoize(slow_fn);
 *
 * // fn can now be used as if it were slow_fn
 * fn('some name', function() {
 *     // callback
 * });
 */
function memoize(fn, hasher) {
    var memo = Object.create(null);
    var queues = Object.create(null);
    hasher = hasher || identity;
    var _fn = wrapAsync(fn);
    var memoized = initialParams(function memoized(args, callback) {
        var key = hasher.apply(null, args);
        if (has(memo, key)) {
            setImmediate$1(function() {
                callback.apply(null, memo[key]);
            });
        } else if (has(queues, key)) {
            queues[key].push(callback);
        } else {
            queues[key] = [callback];
            _fn.apply(null, args.concat(function(/*args*/) {
                var args = slice(arguments);
                memo[key] = args;
                var q = queues[key];
                delete queues[key];
                for (var i = 0, l = q.length; i < l; i++) {
                    q[i].apply(null, args);
                }
            }));
        }
    });
    memoized.memo = memo;
    memoized.unmemoized = fn;
    return memoized;
}

/**
 * Calls `callback` on a later loop around the event loop. In Node.js this just
 * calls `process.nextTick`.  In the browser it will use `setImmediate` if
 * available, otherwise `setTimeout(callback, 0)`, which means other higher
 * priority events may precede the execution of `callback`.
 *
 * This is used internally for browser-compatibility purposes.
 *
 * @name nextTick
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.setImmediate]{@link module:Utils.setImmediate}
 * @category Util
 * @param {Function} callback - The function to call on a later loop around
 * the event loop. Invoked with (args...).
 * @param {...*} args... - any number of additional arguments to pass to the
 * callback on the next tick.
 * @example
 *
 * var call_order = [];
 * async.nextTick(function() {
 *     call_order.push('two');
 *     // call_order now equals ['one','two']
 * });
 * call_order.push('one');
 *
 * async.setImmediate(function (a, b, c) {
 *     // a, b, and c equal 1, 2, and 3
 * }, 1, 2, 3);
 */
var _defer$1;

if (hasNextTick) {
    _defer$1 = process.nextTick;
} else if (hasSetImmediate) {
    _defer$1 = setImmediate;
} else {
    _defer$1 = fallback;
}

var nextTick = wrap(_defer$1);

function _parallel(eachfn, tasks, callback) {
    callback = callback || noop;
    var results = isArrayLike(tasks) ? [] : {};

    eachfn(tasks, function (task, key, callback) {
        wrapAsync(task)(function (err, result) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            results[key] = result;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Run the `tasks` collection of functions in parallel, without waiting until
 * the previous function has completed. If any of the functions pass an error to
 * its callback, the main `callback` is immediately called with the value of the
 * error. Once the `tasks` have completed, the results are passed to the final
 * `callback` as an array.
 *
 * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
 * parallel execution of code.  If your tasks do not use any timers or perform
 * any I/O, they will actually be executed in series.  Any synchronous setup
 * sections for each task will happen one after the other.  JavaScript remains
 * single-threaded.
 *
 * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
 * execution of other tasks when a task fails.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 * results from {@link async.parallel}.
 *
 * @name parallel
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 *
 * @example
 * async.parallel([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // the results array will equal ['one','two'] even though
 *     // the second function had a shorter timeout.
 * });
 *
 * // an example using an object instead of an array
 * async.parallel({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equals to: {one: 1, two: 2}
 * });
 */
function parallelLimit(tasks, callback) {
    _parallel(eachOf, tasks, callback);
}

/**
 * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name parallelLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.parallel]{@link module:ControlFlow.parallel}
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 */
function parallelLimit$1(tasks, limit, callback) {
    _parallel(_eachOfLimit(limit), tasks, callback);
}

/**
 * A queue of tasks for the worker function to complete.
 * @typedef {Object} QueueObject
 * @memberOf module:ControlFlow
 * @property {Function} length - a function returning the number of items
 * waiting to be processed. Invoke with `queue.length()`.
 * @property {boolean} started - a boolean indicating whether or not any
 * items have been pushed and processed by the queue.
 * @property {Function} running - a function returning the number of items
 * currently being processed. Invoke with `queue.running()`.
 * @property {Function} workersList - a function returning the array of items
 * currently being processed. Invoke with `queue.workersList()`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke with `queue.idle()`.
 * @property {number} concurrency - an integer for determining how many `worker`
 * functions should be run in parallel. This property can be changed after a
 * `queue` is created to alter the concurrency on-the-fly.
 * @property {Function} push - add a new task to the `queue`. Calls `callback`
 * once the `worker` has finished processing the task. Instead of a single task,
 * a `tasks` array can be submitted. The respective callback is used for every
 * task in the list. Invoke with `queue.push(task, [callback])`,
 * @property {Function} unshift - add a new task to the front of the `queue`.
 * Invoke with `queue.unshift(task, [callback])`.
 * @property {Function} remove - remove items from the queue that match a test
 * function.  The test function will be passed an object with a `data` property,
 * and a `priority` property, if this is a
 * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
 * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
 * `function ({data, priority}) {}` and returns a Boolean.
 * @property {Function} saturated - a callback that is called when the number of
 * running workers hits the `concurrency` limit, and further tasks will be
 * queued.
 * @property {Function} unsaturated - a callback that is called when the number
 * of running workers is less than the `concurrency` & `buffer` limits, and
 * further tasks will not be queued.
 * @property {number} buffer - A minimum threshold buffer in order to say that
 * the `queue` is `unsaturated`.
 * @property {Function} empty - a callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - a callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} error - a callback that is called when a task errors.
 * Has the signature `function(error, task)`.
 * @property {boolean} paused - a boolean for determining whether the queue is
 * in a paused state.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke with `queue.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke with `queue.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. No more tasks
 * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
 */

/**
 * Creates a `queue` object with the specified `concurrency`. Tasks added to the
 * `queue` are processed in parallel (up to the `concurrency` limit). If all
 * `worker`s are in progress, the task is queued until one becomes available.
 * Once a `worker` completes a `task`, that `task`'s callback is called.
 *
 * @name queue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`. Invoked with (task, callback).
 * @param {number} [concurrency=1] - An `integer` for determining how many
 * `worker` functions should be run in parallel.  If omitted, the concurrency
 * defaults to `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the queue.
 * @example
 *
 * // create a queue object with concurrency 2
 * var q = async.queue(function(task, callback) {
 *     console.log('hello ' + task.name);
 *     callback();
 * }, 2);
 *
 * // assign a callback
 * q.drain = function() {
 *     console.log('all items have been processed');
 * };
 *
 * // add some items to the queue
 * q.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * q.push({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 *
 * // add some items to the queue (batch-wise)
 * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
 *     console.log('finished processing item');
 * });
 *
 * // add some items to the front of the queue
 * q.unshift({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 */
var queue$1 = function (worker, concurrency) {
    var _worker = wrapAsync(worker);
    return queue(function (items, cb) {
        _worker(items[0], cb);
    }, concurrency, 1);
};

/**
 * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
 * completed in ascending priority order.
 *
 * @name priorityQueue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`.
 * Invoked with (task, callback).
 * @param {number} concurrency - An `integer` for determining how many `worker`
 * functions should be run in parallel.  If omitted, the concurrency defaults to
 * `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
 * differences between `queue` and `priorityQueue` objects:
 * * `push(task, priority, [callback])` - `priority` should be a number. If an
 *   array of `tasks` is given, all tasks will be assigned the same priority.
 * * The `unshift` method was removed.
 */
var priorityQueue = function(worker, concurrency) {
    // Start with a normal queue
    var q = queue$1(worker, concurrency);

    // Override push to accept second parameter representing priority
    q.push = function(data, priority, callback) {
        if (callback == null) callback = noop;
        if (typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        priority = priority || 0;
        var nextNode = q._tasks.head;
        while (nextNode && priority >= nextNode.priority) {
            nextNode = nextNode.next;
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                priority: priority,
                callback: callback
            };

            if (nextNode) {
                q._tasks.insertBefore(nextNode, item);
            } else {
                q._tasks.push(item);
            }
        }
        setImmediate$1(q.process);
    };

    // Remove unshift function
    delete q.unshift;

    return q;
};

/**
 * Runs the `tasks` array of functions in parallel, without waiting until the
 * previous function has completed. Once any of the `tasks` complete or pass an
 * error to its callback, the main `callback` is immediately called. It's
 * equivalent to `Promise.race()`.
 *
 * @name race
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
 * to run. Each function can complete with an optional `result` value.
 * @param {Function} callback - A callback to run once any of the functions have
 * completed. This function gets an error or result from the first function that
 * completed. Invoked with (err, result).
 * @returns undefined
 * @example
 *
 * async.race([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // main callback
 * function(err, result) {
 *     // the result will be equal to 'two' as it finishes earlier
 * });
 */
function race(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
    if (!tasks.length) return callback();
    for (var i = 0, l = tasks.length; i < l; i++) {
        wrapAsync(tasks[i])(callback);
    }
}

/**
 * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
 *
 * @name reduceRight
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reduce]{@link module:Collections.reduce}
 * @alias foldr
 * @category Collection
 * @param {Array} array - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 */
function reduceRight (array, memo, iteratee, callback) {
    var reversed = slice(array).reverse();
    reduce(reversed, memo, iteratee, callback);
}

/**
 * Wraps the async function in another function that always completes with a
 * result object, even when it errors.
 *
 * The result object has either the property `error` or `value`.
 *
 * @name reflect
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function you want to wrap
 * @returns {Function} - A function that always passes null to it's callback as
 * the error. The second argument to the callback will be an `object` with
 * either an `error` or a `value` property.
 * @example
 *
 * async.parallel([
 *     async.reflect(function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff but error ...
 *         callback('bad stuff happened');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     })
 * ],
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = 'bad stuff happened'
 *     // results[2].value = 'two'
 * });
 */
function reflect(fn) {
    var _fn = wrapAsync(fn);
    return initialParams(function reflectOn(args, reflectCallback) {
        args.push(function callback(error, cbArg) {
            if (error) {
                reflectCallback(null, { error: error });
            } else {
                var value;
                if (arguments.length <= 2) {
                    value = cbArg;
                } else {
                    value = slice(arguments, 1);
                }
                reflectCallback(null, { value: value });
            }
        });

        return _fn.apply(this, args);
    });
}

/**
 * A helper function that wraps an array or an object of functions with `reflect`.
 *
 * @name reflectAll
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.reflect]{@link module:Utils.reflect}
 * @category Util
 * @param {Array|Object|Iterable} tasks - The collection of
 * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
 * @returns {Array} Returns an array of async functions, each wrapped in
 * `async.reflect`
 * @example
 *
 * let tasks = [
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         // do some more stuff but error ...
 *         callback(new Error('bad stuff happened'));
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ];
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = Error('bad stuff happened')
 *     // results[2].value = 'two'
 * });
 *
 * // an example using an object instead of an array
 * let tasks = {
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         callback('two');
 *     },
 *     three: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'three');
 *         }, 100);
 *     }
 * };
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results.one.value = 'one'
 *     // results.two.error = 'two'
 *     // results.three.value = 'three'
 * });
 */
function reflectAll(tasks) {
    var results;
    if (isArray(tasks)) {
        results = arrayMap(tasks, reflect);
    } else {
        results = {};
        baseForOwn(tasks, function(task, key) {
            results[key] = reflect.call(this, task);
        });
    }
    return results;
}

function reject$1(eachfn, arr, iteratee, callback) {
    _filter(eachfn, arr, function(value, cb) {
        iteratee(value, function(err, v) {
            cb(err, !v);
        });
    }, callback);
}

/**
 * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
 *
 * @name reject
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.reject(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of missing files
 *     createFiles(results);
 * });
 */
var reject = doParallel(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name rejectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectLimit = doParallelLimit(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
 *
 * @name rejectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectSeries = doLimit(rejectLimit, 1);

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant$1(value) {
  return function() {
    return value;
  };
}

/**
 * Attempts to get a successful response from `task` no more than `times` times
 * before returning an error. If the task is successful, the `callback` will be
 * passed the result of the successful task. If all attempts fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name retry
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @see [async.retryable]{@link module:ControlFlow.retryable}
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
 * object with `times` and `interval` or a number.
 * * `times` - The number of attempts to make before giving up.  The default
 *   is `5`.
 * * `interval` - The time to wait between retries, in milliseconds.  The
 *   default is `0`. The interval may also be specified as a function of the
 *   retry count (see example).
 * * `errorFilter` - An optional synchronous function that is invoked on
 *   erroneous result. If it returns `true` the retry attempts will continue;
 *   if the function returns `false` the retry flow is aborted with the current
 *   attempt's error and result being returned to the final callback.
 *   Invoked with (err).
 * * If `opts` is a number, the number specifies the number of times to retry,
 *   with the default interval of `0`.
 * @param {AsyncFunction} task - An async function to retry.
 * Invoked with (callback).
 * @param {Function} [callback] - An optional callback which is called when the
 * task has succeeded, or after the final failed attempt. It receives the `err`
 * and `result` arguments of the last attempt at completing the `task`. Invoked
 * with (err, results).
 *
 * @example
 *
 * // The `retry` function can be used as a stand-alone control flow by passing
 * // a callback, as shown below:
 *
 * // try calling apiMethod 3 times
 * async.retry(3, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 3 times, waiting 200 ms between each retry
 * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 10 times with exponential backoff
 * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
 * async.retry({
 *   times: 10,
 *   interval: function(retryCount) {
 *     return 50 * Math.pow(2, retryCount);
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod the default 5 times no delay between each retry
 * async.retry(apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod only when error condition satisfies, all other
 * // errors will abort the retry control flow and return to final callback
 * async.retry({
 *   errorFilter: function(err) {
 *     return err.message === 'Temporary error'; // only retry on a specific error
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // to retry individual methods that are not as reliable within other
 * // control flow functions, use the `retryable` wrapper:
 * async.auto({
 *     users: api.getUsers.bind(api),
 *     payments: async.retryable(3, api.getPayments.bind(api))
 * }, function(err, results) {
 *     // do something with the results
 * });
 *
 */
function retry(opts, task, callback) {
    var DEFAULT_TIMES = 5;
    var DEFAULT_INTERVAL = 0;

    var options = {
        times: DEFAULT_TIMES,
        intervalFunc: constant$1(DEFAULT_INTERVAL)
    };

    function parseTimes(acc, t) {
        if (typeof t === 'object') {
            acc.times = +t.times || DEFAULT_TIMES;

            acc.intervalFunc = typeof t.interval === 'function' ?
                t.interval :
                constant$1(+t.interval || DEFAULT_INTERVAL);

            acc.errorFilter = t.errorFilter;
        } else if (typeof t === 'number' || typeof t === 'string') {
            acc.times = +t || DEFAULT_TIMES;
        } else {
            throw new Error("Invalid arguments for async.retry");
        }
    }

    if (arguments.length < 3 && typeof opts === 'function') {
        callback = task || noop;
        task = opts;
    } else {
        parseTimes(options, opts);
        callback = callback || noop;
    }

    if (typeof task !== 'function') {
        throw new Error("Invalid arguments for async.retry");
    }

    var _task = wrapAsync(task);

    var attempt = 1;
    function retryAttempt() {
        _task(function(err) {
            if (err && attempt++ < options.times &&
                (typeof options.errorFilter != 'function' ||
                    options.errorFilter(err))) {
                setTimeout(retryAttempt, options.intervalFunc(attempt));
            } else {
                callback.apply(null, arguments);
            }
        });
    }

    retryAttempt();
}

/**
 * A close relative of [`retry`]{@link module:ControlFlow.retry}.  This method
 * wraps a task and makes it retryable, rather than immediately calling it
 * with retries.
 *
 * @name retryable
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.retry]{@link module:ControlFlow.retry}
 * @category Control Flow
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
 * options, exactly the same as from `retry`
 * @param {AsyncFunction} task - the asynchronous function to wrap.
 * This function will be passed any arguments passed to the returned wrapper.
 * Invoked with (...args, callback).
 * @returns {AsyncFunction} The wrapped function, which when invoked, will
 * retry on an error, based on the parameters specified in `opts`.
 * This function will accept the same parameters as `task`.
 * @example
 *
 * async.auto({
 *     dep1: async.retryable(3, getFromFlakyService),
 *     process: ["dep1", async.retryable(3, function (results, cb) {
 *         maybeProcessData(results.dep1, cb);
 *     })]
 * }, callback);
 */
var retryable = function (opts, task) {
    if (!task) {
        task = opts;
        opts = null;
    }
    var _task = wrapAsync(task);
    return initialParams(function (args, callback) {
        function taskFn(cb) {
            _task.apply(null, args.concat(cb));
        }

        if (opts) retry(opts, taskFn, callback);
        else retry(taskFn, callback);

    });
};

/**
 * Run the functions in the `tasks` collection in series, each one running once
 * the previous function has completed. If any functions in the series pass an
 * error to its callback, no more functions are run, and `callback` is
 * immediately called with the value of the error. Otherwise, `callback`
 * receives an array of results when `tasks` have completed.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function, and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 *  results from {@link async.series}.
 *
 * **Note** that while many implementations preserve the order of object
 * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
 * explicitly states that
 *
 * > The mechanics and order of enumerating the properties is not specified.
 *
 * So if you rely on the order in which your series of functions are executed,
 * and want this to work on all platforms, consider using an array.
 *
 * @name series
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing
 * [async functions]{@link AsyncFunction} to run in series.
 * Each function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This function gets a results array (or object)
 * containing all the result arguments passed to the `task` callbacks. Invoked
 * with (err, result).
 * @example
 * async.series([
 *     function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     },
 *     function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // results is now equal to ['one', 'two']
 * });
 *
 * async.series({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback){
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equal to: {one: 1, two: 2}
 * });
 */
function series(tasks, callback) {
    _parallel(eachOfSeries, tasks, callback);
}

/**
 * Returns `true` if at least one element in the `coll` satisfies an async test.
 * If any iteratee call returns `true`, the main `callback` is immediately
 * called.
 *
 * @name some
 * @static
 * @memberOf module:Collections
 * @method
 * @alias any
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 * @example
 *
 * async.some(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then at least one of the files exists
 * });
 */
var some = doParallel(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
 *
 * @name someLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anyLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someLimit = doParallelLimit(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
 *
 * @name someSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anySeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in series.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someSeries = doLimit(someLimit, 1);

/**
 * Sorts a list by the results of running each `coll` value through an async
 * `iteratee`.
 *
 * @name sortBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a value to use as the sort criteria as
 * its `result`.
 * Invoked with (item, callback).
 * @param {Function} callback - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is the items
 * from the original `coll` sorted by the values returned by the `iteratee`
 * calls. Invoked with (err, results).
 * @example
 *
 * async.sortBy(['file1','file2','file3'], function(file, callback) {
 *     fs.stat(file, function(err, stats) {
 *         callback(err, stats.mtime);
 *     });
 * }, function(err, results) {
 *     // results is now the original array of files sorted by
 *     // modified date
 * });
 *
 * // By modifying the callback parameter the
 * // sorting order can be influenced:
 *
 * // ascending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x);
 * }, function(err,result) {
 *     // result callback
 * });
 *
 * // descending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x*-1);    //<- x*-1 instead of x, turns the order around
 * }, function(err,result) {
 *     // result callback
 * });
 */
function sortBy (coll, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    map(coll, function (x, callback) {
        _iteratee(x, function (err, criteria) {
            if (err) return callback(err);
            callback(null, {value: x, criteria: criteria});
        });
    }, function (err, results) {
        if (err) return callback(err);
        callback(null, arrayMap(results.sort(comparator), baseProperty('value')));
    });

    function comparator(left, right) {
        var a = left.criteria, b = right.criteria;
        return a < b ? -1 : a > b ? 1 : 0;
    }
}

/**
 * Sets a time limit on an asynchronous function. If the function does not call
 * its callback within the specified milliseconds, it will be called with a
 * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
 *
 * @name timeout
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} asyncFn - The async function to limit in time.
 * @param {number} milliseconds - The specified time limit.
 * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
 * to timeout Error for more information..
 * @returns {AsyncFunction} Returns a wrapped function that can be used with any
 * of the control flow functions.
 * Invoke this function with the same parameters as you would `asyncFunc`.
 * @example
 *
 * function myFunction(foo, callback) {
 *     doAsyncTask(foo, function(err, data) {
 *         // handle errors
 *         if (err) return callback(err);
 *
 *         // do some stuff ...
 *
 *         // return processed data
 *         return callback(null, data);
 *     });
 * }
 *
 * var wrapped = async.timeout(myFunction, 1000);
 *
 * // call `wrapped` as you would `myFunction`
 * wrapped({ bar: 'bar' }, function(err, data) {
 *     // if `myFunction` takes < 1000 ms to execute, `err`
 *     // and `data` will have their expected values
 *
 *     // else `err` will be an Error with the code 'ETIMEDOUT'
 * });
 */
function timeout(asyncFn, milliseconds, info) {
    var fn = wrapAsync(asyncFn);

    return initialParams(function (args, callback) {
        var timedOut = false;
        var timer;

        function timeoutCallback() {
            var name = asyncFn.name || 'anonymous';
            var error  = new Error('Callback function "' + name + '" timed out.');
            error.code = 'ETIMEDOUT';
            if (info) {
                error.info = info;
            }
            timedOut = true;
            callback(error);
        }

        args.push(function () {
            if (!timedOut) {
                callback.apply(null, arguments);
                clearTimeout(timer);
            }
        });

        // setup timer and call original function
        timer = setTimeout(timeoutCallback, milliseconds);
        fn.apply(null, args);
    });
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
var nativeMax = Math.max;

/**
 * The base implementation of `_.range` and `_.rangeRight` which doesn't
 * coerce arguments.
 *
 * @private
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @param {number} step The value to increment or decrement by.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Array} Returns the range of numbers.
 */
function baseRange(start, end, step, fromRight) {
  var index = -1,
      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
      result = Array(length);

  while (length--) {
    result[fromRight ? length : ++index] = start;
    start += step;
  }
  return result;
}

/**
 * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name timesLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} count - The number of times to run the function.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see [async.map]{@link module:Collections.map}.
 */
function timeLimit(count, limit, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    mapLimit(baseRange(0, count, 1), limit, _iteratee, callback);
}

/**
 * Calls the `iteratee` function `n` times, and accumulates results in the same
 * manner you would use with [map]{@link module:Collections.map}.
 *
 * @name times
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 * @example
 *
 * // Pretend this is some complicated async factory
 * var createUser = function(id, callback) {
 *     callback(null, {
 *         id: 'user' + id
 *     });
 * };
 *
 * // generate 5 users
 * async.times(5, function(n, next) {
 *     createUser(n, function(err, user) {
 *         next(err, user);
 *     });
 * }, function(err, users) {
 *     // we should now have 5 users
 * });
 */
var times = doLimit(timeLimit, Infinity);

/**
 * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
 *
 * @name timesSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 */
var timesSeries = doLimit(timeLimit, 1);

/**
 * A relative of `reduce`.  Takes an Object or Array, and iterates over each
 * element in series, each step potentially mutating an `accumulator` value.
 * The type of the accumulator defaults to the type of collection passed in.
 *
 * @name transform
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} [accumulator] - The initial state of the transform.  If omitted,
 * it will default to an empty Object or Array, depending on the type of `coll`
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * collection that potentially modifies the accumulator.
 * Invoked with (accumulator, item, key, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the transformed accumulator.
 * Invoked with (err, result).
 * @example
 *
 * async.transform([1,2,3], function(acc, item, index, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         acc.push(item * 2)
 *         callback(null)
 *     });
 * }, function(err, result) {
 *     // result is now equal to [2, 4, 6]
 * });
 *
 * @example
 *
 * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
 *     setImmediate(function () {
 *         obj[key] = val * 2;
 *         callback();
 *     })
 * }, function (err, result) {
 *     // result is equal to {a: 2, b: 4, c: 6}
 * })
 */
function transform (coll, accumulator, iteratee, callback) {
    if (arguments.length <= 3) {
        callback = iteratee;
        iteratee = accumulator;
        accumulator = isArray(coll) ? [] : {};
    }
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);

    eachOf(coll, function(v, k, cb) {
        _iteratee(accumulator, v, k, cb);
    }, function(err) {
        callback(err, accumulator);
    });
}

/**
 * It runs each task in series but stops whenever any of the functions were
 * successful. If one of the tasks were successful, the `callback` will be
 * passed the result of the successful task. If all tasks fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name tryEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing functions to
 * run, each function is passed a `callback(err, result)` it must call on
 * completion with an error `err` (which can be `null`) and an optional `result`
 * value.
 * @param {Function} [callback] - An optional callback which is called when one
 * of the tasks has succeeded, or all have failed. It receives the `err` and
 * `result` arguments of the last attempt at completing the `task`. Invoked with
 * (err, results).
 * @example
 * async.tryEach([
 *     function getDataFromFirstWebsite(callback) {
 *         // Try getting the data from the first website
 *         callback(err, data);
 *     },
 *     function getDataFromSecondWebsite(callback) {
 *         // First website failed,
 *         // Try getting the data from the backup website
 *         callback(err, data);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     Now do something with the data.
 * });
 *
 */
function tryEach(tasks, callback) {
    var error = null;
    var result;
    callback = callback || noop;
    eachSeries(tasks, function(task, callback) {
        wrapAsync(task)(function (err, res/*, ...args*/) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            } else {
                result = res;
            }
            error = err;
            callback(!err);
        });
    }, function () {
        callback(error, result);
    });
}

/**
 * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
 * unmemoized form. Handy for testing.
 *
 * @name unmemoize
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.memoize]{@link module:Utils.memoize}
 * @category Util
 * @param {AsyncFunction} fn - the memoized function
 * @returns {AsyncFunction} a function that calls the original unmemoized function
 */
function unmemoize(fn) {
    return function () {
        return (fn.unmemoized || fn).apply(null, arguments);
    };
}

/**
 * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs.
 *
 * @name whilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 * @returns undefined
 * @example
 *
 * var count = 0;
 * async.whilst(
 *     function() { return count < 5; },
 *     function(callback) {
 *         count++;
 *         setTimeout(function() {
 *             callback(null, count);
 *         }, 1000);
 *     },
 *     function (err, n) {
 *         // 5 seconds have passed, n = 5
 *     }
 * );
 */
function whilst(test, iteratee, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    if (!test()) return callback(null);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        if (test()) return _iteratee(next);
        var args = slice(arguments, 1);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs. `callback` will be passed an error and any
 * arguments passed to the final `iteratee`'s callback.
 *
 * The inverse of [whilst]{@link module:ControlFlow.whilst}.
 *
 * @name until
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function until(test, iteratee, callback) {
    whilst(function() {
        return !test.apply(this, arguments);
    }, iteratee, callback);
}

/**
 * Runs the `tasks` array of functions in series, each passing their results to
 * the next in the array. However, if any of the `tasks` pass an error to their
 * own callback, the next function is not executed, and the main `callback` is
 * immediately called with the error.
 *
 * @name waterfall
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
 * to run.
 * Each function should complete with any number of `result` values.
 * The `result` values will be passed as arguments, in order, to the next task.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This will be passed the results of the last task's
 * callback. Invoked with (err, [results]).
 * @returns undefined
 * @example
 *
 * async.waterfall([
 *     function(callback) {
 *         callback(null, 'one', 'two');
 *     },
 *     function(arg1, arg2, callback) {
 *         // arg1 now equals 'one' and arg2 now equals 'two'
 *         callback(null, 'three');
 *     },
 *     function(arg1, callback) {
 *         // arg1 now equals 'three'
 *         callback(null, 'done');
 *     }
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 *
 * // Or, with named functions:
 * async.waterfall([
 *     myFirstFunction,
 *     mySecondFunction,
 *     myLastFunction,
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 * function myFirstFunction(callback) {
 *     callback(null, 'one', 'two');
 * }
 * function mySecondFunction(arg1, arg2, callback) {
 *     // arg1 now equals 'one' and arg2 now equals 'two'
 *     callback(null, 'three');
 * }
 * function myLastFunction(arg1, callback) {
 *     // arg1 now equals 'three'
 *     callback(null, 'done');
 * }
 */
var waterfall = function(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
    if (!tasks.length) return callback();
    var taskIndex = 0;

    function nextTask(args) {
        var task = wrapAsync(tasks[taskIndex++]);
        args.push(onlyOnce(next));
        task.apply(null, args);
    }

    function next(err/*, ...args*/) {
        if (err || taskIndex === tasks.length) {
            return callback.apply(null, arguments);
        }
        nextTask(slice(arguments, 1));
    }

    nextTask([]);
};

/**
 * An "async function" in the context of Async is an asynchronous function with
 * a variable number of parameters, with the final parameter being a callback.
 * (`function (arg1, arg2, ..., callback) {}`)
 * The final callback is of the form `callback(err, results...)`, which must be
 * called once the function is completed.  The callback should be called with a
 * Error as its first argument to signal that an error occurred.
 * Otherwise, if no error occurred, it should be called with `null` as the first
 * argument, and any additional `result` arguments that may apply, to signal
 * successful completion.
 * The callback must be called exactly once, ideally on a later tick of the
 * JavaScript event loop.
 *
 * This type of function is also referred to as a "Node-style async function",
 * or a "continuation passing-style function" (CPS). Most of the methods of this
 * library are themselves CPS/Node-style async functions, or functions that
 * return CPS/Node-style async functions.
 *
 * Wherever we accept a Node-style async function, we also directly accept an
 * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
 * In this case, the `async` function will not be passed a final callback
 * argument, and any thrown error will be used as the `err` argument of the
 * implicit callback, and the return value will be used as the `result` value.
 * (i.e. a `rejected` of the returned Promise becomes the `err` callback
 * argument, and a `resolved` value becomes the `result`.)
 *
 * Note, due to JavaScript limitations, we can only detect native `async`
 * functions and not transpilied implementations.
 * Your environment must have `async`/`await` support for this to work.
 * (e.g. Node > v7.6, or a recent version of a modern browser).
 * If you are using `async` functions through a transpiler (e.g. Babel), you
 * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
 * because the `async function` will be compiled to an ordinary function that
 * returns a promise.
 *
 * @typedef {Function} AsyncFunction
 * @static
 */

/**
 * Async is a utility module which provides straight-forward, powerful functions
 * for working with asynchronous JavaScript. Although originally designed for
 * use with [Node.js](http://nodejs.org) and installable via
 * `npm install --save async`, it can also be used directly in the browser.
 * @module async
 * @see AsyncFunction
 */


/**
 * A collection of `async` functions for manipulating collections, such as
 * arrays and objects.
 * @module Collections
 */

/**
 * A collection of `async` functions for controlling the flow through a script.
 * @module ControlFlow
 */

/**
 * A collection of `async` utility functions.
 * @module Utils
 */

var index = {
    apply: apply,
    applyEach: applyEach,
    applyEachSeries: applyEachSeries,
    asyncify: asyncify,
    auto: auto,
    autoInject: autoInject,
    cargo: cargo,
    compose: compose,
    concat: concat,
    concatLimit: concatLimit,
    concatSeries: concatSeries,
    constant: constant,
    detect: detect,
    detectLimit: detectLimit,
    detectSeries: detectSeries,
    dir: dir,
    doDuring: doDuring,
    doUntil: doUntil,
    doWhilst: doWhilst,
    during: during,
    each: eachLimit,
    eachLimit: eachLimit$1,
    eachOf: eachOf,
    eachOfLimit: eachOfLimit,
    eachOfSeries: eachOfSeries,
    eachSeries: eachSeries,
    ensureAsync: ensureAsync,
    every: every,
    everyLimit: everyLimit,
    everySeries: everySeries,
    filter: filter,
    filterLimit: filterLimit,
    filterSeries: filterSeries,
    forever: forever,
    groupBy: groupBy,
    groupByLimit: groupByLimit,
    groupBySeries: groupBySeries,
    log: log,
    map: map,
    mapLimit: mapLimit,
    mapSeries: mapSeries,
    mapValues: mapValues,
    mapValuesLimit: mapValuesLimit,
    mapValuesSeries: mapValuesSeries,
    memoize: memoize,
    nextTick: nextTick,
    parallel: parallelLimit,
    parallelLimit: parallelLimit$1,
    priorityQueue: priorityQueue,
    queue: queue$1,
    race: race,
    reduce: reduce,
    reduceRight: reduceRight,
    reflect: reflect,
    reflectAll: reflectAll,
    reject: reject,
    rejectLimit: rejectLimit,
    rejectSeries: rejectSeries,
    retry: retry,
    retryable: retryable,
    seq: seq,
    series: series,
    setImmediate: setImmediate$1,
    some: some,
    someLimit: someLimit,
    someSeries: someSeries,
    sortBy: sortBy,
    timeout: timeout,
    times: times,
    timesLimit: timeLimit,
    timesSeries: timesSeries,
    transform: transform,
    tryEach: tryEach,
    unmemoize: unmemoize,
    until: until,
    waterfall: waterfall,
    whilst: whilst,

    // aliases
    all: every,
    allLimit: everyLimit,
    allSeries: everySeries,
    any: some,
    anyLimit: someLimit,
    anySeries: someSeries,
    find: detect,
    findLimit: detectLimit,
    findSeries: detectSeries,
    forEach: eachLimit,
    forEachSeries: eachSeries,
    forEachLimit: eachLimit$1,
    forEachOf: eachOf,
    forEachOfSeries: eachOfSeries,
    forEachOfLimit: eachOfLimit,
    inject: reduce,
    foldl: reduce,
    foldr: reduceRight,
    select: filter,
    selectLimit: filterLimit,
    selectSeries: filterSeries,
    wrapSync: asyncify
};

exports['default'] = index;
exports.apply = apply;
exports.applyEach = applyEach;
exports.applyEachSeries = applyEachSeries;
exports.asyncify = asyncify;
exports.auto = auto;
exports.autoInject = autoInject;
exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
exports.concatLimit = concatLimit;
exports.concatSeries = concatSeries;
exports.constant = constant;
exports.detect = detect;
exports.detectLimit = detectLimit;
exports.detectSeries = detectSeries;
exports.dir = dir;
exports.doDuring = doDuring;
exports.doUntil = doUntil;
exports.doWhilst = doWhilst;
exports.during = during;
exports.each = eachLimit;
exports.eachLimit = eachLimit$1;
exports.eachOf = eachOf;
exports.eachOfLimit = eachOfLimit;
exports.eachOfSeries = eachOfSeries;
exports.eachSeries = eachSeries;
exports.ensureAsync = ensureAsync;
exports.every = every;
exports.everyLimit = everyLimit;
exports.everySeries = everySeries;
exports.filter = filter;
exports.filterLimit = filterLimit;
exports.filterSeries = filterSeries;
exports.forever = forever;
exports.groupBy = groupBy;
exports.groupByLimit = groupByLimit;
exports.groupBySeries = groupBySeries;
exports.log = log;
exports.map = map;
exports.mapLimit = mapLimit;
exports.mapSeries = mapSeries;
exports.mapValues = mapValues;
exports.mapValuesLimit = mapValuesLimit;
exports.mapValuesSeries = mapValuesSeries;
exports.memoize = memoize;
exports.nextTick = nextTick;
exports.parallel = parallelLimit;
exports.parallelLimit = parallelLimit$1;
exports.priorityQueue = priorityQueue;
exports.queue = queue$1;
exports.race = race;
exports.reduce = reduce;
exports.reduceRight = reduceRight;
exports.reflect = reflect;
exports.reflectAll = reflectAll;
exports.reject = reject;
exports.rejectLimit = rejectLimit;
exports.rejectSeries = rejectSeries;
exports.retry = retry;
exports.retryable = retryable;
exports.seq = seq;
exports.series = series;
exports.setImmediate = setImmediate$1;
exports.some = some;
exports.someLimit = someLimit;
exports.someSeries = someSeries;
exports.sortBy = sortBy;
exports.timeout = timeout;
exports.times = times;
exports.timesLimit = timeLimit;
exports.timesSeries = timesSeries;
exports.transform = transform;
exports.tryEach = tryEach;
exports.unmemoize = unmemoize;
exports.until = until;
exports.waterfall = waterfall;
exports.whilst = whilst;
exports.all = every;
exports.allLimit = everyLimit;
exports.allSeries = everySeries;
exports.any = some;
exports.anyLimit = someLimit;
exports.anySeries = someSeries;
exports.find = detect;
exports.findLimit = detectLimit;
exports.findSeries = detectSeries;
exports.forEach = eachLimit;
exports.forEachSeries = eachSeries;
exports.forEachLimit = eachLimit$1;
exports.forEachOf = eachOf;
exports.forEachOfSeries = eachOfSeries;
exports.forEachOfLimit = eachOfLimit;
exports.inject = reduce;
exports.foldl = reduce;
exports.foldr = reduceRight;
exports.select = filter;
exports.selectLimit = filterLimit;
exports.selectSeries = filterSeries;
exports.wrapSync = asyncify;

Object.defineProperty(exports, '__esModule', { value: true });

})));


/***/ }),

/***/ 661729:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(887733);
var hash_1 = __webpack_require__(621772);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 887733:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 895263:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 621772:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(644567);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(887733);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 425332:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(895263));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(661729));
/**
 * Hash functions
 */
__export(__webpack_require__(621772));
/**
 * ECDSA signature
 */
__export(__webpack_require__(478518));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(887733));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(66345));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 66345:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(887733);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 478518:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(887733);
var hash_1 = __webpack_require__(621772);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 69288:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(827115)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 644567:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(69288)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(510604)
}


/***/ }),

/***/ 510604:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(827115)(__webpack_require__(156347))


/***/ }),

/***/ 827115:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(146248)
const createShake = __webpack_require__(615925)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 146248:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 615925:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 754450:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 156347:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(754450)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 857554:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2013 LevelUP contributors
 * See list at <https://github.com/rvagg/node-levelup#contributing>
 * MIT +no-false-attribs License
 * <https://github.com/Level/level-ws/master/LICENSE>
 */

var Writable = __webpack_require__(92413).Writable || __webpack_require__(525271).Writable
  , inherits = __webpack_require__(431669).inherits
  , extend   = __webpack_require__(80410)

  , defaultOptions = {
        type          : 'put'
      , keyEncoding   : 'utf8'
      , valueEncoding : 'utf8'
    }

    // copied from LevelUP
  , encodingNames  = [
        'hex'
      , 'utf8'
      , 'utf-8'
      , 'ascii'
      , 'binary'
      , 'base64'
      , 'ucs2'
      , 'ucs-2'
      , 'utf16le'
      , 'utf-16le'
    ]

    // copied from LevelUP
  , encodingOpts = (function () {
      var eo = {}
      encodingNames.forEach(function (e) {
        eo[e] = { valueEncoding : e }
      })
      return eo
    }())

// copied from LevelUP
function getOptions (levelup, options) {
  var s = typeof options == 'string' // just an encoding
  if (!s && options && options.encoding && !options.valueEncoding)
    options.valueEncoding = options.encoding
  return extend(
      (levelup && levelup.options) || {}
    , s ? encodingOpts[options] || encodingOpts[defaultOptions.valueEncoding]
        : options
  )
}

function WriteStream (options, db) {
  if (!(this instanceof WriteStream))
    return new WriteStream(options, db)

  Writable.call(this, { objectMode: true })
  this._options = extend(defaultOptions, getOptions(db, options))
  this._db      = db
  this._buffer = []
  this.writable = true
  this.readable = false

  var self = this
  this.on('finish', function f () {
    if (self._buffer && self._buffer.length) {
      return self._flush(f)
    }
    self.writable = false
    self.emit('close')
  })
}

inherits(WriteStream, Writable)

WriteStream.prototype._write = function write (d, enc, next) {
  var self = this
  if (self._destroyed)
    return
  if (!self._db.isOpen())
    return self._db.once('ready', function () {
      write.call(self, d, enc, next)
    })

  if (self._options.maxBufferLength &&
      self._buffer.length > self._options.maxBufferLength) {
    self.once('_flush', next)
  }
  else {
    if (self._buffer.length === 0)
      process.nextTick(function () { self._flush() })
    self._buffer.push(d)
    next()
  }
}

WriteStream.prototype._flush = function (f) {
  var self = this
    , buffer = self._buffer

  if (self._destroyed || !buffer) return
 
  if (!self._db.isOpen()) {
    return self._db.on('ready', function () { self._flush(f) })
  }
  self._buffer = []

  self._db.batch(buffer.map(function (d) {
    return {
        type          : d.type || self._options.type
      , key           : d.key
      , value         : d.value
      , keyEncoding   : d.keyEncoding || self._options.keyEncoding
      , valueEncoding : d.valueEncoding
          || d.encoding
          || self._options.valueEncoding
    }
  }), cb)

  function cb (err) {
    if (err) {
      self.writable = false
      self.emit('error', err)
    }
    else {
      if (f) f()
      self.emit('_flush')
    }
  }
}

WriteStream.prototype.toString = function () {
  return 'LevelUP.WriteStream'
}

WriteStream.prototype.destroy = function () {
  if (this._destroyed) return
  this._buffer = null
  this._destroyed = true
  this.writable = false
  this.emit('close')
}

WriteStream.prototype.destroySoon = function () {
  this.end()
}

module.exports = function (db) {
  db.writeStream = db.createWriteStream = function (options) {
    return new WriteStream(options, db)
  }
  return db
}

module.exports.WriteStream = WriteStream

/***/ }),

/***/ 81620:
/***/ ((module) => {

module.exports = Array.isArray || function (arr) {
  return Object.prototype.toString.call(arr) == '[object Array]';
};


/***/ }),

/***/ 442378:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.

module.exports = Duplex;

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) keys.push(key);
  return keys;
}
/*</replacement>*/


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(374363);
var Writable = __webpack_require__(518636);

util.inherits(Duplex, Readable);

forEach(objectKeys(Writable.prototype), function(method) {
  if (!Duplex.prototype[method])
    Duplex.prototype[method] = Writable.prototype[method];
});

function Duplex(options) {
  if (!(this instanceof Duplex))
    return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false)
    this.readable = false;

  if (options && options.writable === false)
    this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false)
    this.allowHalfOpen = false;

  this.once('end', onend);
}

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended)
    return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  process.nextTick(this.end.bind(this));
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}


/***/ }),

/***/ 821472:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.

module.exports = PassThrough;

var Transform = __webpack_require__(584118);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough))
    return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function(chunk, encoding, cb) {
  cb(null, chunk);
};


/***/ }),

/***/ 374363:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(81620);
/*</replacement>*/


/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Readable.ReadableState = ReadableState;

var EE = __webpack_require__(128614).EventEmitter;

/*<replacement>*/
if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

var Stream = __webpack_require__(92413);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var StringDecoder;

util.inherits(Readable, Stream);

function ReadableState(options, stream) {
  options = options || {};

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.buffer = [];
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = false;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // In streams that never have any data, and do push(null) right away,
  // the consumer can miss the 'end' event if they do some I/O before
  // consuming the stream.  So, we don't emit('end') until some reading
  // happens.
  this.calledRead = false;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, becuase any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;


  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // when piping, we only care about 'readable' events that happen
  // after read()ing all the bytes and not getting any pushback.
  this.ranOut = false;

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder)
      StringDecoder = __webpack_require__(519539)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  if (!(this instanceof Readable))
    return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  Stream.call(this);
}

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function(chunk, encoding) {
  var state = this._readableState;

  if (typeof chunk === 'string' && !state.objectMode) {
    encoding = encoding || state.defaultEncoding;
    if (encoding !== state.encoding) {
      chunk = new Buffer(chunk, encoding);
      encoding = '';
    }
  }

  return readableAddChunk(this, state, chunk, encoding, false);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
  var state = this._readableState;
  return readableAddChunk(this, state, chunk, '', true);
};

function readableAddChunk(stream, state, chunk, encoding, addToFront) {
  var er = chunkInvalid(state, chunk);
  if (er) {
    stream.emit('error', er);
  } else if (chunk === null || chunk === undefined) {
    state.reading = false;
    if (!state.ended)
      onEofChunk(stream, state);
  } else if (state.objectMode || chunk && chunk.length > 0) {
    if (state.ended && !addToFront) {
      var e = new Error('stream.push() after EOF');
      stream.emit('error', e);
    } else if (state.endEmitted && addToFront) {
      var e = new Error('stream.unshift() after end event');
      stream.emit('error', e);
    } else {
      if (state.decoder && !addToFront && !encoding)
        chunk = state.decoder.write(chunk);

      // update the buffer info.
      state.length += state.objectMode ? 1 : chunk.length;
      if (addToFront) {
        state.buffer.unshift(chunk);
      } else {
        state.reading = false;
        state.buffer.push(chunk);
      }

      if (state.needReadable)
        emitReadable(stream);

      maybeReadMore(stream, state);
    }
  } else if (!addToFront) {
    state.reading = false;
  }

  return needMoreData(state);
}



// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended &&
         (state.needReadable ||
          state.length < state.highWaterMark ||
          state.length === 0);
}

// backwards compatibility.
Readable.prototype.setEncoding = function(enc) {
  if (!StringDecoder)
    StringDecoder = __webpack_require__(519539)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
};

// Don't raise the hwm > 128MB
var MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2
    n--;
    for (var p = 1; p < 32; p <<= 1) n |= n >> p;
    n++;
  }
  return n;
}

function howMuchToRead(n, state) {
  if (state.length === 0 && state.ended)
    return 0;

  if (state.objectMode)
    return n === 0 ? 0 : 1;

  if (n === null || isNaN(n)) {
    // only flow one buffer at a time
    if (state.flowing && state.buffer.length)
      return state.buffer[0].length;
    else
      return state.length;
  }

  if (n <= 0)
    return 0;

  // If we're asking for more than the target buffer level,
  // then raise the water mark.  Bump up to the next highest
  // power of 2, to prevent increasing it excessively in tiny
  // amounts.
  if (n > state.highWaterMark)
    state.highWaterMark = roundUpToNextPowerOf2(n);

  // don't have that much.  return null, unless we've ended.
  if (n > state.length) {
    if (!state.ended) {
      state.needReadable = true;
      return 0;
    } else
      return state.length;
  }

  return n;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
  var state = this._readableState;
  state.calledRead = true;
  var nOrig = n;
  var ret;

  if (typeof n !== 'number' || n > 0)
    state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 &&
      state.needReadable &&
      (state.length >= state.highWaterMark || state.ended)) {
    emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    ret = null;

    // In cases where the decoder did not receive enough data
    // to produce a full chunk, then immediately received an
    // EOF, state.buffer will contain [<Buffer >, <Buffer 00 ...>].
    // howMuchToRead will see this and coerce the amount to
    // read to zero (because it's looking at the length of the
    // first <Buffer > in state.buffer), and we'll end up here.
    //
    // This can only happen via state.decoder -- no other venue
    // exists for pushing a zero-length chunk into state.buffer
    // and triggering this behavior. In this case, we return our
    // remaining data and end the stream, if appropriate.
    if (state.length > 0 && state.decoder) {
      ret = fromList(n, state);
      state.length -= ret.length;
    }

    if (state.length === 0)
      endReadable(this);

    return ret;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;

  // if we currently have less than the highWaterMark, then also read some
  if (state.length - n <= state.highWaterMark)
    doRead = true;

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading)
    doRead = false;

  if (doRead) {
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0)
      state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
  }

  // If _read called its callback synchronously, then `reading`
  // will be false, and we need to re-evaluate how much data we
  // can return to the user.
  if (doRead && !state.reading)
    n = howMuchToRead(nOrig, state);

  if (n > 0)
    ret = fromList(n, state);
  else
    ret = null;

  if (ret === null) {
    state.needReadable = true;
    n = 0;
  }

  state.length -= n;

  // If we have nothing in the buffer, then we want to know
  // as soon as we *do* get something into the buffer.
  if (state.length === 0 && !state.ended)
    state.needReadable = true;

  // If we happened to read() exactly the remaining amount in the
  // buffer, and the EOF has been seen at this point, then make sure
  // that we emit 'end' on the very next tick.
  if (state.ended && !state.endEmitted && state.length === 0)
    endReadable(this);

  return ret;
};

function chunkInvalid(state, chunk) {
  var er = null;
  if (!Buffer.isBuffer(chunk) &&
      'string' !== typeof chunk &&
      chunk !== null &&
      chunk !== undefined &&
      !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}


function onEofChunk(stream, state) {
  if (state.decoder && !state.ended) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // if we've ended and we have some data left, then emit
  // 'readable' now to make sure it gets picked up.
  if (state.length > 0)
    emitReadable(stream);
  else
    endReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (state.emittedReadable)
    return;

  state.emittedReadable = true;
  if (state.sync)
    process.nextTick(function() {
      emitReadable_(stream);
    });
  else
    emitReadable_(stream);
}

function emitReadable_(stream) {
  stream.emit('readable');
}


// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    process.nextTick(function() {
      maybeReadMore_(stream, state);
    });
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended &&
         state.length < state.highWaterMark) {
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;
    else
      len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function(n) {
  this.emit('error', new Error('not implemented'));
};

Readable.prototype.pipe = function(dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;

  var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
              dest !== process.stdout &&
              dest !== process.stderr;

  var endFn = doEnd ? onend : cleanup;
  if (state.endEmitted)
    process.nextTick(endFn);
  else
    src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable) {
    if (readable !== src) return;
    cleanup();
  }

  function onend() {
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  function cleanup() {
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', cleanup);

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (!dest._writableState || dest._writableState.needDrain)
      ondrain();
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    unpipe();
    dest.removeListener('error', onerror);
    if (EE.listenerCount(dest, 'error') === 0)
      dest.emit('error', er);
  }
  // This is a brutally ugly hack to make sure that our error handler
  // is attached before any userland ones.  NEVER DO THIS.
  if (!dest._events || !dest._events.error)
    dest.on('error', onerror);
  else if (isArray(dest._events.error))
    dest._events.error.unshift(onerror);
  else
    dest._events.error = [onerror, dest._events.error];



  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    // the handler that waits for readable events after all
    // the data gets sucked out in flow.
    // This would be easier to follow with a .once() handler
    // in flow(), but that is too slow.
    this.on('readable', pipeOnReadable);

    state.flowing = true;
    process.nextTick(function() {
      flow(src);
    });
  }

  return dest;
};

function pipeOnDrain(src) {
  return function() {
    var dest = this;
    var state = src._readableState;
    state.awaitDrain--;
    if (state.awaitDrain === 0)
      flow(src);
  };
}

function flow(src) {
  var state = src._readableState;
  var chunk;
  state.awaitDrain = 0;

  function write(dest, i, list) {
    var written = dest.write(chunk);
    if (false === written) {
      state.awaitDrain++;
    }
  }

  while (state.pipesCount && null !== (chunk = src.read())) {

    if (state.pipesCount === 1)
      write(state.pipes, 0, null);
    else
      forEach(state.pipes, write);

    src.emit('data', chunk);

    // if anyone needs a drain, then we have to wait for that.
    if (state.awaitDrain > 0)
      return;
  }

  // if every destination was unpiped, either before entering this
  // function, or in the while loop, then stop flowing.
  //
  // NB: This is a pretty rare edge case.
  if (state.pipesCount === 0) {
    state.flowing = false;

    // if there were data event listeners added, then switch to old mode.
    if (EE.listenerCount(src, 'data') > 0)
      emitDataEvents(src);
    return;
  }

  // at this point, no one needed a drain, so we just ran out of data
  // on the next readable event, start it over again.
  state.ranOut = true;
}

function pipeOnReadable() {
  if (this._readableState.ranOut) {
    this._readableState.ranOut = false;
    flow(this);
  }
}


Readable.prototype.unpipe = function(dest) {
  var state = this._readableState;

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0)
    return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes)
      return this;

    if (!dest)
      dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    this.removeListener('readable', pipeOnReadable);
    state.flowing = false;
    if (dest)
      dest.emit('unpipe', this);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    this.removeListener('readable', pipeOnReadable);
    state.flowing = false;

    for (var i = 0; i < len; i++)
      dests[i].emit('unpipe', this);
    return this;
  }

  // try to find the right one.
  var i = indexOf(state.pipes, dest);
  if (i === -1)
    return this;

  state.pipes.splice(i, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1)
    state.pipes = state.pipes[0];

  dest.emit('unpipe', this);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function(ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  if (ev === 'data' && !this._readableState.flowing)
    emitDataEvents(this);

  if (ev === 'readable' && this.readable) {
    var state = this._readableState;
    if (!state.readableListening) {
      state.readableListening = true;
      state.emittedReadable = false;
      state.needReadable = true;
      if (!state.reading) {
        this.read(0);
      } else if (state.length) {
        emitReadable(this, state);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
  emitDataEvents(this);
  this.read(0);
  this.emit('resume');
};

Readable.prototype.pause = function() {
  emitDataEvents(this, true);
  this.emit('pause');
};

function emitDataEvents(stream, startPaused) {
  var state = stream._readableState;

  if (state.flowing) {
    // https://github.com/isaacs/readable-stream/issues/16
    throw new Error('Cannot switch to old mode now.');
  }

  var paused = startPaused || false;
  var readable = false;

  // convert to an old-style stream.
  stream.readable = true;
  stream.pipe = Stream.prototype.pipe;
  stream.on = stream.addListener = Stream.prototype.on;

  stream.on('readable', function() {
    readable = true;

    var c;
    while (!paused && (null !== (c = stream.read())))
      stream.emit('data', c);

    if (c === null) {
      readable = false;
      stream._readableState.needReadable = true;
    }
  });

  stream.pause = function() {
    paused = true;
    this.emit('pause');
  };

  stream.resume = function() {
    paused = false;
    if (readable)
      process.nextTick(function() {
        stream.emit('readable');
      });
    else
      this.read(0);
    this.emit('resume');
  };

  // now make it start, just in case it hadn't already.
  stream.emit('readable');
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function(stream) {
  var state = this._readableState;
  var paused = false;

  var self = this;
  stream.on('end', function() {
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length)
        self.push(chunk);
    }

    self.push(null);
  });

  stream.on('data', function(chunk) {
    if (state.decoder)
      chunk = state.decoder.write(chunk);

    // don't skip over falsy values in objectMode
    //if (state.objectMode && util.isNullOrUndefined(chunk))
    if (state.objectMode && (chunk === null || chunk === undefined))
      return;
    else if (!state.objectMode && (!chunk || !chunk.length))
      return;

    var ret = self.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (typeof stream[i] === 'function' &&
        typeof this[i] === 'undefined') {
      this[i] = function(method) { return function() {
        return stream[method].apply(stream, arguments);
      }}(i);
    }
  }

  // proxy certain important events.
  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
  forEach(events, function(ev) {
    stream.on(ev, self.emit.bind(self, ev));
  });

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  self._read = function(n) {
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return self;
};



// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
function fromList(n, state) {
  var list = state.buffer;
  var length = state.length;
  var stringMode = !!state.decoder;
  var objectMode = !!state.objectMode;
  var ret;

  // nothing in the list, definitely empty.
  if (list.length === 0)
    return null;

  if (length === 0)
    ret = null;
  else if (objectMode)
    ret = list.shift();
  else if (!n || n >= length) {
    // read it all, truncate the array.
    if (stringMode)
      ret = list.join('');
    else
      ret = Buffer.concat(list, length);
    list.length = 0;
  } else {
    // read just some of it.
    if (n < list[0].length) {
      // just take a part of the first list item.
      // slice is the same for buffers and strings.
      var buf = list[0];
      ret = buf.slice(0, n);
      list[0] = buf.slice(n);
    } else if (n === list[0].length) {
      // first list is a perfect match
      ret = list.shift();
    } else {
      // complex case.
      // we have enough to cover it, but it spans past the first buffer.
      if (stringMode)
        ret = '';
      else
        ret = new Buffer(n);

      var c = 0;
      for (var i = 0, l = list.length; i < l && c < n; i++) {
        var buf = list[0];
        var cpy = Math.min(n - c, buf.length);

        if (stringMode)
          ret += buf.slice(0, cpy);
        else
          buf.copy(ret, c, 0, cpy);

        if (cpy < buf.length)
          list[0] = buf.slice(cpy);
        else
          list.shift();

        c += cpy;
      }
    }
  }

  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0)
    throw new Error('endReadable called on non-empty stream');

  if (!state.endEmitted && state.calledRead) {
    state.ended = true;
    process.nextTick(function() {
      // Check that we didn't get one last unshift.
      if (!state.endEmitted && state.length === 0) {
        state.endEmitted = true;
        stream.readable = false;
        stream.emit('end');
      }
    });
  }
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}

function indexOf (xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}


/***/ }),

/***/ 584118:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.


// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.

module.exports = Transform;

var Duplex = __webpack_require__(442378);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);


function TransformState(options, stream) {
  this.afterTransform = function(er, data) {
    return afterTransform(stream, er, data);
  };

  this.needTransform = false;
  this.transforming = false;
  this.writecb = null;
  this.writechunk = null;
}

function afterTransform(stream, er, data) {
  var ts = stream._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb)
    return stream.emit('error', new Error('no writecb in Transform class'));

  ts.writechunk = null;
  ts.writecb = null;

  if (data !== null && data !== undefined)
    stream.push(data);

  if (cb)
    cb(er);

  var rs = stream._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    stream._read(rs.highWaterMark);
  }
}


function Transform(options) {
  if (!(this instanceof Transform))
    return new Transform(options);

  Duplex.call(this, options);

  var ts = this._transformState = new TransformState(options, this);

  // when the writable side finishes, then flush out anything remaining.
  var stream = this;

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  this.once('finish', function() {
    if ('function' === typeof this._flush)
      this._flush(function(er) {
        done(stream, er);
      });
    else
      done(stream);
  });
}

Transform.prototype.push = function(chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function(chunk, encoding, cb) {
  throw new Error('not implemented');
};

Transform.prototype._write = function(chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform ||
        rs.needReadable ||
        rs.length < rs.highWaterMark)
      this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};


function done(stream, er) {
  if (er)
    return stream.emit('error', er);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  var ws = stream._writableState;
  var rs = stream._readableState;
  var ts = stream._transformState;

  if (ws.length)
    throw new Error('calling transform done when ws.length != 0');

  if (ts.transforming)
    throw new Error('calling transform done when still transforming');

  return stream.push(null);
}


/***/ }),

/***/ 518636:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, cb), and it'll handle all
// the drain event emission and buffering.

module.exports = Writable;

/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Writable.WritableState = WritableState;


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Stream = __webpack_require__(92413);

util.inherits(Writable, Stream);

function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
}

function WritableState(options, stream) {
  options = options || {};

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, becuase any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function(er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.buffer = [];

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;
}

function Writable(options) {
  var Duplex = __webpack_require__(442378);

  // Writable ctor is applied to Duplexes, though they're not
  // instanceof Writable, they're instanceof Readable.
  if (!(this instanceof Writable) && !(this instanceof Duplex))
    return new Writable(options);

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
  this.emit('error', new Error('Cannot pipe. Not readable.'));
};


function writeAfterEnd(stream, state, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  process.nextTick(function() {
    cb(er);
  });
}

// If we get something that is not a buffer, string, null, or undefined,
// and we're not in objectMode, then that's an error.
// Otherwise stream chunks are all considered to be of length=1, and the
// watermarks determine how many objects to keep in the buffer, rather than
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  if (!Buffer.isBuffer(chunk) &&
      'string' !== typeof chunk &&
      chunk !== null &&
      chunk !== undefined &&
      !state.objectMode) {
    var er = new TypeError('Invalid non-string/buffer chunk');
    stream.emit('error', er);
    process.nextTick(function() {
      cb(er);
    });
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function(chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (Buffer.isBuffer(chunk))
    encoding = 'buffer';
  else if (!encoding)
    encoding = state.defaultEncoding;

  if (typeof cb !== 'function')
    cb = function() {};

  if (state.ended)
    writeAfterEnd(this, state, cb);
  else if (validChunk(this, state, chunk, cb))
    ret = writeOrBuffer(this, state, chunk, encoding, cb);

  return ret;
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode &&
      state.decodeStrings !== false &&
      typeof chunk === 'string') {
    chunk = new Buffer(chunk, encoding);
  }
  return chunk;
}

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
  chunk = decodeChunk(state, chunk, encoding);
  if (Buffer.isBuffer(chunk))
    encoding = 'buffer';
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret)
    state.needDrain = true;

  if (state.writing)
    state.buffer.push(new WriteReq(chunk, encoding, cb));
  else
    doWrite(stream, state, len, chunk, encoding, cb);

  return ret;
}

function doWrite(stream, state, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  if (sync)
    process.nextTick(function() {
      cb(er);
    });
  else
    cb(er);

  stream._writableState.errorEmitted = true;
  stream.emit('error', er);
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er)
    onwriteError(stream, state, sync, er, cb);
  else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(stream, state);

    if (!finished && !state.bufferProcessing && state.buffer.length)
      clearBuffer(stream, state);

    if (sync) {
      process.nextTick(function() {
        afterWrite(stream, state, finished, cb);
      });
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished)
    onwriteDrain(stream, state);
  cb();
  if (finished)
    finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}


// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;

  for (var c = 0; c < state.buffer.length; c++) {
    var entry = state.buffer[c];
    var chunk = entry.chunk;
    var encoding = entry.encoding;
    var cb = entry.callback;
    var len = state.objectMode ? 1 : chunk.length;

    doWrite(stream, state, len, chunk, encoding, cb);

    // if we didn't call the onwrite immediately, then
    // it means that we need to wait until it does.
    // also, that means that the chunk and cb are currently
    // being processed, so move the buffer counter past them.
    if (state.writing) {
      c++;
      break;
    }
  }

  state.bufferProcessing = false;
  if (c < state.buffer.length)
    state.buffer = state.buffer.slice(c);
  else
    state.buffer.length = 0;
}

Writable.prototype._write = function(chunk, encoding, cb) {
  cb(new Error('not implemented'));
};

Writable.prototype.end = function(chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (typeof chunk !== 'undefined' && chunk !== null)
    this.write(chunk, encoding);

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished)
    endWritable(this, state, cb);
};


function needFinish(stream, state) {
  return (state.ending &&
          state.length === 0 &&
          !state.finished &&
          !state.writing);
}

function finishMaybe(stream, state) {
  var need = needFinish(stream, state);
  if (need) {
    state.finished = true;
    stream.emit('finish');
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished)
      process.nextTick(cb);
    else
      stream.once('finish', cb);
  }
  state.ended = true;
}


/***/ }),

/***/ 525271:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413); // hack to fix a circular dependency issue when used with browserify
exports = module.exports = __webpack_require__(374363);
exports.Stream = Stream;
exports.Readable = exports;
exports.Writable = __webpack_require__(518636);
exports.Duplex = __webpack_require__(442378);
exports.Transform = __webpack_require__(584118);
exports.PassThrough = __webpack_require__(821472);
if (!process.browser && process.env.READABLE_STREAM === 'disable') {
  module.exports = __webpack_require__(92413);
}


/***/ }),

/***/ 519539:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var Buffer = __webpack_require__(764293).Buffer;

var isBufferEncoding = Buffer.isEncoding
  || function(encoding) {
       switch (encoding && encoding.toLowerCase()) {
         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
         default: return false;
       }
     }


function assertEncoding(encoding) {
  if (encoding && !isBufferEncoding(encoding)) {
    throw new Error('Unknown encoding: ' + encoding);
  }
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters. CESU-8 is handled as part of the UTF-8 encoding.
//
// @TODO Handling all encodings inside a single object makes it very difficult
// to reason about this code, so it should be split up in the future.
// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
// points as used by CESU-8.
var StringDecoder = exports.s = function(encoding) {
  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
  assertEncoding(encoding);
  switch (this.encoding) {
    case 'utf8':
      // CESU-8 represents each of Surrogate Pair by 3-bytes
      this.surrogateSize = 3;
      break;
    case 'ucs2':
    case 'utf16le':
      // UTF-16 represents each of Surrogate Pair by 2-bytes
      this.surrogateSize = 2;
      this.detectIncompleteChar = utf16DetectIncompleteChar;
      break;
    case 'base64':
      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
      this.surrogateSize = 3;
      this.detectIncompleteChar = base64DetectIncompleteChar;
      break;
    default:
      this.write = passThroughWrite;
      return;
  }

  // Enough space to store all bytes of a single character. UTF-8 needs 4
  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
  this.charBuffer = new Buffer(6);
  // Number of bytes received for the current incomplete multi-byte character.
  this.charReceived = 0;
  // Number of bytes expected for the current incomplete multi-byte character.
  this.charLength = 0;
};


// write decodes the given buffer and returns it as JS string that is
// guaranteed to not contain any partial multi-byte characters. Any partial
// character found at the end of the buffer is buffered up, and will be
// returned when calling write again with the remaining bytes.
//
// Note: Converting a Buffer containing an orphan surrogate to a String
// currently works, but converting a String to a Buffer (via `new Buffer`, or
// Buffer#write) will replace incomplete surrogates with the unicode
// replacement character. See https://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
  var charStr = '';
  // if our last write ended with an incomplete multibyte character
  while (this.charLength) {
    // determine how many remaining bytes this buffer has to offer for this char
    var available = (buffer.length >= this.charLength - this.charReceived) ?
        this.charLength - this.charReceived :
        buffer.length;

    // add the new bytes to the char buffer
    buffer.copy(this.charBuffer, this.charReceived, 0, available);
    this.charReceived += available;

    if (this.charReceived < this.charLength) {
      // still not enough chars in this buffer? wait for more ...
      return '';
    }

    // remove bytes belonging to the current character from the buffer
    buffer = buffer.slice(available, buffer.length);

    // get the character that was split
    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);

    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
    var charCode = charStr.charCodeAt(charStr.length - 1);
    if (charCode >= 0xD800 && charCode <= 0xDBFF) {
      this.charLength += this.surrogateSize;
      charStr = '';
      continue;
    }
    this.charReceived = this.charLength = 0;

    // if there are no more bytes in this buffer, just emit our char
    if (buffer.length === 0) {
      return charStr;
    }
    break;
  }

  // determine and set charLength / charReceived
  this.detectIncompleteChar(buffer);

  var end = buffer.length;
  if (this.charLength) {
    // buffer the incomplete character bytes we got
    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
    end -= this.charReceived;
  }

  charStr += buffer.toString(this.encoding, 0, end);

  var end = charStr.length - 1;
  var charCode = charStr.charCodeAt(end);
  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
  if (charCode >= 0xD800 && charCode <= 0xDBFF) {
    var size = this.surrogateSize;
    this.charLength += size;
    this.charReceived += size;
    this.charBuffer.copy(this.charBuffer, size, 0, size);
    buffer.copy(this.charBuffer, 0, 0, size);
    return charStr.substring(0, end);
  }

  // or just emit the charStr
  return charStr;
};

// detectIncompleteChar determines if there is an incomplete UTF-8 character at
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
// that are available for this character.
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
  // determine how many bytes we have to check at the end of this buffer
  var i = (buffer.length >= 3) ? 3 : buffer.length;

  // Figure out if one of the last i bytes of our buffer announces an
  // incomplete char.
  for (; i > 0; i--) {
    var c = buffer[buffer.length - i];

    // See http://en.wikipedia.org/wiki/UTF-8#Description

    // 110XXXXX
    if (i == 1 && c >> 5 == 0x06) {
      this.charLength = 2;
      break;
    }

    // 1110XXXX
    if (i <= 2 && c >> 4 == 0x0E) {
      this.charLength = 3;
      break;
    }

    // 11110XXX
    if (i <= 3 && c >> 3 == 0x1E) {
      this.charLength = 4;
      break;
    }
  }
  this.charReceived = i;
};

StringDecoder.prototype.end = function(buffer) {
  var res = '';
  if (buffer && buffer.length)
    res = this.write(buffer);

  if (this.charReceived) {
    var cr = this.charReceived;
    var buf = this.charBuffer;
    var enc = this.encoding;
    res += buf.slice(0, cr).toString(enc);
  }

  return res;
};

function passThroughWrite(buffer) {
  return buffer.toString(this.encoding);
}

function utf16DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 2;
  this.charLength = this.charReceived ? 2 : 0;
}

function base64DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 3;
  this.charLength = this.charReceived ? 3 : 0;
}


/***/ }),

/***/ 789804:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var util = __webpack_require__(660113)
var WriteError = __webpack_require__(818834).WriteError
var getOptions = util.getOptions
var dispatchError = util.dispatchError

function Batch (levelup, codec) {
  this._levelup = levelup
  this._codec = codec
  this.batch = levelup.db.batch()
  this.ops = []
  this.length = 0
}

Batch.prototype.put = function (key_, value_, options) {
  options = getOptions(options)

  var key = this._codec.encodeKey(key_, options)
  var value = this._codec.encodeValue(value_, options)

  try {
    this.batch.put(key, value)
  } catch (e) {
    throw new WriteError(e)
  }

  this.ops.push({ type: 'put', key: key, value: value })
  this.length++

  return this
}

Batch.prototype.del = function (key_, options) {
  options = getOptions(options)

  var key = this._codec.encodeKey(key_, options)

  try {
    this.batch.del(key)
  } catch (err) {
    throw new WriteError(err)
  }

  this.ops.push({ type: 'del', key: key })
  this.length++

  return this
}

Batch.prototype.clear = function () {
  try {
    this.batch.clear()
  } catch (err) {
    throw new WriteError(err)
  }

  this.ops = []
  this.length = 0

  return this
}

Batch.prototype.write = function (callback) {
  var levelup = this._levelup
  var ops = this.ops

  try {
    this.batch.write(function (err) {
      if (err) { return dispatchError(levelup, new WriteError(err), callback) }
      levelup.emit('batch', ops)
      if (callback) { callback() }
    })
  } catch (err) {
    throw new WriteError(err)
  }
}

module.exports = Batch


/***/ }),

/***/ 704603:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var LevelUPError = __webpack_require__(818834).LevelUPError
var format = __webpack_require__(431669).format
var leveldown

function getLevelDOWN () {
  if (leveldown) { return leveldown }

  var requiredVersion = __webpack_require__(697666)/* .devDependencies.leveldown */ .v6.ct
  var leveldownVersion

  try {
    leveldownVersion = __webpack_require__(867766)/* .version */ .i8
  } catch (e) {
    throw requireError(e)
  }

  if (!__webpack_require__(2728).satisfies(leveldownVersion, requiredVersion)) {
    throw new LevelUPError(
        'Installed version of LevelDOWN (' +
      leveldownVersion +
      ') does not match required version (' +
      requiredVersion +
      ')'
    )
  }

  try {
    leveldown = __webpack_require__(190717)
    return leveldown
  } catch (e) {
    throw requireError(e)
  }
}

function requireError (e) {
  var template = 'Failed to require LevelDOWN (%s). Try `npm install leveldown` if it\'s missing'
  return new LevelUPError(format(template, e.message))
}

module.exports = getLevelDOWN


/***/ }),

/***/ 430542:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var EventEmitter = __webpack_require__(128614).EventEmitter
var inherits = __webpack_require__(431669).inherits
var deprecate = __webpack_require__(431669).deprecate
var extend = __webpack_require__(718719)
var prr = __webpack_require__(590233)
var DeferredLevelDOWN = __webpack_require__(735797)
var IteratorStream = __webpack_require__(640915)
var Batch = __webpack_require__(789804)
var Codec = __webpack_require__(133132)
var getLevelDOWN = __webpack_require__(704603)
var errors = __webpack_require__(818834)
var util = __webpack_require__(660113)

var WriteError = errors.WriteError
var ReadError = errors.ReadError
var NotFoundError = errors.NotFoundError
var OpenError = errors.OpenError
var EncodingError = errors.EncodingError
var InitializationError = errors.InitializationError
var LevelUPError = errors.LevelUPError

var getOptions = util.getOptions
var defaultOptions = util.defaultOptions
var dispatchError = util.dispatchError

function getCallback (options, callback) {
  return typeof options === 'function' ? options : callback
}

// Possible LevelUP#_status values:
//  - 'new'     - newly created, not opened or closed
//  - 'opening' - waiting for the database to be opened, post open()
//  - 'open'    - successfully opened the database, available for use
//  - 'closing' - waiting for the database to be closed, post close()
//  - 'closed'  - database has been successfully closed, should not be
//                 used except for another open() operation

function LevelUP (location, options, callback) {
  if (!(this instanceof LevelUP)) { return new LevelUP(location, options, callback) }

  var error

  EventEmitter.call(this)
  this.setMaxListeners(Infinity)

  if (typeof location === 'function') {
    options = typeof options === 'object' ? options : {}
    options.db = location
    location = null
  } else if (typeof location === 'object' && typeof location.db === 'function') {
    options = location
    location = null
  }

  if (typeof options === 'function') {
    callback = options
    options = {}
  }

  if ((!options || typeof options.db !== 'function') && typeof location !== 'string') {
    error = new InitializationError(
        'Must provide a location for the database')
    if (callback) {
      return process.nextTick(function () {
        callback(error)
      })
    }
    throw error
  }

  options = getOptions(options)
  this.options = extend(defaultOptions, options)
  this._codec = new Codec(this.options)
  this._status = 'new'
  // set this.location as enumerable but not configurable or writable
  prr(this, 'location', location, 'e')

  this.open(callback)
}

inherits(LevelUP, EventEmitter)

LevelUP.prototype.open = function (callback) {
  var self = this
  var dbFactory
  var db

  if (this.isOpen()) {
    if (callback) { process.nextTick(function () { callback(null, self) }) }
    return this
  }

  if (this._isOpening()) {
    return callback && this.once('open', function () { callback(null, self) })
  }

  this.emit('opening')
  this._status = 'opening'
  this.db = new DeferredLevelDOWN(this.location)

  if (typeof this.options.db !== 'function' &&
      typeof getLevelDOWN !== 'function') {
    throw new LevelUPError('missing db factory, you need to set options.db')
  }

  dbFactory = this.options.db || getLevelDOWN()
  db = dbFactory(this.location)

  db.open(this.options, function (err) {
    if (err) {
      return dispatchError(self, new OpenError(err), callback)
    }
    self.db.setDb(db)
    self.db = db
    self._status = 'open'
    if (callback) { callback(null, self) }
    self.emit('open')
    self.emit('ready')
  })
}

LevelUP.prototype.close = function (callback) {
  var self = this

  if (this.isOpen()) {
    this._status = 'closing'
    this.db.close(function () {
      self._status = 'closed'
      self.emit('closed')
      if (callback) { callback.apply(null, arguments) }
    })
    this.emit('closing')
    this.db = new DeferredLevelDOWN(this.location)
  } else if (this._status === 'closed' && callback) {
    return process.nextTick(callback)
  } else if (this._status === 'closing' && callback) {
    this.once('closed', callback)
  } else if (this._isOpening()) {
    this.once('open', function () {
      self.close(callback)
    })
  }
}

LevelUP.prototype.isOpen = function () {
  return this._status === 'open'
}

LevelUP.prototype._isOpening = function () {
  return this._status === 'opening'
}

LevelUP.prototype.isClosed = function () {
  return (/^clos/).test(this._status)
}

function maybeError (db, options, callback) {
  if (!db._isOpening() && !db.isOpen()) {
    dispatchError(db, new ReadError('Database is not open'), callback)
    return true
  }
}

function writeError (db, message, callback) {
  dispatchError(db, new WriteError(message), callback)
}

function readError (db, message, callback) {
  dispatchError(db, new ReadError(message), callback)
}

LevelUP.prototype.get = function (key_, options, callback) {
  var self = this
  var key

  callback = getCallback(options, callback)

  if (maybeError(this, options, callback)) { return }

  if (key_ === null || key_ === undefined || typeof callback !== 'function') {
    return readError(this, 'get() requires key and callback arguments', callback)
  }

  options = util.getOptions(options)
  key = this._codec.encodeKey(key_, options)

  options.asBuffer = this._codec.valueAsBuffer(options)

  this.db.get(key, options, function (err, value) {
    if (err) {
      if ((/notfound/i).test(err) || err.notFound) {
        err = new NotFoundError(
            'Key not found in database [' + key_ + ']', err)
      } else {
        err = new ReadError(err)
      }
      return dispatchError(self, err, callback)
    }
    if (callback) {
      try {
        value = self._codec.decodeValue(value, options)
      } catch (e) {
        return callback(new EncodingError(e))
      }
      callback(null, value)
    }
  })
}

LevelUP.prototype.put = function (key_, value_, options, callback) {
  var self = this
  var key
  var value

  callback = getCallback(options, callback)

  if (key_ === null || key_ === undefined) { return writeError(this, 'put() requires a key argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  key = this._codec.encodeKey(key_, options)
  value = this._codec.encodeValue(value_, options)

  this.db.put(key, value, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('put', key_, value_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.del = function (key_, options, callback) {
  var self = this
  var key

  callback = getCallback(options, callback)

  if (key_ === null || key_ === undefined) { return writeError(this, 'del() requires a key argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  key = this._codec.encodeKey(key_, options)

  this.db.del(key, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('del', key_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.batch = function (arr_, options, callback) {
  var self = this
  var arr

  if (!arguments.length) { return new Batch(this, this._codec) }

  callback = getCallback(options, callback)

  if (!Array.isArray(arr_)) { return writeError(this, 'batch() requires an array argument', callback) }

  if (maybeError(this, options, callback)) { return }

  options = getOptions(options)
  arr = self._codec.encodeBatch(arr_, options)
  arr = arr.map(function (op) {
    if (!op.type && op.key !== undefined && op.value !== undefined) { op.type = 'put' }
    return op
  })

  this.db.batch(arr, options, function (err) {
    if (err) {
      return dispatchError(self, new WriteError(err), callback)
    }
    self.emit('batch', arr_)
    if (callback) { callback() }
  })
}

LevelUP.prototype.approximateSize = deprecate(function (start_, end_, options, callback) {
  var self = this
  var start
  var end

  callback = getCallback(options, callback)

  options = getOptions(options)

  if (start_ === null || start_ === undefined || end_ === null ||
      end_ === undefined || typeof callback !== 'function') {
    return readError(this, 'approximateSize() requires start, end and callback arguments', callback)
  }

  start = this._codec.encodeKey(start_, options)
  end = this._codec.encodeKey(end_, options)

  this.db.approximateSize(start, end, function (err, size) {
    if (err) {
      return dispatchError(self, new OpenError(err), callback)
    } else if (callback) {
      callback(null, size)
    }
  })
}, 'db.approximateSize() is deprecated. Use db.db.approximateSize() instead')

LevelUP.prototype.readStream =
LevelUP.prototype.createReadStream = function (options) {
  options = extend({keys: true, values: true}, this.options, options)

  options.keyEncoding = options.keyEncoding
  options.valueEncoding = options.valueEncoding

  options = this._codec.encodeLtgt(options)
  options.keyAsBuffer = this._codec.keyAsBuffer(options)
  options.valueAsBuffer = this._codec.valueAsBuffer(options)

  if (typeof options.limit !== 'number') { options.limit = -1 }

  return new IteratorStream(this.db.iterator(options), extend(options, {
    decoder: this._codec.createStreamDecoder(options)
  }))
}

LevelUP.prototype.keyStream =
LevelUP.prototype.createKeyStream = function (options) {
  return this.createReadStream(extend(options, { keys: true, values: false }))
}

LevelUP.prototype.valueStream =
LevelUP.prototype.createValueStream = function (options) {
  return this.createReadStream(extend(options, { keys: false, values: true }))
}

LevelUP.prototype.toString = function () {
  return 'LevelUP'
}

function utilStatic (name) {
  return function (location, callback) {
    getLevelDOWN()[name](location, callback || function () {})
  }
}

module.exports = LevelUP
module.exports.errors = __webpack_require__(818834)
module.exports.destroy = deprecate(
  utilStatic('destroy'),
  'levelup.destroy() is deprecated. Use leveldown.destroy() instead'
)
module.exports.repair = deprecate(
  utilStatic('repair'),
  'levelup.repair() is deprecated. Use leveldown.repair() instead'
)


/***/ }),

/***/ 660113:
/***/ ((module) => {

/* Copyright (c) 2012-2016 LevelUP contributors
 * See list at <https://github.com/level/levelup#contributing>
 * MIT License
 * <https://github.com/level/levelup/blob/master/LICENSE.md>
 */

var defaultOptions = {
  createIfMissing: true,
  errorIfExists: false,
  keyEncoding: 'utf8',
  valueEncoding: 'utf8',
  compression: true
}

function getOptions (options) {
  if (typeof options === 'string') { options = { valueEncoding: options } }
  if (typeof options !== 'object') { options = {} }
  return options
}

function dispatchError (db, error, callback) {
  typeof callback === 'function' ? callback(error) : db.emit('error', error)
}

function isDefined (v) {
  return typeof v !== 'undefined'
}

module.exports = {
  defaultOptions: defaultOptions,
  getOptions: getOptions,
  dispatchError: dispatchError,
  isDefined: isDefined
}


/***/ }),

/***/ 718719:
/***/ ((module) => {

module.exports = extend

var hasOwnProperty = Object.prototype.hasOwnProperty;

function extend() {
    var target = {}

    for (var i = 0; i < arguments.length; i++) {
        var source = arguments[i]

        for (var key in source) {
            if (hasOwnProperty.call(source, key)) {
                target[key] = source[key]
            }
        }
    }

    return target
}


/***/ }),

/***/ 697666:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"v6\":{\"ct\":\"^1.1.0\"}}");

/***/ }),

/***/ 112302:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const assert = __webpack_require__(742357)
const levelup = __webpack_require__(430542)
const memdown = __webpack_require__(87449)
const async = __webpack_require__(417997)
const rlp = __webpack_require__(6636)
const ethUtil = __webpack_require__(880427)
const semaphore = __webpack_require__(80045)
const TrieNode = __webpack_require__(651090)
const ReadStream = __webpack_require__(394903)
const PrioritizedTaskExecutor = __webpack_require__(672202)
const matchingNibbleLength = __webpack_require__(934439).matchingNibbleLength
const doKeysMatch = __webpack_require__(934439).doKeysMatch
const callTogether = __webpack_require__(934439).callTogether
const asyncFirstSeries = __webpack_require__(934439).asyncFirstSeries

module.exports = Trie

/**
 * Use `require('merkel-patricia-tree')` for the base interface. In Ethereum applications stick with the Secure Trie Overlay `require('merkel-patricia-tree/secure')`. The API for the raw and the secure interface are about the same
 * @class Trie
 * @param {Object} [db] An instance of [levelup](https://github.com/rvagg/node-levelup/) or a compatible API. If the db is `null` or left undefined, then the trie will be stored in memory via [memdown](https://github.com/rvagg/memdown)
 * @param {Buffer|String} [root]` A hex `String` or `Buffer` for the root of a previously stored trie
 * @prop {Buffer} root The current root of the `trie`
 * @prop {Boolean} isCheckpoint  determines if you are saving to a checkpoint or directly to the db
 * @prop {Buffer} EMPTY_TRIE_ROOT the Root for an empty trie
 */
function Trie (db, root) {
  var self = this
  this.EMPTY_TRIE_ROOT = ethUtil.SHA3_RLP
  this.sem = semaphore(1)

  // setup dbs
  this.db = db ||
    levelup('', {
      db: memdown
    })

  this._getDBs = [this.db]
  this._putDBs = [this.db]

  Object.defineProperty(this, 'root', {
    set: function (value) {
      if (value) {
        value = ethUtil.toBuffer(value)
        assert(value.length === 32, 'Invalid root length. Roots are 32 bytes')
      } else {
        value = self.EMPTY_TRIE_ROOT
      }

      this._root = value
    },
    get: function () {
      return this._root
    }
  })

  this.root = root
}

/**
 * Gets a value given a `key`
 * @method get
 * @param {Buffer|String} key - the key to search for
 * @param {Function} cb A callback `Function` which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`
 */
Trie.prototype.get = function (key, cb) {
  var self = this

  key = ethUtil.toBuffer(key)

  self.findPath(key, function (err, node, remainder, stack) {
    var value = null
    if (node && remainder.length === 0) {
      value = node.value
    }

    cb(err, value)
  })
}

/**
 * Stores a given `value` at the given `key`
 * @method put
 * @param {Buffer|String} key
 * @param {Buffer|String} Value
 * @param {Function} cb A callback `Function` which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.put = function (key, value, cb) {
  var self = this

  key = ethUtil.toBuffer(key)
  value = ethUtil.toBuffer(value)

  if (!value || value.toString() === '') {
    self.del(key, cb)
  } else {
    cb = callTogether(cb, self.sem.leave)

    self.sem.take(function () {
      if (self.root.toString('hex') !== ethUtil.SHA3_RLP.toString('hex')) {
        // first try to find the give key or its nearst node
        self.findPath(key, function (err, foundValue, keyRemainder, stack) {
          if (err) {
            return cb(err)
          }
          // then update
          self._updateNode(key, value, keyRemainder, stack, cb)
        })
      } else {
        self._createInitialNode(key, value, cb) // if no root initialize this trie
      }
    })
  }
}

/**
 * deletes a value given a `key`
 * @method del
 * @param {Buffer|String} key
 * @param {Function} callback the callback `Function`
 */
Trie.prototype.del = function (key, cb) {
  var self = this

  key = ethUtil.toBuffer(key)
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    self.findPath(key, function (err, foundValue, keyRemainder, stack) {
      if (err) {
        return cb(err)
      }
      if (foundValue) {
        self._deleteNode(key, stack, cb)
      } else {
        cb()
      }
    })
  })
}

/**
 * Retrieves a raw value in the underlying db
 * @method getRaw
 * @param {Buffer} key
 * @param {Function} callback A callback `Function`, which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`.
 */
Trie.prototype.getRaw = function (key, cb) {
  key = ethUtil.toBuffer(key)

  function dbGet (db, cb2) {
    db.get(key, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, function (err, foundNode) {
      if (err || !foundNode) {
        cb2(null, null)
      } else {
        cb2(null, foundNode)
      }
    })
  }
  asyncFirstSeries(this._getDBs, dbGet, cb)
}

// retrieves a node from dbs by hash
Trie.prototype._lookupNode = function (node, cb) {
  if (TrieNode.isRawNode(node)) {
    cb(new TrieNode(node))
  } else {
    this.getRaw(node, function (err, value) {
      if (err) {
        throw err
      }

      if (value) {
        value = new TrieNode(rlp.decode(value))
      }

      cb(value)
    })
  }
}

// TODO: remove the proxy method when changing the caching
Trie.prototype._putRaw = function (key, val, cb) {
  function dbPut (db, cb2) {
    db.put(key, val, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb2)
  }
  async.each(this._putDBs, dbPut, cb)
}

/**
 * Writes a value directly to the underlining db
 * @method putRaw
 * @param {Buffer|String} key The key as a `Buffer` or `String`
 * @param {Buffer} value The value to be stored
 * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.putRaw = Trie.prototype._putRaw

/**
 * Removes a raw value in the underlying db
 * @method delRaw
 * @param {Buffer|String} key
 * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
 */
Trie.prototype.delRaw = function (key, cb) {
  function del (db, cb2) {
    db.del(key, {
      keyEncoding: 'binary'
    }, cb2)
  }
  async.each(this._putDBs, del, cb)
}

// writes a single node to dbs
Trie.prototype._putNode = function (node, cb) {
  var hash = node.hash()
  var serialized = node.serialize()
  this._putRaw(hash, serialized, cb)
}

// writes many nodes to db
Trie.prototype._batchNodes = function (opStack, cb) {
  function dbBatch (db, cb) {
    db.batch(opStack, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb)
  }

  async.each(this._putDBs, dbBatch, cb)
}

/**
 * Trys to find a path to the node for the given key
 * It returns a `stack` of nodes to the closet node
 * @method findPath
 * @param {String|Buffer} - key - the search key
 * @param {Function} - cb - the callback function. Its is given the following
 * arguments
 *  - err - any errors encontered
 *  - node - the last node found
 *  - keyRemainder - the remaining key nibbles not accounted for
 *  - stack - an array of nodes that forms the path to node we are searching for
 */

Trie.prototype.findPath = function (targetKey, cb) {
  var self = this
  var root = self.root
  var stack = []
  targetKey = TrieNode.stringToNibbles(targetKey)

  this._walkTrie(root, processNode, cb)

  function processNode (nodeRef, node, keyProgress, walkController) {
    var nodeKey = node.key || []
    var keyRemainder = targetKey.slice(matchingNibbleLength(keyProgress, targetKey))
    var matchingLen = matchingNibbleLength(keyRemainder, nodeKey)

    stack.push(node)

    if (node.type === 'branch') {
      if (keyRemainder.length === 0) {
        walkController.return(null, node, [], stack)
      // we exhausted the key without finding a node
      } else {
        var branchIndex = keyRemainder[0]
        var branchNode = node.getValue(branchIndex)
        if (!branchNode) {
          // there are no more nodes to find and we didn't find the key
          walkController.return(null, null, keyRemainder, stack)
        } else {
          // node found, continuing search
          walkController.only(branchIndex)
        }
      }
    } else if (node.type === 'leaf') {
      if (doKeysMatch(keyRemainder, nodeKey)) {
        // keys match, return node with empty key
        walkController.return(null, node, [], stack)
      } else {
        // reached leaf but keys dont match
        walkController.return(null, null, keyRemainder, stack)
      }
    } else if (node.type === 'extention') {
      if (matchingLen !== nodeKey.length) {
        // keys dont match, fail
        walkController.return(null, null, keyRemainder, stack)
      } else {
        // keys match, continue search
        walkController.next()
      }
    }
  }
}

/*
 * Finds all nodes that store k,v values
 */
Trie.prototype._findNode = function (key, root, stack, cb) {
  this.findPath(key, function () {
    cb.apply(null, arguments)
  })
}

/*
 * Finds all nodes that store k,v values
 */
Trie.prototype._findValueNodes = function (onFound, cb) {
  this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
    var fullKey = key

    if (node.key) {
      fullKey = key.concat(node.key)
    }

    if (node.type === 'leaf') {
      // found leaf node!
      onFound(nodeRef, node, fullKey, walkController.next)
    } else if (node.type === 'branch' && node.value) {
      // found branch with value
      onFound(nodeRef, node, fullKey, walkController.next)
    } else {
      // keep looking for value nodes
      walkController.next()
    }
  }, cb)
}

/*
 * Finds all nodes that are stored directly in the db
 * (some nodes are stored raw inside other nodes)
 */
Trie.prototype._findDbNodes = function (onFound, cb) {
  this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
    if (TrieNode.isRawNode(nodeRef)) {
      walkController.next()
    } else {
      onFound(nodeRef, node, key, walkController.next)
    }
  }, cb)
}

/**
 * Updates a node
 * @method _updateNode
 * @param {Buffer} key
 * @param {Buffer| String} value
 * @param {Array} keyRemainder
 * @param {Array} stack -
 * @param {Function} cb - the callback
 */
Trie.prototype._updateNode = function (key, value, keyRemainder, stack, cb) {
  var toSave = []
  var lastNode = stack.pop()

  // add the new nodes
  key = TrieNode.stringToNibbles(key)

  // Check if the last node is a leaf and the key matches to this
  var matchLeaf = false
  if (lastNode.type === 'leaf') {
    var l = 0
    for (var i = 0; i < stack.length; i++) {
      var n = stack[i]
      if (n.type === 'branch') {
        l++
      } else {
        l += n.key.length
      }
    }
    if ((matchingNibbleLength(lastNode.key, key.slice(l)) === lastNode.key.length) && (keyRemainder.length === 0)) {
      matchLeaf = true
    }
  }

  if (matchLeaf) {
    // just updating a found value
    lastNode.value = value
    stack.push(lastNode)
  } else if (lastNode.type === 'branch') {
    stack.push(lastNode)
    if (keyRemainder !== 0) {
      // add an extention to a branch node
      keyRemainder.shift()
      // create a new leaf
      var newLeaf = new TrieNode('leaf', keyRemainder, value)
      stack.push(newLeaf)
    } else {
      lastNode.value = value
    }
  } else {
    // create a branch node
    var lastKey = lastNode.key
    var matchingLength = matchingNibbleLength(lastKey, keyRemainder)
    var newBranchNode = new TrieNode('branch')

    // create a new extention node
    if (matchingLength !== 0) {
      var newKey = lastNode.key.slice(0, matchingLength)
      var newExtNode = new TrieNode('extention', newKey, value)
      stack.push(newExtNode)
      lastKey.splice(0, matchingLength)
      keyRemainder.splice(0, matchingLength)
    }

    stack.push(newBranchNode)

    if (lastKey.length !== 0) {
      var branchKey = lastKey.shift()
      if (lastKey.length !== 0 || lastNode.type === 'leaf') {
        // shriking extention or leaf
        lastNode.key = lastKey
        var formatedNode = this._formatNode(lastNode, false, toSave)
        newBranchNode.setValue(branchKey, formatedNode)
      } else {
        // remove extention or attaching
        this._formatNode(lastNode, false, true, toSave)
        newBranchNode.setValue(branchKey, lastNode.value)
      }
    } else {
      newBranchNode.value = lastNode.value
    }

    if (keyRemainder.length !== 0) {
      keyRemainder.shift()
      // add a leaf node to the new branch node
      var newLeafNode = new TrieNode('leaf', keyRemainder, value)
      stack.push(newLeafNode)
    } else {
      newBranchNode.value = value
    }
  }

  this._saveStack(key, stack, toSave, cb)
}

// walk tree

Trie.prototype._walkTrie = function (root, onNode, onDone) {
  var self = this
  root = root || self.root
  onDone = onDone || function () {}
  var aborted = false
  var returnValues = []

  if (root.toString('hex') === ethUtil.SHA3_RLP.toString('hex')) {
    return onDone()
  }

  self._lookupNode(root, function (node) {
    processNode(root, node, null, function (err) {
      if (err) {
        return onDone(err)
      }
      onDone.apply(null, returnValues)
    })
  })

  // the maximum pool size should be high enough to utilise the parallelizability of reading nodes from disk and
  // low enough to utilize the prioritisation of node lookup.
  var maxPoolSize = 500
  var taskExecutor = new PrioritizedTaskExecutor(maxPoolSize)

  function processNode (nodeRef, node, key, cb) {
    if (!node) return cb()
    if (aborted) return cb()
    var stopped = false
    key = key || []

    var walkController = {
      stop: function () {
        stopped = true
        cb()
      },
      // end all traversal and return values to the onDone cb
      return: function () {
        aborted = true
        returnValues = arguments
        cb()
      },
      next: function () {
        if (aborted) {
          return cb()
        }
        if (stopped) {
          return cb()
        }
        var children = node.getChildren()
        async.forEachOf(children, function (childData, index, cb) {
          var keyExtension = childData[0]
          var childRef = childData[1]
          var childKey = key.concat(keyExtension)
          var priority = childKey.length
          taskExecutor.execute(priority, function (taskCallback) {
            self._lookupNode(childRef, function (childNode) {
              taskCallback()
              processNode(childRef, childNode, childKey, cb)
            })
          })
        }, cb)
      },
      only: function (childIndex) {
        var childRef = node.getValue(childIndex)
        var childKey = key.slice()
        childKey.push(childIndex)
        var priority = childKey.length
        taskExecutor.execute(priority, function (taskCallback) {
          self._lookupNode(childRef, function (childNode) {
            taskCallback()
            processNode(childRef, childNode, childKey, cb)
          })
        })
      }
    }
    onNode(nodeRef, node, key, walkController)
  }
}

/**
 * saves a stack
 * @method _saveStack
 * @param {Array} key - the key. Should follow the stack
 * @param {Array} stack - a stack of nodes to the value given by the key
 * @param {Array} opStack - a stack of levelup operations to commit at the end of this funciton
 * @param {Function} cb
 */
Trie.prototype._saveStack = function (key, stack, opStack, cb) {
  var lastRoot

  // update nodes
  while (stack.length) {
    var node = stack.pop()
    if (node.type === 'leaf') {
      key.splice(key.length - node.key.length)
    } else if (node.type === 'extention') {
      key.splice(key.length - node.key.length)
      if (lastRoot) {
        node.value = lastRoot
      }
    } else if (node.type === 'branch') {
      if (lastRoot) {
        var branchKey = key.pop()
        node.setValue(branchKey, lastRoot)
      }
    }
    lastRoot = this._formatNode(node, stack.length === 0, opStack)
  }

  if (lastRoot) {
    this.root = lastRoot
  }

  this._batchNodes(opStack, cb)
}

Trie.prototype._deleteNode = function (key, stack, cb) {
  function processBranchNode (key, branchKey, branchNode, parentNode, stack) {
    // branchNode is the node ON the branch node not THE branch node
    var branchNodeKey = branchNode.key
    if (!parentNode || parentNode.type === 'branch') {
      // branch->?
      if (parentNode) {
        stack.push(parentNode)
      }

      if (branchNode.type === 'branch') {
        // create an extention node
        // branch->extention->branch
        var extentionNode = new TrieNode('extention', [branchKey], null)
        stack.push(extentionNode)
        key.push(branchKey)
      } else {
        // branch key is an extention or a leaf
        // branch->(leaf or extention)
        branchNodeKey.unshift(branchKey)
        branchNode.key = branchNodeKey

        // hackery. This is equvilant to array.concat except we need keep the
        // rerfance to the `key` that was passed in.
        branchNodeKey.unshift(0)
        branchNodeKey.unshift(key.length)
        key.splice.apply(key, branchNodeKey)
      }
      stack.push(branchNode)
    } else {
      // parent is a extention
      var parentKey = parentNode.key
      if (branchNode.type === 'branch') {
        // ext->branch
        parentKey.push(branchKey)
        key.push(branchKey)
        parentNode.key = parentKey
        stack.push(parentNode)
      } else {
        // branch node is an leaf or extention and parent node is an exstention
        // add two keys together
        // dont push the parent node
        branchNodeKey.unshift(branchKey)
        key = key.concat(branchNodeKey)
        parentKey = parentKey.concat(branchNodeKey)
        branchNode.key = parentKey
      }
      stack.push(branchNode)
    }

    return key
  }

  var lastNode = stack.pop()
  var parentNode = stack.pop()
  var opStack = []
  var self = this

  if (!Array.isArray(key)) {
    // convert key to nibbles
    key = TrieNode.stringToNibbles(key)
  }

  if (!parentNode) {
    // the root here has to be a leaf.
    this.root = this.EMPTY_TRIE_ROOT
    cb()
  } else {
    if (lastNode.type === 'branch') {
      lastNode.value = null
    } else {
      // the lastNode has to be a leaf if its not a branch. And a leaf's parent
      // if it has one must be a branch.
      var lastNodeKey = lastNode.key
      key.splice(key.length - lastNodeKey.length)
      // delete the value
      this._formatNode(lastNode, false, true, opStack)
      parentNode.setValue(key.pop(), null)
      lastNode = parentNode
      parentNode = stack.pop()
    }

    // nodes on the branch
    var branchNodes = []
    // count the number of nodes on the branch
    lastNode.raw.forEach(function (node, i) {
      var val = lastNode.getValue(i)
      if (val) branchNodes.push([i, val])
    })

    // if there is only one branch node left, collapse the branch node
    if (branchNodes.length === 1) {
      // add the one remaing branch node to node above it
      var branchNode = branchNodes[0][1]
      var branchNodeKey = branchNodes[0][0]

      // look up node
      this._lookupNode(branchNode, function (foundNode) {
        key = processBranchNode(key, branchNodeKey, foundNode, parentNode, stack, opStack)
        self._saveStack(key, stack, opStack, cb)
      })
    } else {
      // simple removing a leaf and recaluclation the stack
      if (parentNode) {
        stack.push(parentNode)
      }

      stack.push(lastNode)
      self._saveStack(key, stack, opStack, cb)
    }
  }
}

// Creates the initial node from an empty tree
Trie.prototype._createInitialNode = function (key, value, cb) {
  var newNode = new TrieNode('leaf', key, value)
  this.root = newNode.hash()
  this._putNode(newNode, cb)
}

// formats node to be saved by levelup.batch.
// returns either the hash that will be used key or the rawNode
Trie.prototype._formatNode = function (node, topLevel, remove, opStack) {
  if (arguments.length === 3) {
    opStack = remove
    remove = false
  }

  var rlpNode = node.serialize()
  if (rlpNode.length >= 32 || topLevel) {
    var hashRoot = node.hash()

    if (remove && this.isCheckpoint) {
      opStack.push({
        type: 'del',
        key: hashRoot
      })
    } else {
      opStack.push({
        type: 'put',
        key: hashRoot,
        value: rlpNode
      })
    }
    return hashRoot
  }
  return node.raw
}

/**
 * The `data` event is given an `Object` hat has two properties; the `key` and the `value`. Both should be Buffers.
 * @method createReadStream
 * @return {stream.Readable} Returns a [stream](https://nodejs.org/dist/latest-v5.x/docs/api/stream.html#stream_class_stream_readable) of the contents of the `trie`
 */
Trie.prototype.createReadStream = function () {
  return new ReadStream(this)
}

// creates a new trie backed by the same db
// and starting at the same root
Trie.prototype.copy = function () {
  return new Trie(this.db, this.root)
}

/**
 * The given hash of operations (key additions or deletions) are executed on the DB
 * @method batch
 * @example
 * var ops = [
 *    { type: 'del', key: 'father' }
 *  , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' }
 *  , { type: 'put', key: 'dob', value: '16 February 1941' }
 *  , { type: 'put', key: 'spouse', value: 'Kim Young-sook' }
 *  , { type: 'put', key: 'occupation', value: 'Clown' }
 * ]
 * trie.batch(ops)
 * @param {Array} ops
 * @param {Function} cb
 */
Trie.prototype.batch = function (ops, cb) {
  var self = this

  async.eachSeries(ops, function (op, cb2) {
    if (op.type === 'put') {
      self.put(op.key, op.value, cb2)
    } else if (op.type === 'del') {
      self.del(op.key, cb2)
    } else {
      cb2()
    }
  }, cb)
}

/**
 * Checks if a given root exists
 * @method checkRoot
 * @param {Buffer} root
 * @param {Function} cb
 */
Trie.prototype.checkRoot = function (root, cb) {
  root = ethUtil.toBuffer(root)
  this._lookupNode(root, function (value) {
    cb(null, !!value)
  })
}


/***/ }),

/***/ 265674:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const levelup = __webpack_require__(430542)
const memdown = __webpack_require__(87449)
const async = __webpack_require__(417997)
const inherits = __webpack_require__(431669).inherits
const Readable = __webpack_require__(861655).Readable
const levelws = __webpack_require__(857554)
const callTogether = __webpack_require__(934439).callTogether

module.exports = checkpointInterface

function checkpointInterface (trie) {
  this._scratch = null
  trie._checkpoints = []

  Object.defineProperty(trie, 'isCheckpoint', {
    get: function () {
      return !!trie._checkpoints.length
    }
  })

  // new methods
  trie.checkpoint = checkpoint
  trie.commit = commit
  trie.revert = revert
  trie._enterCpMode = _enterCpMode
  trie._exitCpMode = _exitCpMode
  trie.createScratchReadStream = createScratchReadStream

  // overwrites
  trie.copy = copy.bind(trie, trie.copy.bind(trie))
}

/**
 * Creates a checkpoint that can later be reverted to or committed. After this is called, no changes to the trie will be permanently saved until `commit` is called
 * @method checkpoint
 */
function checkpoint () {
  var self = this
  var wasCheckpoint = self.isCheckpoint
  self._checkpoints.push(self.root)
  if (!wasCheckpoint && self.isCheckpoint) {
    self._enterCpMode()
  }
}

/**
 * commits a checkpoint to disk
 * @method commit
 * @param {Function} cb the callback
 */
function commit (cb) {
  var self = this
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    if (self.isCheckpoint) {
      self._checkpoints.pop()
      if (!self.isCheckpoint) {
        self._exitCpMode(true, cb)
      } else {
        cb()
      }
    } else {
      throw new Error('trying to commit when not checkpointed')
    }
  })
}

/**
 * Reverts the trie to the state it was at when `checkpoint` was first called.
 * @method revert
 * @param {Function} cb the callback
 */
function revert (cb) {
  var self = this
  cb = callTogether(cb, self.sem.leave)

  self.sem.take(function () {
    if (self.isCheckpoint) {
      self.root = self._checkpoints.pop()
      if (!self.isCheckpoint) {
        self._exitCpMode(false, cb)
        return
      }
    }

    cb()
  })
}

// enter into checkpoint mode
function _enterCpMode () {
  this._scratch = levelup('', {
    db: memdown
  })
  this._getDBs = [this._scratch].concat(this._getDBs)
  this.__putDBs = this._putDBs
  this._putDBs = [this._scratch]
  this._putRaw = this.putRaw
  this.putRaw = putRaw
}

// exit from checkpoint mode
function _exitCpMode (commitState, cb) {
  var self = this
  var scratch = this._scratch
  this._scratch = null
  this._getDBs = this._getDBs.slice(1)
  this._putDBs = this.__putDBs
  this.putRaw = this._putRaw

  function flushScratch (db, cb) {
    if (!db.createWriteStream) {
      db = levelws(db)
    }

    self.createScratchReadStream(scratch)
      .pipe(db.createWriteStream())
      .on('close', cb)
  }

  if (commitState) {
    async.map(this._putDBs, flushScratch, cb)
  } else {
    cb()
  }
}

// adds the interface when copying the trie
function copy (_super) {
  var trie = _super()
  checkpointInterface.call(trie, trie)
  trie._scratch = this._scratch
  // trie._checkpoints = this._checkpoints.slice()
  return trie
}

function putRaw (key, val, cb) {
  function dbPut (db, cb2) {
    db.put(key, val, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb2)
  }
  async.each(this.__putDBs, dbPut, cb)
}

function createScratchReadStream (scratch) {
  var trie = this.copy()
  scratch = scratch || this._scratch
  // only read from the scratch
  trie._getDBs = [scratch]
  trie._scratch = scratch
  return new ScratchReadStream(trie)
}

// ScratchReadStream
// this is used to minimally dump the scratch into the db

inherits(ScratchReadStream, Readable)

function ScratchReadStream (trie) {
  this.trie = trie
  this.next = null
  Readable.call(this, {
    objectMode: true
  })
}

ScratchReadStream.prototype._read = function () {
  var self = this
  if (!self._started) {
    self._started = true
    self.trie._findDbNodes(function (nodeRef, node, key, next) {
      self.push({
        key: nodeRef,
        value: node.serialize()
      })
      next()
    }, function () {
      // close stream
      self.push(null)
    })
  }
}


/***/ }),

/***/ 975984:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const BaseTrie = __webpack_require__(112302)
const checkpointInterface = __webpack_require__(265674)
const inherits = __webpack_require__(431669).inherits
const proof = __webpack_require__(821606)

module.exports = CheckpointTrie

inherits(CheckpointTrie, BaseTrie)

function CheckpointTrie () {
  BaseTrie.apply(this, arguments)
  checkpointInterface.call(this, this)
}

CheckpointTrie.prove = proof.prove
CheckpointTrie.verifyProof = proof.verifyProof


/***/ }),

/***/ 417997:
/***/ ((module, exports) => {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 * async
 * https://github.com/caolan/async
 *
 * Copyright 2010-2014 Caolan McMahon
 * Released under the MIT license
 */
(function () {

    var async = {};
    function noop() {}
    function identity(v) {
        return v;
    }
    function toBool(v) {
        return !!v;
    }
    function notId(v) {
        return !v;
    }

    // global on the server, window in the browser
    var previous_async;

    // Establish the root object, `window` (`self`) in the browser, `global`
    // on the server, or `this` in some virtual machines. We use `self`
    // instead of `window` for `WebWorker` support.
    var root = typeof self === 'object' && self.self === self && self ||
            typeof global === 'object' && global.global === global && global ||
            this;

    if (root != null) {
        previous_async = root.async;
    }

    async.noConflict = function () {
        root.async = previous_async;
        return async;
    };

    function only_once(fn) {
        return function() {
            if (fn === null) throw new Error("Callback was already called.");
            fn.apply(this, arguments);
            fn = null;
        };
    }

    function _once(fn) {
        return function() {
            if (fn === null) return;
            fn.apply(this, arguments);
            fn = null;
        };
    }

    //// cross-browser compatiblity functions ////

    var _toString = Object.prototype.toString;

    var _isArray = Array.isArray || function (obj) {
        return _toString.call(obj) === '[object Array]';
    };

    // Ported from underscore.js isObject
    var _isObject = function(obj) {
        var type = typeof obj;
        return type === 'function' || type === 'object' && !!obj;
    };

    function _isArrayLike(arr) {
        return _isArray(arr) || (
            // has a positive integer length property
            typeof arr.length === "number" &&
            arr.length >= 0 &&
            arr.length % 1 === 0
        );
    }

    function _arrayEach(arr, iterator) {
        var index = -1,
            length = arr.length;

        while (++index < length) {
            iterator(arr[index], index, arr);
        }
    }

    function _map(arr, iterator) {
        var index = -1,
            length = arr.length,
            result = Array(length);

        while (++index < length) {
            result[index] = iterator(arr[index], index, arr);
        }
        return result;
    }

    function _range(count) {
        return _map(Array(count), function (v, i) { return i; });
    }

    function _reduce(arr, iterator, memo) {
        _arrayEach(arr, function (x, i, a) {
            memo = iterator(memo, x, i, a);
        });
        return memo;
    }

    function _forEachOf(object, iterator) {
        _arrayEach(_keys(object), function (key) {
            iterator(object[key], key);
        });
    }

    function _indexOf(arr, item) {
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] === item) return i;
        }
        return -1;
    }

    var _keys = Object.keys || function (obj) {
        var keys = [];
        for (var k in obj) {
            if (obj.hasOwnProperty(k)) {
                keys.push(k);
            }
        }
        return keys;
    };

    function _keyIterator(coll) {
        var i = -1;
        var len;
        var keys;
        if (_isArrayLike(coll)) {
            len = coll.length;
            return function next() {
                i++;
                return i < len ? i : null;
            };
        } else {
            keys = _keys(coll);
            len = keys.length;
            return function next() {
                i++;
                return i < len ? keys[i] : null;
            };
        }
    }

    // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
    // This accumulates the arguments passed into an array, after a given index.
    // From underscore.js (https://github.com/jashkenas/underscore/pull/2140).
    function _restParam(func, startIndex) {
        startIndex = startIndex == null ? func.length - 1 : +startIndex;
        return function() {
            var length = Math.max(arguments.length - startIndex, 0);
            var rest = Array(length);
            for (var index = 0; index < length; index++) {
                rest[index] = arguments[index + startIndex];
            }
            switch (startIndex) {
                case 0: return func.call(this, rest);
                case 1: return func.call(this, arguments[0], rest);
            }
            // Currently unused but handle cases outside of the switch statement:
            // var args = Array(startIndex + 1);
            // for (index = 0; index < startIndex; index++) {
            //     args[index] = arguments[index];
            // }
            // args[startIndex] = rest;
            // return func.apply(this, args);
        };
    }

    function _withoutIndex(iterator) {
        return function (value, index, callback) {
            return iterator(value, callback);
        };
    }

    //// exported async module functions ////

    //// nextTick implementation with browser-compatible fallback ////

    // capture the global reference to guard against fakeTimer mocks
    var _setImmediate = typeof setImmediate === 'function' && setImmediate;

    var _delay = _setImmediate ? function(fn) {
        // not a direct alias for IE10 compatibility
        _setImmediate(fn);
    } : function(fn) {
        setTimeout(fn, 0);
    };

    if (typeof process === 'object' && typeof process.nextTick === 'function') {
        async.nextTick = process.nextTick;
    } else {
        async.nextTick = _delay;
    }
    async.setImmediate = _setImmediate ? _delay : async.nextTick;


    async.forEach =
    async.each = function (arr, iterator, callback) {
        return async.eachOf(arr, _withoutIndex(iterator), callback);
    };

    async.forEachSeries =
    async.eachSeries = function (arr, iterator, callback) {
        return async.eachOfSeries(arr, _withoutIndex(iterator), callback);
    };


    async.forEachLimit =
    async.eachLimit = function (arr, limit, iterator, callback) {
        return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback);
    };

    async.forEachOf =
    async.eachOf = function (object, iterator, callback) {
        callback = _once(callback || noop);
        object = object || [];

        var iter = _keyIterator(object);
        var key, completed = 0;

        while ((key = iter()) != null) {
            completed += 1;
            iterator(object[key], key, only_once(done));
        }

        if (completed === 0) callback(null);

        function done(err) {
            completed--;
            if (err) {
                callback(err);
            }
            // Check key is null in case iterator isn't exhausted
            // and done resolved synchronously.
            else if (key === null && completed <= 0) {
                callback(null);
            }
        }
    };

    async.forEachOfSeries =
    async.eachOfSeries = function (obj, iterator, callback) {
        callback = _once(callback || noop);
        obj = obj || [];
        var nextKey = _keyIterator(obj);
        var key = nextKey();
        function iterate() {
            var sync = true;
            if (key === null) {
                return callback(null);
            }
            iterator(obj[key], key, only_once(function (err) {
                if (err) {
                    callback(err);
                }
                else {
                    key = nextKey();
                    if (key === null) {
                        return callback(null);
                    } else {
                        if (sync) {
                            async.setImmediate(iterate);
                        } else {
                            iterate();
                        }
                    }
                }
            }));
            sync = false;
        }
        iterate();
    };



    async.forEachOfLimit =
    async.eachOfLimit = function (obj, limit, iterator, callback) {
        _eachOfLimit(limit)(obj, iterator, callback);
    };

    function _eachOfLimit(limit) {

        return function (obj, iterator, callback) {
            callback = _once(callback || noop);
            obj = obj || [];
            var nextKey = _keyIterator(obj);
            if (limit <= 0) {
                return callback(null);
            }
            var done = false;
            var running = 0;
            var errored = false;

            (function replenish () {
                if (done && running <= 0) {
                    return callback(null);
                }

                while (running < limit && !errored) {
                    var key = nextKey();
                    if (key === null) {
                        done = true;
                        if (running <= 0) {
                            callback(null);
                        }
                        return;
                    }
                    running += 1;
                    iterator(obj[key], key, only_once(function (err) {
                        running -= 1;
                        if (err) {
                            callback(err);
                            errored = true;
                        }
                        else {
                            replenish();
                        }
                    }));
                }
            })();
        };
    }


    function doParallel(fn) {
        return function (obj, iterator, callback) {
            return fn(async.eachOf, obj, iterator, callback);
        };
    }
    function doParallelLimit(fn) {
        return function (obj, limit, iterator, callback) {
            return fn(_eachOfLimit(limit), obj, iterator, callback);
        };
    }
    function doSeries(fn) {
        return function (obj, iterator, callback) {
            return fn(async.eachOfSeries, obj, iterator, callback);
        };
    }

    function _asyncMap(eachfn, arr, iterator, callback) {
        callback = _once(callback || noop);
        arr = arr || [];
        var results = _isArrayLike(arr) ? [] : {};
        eachfn(arr, function (value, index, callback) {
            iterator(value, function (err, v) {
                results[index] = v;
                callback(err);
            });
        }, function (err) {
            callback(err, results);
        });
    }

    async.map = doParallel(_asyncMap);
    async.mapSeries = doSeries(_asyncMap);
    async.mapLimit = doParallelLimit(_asyncMap);

    // reduce only has a series version, as doing reduce in parallel won't
    // work in many situations.
    async.inject =
    async.foldl =
    async.reduce = function (arr, memo, iterator, callback) {
        async.eachOfSeries(arr, function (x, i, callback) {
            iterator(memo, x, function (err, v) {
                memo = v;
                callback(err);
            });
        }, function (err) {
            callback(err, memo);
        });
    };

    async.foldr =
    async.reduceRight = function (arr, memo, iterator, callback) {
        var reversed = _map(arr, identity).reverse();
        async.reduce(reversed, memo, iterator, callback);
    };

    async.transform = function (arr, memo, iterator, callback) {
        if (arguments.length === 3) {
            callback = iterator;
            iterator = memo;
            memo = _isArray(arr) ? [] : {};
        }

        async.eachOf(arr, function(v, k, cb) {
            iterator(memo, v, k, cb);
        }, function(err) {
            callback(err, memo);
        });
    };

    function _filter(eachfn, arr, iterator, callback) {
        var results = [];
        eachfn(arr, function (x, index, callback) {
            iterator(x, function (v) {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            });
        }, function () {
            callback(_map(results.sort(function (a, b) {
                return a.index - b.index;
            }), function (x) {
                return x.value;
            }));
        });
    }

    async.select =
    async.filter = doParallel(_filter);

    async.selectLimit =
    async.filterLimit = doParallelLimit(_filter);

    async.selectSeries =
    async.filterSeries = doSeries(_filter);

    function _reject(eachfn, arr, iterator, callback) {
        _filter(eachfn, arr, function(value, cb) {
            iterator(value, function(v) {
                cb(!v);
            });
        }, callback);
    }
    async.reject = doParallel(_reject);
    async.rejectLimit = doParallelLimit(_reject);
    async.rejectSeries = doSeries(_reject);

    function _createTester(eachfn, check, getResult) {
        return function(arr, limit, iterator, cb) {
            function done() {
                if (cb) cb(getResult(false, void 0));
            }
            function iteratee(x, _, callback) {
                if (!cb) return callback();
                iterator(x, function (v) {
                    if (cb && check(v)) {
                        cb(getResult(true, x));
                        cb = iterator = false;
                    }
                    callback();
                });
            }
            if (arguments.length > 3) {
                eachfn(arr, limit, iteratee, done);
            } else {
                cb = iterator;
                iterator = limit;
                eachfn(arr, iteratee, done);
            }
        };
    }

    async.any =
    async.some = _createTester(async.eachOf, toBool, identity);

    async.someLimit = _createTester(async.eachOfLimit, toBool, identity);

    async.all =
    async.every = _createTester(async.eachOf, notId, notId);

    async.everyLimit = _createTester(async.eachOfLimit, notId, notId);

    function _findGetResult(v, x) {
        return x;
    }
    async.detect = _createTester(async.eachOf, identity, _findGetResult);
    async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult);
    async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult);

    async.sortBy = function (arr, iterator, callback) {
        async.map(arr, function (x, callback) {
            iterator(x, function (err, criteria) {
                if (err) {
                    callback(err);
                }
                else {
                    callback(null, {value: x, criteria: criteria});
                }
            });
        }, function (err, results) {
            if (err) {
                return callback(err);
            }
            else {
                callback(null, _map(results.sort(comparator), function (x) {
                    return x.value;
                }));
            }

        });

        function comparator(left, right) {
            var a = left.criteria, b = right.criteria;
            return a < b ? -1 : a > b ? 1 : 0;
        }
    };

    async.auto = function (tasks, concurrency, callback) {
        if (typeof arguments[1] === 'function') {
            // concurrency is optional, shift the args.
            callback = concurrency;
            concurrency = null;
        }
        callback = _once(callback || noop);
        var keys = _keys(tasks);
        var remainingTasks = keys.length;
        if (!remainingTasks) {
            return callback(null);
        }
        if (!concurrency) {
            concurrency = remainingTasks;
        }

        var results = {};
        var runningTasks = 0;

        var hasError = false;

        var listeners = [];
        function addListener(fn) {
            listeners.unshift(fn);
        }
        function removeListener(fn) {
            var idx = _indexOf(listeners, fn);
            if (idx >= 0) listeners.splice(idx, 1);
        }
        function taskComplete() {
            remainingTasks--;
            _arrayEach(listeners.slice(0), function (fn) {
                fn();
            });
        }

        addListener(function () {
            if (!remainingTasks) {
                callback(null, results);
            }
        });

        _arrayEach(keys, function (k) {
            if (hasError) return;
            var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
            var taskCallback = _restParam(function(err, args) {
                runningTasks--;
                if (args.length <= 1) {
                    args = args[0];
                }
                if (err) {
                    var safeResults = {};
                    _forEachOf(results, function(val, rkey) {
                        safeResults[rkey] = val;
                    });
                    safeResults[k] = args;
                    hasError = true;

                    callback(err, safeResults);
                }
                else {
                    results[k] = args;
                    async.setImmediate(taskComplete);
                }
            });
            var requires = task.slice(0, task.length - 1);
            // prevent dead-locks
            var len = requires.length;
            var dep;
            while (len--) {
                if (!(dep = tasks[requires[len]])) {
                    throw new Error('Has nonexistent dependency in ' + requires.join(', '));
                }
                if (_isArray(dep) && _indexOf(dep, k) >= 0) {
                    throw new Error('Has cyclic dependencies');
                }
            }
            function ready() {
                return runningTasks < concurrency && _reduce(requires, function (a, x) {
                    return (a && results.hasOwnProperty(x));
                }, true) && !results.hasOwnProperty(k);
            }
            if (ready()) {
                runningTasks++;
                task[task.length - 1](taskCallback, results);
            }
            else {
                addListener(listener);
            }
            function listener() {
                if (ready()) {
                    runningTasks++;
                    removeListener(listener);
                    task[task.length - 1](taskCallback, results);
                }
            }
        });
    };



    async.retry = function(times, task, callback) {
        var DEFAULT_TIMES = 5;
        var DEFAULT_INTERVAL = 0;

        var attempts = [];

        var opts = {
            times: DEFAULT_TIMES,
            interval: DEFAULT_INTERVAL
        };

        function parseTimes(acc, t){
            if(typeof t === 'number'){
                acc.times = parseInt(t, 10) || DEFAULT_TIMES;
            } else if(typeof t === 'object'){
                acc.times = parseInt(t.times, 10) || DEFAULT_TIMES;
                acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL;
            } else {
                throw new Error('Unsupported argument type for \'times\': ' + typeof t);
            }
        }

        var length = arguments.length;
        if (length < 1 || length > 3) {
            throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)');
        } else if (length <= 2 && typeof times === 'function') {
            callback = task;
            task = times;
        }
        if (typeof times !== 'function') {
            parseTimes(opts, times);
        }
        opts.callback = callback;
        opts.task = task;

        function wrappedTask(wrappedCallback, wrappedResults) {
            function retryAttempt(task, finalAttempt) {
                return function(seriesCallback) {
                    task(function(err, result){
                        seriesCallback(!err || finalAttempt, {err: err, result: result});
                    }, wrappedResults);
                };
            }

            function retryInterval(interval){
                return function(seriesCallback){
                    setTimeout(function(){
                        seriesCallback(null);
                    }, interval);
                };
            }

            while (opts.times) {

                var finalAttempt = !(opts.times-=1);
                attempts.push(retryAttempt(opts.task, finalAttempt));
                if(!finalAttempt && opts.interval > 0){
                    attempts.push(retryInterval(opts.interval));
                }
            }

            async.series(attempts, function(done, data){
                data = data[data.length - 1];
                (wrappedCallback || opts.callback)(data.err, data.result);
            });
        }

        // If a callback is passed, run this as a controll flow
        return opts.callback ? wrappedTask() : wrappedTask;
    };

    async.waterfall = function (tasks, callback) {
        callback = _once(callback || noop);
        if (!_isArray(tasks)) {
            var err = new Error('First argument to waterfall must be an array of functions');
            return callback(err);
        }
        if (!tasks.length) {
            return callback();
        }
        function wrapIterator(iterator) {
            return _restParam(function (err, args) {
                if (err) {
                    callback.apply(null, [err].concat(args));
                }
                else {
                    var next = iterator.next();
                    if (next) {
                        args.push(wrapIterator(next));
                    }
                    else {
                        args.push(callback);
                    }
                    ensureAsync(iterator).apply(null, args);
                }
            });
        }
        wrapIterator(async.iterator(tasks))();
    };

    function _parallel(eachfn, tasks, callback) {
        callback = callback || noop;
        var results = _isArrayLike(tasks) ? [] : {};

        eachfn(tasks, function (task, key, callback) {
            task(_restParam(function (err, args) {
                if (args.length <= 1) {
                    args = args[0];
                }
                results[key] = args;
                callback(err);
            }));
        }, function (err) {
            callback(err, results);
        });
    }

    async.parallel = function (tasks, callback) {
        _parallel(async.eachOf, tasks, callback);
    };

    async.parallelLimit = function(tasks, limit, callback) {
        _parallel(_eachOfLimit(limit), tasks, callback);
    };

    async.series = function(tasks, callback) {
        _parallel(async.eachOfSeries, tasks, callback);
    };

    async.iterator = function (tasks) {
        function makeCallback(index) {
            function fn() {
                if (tasks.length) {
                    tasks[index].apply(null, arguments);
                }
                return fn.next();
            }
            fn.next = function () {
                return (index < tasks.length - 1) ? makeCallback(index + 1): null;
            };
            return fn;
        }
        return makeCallback(0);
    };

    async.apply = _restParam(function (fn, args) {
        return _restParam(function (callArgs) {
            return fn.apply(
                null, args.concat(callArgs)
            );
        });
    });

    function _concat(eachfn, arr, fn, callback) {
        var result = [];
        eachfn(arr, function (x, index, cb) {
            fn(x, function (err, y) {
                result = result.concat(y || []);
                cb(err);
            });
        }, function (err) {
            callback(err, result);
        });
    }
    async.concat = doParallel(_concat);
    async.concatSeries = doSeries(_concat);

    async.whilst = function (test, iterator, callback) {
        callback = callback || noop;
        if (test()) {
            var next = _restParam(function(err, args) {
                if (err) {
                    callback(err);
                } else if (test.apply(this, args)) {
                    iterator(next);
                } else {
                    callback.apply(null, [null].concat(args));
                }
            });
            iterator(next);
        } else {
            callback(null);
        }
    };

    async.doWhilst = function (iterator, test, callback) {
        var calls = 0;
        return async.whilst(function() {
            return ++calls <= 1 || test.apply(this, arguments);
        }, iterator, callback);
    };

    async.until = function (test, iterator, callback) {
        return async.whilst(function() {
            return !test.apply(this, arguments);
        }, iterator, callback);
    };

    async.doUntil = function (iterator, test, callback) {
        return async.doWhilst(iterator, function() {
            return !test.apply(this, arguments);
        }, callback);
    };

    async.during = function (test, iterator, callback) {
        callback = callback || noop;

        var next = _restParam(function(err, args) {
            if (err) {
                callback(err);
            } else {
                args.push(check);
                test.apply(this, args);
            }
        });

        var check = function(err, truth) {
            if (err) {
                callback(err);
            } else if (truth) {
                iterator(next);
            } else {
                callback(null);
            }
        };

        test(check);
    };

    async.doDuring = function (iterator, test, callback) {
        var calls = 0;
        async.during(function(next) {
            if (calls++ < 1) {
                next(null, true);
            } else {
                test.apply(this, arguments);
            }
        }, iterator, callback);
    };

    function _queue(worker, concurrency, payload) {
        if (concurrency == null) {
            concurrency = 1;
        }
        else if(concurrency === 0) {
            throw new Error('Concurrency must not be zero');
        }
        function _insert(q, data, pos, callback) {
            if (callback != null && typeof callback !== "function") {
                throw new Error("task callback must be a function");
            }
            q.started = true;
            if (!_isArray(data)) {
                data = [data];
            }
            if(data.length === 0 && q.idle()) {
                // call drain immediately if there are no tasks
                return async.setImmediate(function() {
                    q.drain();
                });
            }
            _arrayEach(data, function(task) {
                var item = {
                    data: task,
                    callback: callback || noop
                };

                if (pos) {
                    q.tasks.unshift(item);
                } else {
                    q.tasks.push(item);
                }

                if (q.tasks.length === q.concurrency) {
                    q.saturated();
                }
            });
            async.setImmediate(q.process);
        }
        function _next(q, tasks) {
            return function(){
                workers -= 1;

                var removed = false;
                var args = arguments;
                _arrayEach(tasks, function (task) {
                    _arrayEach(workersList, function (worker, index) {
                        if (worker === task && !removed) {
                            workersList.splice(index, 1);
                            removed = true;
                        }
                    });

                    task.callback.apply(task, args);
                });
                if (q.tasks.length + workers === 0) {
                    q.drain();
                }
                q.process();
            };
        }

        var workers = 0;
        var workersList = [];
        var q = {
            tasks: [],
            concurrency: concurrency,
            payload: payload,
            saturated: noop,
            empty: noop,
            drain: noop,
            started: false,
            paused: false,
            push: function (data, callback) {
                _insert(q, data, false, callback);
            },
            kill: function () {
                q.drain = noop;
                q.tasks = [];
            },
            unshift: function (data, callback) {
                _insert(q, data, true, callback);
            },
            process: function () {
                while(!q.paused && workers < q.concurrency && q.tasks.length){

                    var tasks = q.payload ?
                        q.tasks.splice(0, q.payload) :
                        q.tasks.splice(0, q.tasks.length);

                    var data = _map(tasks, function (task) {
                        return task.data;
                    });

                    if (q.tasks.length === 0) {
                        q.empty();
                    }
                    workers += 1;
                    workersList.push(tasks[0]);
                    var cb = only_once(_next(q, tasks));
                    worker(data, cb);
                }
            },
            length: function () {
                return q.tasks.length;
            },
            running: function () {
                return workers;
            },
            workersList: function () {
                return workersList;
            },
            idle: function() {
                return q.tasks.length + workers === 0;
            },
            pause: function () {
                q.paused = true;
            },
            resume: function () {
                if (q.paused === false) { return; }
                q.paused = false;
                var resumeCount = Math.min(q.concurrency, q.tasks.length);
                // Need to call q.process once per concurrent
                // worker to preserve full concurrency after pause
                for (var w = 1; w <= resumeCount; w++) {
                    async.setImmediate(q.process);
                }
            }
        };
        return q;
    }

    async.queue = function (worker, concurrency) {
        var q = _queue(function (items, cb) {
            worker(items[0], cb);
        }, concurrency, 1);

        return q;
    };

    async.priorityQueue = function (worker, concurrency) {

        function _compareTasks(a, b){
            return a.priority - b.priority;
        }

        function _binarySearch(sequence, item, compare) {
            var beg = -1,
                end = sequence.length - 1;
            while (beg < end) {
                var mid = beg + ((end - beg + 1) >>> 1);
                if (compare(item, sequence[mid]) >= 0) {
                    beg = mid;
                } else {
                    end = mid - 1;
                }
            }
            return beg;
        }

        function _insert(q, data, priority, callback) {
            if (callback != null && typeof callback !== "function") {
                throw new Error("task callback must be a function");
            }
            q.started = true;
            if (!_isArray(data)) {
                data = [data];
            }
            if(data.length === 0) {
                // call drain immediately if there are no tasks
                return async.setImmediate(function() {
                    q.drain();
                });
            }
            _arrayEach(data, function(task) {
                var item = {
                    data: task,
                    priority: priority,
                    callback: typeof callback === 'function' ? callback : noop
                };

                q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);

                if (q.tasks.length === q.concurrency) {
                    q.saturated();
                }
                async.setImmediate(q.process);
            });
        }

        // Start with a normal queue
        var q = async.queue(worker, concurrency);

        // Override push to accept second parameter representing priority
        q.push = function (data, priority, callback) {
            _insert(q, data, priority, callback);
        };

        // Remove unshift function
        delete q.unshift;

        return q;
    };

    async.cargo = function (worker, payload) {
        return _queue(worker, 1, payload);
    };

    function _console_fn(name) {
        return _restParam(function (fn, args) {
            fn.apply(null, args.concat([_restParam(function (err, args) {
                if (typeof console === 'object') {
                    if (err) {
                        if (console.error) {
                            console.error(err);
                        }
                    }
                    else if (console[name]) {
                        _arrayEach(args, function (x) {
                            console[name](x);
                        });
                    }
                }
            })]));
        });
    }
    async.log = _console_fn('log');
    async.dir = _console_fn('dir');
    /*async.info = _console_fn('info');
    async.warn = _console_fn('warn');
    async.error = _console_fn('error');*/

    async.memoize = function (fn, hasher) {
        var memo = {};
        var queues = {};
        var has = Object.prototype.hasOwnProperty;
        hasher = hasher || identity;
        var memoized = _restParam(function memoized(args) {
            var callback = args.pop();
            var key = hasher.apply(null, args);
            if (has.call(memo, key)) {   
                async.setImmediate(function () {
                    callback.apply(null, memo[key]);
                });
            }
            else if (has.call(queues, key)) {
                queues[key].push(callback);
            }
            else {
                queues[key] = [callback];
                fn.apply(null, args.concat([_restParam(function (args) {
                    memo[key] = args;
                    var q = queues[key];
                    delete queues[key];
                    for (var i = 0, l = q.length; i < l; i++) {
                        q[i].apply(null, args);
                    }
                })]));
            }
        });
        memoized.memo = memo;
        memoized.unmemoized = fn;
        return memoized;
    };

    async.unmemoize = function (fn) {
        return function () {
            return (fn.unmemoized || fn).apply(null, arguments);
        };
    };

    function _times(mapper) {
        return function (count, iterator, callback) {
            mapper(_range(count), iterator, callback);
        };
    }

    async.times = _times(async.map);
    async.timesSeries = _times(async.mapSeries);
    async.timesLimit = function (count, limit, iterator, callback) {
        return async.mapLimit(_range(count), limit, iterator, callback);
    };

    async.seq = function (/* functions... */) {
        var fns = arguments;
        return _restParam(function (args) {
            var that = this;

            var callback = args[args.length - 1];
            if (typeof callback == 'function') {
                args.pop();
            } else {
                callback = noop;
            }

            async.reduce(fns, args, function (newargs, fn, cb) {
                fn.apply(that, newargs.concat([_restParam(function (err, nextargs) {
                    cb(err, nextargs);
                })]));
            },
            function (err, results) {
                callback.apply(that, [err].concat(results));
            });
        });
    };

    async.compose = function (/* functions... */) {
        return async.seq.apply(null, Array.prototype.reverse.call(arguments));
    };


    function _applyEach(eachfn) {
        return _restParam(function(fns, args) {
            var go = _restParam(function(args) {
                var that = this;
                var callback = args.pop();
                return eachfn(fns, function (fn, _, cb) {
                    fn.apply(that, args.concat([cb]));
                },
                callback);
            });
            if (args.length) {
                return go.apply(this, args);
            }
            else {
                return go;
            }
        });
    }

    async.applyEach = _applyEach(async.eachOf);
    async.applyEachSeries = _applyEach(async.eachOfSeries);


    async.forever = function (fn, callback) {
        var done = only_once(callback || noop);
        var task = ensureAsync(fn);
        function next(err) {
            if (err) {
                return done(err);
            }
            task(next);
        }
        next();
    };

    function ensureAsync(fn) {
        return _restParam(function (args) {
            var callback = args.pop();
            args.push(function () {
                var innerArgs = arguments;
                if (sync) {
                    async.setImmediate(function () {
                        callback.apply(null, innerArgs);
                    });
                } else {
                    callback.apply(null, innerArgs);
                }
            });
            var sync = true;
            fn.apply(this, args);
            sync = false;
        });
    }

    async.ensureAsync = ensureAsync;

    async.constant = _restParam(function(values) {
        var args = [null].concat(values);
        return function (callback) {
            return callback.apply(this, args);
        };
    });

    async.wrapSync =
    async.asyncify = function asyncify(func) {
        return _restParam(function (args) {
            var callback = args.pop();
            var result;
            try {
                result = func.apply(this, args);
            } catch (e) {
                return callback(e);
            }
            // if result is Promise object
            if (_isObject(result) && typeof result.then === "function") {
                result.then(function(value) {
                    callback(null, value);
                })["catch"](function(err) {
                    callback(err.message ? err : new Error(err));
                });
            } else {
                callback(null, result);
            }
        });
    };

    // Node.js
    if ( true && module.exports) {
        module.exports = async;
    }
    // AMD / RequireJS
    else if (true) {
        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
            return async;
        }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    }
    // included directly via <script> tag
    else {}

}());


/***/ }),

/***/ 880427:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var createKeccakHash = __webpack_require__(27528);
var secp256k1 = __webpack_require__(907972);
var assert = __webpack_require__(742357);
var rlp = __webpack_require__(6636);
var BN = __webpack_require__(213550);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
Object.assign(exports, __webpack_require__(180884));

/**
 * the max integer that this VM can handle (a ```BN```)
 * @var {BN} MAX_INTEGER
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);

/**
 * 2^256 (a ```BN```)
 * @var {BN} TWO_POW256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);

/**
 * Keccak-256 hash of null (a ```String```)
 * @var {String} KECCAK256_NULL_S
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
exports.SHA3_NULL_S = exports.KECCAK256_NULL_S;

/**
 * Keccak-256 hash of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_NULL
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
exports.SHA3_NULL = exports.KECCAK256_NULL;

/**
 * Keccak-256 of an RLP of an empty array (a ```String```)
 * @var {String} KECCAK256_RLP_ARRAY_S
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S;

/**
 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP_ARRAY
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY;

/**
 * Keccak-256 hash of the RLP of null  (a ```String```)
 * @var {String} KECCAK256_RLP_S
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
exports.SHA3_RLP_S = exports.KECCAK256_RLP_S;

/**
 * Keccak-256 hash of the RLP of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
exports.SHA3_RLP = exports.KECCAK256_RLP;

/**
 * [`BN`](https://github.com/indutny/bn.js)
 * @var {Function}
 */
exports.BN = BN;

/**
 * [`rlp`](https://github.com/ethereumjs/rlp)
 * @var {Function}
 */
exports.rlp = rlp;

/**
 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
 * @var {Object}
 */
exports.secp256k1 = secp256k1;

/**
 * Returns a buffer filled with 0s
 * @method zeros
 * @param {Number} bytes  the number of bytes the buffer should be
 * @return {Buffer}
 */
exports.zeros = function (bytes) {
  return Buffer.allocUnsafe(bytes).fill(0);
};

/**
  * Returns a zero address
  * @method zeroAddress
  * @return {String}
  */
exports.zeroAddress = function () {
  var addressLength = 20;
  var zeroAddress = exports.zeros(addressLength);
  return exports.bufferToHex(zeroAddress);
};

/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @method lsetLength
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @param {Boolean} [right=false] whether to start padding form the left or right
 * @return {Buffer|Array}
 */
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
  var buf = exports.zeros(length);
  msg = exports.toBuffer(msg);
  if (right) {
    if (msg.length < length) {
      msg.copy(buf);
      return buf;
    }
    return msg.slice(0, length);
  } else {
    if (msg.length < length) {
      msg.copy(buf, length - msg.length);
      return buf;
    }
    return msg.slice(-length);
  }
};

/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @return {Buffer|Array}
 */
exports.setLengthRight = function (msg, length) {
  return exports.setLength(msg, length, true);
};

/**
 * Trims leading zeros from a `Buffer` or an `Array`
 * @param {Buffer|Array|String} a
 * @return {Buffer|Array|String}
 */
exports.unpad = exports.stripZeros = function (a) {
  a = exports.stripHexPrefix(a);
  var first = a[0];
  while (a.length > 0 && first.toString() === '0') {
    a = a.slice(1);
    first = a[0];
  }
  return a;
};
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param {*} v the value
 */
exports.toBuffer = function (v) {
  if (!Buffer.isBuffer(v)) {
    if (Array.isArray(v)) {
      v = Buffer.from(v);
    } else if (typeof v === 'string') {
      if (exports.isHexString(v)) {
        v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (typeof v === 'number') {
      v = exports.intToBuffer(v);
    } else if (v === null || v === undefined) {
      v = Buffer.allocUnsafe(0);
    } else if (BN.isBN(v)) {
      v = v.toArrayLike(Buffer);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type');
    }
  }
  return v;
};

/**
 * Converts a `Buffer` to a `Number`
 * @param {Buffer} buf
 * @return {Number}
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
  return new BN(exports.toBuffer(buf)).toNumber();
};

/**
 * Converts a `Buffer` into a hex `String`
 * @param {Buffer} buf
 * @return {String}
 */
exports.bufferToHex = function (buf) {
  buf = exports.toBuffer(buf);
  return '0x' + buf.toString('hex');
};

/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param {Buffer} num
 * @return {BN}
 */
exports.fromSigned = function (num) {
  return new BN(num).fromTwos(256);
};

/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param {BN} num
 * @return {Buffer}
 */
exports.toUnsigned = function (num) {
  return Buffer.from(num.toTwos(256).toArray());
};

/**
 * Creates Keccak hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the Keccak width
 * @return {Buffer}
 */
exports.keccak = function (a, bits) {
  a = exports.toBuffer(a);
  if (!bits) bits = 256;

  return createKeccakHash('keccak' + bits).update(a).digest();
};

/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.keccak256 = function (a) {
  return exports.keccak(a);
};

/**
 * Creates SHA-3 (Keccak) hash of the input [OBSOLETE]
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the SHA-3 width
 * @return {Buffer}
 */
exports.sha3 = exports.keccak;

/**
 * Creates SHA256 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.sha256 = function (a) {
  a = exports.toBuffer(a);
  return createHash('sha256').update(a).digest();
};

/**
 * Creates RIPEMD160 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Boolean} padded whether it should be padded to 256 bits or not
 * @return {Buffer}
 */
exports.ripemd160 = function (a, padded) {
  a = exports.toBuffer(a);
  var hash = createHash('rmd160').update(a).digest();
  if (padded === true) {
    return exports.setLength(hash, 32);
  } else {
    return hash;
  }
};

/**
 * Creates SHA-3 hash of the RLP encoded version of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.rlphash = function (a) {
  return exports.keccak(rlp.encode(a));
};

/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 * @param {Buffer} privateKey
 * @return {Boolean}
 */
exports.isValidPrivate = function (privateKey) {
  return secp256k1.privateKeyVerify(privateKey);
};

/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Boolean}
 */
exports.isValidPublic = function (publicKey, sanitize) {
  if (publicKey.length === 64) {
    // Convert to SEC1 for secp256k1
    return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
  }

  if (!sanitize) {
    return false;
  }

  return secp256k1.publicKeyVerify(publicKey);
};

/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Buffer}
 */
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
  pubKey = exports.toBuffer(pubKey);
  if (sanitize && pubKey.length !== 64) {
    pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
  }
  assert(pubKey.length === 64);
  // Only take the lower 160bits of the hash
  return exports.keccak(pubKey).slice(-20);
};

/**
 * Returns the ethereum public key of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
var privateToPublic = exports.privateToPublic = function (privateKey) {
  privateKey = exports.toBuffer(privateKey);
  // skip the type flag and use the X, Y points
  return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};

/**
 * Converts a public key to the Ethereum format.
 * @param {Buffer} publicKey
 * @return {Buffer}
 */
exports.importPublic = function (publicKey) {
  publicKey = exports.toBuffer(publicKey);
  if (publicKey.length !== 64) {
    publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
  }
  return publicKey;
};

/**
 * ECDSA sign
 * @param {Buffer} msgHash
 * @param {Buffer} privateKey
 * @return {Object}
 */
exports.ecsign = function (msgHash, privateKey) {
  var sig = secp256k1.sign(msgHash, privateKey);

  var ret = {};
  ret.r = sig.signature.slice(0, 32);
  ret.s = sig.signature.slice(32, 64);
  ret.v = sig.recovery + 27;
  return ret;
};

/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 * @param message
 * @returns {Buffer} hash
 */
exports.hashPersonalMessage = function (message) {
  var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString());
  return exports.keccak(Buffer.concat([prefix, message]));
};

/**
 * ECDSA public key recovery from signature
 * @param {Buffer} msgHash
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {Buffer} publicKey
 */
exports.ecrecover = function (msgHash, v, r, s) {
  var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
  var recovery = v - 27;
  if (recovery !== 0 && recovery !== 1) {
    throw new Error('Invalid signature v value');
  }
  var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
  return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};

/**
 * Convert signature parameters into the format of `eth_sign` RPC method
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {String} sig
 */
exports.toRpcSig = function (v, r, s) {
  // NOTE: with potential introduction of chainId this might need to be updated
  if (v !== 27 && v !== 28) {
    throw new Error('Invalid recovery id');
  }

  // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
  // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
  return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)]));
};

/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 * @param {String} sig
 * @return {Object}
 */
exports.fromRpcSig = function (sig) {
  sig = exports.toBuffer(sig);

  // NOTE: with potential introduction of chainId this might need to be updated
  if (sig.length !== 65) {
    throw new Error('Invalid signature length');
  }

  var v = sig[64];
  // support both versions of `eth_sign` responses
  if (v < 27) {
    v += 27;
  }

  return {
    v: v,
    r: sig.slice(0, 32),
    s: sig.slice(32, 64)
  };
};

/**
 * Returns the ethereum address of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
exports.privateToAddress = function (privateKey) {
  return exports.publicToAddress(privateToPublic(privateKey));
};

/**
 * Checks if the address is a valid. Accepts checksummed addresses too
 * @param {String} address
 * @return {Boolean}
 */
exports.isValidAddress = function (address) {
  return (/^0x[0-9a-fA-F]{40}$/.test(address)
  );
};

/**
  * Checks if a given address is a zero address
  * @method isZeroAddress
  * @param {String} address
  * @return {Boolean}
  */
exports.isZeroAddress = function (address) {
  var zeroAddress = exports.zeroAddress();
  return zeroAddress === exports.addHexPrefix(address);
};

/**
 * Returns a checksummed address
 * @param {String} address
 * @return {String}
 */
exports.toChecksumAddress = function (address) {
  address = exports.stripHexPrefix(address).toLowerCase();
  var hash = exports.keccak(address).toString('hex');
  var ret = '0x';

  for (var i = 0; i < address.length; i++) {
    if (parseInt(hash[i], 16) >= 8) {
      ret += address[i].toUpperCase();
    } else {
      ret += address[i];
    }
  }

  return ret;
};

/**
 * Checks if the address is a valid checksummed address
 * @param {Buffer} address
 * @return {Boolean}
 */
exports.isValidChecksumAddress = function (address) {
  return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};

/**
 * Generates an address of a newly created contract
 * @param {Buffer} from the address which is creating this new address
 * @param {Buffer} nonce the nonce of the from account
 * @return {Buffer}
 */
exports.generateAddress = function (from, nonce) {
  from = exports.toBuffer(from);
  nonce = new BN(nonce);

  if (nonce.isZero()) {
    // in RLP we want to encode null in the case of zero nonce
    // read the RLP documentation for an answer if you dare
    nonce = null;
  } else {
    nonce = Buffer.from(nonce.toArray());
  }

  // Only take the lower 160bits of the hash
  return exports.rlphash([from, nonce]).slice(-20);
};

/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
 * @param {Buffer|String} address
 * @return {Boolean}
 */
exports.isPrecompiled = function (address) {
  var a = exports.unpad(address);
  return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};

/**
 * Adds "0x" to a given `String` if it does not already start with "0x"
 * @param {String} str
 * @return {String}
 */
exports.addHexPrefix = function (str) {
  if (typeof str !== 'string') {
    return str;
  }

  return exports.isHexPrefixed(str) ? str : '0x' + str;
};

/**
 * Validate ECDSA signature
 * @method isValidSignature
 * @param {Buffer} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @param {Boolean} [homestead=true]
 * @return {Boolean}
 */

exports.isValidSignature = function (v, r, s, homestead) {
  var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
  var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);

  if (r.length !== 32 || s.length !== 32) {
    return false;
  }

  if (v !== 27 && v !== 28) {
    return false;
  }

  r = new BN(r);
  s = new BN(s);

  if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
    return false;
  }

  if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) {
    return false;
  }

  return true;
};

/**
 * Converts a `Buffer` or `Array` to JSON
 * @param {Buffer|Array} ba
 * @return {Array|String|null}
 */
exports.baToJSON = function (ba) {
  if (Buffer.isBuffer(ba)) {
    return '0x' + ba.toString('hex');
  } else if (ba instanceof Array) {
    var array = [];
    for (var i = 0; i < ba.length; i++) {
      array.push(exports.baToJSON(ba[i]));
    }
    return array;
  }
};

/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param {Object} self the `Object` to define properties on
 * @param {Array} fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param {*} data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
  self.raw = [];
  self._fields = [];

  // attach the `toJSON`
  self.toJSON = function (label) {
    if (label) {
      var obj = {};
      self._fields.forEach(function (field) {
        obj[field] = '0x' + self[field].toString('hex');
      });
      return obj;
    }
    return exports.baToJSON(this.raw);
  };

  self.serialize = function serialize() {
    return rlp.encode(self.raw);
  };

  fields.forEach(function (field, i) {
    self._fields.push(field.name);
    function getter() {
      return self.raw[i];
    }
    function setter(v) {
      v = exports.toBuffer(v);

      if (v.toString('hex') === '00' && !field.allowZero) {
        v = Buffer.allocUnsafe(0);
      }

      if (field.allowLess && field.length) {
        v = exports.stripZeros(v);
        assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes');
      } else if (!(field.allowZero && v.length === 0) && field.length) {
        assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length);
      }

      self.raw[i] = v;
    }

    Object.defineProperty(self, field.name, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter
    });

    if (field.default) {
      self[field.name] = field.default;
    }

    // attach alias
    if (field.alias) {
      Object.defineProperty(self, field.alias, {
        enumerable: false,
        configurable: true,
        set: setter,
        get: getter
      });
    }
  });

  // if the constuctor is passed data
  if (data) {
    if (typeof data === 'string') {
      data = Buffer.from(exports.stripHexPrefix(data), 'hex');
    }

    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }

    if (Array.isArray(data)) {
      if (data.length > self._fields.length) {
        throw new Error('wrong number of fields in data');
      }

      // make sure all the items are buffers
      data.forEach(function (d, i) {
        self[self._fields[i]] = exports.toBuffer(d);
      });
    } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
      var keys = Object.keys(data);
      fields.forEach(function (field) {
        if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name];
        if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias];
      });
    } else {
      throw new Error('invalid data');
    }
  }
};

/***/ }),

/***/ 232682:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(581928)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 27528:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(232682)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(335374)
}


/***/ }),

/***/ 335374:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(581928)(__webpack_require__(670507))


/***/ }),

/***/ 581928:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var createKeccak = __webpack_require__(394594)
var createShake = __webpack_require__(617792)

module.exports = function (KeccakState) {
  var Keccak = createKeccak(KeccakState)
  var Shake = createShake(KeccakState)

  return function (algorithm, options) {
    var hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 394594:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var Transform = __webpack_require__(92413).Transform
var inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    var error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    var error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    var digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    var clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 617792:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var Transform = __webpack_require__(92413).Transform
var inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    var error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    var data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    var clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 94997:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

var P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (var round = 0; round < 24; ++round) {
    // theta
    var lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    var hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    var lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    var hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    var lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    var hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    var lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    var hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    var lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    var hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    var lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    var hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    var t1slo0 = s[0] ^ lo
    var t1shi0 = s[1] ^ hi
    var t1slo5 = s[10] ^ lo
    var t1shi5 = s[11] ^ hi
    var t1slo10 = s[20] ^ lo
    var t1shi10 = s[21] ^ hi
    var t1slo15 = s[30] ^ lo
    var t1shi15 = s[31] ^ hi
    var t1slo20 = s[40] ^ lo
    var t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    var t1slo1 = s[2] ^ lo
    var t1shi1 = s[3] ^ hi
    var t1slo6 = s[12] ^ lo
    var t1shi6 = s[13] ^ hi
    var t1slo11 = s[22] ^ lo
    var t1shi11 = s[23] ^ hi
    var t1slo16 = s[32] ^ lo
    var t1shi16 = s[33] ^ hi
    var t1slo21 = s[42] ^ lo
    var t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    var t1slo2 = s[4] ^ lo
    var t1shi2 = s[5] ^ hi
    var t1slo7 = s[14] ^ lo
    var t1shi7 = s[15] ^ hi
    var t1slo12 = s[24] ^ lo
    var t1shi12 = s[25] ^ hi
    var t1slo17 = s[34] ^ lo
    var t1shi17 = s[35] ^ hi
    var t1slo22 = s[44] ^ lo
    var t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    var t1slo3 = s[6] ^ lo
    var t1shi3 = s[7] ^ hi
    var t1slo8 = s[16] ^ lo
    var t1shi8 = s[17] ^ hi
    var t1slo13 = s[26] ^ lo
    var t1shi13 = s[27] ^ hi
    var t1slo18 = s[36] ^ lo
    var t1shi18 = s[37] ^ hi
    var t1slo23 = s[46] ^ lo
    var t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    var t1slo4 = s[8] ^ lo
    var t1shi4 = s[9] ^ hi
    var t1slo9 = s[18] ^ lo
    var t1shi9 = s[19] ^ hi
    var t1slo14 = s[28] ^ lo
    var t1shi14 = s[29] ^ hi
    var t1slo19 = s[38] ^ lo
    var t1shi19 = s[39] ^ hi
    var t1slo24 = s[48] ^ lo
    var t1shi24 = s[49] ^ hi

    // rho & pi
    var t2slo0 = t1slo0
    var t2shi0 = t1shi0
    var t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    var t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    var t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    var t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    var t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    var t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    var t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    var t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    var t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    var t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    var t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    var t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    var t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    var t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    var t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    var t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    var t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    var t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    var t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    var t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    var t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    var t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    var t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    var t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    var t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    var t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    var t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    var t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    var t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    var t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    var t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    var t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    var t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    var t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    var t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    var t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    var t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    var t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    var t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    var t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    var t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    var t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    var t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    var t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    var t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    var t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    var t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    var t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 670507:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var Buffer = __webpack_require__(289509).Buffer
var keccakState = __webpack_require__(94997)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (var i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (var i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  var output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (var i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 672202:
/***/ ((module) => {

module.exports = PrioritizedTaskExecutor

/**
 * Executes tasks up to maxPoolSize at a time, other items are put in a priority queue.
 * @class PrioritizedTaskExecutor
 * @param {Number} maxPoolSize The maximum size of the pool
 * @prop {Number} maxPoolSize The maximum size of the pool
 * @prop {Number} currentPoolSize The current size of the pool
 * @prop {Array} queue The task queue
 */
function PrioritizedTaskExecutor (maxPoolSize) {
  this.maxPoolSize = maxPoolSize
  this.currentPoolSize = 0
  this.queue = []
}

/**
 * Executes the task.
 * @param {Number} priority The priority of the task
 * @param {Function} task The function that accepts the callback, which must be called upon the task completion.
 */
PrioritizedTaskExecutor.prototype.execute = function (priority, task) {
  var self = this

  if (self.currentPoolSize < self.maxPoolSize) {
    self.currentPoolSize++
    task(function () {
      self.currentPoolSize--
      if (self.queue.length > 0) {
        self.queue.sort(function (a, b) {
          return b.priority - a.priority
        })
        var item = self.queue.shift()
        self.execute(item.priority, item.task)
      }
    })
  } else {
    self.queue.push({
      priority: priority,
      task: task
    })
  }
}


/***/ }),

/***/ 821606:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

const TrieNode = __webpack_require__(651090)
const ethUtil = __webpack_require__(880427)
const matchingNibbleLength = __webpack_require__(934439).matchingNibbleLength

/**
 * Returns a merkle proof for a given key
 * @method Trie.prove
 * @param {Trie} trie
 * @param {String} key
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {Array.<TrieNode>} `proof`)
 */
exports.prove = function (trie, key, cb) {
  var nodes

  trie.findPath(key, function (err, node, remaining, stack) {
    if (err) return cb(err)
    if (remaining.length > 0) return cb(new Error('Node does not contain the key'))
    nodes = stack
    var p = []
    for (var i = 0; i < nodes.length; i++) {
      var rlpNode = nodes[i].serialize()

      if ((rlpNode.length >= 32) || (i === 0)) {
        p.push(rlpNode)
      }
    }
    cb(null, p)
  })
}

/**
 * Verifies a merkle proof for a given key
 * @method Trie.verifyProof
 * @param {Buffer} rootHash
 * @param {String} key
 * @param {Array.<TrieNode>} proof
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {String} `val`)
 */
exports.verifyProof = function (rootHash, key, proof, cb) {
  key = TrieNode.stringToNibbles(key)
  var wantHash = ethUtil.toBuffer(rootHash)
  for (var i = 0; i < proof.length; i++) {
    var p = ethUtil.toBuffer(proof[i])
    var hash = ethUtil.sha3(proof[i])
    if (Buffer.compare(hash, wantHash)) {
      return cb(new Error('Bad proof node ' + i + ': hash mismatch'))
    }
    var node = new TrieNode(ethUtil.rlp.decode(p))
    var cld
    if (node.type === 'branch') {
      if (key.length === 0) {
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (branch)'))
        }
        return cb(null, node.value)
      }
      cld = node.raw[key[0]]
      key = key.slice(1)
      if (cld.length === 2) {
        var embeddedNode = new TrieNode(cld)
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (embeddedNode)'))
        }

        if (matchingNibbleLength(embeddedNode.key, key) !== embeddedNode.key.length) {
          return cb(new Error('Key length does not match with the proof one (embeddedNode)'))
        }
        key = key.slice(embeddedNode.key.length)
        if (key.length !== 0) {
          return cb(new Error('Key does not match with the proof one (embeddedNode)'))
        }
        return cb(null, embeddedNode.value)
      } else {
        wantHash = cld
      }
    } else if ((node.type === 'extention') || (node.type === 'leaf')) {
      if (matchingNibbleLength(node.key, key) !== node.key.length) {
        return cb(new Error('Key does not match with the proof one (extention|leaf)'))
      }
      cld = node.value
      key = key.slice(node.key.length)
      if (key.length === 0 || (cld.length === 17 && key.length === 1)) {
        // The value is in an embedded branch. Extract it.
        if (cld.length === 17) {
          cld = cld[key[0]][1]
          key = key.slice(1)
        }
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (extention|leaf)'))
        }
        return cb(null, cld)
      } else {
        wantHash = cld
      }
    } else {
      return cb(new Error('Invalid node type'))
    }
  }
  cb(new Error('Unexpected end of proof'))
}


/***/ }),

/***/ 394903:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const Readable = __webpack_require__(861655).Readable
const TrieNode = __webpack_require__(651090)
const util = __webpack_require__(431669)

module.exports = TrieReadStream

function TrieReadStream (trie) {
  this.trie = trie
  this.next = null
  Readable.call(this, {
    objectMode: true
  })
}

util.inherits(TrieReadStream, Readable)

TrieReadStream.prototype._read = function () {
  var self = this
  if (!self._started) {
    self._started = true
    self.trie._findValueNodes(function (nodeRef, node, key, next) {
      self.push({
        key: TrieNode.nibblesToBuffer(key),
        value: node.value
      })
      next()
    }, function () {
      // close stream
      self.push(null)
    })
  }
}


/***/ }),

/***/ 286020:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const ethUtil = __webpack_require__(880427)

module.exports = secureInterface

function secureInterface (trie) {
  // overwrites
  trie.copy = copy.bind(trie, trie.copy.bind(trie))
  trie.get = get.bind(trie, trie.get.bind(trie))
  trie.put = put.bind(trie, trie.put.bind(trie))
  trie.del = del.bind(trie, trie.del.bind(trie))
}

// adds the interface when copying the trie
function copy (_super) {
  var trie = _super()
  secureInterface(trie)
  return trie
}

function get (_super, key, cb) {
  var hash = ethUtil.sha3(key)
  _super(hash, cb)
}

// for a falsey value, use the original key
// to avoid double hashing the key
function put (_super, key, val, cb) {
  if (!val) {
    this.del(key, cb)
  } else {
    var hash = ethUtil.sha3(key)
    _super(hash, val, cb)
  }
}

function del (_super, key, cb) {
  var hash = ethUtil.sha3(key)
  _super(hash, cb)
}


/***/ }),

/***/ 710802:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const CheckpointTrie = __webpack_require__(975984)
const secureInterface = __webpack_require__(286020)
const inherits = __webpack_require__(431669).inherits

module.exports = SecureTrie
inherits(SecureTrie, CheckpointTrie)

/**
 * You can create a secure Trie where the keys are automatically hashed using **SHA3** by using `require('merkle-patricia-tree/secure')`. It has the same methods and constuctor as `Trie`
 * @class SecureTrie
 * @extends Trie
 */
function SecureTrie () {
  CheckpointTrie.apply(this, arguments)
  secureInterface(this)
}


/***/ }),

/***/ 651090:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const rlp = __webpack_require__(6636)
const ethUtil = __webpack_require__(880427)

module.exports = TrieNode

function TrieNode (type, key, value) {
  if (Array.isArray(type)) {
    // parse raw node
    this.parseNode(type)
  } else {
    this.type = type
    if (type === 'branch') {
      var values = key
      this.raw = Array.apply(null, Array(17))
      if (values) {
        values.forEach(function (keyVal) {
          this.set.apply(this, keyVal)
        })
      }
    } else {
      this.raw = Array(2)
      this.setValue(value)
      this.setKey(key)
    }
  }
}

TrieNode.isRawNode = isRawNode
TrieNode.addHexPrefix = addHexPrefix
TrieNode.removeHexPrefix = removeHexPrefix
TrieNode.isTerminator = isTerminator
TrieNode.stringToNibbles = stringToNibbles
TrieNode.nibblesToBuffer = nibblesToBuffer
TrieNode.getNodeType = getNodeType

Object.defineProperty(TrieNode.prototype, 'value', {
  get: function () {
    return this.getValue()
  },
  set: function (v) {
    this.setValue(v)
  }
})

Object.defineProperty(TrieNode.prototype, 'key', {
  get: function () {
    return this.getKey()
  },
  set: function (k) {
    this.setKey(k)
  }
})

// parses a raw node
TrieNode.prototype.parseNode = function (rawNode) {
  this.raw = rawNode
  this.type = getNodeType(rawNode)
}

// sets the value of the node
TrieNode.prototype.setValue = function (key, value) {
  if (this.type !== 'branch') {
    this.raw[1] = key
  } else {
    if (arguments.length === 1) {
      value = key
      key = 16
    }
    this.raw[key] = value
  }
}

TrieNode.prototype.getValue = function (key) {
  if (this.type === 'branch') {
    if (arguments.length === 0) {
      key = 16
    }

    var val = this.raw[key]
    if (val !== null && val !== undefined && val.length !== 0) {
      return val
    }
  } else {
    return this.raw[1]
  }
}

TrieNode.prototype.setKey = function (key) {
  if (this.type !== 'branch') {
    if (Buffer.isBuffer(key)) {
      key = stringToNibbles(key)
    } else {
      key = key.slice(0) // copy the key
    }

    key = addHexPrefix(key, this.type === 'leaf')
    this.raw[0] = nibblesToBuffer(key)
  }
}

// returns the key as a nibble
TrieNode.prototype.getKey = function () {
  if (this.type !== 'branch') {
    var key = this.raw[0]
    key = removeHexPrefix(stringToNibbles(key))
    return (key)
  }
}

TrieNode.prototype.serialize = function () {
  return rlp.encode(this.raw)
}

TrieNode.prototype.hash = function () {
  return ethUtil.sha3(this.serialize())
}

TrieNode.prototype.toString = function () {
  var out = this.type
  out += ': ['
  this.raw.forEach(function (el) {
    if (Buffer.isBuffer(el)) {
      out += el.toString('hex') + ', '
    } else if (el) {
      out += 'object, '
    } else {
      out += 'empty, '
    }
  })
  out = out.slice(0, -2)
  out += ']'
  return out
}

TrieNode.prototype.getChildren = function () {
  var children = []
  switch (this.type) {
    case 'leaf':
      // no children
      break
    case 'extention':
      // one child
      children.push([this.key, this.getValue()])
      break
    case 'branch':
      for (var index = 0, end = 16; index < end; index++) {
        var value = this.getValue(index)
        if (value) {
          children.push([
            [index], value
          ])
        }
      }
      break
  }
  return children
}

/**
 * @param {Array} dataArr
 * @returns {Buffer} - returns buffer of encoded data
 * hexPrefix
 **/
function addHexPrefix (key, terminator) {
  // odd
  if (key.length % 2) {
    key.unshift(1)
  } else {
    // even
    key.unshift(0)
    key.unshift(0)
  }

  if (terminator) {
    key[0] += 2
  }

  return key
}

function removeHexPrefix (val) {
  if (val[0] % 2) {
    val = val.slice(1)
  } else {
    val = val.slice(2)
  }

  return val
}

/**
 * Determines if a key has Arnold Schwarzenegger in it.
 * @method isTerminator
 * @param {Array} key - an hexprefixed array of nibbles
 */
function isTerminator (key) {
  return key[0] > 1
}

/**
 * Converts a string OR a buffer to a nibble array.
 * @method stringToNibbles
 * @param {Buffer| String} key
 */
function stringToNibbles (key) {
  var bkey = new Buffer(key)
  var nibbles = []

  for (var i = 0; i < bkey.length; i++) {
    var q = i * 2
    nibbles[q] = bkey[i] >> 4
    ++q
    nibbles[q] = bkey[i] % 16
  }
  return nibbles
}

/**
 * Converts a nibble array into a buffer.
 * @method nibblesToBuffer
 * @param arr
 */
function nibblesToBuffer (arr) {
  var buf = new Buffer(arr.length / 2)
  for (var i = 0; i < buf.length; i++) {
    var q = i * 2
    buf[i] = (arr[q] << 4) + arr[++q]
  }
  return buf
}

/**
 * Determines the node type.
 * @returns {String} - the node type
 *   - leaf - if the node is a leaf
 *   - branch - if the node is a branch
 *   - extention - if the node is an extention
 *   - unknown - if something else got borked
 */
function getNodeType (node) {
  if (node.length === 17) {
    return 'branch'
  } else if (node.length === 2) {
    var key = stringToNibbles(node[0])
    if (isTerminator(key)) {
      return 'leaf'
    }

    return 'extention'
  }
}

function isRawNode (node) {
  return Array.isArray(node) && !Buffer.isBuffer(node)
}


/***/ }),

/***/ 934439:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

const async = __webpack_require__(417997)

module.exports = {
  matchingNibbleLength: matchingNibbleLength,
  callTogether: callTogether,
  asyncFirstSeries: asyncFirstSeries,
  doKeysMatch: doKeysMatch
}

/**
 * Returns the number of in order matching nibbles of two give nibble arrayes
 * @method matchingNibbleLength
 * @param {Array} nib1
 * @param {Array} nib2
 */
function matchingNibbleLength (nib1, nib2) {
  var i = 0
  while (nib1[i] === nib2[i] && nib1.length > i) {
    i++
  }
  return i
}

/**
 * Compare two 'nibble array' keys
 */
function doKeysMatch (keyA, keyB) {
  var length = matchingNibbleLength(keyA, keyB)
  return length === keyA.length && length === keyB.length
}

/**
 * Take two or more functions and returns a function  that will execute all of
 * the given functions
 */
function callTogether () {
  var funcs = arguments
  var length = funcs.length
  var index = length

  if (!length) {
    return function () {}
  }

  return function () {
    length = index

    while (length--) {
      var fn = funcs[length]
      if (typeof fn === 'function') {
        var result = funcs[length].apply(this, arguments)
      }
    }
    return result
  }
}

/**
 * Take a collection of async fns, call the cb on the first to return a truthy value.
 * If all run without a truthy result, return undefined
 */
function asyncFirstSeries (array, iterator, cb) {
  var didComplete = false
  async.eachSeries(array, function (item, next) {
    if (didComplete) return next
    iterator(item, function (err, result) {
      if (result) {
        didComplete = true
        process.nextTick(cb.bind(null, null, result))
      }
      next(err)
    })
  }, function () {
    if (!didComplete) {
      cb()
    }
  })
}


/***/ }),

/***/ 244778:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    keys.push(key);
  }return keys;
};
/*</replacement>*/

module.exports = Duplex;

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(31099);
var Writable = __webpack_require__(698984);

util.inherits(Duplex, Readable);

{
  // avoid scope creep, the keys array can then be collected
  var keys = objectKeys(Writable.prototype);
  for (var v = 0; v < keys.length; v++) {
    var method = keys[v];
    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  }
}

function Duplex(options) {
  if (!(this instanceof Duplex)) return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false) this.readable = false;

  if (options && options.writable === false) this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;

  this.once('end', onend);
}

Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended) return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  pna.nextTick(onEndNT, this);
}

function onEndNT(self) {
  self.end();
}

Object.defineProperty(Duplex.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined || this._writableState === undefined) {
      return false;
    }
    return this._readableState.destroyed && this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (this._readableState === undefined || this._writableState === undefined) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
    this._writableState.destroyed = value;
  }
});

Duplex.prototype._destroy = function (err, cb) {
  this.push(null);
  this.end();

  pna.nextTick(cb, err);
};

/***/ }),

/***/ 150559:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.



module.exports = PassThrough;

var Transform = __webpack_require__(765074);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};

/***/ }),

/***/ 31099:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(815552);
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Readable.ReadableState = ReadableState;

/*<replacement>*/
var EE = __webpack_require__(128614).EventEmitter;

var EElistenerCount = function (emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(709540);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(342692).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var debugUtil = __webpack_require__(431669);
var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
  debug = debugUtil.debuglog('stream');
} else {
  debug = function () {};
}
/*</replacement>*/

var BufferList = __webpack_require__(620839);
var destroyImpl = __webpack_require__(981906);
var StringDecoder;

util.inherits(Readable, Stream);

var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];

function prependListener(emitter, event, fn) {
  // Sadly this is not cacheable as some libraries bundle their own
  // event emitter implementation with them.
  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);

  // This is a hack to make sure that our error handler is attached before any
  // userland ones.  NEVER DO THIS. This is here only because this code needs
  // to continue to work with older versions of Node.js that do not include
  // the prependListener() method. The goal is to eventually remove this hack.
  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}

function ReadableState(options, stream) {
  Duplex = Duplex || __webpack_require__(244778);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  var readableHwm = options.readableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // A linked list is used to store data chunks instead of an array because the
  // linked list can remove elements from the beginning faster than
  // array.shift()
  this.buffer = new BufferList();
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = null;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // a flag to be able to tell if the event 'readable'/'data' is emitted
  // immediately, or on a later tick.  We set this to true at first, because
  // any actions that shouldn't happen until "later" should generally also
  // not happen before the first read call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;
  this.resumeScheduled = false;

  // has it been destroyed
  this.destroyed = false;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder) StringDecoder = __webpack_require__(59446)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  Duplex = Duplex || __webpack_require__(244778);

  if (!(this instanceof Readable)) return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  if (options) {
    if (typeof options.read === 'function') this._read = options.read;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;
  }

  Stream.call(this);
}

Object.defineProperty(Readable.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined) {
      return false;
    }
    return this._readableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._readableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
  }
});

Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;
Readable.prototype._destroy = function (err, cb) {
  this.push(null);
  cb(err);
};

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function (chunk, encoding) {
  var state = this._readableState;
  var skipChunkCheck;

  if (!state.objectMode) {
    if (typeof chunk === 'string') {
      encoding = encoding || state.defaultEncoding;
      if (encoding !== state.encoding) {
        chunk = Buffer.from(chunk, encoding);
        encoding = '';
      }
      skipChunkCheck = true;
    }
  } else {
    skipChunkCheck = true;
  }

  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function (chunk) {
  return readableAddChunk(this, chunk, null, true, false);
};

function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  var state = stream._readableState;
  if (chunk === null) {
    state.reading = false;
    onEofChunk(stream, state);
  } else {
    var er;
    if (!skipChunkCheck) er = chunkInvalid(state, chunk);
    if (er) {
      stream.emit('error', er);
    } else if (state.objectMode || chunk && chunk.length > 0) {
      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
        chunk = _uint8ArrayToBuffer(chunk);
      }

      if (addToFront) {
        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
      } else if (state.ended) {
        stream.emit('error', new Error('stream.push() after EOF'));
      } else {
        state.reading = false;
        if (state.decoder && !encoding) {
          chunk = state.decoder.write(chunk);
          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
        } else {
          addChunk(stream, state, chunk, false);
        }
      }
    } else if (!addToFront) {
      state.reading = false;
    }
  }

  return needMoreData(state);
}

function addChunk(stream, state, chunk, addToFront) {
  if (state.flowing && state.length === 0 && !state.sync) {
    stream.emit('data', chunk);
    stream.read(0);
  } else {
    // update the buffer info.
    state.length += state.objectMode ? 1 : chunk.length;
    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);

    if (state.needReadable) emitReadable(stream);
  }
  maybeReadMore(stream, state);
}

function chunkInvalid(state, chunk) {
  var er;
  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}

// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
}

Readable.prototype.isPaused = function () {
  return this._readableState.flowing === false;
};

// backwards compatibility.
Readable.prototype.setEncoding = function (enc) {
  if (!StringDecoder) StringDecoder = __webpack_require__(59446)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
  return this;
};

// Don't raise the hwm > 8MB
var MAX_HWM = 0x800000;
function computeNewHighWaterMark(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2 to prevent increasing hwm excessively in
    // tiny amounts
    n--;
    n |= n >>> 1;
    n |= n >>> 2;
    n |= n >>> 4;
    n |= n >>> 8;
    n |= n >>> 16;
    n++;
  }
  return n;
}

// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function howMuchToRead(n, state) {
  if (n <= 0 || state.length === 0 && state.ended) return 0;
  if (state.objectMode) return 1;
  if (n !== n) {
    // Only flow one buffer at a time
    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  }
  // If we're asking for more than the current hwm, then raise the hwm.
  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  if (n <= state.length) return n;
  // Don't have enough
  if (!state.ended) {
    state.needReadable = true;
    return 0;
  }
  return state.length;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
  debug('read', n);
  n = parseInt(n, 10);
  var state = this._readableState;
  var nOrig = n;

  if (n !== 0) state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
    debug('read: emitReadable', state.length, state.ended);
    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    if (state.length === 0) endReadable(this);
    return null;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;
  debug('need readable', doRead);

  // if we currently have less than the highWaterMark, then also read some
  if (state.length === 0 || state.length - n < state.highWaterMark) {
    doRead = true;
    debug('length less than watermark', doRead);
  }

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading) {
    doRead = false;
    debug('reading or ended', doRead);
  } else if (doRead) {
    debug('do read');
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0) state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
    // If _read pushed data synchronously, then `reading` will be false,
    // and we need to re-evaluate how much data we can return to the user.
    if (!state.reading) n = howMuchToRead(nOrig, state);
  }

  var ret;
  if (n > 0) ret = fromList(n, state);else ret = null;

  if (ret === null) {
    state.needReadable = true;
    n = 0;
  } else {
    state.length -= n;
  }

  if (state.length === 0) {
    // If we have nothing in the buffer, then we want to know
    // as soon as we *do* get something into the buffer.
    if (!state.ended) state.needReadable = true;

    // If we tried to read() past the EOF, then emit end on the next tick.
    if (nOrig !== n && state.ended) endReadable(this);
  }

  if (ret !== null) this.emit('data', ret);

  return ret;
};

function onEofChunk(stream, state) {
  if (state.ended) return;
  if (state.decoder) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // emit 'readable' now to make sure it gets picked up.
  emitReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (!state.emittedReadable) {
    debug('emitReadable', state.flowing);
    state.emittedReadable = true;
    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  }
}

function emitReadable_(stream) {
  debug('emit readable');
  stream.emit('readable');
  flow(stream);
}

// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    pna.nextTick(maybeReadMore_, stream, state);
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
    debug('maybeReadMore read 0');
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;else len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function (n) {
  this.emit('error', new Error('_read() is not implemented'));
};

Readable.prototype.pipe = function (dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;
  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);

  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;

  var endFn = doEnd ? onend : unpipe;
  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable, unpipeInfo) {
    debug('onunpipe');
    if (readable === src) {
      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
        unpipeInfo.hasUnpiped = true;
        cleanup();
      }
    }
  }

  function onend() {
    debug('onend');
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  var cleanedUp = false;
  function cleanup() {
    debug('cleanup');
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', unpipe);
    src.removeListener('data', ondata);

    cleanedUp = true;

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  }

  // If the user pushes more data while we're writing to dest then we'll end up
  // in ondata again. However, we only want to increase awaitDrain once because
  // dest will only emit one 'drain' event for the multiple writes.
  // => Introduce a guard on increasing awaitDrain.
  var increasedAwaitDrain = false;
  src.on('data', ondata);
  function ondata(chunk) {
    debug('ondata');
    increasedAwaitDrain = false;
    var ret = dest.write(chunk);
    if (false === ret && !increasedAwaitDrain) {
      // If the user unpiped during `dest.write()`, it is possible
      // to get stuck in a permanently paused state if that write
      // also returned false.
      // => Check whether `dest` is still a piping destination.
      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
        debug('false write response, pause', src._readableState.awaitDrain);
        src._readableState.awaitDrain++;
        increasedAwaitDrain = true;
      }
      src.pause();
    }
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    debug('onerror', er);
    unpipe();
    dest.removeListener('error', onerror);
    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  }

  // Make sure our error handler is attached before userland ones.
  prependListener(dest, 'error', onerror);

  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    debug('onfinish');
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    debug('unpipe');
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    debug('pipe resume');
    src.resume();
  }

  return dest;
};

function pipeOnDrain(src) {
  return function () {
    var state = src._readableState;
    debug('pipeOnDrain', state.awaitDrain);
    if (state.awaitDrain) state.awaitDrain--;
    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
      state.flowing = true;
      flow(src);
    }
  };
}

Readable.prototype.unpipe = function (dest) {
  var state = this._readableState;
  var unpipeInfo = { hasUnpiped: false };

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0) return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes) return this;

    if (!dest) dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;
    if (dest) dest.emit('unpipe', this, unpipeInfo);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;

    for (var i = 0; i < len; i++) {
      dests[i].emit('unpipe', this, unpipeInfo);
    }return this;
  }

  // try to find the right one.
  var index = indexOf(state.pipes, dest);
  if (index === -1) return this;

  state.pipes.splice(index, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1) state.pipes = state.pipes[0];

  dest.emit('unpipe', this, unpipeInfo);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function (ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  if (ev === 'data') {
    // Start flowing on next tick if stream isn't explicitly paused
    if (this._readableState.flowing !== false) this.resume();
  } else if (ev === 'readable') {
    var state = this._readableState;
    if (!state.endEmitted && !state.readableListening) {
      state.readableListening = state.needReadable = true;
      state.emittedReadable = false;
      if (!state.reading) {
        pna.nextTick(nReadingNextTick, this);
      } else if (state.length) {
        emitReadable(this);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

function nReadingNextTick(self) {
  debug('readable nexttick read 0');
  self.read(0);
}

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function () {
  var state = this._readableState;
  if (!state.flowing) {
    debug('resume');
    state.flowing = true;
    resume(this, state);
  }
  return this;
};

function resume(stream, state) {
  if (!state.resumeScheduled) {
    state.resumeScheduled = true;
    pna.nextTick(resume_, stream, state);
  }
}

function resume_(stream, state) {
  if (!state.reading) {
    debug('resume read 0');
    stream.read(0);
  }

  state.resumeScheduled = false;
  state.awaitDrain = 0;
  stream.emit('resume');
  flow(stream);
  if (state.flowing && !state.reading) stream.read(0);
}

Readable.prototype.pause = function () {
  debug('call pause flowing=%j', this._readableState.flowing);
  if (false !== this._readableState.flowing) {
    debug('pause');
    this._readableState.flowing = false;
    this.emit('pause');
  }
  return this;
};

function flow(stream) {
  var state = stream._readableState;
  debug('flow', state.flowing);
  while (state.flowing && stream.read() !== null) {}
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function (stream) {
  var _this = this;

  var state = this._readableState;
  var paused = false;

  stream.on('end', function () {
    debug('wrapped end');
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length) _this.push(chunk);
    }

    _this.push(null);
  });

  stream.on('data', function (chunk) {
    debug('wrapped data');
    if (state.decoder) chunk = state.decoder.write(chunk);

    // don't skip over falsy values in objectMode
    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;

    var ret = _this.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (this[i] === undefined && typeof stream[i] === 'function') {
      this[i] = function (method) {
        return function () {
          return stream[method].apply(stream, arguments);
        };
      }(i);
    }
  }

  // proxy certain important events.
  for (var n = 0; n < kProxyEvents.length; n++) {
    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  }

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  this._read = function (n) {
    debug('wrapped _read', n);
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return this;
};

Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._readableState.highWaterMark;
  }
});

// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromList(n, state) {
  // nothing buffered
  if (state.length === 0) return null;

  var ret;
  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
    // read it all, truncate the list
    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
    state.buffer.clear();
  } else {
    // read part of list
    ret = fromListPartial(n, state.buffer, state.decoder);
  }

  return ret;
}

// Extracts only enough buffered data to satisfy the amount requested.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromListPartial(n, list, hasStrings) {
  var ret;
  if (n < list.head.data.length) {
    // slice is the same for buffers and strings
    ret = list.head.data.slice(0, n);
    list.head.data = list.head.data.slice(n);
  } else if (n === list.head.data.length) {
    // first chunk is a perfect match
    ret = list.shift();
  } else {
    // result spans more than one buffer
    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  }
  return ret;
}

// Copies a specified amount of characters from the list of buffered data
// chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBufferString(n, list) {
  var p = list.head;
  var c = 1;
  var ret = p.data;
  n -= ret.length;
  while (p = p.next) {
    var str = p.data;
    var nb = n > str.length ? str.length : n;
    if (nb === str.length) ret += str;else ret += str.slice(0, n);
    n -= nb;
    if (n === 0) {
      if (nb === str.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = str.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

// Copies a specified amount of bytes from the list of buffered data chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBuffer(n, list) {
  var ret = Buffer.allocUnsafe(n);
  var p = list.head;
  var c = 1;
  p.data.copy(ret);
  n -= p.data.length;
  while (p = p.next) {
    var buf = p.data;
    var nb = n > buf.length ? buf.length : n;
    buf.copy(ret, ret.length - n, 0, nb);
    n -= nb;
    if (n === 0) {
      if (nb === buf.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = buf.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');

  if (!state.endEmitted) {
    state.ended = true;
    pna.nextTick(endReadableNT, state, stream);
  }
}

function endReadableNT(state, stream) {
  // Check that we didn't get one last unshift.
  if (!state.endEmitted && state.length === 0) {
    state.endEmitted = true;
    stream.readable = false;
    stream.emit('end');
  }
}

function indexOf(xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}

/***/ }),

/***/ 765074:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.



module.exports = Transform;

var Duplex = __webpack_require__(244778);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);

function afterTransform(er, data) {
  var ts = this._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb) {
    return this.emit('error', new Error('write callback called multiple times'));
  }

  ts.writechunk = null;
  ts.writecb = null;

  if (data != null) // single equals check for both `null` and `undefined`
    this.push(data);

  cb(er);

  var rs = this._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    this._read(rs.highWaterMark);
  }
}

function Transform(options) {
  if (!(this instanceof Transform)) return new Transform(options);

  Duplex.call(this, options);

  this._transformState = {
    afterTransform: afterTransform.bind(this),
    needTransform: false,
    transforming: false,
    writecb: null,
    writechunk: null,
    writeencoding: null
  };

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  if (options) {
    if (typeof options.transform === 'function') this._transform = options.transform;

    if (typeof options.flush === 'function') this._flush = options.flush;
  }

  // When the writable side finishes, then flush out anything remaining.
  this.on('prefinish', prefinish);
}

function prefinish() {
  var _this = this;

  if (typeof this._flush === 'function') {
    this._flush(function (er, data) {
      done(_this, er, data);
    });
  } else {
    done(this, null, null);
  }
}

Transform.prototype.push = function (chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
  throw new Error('_transform() is not implemented');
};

Transform.prototype._write = function (chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function (n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};

Transform.prototype._destroy = function (err, cb) {
  var _this2 = this;

  Duplex.prototype._destroy.call(this, err, function (err2) {
    cb(err2);
    _this2.emit('close');
  });
};

function done(stream, er, data) {
  if (er) return stream.emit('error', er);

  if (data != null) // single equals check for both `null` and `undefined`
    stream.push(data);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');

  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');

  return stream.push(null);
}

/***/ }),

/***/ 698984:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Writable;

/* <replacement> */
function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
  this.next = null;
}

// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
  var _this = this;

  this.next = null;
  this.entry = null;
  this.finish = function () {
    onCorkedFinish(_this, state);
  };
}
/* </replacement> */

/*<replacement>*/
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Writable.WritableState = WritableState;

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var internalUtil = {
  deprecate: __webpack_require__(741159)
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(709540);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(342692).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

var destroyImpl = __webpack_require__(981906);

util.inherits(Writable, Stream);

function nop() {}

function WritableState(options, stream) {
  Duplex = Duplex || __webpack_require__(244778);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  var writableHwm = options.writableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // if _final has been called
  this.finalCalled = false;

  // drain event flag.
  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // has it been destroyed
  this.destroyed = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // when true all writes will be buffered until .uncork() call
  this.corked = 0;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function (er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.bufferedRequest = null;
  this.lastBufferedRequest = null;

  // number of pending user-supplied write callbacks
  // this must be 0 before 'finish' can be emitted
  this.pendingcb = 0;

  // emit prefinish if the only thing we're waiting for is _write cbs
  // This is relevant for synchronous Transform streams
  this.prefinished = false;

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;

  // count buffered requests
  this.bufferedRequestCount = 0;

  // allocate the first CorkedRequest, there is always
  // one allocated and free to use, and we maintain at most two
  this.corkedRequestsFree = new CorkedRequest(this);
}

WritableState.prototype.getBuffer = function getBuffer() {
  var current = this.bufferedRequest;
  var out = [];
  while (current) {
    out.push(current);
    current = current.next;
  }
  return out;
};

(function () {
  try {
    Object.defineProperty(WritableState.prototype, 'buffer', {
      get: internalUtil.deprecate(function () {
        return this.getBuffer();
      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
    });
  } catch (_) {}
})();

// Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
var realHasInstance;
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  realHasInstance = Function.prototype[Symbol.hasInstance];
  Object.defineProperty(Writable, Symbol.hasInstance, {
    value: function (object) {
      if (realHasInstance.call(this, object)) return true;
      if (this !== Writable) return false;

      return object && object._writableState instanceof WritableState;
    }
  });
} else {
  realHasInstance = function (object) {
    return object instanceof this;
  };
}

function Writable(options) {
  Duplex = Duplex || __webpack_require__(244778);

  // Writable ctor is applied to Duplexes, too.
  // `realHasInstance` is necessary because using plain `instanceof`
  // would return false, as no `_writableState` property is attached.

  // Trying to use the custom `instanceof` for Writable here will also break the
  // Node.js LazyTransform implementation, which has a non-trivial getter for
  // `_writableState` that would lead to infinite recursion.
  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
    return new Writable(options);
  }

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  if (options) {
    if (typeof options.write === 'function') this._write = options.write;

    if (typeof options.writev === 'function') this._writev = options.writev;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;

    if (typeof options.final === 'function') this._final = options.final;
  }

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
  this.emit('error', new Error('Cannot pipe, not readable'));
};

function writeAfterEnd(stream, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  pna.nextTick(cb, er);
}

// Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  var er = false;

  if (chunk === null) {
    er = new TypeError('May not write null values to stream');
  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  if (er) {
    stream.emit('error', er);
    pna.nextTick(cb, er);
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function (chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;
  var isBuf = !state.objectMode && _isUint8Array(chunk);

  if (isBuf && !Buffer.isBuffer(chunk)) {
    chunk = _uint8ArrayToBuffer(chunk);
  }

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;

  if (typeof cb !== 'function') cb = nop;

  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
    state.pendingcb++;
    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  }

  return ret;
};

Writable.prototype.cork = function () {
  var state = this._writableState;

  state.corked++;
};

Writable.prototype.uncork = function () {
  var state = this._writableState;

  if (state.corked) {
    state.corked--;

    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  }
};

Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  // node::ParseEncoding() requires lower case.
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  this._writableState.defaultEncoding = encoding;
  return this;
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
    chunk = Buffer.from(chunk, encoding);
  }
  return chunk;
}

Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  if (!isBuf) {
    var newChunk = decodeChunk(state, chunk, encoding);
    if (chunk !== newChunk) {
      isBuf = true;
      encoding = 'buffer';
      chunk = newChunk;
    }
  }
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret) state.needDrain = true;

  if (state.writing || state.corked) {
    var last = state.lastBufferedRequest;
    state.lastBufferedRequest = {
      chunk: chunk,
      encoding: encoding,
      isBuf: isBuf,
      callback: cb,
      next: null
    };
    if (last) {
      last.next = state.lastBufferedRequest;
    } else {
      state.bufferedRequest = state.lastBufferedRequest;
    }
    state.bufferedRequestCount += 1;
  } else {
    doWrite(stream, state, false, len, chunk, encoding, cb);
  }

  return ret;
}

function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  --state.pendingcb;

  if (sync) {
    // defer the callback if we are being called synchronously
    // to avoid piling up things on the stack
    pna.nextTick(cb, er);
    // this can emit finish, and it will always happen
    // after error
    pna.nextTick(finishMaybe, stream, state);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
  } else {
    // the caller expect this to happen before if
    // it is async
    cb(er);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
    // this can emit finish, but finish must
    // always follow error
    finishMaybe(stream, state);
  }
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er) onwriteError(stream, state, sync, er, cb);else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(state);

    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
      clearBuffer(stream, state);
    }

    if (sync) {
      /*<replacement>*/
      asyncWrite(afterWrite, stream, state, finished, cb);
      /*</replacement>*/
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished) onwriteDrain(stream, state);
  state.pendingcb--;
  cb();
  finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}

// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;
  var entry = state.bufferedRequest;

  if (stream._writev && entry && entry.next) {
    // Fast case, write everything using _writev()
    var l = state.bufferedRequestCount;
    var buffer = new Array(l);
    var holder = state.corkedRequestsFree;
    holder.entry = entry;

    var count = 0;
    var allBuffers = true;
    while (entry) {
      buffer[count] = entry;
      if (!entry.isBuf) allBuffers = false;
      entry = entry.next;
      count += 1;
    }
    buffer.allBuffers = allBuffers;

    doWrite(stream, state, true, state.length, buffer, '', holder.finish);

    // doWrite is almost always async, defer these to save a bit of time
    // as the hot path ends with doWrite
    state.pendingcb++;
    state.lastBufferedRequest = null;
    if (holder.next) {
      state.corkedRequestsFree = holder.next;
      holder.next = null;
    } else {
      state.corkedRequestsFree = new CorkedRequest(state);
    }
    state.bufferedRequestCount = 0;
  } else {
    // Slow case, write chunks one-by-one
    while (entry) {
      var chunk = entry.chunk;
      var encoding = entry.encoding;
      var cb = entry.callback;
      var len = state.objectMode ? 1 : chunk.length;

      doWrite(stream, state, false, len, chunk, encoding, cb);
      entry = entry.next;
      state.bufferedRequestCount--;
      // if we didn't call the onwrite immediately, then
      // it means that we need to wait until it does.
      // also, that means that the chunk and cb are currently
      // being processed, so move the buffer counter past them.
      if (state.writing) {
        break;
      }
    }

    if (entry === null) state.lastBufferedRequest = null;
  }

  state.bufferedRequest = entry;
  state.bufferProcessing = false;
}

Writable.prototype._write = function (chunk, encoding, cb) {
  cb(new Error('_write() is not implemented'));
};

Writable.prototype._writev = null;

Writable.prototype.end = function (chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);

  // .end() fully uncorks
  if (state.corked) {
    state.corked = 1;
    this.uncork();
  }

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished) endWritable(this, state, cb);
};

function needFinish(state) {
  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}
function callFinal(stream, state) {
  stream._final(function (err) {
    state.pendingcb--;
    if (err) {
      stream.emit('error', err);
    }
    state.prefinished = true;
    stream.emit('prefinish');
    finishMaybe(stream, state);
  });
}
function prefinish(stream, state) {
  if (!state.prefinished && !state.finalCalled) {
    if (typeof stream._final === 'function') {
      state.pendingcb++;
      state.finalCalled = true;
      pna.nextTick(callFinal, stream, state);
    } else {
      state.prefinished = true;
      stream.emit('prefinish');
    }
  }
}

function finishMaybe(stream, state) {
  var need = needFinish(state);
  if (need) {
    prefinish(stream, state);
    if (state.pendingcb === 0) {
      state.finished = true;
      stream.emit('finish');
    }
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  }
  state.ended = true;
  stream.writable = false;
}

function onCorkedFinish(corkReq, state, err) {
  var entry = corkReq.entry;
  corkReq.entry = null;
  while (entry) {
    var cb = entry.callback;
    state.pendingcb--;
    cb(err);
    entry = entry.next;
  }
  if (state.corkedRequestsFree) {
    state.corkedRequestsFree.next = corkReq;
  } else {
    state.corkedRequestsFree = corkReq;
  }
}

Object.defineProperty(Writable.prototype, 'destroyed', {
  get: function () {
    if (this._writableState === undefined) {
      return false;
    }
    return this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._writableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._writableState.destroyed = value;
  }
});

Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;
Writable.prototype._destroy = function (err, cb) {
  this.end();
  cb(err);
};

/***/ }),

/***/ 620839:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Buffer = __webpack_require__(342692).Buffer;
var util = __webpack_require__(431669);

function copyBuffer(src, target, offset) {
  src.copy(target, offset);
}

module.exports = function () {
  function BufferList() {
    _classCallCheck(this, BufferList);

    this.head = null;
    this.tail = null;
    this.length = 0;
  }

  BufferList.prototype.push = function push(v) {
    var entry = { data: v, next: null };
    if (this.length > 0) this.tail.next = entry;else this.head = entry;
    this.tail = entry;
    ++this.length;
  };

  BufferList.prototype.unshift = function unshift(v) {
    var entry = { data: v, next: this.head };
    if (this.length === 0) this.tail = entry;
    this.head = entry;
    ++this.length;
  };

  BufferList.prototype.shift = function shift() {
    if (this.length === 0) return;
    var ret = this.head.data;
    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
    --this.length;
    return ret;
  };

  BufferList.prototype.clear = function clear() {
    this.head = this.tail = null;
    this.length = 0;
  };

  BufferList.prototype.join = function join(s) {
    if (this.length === 0) return '';
    var p = this.head;
    var ret = '' + p.data;
    while (p = p.next) {
      ret += s + p.data;
    }return ret;
  };

  BufferList.prototype.concat = function concat(n) {
    if (this.length === 0) return Buffer.alloc(0);
    if (this.length === 1) return this.head.data;
    var ret = Buffer.allocUnsafe(n >>> 0);
    var p = this.head;
    var i = 0;
    while (p) {
      copyBuffer(p.data, ret, i);
      i += p.data.length;
      p = p.next;
    }
    return ret;
  };

  return BufferList;
}();

if (util && util.inspect && util.inspect.custom) {
  module.exports.prototype[util.inspect.custom] = function () {
    var obj = util.inspect({ length: this.length });
    return this.constructor.name + ' ' + obj;
  };
}

/***/ }),

/***/ 981906:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
  var _this = this;

  var readableDestroyed = this._readableState && this._readableState.destroyed;
  var writableDestroyed = this._writableState && this._writableState.destroyed;

  if (readableDestroyed || writableDestroyed) {
    if (cb) {
      cb(err);
    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
      pna.nextTick(emitErrorNT, this, err);
    }
    return this;
  }

  // we set destroyed to true before firing error callbacks in order
  // to make it re-entrance safe in case destroy() is called within callbacks

  if (this._readableState) {
    this._readableState.destroyed = true;
  }

  // if this is a duplex stream mark the writable part as destroyed as well
  if (this._writableState) {
    this._writableState.destroyed = true;
  }

  this._destroy(err || null, function (err) {
    if (!cb && err) {
      pna.nextTick(emitErrorNT, _this, err);
      if (_this._writableState) {
        _this._writableState.errorEmitted = true;
      }
    } else if (cb) {
      cb(err);
    }
  });

  return this;
}

function undestroy() {
  if (this._readableState) {
    this._readableState.destroyed = false;
    this._readableState.reading = false;
    this._readableState.ended = false;
    this._readableState.endEmitted = false;
  }

  if (this._writableState) {
    this._writableState.destroyed = false;
    this._writableState.ended = false;
    this._writableState.ending = false;
    this._writableState.finished = false;
    this._writableState.errorEmitted = false;
  }
}

function emitErrorNT(self, err) {
  self.emit('error', err);
}

module.exports = {
  destroy: destroy,
  undestroy: undestroy
};

/***/ }),

/***/ 709540:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(92413);


/***/ }),

/***/ 342692:
/***/ ((module, exports, __webpack_require__) => {

/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__(764293)
var Buffer = buffer.Buffer

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key]
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports)
  exports.Buffer = SafeBuffer
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
}

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size)
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding)
    } else {
      buf.fill(fill)
    }
  } else {
    buf.fill(0)
  }
  return buf
}

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
}

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
}


/***/ }),

/***/ 861655:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413);
if (process.env.READABLE_STREAM === 'disable' && Stream) {
  module.exports = Stream;
  exports = module.exports = Stream.Readable;
  exports.Readable = Stream.Readable;
  exports.Writable = Stream.Writable;
  exports.Duplex = Stream.Duplex;
  exports.Transform = Stream.Transform;
  exports.PassThrough = Stream.PassThrough;
  exports.Stream = Stream;
} else {
  exports = module.exports = __webpack_require__(31099);
  exports.Stream = Stream || exports;
  exports.Readable = exports;
  exports.Writable = __webpack_require__(698984);
  exports.Duplex = __webpack_require__(244778);
  exports.Transform = __webpack_require__(765074);
  exports.PassThrough = __webpack_require__(150559);
}


/***/ }),

/***/ 59446:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var Buffer = __webpack_require__(576044).Buffer;
/*</replacement>*/

var isEncoding = Buffer.isEncoding || function (encoding) {
  encoding = '' + encoding;
  switch (encoding && encoding.toLowerCase()) {
    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
      return true;
    default:
      return false;
  }
};

function _normalizeEncoding(enc) {
  if (!enc) return 'utf8';
  var retried;
  while (true) {
    switch (enc) {
      case 'utf8':
      case 'utf-8':
        return 'utf8';
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return 'utf16le';
      case 'latin1':
      case 'binary':
        return 'latin1';
      case 'base64':
      case 'ascii':
      case 'hex':
        return enc;
      default:
        if (retried) return; // undefined
        enc = ('' + enc).toLowerCase();
        retried = true;
    }
  }
};

// Do not cache `Buffer.isEncoding` when checking encoding names as some
// modules monkey-patch it to support additional encodings
function normalizeEncoding(enc) {
  var nenc = _normalizeEncoding(enc);
  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  return nenc || enc;
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters.
exports.s = StringDecoder;
function StringDecoder(encoding) {
  this.encoding = normalizeEncoding(encoding);
  var nb;
  switch (this.encoding) {
    case 'utf16le':
      this.text = utf16Text;
      this.end = utf16End;
      nb = 4;
      break;
    case 'utf8':
      this.fillLast = utf8FillLast;
      nb = 4;
      break;
    case 'base64':
      this.text = base64Text;
      this.end = base64End;
      nb = 3;
      break;
    default:
      this.write = simpleWrite;
      this.end = simpleEnd;
      return;
  }
  this.lastNeed = 0;
  this.lastTotal = 0;
  this.lastChar = Buffer.allocUnsafe(nb);
}

StringDecoder.prototype.write = function (buf) {
  if (buf.length === 0) return '';
  var r;
  var i;
  if (this.lastNeed) {
    r = this.fillLast(buf);
    if (r === undefined) return '';
    i = this.lastNeed;
    this.lastNeed = 0;
  } else {
    i = 0;
  }
  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  return r || '';
};

StringDecoder.prototype.end = utf8End;

// Returns only complete characters in a Buffer
StringDecoder.prototype.text = utf8Text;

// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
StringDecoder.prototype.fillLast = function (buf) {
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  this.lastNeed -= buf.length;
};

// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
// continuation byte. If an invalid byte is detected, -2 is returned.
function utf8CheckByte(byte) {
  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  return byte >> 6 === 0x02 ? -1 : -2;
}

// Checks at most 3 bytes at the end of a Buffer in order to detect an
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
// needed to complete the UTF-8 character (if applicable) are returned.
function utf8CheckIncomplete(self, buf, i) {
  var j = buf.length - 1;
  if (j < i) return 0;
  var nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 1;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 2;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) {
      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
    }
    return nb;
  }
  return 0;
}

// Validates as many continuation bytes for a multi-byte UTF-8 character as
// needed or are available. If we see a non-continuation byte where we expect
// one, we "replace" the validated continuation bytes we've seen so far with
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
// behavior. The continuation byte check is included three times in the case
// where all of the continuation bytes for a character exist in the same buffer.
// It is also done this way as a slight performance increase instead of using a
// loop.
function utf8CheckExtraBytes(self, buf, p) {
  if ((buf[0] & 0xC0) !== 0x80) {
    self.lastNeed = 0;
    return '\ufffd';
  }
  if (self.lastNeed > 1 && buf.length > 1) {
    if ((buf[1] & 0xC0) !== 0x80) {
      self.lastNeed = 1;
      return '\ufffd';
    }
    if (self.lastNeed > 2 && buf.length > 2) {
      if ((buf[2] & 0xC0) !== 0x80) {
        self.lastNeed = 2;
        return '\ufffd';
      }
    }
  }
}

// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
function utf8FillLast(buf) {
  var p = this.lastTotal - this.lastNeed;
  var r = utf8CheckExtraBytes(this, buf, p);
  if (r !== undefined) return r;
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, p, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, p, 0, buf.length);
  this.lastNeed -= buf.length;
}

// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
// partial character, the character's bytes are buffered until the required
// number of bytes are available.
function utf8Text(buf, i) {
  var total = utf8CheckIncomplete(this, buf, i);
  if (!this.lastNeed) return buf.toString('utf8', i);
  this.lastTotal = total;
  var end = buf.length - (total - this.lastNeed);
  buf.copy(this.lastChar, 0, end);
  return buf.toString('utf8', i, end);
}

// For UTF-8, a replacement character is added when ending on a partial
// character.
function utf8End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + '\ufffd';
  return r;
}

// UTF-16LE typically needs two bytes per character, but even if we have an even
// number of bytes available, we need to check if we end on a leading/high
// surrogate. In that case, we need to wait for the next two bytes in order to
// decode the last character properly.
function utf16Text(buf, i) {
  if ((buf.length - i) % 2 === 0) {
    var r = buf.toString('utf16le', i);
    if (r) {
      var c = r.charCodeAt(r.length - 1);
      if (c >= 0xD800 && c <= 0xDBFF) {
        this.lastNeed = 2;
        this.lastTotal = 4;
        this.lastChar[0] = buf[buf.length - 2];
        this.lastChar[1] = buf[buf.length - 1];
        return r.slice(0, -1);
      }
    }
    return r;
  }
  this.lastNeed = 1;
  this.lastTotal = 2;
  this.lastChar[0] = buf[buf.length - 1];
  return buf.toString('utf16le', i, buf.length - 1);
}

// For UTF-16LE we do not explicitly append special replacement characters if we
// end on a partial character, we simply let v8 handle that.
function utf16End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) {
    var end = this.lastTotal - this.lastNeed;
    return r + this.lastChar.toString('utf16le', 0, end);
  }
  return r;
}

function base64Text(buf, i) {
  var n = (buf.length - i) % 3;
  if (n === 0) return buf.toString('base64', i);
  this.lastNeed = 3 - n;
  this.lastTotal = 3;
  if (n === 1) {
    this.lastChar[0] = buf[buf.length - 1];
  } else {
    this.lastChar[0] = buf[buf.length - 2];
    this.lastChar[1] = buf[buf.length - 1];
  }
  return buf.toString('base64', i, buf.length - n);
}

function base64End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  return r;
}

// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) {
  return buf.toString(this.encoding);
}

function simpleEnd(buf) {
  return buf && buf.length ? this.write(buf) : '';
}

/***/ }),

/***/ 576044:
/***/ ((module, exports, __webpack_require__) => {

/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__(764293)
var Buffer = buffer.Buffer

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key]
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports)
  exports.Buffer = SafeBuffer
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
}

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size)
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding)
    } else {
      buf.fill(fill)
    }
  } else {
    buf.fill(0)
  }
  return buf
}

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
}

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
}


/***/ }),

/***/ 877671:
/***/ ((module) => {

module.exports = hasKeys

function hasKeys(source) {
    return source !== null &&
        (typeof source === "object" ||
        typeof source === "function")
}


/***/ }),

/***/ 80410:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Keys = __webpack_require__(584908)
var hasKeys = __webpack_require__(877671)

module.exports = extend

function extend() {
    var target = {}

    for (var i = 0; i < arguments.length; i++) {
        var source = arguments[i]

        if (!hasKeys(source)) {
            continue
        }

        var keys = Keys(source)

        for (var j = 0; j < keys.length; j++) {
            var name = keys[j]
            target[name] = source[name]
        }
    }

    return target
}


/***/ }),

/***/ 880496:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _require = __webpack_require__(55107),
    HDKey = _require.HDKey;

var Wallet = __webpack_require__(642110);

function EthereumHDKey() {}

/*
 * Horrible wrapping.
 */
function fromHDKey(hdkey) {
  var ret = new EthereumHDKey();
  ret._hdkey = hdkey;
  return ret;
}

EthereumHDKey.fromMasterSeed = function (seedBuffer) {
  return fromHDKey(HDKey.fromMasterSeed(seedBuffer));
};

EthereumHDKey.fromExtendedKey = function (base58key) {
  return fromHDKey(HDKey.fromExtendedKey(base58key));
};

EthereumHDKey.prototype.privateExtendedKey = function () {
  if (!this._hdkey.privateExtendedKey) {
    throw new Error('This is a public key only wallet');
  }
  return this._hdkey.privateExtendedKey;
};

EthereumHDKey.prototype.publicExtendedKey = function () {
  return this._hdkey.publicExtendedKey;
};

EthereumHDKey.prototype.derivePath = function (path) {
  return fromHDKey(this._hdkey.derive(path));
};

EthereumHDKey.prototype.deriveChild = function (index) {
  return fromHDKey(this._hdkey.deriveChild(index));
};

EthereumHDKey.prototype.getWallet = function () {
  if (this._hdkey._privateKey) {
    return Wallet.fromPrivateKey(this._hdkey._privateKey);
  } else {
    return Wallet.fromPublicKey(this._hdkey._publicKey, true);
  }
};

module.exports = EthereumHDKey;

/***/ }),

/***/ 642110:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var Buffer = __webpack_require__(289509).Buffer;
var ethUtil = __webpack_require__(495692);
var crypto = __webpack_require__(676417);
var randomBytes = __webpack_require__(351353);
var scryptsy = __webpack_require__(807370);
var uuidv4 = __webpack_require__(171171);
var bs58check = __webpack_require__(458334);

function assert(val, msg) {
  if (!val) {
    throw new Error(msg || 'Assertion failed');
  }
}

function runCipherBuffer(cipher, data) {
  return Buffer.concat([cipher.update(data), cipher.final()]);
}

var Wallet = function Wallet(priv, pub) {
  if (priv && pub) {
    throw new Error('Cannot supply both a private and a public key to the constructor');
  }

  if (priv && !ethUtil.isValidPrivate(priv)) {
    throw new Error('Private key does not satisfy the curve requirements (ie. it is invalid)');
  }

  if (pub && !ethUtil.isValidPublic(pub)) {
    throw new Error('Invalid public key');
  }

  this._privKey = priv;
  this._pubKey = pub;
};

Object.defineProperty(Wallet.prototype, 'privKey', {
  get: function get() {
    assert(this._privKey, 'This is a public key only wallet');
    return this._privKey;
  }
});

Object.defineProperty(Wallet.prototype, 'pubKey', {
  get: function get() {
    if (!this._pubKey) {
      this._pubKey = ethUtil.privateToPublic(this.privKey);
    }
    return this._pubKey;
  }
});

Wallet.generate = function (icapDirect) {
  if (icapDirect) {
    var max = new ethUtil.BN('088f924eeceeda7fe92e1f5b0fffffffffffffff', 16);
    while (true) {
      var privKey = randomBytes(32);
      if (new ethUtil.BN(ethUtil.privateToAddress(privKey)).lte(max)) {
        return new Wallet(privKey);
      }
    }
  } else {
    return new Wallet(randomBytes(32));
  }
};

Wallet.generateVanityAddress = function (pattern) {
  if ((typeof pattern === 'undefined' ? 'undefined' : _typeof(pattern)) !== 'object') {
    pattern = new RegExp(pattern);
  }

  while (true) {
    var privKey = randomBytes(32);
    var address = ethUtil.privateToAddress(privKey);

    if (pattern.test(address.toString('hex'))) {
      return new Wallet(privKey);
    }
  }
};

Wallet.prototype.getPrivateKey = function () {
  return this.privKey;
};

Wallet.prototype.getPrivateKeyString = function () {
  return ethUtil.bufferToHex(this.getPrivateKey());
};

Wallet.prototype.getPublicKey = function () {
  return this.pubKey;
};

Wallet.prototype.getPublicKeyString = function () {
  return ethUtil.bufferToHex(this.getPublicKey());
};

Wallet.prototype.getAddress = function () {
  return ethUtil.publicToAddress(this.pubKey);
};

Wallet.prototype.getAddressString = function () {
  return ethUtil.bufferToHex(this.getAddress());
};

Wallet.prototype.getChecksumAddressString = function () {
  return ethUtil.toChecksumAddress(this.getAddressString());
};

// https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition
Wallet.prototype.toV3 = function (password, opts) {
  assert(this._privKey, 'This is a public key only wallet');

  opts = opts || {};
  var salt = opts.salt || randomBytes(32);
  var iv = opts.iv || randomBytes(16);

  var derivedKey;
  var kdf = opts.kdf || 'scrypt';
  var kdfparams = {
    dklen: opts.dklen || 32,
    salt: salt.toString('hex')
  };

  if (kdf === 'pbkdf2') {
    kdfparams.c = opts.c || 262144;
    kdfparams.prf = 'hmac-sha256';
    derivedKey = crypto.pbkdf2Sync(Buffer.from(password), salt, kdfparams.c, kdfparams.dklen, 'sha256');
  } else if (kdf === 'scrypt') {
    // FIXME: support progress reporting callback
    kdfparams.n = opts.n || 262144;
    kdfparams.r = opts.r || 8;
    kdfparams.p = opts.p || 1;
    derivedKey = scryptsy(Buffer.from(password), salt, kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen);
  } else {
    throw new Error('Unsupported kdf');
  }

  var cipher = crypto.createCipheriv(opts.cipher || 'aes-128-ctr', derivedKey.slice(0, 16), iv);
  if (!cipher) {
    throw new Error('Unsupported cipher');
  }

  var ciphertext = runCipherBuffer(cipher, this.privKey);

  var mac = ethUtil.keccak256(Buffer.concat([derivedKey.slice(16, 32), Buffer.from(ciphertext, 'hex')]));

  return {
    version: 3,
    id: uuidv4({ random: opts.uuid || randomBytes(16) }),
    address: this.getAddress().toString('hex'),
    crypto: {
      ciphertext: ciphertext.toString('hex'),
      cipherparams: {
        iv: iv.toString('hex')
      },
      cipher: opts.cipher || 'aes-128-ctr',
      kdf: kdf,
      kdfparams: kdfparams,
      mac: mac.toString('hex')
    }
  };
};

Wallet.prototype.getV3Filename = function (timestamp) {
  /*
   * We want a timestamp like 2016-03-15T17-11-33.007598288Z. Date formatting
   * is a pain in Javascript, everbody knows that. We could use moment.js,
   * but decide to do it manually in order to save space.
   *
   * toJSON() returns a pretty close version, so let's use it. It is not UTC though,
   * but does it really matter?
   *
   * Alternative manual way with padding and Date fields: http://stackoverflow.com/a/7244288/4964819
   *
   */
  var ts = timestamp ? new Date(timestamp) : new Date();

  return ['UTC--', ts.toJSON().replace(/:/g, '-'), '--', this.getAddress().toString('hex')].join('');
};

Wallet.prototype.toV3String = function (password, opts) {
  return JSON.stringify(this.toV3(password, opts));
};

Wallet.fromPublicKey = function (pub, nonStrict) {
  if (nonStrict) {
    pub = ethUtil.importPublic(pub);
  }
  return new Wallet(null, pub);
};

Wallet.fromExtendedPublicKey = function (pub) {
  assert(pub.slice(0, 4) === 'xpub', 'Not an extended public key');
  pub = bs58check.decode(pub).slice(45);
  // Convert to an Ethereum public key
  return Wallet.fromPublicKey(pub, true);
};

Wallet.fromPrivateKey = function (priv) {
  return new Wallet(priv);
};

Wallet.fromExtendedPrivateKey = function (priv) {
  assert(priv.slice(0, 4) === 'xprv', 'Not an extended private key');
  var tmp = bs58check.decode(priv);
  assert(tmp[45] === 0, 'Invalid extended private key');
  return Wallet.fromPrivateKey(tmp.slice(46));
};

// https://github.com/ethereum/go-ethereum/wiki/Passphrase-protected-key-store-spec
Wallet.fromV1 = function (input, password) {
  assert(typeof password === 'string');
  var json = (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' ? input : JSON.parse(input);

  if (json.Version !== '1') {
    throw new Error('Not a V1 wallet');
  }

  if (json.Crypto.KeyHeader.Kdf !== 'scrypt') {
    throw new Error('Unsupported key derivation scheme');
  }

  var kdfparams = json.Crypto.KeyHeader.KdfParams;
  var derivedKey = scryptsy(Buffer.from(password), Buffer.from(json.Crypto.Salt, 'hex'), kdfparams.N, kdfparams.R, kdfparams.P, kdfparams.DkLen);

  var ciphertext = Buffer.from(json.Crypto.CipherText, 'hex');

  var mac = ethUtil.keccak256(Buffer.concat([derivedKey.slice(16, 32), ciphertext]));

  if (mac.toString('hex') !== json.Crypto.MAC) {
    throw new Error('Key derivation failed - possibly wrong passphrase');
  }

  var decipher = crypto.createDecipheriv('aes-128-cbc', ethUtil.keccak256(derivedKey.slice(0, 16)).slice(0, 16), Buffer.from(json.Crypto.IV, 'hex'));
  var seed = runCipherBuffer(decipher, ciphertext);

  return new Wallet(seed);
};

Wallet.fromV3 = function (input, password, nonStrict) {
  assert(typeof password === 'string');
  var json = (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' ? input : JSON.parse(nonStrict ? input.toLowerCase() : input);

  if (json.version !== 3) {
    throw new Error('Not a V3 wallet');
  }

  var derivedKey;
  var kdfparams;
  if (json.crypto.kdf === 'scrypt') {
    kdfparams = json.crypto.kdfparams;

    // FIXME: support progress reporting callback
    derivedKey = scryptsy(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen);
  } else if (json.crypto.kdf === 'pbkdf2') {
    kdfparams = json.crypto.kdfparams;

    if (kdfparams.prf !== 'hmac-sha256') {
      throw new Error('Unsupported parameters to PBKDF2');
    }

    derivedKey = crypto.pbkdf2Sync(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256');
  } else {
    throw new Error('Unsupported key derivation scheme');
  }

  var ciphertext = Buffer.from(json.crypto.ciphertext, 'hex');

  var mac = ethUtil.keccak256(Buffer.concat([derivedKey.slice(16, 32), ciphertext]));
  if (mac.toString('hex') !== json.crypto.mac) {
    throw new Error('Key derivation failed - possibly wrong passphrase');
  }

  var decipher = crypto.createDecipheriv(json.crypto.cipher, derivedKey.slice(0, 16), Buffer.from(json.crypto.cipherparams.iv, 'hex'));
  var seed = runCipherBuffer(decipher, ciphertext);

  return new Wallet(seed);
};

/*
 * Based on https://github.com/ethereum/pyethsaletool/blob/master/pyethsaletool.py
 * JSON fields: encseed, ethaddr, btcaddr, email
 */
Wallet.fromEthSale = function (input, password) {
  assert(typeof password === 'string');
  var json = (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' ? input : JSON.parse(input);

  var encseed = Buffer.from(json.encseed, 'hex');

  // key derivation
  var derivedKey = crypto.pbkdf2Sync(password, password, 2000, 32, 'sha256').slice(0, 16);

  // seed decoding (IV is first 16 bytes)
  // NOTE: crypto (derived from openssl) when used with aes-*-cbc will handle PKCS#7 padding internally
  //       see also http://stackoverflow.com/a/31614770/4964819
  var decipher = crypto.createDecipheriv('aes-128-cbc', derivedKey, encseed.slice(0, 16));
  var seed = runCipherBuffer(decipher, encseed.slice(16));

  var wallet = new Wallet(ethUtil.keccak256(seed));
  if (wallet.getAddress().toString('hex') !== json.ethaddr) {
    throw new Error('Decoded key mismatch - possibly wrong passphrase');
  }
  return wallet;
};

module.exports = Wallet;

/***/ }),

/***/ 290482:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(682536);
var hash_1 = __webpack_require__(537131);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 682536:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 132437:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 537131:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(705038);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(682536);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 495692:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(132437));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(290482));
/**
 * Hash functions
 */
__export(__webpack_require__(537131));
/**
 * ECDSA signature
 */
__export(__webpack_require__(875429));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(682536));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(824174));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 824174:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(682536);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 875429:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(682536);
var hash_1 = __webpack_require__(537131);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 974434:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(391320)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 705038:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(974434)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(728208)
}


/***/ }),

/***/ 728208:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(391320)(__webpack_require__(30029))


/***/ }),

/***/ 391320:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(610926)
const createShake = __webpack_require__(176601)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 610926:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 176601:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 845224:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 30029:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(845224)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 815552:
/***/ ((module) => {

var toString = {}.toString;

module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};


/***/ }),

/***/ 133132:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var encodings = __webpack_require__(953166);

module.exports = Codec;

function Codec(opts){
  this.opts = opts || {};
  this.encodings = encodings;
}

Codec.prototype._encoding = function(encoding){
  if (typeof encoding == 'string') encoding = encodings[encoding];
  if (!encoding) encoding = encodings.id;
  return encoding;
};

Codec.prototype._keyEncoding = function(opts, batchOpts){
  return this._encoding(batchOpts && batchOpts.keyEncoding
    || opts && opts.keyEncoding
    || this.opts.keyEncoding);
};

Codec.prototype._valueEncoding = function(opts, batchOpts){
  return this._encoding(
    batchOpts && (batchOpts.valueEncoding || batchOpts.encoding)
    || opts && (opts.valueEncoding || opts.encoding)
    || (this.opts.valueEncoding || this.opts.encoding));
};

Codec.prototype.encodeKey = function(key, opts, batchOpts){
  return this._keyEncoding(opts, batchOpts).encode(key);
};

Codec.prototype.encodeValue = function(value, opts, batchOpts){
  return this._valueEncoding(opts, batchOpts).encode(value);
};

Codec.prototype.decodeKey = function(key, opts){
  return this._keyEncoding(opts).decode(key);
};

Codec.prototype.decodeValue = function(value, opts){
  return this._valueEncoding(opts).decode(value);
};

Codec.prototype.encodeBatch = function(ops, opts){
  var self = this;

  return ops.map(function(_op){
    var op = {
      type: _op.type,
      key: self.encodeKey(_op.key, opts, _op)
    };
    if (self.keyAsBuffer(opts, _op)) op.keyEncoding = 'binary';
    if (_op.prefix) op.prefix = _op.prefix;
    if ('value' in _op) {
      op.value = self.encodeValue(_op.value, opts, _op);
      if (self.valueAsBuffer(opts, _op)) op.valueEncoding = 'binary';
    }
    return op;
  });
};

var ltgtKeys = ['lt', 'gt', 'lte', 'gte', 'start', 'end'];

Codec.prototype.encodeLtgt = function(ltgt){
  var self = this;
  var ret = {};
  Object.keys(ltgt).forEach(function(key){
    ret[key] = ltgtKeys.indexOf(key) > -1
      ? self.encodeKey(ltgt[key], ltgt)
      : ltgt[key]
  });
  return ret;
};

Codec.prototype.createStreamDecoder = function(opts){
  var self = this;

  if (opts.keys && opts.values) {
    return function(key, value){
      return {
        key: self.decodeKey(key, opts),
        value: self.decodeValue(value, opts)
      };
    };
  } else if (opts.keys) {
    return function(key) {
      return self.decodeKey(key, opts);
    }; 
  } else if (opts.values) {
    return function(_, value){
      return self.decodeValue(value, opts);
    }
  } else {
    return function(){};
  }
};

Codec.prototype.keyAsBuffer = function(opts){
  return this._keyEncoding(opts).buffer;
};

Codec.prototype.valueAsBuffer = function(opts){
  return this._valueEncoding(opts).buffer;
};



/***/ }),

/***/ 953166:
/***/ ((__unused_webpack_module, exports) => {

exports.utf8 = exports["utf-8"] = {
  encode: function(data){
    return isBinary(data)
      ? data
      : String(data);
  },
  decode: function(data){
    return typeof data === 'string'
      ? data
      : String(data)
  },
  buffer: false,
  type: 'utf8'
};

exports.json = {
  encode: JSON.stringify,
  decode: JSON.parse,
  buffer: false,
  type: 'json'
};

exports.binary = {
  encode: function(data){
    return isBinary(data)
      ? data
      : new Buffer(data);      
  },
  decode: identity,
  buffer: true,
  type: 'binary'
};

exports.none = {
  encode: identity,
  decode: identity,
  buffer: false,
  type: 'id'
};

exports.id = exports.none;

var bufferEncodings = [
  'hex',
  'ascii',
  'base64',
  'ucs2',
  'ucs-2',
  'utf16le',
  'utf-16le'
];

bufferEncodings.forEach(function(type){
  exports[type] = {
    encode: function(data){
      return isBinary(data)
        ? data
        : new Buffer(data, type);
    },
    decode: function(buffer){
      return buffer.toString(type);
    },
    buffer: true,
    type: type
  };
});

function identity(value){
  return value;
}

function isBinary(data){
  return data === undefined
    || data === null
    || Buffer.isBuffer(data);
}


/***/ }),

/***/ 818834:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2017 LevelUP contributors
 * See list at <https://github.com/rvagg/node-levelup#contributing>
 * MIT License
 * <https://github.com/rvagg/node-levelup/blob/master/LICENSE.md>
 */

var createError   = __webpack_require__(547138).create
  , LevelUPError  = createError('LevelUPError')
  , NotFoundError = createError('NotFoundError', LevelUPError)

NotFoundError.prototype.notFound = true
NotFoundError.prototype.status   = 404

module.exports = {
    LevelUPError        : LevelUPError
  , InitializationError : createError('InitializationError', LevelUPError)
  , OpenError           : createError('OpenError', LevelUPError)
  , ReadError           : createError('ReadError', LevelUPError)
  , WriteError          : createError('WriteError', LevelUPError)
  , NotFoundError       : NotFoundError
  , EncodingError       : createError('EncodingError', LevelUPError)
}


/***/ }),

/***/ 640915:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var inherits = __webpack_require__(394378);
var Readable = __webpack_require__(987472).Readable;
var extend = __webpack_require__(347529);
var EncodingError = __webpack_require__(817519).EncodingError;

module.exports = ReadStream;
inherits(ReadStream, Readable);

function ReadStream(iterator, options){
  if (!(this instanceof ReadStream)) return new ReadStream(iterator, options);
  Readable.call(this, extend(options, {
    objectMode: true
  }));
  this._iterator = iterator;
  this._destroyed = false;
  this._decoder = null;
  if (options && options.decoder) this._decoder = options.decoder;
  this.on('end', this._cleanup.bind(this));
}

ReadStream.prototype._read = function(){
  var self = this;
  if (this._destroyed) return;

  this._iterator.next(function(err, key, value){
    if (self._destroyed) return;
    if (err) return self.emit('error', err);
    if (key === undefined && value === undefined) {
      self.push(null);
    } else {
      if (!self._decoder) return self.push({ key: key, value: value });

      try {
        var value = self._decoder(key, value);
      } catch (err) {
        self.emit('error', new EncodingError(err));
        self.push(null);
        return;
      }
      self.push(value);
    }
  });
};

ReadStream.prototype.destroy =
ReadStream.prototype._cleanup = function(){
  var self = this;
  if (this._destroyed) return;
  this._destroyed = true;

  this._iterator.end(function(err){
    if (err) return self.emit('error', err);
    self.emit('close');
  });
};



/***/ }),

/***/ 619059:
/***/ ((module) => {

module.exports = Array.isArray || function (arr) {
  return Object.prototype.toString.call(arr) == '[object Array]';
};


/***/ }),

/***/ 817519:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/* Copyright (c) 2012-2017 LevelUP contributors
 * See list at <https://github.com/rvagg/node-levelup#contributing>
 * MIT License
 * <https://github.com/rvagg/node-levelup/blob/master/LICENSE.md>
 */

var createError = __webpack_require__(547138).create
var LevelUPError = createError('LevelUPError')
var NotFoundError = createError('NotFoundError', LevelUPError)

NotFoundError.prototype.notFound = true
NotFoundError.prototype.status = 404

module.exports = {
  LevelUPError: LevelUPError,
  InitializationError: createError('InitializationError', LevelUPError),
  OpenError: createError('OpenError', LevelUPError),
  ReadError: createError('ReadError', LevelUPError),
  WriteError: createError('WriteError', LevelUPError),
  NotFoundError: NotFoundError,
  EncodingError: createError('EncodingError', LevelUPError)
}


/***/ }),

/***/ 615353:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.

module.exports = Duplex;

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) keys.push(key);
  return keys;
}
/*</replacement>*/


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(234462);
var Writable = __webpack_require__(651746);

util.inherits(Duplex, Readable);

forEach(objectKeys(Writable.prototype), function(method) {
  if (!Duplex.prototype[method])
    Duplex.prototype[method] = Writable.prototype[method];
});

function Duplex(options) {
  if (!(this instanceof Duplex))
    return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false)
    this.readable = false;

  if (options && options.writable === false)
    this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false)
    this.allowHalfOpen = false;

  this.once('end', onend);
}

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended)
    return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  process.nextTick(this.end.bind(this));
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}


/***/ }),

/***/ 1668:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.

module.exports = PassThrough;

var Transform = __webpack_require__(579581);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough))
    return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function(chunk, encoding, cb) {
  cb(null, chunk);
};


/***/ }),

/***/ 234462:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(619059);
/*</replacement>*/


/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Readable.ReadableState = ReadableState;

var EE = __webpack_require__(128614).EventEmitter;

/*<replacement>*/
if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

var Stream = __webpack_require__(92413);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var StringDecoder;


/*<replacement>*/
var debug = __webpack_require__(431669);
if (debug && debug.debuglog) {
  debug = debug.debuglog('stream');
} else {
  debug = function () {};
}
/*</replacement>*/


util.inherits(Readable, Stream);

function ReadableState(options, stream) {
  var Duplex = __webpack_require__(615353);

  options = options || {};

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  var defaultHwm = options.objectMode ? 16 : 16 * 1024;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.buffer = [];
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = null;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;


  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  if (stream instanceof Duplex)
    this.objectMode = this.objectMode || !!options.readableObjectMode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // when piping, we only care about 'readable' events that happen
  // after read()ing all the bytes and not getting any pushback.
  this.ranOut = false;

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder)
      StringDecoder = __webpack_require__(318559)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  var Duplex = __webpack_require__(615353);

  if (!(this instanceof Readable))
    return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  Stream.call(this);
}

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function(chunk, encoding) {
  var state = this._readableState;

  if (util.isString(chunk) && !state.objectMode) {
    encoding = encoding || state.defaultEncoding;
    if (encoding !== state.encoding) {
      chunk = new Buffer(chunk, encoding);
      encoding = '';
    }
  }

  return readableAddChunk(this, state, chunk, encoding, false);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function(chunk) {
  var state = this._readableState;
  return readableAddChunk(this, state, chunk, '', true);
};

function readableAddChunk(stream, state, chunk, encoding, addToFront) {
  var er = chunkInvalid(state, chunk);
  if (er) {
    stream.emit('error', er);
  } else if (util.isNullOrUndefined(chunk)) {
    state.reading = false;
    if (!state.ended)
      onEofChunk(stream, state);
  } else if (state.objectMode || chunk && chunk.length > 0) {
    if (state.ended && !addToFront) {
      var e = new Error('stream.push() after EOF');
      stream.emit('error', e);
    } else if (state.endEmitted && addToFront) {
      var e = new Error('stream.unshift() after end event');
      stream.emit('error', e);
    } else {
      if (state.decoder && !addToFront && !encoding)
        chunk = state.decoder.write(chunk);

      if (!addToFront)
        state.reading = false;

      // if we want the data now, just emit it.
      if (state.flowing && state.length === 0 && !state.sync) {
        stream.emit('data', chunk);
        stream.read(0);
      } else {
        // update the buffer info.
        state.length += state.objectMode ? 1 : chunk.length;
        if (addToFront)
          state.buffer.unshift(chunk);
        else
          state.buffer.push(chunk);

        if (state.needReadable)
          emitReadable(stream);
      }

      maybeReadMore(stream, state);
    }
  } else if (!addToFront) {
    state.reading = false;
  }

  return needMoreData(state);
}



// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended &&
         (state.needReadable ||
          state.length < state.highWaterMark ||
          state.length === 0);
}

// backwards compatibility.
Readable.prototype.setEncoding = function(enc) {
  if (!StringDecoder)
    StringDecoder = __webpack_require__(318559)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
  return this;
};

// Don't raise the hwm > 128MB
var MAX_HWM = 0x800000;
function roundUpToNextPowerOf2(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2
    n--;
    for (var p = 1; p < 32; p <<= 1) n |= n >> p;
    n++;
  }
  return n;
}

function howMuchToRead(n, state) {
  if (state.length === 0 && state.ended)
    return 0;

  if (state.objectMode)
    return n === 0 ? 0 : 1;

  if (isNaN(n) || util.isNull(n)) {
    // only flow one buffer at a time
    if (state.flowing && state.buffer.length)
      return state.buffer[0].length;
    else
      return state.length;
  }

  if (n <= 0)
    return 0;

  // If we're asking for more than the target buffer level,
  // then raise the water mark.  Bump up to the next highest
  // power of 2, to prevent increasing it excessively in tiny
  // amounts.
  if (n > state.highWaterMark)
    state.highWaterMark = roundUpToNextPowerOf2(n);

  // don't have that much.  return null, unless we've ended.
  if (n > state.length) {
    if (!state.ended) {
      state.needReadable = true;
      return 0;
    } else
      return state.length;
  }

  return n;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function(n) {
  debug('read', n);
  var state = this._readableState;
  var nOrig = n;

  if (!util.isNumber(n) || n > 0)
    state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 &&
      state.needReadable &&
      (state.length >= state.highWaterMark || state.ended)) {
    debug('read: emitReadable', state.length, state.ended);
    if (state.length === 0 && state.ended)
      endReadable(this);
    else
      emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    if (state.length === 0)
      endReadable(this);
    return null;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;
  debug('need readable', doRead);

  // if we currently have less than the highWaterMark, then also read some
  if (state.length === 0 || state.length - n < state.highWaterMark) {
    doRead = true;
    debug('length less than watermark', doRead);
  }

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading) {
    doRead = false;
    debug('reading or ended', doRead);
  }

  if (doRead) {
    debug('do read');
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0)
      state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
  }

  // If _read pushed data synchronously, then `reading` will be false,
  // and we need to re-evaluate how much data we can return to the user.
  if (doRead && !state.reading)
    n = howMuchToRead(nOrig, state);

  var ret;
  if (n > 0)
    ret = fromList(n, state);
  else
    ret = null;

  if (util.isNull(ret)) {
    state.needReadable = true;
    n = 0;
  }

  state.length -= n;

  // If we have nothing in the buffer, then we want to know
  // as soon as we *do* get something into the buffer.
  if (state.length === 0 && !state.ended)
    state.needReadable = true;

  // If we tried to read() past the EOF, then emit end on the next tick.
  if (nOrig !== n && state.ended && state.length === 0)
    endReadable(this);

  if (!util.isNull(ret))
    this.emit('data', ret);

  return ret;
};

function chunkInvalid(state, chunk) {
  var er = null;
  if (!util.isBuffer(chunk) &&
      !util.isString(chunk) &&
      !util.isNullOrUndefined(chunk) &&
      !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}


function onEofChunk(stream, state) {
  if (state.decoder && !state.ended) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // emit 'readable' now to make sure it gets picked up.
  emitReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (!state.emittedReadable) {
    debug('emitReadable', state.flowing);
    state.emittedReadable = true;
    if (state.sync)
      process.nextTick(function() {
        emitReadable_(stream);
      });
    else
      emitReadable_(stream);
  }
}

function emitReadable_(stream) {
  debug('emit readable');
  stream.emit('readable');
  flow(stream);
}


// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    process.nextTick(function() {
      maybeReadMore_(stream, state);
    });
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended &&
         state.length < state.highWaterMark) {
    debug('maybeReadMore read 0');
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;
    else
      len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function(n) {
  this.emit('error', new Error('not implemented'));
};

Readable.prototype.pipe = function(dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;
  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);

  var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
              dest !== process.stdout &&
              dest !== process.stderr;

  var endFn = doEnd ? onend : cleanup;
  if (state.endEmitted)
    process.nextTick(endFn);
  else
    src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable) {
    debug('onunpipe');
    if (readable === src) {
      cleanup();
    }
  }

  function onend() {
    debug('onend');
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  function cleanup() {
    debug('cleanup');
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', cleanup);
    src.removeListener('data', ondata);

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (state.awaitDrain &&
        (!dest._writableState || dest._writableState.needDrain))
      ondrain();
  }

  src.on('data', ondata);
  function ondata(chunk) {
    debug('ondata');
    var ret = dest.write(chunk);
    if (false === ret) {
      debug('false write response, pause',
            src._readableState.awaitDrain);
      src._readableState.awaitDrain++;
      src.pause();
    }
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    debug('onerror', er);
    unpipe();
    dest.removeListener('error', onerror);
    if (EE.listenerCount(dest, 'error') === 0)
      dest.emit('error', er);
  }
  // This is a brutally ugly hack to make sure that our error handler
  // is attached before any userland ones.  NEVER DO THIS.
  if (!dest._events || !dest._events.error)
    dest.on('error', onerror);
  else if (isArray(dest._events.error))
    dest._events.error.unshift(onerror);
  else
    dest._events.error = [onerror, dest._events.error];



  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    debug('onfinish');
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    debug('unpipe');
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    debug('pipe resume');
    src.resume();
  }

  return dest;
};

function pipeOnDrain(src) {
  return function() {
    var state = src._readableState;
    debug('pipeOnDrain', state.awaitDrain);
    if (state.awaitDrain)
      state.awaitDrain--;
    if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
      state.flowing = true;
      flow(src);
    }
  };
}


Readable.prototype.unpipe = function(dest) {
  var state = this._readableState;

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0)
    return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes)
      return this;

    if (!dest)
      dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;
    if (dest)
      dest.emit('unpipe', this);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;

    for (var i = 0; i < len; i++)
      dests[i].emit('unpipe', this);
    return this;
  }

  // try to find the right one.
  var i = indexOf(state.pipes, dest);
  if (i === -1)
    return this;

  state.pipes.splice(i, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1)
    state.pipes = state.pipes[0];

  dest.emit('unpipe', this);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function(ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  // If listening to data, and it has not explicitly been paused,
  // then call resume to start the flow of data on the next tick.
  if (ev === 'data' && false !== this._readableState.flowing) {
    this.resume();
  }

  if (ev === 'readable' && this.readable) {
    var state = this._readableState;
    if (!state.readableListening) {
      state.readableListening = true;
      state.emittedReadable = false;
      state.needReadable = true;
      if (!state.reading) {
        var self = this;
        process.nextTick(function() {
          debug('readable nexttick read 0');
          self.read(0);
        });
      } else if (state.length) {
        emitReadable(this, state);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function() {
  var state = this._readableState;
  if (!state.flowing) {
    debug('resume');
    state.flowing = true;
    if (!state.reading) {
      debug('resume read 0');
      this.read(0);
    }
    resume(this, state);
  }
  return this;
};

function resume(stream, state) {
  if (!state.resumeScheduled) {
    state.resumeScheduled = true;
    process.nextTick(function() {
      resume_(stream, state);
    });
  }
}

function resume_(stream, state) {
  state.resumeScheduled = false;
  stream.emit('resume');
  flow(stream);
  if (state.flowing && !state.reading)
    stream.read(0);
}

Readable.prototype.pause = function() {
  debug('call pause flowing=%j', this._readableState.flowing);
  if (false !== this._readableState.flowing) {
    debug('pause');
    this._readableState.flowing = false;
    this.emit('pause');
  }
  return this;
};

function flow(stream) {
  var state = stream._readableState;
  debug('flow', state.flowing);
  if (state.flowing) {
    do {
      var chunk = stream.read();
    } while (null !== chunk && state.flowing);
  }
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function(stream) {
  var state = this._readableState;
  var paused = false;

  var self = this;
  stream.on('end', function() {
    debug('wrapped end');
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length)
        self.push(chunk);
    }

    self.push(null);
  });

  stream.on('data', function(chunk) {
    debug('wrapped data');
    if (state.decoder)
      chunk = state.decoder.write(chunk);
    if (!chunk || !state.objectMode && !chunk.length)
      return;

    var ret = self.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
      this[i] = function(method) { return function() {
        return stream[method].apply(stream, arguments);
      }}(i);
    }
  }

  // proxy certain important events.
  var events = ['error', 'close', 'destroy', 'pause', 'resume'];
  forEach(events, function(ev) {
    stream.on(ev, self.emit.bind(self, ev));
  });

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  self._read = function(n) {
    debug('wrapped _read', n);
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return self;
};



// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
function fromList(n, state) {
  var list = state.buffer;
  var length = state.length;
  var stringMode = !!state.decoder;
  var objectMode = !!state.objectMode;
  var ret;

  // nothing in the list, definitely empty.
  if (list.length === 0)
    return null;

  if (length === 0)
    ret = null;
  else if (objectMode)
    ret = list.shift();
  else if (!n || n >= length) {
    // read it all, truncate the array.
    if (stringMode)
      ret = list.join('');
    else
      ret = Buffer.concat(list, length);
    list.length = 0;
  } else {
    // read just some of it.
    if (n < list[0].length) {
      // just take a part of the first list item.
      // slice is the same for buffers and strings.
      var buf = list[0];
      ret = buf.slice(0, n);
      list[0] = buf.slice(n);
    } else if (n === list[0].length) {
      // first list is a perfect match
      ret = list.shift();
    } else {
      // complex case.
      // we have enough to cover it, but it spans past the first buffer.
      if (stringMode)
        ret = '';
      else
        ret = new Buffer(n);

      var c = 0;
      for (var i = 0, l = list.length; i < l && c < n; i++) {
        var buf = list[0];
        var cpy = Math.min(n - c, buf.length);

        if (stringMode)
          ret += buf.slice(0, cpy);
        else
          buf.copy(ret, c, 0, cpy);

        if (cpy < buf.length)
          list[0] = buf.slice(cpy);
        else
          list.shift();

        c += cpy;
      }
    }
  }

  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0)
    throw new Error('endReadable called on non-empty stream');

  if (!state.endEmitted) {
    state.ended = true;
    process.nextTick(function() {
      // Check that we didn't get one last unshift.
      if (!state.endEmitted && state.length === 0) {
        state.endEmitted = true;
        stream.readable = false;
        stream.emit('end');
      }
    });
  }
}

function forEach (xs, f) {
  for (var i = 0, l = xs.length; i < l; i++) {
    f(xs[i], i);
  }
}

function indexOf (xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}


/***/ }),

/***/ 579581:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.


// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.

module.exports = Transform;

var Duplex = __webpack_require__(615353);

/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);


function TransformState(options, stream) {
  this.afterTransform = function(er, data) {
    return afterTransform(stream, er, data);
  };

  this.needTransform = false;
  this.transforming = false;
  this.writecb = null;
  this.writechunk = null;
}

function afterTransform(stream, er, data) {
  var ts = stream._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb)
    return stream.emit('error', new Error('no writecb in Transform class'));

  ts.writechunk = null;
  ts.writecb = null;

  if (!util.isNullOrUndefined(data))
    stream.push(data);

  if (cb)
    cb(er);

  var rs = stream._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    stream._read(rs.highWaterMark);
  }
}


function Transform(options) {
  if (!(this instanceof Transform))
    return new Transform(options);

  Duplex.call(this, options);

  this._transformState = new TransformState(options, this);

  // when the writable side finishes, then flush out anything remaining.
  var stream = this;

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  this.once('prefinish', function() {
    if (util.isFunction(this._flush))
      this._flush(function(er) {
        done(stream, er);
      });
    else
      done(stream);
  });
}

Transform.prototype.push = function(chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function(chunk, encoding, cb) {
  throw new Error('not implemented');
};

Transform.prototype._write = function(chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform ||
        rs.needReadable ||
        rs.length < rs.highWaterMark)
      this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
  var ts = this._transformState;

  if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};


function done(stream, er) {
  if (er)
    return stream.emit('error', er);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  var ws = stream._writableState;
  var ts = stream._transformState;

  if (ws.length)
    throw new Error('calling transform done when ws.length != 0');

  if (ts.transforming)
    throw new Error('calling transform done when still transforming');

  return stream.push(null);
}


/***/ }),

/***/ 651746:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, cb), and it'll handle all
// the drain event emission and buffering.

module.exports = Writable;

/*<replacement>*/
var Buffer = __webpack_require__(764293).Buffer;
/*</replacement>*/

Writable.WritableState = WritableState;


/*<replacement>*/
var util = __webpack_require__(316497);
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Stream = __webpack_require__(92413);

util.inherits(Writable, Stream);

function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
}

function WritableState(options, stream) {
  var Duplex = __webpack_require__(615353);

  options = options || {};

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  var defaultHwm = options.objectMode ? 16 : 16 * 1024;
  this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  if (stream instanceof Duplex)
    this.objectMode = this.objectMode || !!options.writableObjectMode;

  // cast to ints.
  this.highWaterMark = ~~this.highWaterMark;

  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // when true all writes will be buffered until .uncork() call
  this.corked = 0;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function(er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.buffer = [];

  // number of pending user-supplied write callbacks
  // this must be 0 before 'finish' can be emitted
  this.pendingcb = 0;

  // emit prefinish if the only thing we're waiting for is _write cbs
  // This is relevant for synchronous Transform streams
  this.prefinished = false;

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;
}

function Writable(options) {
  var Duplex = __webpack_require__(615353);

  // Writable ctor is applied to Duplexes, though they're not
  // instanceof Writable, they're instanceof Readable.
  if (!(this instanceof Writable) && !(this instanceof Duplex))
    return new Writable(options);

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function() {
  this.emit('error', new Error('Cannot pipe. Not readable.'));
};


function writeAfterEnd(stream, state, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  process.nextTick(function() {
    cb(er);
  });
}

// If we get something that is not a buffer, string, null, or undefined,
// and we're not in objectMode, then that's an error.
// Otherwise stream chunks are all considered to be of length=1, and the
// watermarks determine how many objects to keep in the buffer, rather than
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  if (!util.isBuffer(chunk) &&
      !util.isString(chunk) &&
      !util.isNullOrUndefined(chunk) &&
      !state.objectMode) {
    var er = new TypeError('Invalid non-string/buffer chunk');
    stream.emit('error', er);
    process.nextTick(function() {
      cb(er);
    });
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function(chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;

  if (util.isFunction(encoding)) {
    cb = encoding;
    encoding = null;
  }

  if (util.isBuffer(chunk))
    encoding = 'buffer';
  else if (!encoding)
    encoding = state.defaultEncoding;

  if (!util.isFunction(cb))
    cb = function() {};

  if (state.ended)
    writeAfterEnd(this, state, cb);
  else if (validChunk(this, state, chunk, cb)) {
    state.pendingcb++;
    ret = writeOrBuffer(this, state, chunk, encoding, cb);
  }

  return ret;
};

Writable.prototype.cork = function() {
  var state = this._writableState;

  state.corked++;
};

Writable.prototype.uncork = function() {
  var state = this._writableState;

  if (state.corked) {
    state.corked--;

    if (!state.writing &&
        !state.corked &&
        !state.finished &&
        !state.bufferProcessing &&
        state.buffer.length)
      clearBuffer(this, state);
  }
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode &&
      state.decodeStrings !== false &&
      util.isString(chunk)) {
    chunk = new Buffer(chunk, encoding);
  }
  return chunk;
}

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, chunk, encoding, cb) {
  chunk = decodeChunk(state, chunk, encoding);
  if (util.isBuffer(chunk))
    encoding = 'buffer';
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret)
    state.needDrain = true;

  if (state.writing || state.corked)
    state.buffer.push(new WriteReq(chunk, encoding, cb));
  else
    doWrite(stream, state, false, len, chunk, encoding, cb);

  return ret;
}

function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  if (writev)
    stream._writev(chunk, state.onwrite);
  else
    stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  if (sync)
    process.nextTick(function() {
      state.pendingcb--;
      cb(er);
    });
  else {
    state.pendingcb--;
    cb(er);
  }

  stream._writableState.errorEmitted = true;
  stream.emit('error', er);
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er)
    onwriteError(stream, state, sync, er, cb);
  else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(stream, state);

    if (!finished &&
        !state.corked &&
        !state.bufferProcessing &&
        state.buffer.length) {
      clearBuffer(stream, state);
    }

    if (sync) {
      process.nextTick(function() {
        afterWrite(stream, state, finished, cb);
      });
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished)
    onwriteDrain(stream, state);
  state.pendingcb--;
  cb();
  finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}


// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;

  if (stream._writev && state.buffer.length > 1) {
    // Fast case, write everything using _writev()
    var cbs = [];
    for (var c = 0; c < state.buffer.length; c++)
      cbs.push(state.buffer[c].callback);

    // count the one we are adding, as well.
    // TODO(isaacs) clean this up
    state.pendingcb++;
    doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
      for (var i = 0; i < cbs.length; i++) {
        state.pendingcb--;
        cbs[i](err);
      }
    });

    // Clear buffer
    state.buffer = [];
  } else {
    // Slow case, write chunks one-by-one
    for (var c = 0; c < state.buffer.length; c++) {
      var entry = state.buffer[c];
      var chunk = entry.chunk;
      var encoding = entry.encoding;
      var cb = entry.callback;
      var len = state.objectMode ? 1 : chunk.length;

      doWrite(stream, state, false, len, chunk, encoding, cb);

      // if we didn't call the onwrite immediately, then
      // it means that we need to wait until it does.
      // also, that means that the chunk and cb are currently
      // being processed, so move the buffer counter past them.
      if (state.writing) {
        c++;
        break;
      }
    }

    if (c < state.buffer.length)
      state.buffer = state.buffer.slice(c);
    else
      state.buffer.length = 0;
  }

  state.bufferProcessing = false;
}

Writable.prototype._write = function(chunk, encoding, cb) {
  cb(new Error('not implemented'));

};

Writable.prototype._writev = null;

Writable.prototype.end = function(chunk, encoding, cb) {
  var state = this._writableState;

  if (util.isFunction(chunk)) {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (util.isFunction(encoding)) {
    cb = encoding;
    encoding = null;
  }

  if (!util.isNullOrUndefined(chunk))
    this.write(chunk, encoding);

  // .end() fully uncorks
  if (state.corked) {
    state.corked = 1;
    this.uncork();
  }

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished)
    endWritable(this, state, cb);
};


function needFinish(stream, state) {
  return (state.ending &&
          state.length === 0 &&
          !state.finished &&
          !state.writing);
}

function prefinish(stream, state) {
  if (!state.prefinished) {
    state.prefinished = true;
    stream.emit('prefinish');
  }
}

function finishMaybe(stream, state) {
  var need = needFinish(stream, state);
  if (need) {
    if (state.pendingcb === 0) {
      prefinish(stream, state);
      state.finished = true;
      stream.emit('finish');
    } else
      prefinish(stream, state);
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished)
      process.nextTick(cb);
    else
      stream.once('finish', cb);
  }
  state.ended = true;
}


/***/ }),

/***/ 987472:
/***/ ((module, exports, __webpack_require__) => {

exports = module.exports = __webpack_require__(234462);
exports.Stream = __webpack_require__(92413);
exports.Readable = exports;
exports.Writable = __webpack_require__(651746);
exports.Duplex = __webpack_require__(615353);
exports.Transform = __webpack_require__(579581);
exports.PassThrough = __webpack_require__(1668);
if (!process.browser && process.env.READABLE_STREAM === 'disable') {
  module.exports = __webpack_require__(92413);
}


/***/ }),

/***/ 318559:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var Buffer = __webpack_require__(764293).Buffer;

var isBufferEncoding = Buffer.isEncoding
  || function(encoding) {
       switch (encoding && encoding.toLowerCase()) {
         case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
         default: return false;
       }
     }


function assertEncoding(encoding) {
  if (encoding && !isBufferEncoding(encoding)) {
    throw new Error('Unknown encoding: ' + encoding);
  }
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters. CESU-8 is handled as part of the UTF-8 encoding.
//
// @TODO Handling all encodings inside a single object makes it very difficult
// to reason about this code, so it should be split up in the future.
// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
// points as used by CESU-8.
var StringDecoder = exports.s = function(encoding) {
  this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
  assertEncoding(encoding);
  switch (this.encoding) {
    case 'utf8':
      // CESU-8 represents each of Surrogate Pair by 3-bytes
      this.surrogateSize = 3;
      break;
    case 'ucs2':
    case 'utf16le':
      // UTF-16 represents each of Surrogate Pair by 2-bytes
      this.surrogateSize = 2;
      this.detectIncompleteChar = utf16DetectIncompleteChar;
      break;
    case 'base64':
      // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
      this.surrogateSize = 3;
      this.detectIncompleteChar = base64DetectIncompleteChar;
      break;
    default:
      this.write = passThroughWrite;
      return;
  }

  // Enough space to store all bytes of a single character. UTF-8 needs 4
  // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
  this.charBuffer = new Buffer(6);
  // Number of bytes received for the current incomplete multi-byte character.
  this.charReceived = 0;
  // Number of bytes expected for the current incomplete multi-byte character.
  this.charLength = 0;
};


// write decodes the given buffer and returns it as JS string that is
// guaranteed to not contain any partial multi-byte characters. Any partial
// character found at the end of the buffer is buffered up, and will be
// returned when calling write again with the remaining bytes.
//
// Note: Converting a Buffer containing an orphan surrogate to a String
// currently works, but converting a String to a Buffer (via `new Buffer`, or
// Buffer#write) will replace incomplete surrogates with the unicode
// replacement character. See https://codereview.chromium.org/121173009/ .
StringDecoder.prototype.write = function(buffer) {
  var charStr = '';
  // if our last write ended with an incomplete multibyte character
  while (this.charLength) {
    // determine how many remaining bytes this buffer has to offer for this char
    var available = (buffer.length >= this.charLength - this.charReceived) ?
        this.charLength - this.charReceived :
        buffer.length;

    // add the new bytes to the char buffer
    buffer.copy(this.charBuffer, this.charReceived, 0, available);
    this.charReceived += available;

    if (this.charReceived < this.charLength) {
      // still not enough chars in this buffer? wait for more ...
      return '';
    }

    // remove bytes belonging to the current character from the buffer
    buffer = buffer.slice(available, buffer.length);

    // get the character that was split
    charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);

    // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
    var charCode = charStr.charCodeAt(charStr.length - 1);
    if (charCode >= 0xD800 && charCode <= 0xDBFF) {
      this.charLength += this.surrogateSize;
      charStr = '';
      continue;
    }
    this.charReceived = this.charLength = 0;

    // if there are no more bytes in this buffer, just emit our char
    if (buffer.length === 0) {
      return charStr;
    }
    break;
  }

  // determine and set charLength / charReceived
  this.detectIncompleteChar(buffer);

  var end = buffer.length;
  if (this.charLength) {
    // buffer the incomplete character bytes we got
    buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
    end -= this.charReceived;
  }

  charStr += buffer.toString(this.encoding, 0, end);

  var end = charStr.length - 1;
  var charCode = charStr.charCodeAt(end);
  // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
  if (charCode >= 0xD800 && charCode <= 0xDBFF) {
    var size = this.surrogateSize;
    this.charLength += size;
    this.charReceived += size;
    this.charBuffer.copy(this.charBuffer, size, 0, size);
    buffer.copy(this.charBuffer, 0, 0, size);
    return charStr.substring(0, end);
  }

  // or just emit the charStr
  return charStr;
};

// detectIncompleteChar determines if there is an incomplete UTF-8 character at
// the end of the given buffer. If so, it sets this.charLength to the byte
// length that character, and sets this.charReceived to the number of bytes
// that are available for this character.
StringDecoder.prototype.detectIncompleteChar = function(buffer) {
  // determine how many bytes we have to check at the end of this buffer
  var i = (buffer.length >= 3) ? 3 : buffer.length;

  // Figure out if one of the last i bytes of our buffer announces an
  // incomplete char.
  for (; i > 0; i--) {
    var c = buffer[buffer.length - i];

    // See http://en.wikipedia.org/wiki/UTF-8#Description

    // 110XXXXX
    if (i == 1 && c >> 5 == 0x06) {
      this.charLength = 2;
      break;
    }

    // 1110XXXX
    if (i <= 2 && c >> 4 == 0x0E) {
      this.charLength = 3;
      break;
    }

    // 11110XXX
    if (i <= 3 && c >> 3 == 0x1E) {
      this.charLength = 4;
      break;
    }
  }
  this.charReceived = i;
};

StringDecoder.prototype.end = function(buffer) {
  var res = '';
  if (buffer && buffer.length)
    res = this.write(buffer);

  if (this.charReceived) {
    var cr = this.charReceived;
    var buf = this.charBuffer;
    var enc = this.encoding;
    res += buf.slice(0, cr).toString(enc);
  }

  return res;
};

function passThroughWrite(buffer) {
  return buffer.toString(this.encoding);
}

function utf16DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 2;
  this.charLength = this.charReceived ? 2 : 0;
}

function base64DetectIncompleteChar(buffer) {
  this.charReceived = buffer.length % 3;
  this.charLength = this.charReceived ? 3 : 0;
}


/***/ }),

/***/ 358737:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var Writable = __webpack_require__(479437).Writable
var inherits = __webpack_require__(394378)
var extend = __webpack_require__(347529)

var defaultOptions = { type: 'put' }

function WriteStream (db, options) {
  if (!(this instanceof WriteStream)) {
    return new WriteStream(db, options)
  }

  options = extend(defaultOptions, options)

  Writable.call(this, {
    objectMode: true,
    highWaterMark: options.highWaterMark || 16
  })

  this._options = options
  this._db = db
  this._buffer = []
  this._flushing = false
  this._maxBufferLength = options.maxBufferLength || Infinity

  var self = this

  this.on('finish', function () {
    self.emit('close')
  })
}

inherits(WriteStream, Writable)

WriteStream.prototype._write = function (data, enc, next) {
  var self = this
  if (self.destroyed) return

  if (!self._flushing) {
    self._flushing = true
    process.nextTick(function () { self._flush() })
  }

  if (self._buffer.length >= self._maxBufferLength) {
    self.once('_flush', function (err) {
      if (err) return self.destroy(err)
      self._write(data, enc, next)
    })
  } else {
    self._buffer.push(extend({ type: self._options.type }, data))
    next()
  }
}

WriteStream.prototype._flush = function () {
  var self = this
  var buffer = self._buffer

  if (self.destroyed) return

  self._buffer = []
  self._db.batch(buffer, cb)

  function cb (err) {
    self._flushing = false

    if (!self.emit('_flush', err) && err) {
      // There was no _flush listener.
      self.destroy(err)
    }
  }
}

WriteStream.prototype._final = function (cb) {
  var self = this

  if (this._flushing) {
    // Wait for scheduled or in-progress _flush()
    this.once('_flush', function (err) {
      if (err) return cb(err)

      // There could be additional buffered writes
      self._final(cb)
    })
  } else if (this._buffer && this._buffer.length) {
    this.once('_flush', cb)
    this._flush()
  } else {
    cb()
  }
}

WriteStream.prototype._destroy = function (err, cb) {
  var self = this

  this._buffer = null
  cb(err)

  // TODO when the next readable-stream (mirroring node v10) is out:
  // remove this. Since nodejs/node#19836, streams always emit close.
  process.nextTick(function () {
    self.emit('close')
  })
}

module.exports = WriteStream


/***/ }),

/***/ 401819:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    keys.push(key);
  }return keys;
};
/*</replacement>*/

module.exports = Duplex;

/*<replacement>*/
var util = Object.create(__webpack_require__(316497));
util.inherits = __webpack_require__(394378);
/*</replacement>*/

var Readable = __webpack_require__(789446);
var Writable = __webpack_require__(927239);

util.inherits(Duplex, Readable);

{
  // avoid scope creep, the keys array can then be collected
  var keys = objectKeys(Writable.prototype);
  for (var v = 0; v < keys.length; v++) {
    var method = keys[v];
    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  }
}

function Duplex(options) {
  if (!(this instanceof Duplex)) return new Duplex(options);

  Readable.call(this, options);
  Writable.call(this, options);

  if (options && options.readable === false) this.readable = false;

  if (options && options.writable === false) this.writable = false;

  this.allowHalfOpen = true;
  if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;

  this.once('end', onend);
}

Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// the no-half-open enforcer
function onend() {
  // if we allow half-open state, or if the writable side ended,
  // then we're ok.
  if (this.allowHalfOpen || this._writableState.ended) return;

  // no more data can be written.
  // But allow more writes to happen in this tick.
  pna.nextTick(onEndNT, this);
}

function onEndNT(self) {
  self.end();
}

Object.defineProperty(Duplex.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined || this._writableState === undefined) {
      return false;
    }
    return this._readableState.destroyed && this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (this._readableState === undefined || this._writableState === undefined) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
    this._writableState.destroyed = value;
  }
});

Duplex.prototype._destroy = function (err, cb) {
  this.push(null);
  this.end();

  pna.nextTick(cb, err);
};

/***/ }),

/***/ 998231:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.



module.exports = PassThrough;

var Transform = __webpack_require__(665903);

/*<replacement>*/
var util = Object.create(__webpack_require__(316497));
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options);

  Transform.call(this, options);
}

PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};

/***/ }),

/***/ 789446:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Readable;

/*<replacement>*/
var isArray = __webpack_require__(815552);
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Readable.ReadableState = ReadableState;

/*<replacement>*/
var EE = __webpack_require__(128614).EventEmitter;

var EElistenerCount = function (emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(163032);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(844380).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

/*<replacement>*/
var util = Object.create(__webpack_require__(316497));
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var debugUtil = __webpack_require__(431669);
var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
  debug = debugUtil.debuglog('stream');
} else {
  debug = function () {};
}
/*</replacement>*/

var BufferList = __webpack_require__(959471);
var destroyImpl = __webpack_require__(387683);
var StringDecoder;

util.inherits(Readable, Stream);

var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];

function prependListener(emitter, event, fn) {
  // Sadly this is not cacheable as some libraries bundle their own
  // event emitter implementation with them.
  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);

  // This is a hack to make sure that our error handler is attached before any
  // userland ones.  NEVER DO THIS. This is here only because this code needs
  // to continue to work with older versions of Node.js that do not include
  // the prependListener() method. The goal is to eventually remove this hack.
  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}

function ReadableState(options, stream) {
  Duplex = Duplex || __webpack_require__(401819);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;

  // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"
  var hwm = options.highWaterMark;
  var readableHwm = options.readableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // A linked list is used to store data chunks instead of an array because the
  // linked list can remove elements from the beginning faster than
  // array.shift()
  this.buffer = new BufferList();
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = null;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false;

  // a flag to be able to tell if the event 'readable'/'data' is emitted
  // immediately, or on a later tick.  We set this to true at first, because
  // any actions that shouldn't happen until "later" should generally also
  // not happen before the first read call.
  this.sync = true;

  // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.
  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;
  this.resumeScheduled = false;

  // has it been destroyed
  this.destroyed = false;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // the number of writers that are awaiting a drain event in .pipe()s
  this.awaitDrain = 0;

  // if true, a maybeReadMore has been scheduled
  this.readingMore = false;

  this.decoder = null;
  this.encoding = null;
  if (options.encoding) {
    if (!StringDecoder) StringDecoder = __webpack_require__(835079)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  Duplex = Duplex || __webpack_require__(401819);

  if (!(this instanceof Readable)) return new Readable(options);

  this._readableState = new ReadableState(options, this);

  // legacy
  this.readable = true;

  if (options) {
    if (typeof options.read === 'function') this._read = options.read;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;
  }

  Stream.call(this);
}

Object.defineProperty(Readable.prototype, 'destroyed', {
  get: function () {
    if (this._readableState === undefined) {
      return false;
    }
    return this._readableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._readableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._readableState.destroyed = value;
  }
});

Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;
Readable.prototype._destroy = function (err, cb) {
  this.push(null);
  cb(err);
};

// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function (chunk, encoding) {
  var state = this._readableState;
  var skipChunkCheck;

  if (!state.objectMode) {
    if (typeof chunk === 'string') {
      encoding = encoding || state.defaultEncoding;
      if (encoding !== state.encoding) {
        chunk = Buffer.from(chunk, encoding);
        encoding = '';
      }
      skipChunkCheck = true;
    }
  } else {
    skipChunkCheck = true;
  }

  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
};

// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function (chunk) {
  return readableAddChunk(this, chunk, null, true, false);
};

function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  var state = stream._readableState;
  if (chunk === null) {
    state.reading = false;
    onEofChunk(stream, state);
  } else {
    var er;
    if (!skipChunkCheck) er = chunkInvalid(state, chunk);
    if (er) {
      stream.emit('error', er);
    } else if (state.objectMode || chunk && chunk.length > 0) {
      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
        chunk = _uint8ArrayToBuffer(chunk);
      }

      if (addToFront) {
        if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
      } else if (state.ended) {
        stream.emit('error', new Error('stream.push() after EOF'));
      } else {
        state.reading = false;
        if (state.decoder && !encoding) {
          chunk = state.decoder.write(chunk);
          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
        } else {
          addChunk(stream, state, chunk, false);
        }
      }
    } else if (!addToFront) {
      state.reading = false;
    }
  }

  return needMoreData(state);
}

function addChunk(stream, state, chunk, addToFront) {
  if (state.flowing && state.length === 0 && !state.sync) {
    stream.emit('data', chunk);
    stream.read(0);
  } else {
    // update the buffer info.
    state.length += state.objectMode ? 1 : chunk.length;
    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);

    if (state.needReadable) emitReadable(stream);
  }
  maybeReadMore(stream, state);
}

function chunkInvalid(state, chunk) {
  var er;
  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  return er;
}

// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes.  This is to work around cases where hwm=0,
// such as the repl.  Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
  return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
}

Readable.prototype.isPaused = function () {
  return this._readableState.flowing === false;
};

// backwards compatibility.
Readable.prototype.setEncoding = function (enc) {
  if (!StringDecoder) StringDecoder = __webpack_require__(835079)/* .StringDecoder */ .s;
  this._readableState.decoder = new StringDecoder(enc);
  this._readableState.encoding = enc;
  return this;
};

// Don't raise the hwm > 8MB
var MAX_HWM = 0x800000;
function computeNewHighWaterMark(n) {
  if (n >= MAX_HWM) {
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2 to prevent increasing hwm excessively in
    // tiny amounts
    n--;
    n |= n >>> 1;
    n |= n >>> 2;
    n |= n >>> 4;
    n |= n >>> 8;
    n |= n >>> 16;
    n++;
  }
  return n;
}

// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function howMuchToRead(n, state) {
  if (n <= 0 || state.length === 0 && state.ended) return 0;
  if (state.objectMode) return 1;
  if (n !== n) {
    // Only flow one buffer at a time
    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  }
  // If we're asking for more than the current hwm, then raise the hwm.
  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  if (n <= state.length) return n;
  // Don't have enough
  if (!state.ended) {
    state.needReadable = true;
    return 0;
  }
  return state.length;
}

// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
  debug('read', n);
  n = parseInt(n, 10);
  var state = this._readableState;
  var nOrig = n;

  if (n !== 0) state.emittedReadable = false;

  // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.
  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
    debug('read: emitReadable', state.length, state.ended);
    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state);

  // if we've ended, and we're now clear, then finish it up.
  if (n === 0 && state.ended) {
    if (state.length === 0) endReadable(this);
    return null;
  }

  // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.

  // if we need a readable event, then we need to do some reading.
  var doRead = state.needReadable;
  debug('need readable', doRead);

  // if we currently have less than the highWaterMark, then also read some
  if (state.length === 0 || state.length - n < state.highWaterMark) {
    doRead = true;
    debug('length less than watermark', doRead);
  }

  // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.
  if (state.ended || state.reading) {
    doRead = false;
    debug('reading or ended', doRead);
  } else if (doRead) {
    debug('do read');
    state.reading = true;
    state.sync = true;
    // if the length is currently zero, then we *need* a readable event.
    if (state.length === 0) state.needReadable = true;
    // call internal read method
    this._read(state.highWaterMark);
    state.sync = false;
    // If _read pushed data synchronously, then `reading` will be false,
    // and we need to re-evaluate how much data we can return to the user.
    if (!state.reading) n = howMuchToRead(nOrig, state);
  }

  var ret;
  if (n > 0) ret = fromList(n, state);else ret = null;

  if (ret === null) {
    state.needReadable = true;
    n = 0;
  } else {
    state.length -= n;
  }

  if (state.length === 0) {
    // If we have nothing in the buffer, then we want to know
    // as soon as we *do* get something into the buffer.
    if (!state.ended) state.needReadable = true;

    // If we tried to read() past the EOF, then emit end on the next tick.
    if (nOrig !== n && state.ended) endReadable(this);
  }

  if (ret !== null) this.emit('data', ret);

  return ret;
};

function onEofChunk(stream, state) {
  if (state.ended) return;
  if (state.decoder) {
    var chunk = state.decoder.end();
    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }
  state.ended = true;

  // emit 'readable' now to make sure it gets picked up.
  emitReadable(stream);
}

// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
  var state = stream._readableState;
  state.needReadable = false;
  if (!state.emittedReadable) {
    debug('emitReadable', state.flowing);
    state.emittedReadable = true;
    if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
  }
}

function emitReadable_(stream) {
  debug('emit readable');
  stream.emit('readable');
  flow(stream);
}

// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    pna.nextTick(maybeReadMore_, stream, state);
  }
}

function maybeReadMore_(stream, state) {
  var len = state.length;
  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
    debug('maybeReadMore read 0');
    stream.read(0);
    if (len === state.length)
      // didn't get any data, stop spinning.
      break;else len = state.length;
  }
  state.readingMore = false;
}

// abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function (n) {
  this.emit('error', new Error('_read() is not implemented'));
};

Readable.prototype.pipe = function (dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;
    case 1:
      state.pipes = [state.pipes, dest];
      break;
    default:
      state.pipes.push(dest);
      break;
  }
  state.pipesCount += 1;
  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);

  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;

  var endFn = doEnd ? onend : unpipe;
  if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);

  dest.on('unpipe', onunpipe);
  function onunpipe(readable, unpipeInfo) {
    debug('onunpipe');
    if (readable === src) {
      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
        unpipeInfo.hasUnpiped = true;
        cleanup();
      }
    }
  }

  function onend() {
    debug('onend');
    dest.end();
  }

  // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.
  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);

  var cleanedUp = false;
  function cleanup() {
    debug('cleanup');
    // cleanup event handlers once the pipe is broken
    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', unpipe);
    src.removeListener('data', ondata);

    cleanedUp = true;

    // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.
    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  }

  // If the user pushes more data while we're writing to dest then we'll end up
  // in ondata again. However, we only want to increase awaitDrain once because
  // dest will only emit one 'drain' event for the multiple writes.
  // => Introduce a guard on increasing awaitDrain.
  var increasedAwaitDrain = false;
  src.on('data', ondata);
  function ondata(chunk) {
    debug('ondata');
    increasedAwaitDrain = false;
    var ret = dest.write(chunk);
    if (false === ret && !increasedAwaitDrain) {
      // If the user unpiped during `dest.write()`, it is possible
      // to get stuck in a permanently paused state if that write
      // also returned false.
      // => Check whether `dest` is still a piping destination.
      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
        debug('false write response, pause', src._readableState.awaitDrain);
        src._readableState.awaitDrain++;
        increasedAwaitDrain = true;
      }
      src.pause();
    }
  }

  // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.
  function onerror(er) {
    debug('onerror', er);
    unpipe();
    dest.removeListener('error', onerror);
    if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
  }

  // Make sure our error handler is attached before userland ones.
  prependListener(dest, 'error', onerror);

  // Both close and finish should trigger unpipe, but only once.
  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }
  dest.once('close', onclose);
  function onfinish() {
    debug('onfinish');
    dest.removeListener('close', onclose);
    unpipe();
  }
  dest.once('finish', onfinish);

  function unpipe() {
    debug('unpipe');
    src.unpipe(dest);
  }

  // tell the dest that it's being piped to
  dest.emit('pipe', src);

  // start the flow if it hasn't been started already.
  if (!state.flowing) {
    debug('pipe resume');
    src.resume();
  }

  return dest;
};

function pipeOnDrain(src) {
  return function () {
    var state = src._readableState;
    debug('pipeOnDrain', state.awaitDrain);
    if (state.awaitDrain) state.awaitDrain--;
    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
      state.flowing = true;
      flow(src);
    }
  };
}

Readable.prototype.unpipe = function (dest) {
  var state = this._readableState;
  var unpipeInfo = { hasUnpiped: false };

  // if we're not piping anywhere, then do nothing.
  if (state.pipesCount === 0) return this;

  // just one destination.  most common case.
  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes) return this;

    if (!dest) dest = state.pipes;

    // got a match.
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;
    if (dest) dest.emit('unpipe', this, unpipeInfo);
    return this;
  }

  // slow case. multiple pipe destinations.

  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;

    for (var i = 0; i < len; i++) {
      dests[i].emit('unpipe', this, unpipeInfo);
    }return this;
  }

  // try to find the right one.
  var index = indexOf(state.pipes, dest);
  if (index === -1) return this;

  state.pipes.splice(index, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1) state.pipes = state.pipes[0];

  dest.emit('unpipe', this, unpipeInfo);

  return this;
};

// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function (ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);

  if (ev === 'data') {
    // Start flowing on next tick if stream isn't explicitly paused
    if (this._readableState.flowing !== false) this.resume();
  } else if (ev === 'readable') {
    var state = this._readableState;
    if (!state.endEmitted && !state.readableListening) {
      state.readableListening = state.needReadable = true;
      state.emittedReadable = false;
      if (!state.reading) {
        pna.nextTick(nReadingNextTick, this);
      } else if (state.length) {
        emitReadable(this);
      }
    }
  }

  return res;
};
Readable.prototype.addListener = Readable.prototype.on;

function nReadingNextTick(self) {
  debug('readable nexttick read 0');
  self.read(0);
}

// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function () {
  var state = this._readableState;
  if (!state.flowing) {
    debug('resume');
    state.flowing = true;
    resume(this, state);
  }
  return this;
};

function resume(stream, state) {
  if (!state.resumeScheduled) {
    state.resumeScheduled = true;
    pna.nextTick(resume_, stream, state);
  }
}

function resume_(stream, state) {
  if (!state.reading) {
    debug('resume read 0');
    stream.read(0);
  }

  state.resumeScheduled = false;
  state.awaitDrain = 0;
  stream.emit('resume');
  flow(stream);
  if (state.flowing && !state.reading) stream.read(0);
}

Readable.prototype.pause = function () {
  debug('call pause flowing=%j', this._readableState.flowing);
  if (false !== this._readableState.flowing) {
    debug('pause');
    this._readableState.flowing = false;
    this.emit('pause');
  }
  return this;
};

function flow(stream) {
  var state = stream._readableState;
  debug('flow', state.flowing);
  while (state.flowing && stream.read() !== null) {}
}

// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function (stream) {
  var _this = this;

  var state = this._readableState;
  var paused = false;

  stream.on('end', function () {
    debug('wrapped end');
    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length) _this.push(chunk);
    }

    _this.push(null);
  });

  stream.on('data', function (chunk) {
    debug('wrapped data');
    if (state.decoder) chunk = state.decoder.write(chunk);

    // don't skip over falsy values in objectMode
    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;

    var ret = _this.push(chunk);
    if (!ret) {
      paused = true;
      stream.pause();
    }
  });

  // proxy all the other methods.
  // important when wrapping filters and duplexes.
  for (var i in stream) {
    if (this[i] === undefined && typeof stream[i] === 'function') {
      this[i] = function (method) {
        return function () {
          return stream[method].apply(stream, arguments);
        };
      }(i);
    }
  }

  // proxy certain important events.
  for (var n = 0; n < kProxyEvents.length; n++) {
    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  }

  // when we try to consume some more bytes, simply unpause the
  // underlying stream.
  this._read = function (n) {
    debug('wrapped _read', n);
    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return this;
};

Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._readableState.highWaterMark;
  }
});

// exposed for testing purposes only.
Readable._fromList = fromList;

// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromList(n, state) {
  // nothing buffered
  if (state.length === 0) return null;

  var ret;
  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
    // read it all, truncate the list
    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
    state.buffer.clear();
  } else {
    // read part of list
    ret = fromListPartial(n, state.buffer, state.decoder);
  }

  return ret;
}

// Extracts only enough buffered data to satisfy the amount requested.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromListPartial(n, list, hasStrings) {
  var ret;
  if (n < list.head.data.length) {
    // slice is the same for buffers and strings
    ret = list.head.data.slice(0, n);
    list.head.data = list.head.data.slice(n);
  } else if (n === list.head.data.length) {
    // first chunk is a perfect match
    ret = list.shift();
  } else {
    // result spans more than one buffer
    ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
  }
  return ret;
}

// Copies a specified amount of characters from the list of buffered data
// chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBufferString(n, list) {
  var p = list.head;
  var c = 1;
  var ret = p.data;
  n -= ret.length;
  while (p = p.next) {
    var str = p.data;
    var nb = n > str.length ? str.length : n;
    if (nb === str.length) ret += str;else ret += str.slice(0, n);
    n -= nb;
    if (n === 0) {
      if (nb === str.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = str.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

// Copies a specified amount of bytes from the list of buffered data chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBuffer(n, list) {
  var ret = Buffer.allocUnsafe(n);
  var p = list.head;
  var c = 1;
  p.data.copy(ret);
  n -= p.data.length;
  while (p = p.next) {
    var buf = p.data;
    var nb = n > buf.length ? buf.length : n;
    buf.copy(ret, ret.length - n, 0, nb);
    n -= nb;
    if (n === 0) {
      if (nb === buf.length) {
        ++c;
        if (p.next) list.head = p.next;else list.head = list.tail = null;
      } else {
        list.head = p;
        p.data = buf.slice(nb);
      }
      break;
    }
    ++c;
  }
  list.length -= c;
  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;

  // If we get here before consuming all the bytes, then that is a
  // bug in node.  Should never happen.
  if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');

  if (!state.endEmitted) {
    state.ended = true;
    pna.nextTick(endReadableNT, state, stream);
  }
}

function endReadableNT(state, stream) {
  // Check that we didn't get one last unshift.
  if (!state.endEmitted && state.length === 0) {
    state.endEmitted = true;
    stream.readable = false;
    stream.emit('end');
  }
}

function indexOf(xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }
  return -1;
}

/***/ }),

/***/ 665903:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.



module.exports = Transform;

var Duplex = __webpack_require__(401819);

/*<replacement>*/
var util = Object.create(__webpack_require__(316497));
util.inherits = __webpack_require__(394378);
/*</replacement>*/

util.inherits(Transform, Duplex);

function afterTransform(er, data) {
  var ts = this._transformState;
  ts.transforming = false;

  var cb = ts.writecb;

  if (!cb) {
    return this.emit('error', new Error('write callback called multiple times'));
  }

  ts.writechunk = null;
  ts.writecb = null;

  if (data != null) // single equals check for both `null` and `undefined`
    this.push(data);

  cb(er);

  var rs = this._readableState;
  rs.reading = false;
  if (rs.needReadable || rs.length < rs.highWaterMark) {
    this._read(rs.highWaterMark);
  }
}

function Transform(options) {
  if (!(this instanceof Transform)) return new Transform(options);

  Duplex.call(this, options);

  this._transformState = {
    afterTransform: afterTransform.bind(this),
    needTransform: false,
    transforming: false,
    writecb: null,
    writechunk: null,
    writeencoding: null
  };

  // start out asking for a readable event once data is transformed.
  this._readableState.needReadable = true;

  // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.
  this._readableState.sync = false;

  if (options) {
    if (typeof options.transform === 'function') this._transform = options.transform;

    if (typeof options.flush === 'function') this._flush = options.flush;
  }

  // When the writable side finishes, then flush out anything remaining.
  this.on('prefinish', prefinish);
}

function prefinish() {
  var _this = this;

  if (typeof this._flush === 'function') {
    this._flush(function (er, data) {
      done(_this, er, data);
    });
  } else {
    done(this, null, null);
  }
}

Transform.prototype.push = function (chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
};

// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
  throw new Error('_transform() is not implemented');
};

Transform.prototype._write = function (chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;
  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  }
};

// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function (n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
    ts.transforming = true;
    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};

Transform.prototype._destroy = function (err, cb) {
  var _this2 = this;

  Duplex.prototype._destroy.call(this, err, function (err2) {
    cb(err2);
    _this2.emit('close');
  });
};

function done(stream, er, data) {
  if (er) return stream.emit('error', er);

  if (data != null) // single equals check for both `null` and `undefined`
    stream.push(data);

  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided
  if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');

  if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');

  return stream.push(null);
}

/***/ }),

/***/ 927239:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.



/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

module.exports = Writable;

/* <replacement> */
function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
  this.next = null;
}

// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
  var _this = this;

  this.next = null;
  this.entry = null;
  this.finish = function () {
    onCorkedFinish(_this, state);
  };
}
/* </replacement> */

/*<replacement>*/
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
/*</replacement>*/

/*<replacement>*/
var Duplex;
/*</replacement>*/

Writable.WritableState = WritableState;

/*<replacement>*/
var util = Object.create(__webpack_require__(316497));
util.inherits = __webpack_require__(394378);
/*</replacement>*/

/*<replacement>*/
var internalUtil = {
  deprecate: __webpack_require__(741159)
};
/*</replacement>*/

/*<replacement>*/
var Stream = __webpack_require__(163032);
/*</replacement>*/

/*<replacement>*/

var Buffer = __webpack_require__(844380).Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}
function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

/*</replacement>*/

var destroyImpl = __webpack_require__(387683);

util.inherits(Writable, Stream);

function nop() {}

function WritableState(options, stream) {
  Duplex = Duplex || __webpack_require__(401819);

  options = options || {};

  // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.
  var isDuplex = stream instanceof Duplex;

  // object stream flag to indicate whether or not this stream
  // contains buffers or objects.
  this.objectMode = !!options.objectMode;

  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;

  // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()
  var hwm = options.highWaterMark;
  var writableHwm = options.writableHighWaterMark;
  var defaultHwm = this.objectMode ? 16 : 16 * 1024;

  if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;

  // cast to ints.
  this.highWaterMark = Math.floor(this.highWaterMark);

  // if _final has been called
  this.finalCalled = false;

  // drain event flag.
  this.needDrain = false;
  // at the start of calling end()
  this.ending = false;
  // when end() has been called, and returned
  this.ended = false;
  // when 'finish' is emitted
  this.finished = false;

  // has it been destroyed
  this.destroyed = false;

  // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.
  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode;

  // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.
  this.defaultEncoding = options.defaultEncoding || 'utf8';

  // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.
  this.length = 0;

  // a flag to see when we're in the middle of a write.
  this.writing = false;

  // when true all writes will be buffered until .uncork() call
  this.corked = 0;

  // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.
  this.sync = true;

  // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.
  this.bufferProcessing = false;

  // the callback that's passed to _write(chunk,cb)
  this.onwrite = function (er) {
    onwrite(stream, er);
  };

  // the callback that the user supplies to write(chunk,encoding,cb)
  this.writecb = null;

  // the amount that is being written when _write is called.
  this.writelen = 0;

  this.bufferedRequest = null;
  this.lastBufferedRequest = null;

  // number of pending user-supplied write callbacks
  // this must be 0 before 'finish' can be emitted
  this.pendingcb = 0;

  // emit prefinish if the only thing we're waiting for is _write cbs
  // This is relevant for synchronous Transform streams
  this.prefinished = false;

  // True if the error was already emitted and should not be thrown again
  this.errorEmitted = false;

  // count buffered requests
  this.bufferedRequestCount = 0;

  // allocate the first CorkedRequest, there is always
  // one allocated and free to use, and we maintain at most two
  this.corkedRequestsFree = new CorkedRequest(this);
}

WritableState.prototype.getBuffer = function getBuffer() {
  var current = this.bufferedRequest;
  var out = [];
  while (current) {
    out.push(current);
    current = current.next;
  }
  return out;
};

(function () {
  try {
    Object.defineProperty(WritableState.prototype, 'buffer', {
      get: internalUtil.deprecate(function () {
        return this.getBuffer();
      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
    });
  } catch (_) {}
})();

// Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
var realHasInstance;
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  realHasInstance = Function.prototype[Symbol.hasInstance];
  Object.defineProperty(Writable, Symbol.hasInstance, {
    value: function (object) {
      if (realHasInstance.call(this, object)) return true;
      if (this !== Writable) return false;

      return object && object._writableState instanceof WritableState;
    }
  });
} else {
  realHasInstance = function (object) {
    return object instanceof this;
  };
}

function Writable(options) {
  Duplex = Duplex || __webpack_require__(401819);

  // Writable ctor is applied to Duplexes, too.
  // `realHasInstance` is necessary because using plain `instanceof`
  // would return false, as no `_writableState` property is attached.

  // Trying to use the custom `instanceof` for Writable here will also break the
  // Node.js LazyTransform implementation, which has a non-trivial getter for
  // `_writableState` that would lead to infinite recursion.
  if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
    return new Writable(options);
  }

  this._writableState = new WritableState(options, this);

  // legacy.
  this.writable = true;

  if (options) {
    if (typeof options.write === 'function') this._write = options.write;

    if (typeof options.writev === 'function') this._writev = options.writev;

    if (typeof options.destroy === 'function') this._destroy = options.destroy;

    if (typeof options.final === 'function') this._final = options.final;
  }

  Stream.call(this);
}

// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
  this.emit('error', new Error('Cannot pipe, not readable'));
};

function writeAfterEnd(stream, cb) {
  var er = new Error('write after end');
  // TODO: defer error events consistently everywhere, not just the cb
  stream.emit('error', er);
  pna.nextTick(cb, er);
}

// Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
  var valid = true;
  var er = false;

  if (chunk === null) {
    er = new TypeError('May not write null values to stream');
  } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new TypeError('Invalid non-string/buffer chunk');
  }
  if (er) {
    stream.emit('error', er);
    pna.nextTick(cb, er);
    valid = false;
  }
  return valid;
}

Writable.prototype.write = function (chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;
  var isBuf = !state.objectMode && _isUint8Array(chunk);

  if (isBuf && !Buffer.isBuffer(chunk)) {
    chunk = _uint8ArrayToBuffer(chunk);
  }

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;

  if (typeof cb !== 'function') cb = nop;

  if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
    state.pendingcb++;
    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  }

  return ret;
};

Writable.prototype.cork = function () {
  var state = this._writableState;

  state.corked++;
};

Writable.prototype.uncork = function () {
  var state = this._writableState;

  if (state.corked) {
    state.corked--;

    if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  }
};

Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  // node::ParseEncoding() requires lower case.
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
  this._writableState.defaultEncoding = encoding;
  return this;
};

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
    chunk = Buffer.from(chunk, encoding);
  }
  return chunk;
}

Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function () {
    return this._writableState.highWaterMark;
  }
});

// if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  if (!isBuf) {
    var newChunk = decodeChunk(state, chunk, encoding);
    if (chunk !== newChunk) {
      isBuf = true;
      encoding = 'buffer';
      chunk = newChunk;
    }
  }
  var len = state.objectMode ? 1 : chunk.length;

  state.length += len;

  var ret = state.length < state.highWaterMark;
  // we must ensure that previous needDrain will not be reset to false.
  if (!ret) state.needDrain = true;

  if (state.writing || state.corked) {
    var last = state.lastBufferedRequest;
    state.lastBufferedRequest = {
      chunk: chunk,
      encoding: encoding,
      isBuf: isBuf,
      callback: cb,
      next: null
    };
    if (last) {
      last.next = state.lastBufferedRequest;
    } else {
      state.bufferedRequest = state.lastBufferedRequest;
    }
    state.bufferedRequestCount += 1;
  } else {
    doWrite(stream, state, false, len, chunk, encoding, cb);
  }

  return ret;
}

function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  --state.pendingcb;

  if (sync) {
    // defer the callback if we are being called synchronously
    // to avoid piling up things on the stack
    pna.nextTick(cb, er);
    // this can emit finish, and it will always happen
    // after error
    pna.nextTick(finishMaybe, stream, state);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
  } else {
    // the caller expect this to happen before if
    // it is async
    cb(er);
    stream._writableState.errorEmitted = true;
    stream.emit('error', er);
    // this can emit finish, but finish must
    // always follow error
    finishMaybe(stream, state);
  }
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;

  onwriteStateUpdate(state);

  if (er) onwriteError(stream, state, sync, er, cb);else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(state);

    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
      clearBuffer(stream, state);
    }

    if (sync) {
      /*<replacement>*/
      asyncWrite(afterWrite, stream, state, finished, cb);
      /*</replacement>*/
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished) onwriteDrain(stream, state);
  state.pendingcb--;
  cb();
  finishMaybe(stream, state);
}

// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
}

// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
  state.bufferProcessing = true;
  var entry = state.bufferedRequest;

  if (stream._writev && entry && entry.next) {
    // Fast case, write everything using _writev()
    var l = state.bufferedRequestCount;
    var buffer = new Array(l);
    var holder = state.corkedRequestsFree;
    holder.entry = entry;

    var count = 0;
    var allBuffers = true;
    while (entry) {
      buffer[count] = entry;
      if (!entry.isBuf) allBuffers = false;
      entry = entry.next;
      count += 1;
    }
    buffer.allBuffers = allBuffers;

    doWrite(stream, state, true, state.length, buffer, '', holder.finish);

    // doWrite is almost always async, defer these to save a bit of time
    // as the hot path ends with doWrite
    state.pendingcb++;
    state.lastBufferedRequest = null;
    if (holder.next) {
      state.corkedRequestsFree = holder.next;
      holder.next = null;
    } else {
      state.corkedRequestsFree = new CorkedRequest(state);
    }
    state.bufferedRequestCount = 0;
  } else {
    // Slow case, write chunks one-by-one
    while (entry) {
      var chunk = entry.chunk;
      var encoding = entry.encoding;
      var cb = entry.callback;
      var len = state.objectMode ? 1 : chunk.length;

      doWrite(stream, state, false, len, chunk, encoding, cb);
      entry = entry.next;
      state.bufferedRequestCount--;
      // if we didn't call the onwrite immediately, then
      // it means that we need to wait until it does.
      // also, that means that the chunk and cb are currently
      // being processed, so move the buffer counter past them.
      if (state.writing) {
        break;
      }
    }

    if (entry === null) state.lastBufferedRequest = null;
  }

  state.bufferedRequest = entry;
  state.bufferProcessing = false;
}

Writable.prototype._write = function (chunk, encoding, cb) {
  cb(new Error('_write() is not implemented'));
};

Writable.prototype._writev = null;

Writable.prototype.end = function (chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);

  // .end() fully uncorks
  if (state.corked) {
    state.corked = 1;
    this.uncork();
  }

  // ignore unnecessary end() calls.
  if (!state.ending && !state.finished) endWritable(this, state, cb);
};

function needFinish(state) {
  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}
function callFinal(stream, state) {
  stream._final(function (err) {
    state.pendingcb--;
    if (err) {
      stream.emit('error', err);
    }
    state.prefinished = true;
    stream.emit('prefinish');
    finishMaybe(stream, state);
  });
}
function prefinish(stream, state) {
  if (!state.prefinished && !state.finalCalled) {
    if (typeof stream._final === 'function') {
      state.pendingcb++;
      state.finalCalled = true;
      pna.nextTick(callFinal, stream, state);
    } else {
      state.prefinished = true;
      stream.emit('prefinish');
    }
  }
}

function finishMaybe(stream, state) {
  var need = needFinish(state);
  if (need) {
    prefinish(stream, state);
    if (state.pendingcb === 0) {
      state.finished = true;
      stream.emit('finish');
    }
  }
  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);
  if (cb) {
    if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
  }
  state.ended = true;
  stream.writable = false;
}

function onCorkedFinish(corkReq, state, err) {
  var entry = corkReq.entry;
  corkReq.entry = null;
  while (entry) {
    var cb = entry.callback;
    state.pendingcb--;
    cb(err);
    entry = entry.next;
  }
  if (state.corkedRequestsFree) {
    state.corkedRequestsFree.next = corkReq;
  } else {
    state.corkedRequestsFree = corkReq;
  }
}

Object.defineProperty(Writable.prototype, 'destroyed', {
  get: function () {
    if (this._writableState === undefined) {
      return false;
    }
    return this._writableState.destroyed;
  },
  set: function (value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._writableState) {
      return;
    }

    // backward compatibility, the user is explicitly
    // managing destroyed
    this._writableState.destroyed = value;
  }
});

Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;
Writable.prototype._destroy = function (err, cb) {
  this.end();
  cb(err);
};

/***/ }),

/***/ 959471:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Buffer = __webpack_require__(844380).Buffer;
var util = __webpack_require__(431669);

function copyBuffer(src, target, offset) {
  src.copy(target, offset);
}

module.exports = function () {
  function BufferList() {
    _classCallCheck(this, BufferList);

    this.head = null;
    this.tail = null;
    this.length = 0;
  }

  BufferList.prototype.push = function push(v) {
    var entry = { data: v, next: null };
    if (this.length > 0) this.tail.next = entry;else this.head = entry;
    this.tail = entry;
    ++this.length;
  };

  BufferList.prototype.unshift = function unshift(v) {
    var entry = { data: v, next: this.head };
    if (this.length === 0) this.tail = entry;
    this.head = entry;
    ++this.length;
  };

  BufferList.prototype.shift = function shift() {
    if (this.length === 0) return;
    var ret = this.head.data;
    if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
    --this.length;
    return ret;
  };

  BufferList.prototype.clear = function clear() {
    this.head = this.tail = null;
    this.length = 0;
  };

  BufferList.prototype.join = function join(s) {
    if (this.length === 0) return '';
    var p = this.head;
    var ret = '' + p.data;
    while (p = p.next) {
      ret += s + p.data;
    }return ret;
  };

  BufferList.prototype.concat = function concat(n) {
    if (this.length === 0) return Buffer.alloc(0);
    if (this.length === 1) return this.head.data;
    var ret = Buffer.allocUnsafe(n >>> 0);
    var p = this.head;
    var i = 0;
    while (p) {
      copyBuffer(p.data, ret, i);
      i += p.data.length;
      p = p.next;
    }
    return ret;
  };

  return BufferList;
}();

if (util && util.inspect && util.inspect.custom) {
  module.exports.prototype[util.inspect.custom] = function () {
    var obj = util.inspect({ length: this.length });
    return this.constructor.name + ' ' + obj;
  };
}

/***/ }),

/***/ 387683:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/*<replacement>*/

var pna = __webpack_require__(688212);
/*</replacement>*/

// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
  var _this = this;

  var readableDestroyed = this._readableState && this._readableState.destroyed;
  var writableDestroyed = this._writableState && this._writableState.destroyed;

  if (readableDestroyed || writableDestroyed) {
    if (cb) {
      cb(err);
    } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
      pna.nextTick(emitErrorNT, this, err);
    }
    return this;
  }

  // we set destroyed to true before firing error callbacks in order
  // to make it re-entrance safe in case destroy() is called within callbacks

  if (this._readableState) {
    this._readableState.destroyed = true;
  }

  // if this is a duplex stream mark the writable part as destroyed as well
  if (this._writableState) {
    this._writableState.destroyed = true;
  }

  this._destroy(err || null, function (err) {
    if (!cb && err) {
      pna.nextTick(emitErrorNT, _this, err);
      if (_this._writableState) {
        _this._writableState.errorEmitted = true;
      }
    } else if (cb) {
      cb(err);
    }
  });

  return this;
}

function undestroy() {
  if (this._readableState) {
    this._readableState.destroyed = false;
    this._readableState.reading = false;
    this._readableState.ended = false;
    this._readableState.endEmitted = false;
  }

  if (this._writableState) {
    this._writableState.destroyed = false;
    this._writableState.ended = false;
    this._writableState.ending = false;
    this._writableState.finished = false;
    this._writableState.errorEmitted = false;
  }
}

function emitErrorNT(self, err) {
  self.emit('error', err);
}

module.exports = {
  destroy: destroy,
  undestroy: undestroy
};

/***/ }),

/***/ 163032:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(92413);


/***/ }),

/***/ 479437:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413);
if (process.env.READABLE_STREAM === 'disable' && Stream) {
  module.exports = Stream;
  exports = module.exports = Stream.Readable;
  exports.Readable = Stream.Readable;
  exports.Writable = Stream.Writable;
  exports.Duplex = Stream.Duplex;
  exports.Transform = Stream.Transform;
  exports.PassThrough = Stream.PassThrough;
  exports.Stream = Stream;
} else {
  exports = module.exports = __webpack_require__(789446);
  exports.Stream = Stream || exports;
  exports.Readable = exports;
  exports.Writable = __webpack_require__(927239);
  exports.Duplex = __webpack_require__(401819);
  exports.Transform = __webpack_require__(665903);
  exports.PassThrough = __webpack_require__(998231);
}


/***/ }),

/***/ 844380:
/***/ ((module, exports, __webpack_require__) => {

/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__(764293)
var Buffer = buffer.Buffer

// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
  for (var key in src) {
    dst[key] = src[key]
  }
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  module.exports = buffer
} else {
  // Copy properties from require('buffer')
  copyProps(buffer, exports)
  exports.Buffer = SafeBuffer
}

function SafeBuffer (arg, encodingOrOffset, length) {
  return Buffer(arg, encodingOrOffset, length)
}

// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)

SafeBuffer.from = function (arg, encodingOrOffset, length) {
  if (typeof arg === 'number') {
    throw new TypeError('Argument must not be a number')
  }
  return Buffer(arg, encodingOrOffset, length)
}

SafeBuffer.alloc = function (size, fill, encoding) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  var buf = Buffer(size)
  if (fill !== undefined) {
    if (typeof encoding === 'string') {
      buf.fill(fill, encoding)
    } else {
      buf.fill(fill)
    }
  } else {
    buf.fill(0)
  }
  return buf
}

SafeBuffer.allocUnsafe = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return Buffer(size)
}

SafeBuffer.allocUnsafeSlow = function (size) {
  if (typeof size !== 'number') {
    throw new TypeError('Argument must be a number')
  }
  return buffer.SlowBuffer(size)
}


/***/ }),

/***/ 835079:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var Buffer = __webpack_require__(844380).Buffer;
/*</replacement>*/

var isEncoding = Buffer.isEncoding || function (encoding) {
  encoding = '' + encoding;
  switch (encoding && encoding.toLowerCase()) {
    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
      return true;
    default:
      return false;
  }
};

function _normalizeEncoding(enc) {
  if (!enc) return 'utf8';
  var retried;
  while (true) {
    switch (enc) {
      case 'utf8':
      case 'utf-8':
        return 'utf8';
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return 'utf16le';
      case 'latin1':
      case 'binary':
        return 'latin1';
      case 'base64':
      case 'ascii':
      case 'hex':
        return enc;
      default:
        if (retried) return; // undefined
        enc = ('' + enc).toLowerCase();
        retried = true;
    }
  }
};

// Do not cache `Buffer.isEncoding` when checking encoding names as some
// modules monkey-patch it to support additional encodings
function normalizeEncoding(enc) {
  var nenc = _normalizeEncoding(enc);
  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  return nenc || enc;
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters.
exports.s = StringDecoder;
function StringDecoder(encoding) {
  this.encoding = normalizeEncoding(encoding);
  var nb;
  switch (this.encoding) {
    case 'utf16le':
      this.text = utf16Text;
      this.end = utf16End;
      nb = 4;
      break;
    case 'utf8':
      this.fillLast = utf8FillLast;
      nb = 4;
      break;
    case 'base64':
      this.text = base64Text;
      this.end = base64End;
      nb = 3;
      break;
    default:
      this.write = simpleWrite;
      this.end = simpleEnd;
      return;
  }
  this.lastNeed = 0;
  this.lastTotal = 0;
  this.lastChar = Buffer.allocUnsafe(nb);
}

StringDecoder.prototype.write = function (buf) {
  if (buf.length === 0) return '';
  var r;
  var i;
  if (this.lastNeed) {
    r = this.fillLast(buf);
    if (r === undefined) return '';
    i = this.lastNeed;
    this.lastNeed = 0;
  } else {
    i = 0;
  }
  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  return r || '';
};

StringDecoder.prototype.end = utf8End;

// Returns only complete characters in a Buffer
StringDecoder.prototype.text = utf8Text;

// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
StringDecoder.prototype.fillLast = function (buf) {
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  this.lastNeed -= buf.length;
};

// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
// continuation byte. If an invalid byte is detected, -2 is returned.
function utf8CheckByte(byte) {
  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  return byte >> 6 === 0x02 ? -1 : -2;
}

// Checks at most 3 bytes at the end of a Buffer in order to detect an
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
// needed to complete the UTF-8 character (if applicable) are returned.
function utf8CheckIncomplete(self, buf, i) {
  var j = buf.length - 1;
  if (j < i) return 0;
  var nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 1;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 2;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) {
      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
    }
    return nb;
  }
  return 0;
}

// Validates as many continuation bytes for a multi-byte UTF-8 character as
// needed or are available. If we see a non-continuation byte where we expect
// one, we "replace" the validated continuation bytes we've seen so far with
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
// behavior. The continuation byte check is included three times in the case
// where all of the continuation bytes for a character exist in the same buffer.
// It is also done this way as a slight performance increase instead of using a
// loop.
function utf8CheckExtraBytes(self, buf, p) {
  if ((buf[0] & 0xC0) !== 0x80) {
    self.lastNeed = 0;
    return '\ufffd';
  }
  if (self.lastNeed > 1 && buf.length > 1) {
    if ((buf[1] & 0xC0) !== 0x80) {
      self.lastNeed = 1;
      return '\ufffd';
    }
    if (self.lastNeed > 2 && buf.length > 2) {
      if ((buf[2] & 0xC0) !== 0x80) {
        self.lastNeed = 2;
        return '\ufffd';
      }
    }
  }
}

// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
function utf8FillLast(buf) {
  var p = this.lastTotal - this.lastNeed;
  var r = utf8CheckExtraBytes(this, buf, p);
  if (r !== undefined) return r;
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, p, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, p, 0, buf.length);
  this.lastNeed -= buf.length;
}

// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
// partial character, the character's bytes are buffered until the required
// number of bytes are available.
function utf8Text(buf, i) {
  var total = utf8CheckIncomplete(this, buf, i);
  if (!this.lastNeed) return buf.toString('utf8', i);
  this.lastTotal = total;
  var end = buf.length - (total - this.lastNeed);
  buf.copy(this.lastChar, 0, end);
  return buf.toString('utf8', i, end);
}

// For UTF-8, a replacement character is added when ending on a partial
// character.
function utf8End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + '\ufffd';
  return r;
}

// UTF-16LE typically needs two bytes per character, but even if we have an even
// number of bytes available, we need to check if we end on a leading/high
// surrogate. In that case, we need to wait for the next two bytes in order to
// decode the last character properly.
function utf16Text(buf, i) {
  if ((buf.length - i) % 2 === 0) {
    var r = buf.toString('utf16le', i);
    if (r) {
      var c = r.charCodeAt(r.length - 1);
      if (c >= 0xD800 && c <= 0xDBFF) {
        this.lastNeed = 2;
        this.lastTotal = 4;
        this.lastChar[0] = buf[buf.length - 2];
        this.lastChar[1] = buf[buf.length - 1];
        return r.slice(0, -1);
      }
    }
    return r;
  }
  this.lastNeed = 1;
  this.lastTotal = 2;
  this.lastChar[0] = buf[buf.length - 1];
  return buf.toString('utf16le', i, buf.length - 1);
}

// For UTF-16LE we do not explicitly append special replacement characters if we
// end on a partial character, we simply let v8 handle that.
function utf16End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) {
    var end = this.lastTotal - this.lastNeed;
    return r + this.lastChar.toString('utf16le', 0, end);
  }
  return r;
}

function base64Text(buf, i) {
  var n = (buf.length - i) % 3;
  if (n === 0) return buf.toString('base64', i);
  this.lastNeed = 3 - n;
  this.lastTotal = 3;
  if (n === 1) {
    this.lastChar[0] = buf[buf.length - 1];
  } else {
    this.lastChar[0] = buf[buf.length - 2];
    this.lastChar[1] = buf[buf.length - 1];
  }
  return buf.toString('base64', i, buf.length - n);
}

function base64End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  return r;
}

// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) {
  return buf.toString(this.encoding);
}

function simpleEnd(buf) {
  return buf && buf.length ? this.write(buf) : '';
}

/***/ }),

/***/ 494517:
/***/ (function(module, exports, __webpack_require__) {

/* module decorator */ module = __webpack_require__.nmd(module);
var __WEBPACK_AMD_DEFINE_RESULT__;/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
;(function() {

  /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  var undefined;

  /** Used as the semantic version number. */
  var VERSION = '4.17.20';

  /** Used as the size to enable large array optimizations. */
  var LARGE_ARRAY_SIZE = 200;

  /** Error message constants. */
  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
      FUNC_ERROR_TEXT = 'Expected a function';

  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED = '__lodash_hash_undefined__';

  /** Used as the maximum memoize cache size. */
  var MAX_MEMOIZE_SIZE = 500;

  /** Used as the internal argument placeholder. */
  var PLACEHOLDER = '__lodash_placeholder__';

  /** Used to compose bitmasks for cloning. */
  var CLONE_DEEP_FLAG = 1,
      CLONE_FLAT_FLAG = 2,
      CLONE_SYMBOLS_FLAG = 4;

  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG = 1,
      COMPARE_UNORDERED_FLAG = 2;

  /** Used to compose bitmasks for function metadata. */
  var WRAP_BIND_FLAG = 1,
      WRAP_BIND_KEY_FLAG = 2,
      WRAP_CURRY_BOUND_FLAG = 4,
      WRAP_CURRY_FLAG = 8,
      WRAP_CURRY_RIGHT_FLAG = 16,
      WRAP_PARTIAL_FLAG = 32,
      WRAP_PARTIAL_RIGHT_FLAG = 64,
      WRAP_ARY_FLAG = 128,
      WRAP_REARG_FLAG = 256,
      WRAP_FLIP_FLAG = 512;

  /** Used as default options for `_.truncate`. */
  var DEFAULT_TRUNC_LENGTH = 30,
      DEFAULT_TRUNC_OMISSION = '...';

  /** Used to detect hot functions by number of calls within a span of milliseconds. */
  var HOT_COUNT = 800,
      HOT_SPAN = 16;

  /** Used to indicate the type of lazy iteratees. */
  var LAZY_FILTER_FLAG = 1,
      LAZY_MAP_FLAG = 2,
      LAZY_WHILE_FLAG = 3;

  /** Used as references for various `Number` constants. */
  var INFINITY = 1 / 0,
      MAX_SAFE_INTEGER = 9007199254740991,
      MAX_INTEGER = 1.7976931348623157e+308,
      NAN = 0 / 0;

  /** Used as references for the maximum length and index of an array. */
  var MAX_ARRAY_LENGTH = 4294967295,
      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;

  /** Used to associate wrap methods with their bit flags. */
  var wrapFlags = [
    ['ary', WRAP_ARY_FLAG],
    ['bind', WRAP_BIND_FLAG],
    ['bindKey', WRAP_BIND_KEY_FLAG],
    ['curry', WRAP_CURRY_FLAG],
    ['curryRight', WRAP_CURRY_RIGHT_FLAG],
    ['flip', WRAP_FLIP_FLAG],
    ['partial', WRAP_PARTIAL_FLAG],
    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
    ['rearg', WRAP_REARG_FLAG]
  ];

  /** `Object#toString` result references. */
  var argsTag = '[object Arguments]',
      arrayTag = '[object Array]',
      asyncTag = '[object AsyncFunction]',
      boolTag = '[object Boolean]',
      dateTag = '[object Date]',
      domExcTag = '[object DOMException]',
      errorTag = '[object Error]',
      funcTag = '[object Function]',
      genTag = '[object GeneratorFunction]',
      mapTag = '[object Map]',
      numberTag = '[object Number]',
      nullTag = '[object Null]',
      objectTag = '[object Object]',
      promiseTag = '[object Promise]',
      proxyTag = '[object Proxy]',
      regexpTag = '[object RegExp]',
      setTag = '[object Set]',
      stringTag = '[object String]',
      symbolTag = '[object Symbol]',
      undefinedTag = '[object Undefined]',
      weakMapTag = '[object WeakMap]',
      weakSetTag = '[object WeakSet]';

  var arrayBufferTag = '[object ArrayBuffer]',
      dataViewTag = '[object DataView]',
      float32Tag = '[object Float32Array]',
      float64Tag = '[object Float64Array]',
      int8Tag = '[object Int8Array]',
      int16Tag = '[object Int16Array]',
      int32Tag = '[object Int32Array]',
      uint8Tag = '[object Uint8Array]',
      uint8ClampedTag = '[object Uint8ClampedArray]',
      uint16Tag = '[object Uint16Array]',
      uint32Tag = '[object Uint32Array]';

  /** Used to match empty string literals in compiled template source. */
  var reEmptyStringLeading = /\b__p \+= '';/g,
      reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
      reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;

  /** Used to match HTML entities and HTML characters. */
  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
      reUnescapedHtml = /[&<>"']/g,
      reHasEscapedHtml = RegExp(reEscapedHtml.source),
      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);

  /** Used to match template delimiters. */
  var reEscape = /<%-([\s\S]+?)%>/g,
      reEvaluate = /<%([\s\S]+?)%>/g,
      reInterpolate = /<%=([\s\S]+?)%>/g;

  /** Used to match property names within property paths. */
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
      reIsPlainProp = /^\w*$/,
      rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;

  /**
   * Used to match `RegExp`
   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
   */
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
      reHasRegExpChar = RegExp(reRegExpChar.source);

  /** Used to match leading and trailing whitespace. */
  var reTrim = /^\s+|\s+$/g,
      reTrimStart = /^\s+/,
      reTrimEnd = /\s+$/;

  /** Used to match wrap detail comments. */
  var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
      reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
      reSplitDetails = /,? & /;

  /** Used to match words composed of alphanumeric characters. */
  var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;

  /** Used to match backslashes in property paths. */
  var reEscapeChar = /\\(\\)?/g;

  /**
   * Used to match
   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
   */
  var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;

  /** Used to match `RegExp` flags from their coerced string values. */
  var reFlags = /\w*$/;

  /** Used to detect bad signed hexadecimal string values. */
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

  /** Used to detect binary string values. */
  var reIsBinary = /^0b[01]+$/i;

  /** Used to detect host constructors (Safari). */
  var reIsHostCtor = /^\[object .+?Constructor\]$/;

  /** Used to detect octal string values. */
  var reIsOctal = /^0o[0-7]+$/i;

  /** Used to detect unsigned integer values. */
  var reIsUint = /^(?:0|[1-9]\d*)$/;

  /** Used to match Latin Unicode letters (excluding mathematical operators). */
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;

  /** Used to ensure capturing order of template delimiters. */
  var reNoMatch = /($^)/;

  /** Used to match unescaped characters in compiled string literals. */
  var reUnescapedString = /['\n\r\u2028\u2029\\]/g;

  /** Used to compose unicode character classes. */
  var rsAstralRange = '\\ud800-\\udfff',
      rsComboMarksRange = '\\u0300-\\u036f',
      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
      rsComboSymbolsRange = '\\u20d0-\\u20ff',
      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
      rsDingbatRange = '\\u2700-\\u27bf',
      rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
      rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
      rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
      rsPunctuationRange = '\\u2000-\\u206f',
      rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
      rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
      rsVarRange = '\\ufe0e\\ufe0f',
      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;

  /** Used to compose unicode capture groups. */
  var rsApos = "['\u2019]",
      rsAstral = '[' + rsAstralRange + ']',
      rsBreak = '[' + rsBreakRange + ']',
      rsCombo = '[' + rsComboRange + ']',
      rsDigits = '\\d+',
      rsDingbat = '[' + rsDingbatRange + ']',
      rsLower = '[' + rsLowerRange + ']',
      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
      rsFitz = '\\ud83c[\\udffb-\\udfff]',
      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
      rsNonAstral = '[^' + rsAstralRange + ']',
      rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
      rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
      rsUpper = '[' + rsUpperRange + ']',
      rsZWJ = '\\u200d';

  /** Used to compose unicode regexes. */
  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
      reOptMod = rsModifier + '?',
      rsOptVar = '[' + rsVarRange + ']?',
      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
      rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
      rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
      rsSeq = rsOptVar + reOptMod + rsOptJoin,
      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

  /** Used to match apostrophes. */
  var reApos = RegExp(rsApos, 'g');

  /**
   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
   */
  var reComboMark = RegExp(rsCombo, 'g');

  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

  /** Used to match complex or compound words. */
  var reUnicodeWord = RegExp([
    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
    rsUpper + '+' + rsOptContrUpper,
    rsOrdUpper,
    rsOrdLower,
    rsDigits,
    rsEmoji
  ].join('|'), 'g');

  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

  /** Used to detect strings that need a more robust regexp to match words. */
  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;

  /** Used to assign default `context` object properties. */
  var contextProps = [
    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  ];

  /** Used to make template sourceURLs easier to identify. */
  var templateCounter = -1;

  /** Used to identify `toStringTag` values of typed arrays. */
  var typedArrayTags = {};
  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  typedArrayTags[uint32Tag] = true;
  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  typedArrayTags[setTag] = typedArrayTags[stringTag] =
  typedArrayTags[weakMapTag] = false;

  /** Used to identify `toStringTag` values supported by `_.clone`. */
  var cloneableTags = {};
  cloneableTags[argsTag] = cloneableTags[arrayTag] =
  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  cloneableTags[boolTag] = cloneableTags[dateTag] =
  cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  cloneableTags[int32Tag] = cloneableTags[mapTag] =
  cloneableTags[numberTag] = cloneableTags[objectTag] =
  cloneableTags[regexpTag] = cloneableTags[setTag] =
  cloneableTags[stringTag] = cloneableTags[symbolTag] =
  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  cloneableTags[errorTag] = cloneableTags[funcTag] =
  cloneableTags[weakMapTag] = false;

  /** Used to map Latin Unicode letters to basic Latin letters. */
  var deburredLetters = {
    // Latin-1 Supplement block.
    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
    '\xc7': 'C',  '\xe7': 'c',
    '\xd0': 'D',  '\xf0': 'd',
    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
    '\xd1': 'N',  '\xf1': 'n',
    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
    '\xc6': 'Ae', '\xe6': 'ae',
    '\xde': 'Th', '\xfe': 'th',
    '\xdf': 'ss',
    // Latin Extended-A block.
    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
    '\u0134': 'J',  '\u0135': 'j',
    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
    '\u0174': 'W',  '\u0175': 'w',
    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
    '\u0132': 'IJ', '\u0133': 'ij',
    '\u0152': 'Oe', '\u0153': 'oe',
    '\u0149': "'n", '\u017f': 's'
  };

  /** Used to map characters to HTML entities. */
  var htmlEscapes = {
    '&': '&amp;',
    '<': '&lt;',
    '>': '&gt;',
    '"': '&quot;',
    "'": '&#39;'
  };

  /** Used to map HTML entities to characters. */
  var htmlUnescapes = {
    '&amp;': '&',
    '&lt;': '<',
    '&gt;': '>',
    '&quot;': '"',
    '&#39;': "'"
  };

  /** Used to escape characters for inclusion in compiled string literals. */
  var stringEscapes = {
    '\\': '\\',
    "'": "'",
    '\n': 'n',
    '\r': 'r',
    '\u2028': 'u2028',
    '\u2029': 'u2029'
  };

  /** Built-in method references without a dependency on `root`. */
  var freeParseFloat = parseFloat,
      freeParseInt = parseInt;

  /** Detect free variable `global` from Node.js. */
  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

  /** Detect free variable `self`. */
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

  /** Used as a reference to the global object. */
  var root = freeGlobal || freeSelf || Function('return this')();

  /** Detect free variable `exports`. */
  var freeExports =  true && exports && !exports.nodeType && exports;

  /** Detect free variable `module`. */
  var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

  /** Detect the popular CommonJS extension `module.exports`. */
  var moduleExports = freeModule && freeModule.exports === freeExports;

  /** Detect free variable `process` from Node.js. */
  var freeProcess = moduleExports && freeGlobal.process;

  /** Used to access faster Node.js helpers. */
  var nodeUtil = (function() {
    try {
      // Use `util.types` for Node.js 10+.
      var types = freeModule && freeModule.require && freeModule.require('util').types;

      if (types) {
        return types;
      }

      // Legacy `process.binding('util')` for Node.js < 10.
      return freeProcess && freeProcess.binding && freeProcess.binding('util');
    } catch (e) {}
  }());

  /* Node.js helper references. */
  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
      nodeIsDate = nodeUtil && nodeUtil.isDate,
      nodeIsMap = nodeUtil && nodeUtil.isMap,
      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
      nodeIsSet = nodeUtil && nodeUtil.isSet,
      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

  /*--------------------------------------------------------------------------*/

  /**
   * A faster alternative to `Function#apply`, this function invokes `func`
   * with the `this` binding of `thisArg` and the arguments of `args`.
   *
   * @private
   * @param {Function} func The function to invoke.
   * @param {*} thisArg The `this` binding of `func`.
   * @param {Array} args The arguments to invoke `func` with.
   * @returns {*} Returns the result of `func`.
   */
  function apply(func, thisArg, args) {
    switch (args.length) {
      case 0: return func.call(thisArg);
      case 1: return func.call(thisArg, args[0]);
      case 2: return func.call(thisArg, args[0], args[1]);
      case 3: return func.call(thisArg, args[0], args[1], args[2]);
    }
    return func.apply(thisArg, args);
  }

  /**
   * A specialized version of `baseAggregator` for arrays.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} setter The function to set `accumulator` values.
   * @param {Function} iteratee The iteratee to transform keys.
   * @param {Object} accumulator The initial aggregated object.
   * @returns {Function} Returns `accumulator`.
   */
  function arrayAggregator(array, setter, iteratee, accumulator) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      var value = array[index];
      setter(accumulator, value, iteratee(value), array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.forEach` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns `array`.
   */
  function arrayEach(array, iteratee) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (iteratee(array[index], index, array) === false) {
        break;
      }
    }
    return array;
  }

  /**
   * A specialized version of `_.forEachRight` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns `array`.
   */
  function arrayEachRight(array, iteratee) {
    var length = array == null ? 0 : array.length;

    while (length--) {
      if (iteratee(array[length], length, array) === false) {
        break;
      }
    }
    return array;
  }

  /**
   * A specialized version of `_.every` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if all elements pass the predicate check,
   *  else `false`.
   */
  function arrayEvery(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (!predicate(array[index], index, array)) {
        return false;
      }
    }
    return true;
  }

  /**
   * A specialized version of `_.filter` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {Array} Returns the new filtered array.
   */
  function arrayFilter(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index];
      if (predicate(value, index, array)) {
        result[resIndex++] = value;
      }
    }
    return result;
  }

  /**
   * A specialized version of `_.includes` for arrays without support for
   * specifying an index to search from.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludes(array, value) {
    var length = array == null ? 0 : array.length;
    return !!length && baseIndexOf(array, value, 0) > -1;
  }

  /**
   * This function is like `arrayIncludes` except that it accepts a comparator.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @param {Function} comparator The comparator invoked per element.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludesWith(array, value, comparator) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (comparator(value, array[index])) {
        return true;
      }
    }
    return false;
  }

  /**
   * A specialized version of `_.map` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the new mapped array.
   */
  function arrayMap(array, iteratee) {
    var index = -1,
        length = array == null ? 0 : array.length,
        result = Array(length);

    while (++index < length) {
      result[index] = iteratee(array[index], index, array);
    }
    return result;
  }

  /**
   * Appends the elements of `values` to `array`.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {Array} values The values to append.
   * @returns {Array} Returns `array`.
   */
  function arrayPush(array, values) {
    var index = -1,
        length = values.length,
        offset = array.length;

    while (++index < length) {
      array[offset + index] = values[index];
    }
    return array;
  }

  /**
   * A specialized version of `_.reduce` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @param {boolean} [initAccum] Specify using the first element of `array` as
   *  the initial value.
   * @returns {*} Returns the accumulated value.
   */
  function arrayReduce(array, iteratee, accumulator, initAccum) {
    var index = -1,
        length = array == null ? 0 : array.length;

    if (initAccum && length) {
      accumulator = array[++index];
    }
    while (++index < length) {
      accumulator = iteratee(accumulator, array[index], index, array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.reduceRight` for arrays without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} [accumulator] The initial value.
   * @param {boolean} [initAccum] Specify using the last element of `array` as
   *  the initial value.
   * @returns {*} Returns the accumulated value.
   */
  function arrayReduceRight(array, iteratee, accumulator, initAccum) {
    var length = array == null ? 0 : array.length;
    if (initAccum && length) {
      accumulator = array[--length];
    }
    while (length--) {
      accumulator = iteratee(accumulator, array[length], length, array);
    }
    return accumulator;
  }

  /**
   * A specialized version of `_.some` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if any element passes the predicate check,
   *  else `false`.
   */
  function arraySome(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length;

    while (++index < length) {
      if (predicate(array[index], index, array)) {
        return true;
      }
    }
    return false;
  }

  /**
   * Gets the size of an ASCII `string`.
   *
   * @private
   * @param {string} string The string inspect.
   * @returns {number} Returns the string size.
   */
  var asciiSize = baseProperty('length');

  /**
   * Converts an ASCII `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function asciiToArray(string) {
    return string.split('');
  }

  /**
   * Splits an ASCII `string` into an array of its words.
   *
   * @private
   * @param {string} The string to inspect.
   * @returns {Array} Returns the words of `string`.
   */
  function asciiWords(string) {
    return string.match(reAsciiWord) || [];
  }

  /**
   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
   * without support for iteratee shorthands, which iterates over `collection`
   * using `eachFunc`.
   *
   * @private
   * @param {Array|Object} collection The collection to inspect.
   * @param {Function} predicate The function invoked per iteration.
   * @param {Function} eachFunc The function to iterate over `collection`.
   * @returns {*} Returns the found element or its key, else `undefined`.
   */
  function baseFindKey(collection, predicate, eachFunc) {
    var result;
    eachFunc(collection, function(value, key, collection) {
      if (predicate(value, key, collection)) {
        result = key;
        return false;
      }
    });
    return result;
  }

  /**
   * The base implementation of `_.findIndex` and `_.findLastIndex` without
   * support for iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Function} predicate The function invoked per iteration.
   * @param {number} fromIndex The index to search from.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseFindIndex(array, predicate, fromIndex, fromRight) {
    var length = array.length,
        index = fromIndex + (fromRight ? 1 : -1);

    while ((fromRight ? index-- : ++index < length)) {
      if (predicate(array[index], index, array)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseIndexOf(array, value, fromIndex) {
    return value === value
      ? strictIndexOf(array, value, fromIndex)
      : baseFindIndex(array, baseIsNaN, fromIndex);
  }

  /**
   * This function is like `baseIndexOf` except that it accepts a comparator.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @param {Function} comparator The comparator invoked per element.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseIndexOfWith(array, value, fromIndex, comparator) {
    var index = fromIndex - 1,
        length = array.length;

    while (++index < length) {
      if (comparator(array[index], value)) {
        return index;
      }
    }
    return -1;
  }

  /**
   * The base implementation of `_.isNaN` without support for number objects.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
   */
  function baseIsNaN(value) {
    return value !== value;
  }

  /**
   * The base implementation of `_.mean` and `_.meanBy` without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {number} Returns the mean.
   */
  function baseMean(array, iteratee) {
    var length = array == null ? 0 : array.length;
    return length ? (baseSum(array, iteratee) / length) : NAN;
  }

  /**
   * The base implementation of `_.property` without support for deep paths.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @returns {Function} Returns the new accessor function.
   */
  function baseProperty(key) {
    return function(object) {
      return object == null ? undefined : object[key];
    };
  }

  /**
   * The base implementation of `_.propertyOf` without support for deep paths.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Function} Returns the new accessor function.
   */
  function basePropertyOf(object) {
    return function(key) {
      return object == null ? undefined : object[key];
    };
  }

  /**
   * The base implementation of `_.reduce` and `_.reduceRight`, without support
   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
   *
   * @private
   * @param {Array|Object} collection The collection to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @param {*} accumulator The initial value.
   * @param {boolean} initAccum Specify using the first or last element of
   *  `collection` as the initial value.
   * @param {Function} eachFunc The function to iterate over `collection`.
   * @returns {*} Returns the accumulated value.
   */
  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
    eachFunc(collection, function(value, index, collection) {
      accumulator = initAccum
        ? (initAccum = false, value)
        : iteratee(accumulator, value, index, collection);
    });
    return accumulator;
  }

  /**
   * The base implementation of `_.sortBy` which uses `comparer` to define the
   * sort order of `array` and replaces criteria objects with their corresponding
   * values.
   *
   * @private
   * @param {Array} array The array to sort.
   * @param {Function} comparer The function to define sort order.
   * @returns {Array} Returns `array`.
   */
  function baseSortBy(array, comparer) {
    var length = array.length;

    array.sort(comparer);
    while (length--) {
      array[length] = array[length].value;
    }
    return array;
  }

  /**
   * The base implementation of `_.sum` and `_.sumBy` without support for
   * iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {number} Returns the sum.
   */
  function baseSum(array, iteratee) {
    var result,
        index = -1,
        length = array.length;

    while (++index < length) {
      var current = iteratee(array[index]);
      if (current !== undefined) {
        result = result === undefined ? current : (result + current);
      }
    }
    return result;
  }

  /**
   * The base implementation of `_.times` without support for iteratee shorthands
   * or max array length checks.
   *
   * @private
   * @param {number} n The number of times to invoke `iteratee`.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the array of results.
   */
  function baseTimes(n, iteratee) {
    var index = -1,
        result = Array(n);

    while (++index < n) {
      result[index] = iteratee(index);
    }
    return result;
  }

  /**
   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
   * of key-value pairs for `object` corresponding to the property names of `props`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array} props The property names to get values for.
   * @returns {Object} Returns the key-value pairs.
   */
  function baseToPairs(object, props) {
    return arrayMap(props, function(key) {
      return [key, object[key]];
    });
  }

  /**
   * The base implementation of `_.unary` without support for storing metadata.
   *
   * @private
   * @param {Function} func The function to cap arguments for.
   * @returns {Function} Returns the new capped function.
   */
  function baseUnary(func) {
    return function(value) {
      return func(value);
    };
  }

  /**
   * The base implementation of `_.values` and `_.valuesIn` which creates an
   * array of `object` property values corresponding to the property names
   * of `props`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array} props The property names to get values for.
   * @returns {Object} Returns the array of property values.
   */
  function baseValues(object, props) {
    return arrayMap(props, function(key) {
      return object[key];
    });
  }

  /**
   * Checks if a `cache` value for `key` exists.
   *
   * @private
   * @param {Object} cache The cache to query.
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function cacheHas(cache, key) {
    return cache.has(key);
  }

  /**
   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
   * that is not found in the character symbols.
   *
   * @private
   * @param {Array} strSymbols The string symbols to inspect.
   * @param {Array} chrSymbols The character symbols to find.
   * @returns {number} Returns the index of the first unmatched string symbol.
   */
  function charsStartIndex(strSymbols, chrSymbols) {
    var index = -1,
        length = strSymbols.length;

    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
    return index;
  }

  /**
   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
   * that is not found in the character symbols.
   *
   * @private
   * @param {Array} strSymbols The string symbols to inspect.
   * @param {Array} chrSymbols The character symbols to find.
   * @returns {number} Returns the index of the last unmatched string symbol.
   */
  function charsEndIndex(strSymbols, chrSymbols) {
    var index = strSymbols.length;

    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
    return index;
  }

  /**
   * Gets the number of `placeholder` occurrences in `array`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} placeholder The placeholder to search for.
   * @returns {number} Returns the placeholder count.
   */
  function countHolders(array, placeholder) {
    var length = array.length,
        result = 0;

    while (length--) {
      if (array[length] === placeholder) {
        ++result;
      }
    }
    return result;
  }

  /**
   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
   * letters to basic Latin letters.
   *
   * @private
   * @param {string} letter The matched letter to deburr.
   * @returns {string} Returns the deburred letter.
   */
  var deburrLetter = basePropertyOf(deburredLetters);

  /**
   * Used by `_.escape` to convert characters to HTML entities.
   *
   * @private
   * @param {string} chr The matched character to escape.
   * @returns {string} Returns the escaped character.
   */
  var escapeHtmlChar = basePropertyOf(htmlEscapes);

  /**
   * Used by `_.template` to escape characters for inclusion in compiled string literals.
   *
   * @private
   * @param {string} chr The matched character to escape.
   * @returns {string} Returns the escaped character.
   */
  function escapeStringChar(chr) {
    return '\\' + stringEscapes[chr];
  }

  /**
   * Gets the value at `key` of `object`.
   *
   * @private
   * @param {Object} [object] The object to query.
   * @param {string} key The key of the property to get.
   * @returns {*} Returns the property value.
   */
  function getValue(object, key) {
    return object == null ? undefined : object[key];
  }

  /**
   * Checks if `string` contains Unicode symbols.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
   */
  function hasUnicode(string) {
    return reHasUnicode.test(string);
  }

  /**
   * Checks if `string` contains a word composed of Unicode symbols.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {boolean} Returns `true` if a word is found, else `false`.
   */
  function hasUnicodeWord(string) {
    return reHasUnicodeWord.test(string);
  }

  /**
   * Converts `iterator` to an array.
   *
   * @private
   * @param {Object} iterator The iterator to convert.
   * @returns {Array} Returns the converted array.
   */
  function iteratorToArray(iterator) {
    var data,
        result = [];

    while (!(data = iterator.next()).done) {
      result.push(data.value);
    }
    return result;
  }

  /**
   * Converts `map` to its key-value pairs.
   *
   * @private
   * @param {Object} map The map to convert.
   * @returns {Array} Returns the key-value pairs.
   */
  function mapToArray(map) {
    var index = -1,
        result = Array(map.size);

    map.forEach(function(value, key) {
      result[++index] = [key, value];
    });
    return result;
  }

  /**
   * Creates a unary function that invokes `func` with its argument transformed.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {Function} transform The argument transform.
   * @returns {Function} Returns the new function.
   */
  function overArg(func, transform) {
    return function(arg) {
      return func(transform(arg));
    };
  }

  /**
   * Replaces all `placeholder` elements in `array` with an internal placeholder
   * and returns an array of their indexes.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {*} placeholder The placeholder to replace.
   * @returns {Array} Returns the new array of placeholder indexes.
   */
  function replaceHolders(array, placeholder) {
    var index = -1,
        length = array.length,
        resIndex = 0,
        result = [];

    while (++index < length) {
      var value = array[index];
      if (value === placeholder || value === PLACEHOLDER) {
        array[index] = PLACEHOLDER;
        result[resIndex++] = index;
      }
    }
    return result;
  }

  /**
   * Converts `set` to an array of its values.
   *
   * @private
   * @param {Object} set The set to convert.
   * @returns {Array} Returns the values.
   */
  function setToArray(set) {
    var index = -1,
        result = Array(set.size);

    set.forEach(function(value) {
      result[++index] = value;
    });
    return result;
  }

  /**
   * Converts `set` to its value-value pairs.
   *
   * @private
   * @param {Object} set The set to convert.
   * @returns {Array} Returns the value-value pairs.
   */
  function setToPairs(set) {
    var index = -1,
        result = Array(set.size);

    set.forEach(function(value) {
      result[++index] = [value, value];
    });
    return result;
  }

  /**
   * A specialized version of `_.indexOf` which performs strict equality
   * comparisons of values, i.e. `===`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function strictIndexOf(array, value, fromIndex) {
    var index = fromIndex - 1,
        length = array.length;

    while (++index < length) {
      if (array[index] === value) {
        return index;
      }
    }
    return -1;
  }

  /**
   * A specialized version of `_.lastIndexOf` which performs strict equality
   * comparisons of values, i.e. `===`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function strictLastIndexOf(array, value, fromIndex) {
    var index = fromIndex + 1;
    while (index--) {
      if (array[index] === value) {
        return index;
      }
    }
    return index;
  }

  /**
   * Gets the number of symbols in `string`.
   *
   * @private
   * @param {string} string The string to inspect.
   * @returns {number} Returns the string size.
   */
  function stringSize(string) {
    return hasUnicode(string)
      ? unicodeSize(string)
      : asciiSize(string);
  }

  /**
   * Converts `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function stringToArray(string) {
    return hasUnicode(string)
      ? unicodeToArray(string)
      : asciiToArray(string);
  }

  /**
   * Used by `_.unescape` to convert HTML entities to characters.
   *
   * @private
   * @param {string} chr The matched character to unescape.
   * @returns {string} Returns the unescaped character.
   */
  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);

  /**
   * Gets the size of a Unicode `string`.
   *
   * @private
   * @param {string} string The string inspect.
   * @returns {number} Returns the string size.
   */
  function unicodeSize(string) {
    var result = reUnicode.lastIndex = 0;
    while (reUnicode.test(string)) {
      ++result;
    }
    return result;
  }

  /**
   * Converts a Unicode `string` to an array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the converted array.
   */
  function unicodeToArray(string) {
    return string.match(reUnicode) || [];
  }

  /**
   * Splits a Unicode `string` into an array of its words.
   *
   * @private
   * @param {string} The string to inspect.
   * @returns {Array} Returns the words of `string`.
   */
  function unicodeWords(string) {
    return string.match(reUnicodeWord) || [];
  }

  /*--------------------------------------------------------------------------*/

  /**
   * Create a new pristine `lodash` function using the `context` object.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category Util
   * @param {Object} [context=root] The context object.
   * @returns {Function} Returns a new `lodash` function.
   * @example
   *
   * _.mixin({ 'foo': _.constant('foo') });
   *
   * var lodash = _.runInContext();
   * lodash.mixin({ 'bar': lodash.constant('bar') });
   *
   * _.isFunction(_.foo);
   * // => true
   * _.isFunction(_.bar);
   * // => false
   *
   * lodash.isFunction(lodash.foo);
   * // => false
   * lodash.isFunction(lodash.bar);
   * // => true
   *
   * // Create a suped-up `defer` in Node.js.
   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
   */
  var runInContext = (function runInContext(context) {
    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));

    /** Built-in constructor references. */
    var Array = context.Array,
        Date = context.Date,
        Error = context.Error,
        Function = context.Function,
        Math = context.Math,
        Object = context.Object,
        RegExp = context.RegExp,
        String = context.String,
        TypeError = context.TypeError;

    /** Used for built-in method references. */
    var arrayProto = Array.prototype,
        funcProto = Function.prototype,
        objectProto = Object.prototype;

    /** Used to detect overreaching core-js shims. */
    var coreJsData = context['__core-js_shared__'];

    /** Used to resolve the decompiled source of functions. */
    var funcToString = funcProto.toString;

    /** Used to check objects for own properties. */
    var hasOwnProperty = objectProto.hasOwnProperty;

    /** Used to generate unique IDs. */
    var idCounter = 0;

    /** Used to detect methods masquerading as native. */
    var maskSrcKey = (function() {
      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
      return uid ? ('Symbol(src)_1.' + uid) : '';
    }());

    /**
     * Used to resolve the
     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
     * of values.
     */
    var nativeObjectToString = objectProto.toString;

    /** Used to infer the `Object` constructor. */
    var objectCtorString = funcToString.call(Object);

    /** Used to restore the original `_` reference in `_.noConflict`. */
    var oldDash = root._;

    /** Used to detect if a method is native. */
    var reIsNative = RegExp('^' +
      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
      .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
    );

    /** Built-in value references. */
    var Buffer = moduleExports ? context.Buffer : undefined,
        Symbol = context.Symbol,
        Uint8Array = context.Uint8Array,
        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
        getPrototype = overArg(Object.getPrototypeOf, Object),
        objectCreate = Object.create,
        propertyIsEnumerable = objectProto.propertyIsEnumerable,
        splice = arrayProto.splice,
        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
        symIterator = Symbol ? Symbol.iterator : undefined,
        symToStringTag = Symbol ? Symbol.toStringTag : undefined;

    var defineProperty = (function() {
      try {
        var func = getNative(Object, 'defineProperty');
        func({}, '', {});
        return func;
      } catch (e) {}
    }());

    /** Mocked built-ins. */
    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
        ctxNow = Date && Date.now !== root.Date.now && Date.now,
        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;

    /* Built-in method references for those with the same name as other `lodash` methods. */
    var nativeCeil = Math.ceil,
        nativeFloor = Math.floor,
        nativeGetSymbols = Object.getOwnPropertySymbols,
        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
        nativeIsFinite = context.isFinite,
        nativeJoin = arrayProto.join,
        nativeKeys = overArg(Object.keys, Object),
        nativeMax = Math.max,
        nativeMin = Math.min,
        nativeNow = Date.now,
        nativeParseInt = context.parseInt,
        nativeRandom = Math.random,
        nativeReverse = arrayProto.reverse;

    /* Built-in method references that are verified to be native. */
    var DataView = getNative(context, 'DataView'),
        Map = getNative(context, 'Map'),
        Promise = getNative(context, 'Promise'),
        Set = getNative(context, 'Set'),
        WeakMap = getNative(context, 'WeakMap'),
        nativeCreate = getNative(Object, 'create');

    /** Used to store function metadata. */
    var metaMap = WeakMap && new WeakMap;

    /** Used to lookup unminified function names. */
    var realNames = {};

    /** Used to detect maps, sets, and weakmaps. */
    var dataViewCtorString = toSource(DataView),
        mapCtorString = toSource(Map),
        promiseCtorString = toSource(Promise),
        setCtorString = toSource(Set),
        weakMapCtorString = toSource(WeakMap);

    /** Used to convert symbols to primitives and strings. */
    var symbolProto = Symbol ? Symbol.prototype : undefined,
        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
        symbolToString = symbolProto ? symbolProto.toString : undefined;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a `lodash` object which wraps `value` to enable implicit method
     * chain sequences. Methods that operate on and return arrays, collections,
     * and functions can be chained together. Methods that retrieve a single value
     * or may return a primitive value will automatically end the chain sequence
     * and return the unwrapped value. Otherwise, the value must be unwrapped
     * with `_#value`.
     *
     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
     * enabled using `_.chain`.
     *
     * The execution of chained methods is lazy, that is, it's deferred until
     * `_#value` is implicitly or explicitly called.
     *
     * Lazy evaluation allows several methods to support shortcut fusion.
     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
     * the creation of intermediate arrays and can greatly reduce the number of
     * iteratee executions. Sections of a chain sequence qualify for shortcut
     * fusion if the section is applied to an array and iteratees accept only
     * one argument. The heuristic for whether a section qualifies for shortcut
     * fusion is subject to change.
     *
     * Chaining is supported in custom builds as long as the `_#value` method is
     * directly or indirectly included in the build.
     *
     * In addition to lodash methods, wrappers have `Array` and `String` methods.
     *
     * The wrapper `Array` methods are:
     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
     *
     * The wrapper `String` methods are:
     * `replace` and `split`
     *
     * The wrapper methods that support shortcut fusion are:
     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
     *
     * The chainable wrapper methods are:
     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
     * `zipObject`, `zipObjectDeep`, and `zipWith`
     *
     * The wrapper methods that are **not** chainable by default are:
     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
     * `upperFirst`, `value`, and `words`
     *
     * @name _
     * @constructor
     * @category Seq
     * @param {*} value The value to wrap in a `lodash` instance.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var wrapped = _([1, 2, 3]);
     *
     * // Returns an unwrapped value.
     * wrapped.reduce(_.add);
     * // => 6
     *
     * // Returns a wrapped value.
     * var squares = wrapped.map(square);
     *
     * _.isArray(squares);
     * // => false
     *
     * _.isArray(squares.value());
     * // => true
     */
    function lodash(value) {
      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
        if (value instanceof LodashWrapper) {
          return value;
        }
        if (hasOwnProperty.call(value, '__wrapped__')) {
          return wrapperClone(value);
        }
      }
      return new LodashWrapper(value);
    }

    /**
     * The base implementation of `_.create` without support for assigning
     * properties to the created object.
     *
     * @private
     * @param {Object} proto The object to inherit from.
     * @returns {Object} Returns the new object.
     */
    var baseCreate = (function() {
      function object() {}
      return function(proto) {
        if (!isObject(proto)) {
          return {};
        }
        if (objectCreate) {
          return objectCreate(proto);
        }
        object.prototype = proto;
        var result = new object;
        object.prototype = undefined;
        return result;
      };
    }());

    /**
     * The function whose prototype chain sequence wrappers inherit from.
     *
     * @private
     */
    function baseLodash() {
      // No operation performed.
    }

    /**
     * The base constructor for creating `lodash` wrapper objects.
     *
     * @private
     * @param {*} value The value to wrap.
     * @param {boolean} [chainAll] Enable explicit method chain sequences.
     */
    function LodashWrapper(value, chainAll) {
      this.__wrapped__ = value;
      this.__actions__ = [];
      this.__chain__ = !!chainAll;
      this.__index__ = 0;
      this.__values__ = undefined;
    }

    /**
     * By default, the template delimiters used by lodash are like those in
     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
     * following template settings to use alternative delimiters.
     *
     * @static
     * @memberOf _
     * @type {Object}
     */
    lodash.templateSettings = {

      /**
       * Used to detect `data` property values to be HTML-escaped.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'escape': reEscape,

      /**
       * Used to detect code to be evaluated.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'evaluate': reEvaluate,

      /**
       * Used to detect `data` property values to inject.
       *
       * @memberOf _.templateSettings
       * @type {RegExp}
       */
      'interpolate': reInterpolate,

      /**
       * Used to reference the data object in the template text.
       *
       * @memberOf _.templateSettings
       * @type {string}
       */
      'variable': '',

      /**
       * Used to import variables into the compiled template.
       *
       * @memberOf _.templateSettings
       * @type {Object}
       */
      'imports': {

        /**
         * A reference to the `lodash` function.
         *
         * @memberOf _.templateSettings.imports
         * @type {Function}
         */
        '_': lodash
      }
    };

    // Ensure wrappers are instances of `baseLodash`.
    lodash.prototype = baseLodash.prototype;
    lodash.prototype.constructor = lodash;

    LodashWrapper.prototype = baseCreate(baseLodash.prototype);
    LodashWrapper.prototype.constructor = LodashWrapper;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
     *
     * @private
     * @constructor
     * @param {*} value The value to wrap.
     */
    function LazyWrapper(value) {
      this.__wrapped__ = value;
      this.__actions__ = [];
      this.__dir__ = 1;
      this.__filtered__ = false;
      this.__iteratees__ = [];
      this.__takeCount__ = MAX_ARRAY_LENGTH;
      this.__views__ = [];
    }

    /**
     * Creates a clone of the lazy wrapper object.
     *
     * @private
     * @name clone
     * @memberOf LazyWrapper
     * @returns {Object} Returns the cloned `LazyWrapper` object.
     */
    function lazyClone() {
      var result = new LazyWrapper(this.__wrapped__);
      result.__actions__ = copyArray(this.__actions__);
      result.__dir__ = this.__dir__;
      result.__filtered__ = this.__filtered__;
      result.__iteratees__ = copyArray(this.__iteratees__);
      result.__takeCount__ = this.__takeCount__;
      result.__views__ = copyArray(this.__views__);
      return result;
    }

    /**
     * Reverses the direction of lazy iteration.
     *
     * @private
     * @name reverse
     * @memberOf LazyWrapper
     * @returns {Object} Returns the new reversed `LazyWrapper` object.
     */
    function lazyReverse() {
      if (this.__filtered__) {
        var result = new LazyWrapper(this);
        result.__dir__ = -1;
        result.__filtered__ = true;
      } else {
        result = this.clone();
        result.__dir__ *= -1;
      }
      return result;
    }

    /**
     * Extracts the unwrapped value from its lazy wrapper.
     *
     * @private
     * @name value
     * @memberOf LazyWrapper
     * @returns {*} Returns the unwrapped value.
     */
    function lazyValue() {
      var array = this.__wrapped__.value(),
          dir = this.__dir__,
          isArr = isArray(array),
          isRight = dir < 0,
          arrLength = isArr ? array.length : 0,
          view = getView(0, arrLength, this.__views__),
          start = view.start,
          end = view.end,
          length = end - start,
          index = isRight ? end : (start - 1),
          iteratees = this.__iteratees__,
          iterLength = iteratees.length,
          resIndex = 0,
          takeCount = nativeMin(length, this.__takeCount__);

      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
        return baseWrapperValue(array, this.__actions__);
      }
      var result = [];

      outer:
      while (length-- && resIndex < takeCount) {
        index += dir;

        var iterIndex = -1,
            value = array[index];

        while (++iterIndex < iterLength) {
          var data = iteratees[iterIndex],
              iteratee = data.iteratee,
              type = data.type,
              computed = iteratee(value);

          if (type == LAZY_MAP_FLAG) {
            value = computed;
          } else if (!computed) {
            if (type == LAZY_FILTER_FLAG) {
              continue outer;
            } else {
              break outer;
            }
          }
        }
        result[resIndex++] = value;
      }
      return result;
    }

    // Ensure `LazyWrapper` is an instance of `baseLodash`.
    LazyWrapper.prototype = baseCreate(baseLodash.prototype);
    LazyWrapper.prototype.constructor = LazyWrapper;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a hash object.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function Hash(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the hash.
     *
     * @private
     * @name clear
     * @memberOf Hash
     */
    function hashClear() {
      this.__data__ = nativeCreate ? nativeCreate(null) : {};
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the hash.
     *
     * @private
     * @name delete
     * @memberOf Hash
     * @param {Object} hash The hash to modify.
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function hashDelete(key) {
      var result = this.has(key) && delete this.__data__[key];
      this.size -= result ? 1 : 0;
      return result;
    }

    /**
     * Gets the hash value for `key`.
     *
     * @private
     * @name get
     * @memberOf Hash
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function hashGet(key) {
      var data = this.__data__;
      if (nativeCreate) {
        var result = data[key];
        return result === HASH_UNDEFINED ? undefined : result;
      }
      return hasOwnProperty.call(data, key) ? data[key] : undefined;
    }

    /**
     * Checks if a hash value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf Hash
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function hashHas(key) {
      var data = this.__data__;
      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
    }

    /**
     * Sets the hash `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf Hash
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the hash instance.
     */
    function hashSet(key, value) {
      var data = this.__data__;
      this.size += this.has(key) ? 0 : 1;
      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
      return this;
    }

    // Add methods to `Hash`.
    Hash.prototype.clear = hashClear;
    Hash.prototype['delete'] = hashDelete;
    Hash.prototype.get = hashGet;
    Hash.prototype.has = hashHas;
    Hash.prototype.set = hashSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates an list cache object.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function ListCache(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the list cache.
     *
     * @private
     * @name clear
     * @memberOf ListCache
     */
    function listCacheClear() {
      this.__data__ = [];
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the list cache.
     *
     * @private
     * @name delete
     * @memberOf ListCache
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function listCacheDelete(key) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      if (index < 0) {
        return false;
      }
      var lastIndex = data.length - 1;
      if (index == lastIndex) {
        data.pop();
      } else {
        splice.call(data, index, 1);
      }
      --this.size;
      return true;
    }

    /**
     * Gets the list cache value for `key`.
     *
     * @private
     * @name get
     * @memberOf ListCache
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function listCacheGet(key) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      return index < 0 ? undefined : data[index][1];
    }

    /**
     * Checks if a list cache value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf ListCache
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function listCacheHas(key) {
      return assocIndexOf(this.__data__, key) > -1;
    }

    /**
     * Sets the list cache `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf ListCache
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the list cache instance.
     */
    function listCacheSet(key, value) {
      var data = this.__data__,
          index = assocIndexOf(data, key);

      if (index < 0) {
        ++this.size;
        data.push([key, value]);
      } else {
        data[index][1] = value;
      }
      return this;
    }

    // Add methods to `ListCache`.
    ListCache.prototype.clear = listCacheClear;
    ListCache.prototype['delete'] = listCacheDelete;
    ListCache.prototype.get = listCacheGet;
    ListCache.prototype.has = listCacheHas;
    ListCache.prototype.set = listCacheSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a map cache object to store key-value pairs.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function MapCache(entries) {
      var index = -1,
          length = entries == null ? 0 : entries.length;

      this.clear();
      while (++index < length) {
        var entry = entries[index];
        this.set(entry[0], entry[1]);
      }
    }

    /**
     * Removes all key-value entries from the map.
     *
     * @private
     * @name clear
     * @memberOf MapCache
     */
    function mapCacheClear() {
      this.size = 0;
      this.__data__ = {
        'hash': new Hash,
        'map': new (Map || ListCache),
        'string': new Hash
      };
    }

    /**
     * Removes `key` and its value from the map.
     *
     * @private
     * @name delete
     * @memberOf MapCache
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function mapCacheDelete(key) {
      var result = getMapData(this, key)['delete'](key);
      this.size -= result ? 1 : 0;
      return result;
    }

    /**
     * Gets the map value for `key`.
     *
     * @private
     * @name get
     * @memberOf MapCache
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function mapCacheGet(key) {
      return getMapData(this, key).get(key);
    }

    /**
     * Checks if a map value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf MapCache
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function mapCacheHas(key) {
      return getMapData(this, key).has(key);
    }

    /**
     * Sets the map `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf MapCache
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the map cache instance.
     */
    function mapCacheSet(key, value) {
      var data = getMapData(this, key),
          size = data.size;

      data.set(key, value);
      this.size += data.size == size ? 0 : 1;
      return this;
    }

    // Add methods to `MapCache`.
    MapCache.prototype.clear = mapCacheClear;
    MapCache.prototype['delete'] = mapCacheDelete;
    MapCache.prototype.get = mapCacheGet;
    MapCache.prototype.has = mapCacheHas;
    MapCache.prototype.set = mapCacheSet;

    /*------------------------------------------------------------------------*/

    /**
     *
     * Creates an array cache object to store unique values.
     *
     * @private
     * @constructor
     * @param {Array} [values] The values to cache.
     */
    function SetCache(values) {
      var index = -1,
          length = values == null ? 0 : values.length;

      this.__data__ = new MapCache;
      while (++index < length) {
        this.add(values[index]);
      }
    }

    /**
     * Adds `value` to the array cache.
     *
     * @private
     * @name add
     * @memberOf SetCache
     * @alias push
     * @param {*} value The value to cache.
     * @returns {Object} Returns the cache instance.
     */
    function setCacheAdd(value) {
      this.__data__.set(value, HASH_UNDEFINED);
      return this;
    }

    /**
     * Checks if `value` is in the array cache.
     *
     * @private
     * @name has
     * @memberOf SetCache
     * @param {*} value The value to search for.
     * @returns {number} Returns `true` if `value` is found, else `false`.
     */
    function setCacheHas(value) {
      return this.__data__.has(value);
    }

    // Add methods to `SetCache`.
    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
    SetCache.prototype.has = setCacheHas;

    /*------------------------------------------------------------------------*/

    /**
     * Creates a stack cache object to store key-value pairs.
     *
     * @private
     * @constructor
     * @param {Array} [entries] The key-value pairs to cache.
     */
    function Stack(entries) {
      var data = this.__data__ = new ListCache(entries);
      this.size = data.size;
    }

    /**
     * Removes all key-value entries from the stack.
     *
     * @private
     * @name clear
     * @memberOf Stack
     */
    function stackClear() {
      this.__data__ = new ListCache;
      this.size = 0;
    }

    /**
     * Removes `key` and its value from the stack.
     *
     * @private
     * @name delete
     * @memberOf Stack
     * @param {string} key The key of the value to remove.
     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
     */
    function stackDelete(key) {
      var data = this.__data__,
          result = data['delete'](key);

      this.size = data.size;
      return result;
    }

    /**
     * Gets the stack value for `key`.
     *
     * @private
     * @name get
     * @memberOf Stack
     * @param {string} key The key of the value to get.
     * @returns {*} Returns the entry value.
     */
    function stackGet(key) {
      return this.__data__.get(key);
    }

    /**
     * Checks if a stack value for `key` exists.
     *
     * @private
     * @name has
     * @memberOf Stack
     * @param {string} key The key of the entry to check.
     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
     */
    function stackHas(key) {
      return this.__data__.has(key);
    }

    /**
     * Sets the stack `key` to `value`.
     *
     * @private
     * @name set
     * @memberOf Stack
     * @param {string} key The key of the value to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns the stack cache instance.
     */
    function stackSet(key, value) {
      var data = this.__data__;
      if (data instanceof ListCache) {
        var pairs = data.__data__;
        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
          pairs.push([key, value]);
          this.size = ++data.size;
          return this;
        }
        data = this.__data__ = new MapCache(pairs);
      }
      data.set(key, value);
      this.size = data.size;
      return this;
    }

    // Add methods to `Stack`.
    Stack.prototype.clear = stackClear;
    Stack.prototype['delete'] = stackDelete;
    Stack.prototype.get = stackGet;
    Stack.prototype.has = stackHas;
    Stack.prototype.set = stackSet;

    /*------------------------------------------------------------------------*/

    /**
     * Creates an array of the enumerable property names of the array-like `value`.
     *
     * @private
     * @param {*} value The value to query.
     * @param {boolean} inherited Specify returning inherited property names.
     * @returns {Array} Returns the array of property names.
     */
    function arrayLikeKeys(value, inherited) {
      var isArr = isArray(value),
          isArg = !isArr && isArguments(value),
          isBuff = !isArr && !isArg && isBuffer(value),
          isType = !isArr && !isArg && !isBuff && isTypedArray(value),
          skipIndexes = isArr || isArg || isBuff || isType,
          result = skipIndexes ? baseTimes(value.length, String) : [],
          length = result.length;

      for (var key in value) {
        if ((inherited || hasOwnProperty.call(value, key)) &&
            !(skipIndexes && (
               // Safari 9 has enumerable `arguments.length` in strict mode.
               key == 'length' ||
               // Node.js 0.10 has enumerable non-index properties on buffers.
               (isBuff && (key == 'offset' || key == 'parent')) ||
               // PhantomJS 2 has enumerable non-index properties on typed arrays.
               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
               // Skip index properties.
               isIndex(key, length)
            ))) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * A specialized version of `_.sample` for arrays.
     *
     * @private
     * @param {Array} array The array to sample.
     * @returns {*} Returns the random element.
     */
    function arraySample(array) {
      var length = array.length;
      return length ? array[baseRandom(0, length - 1)] : undefined;
    }

    /**
     * A specialized version of `_.sampleSize` for arrays.
     *
     * @private
     * @param {Array} array The array to sample.
     * @param {number} n The number of elements to sample.
     * @returns {Array} Returns the random elements.
     */
    function arraySampleSize(array, n) {
      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
    }

    /**
     * A specialized version of `_.shuffle` for arrays.
     *
     * @private
     * @param {Array} array The array to shuffle.
     * @returns {Array} Returns the new shuffled array.
     */
    function arrayShuffle(array) {
      return shuffleSelf(copyArray(array));
    }

    /**
     * This function is like `assignValue` except that it doesn't assign
     * `undefined` values.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function assignMergeValue(object, key, value) {
      if ((value !== undefined && !eq(object[key], value)) ||
          (value === undefined && !(key in object))) {
        baseAssignValue(object, key, value);
      }
    }

    /**
     * Assigns `value` to `key` of `object` if the existing value is not equivalent
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function assignValue(object, key, value) {
      var objValue = object[key];
      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
          (value === undefined && !(key in object))) {
        baseAssignValue(object, key, value);
      }
    }

    /**
     * Gets the index at which the `key` is found in `array` of key-value pairs.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {*} key The key to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     */
    function assocIndexOf(array, key) {
      var length = array.length;
      while (length--) {
        if (eq(array[length][0], key)) {
          return length;
        }
      }
      return -1;
    }

    /**
     * Aggregates elements of `collection` on `accumulator` with keys transformed
     * by `iteratee` and values set by `setter`.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} setter The function to set `accumulator` values.
     * @param {Function} iteratee The iteratee to transform keys.
     * @param {Object} accumulator The initial aggregated object.
     * @returns {Function} Returns `accumulator`.
     */
    function baseAggregator(collection, setter, iteratee, accumulator) {
      baseEach(collection, function(value, key, collection) {
        setter(accumulator, value, iteratee(value), collection);
      });
      return accumulator;
    }

    /**
     * The base implementation of `_.assign` without support for multiple sources
     * or `customizer` functions.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @returns {Object} Returns `object`.
     */
    function baseAssign(object, source) {
      return object && copyObject(source, keys(source), object);
    }

    /**
     * The base implementation of `_.assignIn` without support for multiple sources
     * or `customizer` functions.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @returns {Object} Returns `object`.
     */
    function baseAssignIn(object, source) {
      return object && copyObject(source, keysIn(source), object);
    }

    /**
     * The base implementation of `assignValue` and `assignMergeValue` without
     * value checks.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {string} key The key of the property to assign.
     * @param {*} value The value to assign.
     */
    function baseAssignValue(object, key, value) {
      if (key == '__proto__' && defineProperty) {
        defineProperty(object, key, {
          'configurable': true,
          'enumerable': true,
          'value': value,
          'writable': true
        });
      } else {
        object[key] = value;
      }
    }

    /**
     * The base implementation of `_.at` without support for individual paths.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {string[]} paths The property paths to pick.
     * @returns {Array} Returns the picked elements.
     */
    function baseAt(object, paths) {
      var index = -1,
          length = paths.length,
          result = Array(length),
          skip = object == null;

      while (++index < length) {
        result[index] = skip ? undefined : get(object, paths[index]);
      }
      return result;
    }

    /**
     * The base implementation of `_.clamp` which doesn't coerce arguments.
     *
     * @private
     * @param {number} number The number to clamp.
     * @param {number} [lower] The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the clamped number.
     */
    function baseClamp(number, lower, upper) {
      if (number === number) {
        if (upper !== undefined) {
          number = number <= upper ? number : upper;
        }
        if (lower !== undefined) {
          number = number >= lower ? number : lower;
        }
      }
      return number;
    }

    /**
     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
     * traversed objects.
     *
     * @private
     * @param {*} value The value to clone.
     * @param {boolean} bitmask The bitmask flags.
     *  1 - Deep clone
     *  2 - Flatten inherited properties
     *  4 - Clone symbols
     * @param {Function} [customizer] The function to customize cloning.
     * @param {string} [key] The key of `value`.
     * @param {Object} [object] The parent object of `value`.
     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
     * @returns {*} Returns the cloned value.
     */
    function baseClone(value, bitmask, customizer, key, object, stack) {
      var result,
          isDeep = bitmask & CLONE_DEEP_FLAG,
          isFlat = bitmask & CLONE_FLAT_FLAG,
          isFull = bitmask & CLONE_SYMBOLS_FLAG;

      if (customizer) {
        result = object ? customizer(value, key, object, stack) : customizer(value);
      }
      if (result !== undefined) {
        return result;
      }
      if (!isObject(value)) {
        return value;
      }
      var isArr = isArray(value);
      if (isArr) {
        result = initCloneArray(value);
        if (!isDeep) {
          return copyArray(value, result);
        }
      } else {
        var tag = getTag(value),
            isFunc = tag == funcTag || tag == genTag;

        if (isBuffer(value)) {
          return cloneBuffer(value, isDeep);
        }
        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
          result = (isFlat || isFunc) ? {} : initCloneObject(value);
          if (!isDeep) {
            return isFlat
              ? copySymbolsIn(value, baseAssignIn(result, value))
              : copySymbols(value, baseAssign(result, value));
          }
        } else {
          if (!cloneableTags[tag]) {
            return object ? value : {};
          }
          result = initCloneByTag(value, tag, isDeep);
        }
      }
      // Check for circular references and return its corresponding clone.
      stack || (stack = new Stack);
      var stacked = stack.get(value);
      if (stacked) {
        return stacked;
      }
      stack.set(value, result);

      if (isSet(value)) {
        value.forEach(function(subValue) {
          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
        });
      } else if (isMap(value)) {
        value.forEach(function(subValue, key) {
          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
        });
      }

      var keysFunc = isFull
        ? (isFlat ? getAllKeysIn : getAllKeys)
        : (isFlat ? keysIn : keys);

      var props = isArr ? undefined : keysFunc(value);
      arrayEach(props || value, function(subValue, key) {
        if (props) {
          key = subValue;
          subValue = value[key];
        }
        // Recursively populate clone (susceptible to call stack limits).
        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
      });
      return result;
    }

    /**
     * The base implementation of `_.conforms` which doesn't clone `source`.
     *
     * @private
     * @param {Object} source The object of property predicates to conform to.
     * @returns {Function} Returns the new spec function.
     */
    function baseConforms(source) {
      var props = keys(source);
      return function(object) {
        return baseConformsTo(object, source, props);
      };
    }

    /**
     * The base implementation of `_.conformsTo` which accepts `props` to check.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property predicates to conform to.
     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
     */
    function baseConformsTo(object, source, props) {
      var length = props.length;
      if (object == null) {
        return !length;
      }
      object = Object(object);
      while (length--) {
        var key = props[length],
            predicate = source[key],
            value = object[key];

        if ((value === undefined && !(key in object)) || !predicate(value)) {
          return false;
        }
      }
      return true;
    }

    /**
     * The base implementation of `_.delay` and `_.defer` which accepts `args`
     * to provide to `func`.
     *
     * @private
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @param {Array} args The arguments to provide to `func`.
     * @returns {number|Object} Returns the timer id or timeout object.
     */
    function baseDelay(func, wait, args) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      return setTimeout(function() { func.apply(undefined, args); }, wait);
    }

    /**
     * The base implementation of methods like `_.difference` without support
     * for excluding multiple arrays or iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Array} values The values to exclude.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     */
    function baseDifference(array, values, iteratee, comparator) {
      var index = -1,
          includes = arrayIncludes,
          isCommon = true,
          length = array.length,
          result = [],
          valuesLength = values.length;

      if (!length) {
        return result;
      }
      if (iteratee) {
        values = arrayMap(values, baseUnary(iteratee));
      }
      if (comparator) {
        includes = arrayIncludesWith;
        isCommon = false;
      }
      else if (values.length >= LARGE_ARRAY_SIZE) {
        includes = cacheHas;
        isCommon = false;
        values = new SetCache(values);
      }
      outer:
      while (++index < length) {
        var value = array[index],
            computed = iteratee == null ? value : iteratee(value);

        value = (comparator || value !== 0) ? value : 0;
        if (isCommon && computed === computed) {
          var valuesIndex = valuesLength;
          while (valuesIndex--) {
            if (values[valuesIndex] === computed) {
              continue outer;
            }
          }
          result.push(value);
        }
        else if (!includes(values, computed, comparator)) {
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.forEach` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     */
    var baseEach = createBaseEach(baseForOwn);

    /**
     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     */
    var baseEachRight = createBaseEach(baseForOwnRight, true);

    /**
     * The base implementation of `_.every` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {boolean} Returns `true` if all elements pass the predicate check,
     *  else `false`
     */
    function baseEvery(collection, predicate) {
      var result = true;
      baseEach(collection, function(value, index, collection) {
        result = !!predicate(value, index, collection);
        return result;
      });
      return result;
    }

    /**
     * The base implementation of methods like `_.max` and `_.min` which accepts a
     * `comparator` to determine the extremum value.
     *
     * @private
     * @param {Array} array The array to iterate over.
     * @param {Function} iteratee The iteratee invoked per iteration.
     * @param {Function} comparator The comparator used to compare values.
     * @returns {*} Returns the extremum value.
     */
    function baseExtremum(array, iteratee, comparator) {
      var index = -1,
          length = array.length;

      while (++index < length) {
        var value = array[index],
            current = iteratee(value);

        if (current != null && (computed === undefined
              ? (current === current && !isSymbol(current))
              : comparator(current, computed)
            )) {
          var computed = current,
              result = value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.fill` without an iteratee call guard.
     *
     * @private
     * @param {Array} array The array to fill.
     * @param {*} value The value to fill `array` with.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns `array`.
     */
    function baseFill(array, value, start, end) {
      var length = array.length;

      start = toInteger(start);
      if (start < 0) {
        start = -start > length ? 0 : (length + start);
      }
      end = (end === undefined || end > length) ? length : toInteger(end);
      if (end < 0) {
        end += length;
      }
      end = start > end ? 0 : toLength(end);
      while (start < end) {
        array[start++] = value;
      }
      return array;
    }

    /**
     * The base implementation of `_.filter` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     */
    function baseFilter(collection, predicate) {
      var result = [];
      baseEach(collection, function(value, index, collection) {
        if (predicate(value, index, collection)) {
          result.push(value);
        }
      });
      return result;
    }

    /**
     * The base implementation of `_.flatten` with support for restricting flattening.
     *
     * @private
     * @param {Array} array The array to flatten.
     * @param {number} depth The maximum recursion depth.
     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
     * @param {Array} [result=[]] The initial result value.
     * @returns {Array} Returns the new flattened array.
     */
    function baseFlatten(array, depth, predicate, isStrict, result) {
      var index = -1,
          length = array.length;

      predicate || (predicate = isFlattenable);
      result || (result = []);

      while (++index < length) {
        var value = array[index];
        if (depth > 0 && predicate(value)) {
          if (depth > 1) {
            // Recursively flatten arrays (susceptible to call stack limits).
            baseFlatten(value, depth - 1, predicate, isStrict, result);
          } else {
            arrayPush(result, value);
          }
        } else if (!isStrict) {
          result[result.length] = value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `baseForOwn` which iterates over `object`
     * properties returned by `keysFunc` and invokes `iteratee` for each property.
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @returns {Object} Returns `object`.
     */
    var baseFor = createBaseFor();

    /**
     * This function is like `baseFor` except that it iterates over properties
     * in the opposite order.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @returns {Object} Returns `object`.
     */
    var baseForRight = createBaseFor(true);

    /**
     * The base implementation of `_.forOwn` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Object} Returns `object`.
     */
    function baseForOwn(object, iteratee) {
      return object && baseFor(object, iteratee, keys);
    }

    /**
     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Object} Returns `object`.
     */
    function baseForOwnRight(object, iteratee) {
      return object && baseForRight(object, iteratee, keys);
    }

    /**
     * The base implementation of `_.functions` which creates an array of
     * `object` function property names filtered from `props`.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Array} props The property names to filter.
     * @returns {Array} Returns the function names.
     */
    function baseFunctions(object, props) {
      return arrayFilter(props, function(key) {
        return isFunction(object[key]);
      });
    }

    /**
     * The base implementation of `_.get` without support for default values.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to get.
     * @returns {*} Returns the resolved value.
     */
    function baseGet(object, path) {
      path = castPath(path, object);

      var index = 0,
          length = path.length;

      while (object != null && index < length) {
        object = object[toKey(path[index++])];
      }
      return (index && index == length) ? object : undefined;
    }

    /**
     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
     * symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Function} keysFunc The function to get the keys of `object`.
     * @param {Function} symbolsFunc The function to get the symbols of `object`.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function baseGetAllKeys(object, keysFunc, symbolsFunc) {
      var result = keysFunc(object);
      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
    }

    /**
     * The base implementation of `getTag` without fallbacks for buggy environments.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the `toStringTag`.
     */
    function baseGetTag(value) {
      if (value == null) {
        return value === undefined ? undefinedTag : nullTag;
      }
      return (symToStringTag && symToStringTag in Object(value))
        ? getRawTag(value)
        : objectToString(value);
    }

    /**
     * The base implementation of `_.gt` which doesn't coerce arguments.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than `other`,
     *  else `false`.
     */
    function baseGt(value, other) {
      return value > other;
    }

    /**
     * The base implementation of `_.has` without support for deep paths.
     *
     * @private
     * @param {Object} [object] The object to query.
     * @param {Array|string} key The key to check.
     * @returns {boolean} Returns `true` if `key` exists, else `false`.
     */
    function baseHas(object, key) {
      return object != null && hasOwnProperty.call(object, key);
    }

    /**
     * The base implementation of `_.hasIn` without support for deep paths.
     *
     * @private
     * @param {Object} [object] The object to query.
     * @param {Array|string} key The key to check.
     * @returns {boolean} Returns `true` if `key` exists, else `false`.
     */
    function baseHasIn(object, key) {
      return object != null && key in Object(object);
    }

    /**
     * The base implementation of `_.inRange` which doesn't coerce arguments.
     *
     * @private
     * @param {number} number The number to check.
     * @param {number} start The start of the range.
     * @param {number} end The end of the range.
     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
     */
    function baseInRange(number, start, end) {
      return number >= nativeMin(start, end) && number < nativeMax(start, end);
    }

    /**
     * The base implementation of methods like `_.intersection`, without support
     * for iteratee shorthands, that accepts an array of arrays to inspect.
     *
     * @private
     * @param {Array} arrays The arrays to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of shared values.
     */
    function baseIntersection(arrays, iteratee, comparator) {
      var includes = comparator ? arrayIncludesWith : arrayIncludes,
          length = arrays[0].length,
          othLength = arrays.length,
          othIndex = othLength,
          caches = Array(othLength),
          maxLength = Infinity,
          result = [];

      while (othIndex--) {
        var array = arrays[othIndex];
        if (othIndex && iteratee) {
          array = arrayMap(array, baseUnary(iteratee));
        }
        maxLength = nativeMin(array.length, maxLength);
        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
          ? new SetCache(othIndex && array)
          : undefined;
      }
      array = arrays[0];

      var index = -1,
          seen = caches[0];

      outer:
      while (++index < length && result.length < maxLength) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        value = (comparator || value !== 0) ? value : 0;
        if (!(seen
              ? cacheHas(seen, computed)
              : includes(result, computed, comparator)
            )) {
          othIndex = othLength;
          while (--othIndex) {
            var cache = caches[othIndex];
            if (!(cache
                  ? cacheHas(cache, computed)
                  : includes(arrays[othIndex], computed, comparator))
                ) {
              continue outer;
            }
          }
          if (seen) {
            seen.push(computed);
          }
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.invert` and `_.invertBy` which inverts
     * `object` with values transformed by `iteratee` and set by `setter`.
     *
     * @private
     * @param {Object} object The object to iterate over.
     * @param {Function} setter The function to set `accumulator` values.
     * @param {Function} iteratee The iteratee to transform values.
     * @param {Object} accumulator The initial inverted object.
     * @returns {Function} Returns `accumulator`.
     */
    function baseInverter(object, setter, iteratee, accumulator) {
      baseForOwn(object, function(value, key, object) {
        setter(accumulator, iteratee(value), key, object);
      });
      return accumulator;
    }

    /**
     * The base implementation of `_.invoke` without support for individual
     * method arguments.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the method to invoke.
     * @param {Array} args The arguments to invoke the method with.
     * @returns {*} Returns the result of the invoked method.
     */
    function baseInvoke(object, path, args) {
      path = castPath(path, object);
      object = parent(object, path);
      var func = object == null ? object : object[toKey(last(path))];
      return func == null ? undefined : apply(func, object, args);
    }

    /**
     * The base implementation of `_.isArguments`.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
     */
    function baseIsArguments(value) {
      return isObjectLike(value) && baseGetTag(value) == argsTag;
    }

    /**
     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
     */
    function baseIsArrayBuffer(value) {
      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
    }

    /**
     * The base implementation of `_.isDate` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
     */
    function baseIsDate(value) {
      return isObjectLike(value) && baseGetTag(value) == dateTag;
    }

    /**
     * The base implementation of `_.isEqual` which supports partial comparisons
     * and tracks traversed objects.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @param {boolean} bitmask The bitmask flags.
     *  1 - Unordered comparison
     *  2 - Partial comparison
     * @param {Function} [customizer] The function to customize comparisons.
     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     */
    function baseIsEqual(value, other, bitmask, customizer, stack) {
      if (value === other) {
        return true;
      }
      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
        return value !== value && other !== other;
      }
      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
    }

    /**
     * A specialized version of `baseIsEqual` for arrays and objects which performs
     * deep comparisons and tracks traversed objects enabling objects with circular
     * references to be compared.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
      var objIsArr = isArray(object),
          othIsArr = isArray(other),
          objTag = objIsArr ? arrayTag : getTag(object),
          othTag = othIsArr ? arrayTag : getTag(other);

      objTag = objTag == argsTag ? objectTag : objTag;
      othTag = othTag == argsTag ? objectTag : othTag;

      var objIsObj = objTag == objectTag,
          othIsObj = othTag == objectTag,
          isSameTag = objTag == othTag;

      if (isSameTag && isBuffer(object)) {
        if (!isBuffer(other)) {
          return false;
        }
        objIsArr = true;
        objIsObj = false;
      }
      if (isSameTag && !objIsObj) {
        stack || (stack = new Stack);
        return (objIsArr || isTypedArray(object))
          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
      }
      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');

        if (objIsWrapped || othIsWrapped) {
          var objUnwrapped = objIsWrapped ? object.value() : object,
              othUnwrapped = othIsWrapped ? other.value() : other;

          stack || (stack = new Stack);
          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
        }
      }
      if (!isSameTag) {
        return false;
      }
      stack || (stack = new Stack);
      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
    }

    /**
     * The base implementation of `_.isMap` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
     */
    function baseIsMap(value) {
      return isObjectLike(value) && getTag(value) == mapTag;
    }

    /**
     * The base implementation of `_.isMatch` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @param {Array} matchData The property names, values, and compare flags to match.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     */
    function baseIsMatch(object, source, matchData, customizer) {
      var index = matchData.length,
          length = index,
          noCustomizer = !customizer;

      if (object == null) {
        return !length;
      }
      object = Object(object);
      while (index--) {
        var data = matchData[index];
        if ((noCustomizer && data[2])
              ? data[1] !== object[data[0]]
              : !(data[0] in object)
            ) {
          return false;
        }
      }
      while (++index < length) {
        data = matchData[index];
        var key = data[0],
            objValue = object[key],
            srcValue = data[1];

        if (noCustomizer && data[2]) {
          if (objValue === undefined && !(key in object)) {
            return false;
          }
        } else {
          var stack = new Stack;
          if (customizer) {
            var result = customizer(objValue, srcValue, key, object, source, stack);
          }
          if (!(result === undefined
                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
                : result
              )) {
            return false;
          }
        }
      }
      return true;
    }

    /**
     * The base implementation of `_.isNative` without bad shim checks.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a native function,
     *  else `false`.
     */
    function baseIsNative(value) {
      if (!isObject(value) || isMasked(value)) {
        return false;
      }
      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
      return pattern.test(toSource(value));
    }

    /**
     * The base implementation of `_.isRegExp` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
     */
    function baseIsRegExp(value) {
      return isObjectLike(value) && baseGetTag(value) == regexpTag;
    }

    /**
     * The base implementation of `_.isSet` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
     */
    function baseIsSet(value) {
      return isObjectLike(value) && getTag(value) == setTag;
    }

    /**
     * The base implementation of `_.isTypedArray` without Node.js optimizations.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
     */
    function baseIsTypedArray(value) {
      return isObjectLike(value) &&
        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
    }

    /**
     * The base implementation of `_.iteratee`.
     *
     * @private
     * @param {*} [value=_.identity] The value to convert to an iteratee.
     * @returns {Function} Returns the iteratee.
     */
    function baseIteratee(value) {
      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
      if (typeof value == 'function') {
        return value;
      }
      if (value == null) {
        return identity;
      }
      if (typeof value == 'object') {
        return isArray(value)
          ? baseMatchesProperty(value[0], value[1])
          : baseMatches(value);
      }
      return property(value);
    }

    /**
     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function baseKeys(object) {
      if (!isPrototype(object)) {
        return nativeKeys(object);
      }
      var result = [];
      for (var key in Object(object)) {
        if (hasOwnProperty.call(object, key) && key != 'constructor') {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function baseKeysIn(object) {
      if (!isObject(object)) {
        return nativeKeysIn(object);
      }
      var isProto = isPrototype(object),
          result = [];

      for (var key in object) {
        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.lt` which doesn't coerce arguments.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than `other`,
     *  else `false`.
     */
    function baseLt(value, other) {
      return value < other;
    }

    /**
     * The base implementation of `_.map` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} iteratee The function invoked per iteration.
     * @returns {Array} Returns the new mapped array.
     */
    function baseMap(collection, iteratee) {
      var index = -1,
          result = isArrayLike(collection) ? Array(collection.length) : [];

      baseEach(collection, function(value, key, collection) {
        result[++index] = iteratee(value, key, collection);
      });
      return result;
    }

    /**
     * The base implementation of `_.matches` which doesn't clone `source`.
     *
     * @private
     * @param {Object} source The object of property values to match.
     * @returns {Function} Returns the new spec function.
     */
    function baseMatches(source) {
      var matchData = getMatchData(source);
      if (matchData.length == 1 && matchData[0][2]) {
        return matchesStrictComparable(matchData[0][0], matchData[0][1]);
      }
      return function(object) {
        return object === source || baseIsMatch(object, source, matchData);
      };
    }

    /**
     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
     *
     * @private
     * @param {string} path The path of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     */
    function baseMatchesProperty(path, srcValue) {
      if (isKey(path) && isStrictComparable(srcValue)) {
        return matchesStrictComparable(toKey(path), srcValue);
      }
      return function(object) {
        var objValue = get(object, path);
        return (objValue === undefined && objValue === srcValue)
          ? hasIn(object, path)
          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
      };
    }

    /**
     * The base implementation of `_.merge` without support for multiple sources.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @param {number} srcIndex The index of `source`.
     * @param {Function} [customizer] The function to customize merged values.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     */
    function baseMerge(object, source, srcIndex, customizer, stack) {
      if (object === source) {
        return;
      }
      baseFor(source, function(srcValue, key) {
        stack || (stack = new Stack);
        if (isObject(srcValue)) {
          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
        }
        else {
          var newValue = customizer
            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
            : undefined;

          if (newValue === undefined) {
            newValue = srcValue;
          }
          assignMergeValue(object, key, newValue);
        }
      }, keysIn);
    }

    /**
     * A specialized version of `baseMerge` for arrays and objects which performs
     * deep merges and tracks traversed objects enabling objects with circular
     * references to be merged.
     *
     * @private
     * @param {Object} object The destination object.
     * @param {Object} source The source object.
     * @param {string} key The key of the value to merge.
     * @param {number} srcIndex The index of `source`.
     * @param {Function} mergeFunc The function to merge values.
     * @param {Function} [customizer] The function to customize assigned values.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     */
    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
      var objValue = safeGet(object, key),
          srcValue = safeGet(source, key),
          stacked = stack.get(srcValue);

      if (stacked) {
        assignMergeValue(object, key, stacked);
        return;
      }
      var newValue = customizer
        ? customizer(objValue, srcValue, (key + ''), object, source, stack)
        : undefined;

      var isCommon = newValue === undefined;

      if (isCommon) {
        var isArr = isArray(srcValue),
            isBuff = !isArr && isBuffer(srcValue),
            isTyped = !isArr && !isBuff && isTypedArray(srcValue);

        newValue = srcValue;
        if (isArr || isBuff || isTyped) {
          if (isArray(objValue)) {
            newValue = objValue;
          }
          else if (isArrayLikeObject(objValue)) {
            newValue = copyArray(objValue);
          }
          else if (isBuff) {
            isCommon = false;
            newValue = cloneBuffer(srcValue, true);
          }
          else if (isTyped) {
            isCommon = false;
            newValue = cloneTypedArray(srcValue, true);
          }
          else {
            newValue = [];
          }
        }
        else if (isPlainObject(srcValue) || isArguments(srcValue)) {
          newValue = objValue;
          if (isArguments(objValue)) {
            newValue = toPlainObject(objValue);
          }
          else if (!isObject(objValue) || isFunction(objValue)) {
            newValue = initCloneObject(srcValue);
          }
        }
        else {
          isCommon = false;
        }
      }
      if (isCommon) {
        // Recursively merge objects and arrays (susceptible to call stack limits).
        stack.set(srcValue, newValue);
        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
        stack['delete'](srcValue);
      }
      assignMergeValue(object, key, newValue);
    }

    /**
     * The base implementation of `_.nth` which doesn't coerce arguments.
     *
     * @private
     * @param {Array} array The array to query.
     * @param {number} n The index of the element to return.
     * @returns {*} Returns the nth element of `array`.
     */
    function baseNth(array, n) {
      var length = array.length;
      if (!length) {
        return;
      }
      n += n < 0 ? length : 0;
      return isIndex(n, length) ? array[n] : undefined;
    }

    /**
     * The base implementation of `_.orderBy` without param guards.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
     * @param {string[]} orders The sort orders of `iteratees`.
     * @returns {Array} Returns the new sorted array.
     */
    function baseOrderBy(collection, iteratees, orders) {
      if (iteratees.length) {
        iteratees = arrayMap(iteratees, function(iteratee) {
          if (isArray(iteratee)) {
            return function(value) {
              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
            }
          }
          return iteratee;
        });
      } else {
        iteratees = [identity];
      }

      var index = -1;
      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));

      var result = baseMap(collection, function(value, key, collection) {
        var criteria = arrayMap(iteratees, function(iteratee) {
          return iteratee(value);
        });
        return { 'criteria': criteria, 'index': ++index, 'value': value };
      });

      return baseSortBy(result, function(object, other) {
        return compareMultiple(object, other, orders);
      });
    }

    /**
     * The base implementation of `_.pick` without support for individual
     * property identifiers.
     *
     * @private
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @returns {Object} Returns the new object.
     */
    function basePick(object, paths) {
      return basePickBy(object, paths, function(value, path) {
        return hasIn(object, path);
      });
    }

    /**
     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
     *
     * @private
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @param {Function} predicate The function invoked per property.
     * @returns {Object} Returns the new object.
     */
    function basePickBy(object, paths, predicate) {
      var index = -1,
          length = paths.length,
          result = {};

      while (++index < length) {
        var path = paths[index],
            value = baseGet(object, path);

        if (predicate(value, path)) {
          baseSet(result, castPath(path, object), value);
        }
      }
      return result;
    }

    /**
     * A specialized version of `baseProperty` which supports deep paths.
     *
     * @private
     * @param {Array|string} path The path of the property to get.
     * @returns {Function} Returns the new accessor function.
     */
    function basePropertyDeep(path) {
      return function(object) {
        return baseGet(object, path);
      };
    }

    /**
     * The base implementation of `_.pullAllBy` without support for iteratee
     * shorthands.
     *
     * @private
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns `array`.
     */
    function basePullAll(array, values, iteratee, comparator) {
      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
          index = -1,
          length = values.length,
          seen = array;

      if (array === values) {
        values = copyArray(values);
      }
      if (iteratee) {
        seen = arrayMap(array, baseUnary(iteratee));
      }
      while (++index < length) {
        var fromIndex = 0,
            value = values[index],
            computed = iteratee ? iteratee(value) : value;

        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
          if (seen !== array) {
            splice.call(seen, fromIndex, 1);
          }
          splice.call(array, fromIndex, 1);
        }
      }
      return array;
    }

    /**
     * The base implementation of `_.pullAt` without support for individual
     * indexes or capturing the removed elements.
     *
     * @private
     * @param {Array} array The array to modify.
     * @param {number[]} indexes The indexes of elements to remove.
     * @returns {Array} Returns `array`.
     */
    function basePullAt(array, indexes) {
      var length = array ? indexes.length : 0,
          lastIndex = length - 1;

      while (length--) {
        var index = indexes[length];
        if (length == lastIndex || index !== previous) {
          var previous = index;
          if (isIndex(index)) {
            splice.call(array, index, 1);
          } else {
            baseUnset(array, index);
          }
        }
      }
      return array;
    }

    /**
     * The base implementation of `_.random` without support for returning
     * floating-point numbers.
     *
     * @private
     * @param {number} lower The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the random number.
     */
    function baseRandom(lower, upper) {
      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
    }

    /**
     * The base implementation of `_.range` and `_.rangeRight` which doesn't
     * coerce arguments.
     *
     * @private
     * @param {number} start The start of the range.
     * @param {number} end The end of the range.
     * @param {number} step The value to increment or decrement by.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Array} Returns the range of numbers.
     */
    function baseRange(start, end, step, fromRight) {
      var index = -1,
          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
          result = Array(length);

      while (length--) {
        result[fromRight ? length : ++index] = start;
        start += step;
      }
      return result;
    }

    /**
     * The base implementation of `_.repeat` which doesn't coerce arguments.
     *
     * @private
     * @param {string} string The string to repeat.
     * @param {number} n The number of times to repeat the string.
     * @returns {string} Returns the repeated string.
     */
    function baseRepeat(string, n) {
      var result = '';
      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
        return result;
      }
      // Leverage the exponentiation by squaring algorithm for a faster repeat.
      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
      do {
        if (n % 2) {
          result += string;
        }
        n = nativeFloor(n / 2);
        if (n) {
          string += string;
        }
      } while (n);

      return result;
    }

    /**
     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @returns {Function} Returns the new function.
     */
    function baseRest(func, start) {
      return setToString(overRest(func, start, identity), func + '');
    }

    /**
     * The base implementation of `_.sample`.
     *
     * @private
     * @param {Array|Object} collection The collection to sample.
     * @returns {*} Returns the random element.
     */
    function baseSample(collection) {
      return arraySample(values(collection));
    }

    /**
     * The base implementation of `_.sampleSize` without param guards.
     *
     * @private
     * @param {Array|Object} collection The collection to sample.
     * @param {number} n The number of elements to sample.
     * @returns {Array} Returns the random elements.
     */
    function baseSampleSize(collection, n) {
      var array = values(collection);
      return shuffleSelf(array, baseClamp(n, 0, array.length));
    }

    /**
     * The base implementation of `_.set`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @param {Function} [customizer] The function to customize path creation.
     * @returns {Object} Returns `object`.
     */
    function baseSet(object, path, value, customizer) {
      if (!isObject(object)) {
        return object;
      }
      path = castPath(path, object);

      var index = -1,
          length = path.length,
          lastIndex = length - 1,
          nested = object;

      while (nested != null && ++index < length) {
        var key = toKey(path[index]),
            newValue = value;

        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
          return object;
        }

        if (index != lastIndex) {
          var objValue = nested[key];
          newValue = customizer ? customizer(objValue, key, nested) : undefined;
          if (newValue === undefined) {
            newValue = isObject(objValue)
              ? objValue
              : (isIndex(path[index + 1]) ? [] : {});
          }
        }
        assignValue(nested, key, newValue);
        nested = nested[key];
      }
      return object;
    }

    /**
     * The base implementation of `setData` without support for hot loop shorting.
     *
     * @private
     * @param {Function} func The function to associate metadata with.
     * @param {*} data The metadata.
     * @returns {Function} Returns `func`.
     */
    var baseSetData = !metaMap ? identity : function(func, data) {
      metaMap.set(func, data);
      return func;
    };

    /**
     * The base implementation of `setToString` without support for hot loop shorting.
     *
     * @private
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
     */
    var baseSetToString = !defineProperty ? identity : function(func, string) {
      return defineProperty(func, 'toString', {
        'configurable': true,
        'enumerable': false,
        'value': constant(string),
        'writable': true
      });
    };

    /**
     * The base implementation of `_.shuffle`.
     *
     * @private
     * @param {Array|Object} collection The collection to shuffle.
     * @returns {Array} Returns the new shuffled array.
     */
    function baseShuffle(collection) {
      return shuffleSelf(values(collection));
    }

    /**
     * The base implementation of `_.slice` without an iteratee call guard.
     *
     * @private
     * @param {Array} array The array to slice.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the slice of `array`.
     */
    function baseSlice(array, start, end) {
      var index = -1,
          length = array.length;

      if (start < 0) {
        start = -start > length ? 0 : (length + start);
      }
      end = end > length ? length : end;
      if (end < 0) {
        end += length;
      }
      length = start > end ? 0 : ((end - start) >>> 0);
      start >>>= 0;

      var result = Array(length);
      while (++index < length) {
        result[index] = array[index + start];
      }
      return result;
    }

    /**
     * The base implementation of `_.some` without support for iteratee shorthands.
     *
     * @private
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} predicate The function invoked per iteration.
     * @returns {boolean} Returns `true` if any element passes the predicate check,
     *  else `false`.
     */
    function baseSome(collection, predicate) {
      var result;

      baseEach(collection, function(value, index, collection) {
        result = predicate(value, index, collection);
        return !result;
      });
      return !!result;
    }

    /**
     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
     * performs a binary search of `array` to determine the index at which `value`
     * should be inserted into `array` in order to maintain its sort order.
     *
     * @private
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {boolean} [retHighest] Specify returning the highest qualified index.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     */
    function baseSortedIndex(array, value, retHighest) {
      var low = 0,
          high = array == null ? low : array.length;

      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
        while (low < high) {
          var mid = (low + high) >>> 1,
              computed = array[mid];

          if (computed !== null && !isSymbol(computed) &&
              (retHighest ? (computed <= value) : (computed < value))) {
            low = mid + 1;
          } else {
            high = mid;
          }
        }
        return high;
      }
      return baseSortedIndexBy(array, value, identity, retHighest);
    }

    /**
     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
     * which invokes `iteratee` for `value` and each element of `array` to compute
     * their sort ranking. The iteratee is invoked with one argument; (value).
     *
     * @private
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} iteratee The iteratee invoked per element.
     * @param {boolean} [retHighest] Specify returning the highest qualified index.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     */
    function baseSortedIndexBy(array, value, iteratee, retHighest) {
      var low = 0,
          high = array == null ? 0 : array.length;
      if (high === 0) {
        return 0;
      }

      value = iteratee(value);
      var valIsNaN = value !== value,
          valIsNull = value === null,
          valIsSymbol = isSymbol(value),
          valIsUndefined = value === undefined;

      while (low < high) {
        var mid = nativeFloor((low + high) / 2),
            computed = iteratee(array[mid]),
            othIsDefined = computed !== undefined,
            othIsNull = computed === null,
            othIsReflexive = computed === computed,
            othIsSymbol = isSymbol(computed);

        if (valIsNaN) {
          var setLow = retHighest || othIsReflexive;
        } else if (valIsUndefined) {
          setLow = othIsReflexive && (retHighest || othIsDefined);
        } else if (valIsNull) {
          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
        } else if (valIsSymbol) {
          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
        } else if (othIsNull || othIsSymbol) {
          setLow = false;
        } else {
          setLow = retHighest ? (computed <= value) : (computed < value);
        }
        if (setLow) {
          low = mid + 1;
        } else {
          high = mid;
        }
      }
      return nativeMin(high, MAX_ARRAY_INDEX);
    }

    /**
     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
     * support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     */
    function baseSortedUniq(array, iteratee) {
      var index = -1,
          length = array.length,
          resIndex = 0,
          result = [];

      while (++index < length) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        if (!index || !eq(computed, seen)) {
          var seen = computed;
          result[resIndex++] = value === 0 ? 0 : value;
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.toNumber` which doesn't ensure correct
     * conversions of binary, hexadecimal, or octal string values.
     *
     * @private
     * @param {*} value The value to process.
     * @returns {number} Returns the number.
     */
    function baseToNumber(value) {
      if (typeof value == 'number') {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      return +value;
    }

    /**
     * The base implementation of `_.toString` which doesn't convert nullish
     * values to empty strings.
     *
     * @private
     * @param {*} value The value to process.
     * @returns {string} Returns the string.
     */
    function baseToString(value) {
      // Exit early for strings to avoid a performance hit in some environments.
      if (typeof value == 'string') {
        return value;
      }
      if (isArray(value)) {
        // Recursively convert values (susceptible to call stack limits).
        return arrayMap(value, baseToString) + '';
      }
      if (isSymbol(value)) {
        return symbolToString ? symbolToString.call(value) : '';
      }
      var result = (value + '');
      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
    }

    /**
     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     */
    function baseUniq(array, iteratee, comparator) {
      var index = -1,
          includes = arrayIncludes,
          length = array.length,
          isCommon = true,
          result = [],
          seen = result;

      if (comparator) {
        isCommon = false;
        includes = arrayIncludesWith;
      }
      else if (length >= LARGE_ARRAY_SIZE) {
        var set = iteratee ? null : createSet(array);
        if (set) {
          return setToArray(set);
        }
        isCommon = false;
        includes = cacheHas;
        seen = new SetCache;
      }
      else {
        seen = iteratee ? [] : result;
      }
      outer:
      while (++index < length) {
        var value = array[index],
            computed = iteratee ? iteratee(value) : value;

        value = (comparator || value !== 0) ? value : 0;
        if (isCommon && computed === computed) {
          var seenIndex = seen.length;
          while (seenIndex--) {
            if (seen[seenIndex] === computed) {
              continue outer;
            }
          }
          if (iteratee) {
            seen.push(computed);
          }
          result.push(value);
        }
        else if (!includes(seen, computed, comparator)) {
          if (seen !== result) {
            seen.push(computed);
          }
          result.push(value);
        }
      }
      return result;
    }

    /**
     * The base implementation of `_.unset`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The property path to unset.
     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
     */
    function baseUnset(object, path) {
      path = castPath(path, object);
      object = parent(object, path);
      return object == null || delete object[toKey(last(path))];
    }

    /**
     * The base implementation of `_.update`.
     *
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to update.
     * @param {Function} updater The function to produce the updated value.
     * @param {Function} [customizer] The function to customize path creation.
     * @returns {Object} Returns `object`.
     */
    function baseUpdate(object, path, updater, customizer) {
      return baseSet(object, path, updater(baseGet(object, path)), customizer);
    }

    /**
     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
     * without support for iteratee shorthands.
     *
     * @private
     * @param {Array} array The array to query.
     * @param {Function} predicate The function invoked per iteration.
     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Array} Returns the slice of `array`.
     */
    function baseWhile(array, predicate, isDrop, fromRight) {
      var length = array.length,
          index = fromRight ? length : -1;

      while ((fromRight ? index-- : ++index < length) &&
        predicate(array[index], index, array)) {}

      return isDrop
        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
    }

    /**
     * The base implementation of `wrapperValue` which returns the result of
     * performing a sequence of actions on the unwrapped `value`, where each
     * successive action is supplied the return value of the previous.
     *
     * @private
     * @param {*} value The unwrapped value.
     * @param {Array} actions Actions to perform to resolve the unwrapped value.
     * @returns {*} Returns the resolved value.
     */
    function baseWrapperValue(value, actions) {
      var result = value;
      if (result instanceof LazyWrapper) {
        result = result.value();
      }
      return arrayReduce(actions, function(result, action) {
        return action.func.apply(action.thisArg, arrayPush([result], action.args));
      }, result);
    }

    /**
     * The base implementation of methods like `_.xor`, without support for
     * iteratee shorthands, that accepts an array of arrays to inspect.
     *
     * @private
     * @param {Array} arrays The arrays to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of values.
     */
    function baseXor(arrays, iteratee, comparator) {
      var length = arrays.length;
      if (length < 2) {
        return length ? baseUniq(arrays[0]) : [];
      }
      var index = -1,
          result = Array(length);

      while (++index < length) {
        var array = arrays[index],
            othIndex = -1;

        while (++othIndex < length) {
          if (othIndex != index) {
            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
          }
        }
      }
      return baseUniq(baseFlatten(result, 1), iteratee, comparator);
    }

    /**
     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
     *
     * @private
     * @param {Array} props The property identifiers.
     * @param {Array} values The property values.
     * @param {Function} assignFunc The function to assign values.
     * @returns {Object} Returns the new object.
     */
    function baseZipObject(props, values, assignFunc) {
      var index = -1,
          length = props.length,
          valsLength = values.length,
          result = {};

      while (++index < length) {
        var value = index < valsLength ? values[index] : undefined;
        assignFunc(result, props[index], value);
      }
      return result;
    }

    /**
     * Casts `value` to an empty array if it's not an array like object.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {Array|Object} Returns the cast array-like object.
     */
    function castArrayLikeObject(value) {
      return isArrayLikeObject(value) ? value : [];
    }

    /**
     * Casts `value` to `identity` if it's not a function.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {Function} Returns cast function.
     */
    function castFunction(value) {
      return typeof value == 'function' ? value : identity;
    }

    /**
     * Casts `value` to a path array if it's not one.
     *
     * @private
     * @param {*} value The value to inspect.
     * @param {Object} [object] The object to query keys on.
     * @returns {Array} Returns the cast property path array.
     */
    function castPath(value, object) {
      if (isArray(value)) {
        return value;
      }
      return isKey(value, object) ? [value] : stringToPath(toString(value));
    }

    /**
     * A `baseRest` alias which can be replaced with `identity` by module
     * replacement plugins.
     *
     * @private
     * @type {Function}
     * @param {Function} func The function to apply a rest parameter to.
     * @returns {Function} Returns the new function.
     */
    var castRest = baseRest;

    /**
     * Casts `array` to a slice if it's needed.
     *
     * @private
     * @param {Array} array The array to inspect.
     * @param {number} start The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the cast slice.
     */
    function castSlice(array, start, end) {
      var length = array.length;
      end = end === undefined ? length : end;
      return (!start && end >= length) ? array : baseSlice(array, start, end);
    }

    /**
     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
     *
     * @private
     * @param {number|Object} id The timer id or timeout object of the timer to clear.
     */
    var clearTimeout = ctxClearTimeout || function(id) {
      return root.clearTimeout(id);
    };

    /**
     * Creates a clone of  `buffer`.
     *
     * @private
     * @param {Buffer} buffer The buffer to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Buffer} Returns the cloned buffer.
     */
    function cloneBuffer(buffer, isDeep) {
      if (isDeep) {
        return buffer.slice();
      }
      var length = buffer.length,
          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);

      buffer.copy(result);
      return result;
    }

    /**
     * Creates a clone of `arrayBuffer`.
     *
     * @private
     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
     * @returns {ArrayBuffer} Returns the cloned array buffer.
     */
    function cloneArrayBuffer(arrayBuffer) {
      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
      new Uint8Array(result).set(new Uint8Array(arrayBuffer));
      return result;
    }

    /**
     * Creates a clone of `dataView`.
     *
     * @private
     * @param {Object} dataView The data view to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the cloned data view.
     */
    function cloneDataView(dataView, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
    }

    /**
     * Creates a clone of `regexp`.
     *
     * @private
     * @param {Object} regexp The regexp to clone.
     * @returns {Object} Returns the cloned regexp.
     */
    function cloneRegExp(regexp) {
      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
      result.lastIndex = regexp.lastIndex;
      return result;
    }

    /**
     * Creates a clone of the `symbol` object.
     *
     * @private
     * @param {Object} symbol The symbol object to clone.
     * @returns {Object} Returns the cloned symbol object.
     */
    function cloneSymbol(symbol) {
      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
    }

    /**
     * Creates a clone of `typedArray`.
     *
     * @private
     * @param {Object} typedArray The typed array to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the cloned typed array.
     */
    function cloneTypedArray(typedArray, isDeep) {
      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
    }

    /**
     * Compares values to sort them in ascending order.
     *
     * @private
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {number} Returns the sort order indicator for `value`.
     */
    function compareAscending(value, other) {
      if (value !== other) {
        var valIsDefined = value !== undefined,
            valIsNull = value === null,
            valIsReflexive = value === value,
            valIsSymbol = isSymbol(value);

        var othIsDefined = other !== undefined,
            othIsNull = other === null,
            othIsReflexive = other === other,
            othIsSymbol = isSymbol(other);

        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
            (valIsNull && othIsDefined && othIsReflexive) ||
            (!valIsDefined && othIsReflexive) ||
            !valIsReflexive) {
          return 1;
        }
        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
            (othIsNull && valIsDefined && valIsReflexive) ||
            (!othIsDefined && valIsReflexive) ||
            !othIsReflexive) {
          return -1;
        }
      }
      return 0;
    }

    /**
     * Used by `_.orderBy` to compare multiple properties of a value to another
     * and stable sort them.
     *
     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
     * specify an order of "desc" for descending or "asc" for ascending sort order
     * of corresponding values.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {boolean[]|string[]} orders The order to sort by for each property.
     * @returns {number} Returns the sort order indicator for `object`.
     */
    function compareMultiple(object, other, orders) {
      var index = -1,
          objCriteria = object.criteria,
          othCriteria = other.criteria,
          length = objCriteria.length,
          ordersLength = orders.length;

      while (++index < length) {
        var result = compareAscending(objCriteria[index], othCriteria[index]);
        if (result) {
          if (index >= ordersLength) {
            return result;
          }
          var order = orders[index];
          return result * (order == 'desc' ? -1 : 1);
        }
      }
      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
      // that causes it, under certain circumstances, to provide the same value for
      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
      // for more details.
      //
      // This also ensures a stable sort in V8 and other engines.
      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
      return object.index - other.index;
    }

    /**
     * Creates an array that is the composition of partially applied arguments,
     * placeholders, and provided arguments into a single array of arguments.
     *
     * @private
     * @param {Array} args The provided arguments.
     * @param {Array} partials The arguments to prepend to those provided.
     * @param {Array} holders The `partials` placeholder indexes.
     * @params {boolean} [isCurried] Specify composing for a curried function.
     * @returns {Array} Returns the new array of composed arguments.
     */
    function composeArgs(args, partials, holders, isCurried) {
      var argsIndex = -1,
          argsLength = args.length,
          holdersLength = holders.length,
          leftIndex = -1,
          leftLength = partials.length,
          rangeLength = nativeMax(argsLength - holdersLength, 0),
          result = Array(leftLength + rangeLength),
          isUncurried = !isCurried;

      while (++leftIndex < leftLength) {
        result[leftIndex] = partials[leftIndex];
      }
      while (++argsIndex < holdersLength) {
        if (isUncurried || argsIndex < argsLength) {
          result[holders[argsIndex]] = args[argsIndex];
        }
      }
      while (rangeLength--) {
        result[leftIndex++] = args[argsIndex++];
      }
      return result;
    }

    /**
     * This function is like `composeArgs` except that the arguments composition
     * is tailored for `_.partialRight`.
     *
     * @private
     * @param {Array} args The provided arguments.
     * @param {Array} partials The arguments to append to those provided.
     * @param {Array} holders The `partials` placeholder indexes.
     * @params {boolean} [isCurried] Specify composing for a curried function.
     * @returns {Array} Returns the new array of composed arguments.
     */
    function composeArgsRight(args, partials, holders, isCurried) {
      var argsIndex = -1,
          argsLength = args.length,
          holdersIndex = -1,
          holdersLength = holders.length,
          rightIndex = -1,
          rightLength = partials.length,
          rangeLength = nativeMax(argsLength - holdersLength, 0),
          result = Array(rangeLength + rightLength),
          isUncurried = !isCurried;

      while (++argsIndex < rangeLength) {
        result[argsIndex] = args[argsIndex];
      }
      var offset = argsIndex;
      while (++rightIndex < rightLength) {
        result[offset + rightIndex] = partials[rightIndex];
      }
      while (++holdersIndex < holdersLength) {
        if (isUncurried || argsIndex < argsLength) {
          result[offset + holders[holdersIndex]] = args[argsIndex++];
        }
      }
      return result;
    }

    /**
     * Copies the values of `source` to `array`.
     *
     * @private
     * @param {Array} source The array to copy values from.
     * @param {Array} [array=[]] The array to copy values to.
     * @returns {Array} Returns `array`.
     */
    function copyArray(source, array) {
      var index = -1,
          length = source.length;

      array || (array = Array(length));
      while (++index < length) {
        array[index] = source[index];
      }
      return array;
    }

    /**
     * Copies properties of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy properties from.
     * @param {Array} props The property identifiers to copy.
     * @param {Object} [object={}] The object to copy properties to.
     * @param {Function} [customizer] The function to customize copied values.
     * @returns {Object} Returns `object`.
     */
    function copyObject(source, props, object, customizer) {
      var isNew = !object;
      object || (object = {});

      var index = -1,
          length = props.length;

      while (++index < length) {
        var key = props[index];

        var newValue = customizer
          ? customizer(object[key], source[key], key, object, source)
          : undefined;

        if (newValue === undefined) {
          newValue = source[key];
        }
        if (isNew) {
          baseAssignValue(object, key, newValue);
        } else {
          assignValue(object, key, newValue);
        }
      }
      return object;
    }

    /**
     * Copies own symbols of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy symbols from.
     * @param {Object} [object={}] The object to copy symbols to.
     * @returns {Object} Returns `object`.
     */
    function copySymbols(source, object) {
      return copyObject(source, getSymbols(source), object);
    }

    /**
     * Copies own and inherited symbols of `source` to `object`.
     *
     * @private
     * @param {Object} source The object to copy symbols from.
     * @param {Object} [object={}] The object to copy symbols to.
     * @returns {Object} Returns `object`.
     */
    function copySymbolsIn(source, object) {
      return copyObject(source, getSymbolsIn(source), object);
    }

    /**
     * Creates a function like `_.groupBy`.
     *
     * @private
     * @param {Function} setter The function to set accumulator values.
     * @param {Function} [initializer] The accumulator object initializer.
     * @returns {Function} Returns the new aggregator function.
     */
    function createAggregator(setter, initializer) {
      return function(collection, iteratee) {
        var func = isArray(collection) ? arrayAggregator : baseAggregator,
            accumulator = initializer ? initializer() : {};

        return func(collection, setter, getIteratee(iteratee, 2), accumulator);
      };
    }

    /**
     * Creates a function like `_.assign`.
     *
     * @private
     * @param {Function} assigner The function to assign values.
     * @returns {Function} Returns the new assigner function.
     */
    function createAssigner(assigner) {
      return baseRest(function(object, sources) {
        var index = -1,
            length = sources.length,
            customizer = length > 1 ? sources[length - 1] : undefined,
            guard = length > 2 ? sources[2] : undefined;

        customizer = (assigner.length > 3 && typeof customizer == 'function')
          ? (length--, customizer)
          : undefined;

        if (guard && isIterateeCall(sources[0], sources[1], guard)) {
          customizer = length < 3 ? undefined : customizer;
          length = 1;
        }
        object = Object(object);
        while (++index < length) {
          var source = sources[index];
          if (source) {
            assigner(object, source, index, customizer);
          }
        }
        return object;
      });
    }

    /**
     * Creates a `baseEach` or `baseEachRight` function.
     *
     * @private
     * @param {Function} eachFunc The function to iterate over a collection.
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new base function.
     */
    function createBaseEach(eachFunc, fromRight) {
      return function(collection, iteratee) {
        if (collection == null) {
          return collection;
        }
        if (!isArrayLike(collection)) {
          return eachFunc(collection, iteratee);
        }
        var length = collection.length,
            index = fromRight ? length : -1,
            iterable = Object(collection);

        while ((fromRight ? index-- : ++index < length)) {
          if (iteratee(iterable[index], index, iterable) === false) {
            break;
          }
        }
        return collection;
      };
    }

    /**
     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new base function.
     */
    function createBaseFor(fromRight) {
      return function(object, iteratee, keysFunc) {
        var index = -1,
            iterable = Object(object),
            props = keysFunc(object),
            length = props.length;

        while (length--) {
          var key = props[fromRight ? length : ++index];
          if (iteratee(iterable[key], key, iterable) === false) {
            break;
          }
        }
        return object;
      };
    }

    /**
     * Creates a function that wraps `func` to invoke it with the optional `this`
     * binding of `thisArg`.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createBind(func, bitmask, thisArg) {
      var isBind = bitmask & WRAP_BIND_FLAG,
          Ctor = createCtor(func);

      function wrapper() {
        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
        return fn.apply(isBind ? thisArg : this, arguments);
      }
      return wrapper;
    }

    /**
     * Creates a function like `_.lowerFirst`.
     *
     * @private
     * @param {string} methodName The name of the `String` case method to use.
     * @returns {Function} Returns the new case function.
     */
    function createCaseFirst(methodName) {
      return function(string) {
        string = toString(string);

        var strSymbols = hasUnicode(string)
          ? stringToArray(string)
          : undefined;

        var chr = strSymbols
          ? strSymbols[0]
          : string.charAt(0);

        var trailing = strSymbols
          ? castSlice(strSymbols, 1).join('')
          : string.slice(1);

        return chr[methodName]() + trailing;
      };
    }

    /**
     * Creates a function like `_.camelCase`.
     *
     * @private
     * @param {Function} callback The function to combine each word.
     * @returns {Function} Returns the new compounder function.
     */
    function createCompounder(callback) {
      return function(string) {
        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
      };
    }

    /**
     * Creates a function that produces an instance of `Ctor` regardless of
     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
     *
     * @private
     * @param {Function} Ctor The constructor to wrap.
     * @returns {Function} Returns the new wrapped function.
     */
    function createCtor(Ctor) {
      return function() {
        // Use a `switch` statement to work with class constructors. See
        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
        // for more details.
        var args = arguments;
        switch (args.length) {
          case 0: return new Ctor;
          case 1: return new Ctor(args[0]);
          case 2: return new Ctor(args[0], args[1]);
          case 3: return new Ctor(args[0], args[1], args[2]);
          case 4: return new Ctor(args[0], args[1], args[2], args[3]);
          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
        }
        var thisBinding = baseCreate(Ctor.prototype),
            result = Ctor.apply(thisBinding, args);

        // Mimic the constructor's `return` behavior.
        // See https://es5.github.io/#x13.2.2 for more details.
        return isObject(result) ? result : thisBinding;
      };
    }

    /**
     * Creates a function that wraps `func` to enable currying.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {number} arity The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createCurry(func, bitmask, arity) {
      var Ctor = createCtor(func);

      function wrapper() {
        var length = arguments.length,
            args = Array(length),
            index = length,
            placeholder = getHolder(wrapper);

        while (index--) {
          args[index] = arguments[index];
        }
        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
          ? []
          : replaceHolders(args, placeholder);

        length -= holders.length;
        if (length < arity) {
          return createRecurry(
            func, bitmask, createHybrid, wrapper.placeholder, undefined,
            args, holders, undefined, undefined, arity - length);
        }
        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
        return apply(fn, this, args);
      }
      return wrapper;
    }

    /**
     * Creates a `_.find` or `_.findLast` function.
     *
     * @private
     * @param {Function} findIndexFunc The function to find the collection index.
     * @returns {Function} Returns the new find function.
     */
    function createFind(findIndexFunc) {
      return function(collection, predicate, fromIndex) {
        var iterable = Object(collection);
        if (!isArrayLike(collection)) {
          var iteratee = getIteratee(predicate, 3);
          collection = keys(collection);
          predicate = function(key) { return iteratee(iterable[key], key, iterable); };
        }
        var index = findIndexFunc(collection, predicate, fromIndex);
        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
      };
    }

    /**
     * Creates a `_.flow` or `_.flowRight` function.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new flow function.
     */
    function createFlow(fromRight) {
      return flatRest(function(funcs) {
        var length = funcs.length,
            index = length,
            prereq = LodashWrapper.prototype.thru;

        if (fromRight) {
          funcs.reverse();
        }
        while (index--) {
          var func = funcs[index];
          if (typeof func != 'function') {
            throw new TypeError(FUNC_ERROR_TEXT);
          }
          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
            var wrapper = new LodashWrapper([], true);
          }
        }
        index = wrapper ? index : length;
        while (++index < length) {
          func = funcs[index];

          var funcName = getFuncName(func),
              data = funcName == 'wrapper' ? getData(func) : undefined;

          if (data && isLaziable(data[0]) &&
                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
                !data[4].length && data[9] == 1
              ) {
            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
          } else {
            wrapper = (func.length == 1 && isLaziable(func))
              ? wrapper[funcName]()
              : wrapper.thru(func);
          }
        }
        return function() {
          var args = arguments,
              value = args[0];

          if (wrapper && args.length == 1 && isArray(value)) {
            return wrapper.plant(value).value();
          }
          var index = 0,
              result = length ? funcs[index].apply(this, args) : value;

          while (++index < length) {
            result = funcs[index].call(this, result);
          }
          return result;
        };
      });
    }

    /**
     * Creates a function that wraps `func` to invoke it with optional `this`
     * binding of `thisArg`, partial application, and currying.
     *
     * @private
     * @param {Function|string} func The function or method name to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to prepend to those provided to
     *  the new function.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [partialsRight] The arguments to append to those provided
     *  to the new function.
     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
      var isAry = bitmask & WRAP_ARY_FLAG,
          isBind = bitmask & WRAP_BIND_FLAG,
          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
          isFlip = bitmask & WRAP_FLIP_FLAG,
          Ctor = isBindKey ? undefined : createCtor(func);

      function wrapper() {
        var length = arguments.length,
            args = Array(length),
            index = length;

        while (index--) {
          args[index] = arguments[index];
        }
        if (isCurried) {
          var placeholder = getHolder(wrapper),
              holdersCount = countHolders(args, placeholder);
        }
        if (partials) {
          args = composeArgs(args, partials, holders, isCurried);
        }
        if (partialsRight) {
          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
        }
        length -= holdersCount;
        if (isCurried && length < arity) {
          var newHolders = replaceHolders(args, placeholder);
          return createRecurry(
            func, bitmask, createHybrid, wrapper.placeholder, thisArg,
            args, newHolders, argPos, ary, arity - length
          );
        }
        var thisBinding = isBind ? thisArg : this,
            fn = isBindKey ? thisBinding[func] : func;

        length = args.length;
        if (argPos) {
          args = reorder(args, argPos);
        } else if (isFlip && length > 1) {
          args.reverse();
        }
        if (isAry && ary < length) {
          args.length = ary;
        }
        if (this && this !== root && this instanceof wrapper) {
          fn = Ctor || createCtor(fn);
        }
        return fn.apply(thisBinding, args);
      }
      return wrapper;
    }

    /**
     * Creates a function like `_.invertBy`.
     *
     * @private
     * @param {Function} setter The function to set accumulator values.
     * @param {Function} toIteratee The function to resolve iteratees.
     * @returns {Function} Returns the new inverter function.
     */
    function createInverter(setter, toIteratee) {
      return function(object, iteratee) {
        return baseInverter(object, setter, toIteratee(iteratee), {});
      };
    }

    /**
     * Creates a function that performs a mathematical operation on two values.
     *
     * @private
     * @param {Function} operator The function to perform the operation.
     * @param {number} [defaultValue] The value used for `undefined` arguments.
     * @returns {Function} Returns the new mathematical operation function.
     */
    function createMathOperation(operator, defaultValue) {
      return function(value, other) {
        var result;
        if (value === undefined && other === undefined) {
          return defaultValue;
        }
        if (value !== undefined) {
          result = value;
        }
        if (other !== undefined) {
          if (result === undefined) {
            return other;
          }
          if (typeof value == 'string' || typeof other == 'string') {
            value = baseToString(value);
            other = baseToString(other);
          } else {
            value = baseToNumber(value);
            other = baseToNumber(other);
          }
          result = operator(value, other);
        }
        return result;
      };
    }

    /**
     * Creates a function like `_.over`.
     *
     * @private
     * @param {Function} arrayFunc The function to iterate over iteratees.
     * @returns {Function} Returns the new over function.
     */
    function createOver(arrayFunc) {
      return flatRest(function(iteratees) {
        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
        return baseRest(function(args) {
          var thisArg = this;
          return arrayFunc(iteratees, function(iteratee) {
            return apply(iteratee, thisArg, args);
          });
        });
      });
    }

    /**
     * Creates the padding for `string` based on `length`. The `chars` string
     * is truncated if the number of characters exceeds `length`.
     *
     * @private
     * @param {number} length The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padding for `string`.
     */
    function createPadding(length, chars) {
      chars = chars === undefined ? ' ' : baseToString(chars);

      var charsLength = chars.length;
      if (charsLength < 2) {
        return charsLength ? baseRepeat(chars, length) : chars;
      }
      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
      return hasUnicode(chars)
        ? castSlice(stringToArray(result), 0, length).join('')
        : result.slice(0, length);
    }

    /**
     * Creates a function that wraps `func` to invoke it with the `this` binding
     * of `thisArg` and `partials` prepended to the arguments it receives.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {*} thisArg The `this` binding of `func`.
     * @param {Array} partials The arguments to prepend to those provided to
     *  the new function.
     * @returns {Function} Returns the new wrapped function.
     */
    function createPartial(func, bitmask, thisArg, partials) {
      var isBind = bitmask & WRAP_BIND_FLAG,
          Ctor = createCtor(func);

      function wrapper() {
        var argsIndex = -1,
            argsLength = arguments.length,
            leftIndex = -1,
            leftLength = partials.length,
            args = Array(leftLength + argsLength),
            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;

        while (++leftIndex < leftLength) {
          args[leftIndex] = partials[leftIndex];
        }
        while (argsLength--) {
          args[leftIndex++] = arguments[++argsIndex];
        }
        return apply(fn, isBind ? thisArg : this, args);
      }
      return wrapper;
    }

    /**
     * Creates a `_.range` or `_.rangeRight` function.
     *
     * @private
     * @param {boolean} [fromRight] Specify iterating from right to left.
     * @returns {Function} Returns the new range function.
     */
    function createRange(fromRight) {
      return function(start, end, step) {
        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
          end = step = undefined;
        }
        // Ensure the sign of `-0` is preserved.
        start = toFinite(start);
        if (end === undefined) {
          end = start;
          start = 0;
        } else {
          end = toFinite(end);
        }
        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
        return baseRange(start, end, step, fromRight);
      };
    }

    /**
     * Creates a function that performs a relational operation on two values.
     *
     * @private
     * @param {Function} operator The function to perform the operation.
     * @returns {Function} Returns the new relational operation function.
     */
    function createRelationalOperation(operator) {
      return function(value, other) {
        if (!(typeof value == 'string' && typeof other == 'string')) {
          value = toNumber(value);
          other = toNumber(other);
        }
        return operator(value, other);
      };
    }

    /**
     * Creates a function that wraps `func` to continue currying.
     *
     * @private
     * @param {Function} func The function to wrap.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @param {Function} wrapFunc The function to create the `func` wrapper.
     * @param {*} placeholder The placeholder value.
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to prepend to those provided to
     *  the new function.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
      var isCurry = bitmask & WRAP_CURRY_FLAG,
          newHolders = isCurry ? holders : undefined,
          newHoldersRight = isCurry ? undefined : holders,
          newPartials = isCurry ? partials : undefined,
          newPartialsRight = isCurry ? undefined : partials;

      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);

      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
      }
      var newData = [
        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
        newHoldersRight, argPos, ary, arity
      ];

      var result = wrapFunc.apply(undefined, newData);
      if (isLaziable(func)) {
        setData(result, newData);
      }
      result.placeholder = placeholder;
      return setWrapToString(result, func, bitmask);
    }

    /**
     * Creates a function like `_.round`.
     *
     * @private
     * @param {string} methodName The name of the `Math` method to use when rounding.
     * @returns {Function} Returns the new round function.
     */
    function createRound(methodName) {
      var func = Math[methodName];
      return function(number, precision) {
        number = toNumber(number);
        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
        if (precision && nativeIsFinite(number)) {
          // Shift with exponential notation to avoid floating-point issues.
          // See [MDN](https://mdn.io/round#Examples) for more details.
          var pair = (toString(number) + 'e').split('e'),
              value = func(pair[0] + 'e' + (+pair[1] + precision));

          pair = (toString(value) + 'e').split('e');
          return +(pair[0] + 'e' + (+pair[1] - precision));
        }
        return func(number);
      };
    }

    /**
     * Creates a set object of `values`.
     *
     * @private
     * @param {Array} values The values to add to the set.
     * @returns {Object} Returns the new set.
     */
    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
      return new Set(values);
    };

    /**
     * Creates a `_.toPairs` or `_.toPairsIn` function.
     *
     * @private
     * @param {Function} keysFunc The function to get the keys of a given object.
     * @returns {Function} Returns the new pairs function.
     */
    function createToPairs(keysFunc) {
      return function(object) {
        var tag = getTag(object);
        if (tag == mapTag) {
          return mapToArray(object);
        }
        if (tag == setTag) {
          return setToPairs(object);
        }
        return baseToPairs(object, keysFunc(object));
      };
    }

    /**
     * Creates a function that either curries or invokes `func` with optional
     * `this` binding and partially applied arguments.
     *
     * @private
     * @param {Function|string} func The function or method name to wrap.
     * @param {number} bitmask The bitmask flags.
     *    1 - `_.bind`
     *    2 - `_.bindKey`
     *    4 - `_.curry` or `_.curryRight` of a bound function
     *    8 - `_.curry`
     *   16 - `_.curryRight`
     *   32 - `_.partial`
     *   64 - `_.partialRight`
     *  128 - `_.rearg`
     *  256 - `_.ary`
     *  512 - `_.flip`
     * @param {*} [thisArg] The `this` binding of `func`.
     * @param {Array} [partials] The arguments to be partially applied.
     * @param {Array} [holders] The `partials` placeholder indexes.
     * @param {Array} [argPos] The argument positions of the new function.
     * @param {number} [ary] The arity cap of `func`.
     * @param {number} [arity] The arity of `func`.
     * @returns {Function} Returns the new wrapped function.
     */
    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
      if (!isBindKey && typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var length = partials ? partials.length : 0;
      if (!length) {
        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
        partials = holders = undefined;
      }
      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
      arity = arity === undefined ? arity : toInteger(arity);
      length -= holders ? holders.length : 0;

      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
        var partialsRight = partials,
            holdersRight = holders;

        partials = holders = undefined;
      }
      var data = isBindKey ? undefined : getData(func);

      var newData = [
        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
        argPos, ary, arity
      ];

      if (data) {
        mergeData(newData, data);
      }
      func = newData[0];
      bitmask = newData[1];
      thisArg = newData[2];
      partials = newData[3];
      holders = newData[4];
      arity = newData[9] = newData[9] === undefined
        ? (isBindKey ? 0 : func.length)
        : nativeMax(newData[9] - length, 0);

      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
      }
      if (!bitmask || bitmask == WRAP_BIND_FLAG) {
        var result = createBind(func, bitmask, thisArg);
      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
        result = createCurry(func, bitmask, arity);
      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
        result = createPartial(func, bitmask, thisArg, partials);
      } else {
        result = createHybrid.apply(undefined, newData);
      }
      var setter = data ? baseSetData : setData;
      return setWrapToString(setter(result, newData), func, bitmask);
    }

    /**
     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
     * of source objects to the destination object for all destination properties
     * that resolve to `undefined`.
     *
     * @private
     * @param {*} objValue The destination value.
     * @param {*} srcValue The source value.
     * @param {string} key The key of the property to assign.
     * @param {Object} object The parent object of `objValue`.
     * @returns {*} Returns the value to assign.
     */
    function customDefaultsAssignIn(objValue, srcValue, key, object) {
      if (objValue === undefined ||
          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
        return srcValue;
      }
      return objValue;
    }

    /**
     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
     * objects into destination objects that are passed thru.
     *
     * @private
     * @param {*} objValue The destination value.
     * @param {*} srcValue The source value.
     * @param {string} key The key of the property to merge.
     * @param {Object} object The parent object of `objValue`.
     * @param {Object} source The parent object of `srcValue`.
     * @param {Object} [stack] Tracks traversed source values and their merged
     *  counterparts.
     * @returns {*} Returns the value to assign.
     */
    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
      if (isObject(objValue) && isObject(srcValue)) {
        // Recursively merge objects and arrays (susceptible to call stack limits).
        stack.set(srcValue, objValue);
        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
        stack['delete'](srcValue);
      }
      return objValue;
    }

    /**
     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
     * objects.
     *
     * @private
     * @param {*} value The value to inspect.
     * @param {string} key The key of the property to inspect.
     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
     */
    function customOmitClone(value) {
      return isPlainObject(value) ? undefined : value;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for arrays with support for
     * partial deep comparisons.
     *
     * @private
     * @param {Array} array The array to compare.
     * @param {Array} other The other array to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `array` and `other` objects.
     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
     */
    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
          arrLength = array.length,
          othLength = other.length;

      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
        return false;
      }
      // Check that cyclic values are equal.
      var arrStacked = stack.get(array);
      var othStacked = stack.get(other);
      if (arrStacked && othStacked) {
        return arrStacked == other && othStacked == array;
      }
      var index = -1,
          result = true,
          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;

      stack.set(array, other);
      stack.set(other, array);

      // Ignore non-index properties.
      while (++index < arrLength) {
        var arrValue = array[index],
            othValue = other[index];

        if (customizer) {
          var compared = isPartial
            ? customizer(othValue, arrValue, index, other, array, stack)
            : customizer(arrValue, othValue, index, array, other, stack);
        }
        if (compared !== undefined) {
          if (compared) {
            continue;
          }
          result = false;
          break;
        }
        // Recursively compare arrays (susceptible to call stack limits).
        if (seen) {
          if (!arraySome(other, function(othValue, othIndex) {
                if (!cacheHas(seen, othIndex) &&
                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
                  return seen.push(othIndex);
                }
              })) {
            result = false;
            break;
          }
        } else if (!(
              arrValue === othValue ||
                equalFunc(arrValue, othValue, bitmask, customizer, stack)
            )) {
          result = false;
          break;
        }
      }
      stack['delete'](array);
      stack['delete'](other);
      return result;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for comparing objects of
     * the same `toStringTag`.
     *
     * **Note:** This function only supports comparing values with tags of
     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {string} tag The `toStringTag` of the objects to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
      switch (tag) {
        case dataViewTag:
          if ((object.byteLength != other.byteLength) ||
              (object.byteOffset != other.byteOffset)) {
            return false;
          }
          object = object.buffer;
          other = other.buffer;

        case arrayBufferTag:
          if ((object.byteLength != other.byteLength) ||
              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
            return false;
          }
          return true;

        case boolTag:
        case dateTag:
        case numberTag:
          // Coerce booleans to `1` or `0` and dates to milliseconds.
          // Invalid dates are coerced to `NaN`.
          return eq(+object, +other);

        case errorTag:
          return object.name == other.name && object.message == other.message;

        case regexpTag:
        case stringTag:
          // Coerce regexes to strings and treat strings, primitives and objects,
          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
          // for more details.
          return object == (other + '');

        case mapTag:
          var convert = mapToArray;

        case setTag:
          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
          convert || (convert = setToArray);

          if (object.size != other.size && !isPartial) {
            return false;
          }
          // Assume cyclic values are equal.
          var stacked = stack.get(object);
          if (stacked) {
            return stacked == other;
          }
          bitmask |= COMPARE_UNORDERED_FLAG;

          // Recursively compare objects (susceptible to call stack limits).
          stack.set(object, other);
          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
          stack['delete'](object);
          return result;

        case symbolTag:
          if (symbolValueOf) {
            return symbolValueOf.call(object) == symbolValueOf.call(other);
          }
      }
      return false;
    }

    /**
     * A specialized version of `baseIsEqualDeep` for objects with support for
     * partial deep comparisons.
     *
     * @private
     * @param {Object} object The object to compare.
     * @param {Object} other The other object to compare.
     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
     * @param {Function} customizer The function to customize comparisons.
     * @param {Function} equalFunc The function to determine equivalents of values.
     * @param {Object} stack Tracks traversed `object` and `other` objects.
     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
     */
    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
          objProps = getAllKeys(object),
          objLength = objProps.length,
          othProps = getAllKeys(other),
          othLength = othProps.length;

      if (objLength != othLength && !isPartial) {
        return false;
      }
      var index = objLength;
      while (index--) {
        var key = objProps[index];
        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
          return false;
        }
      }
      // Check that cyclic values are equal.
      var objStacked = stack.get(object);
      var othStacked = stack.get(other);
      if (objStacked && othStacked) {
        return objStacked == other && othStacked == object;
      }
      var result = true;
      stack.set(object, other);
      stack.set(other, object);

      var skipCtor = isPartial;
      while (++index < objLength) {
        key = objProps[index];
        var objValue = object[key],
            othValue = other[key];

        if (customizer) {
          var compared = isPartial
            ? customizer(othValue, objValue, key, other, object, stack)
            : customizer(objValue, othValue, key, object, other, stack);
        }
        // Recursively compare objects (susceptible to call stack limits).
        if (!(compared === undefined
              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
              : compared
            )) {
          result = false;
          break;
        }
        skipCtor || (skipCtor = key == 'constructor');
      }
      if (result && !skipCtor) {
        var objCtor = object.constructor,
            othCtor = other.constructor;

        // Non `Object` object instances with different constructors are not equal.
        if (objCtor != othCtor &&
            ('constructor' in object && 'constructor' in other) &&
            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
              typeof othCtor == 'function' && othCtor instanceof othCtor)) {
          result = false;
        }
      }
      stack['delete'](object);
      stack['delete'](other);
      return result;
    }

    /**
     * A specialized version of `baseRest` which flattens the rest array.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @returns {Function} Returns the new function.
     */
    function flatRest(func) {
      return setToString(overRest(func, undefined, flatten), func + '');
    }

    /**
     * Creates an array of own enumerable property names and symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function getAllKeys(object) {
      return baseGetAllKeys(object, keys, getSymbols);
    }

    /**
     * Creates an array of own and inherited enumerable property names and
     * symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names and symbols.
     */
    function getAllKeysIn(object) {
      return baseGetAllKeys(object, keysIn, getSymbolsIn);
    }

    /**
     * Gets metadata for `func`.
     *
     * @private
     * @param {Function} func The function to query.
     * @returns {*} Returns the metadata for `func`.
     */
    var getData = !metaMap ? noop : function(func) {
      return metaMap.get(func);
    };

    /**
     * Gets the name of `func`.
     *
     * @private
     * @param {Function} func The function to query.
     * @returns {string} Returns the function name.
     */
    function getFuncName(func) {
      var result = (func.name + ''),
          array = realNames[result],
          length = hasOwnProperty.call(realNames, result) ? array.length : 0;

      while (length--) {
        var data = array[length],
            otherFunc = data.func;
        if (otherFunc == null || otherFunc == func) {
          return data.name;
        }
      }
      return result;
    }

    /**
     * Gets the argument placeholder value for `func`.
     *
     * @private
     * @param {Function} func The function to inspect.
     * @returns {*} Returns the placeholder value.
     */
    function getHolder(func) {
      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
      return object.placeholder;
    }

    /**
     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
     * this function returns the custom method, otherwise it returns `baseIteratee`.
     * If arguments are provided, the chosen function is invoked with them and
     * its result is returned.
     *
     * @private
     * @param {*} [value] The value to convert to an iteratee.
     * @param {number} [arity] The arity of the created iteratee.
     * @returns {Function} Returns the chosen function or its result.
     */
    function getIteratee() {
      var result = lodash.iteratee || iteratee;
      result = result === iteratee ? baseIteratee : result;
      return arguments.length ? result(arguments[0], arguments[1]) : result;
    }

    /**
     * Gets the data for `map`.
     *
     * @private
     * @param {Object} map The map to query.
     * @param {string} key The reference key.
     * @returns {*} Returns the map data.
     */
    function getMapData(map, key) {
      var data = map.__data__;
      return isKeyable(key)
        ? data[typeof key == 'string' ? 'string' : 'hash']
        : data.map;
    }

    /**
     * Gets the property names, values, and compare flags of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the match data of `object`.
     */
    function getMatchData(object) {
      var result = keys(object),
          length = result.length;

      while (length--) {
        var key = result[length],
            value = object[key];

        result[length] = [key, value, isStrictComparable(value)];
      }
      return result;
    }

    /**
     * Gets the native function at `key` of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {string} key The key of the method to get.
     * @returns {*} Returns the function if it's native, else `undefined`.
     */
    function getNative(object, key) {
      var value = getValue(object, key);
      return baseIsNative(value) ? value : undefined;
    }

    /**
     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the raw `toStringTag`.
     */
    function getRawTag(value) {
      var isOwn = hasOwnProperty.call(value, symToStringTag),
          tag = value[symToStringTag];

      try {
        value[symToStringTag] = undefined;
        var unmasked = true;
      } catch (e) {}

      var result = nativeObjectToString.call(value);
      if (unmasked) {
        if (isOwn) {
          value[symToStringTag] = tag;
        } else {
          delete value[symToStringTag];
        }
      }
      return result;
    }

    /**
     * Creates an array of the own enumerable symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of symbols.
     */
    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
      if (object == null) {
        return [];
      }
      object = Object(object);
      return arrayFilter(nativeGetSymbols(object), function(symbol) {
        return propertyIsEnumerable.call(object, symbol);
      });
    };

    /**
     * Creates an array of the own and inherited enumerable symbols of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of symbols.
     */
    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
      var result = [];
      while (object) {
        arrayPush(result, getSymbols(object));
        object = getPrototype(object);
      }
      return result;
    };

    /**
     * Gets the `toStringTag` of `value`.
     *
     * @private
     * @param {*} value The value to query.
     * @returns {string} Returns the `toStringTag`.
     */
    var getTag = baseGetTag;

    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
        (Map && getTag(new Map) != mapTag) ||
        (Promise && getTag(Promise.resolve()) != promiseTag) ||
        (Set && getTag(new Set) != setTag) ||
        (WeakMap && getTag(new WeakMap) != weakMapTag)) {
      getTag = function(value) {
        var result = baseGetTag(value),
            Ctor = result == objectTag ? value.constructor : undefined,
            ctorString = Ctor ? toSource(Ctor) : '';

        if (ctorString) {
          switch (ctorString) {
            case dataViewCtorString: return dataViewTag;
            case mapCtorString: return mapTag;
            case promiseCtorString: return promiseTag;
            case setCtorString: return setTag;
            case weakMapCtorString: return weakMapTag;
          }
        }
        return result;
      };
    }

    /**
     * Gets the view, applying any `transforms` to the `start` and `end` positions.
     *
     * @private
     * @param {number} start The start of the view.
     * @param {number} end The end of the view.
     * @param {Array} transforms The transformations to apply to the view.
     * @returns {Object} Returns an object containing the `start` and `end`
     *  positions of the view.
     */
    function getView(start, end, transforms) {
      var index = -1,
          length = transforms.length;

      while (++index < length) {
        var data = transforms[index],
            size = data.size;

        switch (data.type) {
          case 'drop':      start += size; break;
          case 'dropRight': end -= size; break;
          case 'take':      end = nativeMin(end, start + size); break;
          case 'takeRight': start = nativeMax(start, end - size); break;
        }
      }
      return { 'start': start, 'end': end };
    }

    /**
     * Extracts wrapper details from the `source` body comment.
     *
     * @private
     * @param {string} source The source to inspect.
     * @returns {Array} Returns the wrapper details.
     */
    function getWrapDetails(source) {
      var match = source.match(reWrapDetails);
      return match ? match[1].split(reSplitDetails) : [];
    }

    /**
     * Checks if `path` exists on `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @param {Function} hasFunc The function to check properties.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     */
    function hasPath(object, path, hasFunc) {
      path = castPath(path, object);

      var index = -1,
          length = path.length,
          result = false;

      while (++index < length) {
        var key = toKey(path[index]);
        if (!(result = object != null && hasFunc(object, key))) {
          break;
        }
        object = object[key];
      }
      if (result || ++index != length) {
        return result;
      }
      length = object == null ? 0 : object.length;
      return !!length && isLength(length) && isIndex(key, length) &&
        (isArray(object) || isArguments(object));
    }

    /**
     * Initializes an array clone.
     *
     * @private
     * @param {Array} array The array to clone.
     * @returns {Array} Returns the initialized clone.
     */
    function initCloneArray(array) {
      var length = array.length,
          result = new array.constructor(length);

      // Add properties assigned by `RegExp#exec`.
      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
        result.index = array.index;
        result.input = array.input;
      }
      return result;
    }

    /**
     * Initializes an object clone.
     *
     * @private
     * @param {Object} object The object to clone.
     * @returns {Object} Returns the initialized clone.
     */
    function initCloneObject(object) {
      return (typeof object.constructor == 'function' && !isPrototype(object))
        ? baseCreate(getPrototype(object))
        : {};
    }

    /**
     * Initializes an object clone based on its `toStringTag`.
     *
     * **Note:** This function only supports cloning values with tags of
     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
     *
     * @private
     * @param {Object} object The object to clone.
     * @param {string} tag The `toStringTag` of the object to clone.
     * @param {boolean} [isDeep] Specify a deep clone.
     * @returns {Object} Returns the initialized clone.
     */
    function initCloneByTag(object, tag, isDeep) {
      var Ctor = object.constructor;
      switch (tag) {
        case arrayBufferTag:
          return cloneArrayBuffer(object);

        case boolTag:
        case dateTag:
          return new Ctor(+object);

        case dataViewTag:
          return cloneDataView(object, isDeep);

        case float32Tag: case float64Tag:
        case int8Tag: case int16Tag: case int32Tag:
        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
          return cloneTypedArray(object, isDeep);

        case mapTag:
          return new Ctor;

        case numberTag:
        case stringTag:
          return new Ctor(object);

        case regexpTag:
          return cloneRegExp(object);

        case setTag:
          return new Ctor;

        case symbolTag:
          return cloneSymbol(object);
      }
    }

    /**
     * Inserts wrapper `details` in a comment at the top of the `source` body.
     *
     * @private
     * @param {string} source The source to modify.
     * @returns {Array} details The details to insert.
     * @returns {string} Returns the modified source.
     */
    function insertWrapDetails(source, details) {
      var length = details.length;
      if (!length) {
        return source;
      }
      var lastIndex = length - 1;
      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
      details = details.join(length > 2 ? ', ' : ' ');
      return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
    }

    /**
     * Checks if `value` is a flattenable `arguments` object or array.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
     */
    function isFlattenable(value) {
      return isArray(value) || isArguments(value) ||
        !!(spreadableSymbol && value && value[spreadableSymbol]);
    }

    /**
     * Checks if `value` is a valid array-like index.
     *
     * @private
     * @param {*} value The value to check.
     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
     */
    function isIndex(value, length) {
      var type = typeof value;
      length = length == null ? MAX_SAFE_INTEGER : length;

      return !!length &&
        (type == 'number' ||
          (type != 'symbol' && reIsUint.test(value))) &&
            (value > -1 && value % 1 == 0 && value < length);
    }

    /**
     * Checks if the given arguments are from an iteratee call.
     *
     * @private
     * @param {*} value The potential iteratee value argument.
     * @param {*} index The potential iteratee index or key argument.
     * @param {*} object The potential iteratee object argument.
     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
     *  else `false`.
     */
    function isIterateeCall(value, index, object) {
      if (!isObject(object)) {
        return false;
      }
      var type = typeof index;
      if (type == 'number'
            ? (isArrayLike(object) && isIndex(index, object.length))
            : (type == 'string' && index in object)
          ) {
        return eq(object[index], value);
      }
      return false;
    }

    /**
     * Checks if `value` is a property name and not a property path.
     *
     * @private
     * @param {*} value The value to check.
     * @param {Object} [object] The object to query keys on.
     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
     */
    function isKey(value, object) {
      if (isArray(value)) {
        return false;
      }
      var type = typeof value;
      if (type == 'number' || type == 'symbol' || type == 'boolean' ||
          value == null || isSymbol(value)) {
        return true;
      }
      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
        (object != null && value in Object(object));
    }

    /**
     * Checks if `value` is suitable for use as unique object key.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
     */
    function isKeyable(value) {
      var type = typeof value;
      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
        ? (value !== '__proto__')
        : (value === null);
    }

    /**
     * Checks if `func` has a lazy counterpart.
     *
     * @private
     * @param {Function} func The function to check.
     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
     *  else `false`.
     */
    function isLaziable(func) {
      var funcName = getFuncName(func),
          other = lodash[funcName];

      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
        return false;
      }
      if (func === other) {
        return true;
      }
      var data = getData(other);
      return !!data && func === data[0];
    }

    /**
     * Checks if `func` has its source masked.
     *
     * @private
     * @param {Function} func The function to check.
     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
     */
    function isMasked(func) {
      return !!maskSrcKey && (maskSrcKey in func);
    }

    /**
     * Checks if `func` is capable of being masked.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
     */
    var isMaskable = coreJsData ? isFunction : stubFalse;

    /**
     * Checks if `value` is likely a prototype object.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
     */
    function isPrototype(value) {
      var Ctor = value && value.constructor,
          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

      return value === proto;
    }

    /**
     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` if suitable for strict
     *  equality comparisons, else `false`.
     */
    function isStrictComparable(value) {
      return value === value && !isObject(value);
    }

    /**
     * A specialized version of `matchesProperty` for source values suitable
     * for strict equality comparisons, i.e. `===`.
     *
     * @private
     * @param {string} key The key of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     */
    function matchesStrictComparable(key, srcValue) {
      return function(object) {
        if (object == null) {
          return false;
        }
        return object[key] === srcValue &&
          (srcValue !== undefined || (key in Object(object)));
      };
    }

    /**
     * A specialized version of `_.memoize` which clears the memoized function's
     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
     *
     * @private
     * @param {Function} func The function to have its output memoized.
     * @returns {Function} Returns the new memoized function.
     */
    function memoizeCapped(func) {
      var result = memoize(func, function(key) {
        if (cache.size === MAX_MEMOIZE_SIZE) {
          cache.clear();
        }
        return key;
      });

      var cache = result.cache;
      return result;
    }

    /**
     * Merges the function metadata of `source` into `data`.
     *
     * Merging metadata reduces the number of wrappers used to invoke a function.
     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
     * may be applied regardless of execution order. Methods like `_.ary` and
     * `_.rearg` modify function arguments, making the order in which they are
     * executed important, preventing the merging of metadata. However, we make
     * an exception for a safe combined case where curried functions have `_.ary`
     * and or `_.rearg` applied.
     *
     * @private
     * @param {Array} data The destination metadata.
     * @param {Array} source The source metadata.
     * @returns {Array} Returns `data`.
     */
    function mergeData(data, source) {
      var bitmask = data[1],
          srcBitmask = source[1],
          newBitmask = bitmask | srcBitmask,
          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);

      var isCombo =
        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));

      // Exit early if metadata can't be merged.
      if (!(isCommon || isCombo)) {
        return data;
      }
      // Use source `thisArg` if available.
      if (srcBitmask & WRAP_BIND_FLAG) {
        data[2] = source[2];
        // Set when currying a bound function.
        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
      }
      // Compose partial arguments.
      var value = source[3];
      if (value) {
        var partials = data[3];
        data[3] = partials ? composeArgs(partials, value, source[4]) : value;
        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
      }
      // Compose partial right arguments.
      value = source[5];
      if (value) {
        partials = data[5];
        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
      }
      // Use source `argPos` if available.
      value = source[7];
      if (value) {
        data[7] = value;
      }
      // Use source `ary` if it's smaller.
      if (srcBitmask & WRAP_ARY_FLAG) {
        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
      }
      // Use source `arity` if one is not provided.
      if (data[9] == null) {
        data[9] = source[9];
      }
      // Use source `func` and merge bitmasks.
      data[0] = source[0];
      data[1] = newBitmask;

      return data;
    }

    /**
     * This function is like
     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
     * except that it includes inherited enumerable properties.
     *
     * @private
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     */
    function nativeKeysIn(object) {
      var result = [];
      if (object != null) {
        for (var key in Object(object)) {
          result.push(key);
        }
      }
      return result;
    }

    /**
     * Converts `value` to a string using `Object.prototype.toString`.
     *
     * @private
     * @param {*} value The value to convert.
     * @returns {string} Returns the converted string.
     */
    function objectToString(value) {
      return nativeObjectToString.call(value);
    }

    /**
     * A specialized version of `baseRest` which transforms the rest array.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @param {Function} transform The rest array transform.
     * @returns {Function} Returns the new function.
     */
    function overRest(func, start, transform) {
      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
      return function() {
        var args = arguments,
            index = -1,
            length = nativeMax(args.length - start, 0),
            array = Array(length);

        while (++index < length) {
          array[index] = args[start + index];
        }
        index = -1;
        var otherArgs = Array(start + 1);
        while (++index < start) {
          otherArgs[index] = args[index];
        }
        otherArgs[start] = transform(array);
        return apply(func, this, otherArgs);
      };
    }

    /**
     * Gets the parent value at `path` of `object`.
     *
     * @private
     * @param {Object} object The object to query.
     * @param {Array} path The path to get the parent value of.
     * @returns {*} Returns the parent value.
     */
    function parent(object, path) {
      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
    }

    /**
     * Reorder `array` according to the specified indexes where the element at
     * the first index is assigned as the first element, the element at
     * the second index is assigned as the second element, and so on.
     *
     * @private
     * @param {Array} array The array to reorder.
     * @param {Array} indexes The arranged array indexes.
     * @returns {Array} Returns `array`.
     */
    function reorder(array, indexes) {
      var arrLength = array.length,
          length = nativeMin(indexes.length, arrLength),
          oldArray = copyArray(array);

      while (length--) {
        var index = indexes[length];
        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
      }
      return array;
    }

    /**
     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
     *
     * @private
     * @param {Object} object The object to query.
     * @param {string} key The key of the property to get.
     * @returns {*} Returns the property value.
     */
    function safeGet(object, key) {
      if (key === 'constructor' && typeof object[key] === 'function') {
        return;
      }

      if (key == '__proto__') {
        return;
      }

      return object[key];
    }

    /**
     * Sets metadata for `func`.
     *
     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
     * period of time, it will trip its breaker and transition to an identity
     * function to avoid garbage collection pauses in V8. See
     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
     * for more details.
     *
     * @private
     * @param {Function} func The function to associate metadata with.
     * @param {*} data The metadata.
     * @returns {Function} Returns `func`.
     */
    var setData = shortOut(baseSetData);

    /**
     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
     *
     * @private
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @returns {number|Object} Returns the timer id or timeout object.
     */
    var setTimeout = ctxSetTimeout || function(func, wait) {
      return root.setTimeout(func, wait);
    };

    /**
     * Sets the `toString` method of `func` to return `string`.
     *
     * @private
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
     */
    var setToString = shortOut(baseSetToString);

    /**
     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
     * with wrapper details in a comment at the top of the source body.
     *
     * @private
     * @param {Function} wrapper The function to modify.
     * @param {Function} reference The reference function.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @returns {Function} Returns `wrapper`.
     */
    function setWrapToString(wrapper, reference, bitmask) {
      var source = (reference + '');
      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
    }

    /**
     * Creates a function that'll short out and invoke `identity` instead
     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
     * milliseconds.
     *
     * @private
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new shortable function.
     */
    function shortOut(func) {
      var count = 0,
          lastCalled = 0;

      return function() {
        var stamp = nativeNow(),
            remaining = HOT_SPAN - (stamp - lastCalled);

        lastCalled = stamp;
        if (remaining > 0) {
          if (++count >= HOT_COUNT) {
            return arguments[0];
          }
        } else {
          count = 0;
        }
        return func.apply(undefined, arguments);
      };
    }

    /**
     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
     *
     * @private
     * @param {Array} array The array to shuffle.
     * @param {number} [size=array.length] The size of `array`.
     * @returns {Array} Returns `array`.
     */
    function shuffleSelf(array, size) {
      var index = -1,
          length = array.length,
          lastIndex = length - 1;

      size = size === undefined ? length : size;
      while (++index < size) {
        var rand = baseRandom(index, lastIndex),
            value = array[rand];

        array[rand] = array[index];
        array[index] = value;
      }
      array.length = size;
      return array;
    }

    /**
     * Converts `string` to a property path array.
     *
     * @private
     * @param {string} string The string to convert.
     * @returns {Array} Returns the property path array.
     */
    var stringToPath = memoizeCapped(function(string) {
      var result = [];
      if (string.charCodeAt(0) === 46 /* . */) {
        result.push('');
      }
      string.replace(rePropName, function(match, number, quote, subString) {
        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
      });
      return result;
    });

    /**
     * Converts `value` to a string key if it's not a string or symbol.
     *
     * @private
     * @param {*} value The value to inspect.
     * @returns {string|symbol} Returns the key.
     */
    function toKey(value) {
      if (typeof value == 'string' || isSymbol(value)) {
        return value;
      }
      var result = (value + '');
      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
    }

    /**
     * Converts `func` to its source code.
     *
     * @private
     * @param {Function} func The function to convert.
     * @returns {string} Returns the source code.
     */
    function toSource(func) {
      if (func != null) {
        try {
          return funcToString.call(func);
        } catch (e) {}
        try {
          return (func + '');
        } catch (e) {}
      }
      return '';
    }

    /**
     * Updates wrapper `details` based on `bitmask` flags.
     *
     * @private
     * @returns {Array} details The details to modify.
     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
     * @returns {Array} Returns `details`.
     */
    function updateWrapDetails(details, bitmask) {
      arrayEach(wrapFlags, function(pair) {
        var value = '_.' + pair[0];
        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
          details.push(value);
        }
      });
      return details.sort();
    }

    /**
     * Creates a clone of `wrapper`.
     *
     * @private
     * @param {Object} wrapper The wrapper to clone.
     * @returns {Object} Returns the cloned wrapper.
     */
    function wrapperClone(wrapper) {
      if (wrapper instanceof LazyWrapper) {
        return wrapper.clone();
      }
      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
      result.__actions__ = copyArray(wrapper.__actions__);
      result.__index__  = wrapper.__index__;
      result.__values__ = wrapper.__values__;
      return result;
    }

    /*------------------------------------------------------------------------*/

    /**
     * Creates an array of elements split into groups the length of `size`.
     * If `array` can't be split evenly, the final chunk will be the remaining
     * elements.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to process.
     * @param {number} [size=1] The length of each chunk
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the new array of chunks.
     * @example
     *
     * _.chunk(['a', 'b', 'c', 'd'], 2);
     * // => [['a', 'b'], ['c', 'd']]
     *
     * _.chunk(['a', 'b', 'c', 'd'], 3);
     * // => [['a', 'b', 'c'], ['d']]
     */
    function chunk(array, size, guard) {
      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
        size = 1;
      } else {
        size = nativeMax(toInteger(size), 0);
      }
      var length = array == null ? 0 : array.length;
      if (!length || size < 1) {
        return [];
      }
      var index = 0,
          resIndex = 0,
          result = Array(nativeCeil(length / size));

      while (index < length) {
        result[resIndex++] = baseSlice(array, index, (index += size));
      }
      return result;
    }

    /**
     * Creates an array with all falsey values removed. The values `false`, `null`,
     * `0`, `""`, `undefined`, and `NaN` are falsey.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to compact.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.compact([0, 1, false, 2, '', 3]);
     * // => [1, 2, 3]
     */
    function compact(array) {
      var index = -1,
          length = array == null ? 0 : array.length,
          resIndex = 0,
          result = [];

      while (++index < length) {
        var value = array[index];
        if (value) {
          result[resIndex++] = value;
        }
      }
      return result;
    }

    /**
     * Creates a new array concatenating `array` with any additional arrays
     * and/or values.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to concatenate.
     * @param {...*} [values] The values to concatenate.
     * @returns {Array} Returns the new concatenated array.
     * @example
     *
     * var array = [1];
     * var other = _.concat(array, 2, [3], [[4]]);
     *
     * console.log(other);
     * // => [1, 2, 3, [4]]
     *
     * console.log(array);
     * // => [1]
     */
    function concat() {
      var length = arguments.length;
      if (!length) {
        return [];
      }
      var args = Array(length - 1),
          array = arguments[0],
          index = length;

      while (index--) {
        args[index - 1] = arguments[index];
      }
      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
    }

    /**
     * Creates an array of `array` values not included in the other given arrays
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. The order and references of result values are
     * determined by the first array.
     *
     * **Note:** Unlike `_.pullAll`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.without, _.xor
     * @example
     *
     * _.difference([2, 1], [2, 3]);
     * // => [1]
     */
    var difference = baseRest(function(array, values) {
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
        : [];
    });

    /**
     * This method is like `_.difference` except that it accepts `iteratee` which
     * is invoked for each element of `array` and `values` to generate the criterion
     * by which they're compared. The order and references of result values are
     * determined by the first array. The iteratee is invoked with one argument:
     * (value).
     *
     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
     * // => [{ 'x': 2 }]
     */
    var differenceBy = baseRest(function(array, values) {
      var iteratee = last(values);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
        : [];
    });

    /**
     * This method is like `_.difference` except that it accepts `comparator`
     * which is invoked to compare elements of `array` to `values`. The order and
     * references of result values are determined by the first array. The comparator
     * is invoked with two arguments: (arrVal, othVal).
     *
     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...Array} [values] The values to exclude.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     *
     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
     * // => [{ 'x': 2, 'y': 1 }]
     */
    var differenceWith = baseRest(function(array, values) {
      var comparator = last(values);
      if (isArrayLikeObject(comparator)) {
        comparator = undefined;
      }
      return isArrayLikeObject(array)
        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
        : [];
    });

    /**
     * Creates a slice of `array` with `n` elements dropped from the beginning.
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to drop.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.drop([1, 2, 3]);
     * // => [2, 3]
     *
     * _.drop([1, 2, 3], 2);
     * // => [3]
     *
     * _.drop([1, 2, 3], 5);
     * // => []
     *
     * _.drop([1, 2, 3], 0);
     * // => [1, 2, 3]
     */
    function drop(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      return baseSlice(array, n < 0 ? 0 : n, length);
    }

    /**
     * Creates a slice of `array` with `n` elements dropped from the end.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to drop.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.dropRight([1, 2, 3]);
     * // => [1, 2]
     *
     * _.dropRight([1, 2, 3], 2);
     * // => [1]
     *
     * _.dropRight([1, 2, 3], 5);
     * // => []
     *
     * _.dropRight([1, 2, 3], 0);
     * // => [1, 2, 3]
     */
    function dropRight(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      n = length - n;
      return baseSlice(array, 0, n < 0 ? 0 : n);
    }

    /**
     * Creates a slice of `array` excluding elements dropped from the end.
     * Elements are dropped until `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.dropRightWhile(users, function(o) { return !o.active; });
     * // => objects for ['barney']
     *
     * // The `_.matches` iteratee shorthand.
     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
     * // => objects for ['barney', 'fred']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.dropRightWhile(users, ['active', false]);
     * // => objects for ['barney']
     *
     * // The `_.property` iteratee shorthand.
     * _.dropRightWhile(users, 'active');
     * // => objects for ['barney', 'fred', 'pebbles']
     */
    function dropRightWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), true, true)
        : [];
    }

    /**
     * Creates a slice of `array` excluding elements dropped from the beginning.
     * Elements are dropped until `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.dropWhile(users, function(o) { return !o.active; });
     * // => objects for ['pebbles']
     *
     * // The `_.matches` iteratee shorthand.
     * _.dropWhile(users, { 'user': 'barney', 'active': false });
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.dropWhile(users, ['active', false]);
     * // => objects for ['pebbles']
     *
     * // The `_.property` iteratee shorthand.
     * _.dropWhile(users, 'active');
     * // => objects for ['barney', 'fred', 'pebbles']
     */
    function dropWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), true)
        : [];
    }

    /**
     * Fills elements of `array` with `value` from `start` up to, but not
     * including, `end`.
     *
     * **Note:** This method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Array
     * @param {Array} array The array to fill.
     * @param {*} value The value to fill `array` with.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _.fill(array, 'a');
     * console.log(array);
     * // => ['a', 'a', 'a']
     *
     * _.fill(Array(3), 2);
     * // => [2, 2, 2]
     *
     * _.fill([4, 6, 8, 10], '*', 1, 3);
     * // => [4, '*', '*', 10]
     */
    function fill(array, value, start, end) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
        start = 0;
        end = length;
      }
      return baseFill(array, value, start, end);
    }

    /**
     * This method is like `_.find` except that it returns the index of the first
     * element `predicate` returns truthy for instead of the element itself.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {number} Returns the index of the found element, else `-1`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.findIndex(users, function(o) { return o.user == 'barney'; });
     * // => 0
     *
     * // The `_.matches` iteratee shorthand.
     * _.findIndex(users, { 'user': 'fred', 'active': false });
     * // => 1
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findIndex(users, ['active', false]);
     * // => 0
     *
     * // The `_.property` iteratee shorthand.
     * _.findIndex(users, 'active');
     * // => 2
     */
    function findIndex(array, predicate, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = fromIndex == null ? 0 : toInteger(fromIndex);
      if (index < 0) {
        index = nativeMax(length + index, 0);
      }
      return baseFindIndex(array, getIteratee(predicate, 3), index);
    }

    /**
     * This method is like `_.findIndex` except that it iterates over elements
     * of `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=array.length-1] The index to search from.
     * @returns {number} Returns the index of the found element, else `-1`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
     * // => 2
     *
     * // The `_.matches` iteratee shorthand.
     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
     * // => 0
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findLastIndex(users, ['active', false]);
     * // => 2
     *
     * // The `_.property` iteratee shorthand.
     * _.findLastIndex(users, 'active');
     * // => 0
     */
    function findLastIndex(array, predicate, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = length - 1;
      if (fromIndex !== undefined) {
        index = toInteger(fromIndex);
        index = fromIndex < 0
          ? nativeMax(length + index, 0)
          : nativeMin(index, length - 1);
      }
      return baseFindIndex(array, getIteratee(predicate, 3), index, true);
    }

    /**
     * Flattens `array` a single level deep.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * _.flatten([1, [2, [3, [4]], 5]]);
     * // => [1, 2, [3, [4]], 5]
     */
    function flatten(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseFlatten(array, 1) : [];
    }

    /**
     * Recursively flattens `array`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * _.flattenDeep([1, [2, [3, [4]], 5]]);
     * // => [1, 2, 3, 4, 5]
     */
    function flattenDeep(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseFlatten(array, INFINITY) : [];
    }

    /**
     * Recursively flatten `array` up to `depth` times.
     *
     * @static
     * @memberOf _
     * @since 4.4.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @param {number} [depth=1] The maximum recursion depth.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * var array = [1, [2, [3, [4]], 5]];
     *
     * _.flattenDepth(array, 1);
     * // => [1, 2, [3, [4]], 5]
     *
     * _.flattenDepth(array, 2);
     * // => [1, 2, 3, [4], 5]
     */
    function flattenDepth(array, depth) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      depth = depth === undefined ? 1 : toInteger(depth);
      return baseFlatten(array, depth);
    }

    /**
     * The inverse of `_.toPairs`; this method returns an object composed
     * from key-value `pairs`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} pairs The key-value pairs.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.fromPairs([['a', 1], ['b', 2]]);
     * // => { 'a': 1, 'b': 2 }
     */
    function fromPairs(pairs) {
      var index = -1,
          length = pairs == null ? 0 : pairs.length,
          result = {};

      while (++index < length) {
        var pair = pairs[index];
        result[pair[0]] = pair[1];
      }
      return result;
    }

    /**
     * Gets the first element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @alias first
     * @category Array
     * @param {Array} array The array to query.
     * @returns {*} Returns the first element of `array`.
     * @example
     *
     * _.head([1, 2, 3]);
     * // => 1
     *
     * _.head([]);
     * // => undefined
     */
    function head(array) {
      return (array && array.length) ? array[0] : undefined;
    }

    /**
     * Gets the index at which the first occurrence of `value` is found in `array`
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. If `fromIndex` is negative, it's used as the
     * offset from the end of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.indexOf([1, 2, 1, 2], 2);
     * // => 1
     *
     * // Search from the `fromIndex`.
     * _.indexOf([1, 2, 1, 2], 2, 2);
     * // => 3
     */
    function indexOf(array, value, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = fromIndex == null ? 0 : toInteger(fromIndex);
      if (index < 0) {
        index = nativeMax(length + index, 0);
      }
      return baseIndexOf(array, value, index);
    }

    /**
     * Gets all but the last element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.initial([1, 2, 3]);
     * // => [1, 2]
     */
    function initial(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseSlice(array, 0, -1) : [];
    }

    /**
     * Creates an array of unique values that are included in all given arrays
     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons. The order and references of result values are
     * determined by the first array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * _.intersection([2, 1], [2, 3]);
     * // => [2]
     */
    var intersection = baseRest(function(arrays) {
      var mapped = arrayMap(arrays, castArrayLikeObject);
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped)
        : [];
    });

    /**
     * This method is like `_.intersection` except that it accepts `iteratee`
     * which is invoked for each element of each `arrays` to generate the criterion
     * by which they're compared. The order and references of result values are
     * determined by the first array. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [2.1]
     *
     * // The `_.property` iteratee shorthand.
     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }]
     */
    var intersectionBy = baseRest(function(arrays) {
      var iteratee = last(arrays),
          mapped = arrayMap(arrays, castArrayLikeObject);

      if (iteratee === last(mapped)) {
        iteratee = undefined;
      } else {
        mapped.pop();
      }
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped, getIteratee(iteratee, 2))
        : [];
    });

    /**
     * This method is like `_.intersection` except that it accepts `comparator`
     * which is invoked to compare elements of `arrays`. The order and references
     * of result values are determined by the first array. The comparator is
     * invoked with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of intersecting values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.intersectionWith(objects, others, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }]
     */
    var intersectionWith = baseRest(function(arrays) {
      var comparator = last(arrays),
          mapped = arrayMap(arrays, castArrayLikeObject);

      comparator = typeof comparator == 'function' ? comparator : undefined;
      if (comparator) {
        mapped.pop();
      }
      return (mapped.length && mapped[0] === arrays[0])
        ? baseIntersection(mapped, undefined, comparator)
        : [];
    });

    /**
     * Converts all elements in `array` into a string separated by `separator`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to convert.
     * @param {string} [separator=','] The element separator.
     * @returns {string} Returns the joined string.
     * @example
     *
     * _.join(['a', 'b', 'c'], '~');
     * // => 'a~b~c'
     */
    function join(array, separator) {
      return array == null ? '' : nativeJoin.call(array, separator);
    }

    /**
     * Gets the last element of `array`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {*} Returns the last element of `array`.
     * @example
     *
     * _.last([1, 2, 3]);
     * // => 3
     */
    function last(array) {
      var length = array == null ? 0 : array.length;
      return length ? array[length - 1] : undefined;
    }

    /**
     * This method is like `_.indexOf` except that it iterates over elements of
     * `array` from right to left.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=array.length-1] The index to search from.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.lastIndexOf([1, 2, 1, 2], 2);
     * // => 3
     *
     * // Search from the `fromIndex`.
     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
     * // => 1
     */
    function lastIndexOf(array, value, fromIndex) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return -1;
      }
      var index = length;
      if (fromIndex !== undefined) {
        index = toInteger(fromIndex);
        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
      }
      return value === value
        ? strictLastIndexOf(array, value, index)
        : baseFindIndex(array, baseIsNaN, index, true);
    }

    /**
     * Gets the element at index `n` of `array`. If `n` is negative, the nth
     * element from the end is returned.
     *
     * @static
     * @memberOf _
     * @since 4.11.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=0] The index of the element to return.
     * @returns {*} Returns the nth element of `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'd'];
     *
     * _.nth(array, 1);
     * // => 'b'
     *
     * _.nth(array, -2);
     * // => 'c';
     */
    function nth(array, n) {
      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
    }

    /**
     * Removes all given values from `array` using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
     * to remove elements from an array by predicate.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {...*} [values] The values to remove.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
     *
     * _.pull(array, 'a', 'c');
     * console.log(array);
     * // => ['b', 'b']
     */
    var pull = baseRest(pullAll);

    /**
     * This method is like `_.pull` except that it accepts an array of values to remove.
     *
     * **Note:** Unlike `_.difference`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
     *
     * _.pullAll(array, ['a', 'c']);
     * console.log(array);
     * // => ['b', 'b']
     */
    function pullAll(array, values) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values)
        : array;
    }

    /**
     * This method is like `_.pullAll` except that it accepts `iteratee` which is
     * invoked for each element of `array` and `values` to generate the criterion
     * by which they're compared. The iteratee is invoked with one argument: (value).
     *
     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
     *
     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
     * console.log(array);
     * // => [{ 'x': 2 }]
     */
    function pullAllBy(array, values, iteratee) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values, getIteratee(iteratee, 2))
        : array;
    }

    /**
     * This method is like `_.pullAll` except that it accepts `comparator` which
     * is invoked to compare elements of `array` to `values`. The comparator is
     * invoked with two arguments: (arrVal, othVal).
     *
     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Array} values The values to remove.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
     *
     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
     * console.log(array);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
     */
    function pullAllWith(array, values, comparator) {
      return (array && array.length && values && values.length)
        ? basePullAll(array, values, undefined, comparator)
        : array;
    }

    /**
     * Removes elements from `array` corresponding to `indexes` and returns an
     * array of removed elements.
     *
     * **Note:** Unlike `_.at`, this method mutates `array`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
     * @returns {Array} Returns the new array of removed elements.
     * @example
     *
     * var array = ['a', 'b', 'c', 'd'];
     * var pulled = _.pullAt(array, [1, 3]);
     *
     * console.log(array);
     * // => ['a', 'c']
     *
     * console.log(pulled);
     * // => ['b', 'd']
     */
    var pullAt = flatRest(function(array, indexes) {
      var length = array == null ? 0 : array.length,
          result = baseAt(array, indexes);

      basePullAt(array, arrayMap(indexes, function(index) {
        return isIndex(index, length) ? +index : index;
      }).sort(compareAscending));

      return result;
    });

    /**
     * Removes all elements from `array` that `predicate` returns truthy for
     * and returns an array of the removed elements. The predicate is invoked
     * with three arguments: (value, index, array).
     *
     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
     * to pull elements from an array by value.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new array of removed elements.
     * @example
     *
     * var array = [1, 2, 3, 4];
     * var evens = _.remove(array, function(n) {
     *   return n % 2 == 0;
     * });
     *
     * console.log(array);
     * // => [1, 3]
     *
     * console.log(evens);
     * // => [2, 4]
     */
    function remove(array, predicate) {
      var result = [];
      if (!(array && array.length)) {
        return result;
      }
      var index = -1,
          indexes = [],
          length = array.length;

      predicate = getIteratee(predicate, 3);
      while (++index < length) {
        var value = array[index];
        if (predicate(value, index, array)) {
          result.push(value);
          indexes.push(index);
        }
      }
      basePullAt(array, indexes);
      return result;
    }

    /**
     * Reverses `array` so that the first element becomes the last, the second
     * element becomes the second to last, and so on.
     *
     * **Note:** This method mutates `array` and is based on
     * [`Array#reverse`](https://mdn.io/Array/reverse).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to modify.
     * @returns {Array} Returns `array`.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _.reverse(array);
     * // => [3, 2, 1]
     *
     * console.log(array);
     * // => [3, 2, 1]
     */
    function reverse(array) {
      return array == null ? array : nativeReverse.call(array);
    }

    /**
     * Creates a slice of `array` from `start` up to, but not including, `end`.
     *
     * **Note:** This method is used instead of
     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
     * returned.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to slice.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the slice of `array`.
     */
    function slice(array, start, end) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
        start = 0;
        end = length;
      }
      else {
        start = start == null ? 0 : toInteger(start);
        end = end === undefined ? length : toInteger(end);
      }
      return baseSlice(array, start, end);
    }

    /**
     * Uses a binary search to determine the lowest index at which `value`
     * should be inserted into `array` in order to maintain its sort order.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * _.sortedIndex([30, 50], 40);
     * // => 1
     */
    function sortedIndex(array, value) {
      return baseSortedIndex(array, value);
    }

    /**
     * This method is like `_.sortedIndex` except that it accepts `iteratee`
     * which is invoked for `value` and each element of `array` to compute their
     * sort ranking. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * var objects = [{ 'x': 4 }, { 'x': 5 }];
     *
     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
     * // => 0
     *
     * // The `_.property` iteratee shorthand.
     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
     * // => 0
     */
    function sortedIndexBy(array, value, iteratee) {
      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
    }

    /**
     * This method is like `_.indexOf` except that it performs a binary
     * search on a sorted `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
     * // => 1
     */
    function sortedIndexOf(array, value) {
      var length = array == null ? 0 : array.length;
      if (length) {
        var index = baseSortedIndex(array, value);
        if (index < length && eq(array[index], value)) {
          return index;
        }
      }
      return -1;
    }

    /**
     * This method is like `_.sortedIndex` except that it returns the highest
     * index at which `value` should be inserted into `array` in order to
     * maintain its sort order.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
     * // => 4
     */
    function sortedLastIndex(array, value) {
      return baseSortedIndex(array, value, true);
    }

    /**
     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
     * which is invoked for `value` and each element of `array` to compute their
     * sort ranking. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The sorted array to inspect.
     * @param {*} value The value to evaluate.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the index at which `value` should be inserted
     *  into `array`.
     * @example
     *
     * var objects = [{ 'x': 4 }, { 'x': 5 }];
     *
     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
     * // => 1
     *
     * // The `_.property` iteratee shorthand.
     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
     * // => 1
     */
    function sortedLastIndexBy(array, value, iteratee) {
      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
    }

    /**
     * This method is like `_.lastIndexOf` except that it performs a binary
     * search on a sorted `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {*} value The value to search for.
     * @returns {number} Returns the index of the matched value, else `-1`.
     * @example
     *
     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
     * // => 3
     */
    function sortedLastIndexOf(array, value) {
      var length = array == null ? 0 : array.length;
      if (length) {
        var index = baseSortedIndex(array, value, true) - 1;
        if (eq(array[index], value)) {
          return index;
        }
      }
      return -1;
    }

    /**
     * This method is like `_.uniq` except that it's designed and optimized
     * for sorted arrays.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.sortedUniq([1, 1, 2]);
     * // => [1, 2]
     */
    function sortedUniq(array) {
      return (array && array.length)
        ? baseSortedUniq(array)
        : [];
    }

    /**
     * This method is like `_.uniqBy` except that it's designed and optimized
     * for sorted arrays.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
     * // => [1.1, 2.3]
     */
    function sortedUniqBy(array, iteratee) {
      return (array && array.length)
        ? baseSortedUniq(array, getIteratee(iteratee, 2))
        : [];
    }

    /**
     * Gets all but the first element of `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.tail([1, 2, 3]);
     * // => [2, 3]
     */
    function tail(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseSlice(array, 1, length) : [];
    }

    /**
     * Creates a slice of `array` with `n` elements taken from the beginning.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to take.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.take([1, 2, 3]);
     * // => [1]
     *
     * _.take([1, 2, 3], 2);
     * // => [1, 2]
     *
     * _.take([1, 2, 3], 5);
     * // => [1, 2, 3]
     *
     * _.take([1, 2, 3], 0);
     * // => []
     */
    function take(array, n, guard) {
      if (!(array && array.length)) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      return baseSlice(array, 0, n < 0 ? 0 : n);
    }

    /**
     * Creates a slice of `array` with `n` elements taken from the end.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {number} [n=1] The number of elements to take.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * _.takeRight([1, 2, 3]);
     * // => [3]
     *
     * _.takeRight([1, 2, 3], 2);
     * // => [2, 3]
     *
     * _.takeRight([1, 2, 3], 5);
     * // => [1, 2, 3]
     *
     * _.takeRight([1, 2, 3], 0);
     * // => []
     */
    function takeRight(array, n, guard) {
      var length = array == null ? 0 : array.length;
      if (!length) {
        return [];
      }
      n = (guard || n === undefined) ? 1 : toInteger(n);
      n = length - n;
      return baseSlice(array, n < 0 ? 0 : n, length);
    }

    /**
     * Creates a slice of `array` with elements taken from the end. Elements are
     * taken until `predicate` returns falsey. The predicate is invoked with
     * three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': true },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': false }
     * ];
     *
     * _.takeRightWhile(users, function(o) { return !o.active; });
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.matches` iteratee shorthand.
     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
     * // => objects for ['pebbles']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.takeRightWhile(users, ['active', false]);
     * // => objects for ['fred', 'pebbles']
     *
     * // The `_.property` iteratee shorthand.
     * _.takeRightWhile(users, 'active');
     * // => []
     */
    function takeRightWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3), false, true)
        : [];
    }

    /**
     * Creates a slice of `array` with elements taken from the beginning. Elements
     * are taken until `predicate` returns falsey. The predicate is invoked with
     * three arguments: (value, index, array).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Array
     * @param {Array} array The array to query.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the slice of `array`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'active': false },
     *   { 'user': 'fred',    'active': false },
     *   { 'user': 'pebbles', 'active': true }
     * ];
     *
     * _.takeWhile(users, function(o) { return !o.active; });
     * // => objects for ['barney', 'fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.takeWhile(users, { 'user': 'barney', 'active': false });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.takeWhile(users, ['active', false]);
     * // => objects for ['barney', 'fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.takeWhile(users, 'active');
     * // => []
     */
    function takeWhile(array, predicate) {
      return (array && array.length)
        ? baseWhile(array, getIteratee(predicate, 3))
        : [];
    }

    /**
     * Creates an array of unique values, in order, from all given arrays using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * _.union([2], [1, 2]);
     * // => [2, 1]
     */
    var union = baseRest(function(arrays) {
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
    });

    /**
     * This method is like `_.union` except that it accepts `iteratee` which is
     * invoked for each element of each `arrays` to generate the criterion by
     * which uniqueness is computed. Result values are chosen from the first
     * array in which the value occurs. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
     * // => [2.1, 1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }, { 'x': 2 }]
     */
    var unionBy = baseRest(function(arrays) {
      var iteratee = last(arrays);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
    });

    /**
     * This method is like `_.union` except that it accepts `comparator` which
     * is invoked to compare elements of `arrays`. Result values are chosen from
     * the first array in which the value occurs. The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of combined values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.unionWith(objects, others, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
     */
    var unionWith = baseRest(function(arrays) {
      var comparator = last(arrays);
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
    });

    /**
     * Creates a duplicate-free version of an array, using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons, in which only the first occurrence of each element
     * is kept. The order of result values is determined by the order they occur
     * in the array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.uniq([2, 1, 2]);
     * // => [2, 1]
     */
    function uniq(array) {
      return (array && array.length) ? baseUniq(array) : [];
    }

    /**
     * This method is like `_.uniq` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * uniqueness is computed. The order of result values is determined by the
     * order they occur in the array. The iteratee is invoked with one argument:
     * (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
     * // => [2.1, 1.2]
     *
     * // The `_.property` iteratee shorthand.
     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 1 }, { 'x': 2 }]
     */
    function uniqBy(array, iteratee) {
      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
    }

    /**
     * This method is like `_.uniq` except that it accepts `comparator` which
     * is invoked to compare elements of `array`. The order of result values is
     * determined by the order they occur in the array.The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new duplicate free array.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.uniqWith(objects, _.isEqual);
     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
     */
    function uniqWith(array, comparator) {
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
    }

    /**
     * This method is like `_.zip` except that it accepts an array of grouped
     * elements and creates an array regrouping the elements to their pre-zip
     * configuration.
     *
     * @static
     * @memberOf _
     * @since 1.2.0
     * @category Array
     * @param {Array} array The array of grouped elements to process.
     * @returns {Array} Returns the new array of regrouped elements.
     * @example
     *
     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
     * // => [['a', 1, true], ['b', 2, false]]
     *
     * _.unzip(zipped);
     * // => [['a', 'b'], [1, 2], [true, false]]
     */
    function unzip(array) {
      if (!(array && array.length)) {
        return [];
      }
      var length = 0;
      array = arrayFilter(array, function(group) {
        if (isArrayLikeObject(group)) {
          length = nativeMax(group.length, length);
          return true;
        }
      });
      return baseTimes(length, function(index) {
        return arrayMap(array, baseProperty(index));
      });
    }

    /**
     * This method is like `_.unzip` except that it accepts `iteratee` to specify
     * how regrouped values should be combined. The iteratee is invoked with the
     * elements of each group: (...group).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Array
     * @param {Array} array The array of grouped elements to process.
     * @param {Function} [iteratee=_.identity] The function to combine
     *  regrouped values.
     * @returns {Array} Returns the new array of regrouped elements.
     * @example
     *
     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
     * // => [[1, 10, 100], [2, 20, 200]]
     *
     * _.unzipWith(zipped, _.add);
     * // => [3, 30, 300]
     */
    function unzipWith(array, iteratee) {
      if (!(array && array.length)) {
        return [];
      }
      var result = unzip(array);
      if (iteratee == null) {
        return result;
      }
      return arrayMap(result, function(group) {
        return apply(iteratee, undefined, group);
      });
    }

    /**
     * Creates an array excluding all given values using
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * for equality comparisons.
     *
     * **Note:** Unlike `_.pull`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to inspect.
     * @param {...*} [values] The values to exclude.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.difference, _.xor
     * @example
     *
     * _.without([2, 1, 2, 3], 1, 2);
     * // => [3]
     */
    var without = baseRest(function(array, values) {
      return isArrayLikeObject(array)
        ? baseDifference(array, values)
        : [];
    });

    /**
     * Creates an array of unique values that is the
     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
     * of the given arrays. The order of result values is determined by the order
     * they occur in the arrays.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @returns {Array} Returns the new array of filtered values.
     * @see _.difference, _.without
     * @example
     *
     * _.xor([2, 1], [2, 3]);
     * // => [1, 3]
     */
    var xor = baseRest(function(arrays) {
      return baseXor(arrayFilter(arrays, isArrayLikeObject));
    });

    /**
     * This method is like `_.xor` except that it accepts `iteratee` which is
     * invoked for each element of each `arrays` to generate the criterion by
     * which by which they're compared. The order of result values is determined
     * by the order they occur in the arrays. The iteratee is invoked with one
     * argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
     * // => [1.2, 3.4]
     *
     * // The `_.property` iteratee shorthand.
     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
     * // => [{ 'x': 2 }]
     */
    var xorBy = baseRest(function(arrays) {
      var iteratee = last(arrays);
      if (isArrayLikeObject(iteratee)) {
        iteratee = undefined;
      }
      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
    });

    /**
     * This method is like `_.xor` except that it accepts `comparator` which is
     * invoked to compare elements of `arrays`. The order of result values is
     * determined by the order they occur in the arrays. The comparator is invoked
     * with two arguments: (arrVal, othVal).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Array
     * @param {...Array} [arrays] The arrays to inspect.
     * @param {Function} [comparator] The comparator invoked per element.
     * @returns {Array} Returns the new array of filtered values.
     * @example
     *
     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
     *
     * _.xorWith(objects, others, _.isEqual);
     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
     */
    var xorWith = baseRest(function(arrays) {
      var comparator = last(arrays);
      comparator = typeof comparator == 'function' ? comparator : undefined;
      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
    });

    /**
     * Creates an array of grouped elements, the first of which contains the
     * first elements of the given arrays, the second of which contains the
     * second elements of the given arrays, and so on.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {...Array} [arrays] The arrays to process.
     * @returns {Array} Returns the new array of grouped elements.
     * @example
     *
     * _.zip(['a', 'b'], [1, 2], [true, false]);
     * // => [['a', 1, true], ['b', 2, false]]
     */
    var zip = baseRest(unzip);

    /**
     * This method is like `_.fromPairs` except that it accepts two arrays,
     * one of property identifiers and one of corresponding values.
     *
     * @static
     * @memberOf _
     * @since 0.4.0
     * @category Array
     * @param {Array} [props=[]] The property identifiers.
     * @param {Array} [values=[]] The property values.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.zipObject(['a', 'b'], [1, 2]);
     * // => { 'a': 1, 'b': 2 }
     */
    function zipObject(props, values) {
      return baseZipObject(props || [], values || [], assignValue);
    }

    /**
     * This method is like `_.zipObject` except that it supports property paths.
     *
     * @static
     * @memberOf _
     * @since 4.1.0
     * @category Array
     * @param {Array} [props=[]] The property identifiers.
     * @param {Array} [values=[]] The property values.
     * @returns {Object} Returns the new object.
     * @example
     *
     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
     */
    function zipObjectDeep(props, values) {
      return baseZipObject(props || [], values || [], baseSet);
    }

    /**
     * This method is like `_.zip` except that it accepts `iteratee` to specify
     * how grouped values should be combined. The iteratee is invoked with the
     * elements of each group: (...group).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Array
     * @param {...Array} [arrays] The arrays to process.
     * @param {Function} [iteratee=_.identity] The function to combine
     *  grouped values.
     * @returns {Array} Returns the new array of grouped elements.
     * @example
     *
     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
     *   return a + b + c;
     * });
     * // => [111, 222]
     */
    var zipWith = baseRest(function(arrays) {
      var length = arrays.length,
          iteratee = length > 1 ? arrays[length - 1] : undefined;

      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
      return unzipWith(arrays, iteratee);
    });

    /*------------------------------------------------------------------------*/

    /**
     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
     * chain sequences enabled. The result of such sequences must be unwrapped
     * with `_#value`.
     *
     * @static
     * @memberOf _
     * @since 1.3.0
     * @category Seq
     * @param {*} value The value to wrap.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36 },
     *   { 'user': 'fred',    'age': 40 },
     *   { 'user': 'pebbles', 'age': 1 }
     * ];
     *
     * var youngest = _
     *   .chain(users)
     *   .sortBy('age')
     *   .map(function(o) {
     *     return o.user + ' is ' + o.age;
     *   })
     *   .head()
     *   .value();
     * // => 'pebbles is 1'
     */
    function chain(value) {
      var result = lodash(value);
      result.__chain__ = true;
      return result;
    }

    /**
     * This method invokes `interceptor` and returns `value`. The interceptor
     * is invoked with one argument; (value). The purpose of this method is to
     * "tap into" a method chain sequence in order to modify intermediate results.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @param {*} value The value to provide to `interceptor`.
     * @param {Function} interceptor The function to invoke.
     * @returns {*} Returns `value`.
     * @example
     *
     * _([1, 2, 3])
     *  .tap(function(array) {
     *    // Mutate input array.
     *    array.pop();
     *  })
     *  .reverse()
     *  .value();
     * // => [2, 1]
     */
    function tap(value, interceptor) {
      interceptor(value);
      return value;
    }

    /**
     * This method is like `_.tap` except that it returns the result of `interceptor`.
     * The purpose of this method is to "pass thru" values replacing intermediate
     * results in a method chain sequence.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Seq
     * @param {*} value The value to provide to `interceptor`.
     * @param {Function} interceptor The function to invoke.
     * @returns {*} Returns the result of `interceptor`.
     * @example
     *
     * _('  abc  ')
     *  .chain()
     *  .trim()
     *  .thru(function(value) {
     *    return [value];
     *  })
     *  .value();
     * // => ['abc']
     */
    function thru(value, interceptor) {
      return interceptor(value);
    }

    /**
     * This method is the wrapper version of `_.at`.
     *
     * @name at
     * @memberOf _
     * @since 1.0.0
     * @category Seq
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
     *
     * _(object).at(['a[0].b.c', 'a[1]']).value();
     * // => [3, 4]
     */
    var wrapperAt = flatRest(function(paths) {
      var length = paths.length,
          start = length ? paths[0] : 0,
          value = this.__wrapped__,
          interceptor = function(object) { return baseAt(object, paths); };

      if (length > 1 || this.__actions__.length ||
          !(value instanceof LazyWrapper) || !isIndex(start)) {
        return this.thru(interceptor);
      }
      value = value.slice(start, +start + (length ? 1 : 0));
      value.__actions__.push({
        'func': thru,
        'args': [interceptor],
        'thisArg': undefined
      });
      return new LodashWrapper(value, this.__chain__).thru(function(array) {
        if (length && !array.length) {
          array.push(undefined);
        }
        return array;
      });
    });

    /**
     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
     *
     * @name chain
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36 },
     *   { 'user': 'fred',   'age': 40 }
     * ];
     *
     * // A sequence without explicit chaining.
     * _(users).head();
     * // => { 'user': 'barney', 'age': 36 }
     *
     * // A sequence with explicit chaining.
     * _(users)
     *   .chain()
     *   .head()
     *   .pick('user')
     *   .value();
     * // => { 'user': 'barney' }
     */
    function wrapperChain() {
      return chain(this);
    }

    /**
     * Executes the chain sequence and returns the wrapped result.
     *
     * @name commit
     * @memberOf _
     * @since 3.2.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var array = [1, 2];
     * var wrapped = _(array).push(3);
     *
     * console.log(array);
     * // => [1, 2]
     *
     * wrapped = wrapped.commit();
     * console.log(array);
     * // => [1, 2, 3]
     *
     * wrapped.last();
     * // => 3
     *
     * console.log(array);
     * // => [1, 2, 3]
     */
    function wrapperCommit() {
      return new LodashWrapper(this.value(), this.__chain__);
    }

    /**
     * Gets the next value on a wrapped object following the
     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
     *
     * @name next
     * @memberOf _
     * @since 4.0.0
     * @category Seq
     * @returns {Object} Returns the next iterator value.
     * @example
     *
     * var wrapped = _([1, 2]);
     *
     * wrapped.next();
     * // => { 'done': false, 'value': 1 }
     *
     * wrapped.next();
     * // => { 'done': false, 'value': 2 }
     *
     * wrapped.next();
     * // => { 'done': true, 'value': undefined }
     */
    function wrapperNext() {
      if (this.__values__ === undefined) {
        this.__values__ = toArray(this.value());
      }
      var done = this.__index__ >= this.__values__.length,
          value = done ? undefined : this.__values__[this.__index__++];

      return { 'done': done, 'value': value };
    }

    /**
     * Enables the wrapper to be iterable.
     *
     * @name Symbol.iterator
     * @memberOf _
     * @since 4.0.0
     * @category Seq
     * @returns {Object} Returns the wrapper object.
     * @example
     *
     * var wrapped = _([1, 2]);
     *
     * wrapped[Symbol.iterator]() === wrapped;
     * // => true
     *
     * Array.from(wrapped);
     * // => [1, 2]
     */
    function wrapperToIterator() {
      return this;
    }

    /**
     * Creates a clone of the chain sequence planting `value` as the wrapped value.
     *
     * @name plant
     * @memberOf _
     * @since 3.2.0
     * @category Seq
     * @param {*} value The value to plant.
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var wrapped = _([1, 2]).map(square);
     * var other = wrapped.plant([3, 4]);
     *
     * other.value();
     * // => [9, 16]
     *
     * wrapped.value();
     * // => [1, 4]
     */
    function wrapperPlant(value) {
      var result,
          parent = this;

      while (parent instanceof baseLodash) {
        var clone = wrapperClone(parent);
        clone.__index__ = 0;
        clone.__values__ = undefined;
        if (result) {
          previous.__wrapped__ = clone;
        } else {
          result = clone;
        }
        var previous = clone;
        parent = parent.__wrapped__;
      }
      previous.__wrapped__ = value;
      return result;
    }

    /**
     * This method is the wrapper version of `_.reverse`.
     *
     * **Note:** This method mutates the wrapped array.
     *
     * @name reverse
     * @memberOf _
     * @since 0.1.0
     * @category Seq
     * @returns {Object} Returns the new `lodash` wrapper instance.
     * @example
     *
     * var array = [1, 2, 3];
     *
     * _(array).reverse().value()
     * // => [3, 2, 1]
     *
     * console.log(array);
     * // => [3, 2, 1]
     */
    function wrapperReverse() {
      var value = this.__wrapped__;
      if (value instanceof LazyWrapper) {
        var wrapped = value;
        if (this.__actions__.length) {
          wrapped = new LazyWrapper(this);
        }
        wrapped = wrapped.reverse();
        wrapped.__actions__.push({
          'func': thru,
          'args': [reverse],
          'thisArg': undefined
        });
        return new LodashWrapper(wrapped, this.__chain__);
      }
      return this.thru(reverse);
    }

    /**
     * Executes the chain sequence to resolve the unwrapped value.
     *
     * @name value
     * @memberOf _
     * @since 0.1.0
     * @alias toJSON, valueOf
     * @category Seq
     * @returns {*} Returns the resolved unwrapped value.
     * @example
     *
     * _([1, 2, 3]).value();
     * // => [1, 2, 3]
     */
    function wrapperValue() {
      return baseWrapperValue(this.__wrapped__, this.__actions__);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The corresponding value of
     * each key is the number of times the key was returned by `iteratee`. The
     * iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * _.countBy([6.1, 4.2, 6.3], Math.floor);
     * // => { '4': 1, '6': 2 }
     *
     * // The `_.property` iteratee shorthand.
     * _.countBy(['one', 'two', 'three'], 'length');
     * // => { '3': 2, '5': 1 }
     */
    var countBy = createAggregator(function(result, value, key) {
      if (hasOwnProperty.call(result, key)) {
        ++result[key];
      } else {
        baseAssignValue(result, key, 1);
      }
    });

    /**
     * Checks if `predicate` returns truthy for **all** elements of `collection`.
     * Iteration is stopped once `predicate` returns falsey. The predicate is
     * invoked with three arguments: (value, index|key, collection).
     *
     * **Note:** This method returns `true` for
     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
     * elements of empty collections.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {boolean} Returns `true` if all elements pass the predicate check,
     *  else `false`.
     * @example
     *
     * _.every([true, 1, null, 'yes'], Boolean);
     * // => false
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': false },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.every(users, { 'user': 'barney', 'active': false });
     * // => false
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.every(users, ['active', false]);
     * // => true
     *
     * // The `_.property` iteratee shorthand.
     * _.every(users, 'active');
     * // => false
     */
    function every(collection, predicate, guard) {
      var func = isArray(collection) ? arrayEvery : baseEvery;
      if (guard && isIterateeCall(collection, predicate, guard)) {
        predicate = undefined;
      }
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Iterates over elements of `collection`, returning an array of all elements
     * `predicate` returns truthy for. The predicate is invoked with three
     * arguments: (value, index|key, collection).
     *
     * **Note:** Unlike `_.remove`, this method returns a new array.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     * @see _.reject
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': true },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * _.filter(users, function(o) { return !o.active; });
     * // => objects for ['fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.filter(users, { 'age': 36, 'active': true });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.filter(users, ['active', false]);
     * // => objects for ['fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.filter(users, 'active');
     * // => objects for ['barney']
     *
     * // Combining several predicates using `_.overEvery` or `_.overSome`.
     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
     * // => objects for ['fred', 'barney']
     */
    function filter(collection, predicate) {
      var func = isArray(collection) ? arrayFilter : baseFilter;
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Iterates over elements of `collection`, returning the first element
     * `predicate` returns truthy for. The predicate is invoked with three
     * arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=0] The index to search from.
     * @returns {*} Returns the matched element, else `undefined`.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36, 'active': true },
     *   { 'user': 'fred',    'age': 40, 'active': false },
     *   { 'user': 'pebbles', 'age': 1,  'active': true }
     * ];
     *
     * _.find(users, function(o) { return o.age < 40; });
     * // => object for 'barney'
     *
     * // The `_.matches` iteratee shorthand.
     * _.find(users, { 'age': 1, 'active': true });
     * // => object for 'pebbles'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.find(users, ['active', false]);
     * // => object for 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.find(users, 'active');
     * // => object for 'barney'
     */
    var find = createFind(findIndex);

    /**
     * This method is like `_.find` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param {number} [fromIndex=collection.length-1] The index to search from.
     * @returns {*} Returns the matched element, else `undefined`.
     * @example
     *
     * _.findLast([1, 2, 3, 4], function(n) {
     *   return n % 2 == 1;
     * });
     * // => 3
     */
    var findLast = createFind(findLastIndex);

    /**
     * Creates a flattened array of values by running each element in `collection`
     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
     * with three arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [n, n];
     * }
     *
     * _.flatMap([1, 2], duplicate);
     * // => [1, 1, 2, 2]
     */
    function flatMap(collection, iteratee) {
      return baseFlatten(map(collection, iteratee), 1);
    }

    /**
     * This method is like `_.flatMap` except that it recursively flattens the
     * mapped results.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [[[n, n]]];
     * }
     *
     * _.flatMapDeep([1, 2], duplicate);
     * // => [1, 1, 2, 2]
     */
    function flatMapDeep(collection, iteratee) {
      return baseFlatten(map(collection, iteratee), INFINITY);
    }

    /**
     * This method is like `_.flatMap` except that it recursively flattens the
     * mapped results up to `depth` times.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {number} [depth=1] The maximum recursion depth.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * function duplicate(n) {
     *   return [[[n, n]]];
     * }
     *
     * _.flatMapDepth([1, 2], duplicate, 2);
     * // => [[1, 1], [2, 2]]
     */
    function flatMapDepth(collection, iteratee, depth) {
      depth = depth === undefined ? 1 : toInteger(depth);
      return baseFlatten(map(collection, iteratee), depth);
    }

    /**
     * Iterates over elements of `collection` and invokes `iteratee` for each element.
     * The iteratee is invoked with three arguments: (value, index|key, collection).
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * **Note:** As with other "Collections" methods, objects with a "length"
     * property are iterated like arrays. To avoid this behavior use `_.forIn`
     * or `_.forOwn` for object iteration.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @alias each
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     * @see _.forEachRight
     * @example
     *
     * _.forEach([1, 2], function(value) {
     *   console.log(value);
     * });
     * // => Logs `1` then `2`.
     *
     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
     */
    function forEach(collection, iteratee) {
      var func = isArray(collection) ? arrayEach : baseEach;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.forEach` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @alias eachRight
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array|Object} Returns `collection`.
     * @see _.forEach
     * @example
     *
     * _.forEachRight([1, 2], function(value) {
     *   console.log(value);
     * });
     * // => Logs `2` then `1`.
     */
    function forEachRight(collection, iteratee) {
      var func = isArray(collection) ? arrayEachRight : baseEachRight;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The order of grouped values
     * is determined by the order they occur in `collection`. The corresponding
     * value of each key is an array of elements responsible for generating the
     * key. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
     * // => { '4': [4.2], '6': [6.1, 6.3] }
     *
     * // The `_.property` iteratee shorthand.
     * _.groupBy(['one', 'two', 'three'], 'length');
     * // => { '3': ['one', 'two'], '5': ['three'] }
     */
    var groupBy = createAggregator(function(result, value, key) {
      if (hasOwnProperty.call(result, key)) {
        result[key].push(value);
      } else {
        baseAssignValue(result, key, [value]);
      }
    });

    /**
     * Checks if `value` is in `collection`. If `collection` is a string, it's
     * checked for a substring of `value`, otherwise
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * is used for equality comparisons. If `fromIndex` is negative, it's used as
     * the offset from the end of `collection`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object|string} collection The collection to inspect.
     * @param {*} value The value to search for.
     * @param {number} [fromIndex=0] The index to search from.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
     * @returns {boolean} Returns `true` if `value` is found, else `false`.
     * @example
     *
     * _.includes([1, 2, 3], 1);
     * // => true
     *
     * _.includes([1, 2, 3], 1, 2);
     * // => false
     *
     * _.includes({ 'a': 1, 'b': 2 }, 1);
     * // => true
     *
     * _.includes('abcd', 'bc');
     * // => true
     */
    function includes(collection, value, fromIndex, guard) {
      collection = isArrayLike(collection) ? collection : values(collection);
      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;

      var length = collection.length;
      if (fromIndex < 0) {
        fromIndex = nativeMax(length + fromIndex, 0);
      }
      return isString(collection)
        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
    }

    /**
     * Invokes the method at `path` of each element in `collection`, returning
     * an array of the results of each invoked method. Any additional arguments
     * are provided to each invoked method. If `path` is a function, it's invoked
     * for, and `this` bound to, each element in `collection`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Array|Function|string} path The path of the method to invoke or
     *  the function invoked per iteration.
     * @param {...*} [args] The arguments to invoke each method with.
     * @returns {Array} Returns the array of results.
     * @example
     *
     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
     * // => [[1, 5, 7], [1, 2, 3]]
     *
     * _.invokeMap([123, 456], String.prototype.split, '');
     * // => [['1', '2', '3'], ['4', '5', '6']]
     */
    var invokeMap = baseRest(function(collection, path, args) {
      var index = -1,
          isFunc = typeof path == 'function',
          result = isArrayLike(collection) ? Array(collection.length) : [];

      baseEach(collection, function(value) {
        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
      });
      return result;
    });

    /**
     * Creates an object composed of keys generated from the results of running
     * each element of `collection` thru `iteratee`. The corresponding value of
     * each key is the last element responsible for generating the key. The
     * iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
     * @returns {Object} Returns the composed aggregate object.
     * @example
     *
     * var array = [
     *   { 'dir': 'left', 'code': 97 },
     *   { 'dir': 'right', 'code': 100 }
     * ];
     *
     * _.keyBy(array, function(o) {
     *   return String.fromCharCode(o.code);
     * });
     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
     *
     * _.keyBy(array, 'dir');
     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
     */
    var keyBy = createAggregator(function(result, value, key) {
      baseAssignValue(result, key, value);
    });

    /**
     * Creates an array of values by running each element in `collection` thru
     * `iteratee`. The iteratee is invoked with three arguments:
     * (value, index|key, collection).
     *
     * Many lodash methods are guarded to work as iteratees for methods like
     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
     *
     * The guarded methods are:
     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new mapped array.
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * _.map([4, 8], square);
     * // => [16, 64]
     *
     * _.map({ 'a': 4, 'b': 8 }, square);
     * // => [16, 64] (iteration order is not guaranteed)
     *
     * var users = [
     *   { 'user': 'barney' },
     *   { 'user': 'fred' }
     * ];
     *
     * // The `_.property` iteratee shorthand.
     * _.map(users, 'user');
     * // => ['barney', 'fred']
     */
    function map(collection, iteratee) {
      var func = isArray(collection) ? arrayMap : baseMap;
      return func(collection, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.sortBy` except that it allows specifying the sort
     * orders of the iteratees to sort by. If `orders` is unspecified, all values
     * are sorted in ascending order. Otherwise, specify an order of "desc" for
     * descending or "asc" for ascending sort order of corresponding values.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
     *  The iteratees to sort by.
     * @param {string[]} [orders] The sort orders of `iteratees`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
     * @returns {Array} Returns the new sorted array.
     * @example
     *
     * var users = [
     *   { 'user': 'fred',   'age': 48 },
     *   { 'user': 'barney', 'age': 34 },
     *   { 'user': 'fred',   'age': 40 },
     *   { 'user': 'barney', 'age': 36 }
     * ];
     *
     * // Sort by `user` in ascending order and by `age` in descending order.
     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
     */
    function orderBy(collection, iteratees, orders, guard) {
      if (collection == null) {
        return [];
      }
      if (!isArray(iteratees)) {
        iteratees = iteratees == null ? [] : [iteratees];
      }
      orders = guard ? undefined : orders;
      if (!isArray(orders)) {
        orders = orders == null ? [] : [orders];
      }
      return baseOrderBy(collection, iteratees, orders);
    }

    /**
     * Creates an array of elements split into two groups, the first of which
     * contains elements `predicate` returns truthy for, the second of which
     * contains elements `predicate` returns falsey for. The predicate is
     * invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the array of grouped elements.
     * @example
     *
     * var users = [
     *   { 'user': 'barney',  'age': 36, 'active': false },
     *   { 'user': 'fred',    'age': 40, 'active': true },
     *   { 'user': 'pebbles', 'age': 1,  'active': false }
     * ];
     *
     * _.partition(users, function(o) { return o.active; });
     * // => objects for [['fred'], ['barney', 'pebbles']]
     *
     * // The `_.matches` iteratee shorthand.
     * _.partition(users, { 'age': 1, 'active': false });
     * // => objects for [['pebbles'], ['barney', 'fred']]
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.partition(users, ['active', false]);
     * // => objects for [['barney', 'pebbles'], ['fred']]
     *
     * // The `_.property` iteratee shorthand.
     * _.partition(users, 'active');
     * // => objects for [['fred'], ['barney', 'pebbles']]
     */
    var partition = createAggregator(function(result, value, key) {
      result[key ? 0 : 1].push(value);
    }, function() { return [[], []]; });

    /**
     * Reduces `collection` to a value which is the accumulated result of running
     * each element in `collection` thru `iteratee`, where each successive
     * invocation is supplied the return value of the previous. If `accumulator`
     * is not given, the first element of `collection` is used as the initial
     * value. The iteratee is invoked with four arguments:
     * (accumulator, value, index|key, collection).
     *
     * Many lodash methods are guarded to work as iteratees for methods like
     * `_.reduce`, `_.reduceRight`, and `_.transform`.
     *
     * The guarded methods are:
     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
     * and `sortBy`
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The initial value.
     * @returns {*} Returns the accumulated value.
     * @see _.reduceRight
     * @example
     *
     * _.reduce([1, 2], function(sum, n) {
     *   return sum + n;
     * }, 0);
     * // => 3
     *
     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
     *   (result[value] || (result[value] = [])).push(key);
     *   return result;
     * }, {});
     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
     */
    function reduce(collection, iteratee, accumulator) {
      var func = isArray(collection) ? arrayReduce : baseReduce,
          initAccum = arguments.length < 3;

      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
    }

    /**
     * This method is like `_.reduce` except that it iterates over elements of
     * `collection` from right to left.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The initial value.
     * @returns {*} Returns the accumulated value.
     * @see _.reduce
     * @example
     *
     * var array = [[0, 1], [2, 3], [4, 5]];
     *
     * _.reduceRight(array, function(flattened, other) {
     *   return flattened.concat(other);
     * }, []);
     * // => [4, 5, 2, 3, 0, 1]
     */
    function reduceRight(collection, iteratee, accumulator) {
      var func = isArray(collection) ? arrayReduceRight : baseReduce,
          initAccum = arguments.length < 3;

      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
    }

    /**
     * The opposite of `_.filter`; this method returns the elements of `collection`
     * that `predicate` does **not** return truthy for.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the new filtered array.
     * @see _.filter
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': false },
     *   { 'user': 'fred',   'age': 40, 'active': true }
     * ];
     *
     * _.reject(users, function(o) { return !o.active; });
     * // => objects for ['fred']
     *
     * // The `_.matches` iteratee shorthand.
     * _.reject(users, { 'age': 40, 'active': true });
     * // => objects for ['barney']
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.reject(users, ['active', false]);
     * // => objects for ['fred']
     *
     * // The `_.property` iteratee shorthand.
     * _.reject(users, 'active');
     * // => objects for ['barney']
     */
    function reject(collection, predicate) {
      var func = isArray(collection) ? arrayFilter : baseFilter;
      return func(collection, negate(getIteratee(predicate, 3)));
    }

    /**
     * Gets a random element from `collection`.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to sample.
     * @returns {*} Returns the random element.
     * @example
     *
     * _.sample([1, 2, 3, 4]);
     * // => 2
     */
    function sample(collection) {
      var func = isArray(collection) ? arraySample : baseSample;
      return func(collection);
    }

    /**
     * Gets `n` random elements at unique keys from `collection` up to the
     * size of `collection`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Collection
     * @param {Array|Object} collection The collection to sample.
     * @param {number} [n=1] The number of elements to sample.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the random elements.
     * @example
     *
     * _.sampleSize([1, 2, 3], 2);
     * // => [3, 1]
     *
     * _.sampleSize([1, 2, 3], 4);
     * // => [2, 3, 1]
     */
    function sampleSize(collection, n, guard) {
      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
        n = 1;
      } else {
        n = toInteger(n);
      }
      var func = isArray(collection) ? arraySampleSize : baseSampleSize;
      return func(collection, n);
    }

    /**
     * Creates an array of shuffled values, using a version of the
     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to shuffle.
     * @returns {Array} Returns the new shuffled array.
     * @example
     *
     * _.shuffle([1, 2, 3, 4]);
     * // => [4, 1, 3, 2]
     */
    function shuffle(collection) {
      var func = isArray(collection) ? arrayShuffle : baseShuffle;
      return func(collection);
    }

    /**
     * Gets the size of `collection` by returning its length for array-like
     * values or the number of own enumerable string keyed properties for objects.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object|string} collection The collection to inspect.
     * @returns {number} Returns the collection size.
     * @example
     *
     * _.size([1, 2, 3]);
     * // => 3
     *
     * _.size({ 'a': 1, 'b': 2 });
     * // => 2
     *
     * _.size('pebbles');
     * // => 7
     */
    function size(collection) {
      if (collection == null) {
        return 0;
      }
      if (isArrayLike(collection)) {
        return isString(collection) ? stringSize(collection) : collection.length;
      }
      var tag = getTag(collection);
      if (tag == mapTag || tag == setTag) {
        return collection.size;
      }
      return baseKeys(collection).length;
    }

    /**
     * Checks if `predicate` returns truthy for **any** element of `collection`.
     * Iteration is stopped once `predicate` returns truthy. The predicate is
     * invoked with three arguments: (value, index|key, collection).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {boolean} Returns `true` if any element passes the predicate check,
     *  else `false`.
     * @example
     *
     * _.some([null, 0, 'yes', false], Boolean);
     * // => true
     *
     * var users = [
     *   { 'user': 'barney', 'active': true },
     *   { 'user': 'fred',   'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.some(users, { 'user': 'barney', 'active': false });
     * // => false
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.some(users, ['active', false]);
     * // => true
     *
     * // The `_.property` iteratee shorthand.
     * _.some(users, 'active');
     * // => true
     */
    function some(collection, predicate, guard) {
      var func = isArray(collection) ? arraySome : baseSome;
      if (guard && isIterateeCall(collection, predicate, guard)) {
        predicate = undefined;
      }
      return func(collection, getIteratee(predicate, 3));
    }

    /**
     * Creates an array of elements, sorted in ascending order by the results of
     * running each element in a collection thru each iteratee. This method
     * performs a stable sort, that is, it preserves the original sort order of
     * equal elements. The iteratees are invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object} collection The collection to iterate over.
     * @param {...(Function|Function[])} [iteratees=[_.identity]]
     *  The iteratees to sort by.
     * @returns {Array} Returns the new sorted array.
     * @example
     *
     * var users = [
     *   { 'user': 'fred',   'age': 48 },
     *   { 'user': 'barney', 'age': 36 },
     *   { 'user': 'fred',   'age': 30 },
     *   { 'user': 'barney', 'age': 34 }
     * ];
     *
     * _.sortBy(users, [function(o) { return o.user; }]);
     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
     *
     * _.sortBy(users, ['user', 'age']);
     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
     */
    var sortBy = baseRest(function(collection, iteratees) {
      if (collection == null) {
        return [];
      }
      var length = iteratees.length;
      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
        iteratees = [];
      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
        iteratees = [iteratees[0]];
      }
      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
    });

    /*------------------------------------------------------------------------*/

    /**
     * Gets the timestamp of the number of milliseconds that have elapsed since
     * the Unix epoch (1 January 1970 00:00:00 UTC).
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Date
     * @returns {number} Returns the timestamp.
     * @example
     *
     * _.defer(function(stamp) {
     *   console.log(_.now() - stamp);
     * }, _.now());
     * // => Logs the number of milliseconds it took for the deferred invocation.
     */
    var now = ctxNow || function() {
      return root.Date.now();
    };

    /*------------------------------------------------------------------------*/

    /**
     * The opposite of `_.before`; this method creates a function that invokes
     * `func` once it's called `n` or more times.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {number} n The number of calls before `func` is invoked.
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * var saves = ['profile', 'settings'];
     *
     * var done = _.after(saves.length, function() {
     *   console.log('done saving!');
     * });
     *
     * _.forEach(saves, function(type) {
     *   asyncSave({ 'type': type, 'complete': done });
     * });
     * // => Logs 'done saving!' after the two async saves have completed.
     */
    function after(n, func) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      n = toInteger(n);
      return function() {
        if (--n < 1) {
          return func.apply(this, arguments);
        }
      };
    }

    /**
     * Creates a function that invokes `func`, with up to `n` arguments,
     * ignoring any additional arguments.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to cap arguments for.
     * @param {number} [n=func.length] The arity cap.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new capped function.
     * @example
     *
     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
     * // => [6, 8, 10]
     */
    function ary(func, n, guard) {
      n = guard ? undefined : n;
      n = (func && n == null) ? func.length : n;
      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
    }

    /**
     * Creates a function that invokes `func`, with the `this` binding and arguments
     * of the created function, while it's called less than `n` times. Subsequent
     * calls to the created function return the result of the last `func` invocation.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {number} n The number of calls at which `func` is no longer invoked.
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * jQuery(element).on('click', _.before(5, addContactToList));
     * // => Allows adding up to 4 contacts to the list.
     */
    function before(n, func) {
      var result;
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      n = toInteger(n);
      return function() {
        if (--n > 0) {
          result = func.apply(this, arguments);
        }
        if (n <= 1) {
          func = undefined;
        }
        return result;
      };
    }

    /**
     * Creates a function that invokes `func` with the `this` binding of `thisArg`
     * and `partials` prepended to the arguments it receives.
     *
     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
     * may be used as a placeholder for partially applied arguments.
     *
     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
     * property of bound functions.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to bind.
     * @param {*} thisArg The `this` binding of `func`.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new bound function.
     * @example
     *
     * function greet(greeting, punctuation) {
     *   return greeting + ' ' + this.user + punctuation;
     * }
     *
     * var object = { 'user': 'fred' };
     *
     * var bound = _.bind(greet, object, 'hi');
     * bound('!');
     * // => 'hi fred!'
     *
     * // Bound with placeholders.
     * var bound = _.bind(greet, object, _, '!');
     * bound('hi');
     * // => 'hi fred!'
     */
    var bind = baseRest(function(func, thisArg, partials) {
      var bitmask = WRAP_BIND_FLAG;
      if (partials.length) {
        var holders = replaceHolders(partials, getHolder(bind));
        bitmask |= WRAP_PARTIAL_FLAG;
      }
      return createWrap(func, bitmask, thisArg, partials, holders);
    });

    /**
     * Creates a function that invokes the method at `object[key]` with `partials`
     * prepended to the arguments it receives.
     *
     * This method differs from `_.bind` by allowing bound functions to reference
     * methods that may be redefined or don't yet exist. See
     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
     * for more details.
     *
     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * @static
     * @memberOf _
     * @since 0.10.0
     * @category Function
     * @param {Object} object The object to invoke the method on.
     * @param {string} key The key of the method.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new bound function.
     * @example
     *
     * var object = {
     *   'user': 'fred',
     *   'greet': function(greeting, punctuation) {
     *     return greeting + ' ' + this.user + punctuation;
     *   }
     * };
     *
     * var bound = _.bindKey(object, 'greet', 'hi');
     * bound('!');
     * // => 'hi fred!'
     *
     * object.greet = function(greeting, punctuation) {
     *   return greeting + 'ya ' + this.user + punctuation;
     * };
     *
     * bound('!');
     * // => 'hiya fred!'
     *
     * // Bound with placeholders.
     * var bound = _.bindKey(object, 'greet', _, '!');
     * bound('hi');
     * // => 'hiya fred!'
     */
    var bindKey = baseRest(function(object, key, partials) {
      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
      if (partials.length) {
        var holders = replaceHolders(partials, getHolder(bindKey));
        bitmask |= WRAP_PARTIAL_FLAG;
      }
      return createWrap(key, bitmask, object, partials, holders);
    });

    /**
     * Creates a function that accepts arguments of `func` and either invokes
     * `func` returning its result, if at least `arity` number of arguments have
     * been provided, or returns a function that accepts the remaining `func`
     * arguments, and so on. The arity of `func` may be specified if `func.length`
     * is not sufficient.
     *
     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
     * may be used as a placeholder for provided arguments.
     *
     * **Note:** This method doesn't set the "length" property of curried functions.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Function
     * @param {Function} func The function to curry.
     * @param {number} [arity=func.length] The arity of `func`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new curried function.
     * @example
     *
     * var abc = function(a, b, c) {
     *   return [a, b, c];
     * };
     *
     * var curried = _.curry(abc);
     *
     * curried(1)(2)(3);
     * // => [1, 2, 3]
     *
     * curried(1, 2)(3);
     * // => [1, 2, 3]
     *
     * curried(1, 2, 3);
     * // => [1, 2, 3]
     *
     * // Curried with placeholders.
     * curried(1)(_, 3)(2);
     * // => [1, 2, 3]
     */
    function curry(func, arity, guard) {
      arity = guard ? undefined : arity;
      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
      result.placeholder = curry.placeholder;
      return result;
    }

    /**
     * This method is like `_.curry` except that arguments are applied to `func`
     * in the manner of `_.partialRight` instead of `_.partial`.
     *
     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for provided arguments.
     *
     * **Note:** This method doesn't set the "length" property of curried functions.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to curry.
     * @param {number} [arity=func.length] The arity of `func`.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the new curried function.
     * @example
     *
     * var abc = function(a, b, c) {
     *   return [a, b, c];
     * };
     *
     * var curried = _.curryRight(abc);
     *
     * curried(3)(2)(1);
     * // => [1, 2, 3]
     *
     * curried(2, 3)(1);
     * // => [1, 2, 3]
     *
     * curried(1, 2, 3);
     * // => [1, 2, 3]
     *
     * // Curried with placeholders.
     * curried(3)(1, _)(2);
     * // => [1, 2, 3]
     */
    function curryRight(func, arity, guard) {
      arity = guard ? undefined : arity;
      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
      result.placeholder = curryRight.placeholder;
      return result;
    }

    /**
     * Creates a debounced function that delays invoking `func` until after `wait`
     * milliseconds have elapsed since the last time the debounced function was
     * invoked. The debounced function comes with a `cancel` method to cancel
     * delayed `func` invocations and a `flush` method to immediately invoke them.
     * Provide `options` to indicate whether `func` should be invoked on the
     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
     * with the last arguments provided to the debounced function. Subsequent
     * calls to the debounced function return the result of the last `func`
     * invocation.
     *
     * **Note:** If `leading` and `trailing` options are `true`, `func` is
     * invoked on the trailing edge of the timeout only if the debounced function
     * is invoked more than once during the `wait` timeout.
     *
     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
     *
     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
     * for details over the differences between `_.debounce` and `_.throttle`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to debounce.
     * @param {number} [wait=0] The number of milliseconds to delay.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.leading=false]
     *  Specify invoking on the leading edge of the timeout.
     * @param {number} [options.maxWait]
     *  The maximum time `func` is allowed to be delayed before it's invoked.
     * @param {boolean} [options.trailing=true]
     *  Specify invoking on the trailing edge of the timeout.
     * @returns {Function} Returns the new debounced function.
     * @example
     *
     * // Avoid costly calculations while the window size is in flux.
     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
     *
     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
     * jQuery(element).on('click', _.debounce(sendMail, 300, {
     *   'leading': true,
     *   'trailing': false
     * }));
     *
     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
     * var source = new EventSource('/stream');
     * jQuery(source).on('message', debounced);
     *
     * // Cancel the trailing debounced invocation.
     * jQuery(window).on('popstate', debounced.cancel);
     */
    function debounce(func, wait, options) {
      var lastArgs,
          lastThis,
          maxWait,
          result,
          timerId,
          lastCallTime,
          lastInvokeTime = 0,
          leading = false,
          maxing = false,
          trailing = true;

      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      wait = toNumber(wait) || 0;
      if (isObject(options)) {
        leading = !!options.leading;
        maxing = 'maxWait' in options;
        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
        trailing = 'trailing' in options ? !!options.trailing : trailing;
      }

      function invokeFunc(time) {
        var args = lastArgs,
            thisArg = lastThis;

        lastArgs = lastThis = undefined;
        lastInvokeTime = time;
        result = func.apply(thisArg, args);
        return result;
      }

      function leadingEdge(time) {
        // Reset any `maxWait` timer.
        lastInvokeTime = time;
        // Start the timer for the trailing edge.
        timerId = setTimeout(timerExpired, wait);
        // Invoke the leading edge.
        return leading ? invokeFunc(time) : result;
      }

      function remainingWait(time) {
        var timeSinceLastCall = time - lastCallTime,
            timeSinceLastInvoke = time - lastInvokeTime,
            timeWaiting = wait - timeSinceLastCall;

        return maxing
          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
          : timeWaiting;
      }

      function shouldInvoke(time) {
        var timeSinceLastCall = time - lastCallTime,
            timeSinceLastInvoke = time - lastInvokeTime;

        // Either this is the first call, activity has stopped and we're at the
        // trailing edge, the system time has gone backwards and we're treating
        // it as the trailing edge, or we've hit the `maxWait` limit.
        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
      }

      function timerExpired() {
        var time = now();
        if (shouldInvoke(time)) {
          return trailingEdge(time);
        }
        // Restart the timer.
        timerId = setTimeout(timerExpired, remainingWait(time));
      }

      function trailingEdge(time) {
        timerId = undefined;

        // Only invoke if we have `lastArgs` which means `func` has been
        // debounced at least once.
        if (trailing && lastArgs) {
          return invokeFunc(time);
        }
        lastArgs = lastThis = undefined;
        return result;
      }

      function cancel() {
        if (timerId !== undefined) {
          clearTimeout(timerId);
        }
        lastInvokeTime = 0;
        lastArgs = lastCallTime = lastThis = timerId = undefined;
      }

      function flush() {
        return timerId === undefined ? result : trailingEdge(now());
      }

      function debounced() {
        var time = now(),
            isInvoking = shouldInvoke(time);

        lastArgs = arguments;
        lastThis = this;
        lastCallTime = time;

        if (isInvoking) {
          if (timerId === undefined) {
            return leadingEdge(lastCallTime);
          }
          if (maxing) {
            // Handle invocations in a tight loop.
            clearTimeout(timerId);
            timerId = setTimeout(timerExpired, wait);
            return invokeFunc(lastCallTime);
          }
        }
        if (timerId === undefined) {
          timerId = setTimeout(timerExpired, wait);
        }
        return result;
      }
      debounced.cancel = cancel;
      debounced.flush = flush;
      return debounced;
    }

    /**
     * Defers invoking the `func` until the current call stack has cleared. Any
     * additional arguments are provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to defer.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {number} Returns the timer id.
     * @example
     *
     * _.defer(function(text) {
     *   console.log(text);
     * }, 'deferred');
     * // => Logs 'deferred' after one millisecond.
     */
    var defer = baseRest(function(func, args) {
      return baseDelay(func, 1, args);
    });

    /**
     * Invokes `func` after `wait` milliseconds. Any additional arguments are
     * provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to delay.
     * @param {number} wait The number of milliseconds to delay invocation.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {number} Returns the timer id.
     * @example
     *
     * _.delay(function(text) {
     *   console.log(text);
     * }, 1000, 'later');
     * // => Logs 'later' after one second.
     */
    var delay = baseRest(function(func, wait, args) {
      return baseDelay(func, toNumber(wait) || 0, args);
    });

    /**
     * Creates a function that invokes `func` with arguments reversed.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to flip arguments for.
     * @returns {Function} Returns the new flipped function.
     * @example
     *
     * var flipped = _.flip(function() {
     *   return _.toArray(arguments);
     * });
     *
     * flipped('a', 'b', 'c', 'd');
     * // => ['d', 'c', 'b', 'a']
     */
    function flip(func) {
      return createWrap(func, WRAP_FLIP_FLAG);
    }

    /**
     * Creates a function that memoizes the result of `func`. If `resolver` is
     * provided, it determines the cache key for storing the result based on the
     * arguments provided to the memoized function. By default, the first argument
     * provided to the memoized function is used as the map cache key. The `func`
     * is invoked with the `this` binding of the memoized function.
     *
     * **Note:** The cache is exposed as the `cache` property on the memoized
     * function. Its creation may be customized by replacing the `_.memoize.Cache`
     * constructor with one whose instances implement the
     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to have its output memoized.
     * @param {Function} [resolver] The function to resolve the cache key.
     * @returns {Function} Returns the new memoized function.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     * var other = { 'c': 3, 'd': 4 };
     *
     * var values = _.memoize(_.values);
     * values(object);
     * // => [1, 2]
     *
     * values(other);
     * // => [3, 4]
     *
     * object.a = 2;
     * values(object);
     * // => [1, 2]
     *
     * // Modify the result cache.
     * values.cache.set(object, ['a', 'b']);
     * values(object);
     * // => ['a', 'b']
     *
     * // Replace `_.memoize.Cache`.
     * _.memoize.Cache = WeakMap;
     */
    function memoize(func, resolver) {
      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      var memoized = function() {
        var args = arguments,
            key = resolver ? resolver.apply(this, args) : args[0],
            cache = memoized.cache;

        if (cache.has(key)) {
          return cache.get(key);
        }
        var result = func.apply(this, args);
        memoized.cache = cache.set(key, result) || cache;
        return result;
      };
      memoized.cache = new (memoize.Cache || MapCache);
      return memoized;
    }

    // Expose `MapCache`.
    memoize.Cache = MapCache;

    /**
     * Creates a function that negates the result of the predicate `func`. The
     * `func` predicate is invoked with the `this` binding and arguments of the
     * created function.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} predicate The predicate to negate.
     * @returns {Function} Returns the new negated function.
     * @example
     *
     * function isEven(n) {
     *   return n % 2 == 0;
     * }
     *
     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
     * // => [1, 3, 5]
     */
    function negate(predicate) {
      if (typeof predicate != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      return function() {
        var args = arguments;
        switch (args.length) {
          case 0: return !predicate.call(this);
          case 1: return !predicate.call(this, args[0]);
          case 2: return !predicate.call(this, args[0], args[1]);
          case 3: return !predicate.call(this, args[0], args[1], args[2]);
        }
        return !predicate.apply(this, args);
      };
    }

    /**
     * Creates a function that is restricted to invoking `func` once. Repeat calls
     * to the function return the value of the first invocation. The `func` is
     * invoked with the `this` binding and arguments of the created function.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new restricted function.
     * @example
     *
     * var initialize = _.once(createApplication);
     * initialize();
     * initialize();
     * // => `createApplication` is invoked once
     */
    function once(func) {
      return before(2, func);
    }

    /**
     * Creates a function that invokes `func` with its arguments transformed.
     *
     * @static
     * @since 4.0.0
     * @memberOf _
     * @category Function
     * @param {Function} func The function to wrap.
     * @param {...(Function|Function[])} [transforms=[_.identity]]
     *  The argument transforms.
     * @returns {Function} Returns the new function.
     * @example
     *
     * function doubled(n) {
     *   return n * 2;
     * }
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var func = _.overArgs(function(x, y) {
     *   return [x, y];
     * }, [square, doubled]);
     *
     * func(9, 3);
     * // => [81, 6]
     *
     * func(10, 5);
     * // => [100, 10]
     */
    var overArgs = castRest(function(func, transforms) {
      transforms = (transforms.length == 1 && isArray(transforms[0]))
        ? arrayMap(transforms[0], baseUnary(getIteratee()))
        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));

      var funcsLength = transforms.length;
      return baseRest(function(args) {
        var index = -1,
            length = nativeMin(args.length, funcsLength);

        while (++index < length) {
          args[index] = transforms[index].call(this, args[index]);
        }
        return apply(func, this, args);
      });
    });

    /**
     * Creates a function that invokes `func` with `partials` prepended to the
     * arguments it receives. This method is like `_.bind` except it does **not**
     * alter the `this` binding.
     *
     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * **Note:** This method doesn't set the "length" property of partially
     * applied functions.
     *
     * @static
     * @memberOf _
     * @since 0.2.0
     * @category Function
     * @param {Function} func The function to partially apply arguments to.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new partially applied function.
     * @example
     *
     * function greet(greeting, name) {
     *   return greeting + ' ' + name;
     * }
     *
     * var sayHelloTo = _.partial(greet, 'hello');
     * sayHelloTo('fred');
     * // => 'hello fred'
     *
     * // Partially applied with placeholders.
     * var greetFred = _.partial(greet, _, 'fred');
     * greetFred('hi');
     * // => 'hi fred'
     */
    var partial = baseRest(function(func, partials) {
      var holders = replaceHolders(partials, getHolder(partial));
      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
    });

    /**
     * This method is like `_.partial` except that partially applied arguments
     * are appended to the arguments it receives.
     *
     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
     * builds, may be used as a placeholder for partially applied arguments.
     *
     * **Note:** This method doesn't set the "length" property of partially
     * applied functions.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Function
     * @param {Function} func The function to partially apply arguments to.
     * @param {...*} [partials] The arguments to be partially applied.
     * @returns {Function} Returns the new partially applied function.
     * @example
     *
     * function greet(greeting, name) {
     *   return greeting + ' ' + name;
     * }
     *
     * var greetFred = _.partialRight(greet, 'fred');
     * greetFred('hi');
     * // => 'hi fred'
     *
     * // Partially applied with placeholders.
     * var sayHelloTo = _.partialRight(greet, 'hello', _);
     * sayHelloTo('fred');
     * // => 'hello fred'
     */
    var partialRight = baseRest(function(func, partials) {
      var holders = replaceHolders(partials, getHolder(partialRight));
      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
    });

    /**
     * Creates a function that invokes `func` with arguments arranged according
     * to the specified `indexes` where the argument value at the first index is
     * provided as the first argument, the argument value at the second index is
     * provided as the second argument, and so on.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Function
     * @param {Function} func The function to rearrange arguments for.
     * @param {...(number|number[])} indexes The arranged argument indexes.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var rearged = _.rearg(function(a, b, c) {
     *   return [a, b, c];
     * }, [2, 0, 1]);
     *
     * rearged('b', 'c', 'a')
     * // => ['a', 'b', 'c']
     */
    var rearg = flatRest(function(func, indexes) {
      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
    });

    /**
     * Creates a function that invokes `func` with the `this` binding of the
     * created function and arguments from `start` and beyond provided as
     * an array.
     *
     * **Note:** This method is based on the
     * [rest parameter](https://mdn.io/rest_parameters).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var say = _.rest(function(what, names) {
     *   return what + ' ' + _.initial(names).join(', ') +
     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
     * });
     *
     * say('hello', 'fred', 'barney', 'pebbles');
     * // => 'hello fred, barney, & pebbles'
     */
    function rest(func, start) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      start = start === undefined ? start : toInteger(start);
      return baseRest(func, start);
    }

    /**
     * Creates a function that invokes `func` with the `this` binding of the
     * create function and an array of arguments much like
     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
     *
     * **Note:** This method is based on the
     * [spread operator](https://mdn.io/spread_operator).
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Function
     * @param {Function} func The function to spread arguments over.
     * @param {number} [start=0] The start position of the spread.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var say = _.spread(function(who, what) {
     *   return who + ' says ' + what;
     * });
     *
     * say(['fred', 'hello']);
     * // => 'fred says hello'
     *
     * var numbers = Promise.all([
     *   Promise.resolve(40),
     *   Promise.resolve(36)
     * ]);
     *
     * numbers.then(_.spread(function(x, y) {
     *   return x + y;
     * }));
     * // => a Promise of 76
     */
    function spread(func, start) {
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      start = start == null ? 0 : nativeMax(toInteger(start), 0);
      return baseRest(function(args) {
        var array = args[start],
            otherArgs = castSlice(args, 0, start);

        if (array) {
          arrayPush(otherArgs, array);
        }
        return apply(func, this, otherArgs);
      });
    }

    /**
     * Creates a throttled function that only invokes `func` at most once per
     * every `wait` milliseconds. The throttled function comes with a `cancel`
     * method to cancel delayed `func` invocations and a `flush` method to
     * immediately invoke them. Provide `options` to indicate whether `func`
     * should be invoked on the leading and/or trailing edge of the `wait`
     * timeout. The `func` is invoked with the last arguments provided to the
     * throttled function. Subsequent calls to the throttled function return the
     * result of the last `func` invocation.
     *
     * **Note:** If `leading` and `trailing` options are `true`, `func` is
     * invoked on the trailing edge of the timeout only if the throttled function
     * is invoked more than once during the `wait` timeout.
     *
     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
     *
     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
     * for details over the differences between `_.throttle` and `_.debounce`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {Function} func The function to throttle.
     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.leading=true]
     *  Specify invoking on the leading edge of the timeout.
     * @param {boolean} [options.trailing=true]
     *  Specify invoking on the trailing edge of the timeout.
     * @returns {Function} Returns the new throttled function.
     * @example
     *
     * // Avoid excessively updating the position while scrolling.
     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
     *
     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
     * jQuery(element).on('click', throttled);
     *
     * // Cancel the trailing throttled invocation.
     * jQuery(window).on('popstate', throttled.cancel);
     */
    function throttle(func, wait, options) {
      var leading = true,
          trailing = true;

      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      if (isObject(options)) {
        leading = 'leading' in options ? !!options.leading : leading;
        trailing = 'trailing' in options ? !!options.trailing : trailing;
      }
      return debounce(func, wait, {
        'leading': leading,
        'maxWait': wait,
        'trailing': trailing
      });
    }

    /**
     * Creates a function that accepts up to one argument, ignoring any
     * additional arguments.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Function
     * @param {Function} func The function to cap arguments for.
     * @returns {Function} Returns the new capped function.
     * @example
     *
     * _.map(['6', '8', '10'], _.unary(parseInt));
     * // => [6, 8, 10]
     */
    function unary(func) {
      return ary(func, 1);
    }

    /**
     * Creates a function that provides `value` to `wrapper` as its first
     * argument. Any additional arguments provided to the function are appended
     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
     * binding of the created function.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Function
     * @param {*} value The value to wrap.
     * @param {Function} [wrapper=identity] The wrapper function.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var p = _.wrap(_.escape, function(func, text) {
     *   return '<p>' + func(text) + '</p>';
     * });
     *
     * p('fred, barney, & pebbles');
     * // => '<p>fred, barney, &amp; pebbles</p>'
     */
    function wrap(value, wrapper) {
      return partial(castFunction(wrapper), value);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Casts `value` as an array if it's not one.
     *
     * @static
     * @memberOf _
     * @since 4.4.0
     * @category Lang
     * @param {*} value The value to inspect.
     * @returns {Array} Returns the cast array.
     * @example
     *
     * _.castArray(1);
     * // => [1]
     *
     * _.castArray({ 'a': 1 });
     * // => [{ 'a': 1 }]
     *
     * _.castArray('abc');
     * // => ['abc']
     *
     * _.castArray(null);
     * // => [null]
     *
     * _.castArray(undefined);
     * // => [undefined]
     *
     * _.castArray();
     * // => []
     *
     * var array = [1, 2, 3];
     * console.log(_.castArray(array) === array);
     * // => true
     */
    function castArray() {
      if (!arguments.length) {
        return [];
      }
      var value = arguments[0];
      return isArray(value) ? value : [value];
    }

    /**
     * Creates a shallow clone of `value`.
     *
     * **Note:** This method is loosely based on the
     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
     * and supports cloning arrays, array buffers, booleans, date objects, maps,
     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
     * arrays. The own enumerable properties of `arguments` objects are cloned
     * as plain objects. An empty object is returned for uncloneable values such
     * as error objects, functions, DOM nodes, and WeakMaps.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to clone.
     * @returns {*} Returns the cloned value.
     * @see _.cloneDeep
     * @example
     *
     * var objects = [{ 'a': 1 }, { 'b': 2 }];
     *
     * var shallow = _.clone(objects);
     * console.log(shallow[0] === objects[0]);
     * // => true
     */
    function clone(value) {
      return baseClone(value, CLONE_SYMBOLS_FLAG);
    }

    /**
     * This method is like `_.clone` except that it accepts `customizer` which
     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
     * cloning is handled by the method instead. The `customizer` is invoked with
     * up to four arguments; (value [, index|key, object, stack]).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to clone.
     * @param {Function} [customizer] The function to customize cloning.
     * @returns {*} Returns the cloned value.
     * @see _.cloneDeepWith
     * @example
     *
     * function customizer(value) {
     *   if (_.isElement(value)) {
     *     return value.cloneNode(false);
     *   }
     * }
     *
     * var el = _.cloneWith(document.body, customizer);
     *
     * console.log(el === document.body);
     * // => false
     * console.log(el.nodeName);
     * // => 'BODY'
     * console.log(el.childNodes.length);
     * // => 0
     */
    function cloneWith(value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
    }

    /**
     * This method is like `_.clone` except that it recursively clones `value`.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Lang
     * @param {*} value The value to recursively clone.
     * @returns {*} Returns the deep cloned value.
     * @see _.clone
     * @example
     *
     * var objects = [{ 'a': 1 }, { 'b': 2 }];
     *
     * var deep = _.cloneDeep(objects);
     * console.log(deep[0] === objects[0]);
     * // => false
     */
    function cloneDeep(value) {
      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
    }

    /**
     * This method is like `_.cloneWith` except that it recursively clones `value`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to recursively clone.
     * @param {Function} [customizer] The function to customize cloning.
     * @returns {*} Returns the deep cloned value.
     * @see _.cloneWith
     * @example
     *
     * function customizer(value) {
     *   if (_.isElement(value)) {
     *     return value.cloneNode(true);
     *   }
     * }
     *
     * var el = _.cloneDeepWith(document.body, customizer);
     *
     * console.log(el === document.body);
     * // => false
     * console.log(el.nodeName);
     * // => 'BODY'
     * console.log(el.childNodes.length);
     * // => 20
     */
    function cloneDeepWith(value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
    }

    /**
     * Checks if `object` conforms to `source` by invoking the predicate
     * properties of `source` with the corresponding property values of `object`.
     *
     * **Note:** This method is equivalent to `_.conforms` when `source` is
     * partially applied.
     *
     * @static
     * @memberOf _
     * @since 4.14.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property predicates to conform to.
     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     *
     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
     * // => true
     *
     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
     * // => false
     */
    function conformsTo(object, source) {
      return source == null || baseConformsTo(object, source, keys(source));
    }

    /**
     * Performs a
     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
     * comparison between two values to determine if they are equivalent.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * var object = { 'a': 1 };
     * var other = { 'a': 1 };
     *
     * _.eq(object, object);
     * // => true
     *
     * _.eq(object, other);
     * // => false
     *
     * _.eq('a', 'a');
     * // => true
     *
     * _.eq('a', Object('a'));
     * // => false
     *
     * _.eq(NaN, NaN);
     * // => true
     */
    function eq(value, other) {
      return value === other || (value !== value && other !== other);
    }

    /**
     * Checks if `value` is greater than `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than `other`,
     *  else `false`.
     * @see _.lt
     * @example
     *
     * _.gt(3, 1);
     * // => true
     *
     * _.gt(3, 3);
     * // => false
     *
     * _.gt(1, 3);
     * // => false
     */
    var gt = createRelationalOperation(baseGt);

    /**
     * Checks if `value` is greater than or equal to `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is greater than or equal to
     *  `other`, else `false`.
     * @see _.lte
     * @example
     *
     * _.gte(3, 1);
     * // => true
     *
     * _.gte(3, 3);
     * // => true
     *
     * _.gte(1, 3);
     * // => false
     */
    var gte = createRelationalOperation(function(value, other) {
      return value >= other;
    });

    /**
     * Checks if `value` is likely an `arguments` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
     *  else `false`.
     * @example
     *
     * _.isArguments(function() { return arguments; }());
     * // => true
     *
     * _.isArguments([1, 2, 3]);
     * // => false
     */
    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
        !propertyIsEnumerable.call(value, 'callee');
    };

    /**
     * Checks if `value` is classified as an `Array` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
     * @example
     *
     * _.isArray([1, 2, 3]);
     * // => true
     *
     * _.isArray(document.body.children);
     * // => false
     *
     * _.isArray('abc');
     * // => false
     *
     * _.isArray(_.noop);
     * // => false
     */
    var isArray = Array.isArray;

    /**
     * Checks if `value` is classified as an `ArrayBuffer` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
     * @example
     *
     * _.isArrayBuffer(new ArrayBuffer(2));
     * // => true
     *
     * _.isArrayBuffer(new Array(2));
     * // => false
     */
    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;

    /**
     * Checks if `value` is array-like. A value is considered array-like if it's
     * not a function and has a `value.length` that's an integer greater than or
     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
     * @example
     *
     * _.isArrayLike([1, 2, 3]);
     * // => true
     *
     * _.isArrayLike(document.body.children);
     * // => true
     *
     * _.isArrayLike('abc');
     * // => true
     *
     * _.isArrayLike(_.noop);
     * // => false
     */
    function isArrayLike(value) {
      return value != null && isLength(value.length) && !isFunction(value);
    }

    /**
     * This method is like `_.isArrayLike` except that it also checks if `value`
     * is an object.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an array-like object,
     *  else `false`.
     * @example
     *
     * _.isArrayLikeObject([1, 2, 3]);
     * // => true
     *
     * _.isArrayLikeObject(document.body.children);
     * // => true
     *
     * _.isArrayLikeObject('abc');
     * // => false
     *
     * _.isArrayLikeObject(_.noop);
     * // => false
     */
    function isArrayLikeObject(value) {
      return isObjectLike(value) && isArrayLike(value);
    }

    /**
     * Checks if `value` is classified as a boolean primitive or object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
     * @example
     *
     * _.isBoolean(false);
     * // => true
     *
     * _.isBoolean(null);
     * // => false
     */
    function isBoolean(value) {
      return value === true || value === false ||
        (isObjectLike(value) && baseGetTag(value) == boolTag);
    }

    /**
     * Checks if `value` is a buffer.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
     * @example
     *
     * _.isBuffer(new Buffer(2));
     * // => true
     *
     * _.isBuffer(new Uint8Array(2));
     * // => false
     */
    var isBuffer = nativeIsBuffer || stubFalse;

    /**
     * Checks if `value` is classified as a `Date` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
     * @example
     *
     * _.isDate(new Date);
     * // => true
     *
     * _.isDate('Mon April 23 2012');
     * // => false
     */
    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;

    /**
     * Checks if `value` is likely a DOM element.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
     * @example
     *
     * _.isElement(document.body);
     * // => true
     *
     * _.isElement('<body>');
     * // => false
     */
    function isElement(value) {
      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
    }

    /**
     * Checks if `value` is an empty object, collection, map, or set.
     *
     * Objects are considered empty if they have no own enumerable string keyed
     * properties.
     *
     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
     * jQuery-like collections are considered empty if they have a `length` of `0`.
     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
     * @example
     *
     * _.isEmpty(null);
     * // => true
     *
     * _.isEmpty(true);
     * // => true
     *
     * _.isEmpty(1);
     * // => true
     *
     * _.isEmpty([1, 2, 3]);
     * // => false
     *
     * _.isEmpty({ 'a': 1 });
     * // => false
     */
    function isEmpty(value) {
      if (value == null) {
        return true;
      }
      if (isArrayLike(value) &&
          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
            isBuffer(value) || isTypedArray(value) || isArguments(value))) {
        return !value.length;
      }
      var tag = getTag(value);
      if (tag == mapTag || tag == setTag) {
        return !value.size;
      }
      if (isPrototype(value)) {
        return !baseKeys(value).length;
      }
      for (var key in value) {
        if (hasOwnProperty.call(value, key)) {
          return false;
        }
      }
      return true;
    }

    /**
     * Performs a deep comparison between two values to determine if they are
     * equivalent.
     *
     * **Note:** This method supports comparing arrays, array buffers, booleans,
     * date objects, error objects, maps, numbers, `Object` objects, regexes,
     * sets, strings, symbols, and typed arrays. `Object` objects are compared
     * by their own, not inherited, enumerable properties. Functions and DOM
     * nodes are compared by strict equality, i.e. `===`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * var object = { 'a': 1 };
     * var other = { 'a': 1 };
     *
     * _.isEqual(object, other);
     * // => true
     *
     * object === other;
     * // => false
     */
    function isEqual(value, other) {
      return baseIsEqual(value, other);
    }

    /**
     * This method is like `_.isEqual` except that it accepts `customizer` which
     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
     * are handled by the method instead. The `customizer` is invoked with up to
     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
     * @example
     *
     * function isGreeting(value) {
     *   return /^h(?:i|ello)$/.test(value);
     * }
     *
     * function customizer(objValue, othValue) {
     *   if (isGreeting(objValue) && isGreeting(othValue)) {
     *     return true;
     *   }
     * }
     *
     * var array = ['hello', 'goodbye'];
     * var other = ['hi', 'goodbye'];
     *
     * _.isEqualWith(array, other, customizer);
     * // => true
     */
    function isEqualWith(value, other, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      var result = customizer ? customizer(value, other) : undefined;
      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
    }

    /**
     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
     * `SyntaxError`, `TypeError`, or `URIError` object.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
     * @example
     *
     * _.isError(new Error);
     * // => true
     *
     * _.isError(Error);
     * // => false
     */
    function isError(value) {
      if (!isObjectLike(value)) {
        return false;
      }
      var tag = baseGetTag(value);
      return tag == errorTag || tag == domExcTag ||
        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
    }

    /**
     * Checks if `value` is a finite primitive number.
     *
     * **Note:** This method is based on
     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
     * @example
     *
     * _.isFinite(3);
     * // => true
     *
     * _.isFinite(Number.MIN_VALUE);
     * // => true
     *
     * _.isFinite(Infinity);
     * // => false
     *
     * _.isFinite('3');
     * // => false
     */
    function isFinite(value) {
      return typeof value == 'number' && nativeIsFinite(value);
    }

    /**
     * Checks if `value` is classified as a `Function` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
     * @example
     *
     * _.isFunction(_);
     * // => true
     *
     * _.isFunction(/abc/);
     * // => false
     */
    function isFunction(value) {
      if (!isObject(value)) {
        return false;
      }
      // The use of `Object#toString` avoids issues with the `typeof` operator
      // in Safari 9 which returns 'object' for typed arrays and other constructors.
      var tag = baseGetTag(value);
      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
    }

    /**
     * Checks if `value` is an integer.
     *
     * **Note:** This method is based on
     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
     * @example
     *
     * _.isInteger(3);
     * // => true
     *
     * _.isInteger(Number.MIN_VALUE);
     * // => false
     *
     * _.isInteger(Infinity);
     * // => false
     *
     * _.isInteger('3');
     * // => false
     */
    function isInteger(value) {
      return typeof value == 'number' && value == toInteger(value);
    }

    /**
     * Checks if `value` is a valid array-like length.
     *
     * **Note:** This method is loosely based on
     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
     * @example
     *
     * _.isLength(3);
     * // => true
     *
     * _.isLength(Number.MIN_VALUE);
     * // => false
     *
     * _.isLength(Infinity);
     * // => false
     *
     * _.isLength('3');
     * // => false
     */
    function isLength(value) {
      return typeof value == 'number' &&
        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
    }

    /**
     * Checks if `value` is the
     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
     * @example
     *
     * _.isObject({});
     * // => true
     *
     * _.isObject([1, 2, 3]);
     * // => true
     *
     * _.isObject(_.noop);
     * // => true
     *
     * _.isObject(null);
     * // => false
     */
    function isObject(value) {
      var type = typeof value;
      return value != null && (type == 'object' || type == 'function');
    }

    /**
     * Checks if `value` is object-like. A value is object-like if it's not `null`
     * and has a `typeof` result of "object".
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
     * @example
     *
     * _.isObjectLike({});
     * // => true
     *
     * _.isObjectLike([1, 2, 3]);
     * // => true
     *
     * _.isObjectLike(_.noop);
     * // => false
     *
     * _.isObjectLike(null);
     * // => false
     */
    function isObjectLike(value) {
      return value != null && typeof value == 'object';
    }

    /**
     * Checks if `value` is classified as a `Map` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
     * @example
     *
     * _.isMap(new Map);
     * // => true
     *
     * _.isMap(new WeakMap);
     * // => false
     */
    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;

    /**
     * Performs a partial deep comparison between `object` and `source` to
     * determine if `object` contains equivalent property values.
     *
     * **Note:** This method is equivalent to `_.matches` when `source` is
     * partially applied.
     *
     * Partial comparisons will match empty array and empty object `source`
     * values against any array or object value, respectively. See `_.isEqual`
     * for a list of supported value comparisons.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     * @example
     *
     * var object = { 'a': 1, 'b': 2 };
     *
     * _.isMatch(object, { 'b': 2 });
     * // => true
     *
     * _.isMatch(object, { 'b': 1 });
     * // => false
     */
    function isMatch(object, source) {
      return object === source || baseIsMatch(object, source, getMatchData(source));
    }

    /**
     * This method is like `_.isMatch` except that it accepts `customizer` which
     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
     * are handled by the method instead. The `customizer` is invoked with five
     * arguments: (objValue, srcValue, index|key, object, source).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {Object} object The object to inspect.
     * @param {Object} source The object of property values to match.
     * @param {Function} [customizer] The function to customize comparisons.
     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
     * @example
     *
     * function isGreeting(value) {
     *   return /^h(?:i|ello)$/.test(value);
     * }
     *
     * function customizer(objValue, srcValue) {
     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
     *     return true;
     *   }
     * }
     *
     * var object = { 'greeting': 'hello' };
     * var source = { 'greeting': 'hi' };
     *
     * _.isMatchWith(object, source, customizer);
     * // => true
     */
    function isMatchWith(object, source, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return baseIsMatch(object, source, getMatchData(source), customizer);
    }

    /**
     * Checks if `value` is `NaN`.
     *
     * **Note:** This method is based on
     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
     * `undefined` and other non-number values.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
     * @example
     *
     * _.isNaN(NaN);
     * // => true
     *
     * _.isNaN(new Number(NaN));
     * // => true
     *
     * isNaN(undefined);
     * // => true
     *
     * _.isNaN(undefined);
     * // => false
     */
    function isNaN(value) {
      // An `NaN` primitive is the only value that is not equal to itself.
      // Perform the `toStringTag` check first to avoid errors with some
      // ActiveX objects in IE.
      return isNumber(value) && value != +value;
    }

    /**
     * Checks if `value` is a pristine native function.
     *
     * **Note:** This method can't reliably detect native functions in the presence
     * of the core-js package because core-js circumvents this kind of detection.
     * Despite multiple requests, the core-js maintainer has made it clear: any
     * attempt to fix the detection will be obstructed. As a result, we're left
     * with little choice but to throw an error. Unfortunately, this also affects
     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
     * which rely on core-js.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a native function,
     *  else `false`.
     * @example
     *
     * _.isNative(Array.prototype.push);
     * // => true
     *
     * _.isNative(_);
     * // => false
     */
    function isNative(value) {
      if (isMaskable(value)) {
        throw new Error(CORE_ERROR_TEXT);
      }
      return baseIsNative(value);
    }

    /**
     * Checks if `value` is `null`.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
     * @example
     *
     * _.isNull(null);
     * // => true
     *
     * _.isNull(void 0);
     * // => false
     */
    function isNull(value) {
      return value === null;
    }

    /**
     * Checks if `value` is `null` or `undefined`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
     * @example
     *
     * _.isNil(null);
     * // => true
     *
     * _.isNil(void 0);
     * // => true
     *
     * _.isNil(NaN);
     * // => false
     */
    function isNil(value) {
      return value == null;
    }

    /**
     * Checks if `value` is classified as a `Number` primitive or object.
     *
     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
     * classified as numbers, use the `_.isFinite` method.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
     * @example
     *
     * _.isNumber(3);
     * // => true
     *
     * _.isNumber(Number.MIN_VALUE);
     * // => true
     *
     * _.isNumber(Infinity);
     * // => true
     *
     * _.isNumber('3');
     * // => false
     */
    function isNumber(value) {
      return typeof value == 'number' ||
        (isObjectLike(value) && baseGetTag(value) == numberTag);
    }

    /**
     * Checks if `value` is a plain object, that is, an object created by the
     * `Object` constructor or one with a `[[Prototype]]` of `null`.
     *
     * @static
     * @memberOf _
     * @since 0.8.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * _.isPlainObject(new Foo);
     * // => false
     *
     * _.isPlainObject([1, 2, 3]);
     * // => false
     *
     * _.isPlainObject({ 'x': 0, 'y': 0 });
     * // => true
     *
     * _.isPlainObject(Object.create(null));
     * // => true
     */
    function isPlainObject(value) {
      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
        return false;
      }
      var proto = getPrototype(value);
      if (proto === null) {
        return true;
      }
      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
        funcToString.call(Ctor) == objectCtorString;
    }

    /**
     * Checks if `value` is classified as a `RegExp` object.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
     * @example
     *
     * _.isRegExp(/abc/);
     * // => true
     *
     * _.isRegExp('/abc/');
     * // => false
     */
    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;

    /**
     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
     * double precision number which isn't the result of a rounded unsafe integer.
     *
     * **Note:** This method is based on
     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
     * @example
     *
     * _.isSafeInteger(3);
     * // => true
     *
     * _.isSafeInteger(Number.MIN_VALUE);
     * // => false
     *
     * _.isSafeInteger(Infinity);
     * // => false
     *
     * _.isSafeInteger('3');
     * // => false
     */
    function isSafeInteger(value) {
      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
    }

    /**
     * Checks if `value` is classified as a `Set` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
     * @example
     *
     * _.isSet(new Set);
     * // => true
     *
     * _.isSet(new WeakSet);
     * // => false
     */
    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;

    /**
     * Checks if `value` is classified as a `String` primitive or object.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
     * @example
     *
     * _.isString('abc');
     * // => true
     *
     * _.isString(1);
     * // => false
     */
    function isString(value) {
      return typeof value == 'string' ||
        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
    }

    /**
     * Checks if `value` is classified as a `Symbol` primitive or object.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
     * @example
     *
     * _.isSymbol(Symbol.iterator);
     * // => true
     *
     * _.isSymbol('abc');
     * // => false
     */
    function isSymbol(value) {
      return typeof value == 'symbol' ||
        (isObjectLike(value) && baseGetTag(value) == symbolTag);
    }

    /**
     * Checks if `value` is classified as a typed array.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
     * @example
     *
     * _.isTypedArray(new Uint8Array);
     * // => true
     *
     * _.isTypedArray([]);
     * // => false
     */
    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

    /**
     * Checks if `value` is `undefined`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
     * @example
     *
     * _.isUndefined(void 0);
     * // => true
     *
     * _.isUndefined(null);
     * // => false
     */
    function isUndefined(value) {
      return value === undefined;
    }

    /**
     * Checks if `value` is classified as a `WeakMap` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
     * @example
     *
     * _.isWeakMap(new WeakMap);
     * // => true
     *
     * _.isWeakMap(new Map);
     * // => false
     */
    function isWeakMap(value) {
      return isObjectLike(value) && getTag(value) == weakMapTag;
    }

    /**
     * Checks if `value` is classified as a `WeakSet` object.
     *
     * @static
     * @memberOf _
     * @since 4.3.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
     * @example
     *
     * _.isWeakSet(new WeakSet);
     * // => true
     *
     * _.isWeakSet(new Set);
     * // => false
     */
    function isWeakSet(value) {
      return isObjectLike(value) && baseGetTag(value) == weakSetTag;
    }

    /**
     * Checks if `value` is less than `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than `other`,
     *  else `false`.
     * @see _.gt
     * @example
     *
     * _.lt(1, 3);
     * // => true
     *
     * _.lt(3, 3);
     * // => false
     *
     * _.lt(3, 1);
     * // => false
     */
    var lt = createRelationalOperation(baseLt);

    /**
     * Checks if `value` is less than or equal to `other`.
     *
     * @static
     * @memberOf _
     * @since 3.9.0
     * @category Lang
     * @param {*} value The value to compare.
     * @param {*} other The other value to compare.
     * @returns {boolean} Returns `true` if `value` is less than or equal to
     *  `other`, else `false`.
     * @see _.gte
     * @example
     *
     * _.lte(1, 3);
     * // => true
     *
     * _.lte(3, 3);
     * // => true
     *
     * _.lte(3, 1);
     * // => false
     */
    var lte = createRelationalOperation(function(value, other) {
      return value <= other;
    });

    /**
     * Converts `value` to an array.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {Array} Returns the converted array.
     * @example
     *
     * _.toArray({ 'a': 1, 'b': 2 });
     * // => [1, 2]
     *
     * _.toArray('abc');
     * // => ['a', 'b', 'c']
     *
     * _.toArray(1);
     * // => []
     *
     * _.toArray(null);
     * // => []
     */
    function toArray(value) {
      if (!value) {
        return [];
      }
      if (isArrayLike(value)) {
        return isString(value) ? stringToArray(value) : copyArray(value);
      }
      if (symIterator && value[symIterator]) {
        return iteratorToArray(value[symIterator]());
      }
      var tag = getTag(value),
          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);

      return func(value);
    }

    /**
     * Converts `value` to a finite number.
     *
     * @static
     * @memberOf _
     * @since 4.12.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted number.
     * @example
     *
     * _.toFinite(3.2);
     * // => 3.2
     *
     * _.toFinite(Number.MIN_VALUE);
     * // => 5e-324
     *
     * _.toFinite(Infinity);
     * // => 1.7976931348623157e+308
     *
     * _.toFinite('3.2');
     * // => 3.2
     */
    function toFinite(value) {
      if (!value) {
        return value === 0 ? value : 0;
      }
      value = toNumber(value);
      if (value === INFINITY || value === -INFINITY) {
        var sign = (value < 0 ? -1 : 1);
        return sign * MAX_INTEGER;
      }
      return value === value ? value : 0;
    }

    /**
     * Converts `value` to an integer.
     *
     * **Note:** This method is loosely based on
     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toInteger(3.2);
     * // => 3
     *
     * _.toInteger(Number.MIN_VALUE);
     * // => 0
     *
     * _.toInteger(Infinity);
     * // => 1.7976931348623157e+308
     *
     * _.toInteger('3.2');
     * // => 3
     */
    function toInteger(value) {
      var result = toFinite(value),
          remainder = result % 1;

      return result === result ? (remainder ? result - remainder : result) : 0;
    }

    /**
     * Converts `value` to an integer suitable for use as the length of an
     * array-like object.
     *
     * **Note:** This method is based on
     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toLength(3.2);
     * // => 3
     *
     * _.toLength(Number.MIN_VALUE);
     * // => 0
     *
     * _.toLength(Infinity);
     * // => 4294967295
     *
     * _.toLength('3.2');
     * // => 3
     */
    function toLength(value) {
      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
    }

    /**
     * Converts `value` to a number.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to process.
     * @returns {number} Returns the number.
     * @example
     *
     * _.toNumber(3.2);
     * // => 3.2
     *
     * _.toNumber(Number.MIN_VALUE);
     * // => 5e-324
     *
     * _.toNumber(Infinity);
     * // => Infinity
     *
     * _.toNumber('3.2');
     * // => 3.2
     */
    function toNumber(value) {
      if (typeof value == 'number') {
        return value;
      }
      if (isSymbol(value)) {
        return NAN;
      }
      if (isObject(value)) {
        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
        value = isObject(other) ? (other + '') : other;
      }
      if (typeof value != 'string') {
        return value === 0 ? value : +value;
      }
      value = value.replace(reTrim, '');
      var isBinary = reIsBinary.test(value);
      return (isBinary || reIsOctal.test(value))
        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
        : (reIsBadHex.test(value) ? NAN : +value);
    }

    /**
     * Converts `value` to a plain object flattening inherited enumerable string
     * keyed properties of `value` to own properties of the plain object.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {Object} Returns the converted plain object.
     * @example
     *
     * function Foo() {
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.assign({ 'a': 1 }, new Foo);
     * // => { 'a': 1, 'b': 2 }
     *
     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
     * // => { 'a': 1, 'b': 2, 'c': 3 }
     */
    function toPlainObject(value) {
      return copyObject(value, keysIn(value));
    }

    /**
     * Converts `value` to a safe integer. A safe integer can be compared and
     * represented correctly.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.toSafeInteger(3.2);
     * // => 3
     *
     * _.toSafeInteger(Number.MIN_VALUE);
     * // => 0
     *
     * _.toSafeInteger(Infinity);
     * // => 9007199254740991
     *
     * _.toSafeInteger('3.2');
     * // => 3
     */
    function toSafeInteger(value) {
      return value
        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
        : (value === 0 ? value : 0);
    }

    /**
     * Converts `value` to a string. An empty string is returned for `null`
     * and `undefined` values. The sign of `-0` is preserved.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Lang
     * @param {*} value The value to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.toString(null);
     * // => ''
     *
     * _.toString(-0);
     * // => '-0'
     *
     * _.toString([1, 2, 3]);
     * // => '1,2,3'
     */
    function toString(value) {
      return value == null ? '' : baseToString(value);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Assigns own enumerable string keyed properties of source objects to the
     * destination object. Source objects are applied from left to right.
     * Subsequent sources overwrite property assignments of previous sources.
     *
     * **Note:** This method mutates `object` and is loosely based on
     * [`Object.assign`](https://mdn.io/Object/assign).
     *
     * @static
     * @memberOf _
     * @since 0.10.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.assignIn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * function Bar() {
     *   this.c = 3;
     * }
     *
     * Foo.prototype.b = 2;
     * Bar.prototype.d = 4;
     *
     * _.assign({ 'a': 0 }, new Foo, new Bar);
     * // => { 'a': 1, 'c': 3 }
     */
    var assign = createAssigner(function(object, source) {
      if (isPrototype(source) || isArrayLike(source)) {
        copyObject(source, keys(source), object);
        return;
      }
      for (var key in source) {
        if (hasOwnProperty.call(source, key)) {
          assignValue(object, key, source[key]);
        }
      }
    });

    /**
     * This method is like `_.assign` except that it iterates over own and
     * inherited source properties.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias extend
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.assign
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * function Bar() {
     *   this.c = 3;
     * }
     *
     * Foo.prototype.b = 2;
     * Bar.prototype.d = 4;
     *
     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
     */
    var assignIn = createAssigner(function(object, source) {
      copyObject(source, keysIn(source), object);
    });

    /**
     * This method is like `_.assignIn` except that it accepts `customizer`
     * which is invoked to produce the assigned values. If `customizer` returns
     * `undefined`, assignment is handled by the method instead. The `customizer`
     * is invoked with five arguments: (objValue, srcValue, key, object, source).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias extendWith
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @see _.assignWith
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   return _.isUndefined(objValue) ? srcValue : objValue;
     * }
     *
     * var defaults = _.partialRight(_.assignInWith, customizer);
     *
     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keysIn(source), object, customizer);
    });

    /**
     * This method is like `_.assign` except that it accepts `customizer`
     * which is invoked to produce the assigned values. If `customizer` returns
     * `undefined`, assignment is handled by the method instead. The `customizer`
     * is invoked with five arguments: (objValue, srcValue, key, object, source).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @see _.assignInWith
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   return _.isUndefined(objValue) ? srcValue : objValue;
     * }
     *
     * var defaults = _.partialRight(_.assignWith, customizer);
     *
     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
      copyObject(source, keys(source), object, customizer);
    });

    /**
     * Creates an array of values corresponding to `paths` of `object`.
     *
     * @static
     * @memberOf _
     * @since 1.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Array} Returns the picked values.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
     *
     * _.at(object, ['a[0].b.c', 'a[1]']);
     * // => [3, 4]
     */
    var at = flatRest(baseAt);

    /**
     * Creates an object that inherits from the `prototype` object. If a
     * `properties` object is given, its own enumerable string keyed properties
     * are assigned to the created object.
     *
     * @static
     * @memberOf _
     * @since 2.3.0
     * @category Object
     * @param {Object} prototype The object to inherit from.
     * @param {Object} [properties] The properties to assign to the object.
     * @returns {Object} Returns the new object.
     * @example
     *
     * function Shape() {
     *   this.x = 0;
     *   this.y = 0;
     * }
     *
     * function Circle() {
     *   Shape.call(this);
     * }
     *
     * Circle.prototype = _.create(Shape.prototype, {
     *   'constructor': Circle
     * });
     *
     * var circle = new Circle;
     * circle instanceof Circle;
     * // => true
     *
     * circle instanceof Shape;
     * // => true
     */
    function create(prototype, properties) {
      var result = baseCreate(prototype);
      return properties == null ? result : baseAssign(result, properties);
    }

    /**
     * Assigns own and inherited enumerable string keyed properties of source
     * objects to the destination object for all destination properties that
     * resolve to `undefined`. Source objects are applied from left to right.
     * Once a property is set, additional values of the same property are ignored.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.defaultsDeep
     * @example
     *
     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
     * // => { 'a': 1, 'b': 2 }
     */
    var defaults = baseRest(function(object, sources) {
      object = Object(object);

      var index = -1;
      var length = sources.length;
      var guard = length > 2 ? sources[2] : undefined;

      if (guard && isIterateeCall(sources[0], sources[1], guard)) {
        length = 1;
      }

      while (++index < length) {
        var source = sources[index];
        var props = keysIn(source);
        var propsIndex = -1;
        var propsLength = props.length;

        while (++propsIndex < propsLength) {
          var key = props[propsIndex];
          var value = object[key];

          if (value === undefined ||
              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
            object[key] = source[key];
          }
        }
      }

      return object;
    });

    /**
     * This method is like `_.defaults` except that it recursively assigns
     * default properties.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @see _.defaults
     * @example
     *
     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
     * // => { 'a': { 'b': 2, 'c': 3 } }
     */
    var defaultsDeep = baseRest(function(args) {
      args.push(undefined, customDefaultsMerge);
      return apply(mergeWith, undefined, args);
    });

    /**
     * This method is like `_.find` except that it returns the key of the first
     * element `predicate` returns truthy for instead of the element itself.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {string|undefined} Returns the key of the matched element,
     *  else `undefined`.
     * @example
     *
     * var users = {
     *   'barney':  { 'age': 36, 'active': true },
     *   'fred':    { 'age': 40, 'active': false },
     *   'pebbles': { 'age': 1,  'active': true }
     * };
     *
     * _.findKey(users, function(o) { return o.age < 40; });
     * // => 'barney' (iteration order is not guaranteed)
     *
     * // The `_.matches` iteratee shorthand.
     * _.findKey(users, { 'age': 1, 'active': true });
     * // => 'pebbles'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findKey(users, ['active', false]);
     * // => 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.findKey(users, 'active');
     * // => 'barney'
     */
    function findKey(object, predicate) {
      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
    }

    /**
     * This method is like `_.findKey` except that it iterates over elements of
     * a collection in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @param {Function} [predicate=_.identity] The function invoked per iteration.
     * @returns {string|undefined} Returns the key of the matched element,
     *  else `undefined`.
     * @example
     *
     * var users = {
     *   'barney':  { 'age': 36, 'active': true },
     *   'fred':    { 'age': 40, 'active': false },
     *   'pebbles': { 'age': 1,  'active': true }
     * };
     *
     * _.findLastKey(users, function(o) { return o.age < 40; });
     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
     *
     * // The `_.matches` iteratee shorthand.
     * _.findLastKey(users, { 'age': 36, 'active': true });
     * // => 'barney'
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.findLastKey(users, ['active', false]);
     * // => 'fred'
     *
     * // The `_.property` iteratee shorthand.
     * _.findLastKey(users, 'active');
     * // => 'pebbles'
     */
    function findLastKey(object, predicate) {
      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
    }

    /**
     * Iterates over own and inherited enumerable string keyed properties of an
     * object and invokes `iteratee` for each property. The iteratee is invoked
     * with three arguments: (value, key, object). Iteratee functions may exit
     * iteration early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 0.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forInRight
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forIn(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
     */
    function forIn(object, iteratee) {
      return object == null
        ? object
        : baseFor(object, getIteratee(iteratee, 3), keysIn);
    }

    /**
     * This method is like `_.forIn` except that it iterates over properties of
     * `object` in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forIn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forInRight(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
     */
    function forInRight(object, iteratee) {
      return object == null
        ? object
        : baseForRight(object, getIteratee(iteratee, 3), keysIn);
    }

    /**
     * Iterates over own enumerable string keyed properties of an object and
     * invokes `iteratee` for each property. The iteratee is invoked with three
     * arguments: (value, key, object). Iteratee functions may exit iteration
     * early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 0.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forOwnRight
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forOwn(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
     */
    function forOwn(object, iteratee) {
      return object && baseForOwn(object, getIteratee(iteratee, 3));
    }

    /**
     * This method is like `_.forOwn` except that it iterates over properties of
     * `object` in the opposite order.
     *
     * @static
     * @memberOf _
     * @since 2.0.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns `object`.
     * @see _.forOwn
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.forOwnRight(new Foo, function(value, key) {
     *   console.log(key);
     * });
     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
     */
    function forOwnRight(object, iteratee) {
      return object && baseForOwnRight(object, getIteratee(iteratee, 3));
    }

    /**
     * Creates an array of function property names from own enumerable properties
     * of `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to inspect.
     * @returns {Array} Returns the function names.
     * @see _.functionsIn
     * @example
     *
     * function Foo() {
     *   this.a = _.constant('a');
     *   this.b = _.constant('b');
     * }
     *
     * Foo.prototype.c = _.constant('c');
     *
     * _.functions(new Foo);
     * // => ['a', 'b']
     */
    function functions(object) {
      return object == null ? [] : baseFunctions(object, keys(object));
    }

    /**
     * Creates an array of function property names from own and inherited
     * enumerable properties of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to inspect.
     * @returns {Array} Returns the function names.
     * @see _.functions
     * @example
     *
     * function Foo() {
     *   this.a = _.constant('a');
     *   this.b = _.constant('b');
     * }
     *
     * Foo.prototype.c = _.constant('c');
     *
     * _.functionsIn(new Foo);
     * // => ['a', 'b', 'c']
     */
    function functionsIn(object) {
      return object == null ? [] : baseFunctions(object, keysIn(object));
    }

    /**
     * Gets the value at `path` of `object`. If the resolved value is
     * `undefined`, the `defaultValue` is returned in its place.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to get.
     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.get(object, 'a[0].b.c');
     * // => 3
     *
     * _.get(object, ['a', '0', 'b', 'c']);
     * // => 3
     *
     * _.get(object, 'a.b.c', 'default');
     * // => 'default'
     */
    function get(object, path, defaultValue) {
      var result = object == null ? undefined : baseGet(object, path);
      return result === undefined ? defaultValue : result;
    }

    /**
     * Checks if `path` is a direct property of `object`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     * @example
     *
     * var object = { 'a': { 'b': 2 } };
     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
     *
     * _.has(object, 'a');
     * // => true
     *
     * _.has(object, 'a.b');
     * // => true
     *
     * _.has(object, ['a', 'b']);
     * // => true
     *
     * _.has(other, 'a');
     * // => false
     */
    function has(object, path) {
      return object != null && hasPath(object, path, baseHas);
    }

    /**
     * Checks if `path` is a direct or inherited property of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     * @example
     *
     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
     *
     * _.hasIn(object, 'a');
     * // => true
     *
     * _.hasIn(object, 'a.b');
     * // => true
     *
     * _.hasIn(object, ['a', 'b']);
     * // => true
     *
     * _.hasIn(object, 'b');
     * // => false
     */
    function hasIn(object, path) {
      return object != null && hasPath(object, path, baseHasIn);
    }

    /**
     * Creates an object composed of the inverted keys and values of `object`.
     * If `object` contains duplicate values, subsequent values overwrite
     * property assignments of previous values.
     *
     * @static
     * @memberOf _
     * @since 0.7.0
     * @category Object
     * @param {Object} object The object to invert.
     * @returns {Object} Returns the new inverted object.
     * @example
     *
     * var object = { 'a': 1, 'b': 2, 'c': 1 };
     *
     * _.invert(object);
     * // => { '1': 'c', '2': 'b' }
     */
    var invert = createInverter(function(result, value, key) {
      if (value != null &&
          typeof value.toString != 'function') {
        value = nativeObjectToString.call(value);
      }

      result[value] = key;
    }, constant(identity));

    /**
     * This method is like `_.invert` except that the inverted object is generated
     * from the results of running each element of `object` thru `iteratee`. The
     * corresponding inverted value of each inverted key is an array of keys
     * responsible for generating the inverted value. The iteratee is invoked
     * with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.1.0
     * @category Object
     * @param {Object} object The object to invert.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {Object} Returns the new inverted object.
     * @example
     *
     * var object = { 'a': 1, 'b': 2, 'c': 1 };
     *
     * _.invertBy(object);
     * // => { '1': ['a', 'c'], '2': ['b'] }
     *
     * _.invertBy(object, function(value) {
     *   return 'group' + value;
     * });
     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
     */
    var invertBy = createInverter(function(result, value, key) {
      if (value != null &&
          typeof value.toString != 'function') {
        value = nativeObjectToString.call(value);
      }

      if (hasOwnProperty.call(result, value)) {
        result[value].push(key);
      } else {
        result[value] = [key];
      }
    }, getIteratee);

    /**
     * Invokes the method at `path` of `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the method to invoke.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {*} Returns the result of the invoked method.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
     *
     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
     * // => [2, 3]
     */
    var invoke = baseRest(baseInvoke);

    /**
     * Creates an array of the own enumerable property names of `object`.
     *
     * **Note:** Non-object values are coerced to objects. See the
     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
     * for more details.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.keys(new Foo);
     * // => ['a', 'b'] (iteration order is not guaranteed)
     *
     * _.keys('hi');
     * // => ['0', '1']
     */
    function keys(object) {
      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
    }

    /**
     * Creates an array of the own and inherited enumerable property names of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property names.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.keysIn(new Foo);
     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
     */
    function keysIn(object) {
      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
    }

    /**
     * The opposite of `_.mapValues`; this method creates an object with the
     * same values as `object` and keys generated by running each own enumerable
     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
     * with three arguments: (value, key, object).
     *
     * @static
     * @memberOf _
     * @since 3.8.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns the new mapped object.
     * @see _.mapValues
     * @example
     *
     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
     *   return key + value;
     * });
     * // => { 'a1': 1, 'b2': 2 }
     */
    function mapKeys(object, iteratee) {
      var result = {};
      iteratee = getIteratee(iteratee, 3);

      baseForOwn(object, function(value, key, object) {
        baseAssignValue(result, iteratee(value, key, object), value);
      });
      return result;
    }

    /**
     * Creates an object with the same keys as `object` and values generated
     * by running each own enumerable string keyed property of `object` thru
     * `iteratee`. The iteratee is invoked with three arguments:
     * (value, key, object).
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Object} Returns the new mapped object.
     * @see _.mapKeys
     * @example
     *
     * var users = {
     *   'fred':    { 'user': 'fred',    'age': 40 },
     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
     * };
     *
     * _.mapValues(users, function(o) { return o.age; });
     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
     *
     * // The `_.property` iteratee shorthand.
     * _.mapValues(users, 'age');
     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
     */
    function mapValues(object, iteratee) {
      var result = {};
      iteratee = getIteratee(iteratee, 3);

      baseForOwn(object, function(value, key, object) {
        baseAssignValue(result, key, iteratee(value, key, object));
      });
      return result;
    }

    /**
     * This method is like `_.assign` except that it recursively merges own and
     * inherited enumerable string keyed properties of source objects into the
     * destination object. Source properties that resolve to `undefined` are
     * skipped if a destination value exists. Array and plain object properties
     * are merged recursively. Other objects and value types are overridden by
     * assignment. Source objects are applied from left to right. Subsequent
     * sources overwrite property assignments of previous sources.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 0.5.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} [sources] The source objects.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {
     *   'a': [{ 'b': 2 }, { 'd': 4 }]
     * };
     *
     * var other = {
     *   'a': [{ 'c': 3 }, { 'e': 5 }]
     * };
     *
     * _.merge(object, other);
     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
     */
    var merge = createAssigner(function(object, source, srcIndex) {
      baseMerge(object, source, srcIndex);
    });

    /**
     * This method is like `_.merge` except that it accepts `customizer` which
     * is invoked to produce the merged values of the destination and source
     * properties. If `customizer` returns `undefined`, merging is handled by the
     * method instead. The `customizer` is invoked with six arguments:
     * (objValue, srcValue, key, object, source, stack).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The destination object.
     * @param {...Object} sources The source objects.
     * @param {Function} customizer The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * function customizer(objValue, srcValue) {
     *   if (_.isArray(objValue)) {
     *     return objValue.concat(srcValue);
     *   }
     * }
     *
     * var object = { 'a': [1], 'b': [2] };
     * var other = { 'a': [3], 'b': [4] };
     *
     * _.mergeWith(object, other, customizer);
     * // => { 'a': [1, 3], 'b': [2, 4] }
     */
    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
      baseMerge(object, source, srcIndex, customizer);
    });

    /**
     * The opposite of `_.pick`; this method creates an object composed of the
     * own and inherited enumerable property paths of `object` that are not omitted.
     *
     * **Note:** This method is considerably slower than `_.pick`.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The source object.
     * @param {...(string|string[])} [paths] The property paths to omit.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.omit(object, ['a', 'c']);
     * // => { 'b': '2' }
     */
    var omit = flatRest(function(object, paths) {
      var result = {};
      if (object == null) {
        return result;
      }
      var isDeep = false;
      paths = arrayMap(paths, function(path) {
        path = castPath(path, object);
        isDeep || (isDeep = path.length > 1);
        return path;
      });
      copyObject(object, getAllKeysIn(object), result);
      if (isDeep) {
        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
      }
      var length = paths.length;
      while (length--) {
        baseUnset(result, paths[length]);
      }
      return result;
    });

    /**
     * The opposite of `_.pickBy`; this method creates an object composed of
     * the own and inherited enumerable string keyed properties of `object` that
     * `predicate` doesn't return truthy for. The predicate is invoked with two
     * arguments: (value, key).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The source object.
     * @param {Function} [predicate=_.identity] The function invoked per property.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.omitBy(object, _.isNumber);
     * // => { 'b': '2' }
     */
    function omitBy(object, predicate) {
      return pickBy(object, negate(getIteratee(predicate)));
    }

    /**
     * Creates an object composed of the picked `object` properties.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The source object.
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.pick(object, ['a', 'c']);
     * // => { 'a': 1, 'c': 3 }
     */
    var pick = flatRest(function(object, paths) {
      return object == null ? {} : basePick(object, paths);
    });

    /**
     * Creates an object composed of the `object` properties `predicate` returns
     * truthy for. The predicate is invoked with two arguments: (value, key).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The source object.
     * @param {Function} [predicate=_.identity] The function invoked per property.
     * @returns {Object} Returns the new object.
     * @example
     *
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
     *
     * _.pickBy(object, _.isNumber);
     * // => { 'a': 1, 'c': 3 }
     */
    function pickBy(object, predicate) {
      if (object == null) {
        return {};
      }
      var props = arrayMap(getAllKeysIn(object), function(prop) {
        return [prop];
      });
      predicate = getIteratee(predicate);
      return basePickBy(object, props, function(value, path) {
        return predicate(value, path[0]);
      });
    }

    /**
     * This method is like `_.get` except that if the resolved value is a
     * function it's invoked with the `this` binding of its parent object and
     * its result is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to resolve.
     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
     *
     * _.result(object, 'a[0].b.c1');
     * // => 3
     *
     * _.result(object, 'a[0].b.c2');
     * // => 4
     *
     * _.result(object, 'a[0].b.c3', 'default');
     * // => 'default'
     *
     * _.result(object, 'a[0].b.c3', _.constant('default'));
     * // => 'default'
     */
    function result(object, path, defaultValue) {
      path = castPath(path, object);

      var index = -1,
          length = path.length;

      // Ensure the loop is entered when path is empty.
      if (!length) {
        length = 1;
        object = undefined;
      }
      while (++index < length) {
        var value = object == null ? undefined : object[toKey(path[index])];
        if (value === undefined) {
          index = length;
          value = defaultValue;
        }
        object = isFunction(value) ? value.call(object) : value;
      }
      return object;
    }

    /**
     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
     * it's created. Arrays are created for missing index properties while objects
     * are created for all other missing properties. Use `_.setWith` to customize
     * `path` creation.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.set(object, 'a[0].b.c', 4);
     * console.log(object.a[0].b.c);
     * // => 4
     *
     * _.set(object, ['x', '0', 'y', 'z'], 5);
     * console.log(object.x[0].y.z);
     * // => 5
     */
    function set(object, path, value) {
      return object == null ? object : baseSet(object, path, value);
    }

    /**
     * This method is like `_.set` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.setWith(object, '[0][1]', 'a', Object);
     * // => { '0': { '1': 'a' } }
     */
    function setWith(object, path, value, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return object == null ? object : baseSet(object, path, value, customizer);
    }

    /**
     * Creates an array of own enumerable string keyed-value pairs for `object`
     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
     * entries are returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias entries
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the key-value pairs.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.toPairs(new Foo);
     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
     */
    var toPairs = createToPairs(keys);

    /**
     * Creates an array of own and inherited enumerable string keyed-value pairs
     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
     * or set, its entries are returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @alias entriesIn
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the key-value pairs.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.toPairsIn(new Foo);
     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
     */
    var toPairsIn = createToPairs(keysIn);

    /**
     * An alternative to `_.reduce`; this method transforms `object` to a new
     * `accumulator` object which is the result of running each of its own
     * enumerable string keyed properties thru `iteratee`, with each invocation
     * potentially mutating the `accumulator` object. If `accumulator` is not
     * provided, a new object with the same `[[Prototype]]` will be used. The
     * iteratee is invoked with four arguments: (accumulator, value, key, object).
     * Iteratee functions may exit iteration early by explicitly returning `false`.
     *
     * @static
     * @memberOf _
     * @since 1.3.0
     * @category Object
     * @param {Object} object The object to iterate over.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @param {*} [accumulator] The custom accumulator value.
     * @returns {*} Returns the accumulated value.
     * @example
     *
     * _.transform([2, 3, 4], function(result, n) {
     *   result.push(n *= n);
     *   return n % 2 == 0;
     * }, []);
     * // => [4, 9]
     *
     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
     *   (result[value] || (result[value] = [])).push(key);
     * }, {});
     * // => { '1': ['a', 'c'], '2': ['b'] }
     */
    function transform(object, iteratee, accumulator) {
      var isArr = isArray(object),
          isArrLike = isArr || isBuffer(object) || isTypedArray(object);

      iteratee = getIteratee(iteratee, 4);
      if (accumulator == null) {
        var Ctor = object && object.constructor;
        if (isArrLike) {
          accumulator = isArr ? new Ctor : [];
        }
        else if (isObject(object)) {
          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
        }
        else {
          accumulator = {};
        }
      }
      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
        return iteratee(accumulator, value, index, object);
      });
      return accumulator;
    }

    /**
     * Removes the property at `path` of `object`.
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to unset.
     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
     * _.unset(object, 'a[0].b.c');
     * // => true
     *
     * console.log(object);
     * // => { 'a': [{ 'b': {} }] };
     *
     * _.unset(object, ['a', '0', 'b', 'c']);
     * // => true
     *
     * console.log(object);
     * // => { 'a': [{ 'b': {} }] };
     */
    function unset(object, path) {
      return object == null ? true : baseUnset(object, path);
    }

    /**
     * This method is like `_.set` except that accepts `updater` to produce the
     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
     * is invoked with one argument: (value).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {Function} updater The function to produce the updated value.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
     *
     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
     * console.log(object.a[0].b.c);
     * // => 9
     *
     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
     * console.log(object.x[0].y.z);
     * // => 0
     */
    function update(object, path, updater) {
      return object == null ? object : baseUpdate(object, path, castFunction(updater));
    }

    /**
     * This method is like `_.update` except that it accepts `customizer` which is
     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
     * path creation is handled by the method instead. The `customizer` is invoked
     * with three arguments: (nsValue, key, nsObject).
     *
     * **Note:** This method mutates `object`.
     *
     * @static
     * @memberOf _
     * @since 4.6.0
     * @category Object
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {Function} updater The function to produce the updated value.
     * @param {Function} [customizer] The function to customize assigned values.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var object = {};
     *
     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
     * // => { '0': { '1': 'a' } }
     */
    function updateWith(object, path, updater, customizer) {
      customizer = typeof customizer == 'function' ? customizer : undefined;
      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
    }

    /**
     * Creates an array of the own enumerable string keyed property values of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property values.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.values(new Foo);
     * // => [1, 2] (iteration order is not guaranteed)
     *
     * _.values('hi');
     * // => ['h', 'i']
     */
    function values(object) {
      return object == null ? [] : baseValues(object, keys(object));
    }

    /**
     * Creates an array of the own and inherited enumerable string keyed property
     * values of `object`.
     *
     * **Note:** Non-object values are coerced to objects.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Object
     * @param {Object} object The object to query.
     * @returns {Array} Returns the array of property values.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     *   this.b = 2;
     * }
     *
     * Foo.prototype.c = 3;
     *
     * _.valuesIn(new Foo);
     * // => [1, 2, 3] (iteration order is not guaranteed)
     */
    function valuesIn(object) {
      return object == null ? [] : baseValues(object, keysIn(object));
    }

    /*------------------------------------------------------------------------*/

    /**
     * Clamps `number` within the inclusive `lower` and `upper` bounds.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Number
     * @param {number} number The number to clamp.
     * @param {number} [lower] The lower bound.
     * @param {number} upper The upper bound.
     * @returns {number} Returns the clamped number.
     * @example
     *
     * _.clamp(-10, -5, 5);
     * // => -5
     *
     * _.clamp(10, -5, 5);
     * // => 5
     */
    function clamp(number, lower, upper) {
      if (upper === undefined) {
        upper = lower;
        lower = undefined;
      }
      if (upper !== undefined) {
        upper = toNumber(upper);
        upper = upper === upper ? upper : 0;
      }
      if (lower !== undefined) {
        lower = toNumber(lower);
        lower = lower === lower ? lower : 0;
      }
      return baseClamp(toNumber(number), lower, upper);
    }

    /**
     * Checks if `n` is between `start` and up to, but not including, `end`. If
     * `end` is not specified, it's set to `start` with `start` then set to `0`.
     * If `start` is greater than `end` the params are swapped to support
     * negative ranges.
     *
     * @static
     * @memberOf _
     * @since 3.3.0
     * @category Number
     * @param {number} number The number to check.
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
     * @see _.range, _.rangeRight
     * @example
     *
     * _.inRange(3, 2, 4);
     * // => true
     *
     * _.inRange(4, 8);
     * // => true
     *
     * _.inRange(4, 2);
     * // => false
     *
     * _.inRange(2, 2);
     * // => false
     *
     * _.inRange(1.2, 2);
     * // => true
     *
     * _.inRange(5.2, 4);
     * // => false
     *
     * _.inRange(-3, -2, -6);
     * // => true
     */
    function inRange(number, start, end) {
      start = toFinite(start);
      if (end === undefined) {
        end = start;
        start = 0;
      } else {
        end = toFinite(end);
      }
      number = toNumber(number);
      return baseInRange(number, start, end);
    }

    /**
     * Produces a random number between the inclusive `lower` and `upper` bounds.
     * If only one argument is provided a number between `0` and the given number
     * is returned. If `floating` is `true`, or either `lower` or `upper` are
     * floats, a floating-point number is returned instead of an integer.
     *
     * **Note:** JavaScript follows the IEEE-754 standard for resolving
     * floating-point values which can produce unexpected results.
     *
     * @static
     * @memberOf _
     * @since 0.7.0
     * @category Number
     * @param {number} [lower=0] The lower bound.
     * @param {number} [upper=1] The upper bound.
     * @param {boolean} [floating] Specify returning a floating-point number.
     * @returns {number} Returns the random number.
     * @example
     *
     * _.random(0, 5);
     * // => an integer between 0 and 5
     *
     * _.random(5);
     * // => also an integer between 0 and 5
     *
     * _.random(5, true);
     * // => a floating-point number between 0 and 5
     *
     * _.random(1.2, 5.2);
     * // => a floating-point number between 1.2 and 5.2
     */
    function random(lower, upper, floating) {
      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
        upper = floating = undefined;
      }
      if (floating === undefined) {
        if (typeof upper == 'boolean') {
          floating = upper;
          upper = undefined;
        }
        else if (typeof lower == 'boolean') {
          floating = lower;
          lower = undefined;
        }
      }
      if (lower === undefined && upper === undefined) {
        lower = 0;
        upper = 1;
      }
      else {
        lower = toFinite(lower);
        if (upper === undefined) {
          upper = lower;
          lower = 0;
        } else {
          upper = toFinite(upper);
        }
      }
      if (lower > upper) {
        var temp = lower;
        lower = upper;
        upper = temp;
      }
      if (floating || lower % 1 || upper % 1) {
        var rand = nativeRandom();
        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
      }
      return baseRandom(lower, upper);
    }

    /*------------------------------------------------------------------------*/

    /**
     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the camel cased string.
     * @example
     *
     * _.camelCase('Foo Bar');
     * // => 'fooBar'
     *
     * _.camelCase('--foo-bar--');
     * // => 'fooBar'
     *
     * _.camelCase('__FOO_BAR__');
     * // => 'fooBar'
     */
    var camelCase = createCompounder(function(result, word, index) {
      word = word.toLowerCase();
      return result + (index ? capitalize(word) : word);
    });

    /**
     * Converts the first character of `string` to upper case and the remaining
     * to lower case.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to capitalize.
     * @returns {string} Returns the capitalized string.
     * @example
     *
     * _.capitalize('FRED');
     * // => 'Fred'
     */
    function capitalize(string) {
      return upperFirst(toString(string).toLowerCase());
    }

    /**
     * Deburrs `string` by converting
     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
     * letters to basic Latin letters and removing
     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to deburr.
     * @returns {string} Returns the deburred string.
     * @example
     *
     * _.deburr('déjà vu');
     * // => 'deja vu'
     */
    function deburr(string) {
      string = toString(string);
      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
    }

    /**
     * Checks if `string` ends with the given target string.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {string} [target] The string to search for.
     * @param {number} [position=string.length] The position to search up to.
     * @returns {boolean} Returns `true` if `string` ends with `target`,
     *  else `false`.
     * @example
     *
     * _.endsWith('abc', 'c');
     * // => true
     *
     * _.endsWith('abc', 'b');
     * // => false
     *
     * _.endsWith('abc', 'b', 2);
     * // => true
     */
    function endsWith(string, target, position) {
      string = toString(string);
      target = baseToString(target);

      var length = string.length;
      position = position === undefined
        ? length
        : baseClamp(toInteger(position), 0, length);

      var end = position;
      position -= target.length;
      return position >= 0 && string.slice(position, end) == target;
    }

    /**
     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
     * corresponding HTML entities.
     *
     * **Note:** No other characters are escaped. To escape additional
     * characters use a third-party library like [_he_](https://mths.be/he).
     *
     * Though the ">" character is escaped for symmetry, characters like
     * ">" and "/" don't need escaping in HTML and have no special meaning
     * unless they're part of a tag or unquoted attribute value. See
     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
     * (under "semi-related fun fact") for more details.
     *
     * When working with HTML you should always
     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
     * XSS vectors.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category String
     * @param {string} [string=''] The string to escape.
     * @returns {string} Returns the escaped string.
     * @example
     *
     * _.escape('fred, barney, & pebbles');
     * // => 'fred, barney, &amp; pebbles'
     */
    function escape(string) {
      string = toString(string);
      return (string && reHasUnescapedHtml.test(string))
        ? string.replace(reUnescapedHtml, escapeHtmlChar)
        : string;
    }

    /**
     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to escape.
     * @returns {string} Returns the escaped string.
     * @example
     *
     * _.escapeRegExp('[lodash](https://lodash.com/)');
     * // => '\[lodash\]\(https://lodash\.com/\)'
     */
    function escapeRegExp(string) {
      string = toString(string);
      return (string && reHasRegExpChar.test(string))
        ? string.replace(reRegExpChar, '\\$&')
        : string;
    }

    /**
     * Converts `string` to
     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the kebab cased string.
     * @example
     *
     * _.kebabCase('Foo Bar');
     * // => 'foo-bar'
     *
     * _.kebabCase('fooBar');
     * // => 'foo-bar'
     *
     * _.kebabCase('__FOO_BAR__');
     * // => 'foo-bar'
     */
    var kebabCase = createCompounder(function(result, word, index) {
      return result + (index ? '-' : '') + word.toLowerCase();
    });

    /**
     * Converts `string`, as space separated words, to lower case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the lower cased string.
     * @example
     *
     * _.lowerCase('--Foo-Bar--');
     * // => 'foo bar'
     *
     * _.lowerCase('fooBar');
     * // => 'foo bar'
     *
     * _.lowerCase('__FOO_BAR__');
     * // => 'foo bar'
     */
    var lowerCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + word.toLowerCase();
    });

    /**
     * Converts the first character of `string` to lower case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.lowerFirst('Fred');
     * // => 'fred'
     *
     * _.lowerFirst('FRED');
     * // => 'fRED'
     */
    var lowerFirst = createCaseFirst('toLowerCase');

    /**
     * Pads `string` on the left and right sides if it's shorter than `length`.
     * Padding characters are truncated if they can't be evenly divided by `length`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.pad('abc', 8);
     * // => '  abc   '
     *
     * _.pad('abc', 8, '_-');
     * // => '_-abc_-_'
     *
     * _.pad('abc', 3);
     * // => 'abc'
     */
    function pad(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      if (!length || strLength >= length) {
        return string;
      }
      var mid = (length - strLength) / 2;
      return (
        createPadding(nativeFloor(mid), chars) +
        string +
        createPadding(nativeCeil(mid), chars)
      );
    }

    /**
     * Pads `string` on the right side if it's shorter than `length`. Padding
     * characters are truncated if they exceed `length`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.padEnd('abc', 6);
     * // => 'abc   '
     *
     * _.padEnd('abc', 6, '_-');
     * // => 'abc_-_'
     *
     * _.padEnd('abc', 3);
     * // => 'abc'
     */
    function padEnd(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      return (length && strLength < length)
        ? (string + createPadding(length - strLength, chars))
        : string;
    }

    /**
     * Pads `string` on the left side if it's shorter than `length`. Padding
     * characters are truncated if they exceed `length`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to pad.
     * @param {number} [length=0] The padding length.
     * @param {string} [chars=' '] The string used as padding.
     * @returns {string} Returns the padded string.
     * @example
     *
     * _.padStart('abc', 6);
     * // => '   abc'
     *
     * _.padStart('abc', 6, '_-');
     * // => '_-_abc'
     *
     * _.padStart('abc', 3);
     * // => 'abc'
     */
    function padStart(string, length, chars) {
      string = toString(string);
      length = toInteger(length);

      var strLength = length ? stringSize(string) : 0;
      return (length && strLength < length)
        ? (createPadding(length - strLength, chars) + string)
        : string;
    }

    /**
     * Converts `string` to an integer of the specified radix. If `radix` is
     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
     * hexadecimal, in which case a `radix` of `16` is used.
     *
     * **Note:** This method aligns with the
     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
     *
     * @static
     * @memberOf _
     * @since 1.1.0
     * @category String
     * @param {string} string The string to convert.
     * @param {number} [radix=10] The radix to interpret `value` by.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {number} Returns the converted integer.
     * @example
     *
     * _.parseInt('08');
     * // => 8
     *
     * _.map(['6', '08', '10'], _.parseInt);
     * // => [6, 8, 10]
     */
    function parseInt(string, radix, guard) {
      if (guard || radix == null) {
        radix = 0;
      } else if (radix) {
        radix = +radix;
      }
      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
    }

    /**
     * Repeats the given string `n` times.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to repeat.
     * @param {number} [n=1] The number of times to repeat the string.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the repeated string.
     * @example
     *
     * _.repeat('*', 3);
     * // => '***'
     *
     * _.repeat('abc', 2);
     * // => 'abcabc'
     *
     * _.repeat('abc', 0);
     * // => ''
     */
    function repeat(string, n, guard) {
      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
        n = 1;
      } else {
        n = toInteger(n);
      }
      return baseRepeat(toString(string), n);
    }

    /**
     * Replaces matches for `pattern` in `string` with `replacement`.
     *
     * **Note:** This method is based on
     * [`String#replace`](https://mdn.io/String/replace).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to modify.
     * @param {RegExp|string} pattern The pattern to replace.
     * @param {Function|string} replacement The match replacement.
     * @returns {string} Returns the modified string.
     * @example
     *
     * _.replace('Hi Fred', 'Fred', 'Barney');
     * // => 'Hi Barney'
     */
    function replace() {
      var args = arguments,
          string = toString(args[0]);

      return args.length < 3 ? string : string.replace(args[1], args[2]);
    }

    /**
     * Converts `string` to
     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the snake cased string.
     * @example
     *
     * _.snakeCase('Foo Bar');
     * // => 'foo_bar'
     *
     * _.snakeCase('fooBar');
     * // => 'foo_bar'
     *
     * _.snakeCase('--FOO-BAR--');
     * // => 'foo_bar'
     */
    var snakeCase = createCompounder(function(result, word, index) {
      return result + (index ? '_' : '') + word.toLowerCase();
    });

    /**
     * Splits `string` by `separator`.
     *
     * **Note:** This method is based on
     * [`String#split`](https://mdn.io/String/split).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to split.
     * @param {RegExp|string} separator The separator pattern to split by.
     * @param {number} [limit] The length to truncate results to.
     * @returns {Array} Returns the string segments.
     * @example
     *
     * _.split('a-b-c', '-', 2);
     * // => ['a', 'b']
     */
    function split(string, separator, limit) {
      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
        separator = limit = undefined;
      }
      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
      if (!limit) {
        return [];
      }
      string = toString(string);
      if (string && (
            typeof separator == 'string' ||
            (separator != null && !isRegExp(separator))
          )) {
        separator = baseToString(separator);
        if (!separator && hasUnicode(string)) {
          return castSlice(stringToArray(string), 0, limit);
        }
      }
      return string.split(separator, limit);
    }

    /**
     * Converts `string` to
     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
     *
     * @static
     * @memberOf _
     * @since 3.1.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the start cased string.
     * @example
     *
     * _.startCase('--foo-bar--');
     * // => 'Foo Bar'
     *
     * _.startCase('fooBar');
     * // => 'Foo Bar'
     *
     * _.startCase('__FOO_BAR__');
     * // => 'FOO BAR'
     */
    var startCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + upperFirst(word);
    });

    /**
     * Checks if `string` starts with the given target string.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {string} [target] The string to search for.
     * @param {number} [position=0] The position to search from.
     * @returns {boolean} Returns `true` if `string` starts with `target`,
     *  else `false`.
     * @example
     *
     * _.startsWith('abc', 'a');
     * // => true
     *
     * _.startsWith('abc', 'b');
     * // => false
     *
     * _.startsWith('abc', 'b', 1);
     * // => true
     */
    function startsWith(string, target, position) {
      string = toString(string);
      position = position == null
        ? 0
        : baseClamp(toInteger(position), 0, string.length);

      target = baseToString(target);
      return string.slice(position, position + target.length) == target;
    }

    /**
     * Creates a compiled template function that can interpolate data properties
     * in "interpolate" delimiters, HTML-escape interpolated data properties in
     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
     * properties may be accessed as free variables in the template. If a setting
     * object is given, it takes precedence over `_.templateSettings` values.
     *
     * **Note:** In the development build `_.template` utilizes
     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
     * for easier debugging.
     *
     * For more information on precompiling templates see
     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
     *
     * For more information on Chrome extension sandboxes see
     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category String
     * @param {string} [string=''] The template string.
     * @param {Object} [options={}] The options object.
     * @param {RegExp} [options.escape=_.templateSettings.escape]
     *  The HTML "escape" delimiter.
     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
     *  The "evaluate" delimiter.
     * @param {Object} [options.imports=_.templateSettings.imports]
     *  An object to import into the template as free variables.
     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
     *  The "interpolate" delimiter.
     * @param {string} [options.sourceURL='lodash.templateSources[n]']
     *  The sourceURL of the compiled template.
     * @param {string} [options.variable='obj']
     *  The data object variable name.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Function} Returns the compiled template function.
     * @example
     *
     * // Use the "interpolate" delimiter to create a compiled template.
     * var compiled = _.template('hello <%= user %>!');
     * compiled({ 'user': 'fred' });
     * // => 'hello fred!'
     *
     * // Use the HTML "escape" delimiter to escape data property values.
     * var compiled = _.template('<b><%- value %></b>');
     * compiled({ 'value': '<script>' });
     * // => '<b>&lt;script&gt;</b>'
     *
     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
     * compiled({ 'users': ['fred', 'barney'] });
     * // => '<li>fred</li><li>barney</li>'
     *
     * // Use the internal `print` function in "evaluate" delimiters.
     * var compiled = _.template('<% print("hello " + user); %>!');
     * compiled({ 'user': 'barney' });
     * // => 'hello barney!'
     *
     * // Use the ES template literal delimiter as an "interpolate" delimiter.
     * // Disable support by replacing the "interpolate" delimiter.
     * var compiled = _.template('hello ${ user }!');
     * compiled({ 'user': 'pebbles' });
     * // => 'hello pebbles!'
     *
     * // Use backslashes to treat delimiters as plain text.
     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
     * compiled({ 'value': 'ignored' });
     * // => '<%- value %>'
     *
     * // Use the `imports` option to import `jQuery` as `jq`.
     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
     * compiled({ 'users': ['fred', 'barney'] });
     * // => '<li>fred</li><li>barney</li>'
     *
     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
     * compiled(data);
     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
     *
     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
     * compiled.source;
     * // => function(data) {
     * //   var __t, __p = '';
     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
     * //   return __p;
     * // }
     *
     * // Use custom template delimiters.
     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
     * var compiled = _.template('hello {{ user }}!');
     * compiled({ 'user': 'mustache' });
     * // => 'hello mustache!'
     *
     * // Use the `source` property to inline compiled templates for meaningful
     * // line numbers in error messages and stack traces.
     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
     *   var JST = {\
     *     "main": ' + _.template(mainText).source + '\
     *   };\
     * ');
     */
    function template(string, options, guard) {
      // Based on John Resig's `tmpl` implementation
      // (http://ejohn.org/blog/javascript-micro-templating/)
      // and Laura Doktorova's doT.js (https://github.com/olado/doT).
      var settings = lodash.templateSettings;

      if (guard && isIterateeCall(string, options, guard)) {
        options = undefined;
      }
      string = toString(string);
      options = assignInWith({}, options, settings, customDefaultsAssignIn);

      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
          importsKeys = keys(imports),
          importsValues = baseValues(imports, importsKeys);

      var isEscaping,
          isEvaluating,
          index = 0,
          interpolate = options.interpolate || reNoMatch,
          source = "__p += '";

      // Compile the regexp to match each delimiter.
      var reDelimiters = RegExp(
        (options.escape || reNoMatch).source + '|' +
        interpolate.source + '|' +
        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
        (options.evaluate || reNoMatch).source + '|$'
      , 'g');

      // Use a sourceURL for easier debugging.
      // The sourceURL gets injected into the source that's eval-ed, so be careful
      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
      // and escape the comment, thus injecting code that gets evaled.
      var sourceURL = '//# sourceURL=' +
        (hasOwnProperty.call(options, 'sourceURL')
          ? (options.sourceURL + '').replace(/\s/g, ' ')
          : ('lodash.templateSources[' + (++templateCounter) + ']')
        ) + '\n';

      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
        interpolateValue || (interpolateValue = esTemplateValue);

        // Escape characters that can't be included in string literals.
        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);

        // Replace delimiters with snippets.
        if (escapeValue) {
          isEscaping = true;
          source += "' +\n__e(" + escapeValue + ") +\n'";
        }
        if (evaluateValue) {
          isEvaluating = true;
          source += "';\n" + evaluateValue + ";\n__p += '";
        }
        if (interpolateValue) {
          source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
        }
        index = offset + match.length;

        // The JS engine embedded in Adobe products needs `match` returned in
        // order to produce the correct `offset` value.
        return match;
      });

      source += "';\n";

      // If `variable` is not specified wrap a with-statement around the generated
      // code to add the data object to the top of the scope chain.
      var variable = hasOwnProperty.call(options, 'variable') && options.variable;
      if (!variable) {
        source = 'with (obj) {\n' + source + '\n}\n';
      }
      // Cleanup code by stripping empty strings.
      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
        .replace(reEmptyStringMiddle, '$1')
        .replace(reEmptyStringTrailing, '$1;');

      // Frame code as the function body.
      source = 'function(' + (variable || 'obj') + ') {\n' +
        (variable
          ? ''
          : 'obj || (obj = {});\n'
        ) +
        "var __t, __p = ''" +
        (isEscaping
           ? ', __e = _.escape'
           : ''
        ) +
        (isEvaluating
          ? ', __j = Array.prototype.join;\n' +
            "function print() { __p += __j.call(arguments, '') }\n"
          : ';\n'
        ) +
        source +
        'return __p\n}';

      var result = attempt(function() {
        return Function(importsKeys, sourceURL + 'return ' + source)
          .apply(undefined, importsValues);
      });

      // Provide the compiled function's source by its `toString` method or
      // the `source` property as a convenience for inlining compiled templates.
      result.source = source;
      if (isError(result)) {
        throw result;
      }
      return result;
    }

    /**
     * Converts `string`, as a whole, to lower case just like
     * [String#toLowerCase](https://mdn.io/toLowerCase).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the lower cased string.
     * @example
     *
     * _.toLower('--Foo-Bar--');
     * // => '--foo-bar--'
     *
     * _.toLower('fooBar');
     * // => 'foobar'
     *
     * _.toLower('__FOO_BAR__');
     * // => '__foo_bar__'
     */
    function toLower(value) {
      return toString(value).toLowerCase();
    }

    /**
     * Converts `string`, as a whole, to upper case just like
     * [String#toUpperCase](https://mdn.io/toUpperCase).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the upper cased string.
     * @example
     *
     * _.toUpper('--foo-bar--');
     * // => '--FOO-BAR--'
     *
     * _.toUpper('fooBar');
     * // => 'FOOBAR'
     *
     * _.toUpper('__foo_bar__');
     * // => '__FOO_BAR__'
     */
    function toUpper(value) {
      return toString(value).toUpperCase();
    }

    /**
     * Removes leading and trailing whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trim('  abc  ');
     * // => 'abc'
     *
     * _.trim('-_-abc-_-', '_-');
     * // => 'abc'
     *
     * _.map(['  foo  ', '  bar  '], _.trim);
     * // => ['foo', 'bar']
     */
    function trim(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return string.replace(reTrim, '');
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          chrSymbols = stringToArray(chars),
          start = charsStartIndex(strSymbols, chrSymbols),
          end = charsEndIndex(strSymbols, chrSymbols) + 1;

      return castSlice(strSymbols, start, end).join('');
    }

    /**
     * Removes trailing whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trimEnd('  abc  ');
     * // => '  abc'
     *
     * _.trimEnd('-_-abc-_-', '_-');
     * // => '-_-abc'
     */
    function trimEnd(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return string.replace(reTrimEnd, '');
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;

      return castSlice(strSymbols, 0, end).join('');
    }

    /**
     * Removes leading whitespace or specified characters from `string`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to trim.
     * @param {string} [chars=whitespace] The characters to trim.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {string} Returns the trimmed string.
     * @example
     *
     * _.trimStart('  abc  ');
     * // => 'abc  '
     *
     * _.trimStart('-_-abc-_-', '_-');
     * // => 'abc-_-'
     */
    function trimStart(string, chars, guard) {
      string = toString(string);
      if (string && (guard || chars === undefined)) {
        return string.replace(reTrimStart, '');
      }
      if (!string || !(chars = baseToString(chars))) {
        return string;
      }
      var strSymbols = stringToArray(string),
          start = charsStartIndex(strSymbols, stringToArray(chars));

      return castSlice(strSymbols, start).join('');
    }

    /**
     * Truncates `string` if it's longer than the given maximum string length.
     * The last characters of the truncated string are replaced with the omission
     * string which defaults to "...".
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to truncate.
     * @param {Object} [options={}] The options object.
     * @param {number} [options.length=30] The maximum string length.
     * @param {string} [options.omission='...'] The string to indicate text is omitted.
     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
     * @returns {string} Returns the truncated string.
     * @example
     *
     * _.truncate('hi-diddly-ho there, neighborino');
     * // => 'hi-diddly-ho there, neighbo...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'length': 24,
     *   'separator': ' '
     * });
     * // => 'hi-diddly-ho there,...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'length': 24,
     *   'separator': /,? +/
     * });
     * // => 'hi-diddly-ho there...'
     *
     * _.truncate('hi-diddly-ho there, neighborino', {
     *   'omission': ' [...]'
     * });
     * // => 'hi-diddly-ho there, neig [...]'
     */
    function truncate(string, options) {
      var length = DEFAULT_TRUNC_LENGTH,
          omission = DEFAULT_TRUNC_OMISSION;

      if (isObject(options)) {
        var separator = 'separator' in options ? options.separator : separator;
        length = 'length' in options ? toInteger(options.length) : length;
        omission = 'omission' in options ? baseToString(options.omission) : omission;
      }
      string = toString(string);

      var strLength = string.length;
      if (hasUnicode(string)) {
        var strSymbols = stringToArray(string);
        strLength = strSymbols.length;
      }
      if (length >= strLength) {
        return string;
      }
      var end = length - stringSize(omission);
      if (end < 1) {
        return omission;
      }
      var result = strSymbols
        ? castSlice(strSymbols, 0, end).join('')
        : string.slice(0, end);

      if (separator === undefined) {
        return result + omission;
      }
      if (strSymbols) {
        end += (result.length - end);
      }
      if (isRegExp(separator)) {
        if (string.slice(end).search(separator)) {
          var match,
              substring = result;

          if (!separator.global) {
            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
          }
          separator.lastIndex = 0;
          while ((match = separator.exec(substring))) {
            var newEnd = match.index;
          }
          result = result.slice(0, newEnd === undefined ? end : newEnd);
        }
      } else if (string.indexOf(baseToString(separator), end) != end) {
        var index = result.lastIndexOf(separator);
        if (index > -1) {
          result = result.slice(0, index);
        }
      }
      return result + omission;
    }

    /**
     * The inverse of `_.escape`; this method converts the HTML entities
     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
     * their corresponding characters.
     *
     * **Note:** No other HTML entities are unescaped. To unescape additional
     * HTML entities use a third-party library like [_he_](https://mths.be/he).
     *
     * @static
     * @memberOf _
     * @since 0.6.0
     * @category String
     * @param {string} [string=''] The string to unescape.
     * @returns {string} Returns the unescaped string.
     * @example
     *
     * _.unescape('fred, barney, &amp; pebbles');
     * // => 'fred, barney, & pebbles'
     */
    function unescape(string) {
      string = toString(string);
      return (string && reHasEscapedHtml.test(string))
        ? string.replace(reEscapedHtml, unescapeHtmlChar)
        : string;
    }

    /**
     * Converts `string`, as space separated words, to upper case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the upper cased string.
     * @example
     *
     * _.upperCase('--foo-bar');
     * // => 'FOO BAR'
     *
     * _.upperCase('fooBar');
     * // => 'FOO BAR'
     *
     * _.upperCase('__foo_bar__');
     * // => 'FOO BAR'
     */
    var upperCase = createCompounder(function(result, word, index) {
      return result + (index ? ' ' : '') + word.toUpperCase();
    });

    /**
     * Converts the first character of `string` to upper case.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category String
     * @param {string} [string=''] The string to convert.
     * @returns {string} Returns the converted string.
     * @example
     *
     * _.upperFirst('fred');
     * // => 'Fred'
     *
     * _.upperFirst('FRED');
     * // => 'FRED'
     */
    var upperFirst = createCaseFirst('toUpperCase');

    /**
     * Splits `string` into an array of its words.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category String
     * @param {string} [string=''] The string to inspect.
     * @param {RegExp|string} [pattern] The pattern to match words.
     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
     * @returns {Array} Returns the words of `string`.
     * @example
     *
     * _.words('fred, barney, & pebbles');
     * // => ['fred', 'barney', 'pebbles']
     *
     * _.words('fred, barney, & pebbles', /[^, ]+/g);
     * // => ['fred', 'barney', '&', 'pebbles']
     */
    function words(string, pattern, guard) {
      string = toString(string);
      pattern = guard ? undefined : pattern;

      if (pattern === undefined) {
        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
      }
      return string.match(pattern) || [];
    }

    /*------------------------------------------------------------------------*/

    /**
     * Attempts to invoke `func`, returning either the result or the caught error
     * object. Any additional arguments are provided to `func` when it's invoked.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Function} func The function to attempt.
     * @param {...*} [args] The arguments to invoke `func` with.
     * @returns {*} Returns the `func` result or error object.
     * @example
     *
     * // Avoid throwing errors for invalid selectors.
     * var elements = _.attempt(function(selector) {
     *   return document.querySelectorAll(selector);
     * }, '>_>');
     *
     * if (_.isError(elements)) {
     *   elements = [];
     * }
     */
    var attempt = baseRest(function(func, args) {
      try {
        return apply(func, undefined, args);
      } catch (e) {
        return isError(e) ? e : new Error(e);
      }
    });

    /**
     * Binds methods of an object to the object itself, overwriting the existing
     * method.
     *
     * **Note:** This method doesn't set the "length" property of bound functions.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {Object} object The object to bind and assign the bound methods to.
     * @param {...(string|string[])} methodNames The object method names to bind.
     * @returns {Object} Returns `object`.
     * @example
     *
     * var view = {
     *   'label': 'docs',
     *   'click': function() {
     *     console.log('clicked ' + this.label);
     *   }
     * };
     *
     * _.bindAll(view, ['click']);
     * jQuery(element).on('click', view.click);
     * // => Logs 'clicked docs' when clicked.
     */
    var bindAll = flatRest(function(object, methodNames) {
      arrayEach(methodNames, function(key) {
        key = toKey(key);
        baseAssignValue(object, key, bind(object[key], object));
      });
      return object;
    });

    /**
     * Creates a function that iterates over `pairs` and invokes the corresponding
     * function of the first predicate to return truthy. The predicate-function
     * pairs are invoked with the `this` binding and arguments of the created
     * function.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {Array} pairs The predicate-function pairs.
     * @returns {Function} Returns the new composite function.
     * @example
     *
     * var func = _.cond([
     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
     *   [_.stubTrue,                      _.constant('no match')]
     * ]);
     *
     * func({ 'a': 1, 'b': 2 });
     * // => 'matches A'
     *
     * func({ 'a': 0, 'b': 1 });
     * // => 'matches B'
     *
     * func({ 'a': '1', 'b': '2' });
     * // => 'no match'
     */
    function cond(pairs) {
      var length = pairs == null ? 0 : pairs.length,
          toIteratee = getIteratee();

      pairs = !length ? [] : arrayMap(pairs, function(pair) {
        if (typeof pair[1] != 'function') {
          throw new TypeError(FUNC_ERROR_TEXT);
        }
        return [toIteratee(pair[0]), pair[1]];
      });

      return baseRest(function(args) {
        var index = -1;
        while (++index < length) {
          var pair = pairs[index];
          if (apply(pair[0], this, args)) {
            return apply(pair[1], this, args);
          }
        }
      });
    }

    /**
     * Creates a function that invokes the predicate properties of `source` with
     * the corresponding property values of a given object, returning `true` if
     * all predicates return truthy, else `false`.
     *
     * **Note:** The created function is equivalent to `_.conformsTo` with
     * `source` partially applied.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {Object} source The object of property predicates to conform to.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 2, 'b': 1 },
     *   { 'a': 1, 'b': 2 }
     * ];
     *
     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
     * // => [{ 'a': 1, 'b': 2 }]
     */
    function conforms(source) {
      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that returns `value`.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Util
     * @param {*} value The value to return from the new function.
     * @returns {Function} Returns the new constant function.
     * @example
     *
     * var objects = _.times(2, _.constant({ 'a': 1 }));
     *
     * console.log(objects);
     * // => [{ 'a': 1 }, { 'a': 1 }]
     *
     * console.log(objects[0] === objects[1]);
     * // => true
     */
    function constant(value) {
      return function() {
        return value;
      };
    }

    /**
     * Checks `value` to determine whether a default value should be returned in
     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
     * or `undefined`.
     *
     * @static
     * @memberOf _
     * @since 4.14.0
     * @category Util
     * @param {*} value The value to check.
     * @param {*} defaultValue The default value.
     * @returns {*} Returns the resolved value.
     * @example
     *
     * _.defaultTo(1, 10);
     * // => 1
     *
     * _.defaultTo(undefined, 10);
     * // => 10
     */
    function defaultTo(value, defaultValue) {
      return (value == null || value !== value) ? defaultValue : value;
    }

    /**
     * Creates a function that returns the result of invoking the given functions
     * with the `this` binding of the created function, where each successive
     * invocation is supplied the return value of the previous.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {...(Function|Function[])} [funcs] The functions to invoke.
     * @returns {Function} Returns the new composite function.
     * @see _.flowRight
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var addSquare = _.flow([_.add, square]);
     * addSquare(1, 2);
     * // => 9
     */
    var flow = createFlow();

    /**
     * This method is like `_.flow` except that it creates a function that
     * invokes the given functions from right to left.
     *
     * @static
     * @since 3.0.0
     * @memberOf _
     * @category Util
     * @param {...(Function|Function[])} [funcs] The functions to invoke.
     * @returns {Function} Returns the new composite function.
     * @see _.flow
     * @example
     *
     * function square(n) {
     *   return n * n;
     * }
     *
     * var addSquare = _.flowRight([square, _.add]);
     * addSquare(1, 2);
     * // => 9
     */
    var flowRight = createFlow(true);

    /**
     * This method returns the first argument it receives.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {*} value Any value.
     * @returns {*} Returns `value`.
     * @example
     *
     * var object = { 'a': 1 };
     *
     * console.log(_.identity(object) === object);
     * // => true
     */
    function identity(value) {
      return value;
    }

    /**
     * Creates a function that invokes `func` with the arguments of the created
     * function. If `func` is a property name, the created function returns the
     * property value for a given element. If `func` is an array or object, the
     * created function returns `true` for elements that contain the equivalent
     * source properties, otherwise it returns `false`.
     *
     * @static
     * @since 4.0.0
     * @memberOf _
     * @category Util
     * @param {*} [func=_.identity] The value to convert to a callback.
     * @returns {Function} Returns the callback.
     * @example
     *
     * var users = [
     *   { 'user': 'barney', 'age': 36, 'active': true },
     *   { 'user': 'fred',   'age': 40, 'active': false }
     * ];
     *
     * // The `_.matches` iteratee shorthand.
     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
     *
     * // The `_.matchesProperty` iteratee shorthand.
     * _.filter(users, _.iteratee(['user', 'fred']));
     * // => [{ 'user': 'fred', 'age': 40 }]
     *
     * // The `_.property` iteratee shorthand.
     * _.map(users, _.iteratee('user'));
     * // => ['barney', 'fred']
     *
     * // Create custom iteratee shorthands.
     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
     *     return func.test(string);
     *   };
     * });
     *
     * _.filter(['abc', 'def'], /ef/);
     * // => ['def']
     */
    function iteratee(func) {
      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that performs a partial deep comparison between a given
     * object and `source`, returning `true` if the given object has equivalent
     * property values, else `false`.
     *
     * **Note:** The created function is equivalent to `_.isMatch` with `source`
     * partially applied.
     *
     * Partial comparisons will match empty array and empty object `source`
     * values against any array or object value, respectively. See `_.isEqual`
     * for a list of supported value comparisons.
     *
     * **Note:** Multiple values can be checked by combining several matchers
     * using `_.overSome`
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Object} source The object of property values to match.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 1, 'b': 2, 'c': 3 },
     *   { 'a': 4, 'b': 5, 'c': 6 }
     * ];
     *
     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
     *
     * // Checking for several possible values
     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
     */
    function matches(source) {
      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that performs a partial deep comparison between the
     * value at `path` of a given object to `srcValue`, returning `true` if the
     * object value is equivalent, else `false`.
     *
     * **Note:** Partial comparisons will match empty array and empty object
     * `srcValue` values against any array or object value, respectively. See
     * `_.isEqual` for a list of supported value comparisons.
     *
     * **Note:** Multiple values can be checked by combining several matchers
     * using `_.overSome`
     *
     * @static
     * @memberOf _
     * @since 3.2.0
     * @category Util
     * @param {Array|string} path The path of the property to get.
     * @param {*} srcValue The value to match.
     * @returns {Function} Returns the new spec function.
     * @example
     *
     * var objects = [
     *   { 'a': 1, 'b': 2, 'c': 3 },
     *   { 'a': 4, 'b': 5, 'c': 6 }
     * ];
     *
     * _.find(objects, _.matchesProperty('a', 4));
     * // => { 'a': 4, 'b': 5, 'c': 6 }
     *
     * // Checking for several possible values
     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
     */
    function matchesProperty(path, srcValue) {
      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
    }

    /**
     * Creates a function that invokes the method at `path` of a given object.
     * Any additional arguments are provided to the invoked method.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Util
     * @param {Array|string} path The path of the method to invoke.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {Function} Returns the new invoker function.
     * @example
     *
     * var objects = [
     *   { 'a': { 'b': _.constant(2) } },
     *   { 'a': { 'b': _.constant(1) } }
     * ];
     *
     * _.map(objects, _.method('a.b'));
     * // => [2, 1]
     *
     * _.map(objects, _.method(['a', 'b']));
     * // => [2, 1]
     */
    var method = baseRest(function(path, args) {
      return function(object) {
        return baseInvoke(object, path, args);
      };
    });

    /**
     * The opposite of `_.method`; this method creates a function that invokes
     * the method at a given path of `object`. Any additional arguments are
     * provided to the invoked method.
     *
     * @static
     * @memberOf _
     * @since 3.7.0
     * @category Util
     * @param {Object} object The object to query.
     * @param {...*} [args] The arguments to invoke the method with.
     * @returns {Function} Returns the new invoker function.
     * @example
     *
     * var array = _.times(3, _.constant),
     *     object = { 'a': array, 'b': array, 'c': array };
     *
     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
     * // => [2, 0]
     *
     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
     * // => [2, 0]
     */
    var methodOf = baseRest(function(object, args) {
      return function(path) {
        return baseInvoke(object, path, args);
      };
    });

    /**
     * Adds all own enumerable string keyed function properties of a source
     * object to the destination object. If `object` is a function, then methods
     * are added to its prototype as well.
     *
     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
     * avoid conflicts caused by modifying the original.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {Function|Object} [object=lodash] The destination object.
     * @param {Object} source The object of functions to add.
     * @param {Object} [options={}] The options object.
     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
     * @returns {Function|Object} Returns `object`.
     * @example
     *
     * function vowels(string) {
     *   return _.filter(string, function(v) {
     *     return /[aeiou]/i.test(v);
     *   });
     * }
     *
     * _.mixin({ 'vowels': vowels });
     * _.vowels('fred');
     * // => ['e']
     *
     * _('fred').vowels().value();
     * // => ['e']
     *
     * _.mixin({ 'vowels': vowels }, { 'chain': false });
     * _('fred').vowels();
     * // => ['e']
     */
    function mixin(object, source, options) {
      var props = keys(source),
          methodNames = baseFunctions(source, props);

      if (options == null &&
          !(isObject(source) && (methodNames.length || !props.length))) {
        options = source;
        source = object;
        object = this;
        methodNames = baseFunctions(source, keys(source));
      }
      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
          isFunc = isFunction(object);

      arrayEach(methodNames, function(methodName) {
        var func = source[methodName];
        object[methodName] = func;
        if (isFunc) {
          object.prototype[methodName] = function() {
            var chainAll = this.__chain__;
            if (chain || chainAll) {
              var result = object(this.__wrapped__),
                  actions = result.__actions__ = copyArray(this.__actions__);

              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
              result.__chain__ = chainAll;
              return result;
            }
            return func.apply(object, arrayPush([this.value()], arguments));
          };
        }
      });

      return object;
    }

    /**
     * Reverts the `_` variable to its previous value and returns a reference to
     * the `lodash` function.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @returns {Function} Returns the `lodash` function.
     * @example
     *
     * var lodash = _.noConflict();
     */
    function noConflict() {
      if (root._ === this) {
        root._ = oldDash;
      }
      return this;
    }

    /**
     * This method returns `undefined`.
     *
     * @static
     * @memberOf _
     * @since 2.3.0
     * @category Util
     * @example
     *
     * _.times(2, _.noop);
     * // => [undefined, undefined]
     */
    function noop() {
      // No operation performed.
    }

    /**
     * Creates a function that gets the argument at index `n`. If `n` is negative,
     * the nth argument from the end is returned.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {number} [n=0] The index of the argument to return.
     * @returns {Function} Returns the new pass-thru function.
     * @example
     *
     * var func = _.nthArg(1);
     * func('a', 'b', 'c', 'd');
     * // => 'b'
     *
     * var func = _.nthArg(-2);
     * func('a', 'b', 'c', 'd');
     * // => 'c'
     */
    function nthArg(n) {
      n = toInteger(n);
      return baseRest(function(args) {
        return baseNth(args, n);
      });
    }

    /**
     * Creates a function that invokes `iteratees` with the arguments it receives
     * and returns their results.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [iteratees=[_.identity]]
     *  The iteratees to invoke.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.over([Math.max, Math.min]);
     *
     * func(1, 2, 3, 4);
     * // => [4, 1]
     */
    var over = createOver(arrayMap);

    /**
     * Creates a function that checks if **all** of the `predicates` return
     * truthy when invoked with the arguments it receives.
     *
     * Following shorthands are possible for providing predicates.
     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [predicates=[_.identity]]
     *  The predicates to check.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.overEvery([Boolean, isFinite]);
     *
     * func('1');
     * // => true
     *
     * func(null);
     * // => false
     *
     * func(NaN);
     * // => false
     */
    var overEvery = createOver(arrayEvery);

    /**
     * Creates a function that checks if **any** of the `predicates` return
     * truthy when invoked with the arguments it receives.
     *
     * Following shorthands are possible for providing predicates.
     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {...(Function|Function[])} [predicates=[_.identity]]
     *  The predicates to check.
     * @returns {Function} Returns the new function.
     * @example
     *
     * var func = _.overSome([Boolean, isFinite]);
     *
     * func('1');
     * // => true
     *
     * func(null);
     * // => true
     *
     * func(NaN);
     * // => false
     *
     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
     */
    var overSome = createOver(arraySome);

    /**
     * Creates a function that returns the value at `path` of a given object.
     *
     * @static
     * @memberOf _
     * @since 2.4.0
     * @category Util
     * @param {Array|string} path The path of the property to get.
     * @returns {Function} Returns the new accessor function.
     * @example
     *
     * var objects = [
     *   { 'a': { 'b': 2 } },
     *   { 'a': { 'b': 1 } }
     * ];
     *
     * _.map(objects, _.property('a.b'));
     * // => [2, 1]
     *
     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
     * // => [1, 2]
     */
    function property(path) {
      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
    }

    /**
     * The opposite of `_.property`; this method creates a function that returns
     * the value at a given path of `object`.
     *
     * @static
     * @memberOf _
     * @since 3.0.0
     * @category Util
     * @param {Object} object The object to query.
     * @returns {Function} Returns the new accessor function.
     * @example
     *
     * var array = [0, 1, 2],
     *     object = { 'a': array, 'b': array, 'c': array };
     *
     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
     * // => [2, 0]
     *
     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
     * // => [2, 0]
     */
    function propertyOf(object) {
      return function(path) {
        return object == null ? undefined : baseGet(object, path);
      };
    }

    /**
     * Creates an array of numbers (positive and/or negative) progressing from
     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
     * `start` is specified without an `end` or `step`. If `end` is not specified,
     * it's set to `start` with `start` then set to `0`.
     *
     * **Note:** JavaScript follows the IEEE-754 standard for resolving
     * floating-point values which can produce unexpected results.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @param {number} [step=1] The value to increment or decrement by.
     * @returns {Array} Returns the range of numbers.
     * @see _.inRange, _.rangeRight
     * @example
     *
     * _.range(4);
     * // => [0, 1, 2, 3]
     *
     * _.range(-4);
     * // => [0, -1, -2, -3]
     *
     * _.range(1, 5);
     * // => [1, 2, 3, 4]
     *
     * _.range(0, 20, 5);
     * // => [0, 5, 10, 15]
     *
     * _.range(0, -4, -1);
     * // => [0, -1, -2, -3]
     *
     * _.range(1, 4, 0);
     * // => [1, 1, 1]
     *
     * _.range(0);
     * // => []
     */
    var range = createRange();

    /**
     * This method is like `_.range` except that it populates values in
     * descending order.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {number} [start=0] The start of the range.
     * @param {number} end The end of the range.
     * @param {number} [step=1] The value to increment or decrement by.
     * @returns {Array} Returns the range of numbers.
     * @see _.inRange, _.range
     * @example
     *
     * _.rangeRight(4);
     * // => [3, 2, 1, 0]
     *
     * _.rangeRight(-4);
     * // => [-3, -2, -1, 0]
     *
     * _.rangeRight(1, 5);
     * // => [4, 3, 2, 1]
     *
     * _.rangeRight(0, 20, 5);
     * // => [15, 10, 5, 0]
     *
     * _.rangeRight(0, -4, -1);
     * // => [-3, -2, -1, 0]
     *
     * _.rangeRight(1, 4, 0);
     * // => [1, 1, 1]
     *
     * _.rangeRight(0);
     * // => []
     */
    var rangeRight = createRange(true);

    /**
     * This method returns a new empty array.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {Array} Returns the new empty array.
     * @example
     *
     * var arrays = _.times(2, _.stubArray);
     *
     * console.log(arrays);
     * // => [[], []]
     *
     * console.log(arrays[0] === arrays[1]);
     * // => false
     */
    function stubArray() {
      return [];
    }

    /**
     * This method returns `false`.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {boolean} Returns `false`.
     * @example
     *
     * _.times(2, _.stubFalse);
     * // => [false, false]
     */
    function stubFalse() {
      return false;
    }

    /**
     * This method returns a new empty object.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {Object} Returns the new empty object.
     * @example
     *
     * var objects = _.times(2, _.stubObject);
     *
     * console.log(objects);
     * // => [{}, {}]
     *
     * console.log(objects[0] === objects[1]);
     * // => false
     */
    function stubObject() {
      return {};
    }

    /**
     * This method returns an empty string.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {string} Returns the empty string.
     * @example
     *
     * _.times(2, _.stubString);
     * // => ['', '']
     */
    function stubString() {
      return '';
    }

    /**
     * This method returns `true`.
     *
     * @static
     * @memberOf _
     * @since 4.13.0
     * @category Util
     * @returns {boolean} Returns `true`.
     * @example
     *
     * _.times(2, _.stubTrue);
     * // => [true, true]
     */
    function stubTrue() {
      return true;
    }

    /**
     * Invokes the iteratee `n` times, returning an array of the results of
     * each invocation. The iteratee is invoked with one argument; (index).
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {number} n The number of times to invoke `iteratee`.
     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
     * @returns {Array} Returns the array of results.
     * @example
     *
     * _.times(3, String);
     * // => ['0', '1', '2']
     *
     *  _.times(4, _.constant(0));
     * // => [0, 0, 0, 0]
     */
    function times(n, iteratee) {
      n = toInteger(n);
      if (n < 1 || n > MAX_SAFE_INTEGER) {
        return [];
      }
      var index = MAX_ARRAY_LENGTH,
          length = nativeMin(n, MAX_ARRAY_LENGTH);

      iteratee = getIteratee(iteratee);
      n -= MAX_ARRAY_LENGTH;

      var result = baseTimes(length, iteratee);
      while (++index < n) {
        iteratee(index);
      }
      return result;
    }

    /**
     * Converts `value` to a property path array.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Util
     * @param {*} value The value to convert.
     * @returns {Array} Returns the new property path array.
     * @example
     *
     * _.toPath('a.b.c');
     * // => ['a', 'b', 'c']
     *
     * _.toPath('a[0].b.c');
     * // => ['a', '0', 'b', 'c']
     */
    function toPath(value) {
      if (isArray(value)) {
        return arrayMap(value, toKey);
      }
      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
    }

    /**
     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {string} [prefix=''] The value to prefix the ID with.
     * @returns {string} Returns the unique ID.
     * @example
     *
     * _.uniqueId('contact_');
     * // => 'contact_104'
     *
     * _.uniqueId();
     * // => '105'
     */
    function uniqueId(prefix) {
      var id = ++idCounter;
      return toString(prefix) + id;
    }

    /*------------------------------------------------------------------------*/

    /**
     * Adds two numbers.
     *
     * @static
     * @memberOf _
     * @since 3.4.0
     * @category Math
     * @param {number} augend The first number in an addition.
     * @param {number} addend The second number in an addition.
     * @returns {number} Returns the total.
     * @example
     *
     * _.add(6, 4);
     * // => 10
     */
    var add = createMathOperation(function(augend, addend) {
      return augend + addend;
    }, 0);

    /**
     * Computes `number` rounded up to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round up.
     * @param {number} [precision=0] The precision to round up to.
     * @returns {number} Returns the rounded up number.
     * @example
     *
     * _.ceil(4.006);
     * // => 5
     *
     * _.ceil(6.004, 2);
     * // => 6.01
     *
     * _.ceil(6040, -2);
     * // => 6100
     */
    var ceil = createRound('ceil');

    /**
     * Divide two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {number} dividend The first number in a division.
     * @param {number} divisor The second number in a division.
     * @returns {number} Returns the quotient.
     * @example
     *
     * _.divide(6, 4);
     * // => 1.5
     */
    var divide = createMathOperation(function(dividend, divisor) {
      return dividend / divisor;
    }, 1);

    /**
     * Computes `number` rounded down to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round down.
     * @param {number} [precision=0] The precision to round down to.
     * @returns {number} Returns the rounded down number.
     * @example
     *
     * _.floor(4.006);
     * // => 4
     *
     * _.floor(0.046, 2);
     * // => 0.04
     *
     * _.floor(4060, -2);
     * // => 4000
     */
    var floor = createRound('floor');

    /**
     * Computes the maximum value of `array`. If `array` is empty or falsey,
     * `undefined` is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {*} Returns the maximum value.
     * @example
     *
     * _.max([4, 2, 8, 6]);
     * // => 8
     *
     * _.max([]);
     * // => undefined
     */
    function max(array) {
      return (array && array.length)
        ? baseExtremum(array, identity, baseGt)
        : undefined;
    }

    /**
     * This method is like `_.max` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * the value is ranked. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {*} Returns the maximum value.
     * @example
     *
     * var objects = [{ 'n': 1 }, { 'n': 2 }];
     *
     * _.maxBy(objects, function(o) { return o.n; });
     * // => { 'n': 2 }
     *
     * // The `_.property` iteratee shorthand.
     * _.maxBy(objects, 'n');
     * // => { 'n': 2 }
     */
    function maxBy(array, iteratee) {
      return (array && array.length)
        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
        : undefined;
    }

    /**
     * Computes the mean of the values in `array`.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {number} Returns the mean.
     * @example
     *
     * _.mean([4, 2, 8, 6]);
     * // => 5
     */
    function mean(array) {
      return baseMean(array, identity);
    }

    /**
     * This method is like `_.mean` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the value to be averaged.
     * The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the mean.
     * @example
     *
     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
     *
     * _.meanBy(objects, function(o) { return o.n; });
     * // => 5
     *
     * // The `_.property` iteratee shorthand.
     * _.meanBy(objects, 'n');
     * // => 5
     */
    function meanBy(array, iteratee) {
      return baseMean(array, getIteratee(iteratee, 2));
    }

    /**
     * Computes the minimum value of `array`. If `array` is empty or falsey,
     * `undefined` is returned.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {*} Returns the minimum value.
     * @example
     *
     * _.min([4, 2, 8, 6]);
     * // => 2
     *
     * _.min([]);
     * // => undefined
     */
    function min(array) {
      return (array && array.length)
        ? baseExtremum(array, identity, baseLt)
        : undefined;
    }

    /**
     * This method is like `_.min` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the criterion by which
     * the value is ranked. The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {*} Returns the minimum value.
     * @example
     *
     * var objects = [{ 'n': 1 }, { 'n': 2 }];
     *
     * _.minBy(objects, function(o) { return o.n; });
     * // => { 'n': 1 }
     *
     * // The `_.property` iteratee shorthand.
     * _.minBy(objects, 'n');
     * // => { 'n': 1 }
     */
    function minBy(array, iteratee) {
      return (array && array.length)
        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
        : undefined;
    }

    /**
     * Multiply two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.7.0
     * @category Math
     * @param {number} multiplier The first number in a multiplication.
     * @param {number} multiplicand The second number in a multiplication.
     * @returns {number} Returns the product.
     * @example
     *
     * _.multiply(6, 4);
     * // => 24
     */
    var multiply = createMathOperation(function(multiplier, multiplicand) {
      return multiplier * multiplicand;
    }, 1);

    /**
     * Computes `number` rounded to `precision`.
     *
     * @static
     * @memberOf _
     * @since 3.10.0
     * @category Math
     * @param {number} number The number to round.
     * @param {number} [precision=0] The precision to round to.
     * @returns {number} Returns the rounded number.
     * @example
     *
     * _.round(4.006);
     * // => 4
     *
     * _.round(4.006, 2);
     * // => 4.01
     *
     * _.round(4060, -2);
     * // => 4100
     */
    var round = createRound('round');

    /**
     * Subtract two numbers.
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {number} minuend The first number in a subtraction.
     * @param {number} subtrahend The second number in a subtraction.
     * @returns {number} Returns the difference.
     * @example
     *
     * _.subtract(6, 4);
     * // => 2
     */
    var subtract = createMathOperation(function(minuend, subtrahend) {
      return minuend - subtrahend;
    }, 0);

    /**
     * Computes the sum of the values in `array`.
     *
     * @static
     * @memberOf _
     * @since 3.4.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @returns {number} Returns the sum.
     * @example
     *
     * _.sum([4, 2, 8, 6]);
     * // => 20
     */
    function sum(array) {
      return (array && array.length)
        ? baseSum(array, identity)
        : 0;
    }

    /**
     * This method is like `_.sum` except that it accepts `iteratee` which is
     * invoked for each element in `array` to generate the value to be summed.
     * The iteratee is invoked with one argument: (value).
     *
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Math
     * @param {Array} array The array to iterate over.
     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
     * @returns {number} Returns the sum.
     * @example
     *
     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
     *
     * _.sumBy(objects, function(o) { return o.n; });
     * // => 20
     *
     * // The `_.property` iteratee shorthand.
     * _.sumBy(objects, 'n');
     * // => 20
     */
    function sumBy(array, iteratee) {
      return (array && array.length)
        ? baseSum(array, getIteratee(iteratee, 2))
        : 0;
    }

    /*------------------------------------------------------------------------*/

    // Add methods that return wrapped values in chain sequences.
    lodash.after = after;
    lodash.ary = ary;
    lodash.assign = assign;
    lodash.assignIn = assignIn;
    lodash.assignInWith = assignInWith;
    lodash.assignWith = assignWith;
    lodash.at = at;
    lodash.before = before;
    lodash.bind = bind;
    lodash.bindAll = bindAll;
    lodash.bindKey = bindKey;
    lodash.castArray = castArray;
    lodash.chain = chain;
    lodash.chunk = chunk;
    lodash.compact = compact;
    lodash.concat = concat;
    lodash.cond = cond;
    lodash.conforms = conforms;
    lodash.constant = constant;
    lodash.countBy = countBy;
    lodash.create = create;
    lodash.curry = curry;
    lodash.curryRight = curryRight;
    lodash.debounce = debounce;
    lodash.defaults = defaults;
    lodash.defaultsDeep = defaultsDeep;
    lodash.defer = defer;
    lodash.delay = delay;
    lodash.difference = difference;
    lodash.differenceBy = differenceBy;
    lodash.differenceWith = differenceWith;
    lodash.drop = drop;
    lodash.dropRight = dropRight;
    lodash.dropRightWhile = dropRightWhile;
    lodash.dropWhile = dropWhile;
    lodash.fill = fill;
    lodash.filter = filter;
    lodash.flatMap = flatMap;
    lodash.flatMapDeep = flatMapDeep;
    lodash.flatMapDepth = flatMapDepth;
    lodash.flatten = flatten;
    lodash.flattenDeep = flattenDeep;
    lodash.flattenDepth = flattenDepth;
    lodash.flip = flip;
    lodash.flow = flow;
    lodash.flowRight = flowRight;
    lodash.fromPairs = fromPairs;
    lodash.functions = functions;
    lodash.functionsIn = functionsIn;
    lodash.groupBy = groupBy;
    lodash.initial = initial;
    lodash.intersection = intersection;
    lodash.intersectionBy = intersectionBy;
    lodash.intersectionWith = intersectionWith;
    lodash.invert = invert;
    lodash.invertBy = invertBy;
    lodash.invokeMap = invokeMap;
    lodash.iteratee = iteratee;
    lodash.keyBy = keyBy;
    lodash.keys = keys;
    lodash.keysIn = keysIn;
    lodash.map = map;
    lodash.mapKeys = mapKeys;
    lodash.mapValues = mapValues;
    lodash.matches = matches;
    lodash.matchesProperty = matchesProperty;
    lodash.memoize = memoize;
    lodash.merge = merge;
    lodash.mergeWith = mergeWith;
    lodash.method = method;
    lodash.methodOf = methodOf;
    lodash.mixin = mixin;
    lodash.negate = negate;
    lodash.nthArg = nthArg;
    lodash.omit = omit;
    lodash.omitBy = omitBy;
    lodash.once = once;
    lodash.orderBy = orderBy;
    lodash.over = over;
    lodash.overArgs = overArgs;
    lodash.overEvery = overEvery;
    lodash.overSome = overSome;
    lodash.partial = partial;
    lodash.partialRight = partialRight;
    lodash.partition = partition;
    lodash.pick = pick;
    lodash.pickBy = pickBy;
    lodash.property = property;
    lodash.propertyOf = propertyOf;
    lodash.pull = pull;
    lodash.pullAll = pullAll;
    lodash.pullAllBy = pullAllBy;
    lodash.pullAllWith = pullAllWith;
    lodash.pullAt = pullAt;
    lodash.range = range;
    lodash.rangeRight = rangeRight;
    lodash.rearg = rearg;
    lodash.reject = reject;
    lodash.remove = remove;
    lodash.rest = rest;
    lodash.reverse = reverse;
    lodash.sampleSize = sampleSize;
    lodash.set = set;
    lodash.setWith = setWith;
    lodash.shuffle = shuffle;
    lodash.slice = slice;
    lodash.sortBy = sortBy;
    lodash.sortedUniq = sortedUniq;
    lodash.sortedUniqBy = sortedUniqBy;
    lodash.split = split;
    lodash.spread = spread;
    lodash.tail = tail;
    lodash.take = take;
    lodash.takeRight = takeRight;
    lodash.takeRightWhile = takeRightWhile;
    lodash.takeWhile = takeWhile;
    lodash.tap = tap;
    lodash.throttle = throttle;
    lodash.thru = thru;
    lodash.toArray = toArray;
    lodash.toPairs = toPairs;
    lodash.toPairsIn = toPairsIn;
    lodash.toPath = toPath;
    lodash.toPlainObject = toPlainObject;
    lodash.transform = transform;
    lodash.unary = unary;
    lodash.union = union;
    lodash.unionBy = unionBy;
    lodash.unionWith = unionWith;
    lodash.uniq = uniq;
    lodash.uniqBy = uniqBy;
    lodash.uniqWith = uniqWith;
    lodash.unset = unset;
    lodash.unzip = unzip;
    lodash.unzipWith = unzipWith;
    lodash.update = update;
    lodash.updateWith = updateWith;
    lodash.values = values;
    lodash.valuesIn = valuesIn;
    lodash.without = without;
    lodash.words = words;
    lodash.wrap = wrap;
    lodash.xor = xor;
    lodash.xorBy = xorBy;
    lodash.xorWith = xorWith;
    lodash.zip = zip;
    lodash.zipObject = zipObject;
    lodash.zipObjectDeep = zipObjectDeep;
    lodash.zipWith = zipWith;

    // Add aliases.
    lodash.entries = toPairs;
    lodash.entriesIn = toPairsIn;
    lodash.extend = assignIn;
    lodash.extendWith = assignInWith;

    // Add methods to `lodash.prototype`.
    mixin(lodash, lodash);

    /*------------------------------------------------------------------------*/

    // Add methods that return unwrapped values in chain sequences.
    lodash.add = add;
    lodash.attempt = attempt;
    lodash.camelCase = camelCase;
    lodash.capitalize = capitalize;
    lodash.ceil = ceil;
    lodash.clamp = clamp;
    lodash.clone = clone;
    lodash.cloneDeep = cloneDeep;
    lodash.cloneDeepWith = cloneDeepWith;
    lodash.cloneWith = cloneWith;
    lodash.conformsTo = conformsTo;
    lodash.deburr = deburr;
    lodash.defaultTo = defaultTo;
    lodash.divide = divide;
    lodash.endsWith = endsWith;
    lodash.eq = eq;
    lodash.escape = escape;
    lodash.escapeRegExp = escapeRegExp;
    lodash.every = every;
    lodash.find = find;
    lodash.findIndex = findIndex;
    lodash.findKey = findKey;
    lodash.findLast = findLast;
    lodash.findLastIndex = findLastIndex;
    lodash.findLastKey = findLastKey;
    lodash.floor = floor;
    lodash.forEach = forEach;
    lodash.forEachRight = forEachRight;
    lodash.forIn = forIn;
    lodash.forInRight = forInRight;
    lodash.forOwn = forOwn;
    lodash.forOwnRight = forOwnRight;
    lodash.get = get;
    lodash.gt = gt;
    lodash.gte = gte;
    lodash.has = has;
    lodash.hasIn = hasIn;
    lodash.head = head;
    lodash.identity = identity;
    lodash.includes = includes;
    lodash.indexOf = indexOf;
    lodash.inRange = inRange;
    lodash.invoke = invoke;
    lodash.isArguments = isArguments;
    lodash.isArray = isArray;
    lodash.isArrayBuffer = isArrayBuffer;
    lodash.isArrayLike = isArrayLike;
    lodash.isArrayLikeObject = isArrayLikeObject;
    lodash.isBoolean = isBoolean;
    lodash.isBuffer = isBuffer;
    lodash.isDate = isDate;
    lodash.isElement = isElement;
    lodash.isEmpty = isEmpty;
    lodash.isEqual = isEqual;
    lodash.isEqualWith = isEqualWith;
    lodash.isError = isError;
    lodash.isFinite = isFinite;
    lodash.isFunction = isFunction;
    lodash.isInteger = isInteger;
    lodash.isLength = isLength;
    lodash.isMap = isMap;
    lodash.isMatch = isMatch;
    lodash.isMatchWith = isMatchWith;
    lodash.isNaN = isNaN;
    lodash.isNative = isNative;
    lodash.isNil = isNil;
    lodash.isNull = isNull;
    lodash.isNumber = isNumber;
    lodash.isObject = isObject;
    lodash.isObjectLike = isObjectLike;
    lodash.isPlainObject = isPlainObject;
    lodash.isRegExp = isRegExp;
    lodash.isSafeInteger = isSafeInteger;
    lodash.isSet = isSet;
    lodash.isString = isString;
    lodash.isSymbol = isSymbol;
    lodash.isTypedArray = isTypedArray;
    lodash.isUndefined = isUndefined;
    lodash.isWeakMap = isWeakMap;
    lodash.isWeakSet = isWeakSet;
    lodash.join = join;
    lodash.kebabCase = kebabCase;
    lodash.last = last;
    lodash.lastIndexOf = lastIndexOf;
    lodash.lowerCase = lowerCase;
    lodash.lowerFirst = lowerFirst;
    lodash.lt = lt;
    lodash.lte = lte;
    lodash.max = max;
    lodash.maxBy = maxBy;
    lodash.mean = mean;
    lodash.meanBy = meanBy;
    lodash.min = min;
    lodash.minBy = minBy;
    lodash.stubArray = stubArray;
    lodash.stubFalse = stubFalse;
    lodash.stubObject = stubObject;
    lodash.stubString = stubString;
    lodash.stubTrue = stubTrue;
    lodash.multiply = multiply;
    lodash.nth = nth;
    lodash.noConflict = noConflict;
    lodash.noop = noop;
    lodash.now = now;
    lodash.pad = pad;
    lodash.padEnd = padEnd;
    lodash.padStart = padStart;
    lodash.parseInt = parseInt;
    lodash.random = random;
    lodash.reduce = reduce;
    lodash.reduceRight = reduceRight;
    lodash.repeat = repeat;
    lodash.replace = replace;
    lodash.result = result;
    lodash.round = round;
    lodash.runInContext = runInContext;
    lodash.sample = sample;
    lodash.size = size;
    lodash.snakeCase = snakeCase;
    lodash.some = some;
    lodash.sortedIndex = sortedIndex;
    lodash.sortedIndexBy = sortedIndexBy;
    lodash.sortedIndexOf = sortedIndexOf;
    lodash.sortedLastIndex = sortedLastIndex;
    lodash.sortedLastIndexBy = sortedLastIndexBy;
    lodash.sortedLastIndexOf = sortedLastIndexOf;
    lodash.startCase = startCase;
    lodash.startsWith = startsWith;
    lodash.subtract = subtract;
    lodash.sum = sum;
    lodash.sumBy = sumBy;
    lodash.template = template;
    lodash.times = times;
    lodash.toFinite = toFinite;
    lodash.toInteger = toInteger;
    lodash.toLength = toLength;
    lodash.toLower = toLower;
    lodash.toNumber = toNumber;
    lodash.toSafeInteger = toSafeInteger;
    lodash.toString = toString;
    lodash.toUpper = toUpper;
    lodash.trim = trim;
    lodash.trimEnd = trimEnd;
    lodash.trimStart = trimStart;
    lodash.truncate = truncate;
    lodash.unescape = unescape;
    lodash.uniqueId = uniqueId;
    lodash.upperCase = upperCase;
    lodash.upperFirst = upperFirst;

    // Add aliases.
    lodash.each = forEach;
    lodash.eachRight = forEachRight;
    lodash.first = head;

    mixin(lodash, (function() {
      var source = {};
      baseForOwn(lodash, function(func, methodName) {
        if (!hasOwnProperty.call(lodash.prototype, methodName)) {
          source[methodName] = func;
        }
      });
      return source;
    }()), { 'chain': false });

    /*------------------------------------------------------------------------*/

    /**
     * The semantic version number.
     *
     * @static
     * @memberOf _
     * @type {string}
     */
    lodash.VERSION = VERSION;

    // Assign default placeholders.
    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
      lodash[methodName].placeholder = lodash;
    });

    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
    arrayEach(['drop', 'take'], function(methodName, index) {
      LazyWrapper.prototype[methodName] = function(n) {
        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);

        var result = (this.__filtered__ && !index)
          ? new LazyWrapper(this)
          : this.clone();

        if (result.__filtered__) {
          result.__takeCount__ = nativeMin(n, result.__takeCount__);
        } else {
          result.__views__.push({
            'size': nativeMin(n, MAX_ARRAY_LENGTH),
            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
          });
        }
        return result;
      };

      LazyWrapper.prototype[methodName + 'Right'] = function(n) {
        return this.reverse()[methodName](n).reverse();
      };
    });

    // Add `LazyWrapper` methods that accept an `iteratee` value.
    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
      var type = index + 1,
          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;

      LazyWrapper.prototype[methodName] = function(iteratee) {
        var result = this.clone();
        result.__iteratees__.push({
          'iteratee': getIteratee(iteratee, 3),
          'type': type
        });
        result.__filtered__ = result.__filtered__ || isFilter;
        return result;
      };
    });

    // Add `LazyWrapper` methods for `_.head` and `_.last`.
    arrayEach(['head', 'last'], function(methodName, index) {
      var takeName = 'take' + (index ? 'Right' : '');

      LazyWrapper.prototype[methodName] = function() {
        return this[takeName](1).value()[0];
      };
    });

    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
    arrayEach(['initial', 'tail'], function(methodName, index) {
      var dropName = 'drop' + (index ? '' : 'Right');

      LazyWrapper.prototype[methodName] = function() {
        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
      };
    });

    LazyWrapper.prototype.compact = function() {
      return this.filter(identity);
    };

    LazyWrapper.prototype.find = function(predicate) {
      return this.filter(predicate).head();
    };

    LazyWrapper.prototype.findLast = function(predicate) {
      return this.reverse().find(predicate);
    };

    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
      if (typeof path == 'function') {
        return new LazyWrapper(this);
      }
      return this.map(function(value) {
        return baseInvoke(value, path, args);
      });
    });

    LazyWrapper.prototype.reject = function(predicate) {
      return this.filter(negate(getIteratee(predicate)));
    };

    LazyWrapper.prototype.slice = function(start, end) {
      start = toInteger(start);

      var result = this;
      if (result.__filtered__ && (start > 0 || end < 0)) {
        return new LazyWrapper(result);
      }
      if (start < 0) {
        result = result.takeRight(-start);
      } else if (start) {
        result = result.drop(start);
      }
      if (end !== undefined) {
        end = toInteger(end);
        result = end < 0 ? result.dropRight(-end) : result.take(end - start);
      }
      return result;
    };

    LazyWrapper.prototype.takeRightWhile = function(predicate) {
      return this.reverse().takeWhile(predicate).reverse();
    };

    LazyWrapper.prototype.toArray = function() {
      return this.take(MAX_ARRAY_LENGTH);
    };

    // Add `LazyWrapper` methods to `lodash.prototype`.
    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
          isTaker = /^(?:head|last)$/.test(methodName),
          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
          retUnwrapped = isTaker || /^find/.test(methodName);

      if (!lodashFunc) {
        return;
      }
      lodash.prototype[methodName] = function() {
        var value = this.__wrapped__,
            args = isTaker ? [1] : arguments,
            isLazy = value instanceof LazyWrapper,
            iteratee = args[0],
            useLazy = isLazy || isArray(value);

        var interceptor = function(value) {
          var result = lodashFunc.apply(lodash, arrayPush([value], args));
          return (isTaker && chainAll) ? result[0] : result;
        };

        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
          // Avoid lazy use if the iteratee has a "length" value other than `1`.
          isLazy = useLazy = false;
        }
        var chainAll = this.__chain__,
            isHybrid = !!this.__actions__.length,
            isUnwrapped = retUnwrapped && !chainAll,
            onlyLazy = isLazy && !isHybrid;

        if (!retUnwrapped && useLazy) {
          value = onlyLazy ? value : new LazyWrapper(this);
          var result = func.apply(value, args);
          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
          return new LodashWrapper(result, chainAll);
        }
        if (isUnwrapped && onlyLazy) {
          return func.apply(this, args);
        }
        result = this.thru(interceptor);
        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
      };
    });

    // Add `Array` methods to `lodash.prototype`.
    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
      var func = arrayProto[methodName],
          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
          retUnwrapped = /^(?:pop|shift)$/.test(methodName);

      lodash.prototype[methodName] = function() {
        var args = arguments;
        if (retUnwrapped && !this.__chain__) {
          var value = this.value();
          return func.apply(isArray(value) ? value : [], args);
        }
        return this[chainName](function(value) {
          return func.apply(isArray(value) ? value : [], args);
        });
      };
    });

    // Map minified method names to their real names.
    baseForOwn(LazyWrapper.prototype, function(func, methodName) {
      var lodashFunc = lodash[methodName];
      if (lodashFunc) {
        var key = lodashFunc.name + '';
        if (!hasOwnProperty.call(realNames, key)) {
          realNames[key] = [];
        }
        realNames[key].push({ 'name': methodName, 'func': lodashFunc });
      }
    });

    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
      'name': 'wrapper',
      'func': undefined
    }];

    // Add methods to `LazyWrapper`.
    LazyWrapper.prototype.clone = lazyClone;
    LazyWrapper.prototype.reverse = lazyReverse;
    LazyWrapper.prototype.value = lazyValue;

    // Add chain sequence methods to the `lodash` wrapper.
    lodash.prototype.at = wrapperAt;
    lodash.prototype.chain = wrapperChain;
    lodash.prototype.commit = wrapperCommit;
    lodash.prototype.next = wrapperNext;
    lodash.prototype.plant = wrapperPlant;
    lodash.prototype.reverse = wrapperReverse;
    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;

    // Add lazy aliases.
    lodash.prototype.first = lodash.prototype.head;

    if (symIterator) {
      lodash.prototype[symIterator] = wrapperToIterator;
    }
    return lodash;
  });

  /*--------------------------------------------------------------------------*/

  // Export lodash.
  var _ = runInContext();

  // Some AMD build optimizers, like r.js, check for condition patterns like:
  if (true) {
    // Expose Lodash on the global object to prevent errors when Lodash is
    // loaded by a script tag in the presence of an AMD loader.
    // See http://requirejs.org/docs/errors.html#mismatch for more details.
    // Use `_.noConflict` to remove Lodash from the global object.
    root._ = _;

    // Define as an anonymous module so, through path mapping, it can be
    // referenced as the "underscore" module.
    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
      return _;
    }).call(exports, __webpack_require__, exports, module),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  }
  // Check for `exports` after `define` in case a build optimizer adds it.
  else {}
}.call(this));


/***/ }),

/***/ 577986:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var assert = __webpack_require__(742357);

var level = __webpack_require__(277445);

var async = __webpack_require__(338500);

var rlp = __webpack_require__(6636);

var ethUtil = __webpack_require__(912903);

var semaphore = __webpack_require__(80045);

var TrieNode = __webpack_require__(334568);

var ReadStream = __webpack_require__(774443);

var PrioritizedTaskExecutor = __webpack_require__(270427);

var matchingNibbleLength = __webpack_require__(341574).matchingNibbleLength;

var doKeysMatch = __webpack_require__(341574).doKeysMatch;

var callTogether = __webpack_require__(341574).callTogether;

var asyncFirstSeries = __webpack_require__(341574).asyncFirstSeries;
/**
 * Use `require('merkel-patricia-tree')` for the base interface. In Ethereum applications stick with the Secure Trie Overlay `require('merkel-patricia-tree/secure')`. The API for the raw and the secure interface are about the same
 * @class Trie
 * @public
 * @param {Object} [db] An instance of [levelup](https://github.com/rvagg/node-levelup/) or a compatible API. If the db is `null` or left undefined, then the trie will be stored in memory via [memdown](https://github.com/rvagg/memdown)
 * @param {Buffer|String} [root] A hex `String` or `Buffer` for the root of a previously stored trie
 * @prop {Buffer} root The current root of the `trie`
 * @prop {Boolean} isCheckpoint  determines if you are saving to a checkpoint or directly to the db
 * @prop {Buffer} EMPTY_TRIE_ROOT the Root for an empty trie
 */


module.exports =
/*#__PURE__*/
function () {
  function Trie(db, root) {
    _classCallCheck(this, Trie);

    var self = this;
    this.EMPTY_TRIE_ROOT = ethUtil.SHA3_RLP;
    this.sem = semaphore(1); // setup dbs

    this.db = db || level();
    this._getDBs = [this.db];
    this._putDBs = [this.db];
    Object.defineProperty(this, 'root', {
      set: function set(value) {
        if (value) {
          value = ethUtil.toBuffer(value);
          assert(value.length === 32, 'Invalid root length. Roots are 32 bytes');
        } else {
          value = self.EMPTY_TRIE_ROOT;
        }

        this._root = value;
      },
      get: function get() {
        return this._root;
      }
    });
    this.root = root;
    this.putRaw = this._putRaw;
  }
  /**
   * Gets a value given a `key`
   * @method get
   * @memberof Trie
   * @param {Buffer|String} key - the key to search for
   * @param {Function} cb A callback `Function` which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`
   */


  _createClass(Trie, [{
    key: "get",
    value: function get(key, cb) {
      key = ethUtil.toBuffer(key);
      this.findPath(key, function (err, node, remainder, stack) {
        var value = null;

        if (node && remainder.length === 0) {
          value = node.value;
        }

        cb(err, value);
      });
    }
    /**
     * Stores a given `value` at the given `key`
     * @method put
     * @memberof Trie
     * @param {Buffer|String} key
     * @param {Buffer|String} Value
     * @param {Function} cb A callback `Function` which is given the argument `err` - for errors that may have occured
     */

  }, {
    key: "put",
    value: function put(key, value, cb) {
      var _this = this;

      key = ethUtil.toBuffer(key);
      value = ethUtil.toBuffer(value);

      if (!value || value.toString() === '') {
        this.del(key, cb);
      } else {
        cb = callTogether(cb, this.sem.leave);
        this.sem.take(function () {
          if (_this.root.toString('hex') !== ethUtil.SHA3_RLP.toString('hex')) {
            // first try to find the give key or its nearst node
            _this.findPath(key, function (err, foundValue, keyRemainder, stack) {
              if (err) {
                return cb(err);
              } // then update


              _this._updateNode(key, value, keyRemainder, stack, cb);
            });
          } else {
            _this._createInitialNode(key, value, cb); // if no root initialize this trie

          }
        });
      }
    }
    /**
     * deletes a value given a `key`
     * @method del
     * @memberof Trie
     * @param {Buffer|String} key
     * @param {Function} callback the callback `Function`
     */

  }, {
    key: "del",
    value: function del(key, cb) {
      var _this2 = this;

      key = ethUtil.toBuffer(key);
      cb = callTogether(cb, this.sem.leave);
      this.sem.take(function () {
        _this2.findPath(key, function (err, foundValue, keyRemainder, stack) {
          if (err) {
            return cb(err);
          }

          if (foundValue) {
            _this2._deleteNode(key, stack, cb);
          } else {
            cb();
          }
        });
      });
    }
    /**
     * Retrieves a raw value in the underlying db
     * @method getRaw
     * @memberof Trie
     * @param {Buffer} key
     * @param {Function} callback A callback `Function`, which is given the arguments `err` - for errors that may have occured and `value` - the found value in a `Buffer` or if no value was found `null`.
     */

  }, {
    key: "getRaw",
    value: function getRaw(key, cb) {
      key = ethUtil.toBuffer(key);

      function dbGet(db, cb2) {
        db.get(key, {
          keyEncoding: 'binary',
          valueEncoding: 'binary'
        }, function (err, foundNode) {
          if (err || !foundNode) {
            cb2(null, null);
          } else {
            cb2(null, foundNode);
          }
        });
      }

      asyncFirstSeries(this._getDBs, dbGet, cb);
    } // retrieves a node from dbs by hash

  }, {
    key: "_lookupNode",
    value: function _lookupNode(node, cb) {
      if (TrieNode.isRawNode(node)) {
        cb(new TrieNode(node));
      } else {
        this.getRaw(node, function (err, value) {
          if (err) {
            throw err;
          }

          if (value) {
            value = new TrieNode(rlp.decode(value));
          }

          cb(value);
        });
      }
    }
    /**
     * Writes a value directly to the underlining db
     * @method putRaw
     * @memberof Trie
     * @param {Buffer|String} key The key as a `Buffer` or `String`
     * @param {Buffer} value The value to be stored
     * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
     */
    // TODO: remove the proxy method when changing the caching

  }, {
    key: "_putRaw",
    value: function _putRaw(key, val, cb) {
      function dbPut(db, cb2) {
        db.put(key, val, {
          keyEncoding: 'binary',
          valueEncoding: 'binary'
        }, cb2);
      }

      async.each(this._putDBs, dbPut, cb);
    }
    /**
     * Removes a raw value in the underlying db
     * @method delRaw
     * @memberof Trie
     * @param {Buffer|String} key
     * @param {Function} callback A callback `Function`, which is given the argument `err` - for errors that may have occured
     */

  }, {
    key: "delRaw",
    value: function delRaw(key, cb) {
      function del(db, cb2) {
        db.del(key, {
          keyEncoding: 'binary'
        }, cb2);
      }

      async.each(this._putDBs, del, cb);
    } // writes a single node to dbs

  }, {
    key: "_putNode",
    value: function _putNode(node, cb) {
      var hash = node.hash();
      var serialized = node.serialize();

      this._putRaw(hash, serialized, cb);
    } // writes many nodes to db

  }, {
    key: "_batchNodes",
    value: function _batchNodes(opStack, cb) {
      function dbBatch(db, cb) {
        db.batch(opStack, {
          keyEncoding: 'binary',
          valueEncoding: 'binary'
        }, cb);
      }

      async.each(this._putDBs, dbBatch, cb);
    }
    /**
     * Tries to find a path to the node for the given key
     * It returns a `stack` of nodes to the closet node
     * @method findPath
     * @memberof Trie
     * @param {String|Buffer} - key - the search key
     * @param {Function} - cb - the callback function. Its is given the following
     * arguments
     *  - err - any errors encontered
     *  - node - the last node found
     *  - keyRemainder - the remaining key nibbles not accounted for
     *  - stack - an array of nodes that forms the path to node we are searching for
     */

  }, {
    key: "findPath",
    value: function findPath(targetKey, cb) {
      var stack = [];
      targetKey = TrieNode.stringToNibbles(targetKey);

      this._walkTrie(this.root, processNode, cb);

      function processNode(nodeRef, node, keyProgress, walkController) {
        var nodeKey = node.key || [];
        var keyRemainder = targetKey.slice(matchingNibbleLength(keyProgress, targetKey));
        var matchingLen = matchingNibbleLength(keyRemainder, nodeKey);
        stack.push(node);

        if (node.type === 'branch') {
          if (keyRemainder.length === 0) {
            walkController.return(null, node, [], stack); // we exhausted the key without finding a node
          } else {
            var branchIndex = keyRemainder[0];
            var branchNode = node.getValue(branchIndex);

            if (!branchNode) {
              // there are no more nodes to find and we didn't find the key
              walkController.return(null, null, keyRemainder, stack);
            } else {
              // node found, continuing search
              walkController.only(branchIndex);
            }
          }
        } else if (node.type === 'leaf') {
          if (doKeysMatch(keyRemainder, nodeKey)) {
            // keys match, return node with empty key
            walkController.return(null, node, [], stack);
          } else {
            // reached leaf but keys dont match
            walkController.return(null, null, keyRemainder, stack);
          }
        } else if (node.type === 'extention') {
          if (matchingLen !== nodeKey.length) {
            // keys dont match, fail
            walkController.return(null, null, keyRemainder, stack);
          } else {
            // keys match, continue search
            walkController.next();
          }
        }
      }
    }
    /*
     * Finds all nodes that store k,v values
     */

  }, {
    key: "_findNode",
    value: function _findNode(key, root, stack, cb) {
      var _arguments = arguments;
      this.findPath(key, function () {
        cb.apply(null, _arguments);
      });
    }
    /*
     * Finds all nodes that store k,v values
     */

  }, {
    key: "_findValueNodes",
    value: function _findValueNodes(onFound, cb) {
      this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
        var fullKey = key;

        if (node.key) {
          fullKey = key.concat(node.key);
        }

        if (node.type === 'leaf') {
          // found leaf node!
          onFound(nodeRef, node, fullKey, walkController.next);
        } else if (node.type === 'branch' && node.value) {
          // found branch with value
          onFound(nodeRef, node, fullKey, walkController.next);
        } else {
          // keep looking for value nodes
          walkController.next();
        }
      }, cb);
    }
    /*
     * Finds all nodes that are stored directly in the db
     * (some nodes are stored raw inside other nodes)
     */

  }, {
    key: "_findDbNodes",
    value: function _findDbNodes(onFound, cb) {
      this._walkTrie(this.root, function (nodeRef, node, key, walkController) {
        if (TrieNode.isRawNode(nodeRef)) {
          walkController.next();
        } else {
          onFound(nodeRef, node, key, walkController.next);
        }
      }, cb);
    }
    /**
     * Updates a node
     * @method _updateNode
     * @private
     * @param {Buffer} key
     * @param {Buffer| String} value
     * @param {Array} keyRemainder
     * @param {Array} stack -
     * @param {Function} cb - the callback
     */

  }, {
    key: "_updateNode",
    value: function _updateNode(key, value, keyRemainder, stack, cb) {
      var toSave = [];
      var lastNode = stack.pop(); // add the new nodes

      key = TrieNode.stringToNibbles(key); // Check if the last node is a leaf and the key matches to this

      var matchLeaf = false;

      if (lastNode.type === 'leaf') {
        var l = 0;

        for (var i = 0; i < stack.length; i++) {
          var n = stack[i];

          if (n.type === 'branch') {
            l++;
          } else {
            l += n.key.length;
          }
        }

        if (matchingNibbleLength(lastNode.key, key.slice(l)) === lastNode.key.length && keyRemainder.length === 0) {
          matchLeaf = true;
        }
      }

      if (matchLeaf) {
        // just updating a found value
        lastNode.value = value;
        stack.push(lastNode);
      } else if (lastNode.type === 'branch') {
        stack.push(lastNode);

        if (keyRemainder !== 0) {
          // add an extention to a branch node
          keyRemainder.shift(); // create a new leaf

          var newLeaf = new TrieNode('leaf', keyRemainder, value);
          stack.push(newLeaf);
        } else {
          lastNode.value = value;
        }
      } else {
        // create a branch node
        var lastKey = lastNode.key;
        var matchingLength = matchingNibbleLength(lastKey, keyRemainder);
        var newBranchNode = new TrieNode('branch'); // create a new extention node

        if (matchingLength !== 0) {
          var newKey = lastNode.key.slice(0, matchingLength);
          var newExtNode = new TrieNode('extention', newKey, value);
          stack.push(newExtNode);
          lastKey.splice(0, matchingLength);
          keyRemainder.splice(0, matchingLength);
        }

        stack.push(newBranchNode);

        if (lastKey.length !== 0) {
          var branchKey = lastKey.shift();

          if (lastKey.length !== 0 || lastNode.type === 'leaf') {
            // shriking extention or leaf
            lastNode.key = lastKey;

            var formatedNode = this._formatNode(lastNode, false, toSave);

            newBranchNode.setValue(branchKey, formatedNode);
          } else {
            // remove extention or attaching
            this._formatNode(lastNode, false, true, toSave);

            newBranchNode.setValue(branchKey, lastNode.value);
          }
        } else {
          newBranchNode.value = lastNode.value;
        }

        if (keyRemainder.length !== 0) {
          keyRemainder.shift(); // add a leaf node to the new branch node

          var newLeafNode = new TrieNode('leaf', keyRemainder, value);
          stack.push(newLeafNode);
        } else {
          newBranchNode.value = value;
        }
      }

      this._saveStack(key, stack, toSave, cb);
    } // walk tree

  }, {
    key: "_walkTrie",
    value: function _walkTrie(root, onNode, onDone) {
      var self = this;
      root = root || this.root;

      onDone = onDone || function () {};

      var aborted = false;
      var returnValues = [];

      if (root.toString('hex') === ethUtil.SHA3_RLP.toString('hex')) {
        return onDone();
      }

      this._lookupNode(root, function (node) {
        processNode(root, node, null, function (err) {
          if (err) {
            return onDone(err);
          }

          onDone.apply(null, returnValues);
        });
      }); // the maximum pool size should be high enough to utilise the parallelizability of reading nodes from disk and
      // low enough to utilize the prioritisation of node lookup.


      var maxPoolSize = 500;
      var taskExecutor = new PrioritizedTaskExecutor(maxPoolSize);

      function processNode(nodeRef, node, key, cb) {
        if (!node || aborted) {
          return cb();
        }

        var stopped = false;
        key = key || [];
        var walkController = {
          stop: function stop() {
            stopped = true;
            cb();
          },
          // end all traversal and return values to the onDone cb
          return: function _return() {
            aborted = true;
            returnValues = arguments;
            cb();
          },
          next: function next() {
            if (aborted || stopped) {
              return cb();
            }

            var children = node.getChildren();
            async.forEachOf(children, function (childData, index, cb) {
              var keyExtension = childData[0];
              var childRef = childData[1];
              var childKey = key.concat(keyExtension);
              var priority = childKey.length;
              taskExecutor.execute(priority, function (taskCallback) {
                self._lookupNode(childRef, function (childNode) {
                  taskCallback();
                  processNode(childRef, childNode, childKey, cb);
                });
              });
            }, cb);
          },
          only: function only(childIndex) {
            var childRef = node.getValue(childIndex);
            var childKey = key.slice();
            childKey.push(childIndex);
            var priority = childKey.length;
            taskExecutor.execute(priority, function (taskCallback) {
              self._lookupNode(childRef, function (childNode) {
                taskCallback();
                processNode(childRef, childNode, childKey, cb);
              });
            });
          }
        };
        onNode(nodeRef, node, key, walkController);
      }
    }
    /**
     * saves a stack
     * @method _saveStack
     * @private
     * @param {Array} key - the key. Should follow the stack
     * @param {Array} stack - a stack of nodes to the value given by the key
     * @param {Array} opStack - a stack of levelup operations to commit at the end of this funciton
     * @param {Function} cb
     */

  }, {
    key: "_saveStack",
    value: function _saveStack(key, stack, opStack, cb) {
      var lastRoot; // update nodes

      while (stack.length) {
        var node = stack.pop();

        if (node.type === 'leaf') {
          key.splice(key.length - node.key.length);
        } else if (node.type === 'extention') {
          key.splice(key.length - node.key.length);

          if (lastRoot) {
            node.value = lastRoot;
          }
        } else if (node.type === 'branch') {
          if (lastRoot) {
            var branchKey = key.pop();
            node.setValue(branchKey, lastRoot);
          }
        }

        lastRoot = this._formatNode(node, stack.length === 0, opStack);
      }

      if (lastRoot) {
        this.root = lastRoot;
      }

      this._batchNodes(opStack, cb);
    }
  }, {
    key: "_deleteNode",
    value: function _deleteNode(key, stack, cb) {
      var _this3 = this;

      function processBranchNode(key, branchKey, branchNode, parentNode, stack) {
        // branchNode is the node ON the branch node not THE branch node
        var branchNodeKey = branchNode.key;

        if (!parentNode || parentNode.type === 'branch') {
          // branch->?
          if (parentNode) {
            stack.push(parentNode);
          }

          if (branchNode.type === 'branch') {
            // create an extention node
            // branch->extention->branch
            var extentionNode = new TrieNode('extention', [branchKey], null);
            stack.push(extentionNode);
            key.push(branchKey);
          } else {
            // branch key is an extention or a leaf
            // branch->(leaf or extention)
            branchNodeKey.unshift(branchKey);
            branchNode.key = branchNodeKey; // hackery. This is equvilant to array.concat except we need keep the
            // rerfance to the `key` that was passed in.

            branchNodeKey.unshift(0);
            branchNodeKey.unshift(key.length);
            key.splice.apply(key, branchNodeKey);
          }

          stack.push(branchNode);
        } else {
          // parent is a extention
          var parentKey = parentNode.key;

          if (branchNode.type === 'branch') {
            // ext->branch
            parentKey.push(branchKey);
            key.push(branchKey);
            parentNode.key = parentKey;
            stack.push(parentNode);
          } else {
            // branch node is an leaf or extention and parent node is an exstention
            // add two keys together
            // dont push the parent node
            branchNodeKey.unshift(branchKey);
            key = key.concat(branchNodeKey);
            parentKey = parentKey.concat(branchNodeKey);
            branchNode.key = parentKey;
          }

          stack.push(branchNode);
        }

        return key;
      }

      var lastNode = stack.pop();
      var parentNode = stack.pop();
      var opStack = [];

      if (!Array.isArray(key)) {
        // convert key to nibbles
        key = TrieNode.stringToNibbles(key);
      }

      if (!parentNode) {
        // the root here has to be a leaf.
        this.root = this.EMPTY_TRIE_ROOT;
        cb();
      } else {
        if (lastNode.type === 'branch') {
          lastNode.value = null;
        } else {
          // the lastNode has to be a leaf if its not a branch. And a leaf's parent
          // if it has one must be a branch.
          var lastNodeKey = lastNode.key;
          key.splice(key.length - lastNodeKey.length); // delete the value

          this._formatNode(lastNode, false, true, opStack);

          parentNode.setValue(key.pop(), null);
          lastNode = parentNode;
          parentNode = stack.pop();
        } // nodes on the branch


        var branchNodes = []; // count the number of nodes on the branch

        lastNode.raw.forEach(function (node, i) {
          var val = lastNode.getValue(i);

          if (val) {
            branchNodes.push([i, val]);
          }
        }); // if there is only one branch node left, collapse the branch node

        if (branchNodes.length === 1) {
          // add the one remaing branch node to node above it
          var branchNode = branchNodes[0][1];
          var branchNodeKey = branchNodes[0][0]; // look up node

          this._lookupNode(branchNode, function (foundNode) {
            key = processBranchNode(key, branchNodeKey, foundNode, parentNode, stack, opStack);

            _this3._saveStack(key, stack, opStack, cb);
          });
        } else {
          // simple removing a leaf and recaluclation the stack
          if (parentNode) {
            stack.push(parentNode);
          }

          stack.push(lastNode);

          this._saveStack(key, stack, opStack, cb);
        }
      }
    } // Creates the initial node from an empty tree

  }, {
    key: "_createInitialNode",
    value: function _createInitialNode(key, value, cb) {
      var newNode = new TrieNode('leaf', key, value);
      this.root = newNode.hash();

      this._putNode(newNode, cb);
    } // formats node to be saved by levelup.batch.
    // returns either the hash that will be used key or the rawNode

  }, {
    key: "_formatNode",
    value: function _formatNode(node, topLevel, remove, opStack) {
      if (arguments.length === 3) {
        opStack = remove;
        remove = false;
      }

      var rlpNode = node.serialize();

      if (rlpNode.length >= 32 || topLevel) {
        var hashRoot = node.hash();

        if (remove && this.isCheckpoint) {
          opStack.push({
            type: 'del',
            key: hashRoot
          });
        } else {
          opStack.push({
            type: 'put',
            key: hashRoot,
            value: rlpNode
          });
        }

        return hashRoot;
      }

      return node.raw;
    }
    /**
     * The `data` event is given an `Object` hat has two properties; the `key` and the `value`. Both should be Buffers.
     * @method createReadStream
     * @memberof Trie
     * @return {stream.Readable} Returns a [stream](https://nodejs.org/dist/latest-v5.x/docs/api/stream.html#stream_class_stream_readable) of the contents of the `trie`
     */

  }, {
    key: "createReadStream",
    value: function createReadStream() {
      return new ReadStream(this);
    } // creates a new trie backed by the same db
    // and starting at the same root

  }, {
    key: "copy",
    value: function copy() {
      return new Trie(this.db, this.root);
    }
    /**
     * The given hash of operations (key additions or deletions) are executed on the DB
     * @method batch
     * @memberof Trie
     * @example
     * var ops = [
     *    { type: 'del', key: 'father' }
     *  , { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' }
     *  , { type: 'put', key: 'dob', value: '16 February 1941' }
     *  , { type: 'put', key: 'spouse', value: 'Kim Young-sook' }
     *  , { type: 'put', key: 'occupation', value: 'Clown' }
     * ]
     * trie.batch(ops)
     * @param {Array} ops
     * @param {Function} cb
     */

  }, {
    key: "batch",
    value: function batch(ops, cb) {
      var _this4 = this;

      async.eachSeries(ops, function (op, cb2) {
        if (op.type === 'put') {
          _this4.put(op.key, op.value, cb2);
        } else if (op.type === 'del') {
          _this4.del(op.key, cb2);
        } else {
          cb2();
        }
      }, cb);
    }
    /**
     * Checks if a given root exists
     * @method checkRoot
     * @memberof Trie
     * @param {Buffer} root
     * @param {Function} cb
     */

  }, {
    key: "checkRoot",
    value: function checkRoot(root, cb) {
      root = ethUtil.toBuffer(root);

      this._lookupNode(root, function (value) {
        cb(null, !!value);
      });
    }
  }]);

  return Trie;
}();

/***/ }),

/***/ 241276:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var level = __webpack_require__(277445);

var async = __webpack_require__(338500);

var WriteStream = __webpack_require__(358737);

var callTogether = __webpack_require__(341574).callTogether;

var ScratchReadStream = __webpack_require__(100558);

module.exports = checkpointInterface;

function checkpointInterface(trie) {
  this._scratch = null;
  trie._checkpoints = [];
  Object.defineProperty(trie, 'isCheckpoint', {
    get: function get() {
      return !!trie._checkpoints.length;
    }
  }); // new methods

  trie.checkpoint = checkpoint;
  trie.commit = commit;
  trie.revert = revert;
  trie._enterCpMode = _enterCpMode;
  trie._exitCpMode = _exitCpMode;
  trie.createScratchReadStream = createScratchReadStream; // overwrites

  trie.copy = copy.bind(trie, trie.copy.bind(trie));
}
/**
 * Creates a checkpoint that can later be reverted to or committed. After this is called, no changes to the trie will be permanently saved until `commit` is called
 * @method checkpoint
 * @private
 */


function checkpoint() {
  var self = this;
  var wasCheckpoint = self.isCheckpoint;

  self._checkpoints.push(self.root);

  if (!wasCheckpoint && self.isCheckpoint) {
    self._enterCpMode();
  }
}
/**
 * commits a checkpoint to disk
 * @method commit
 * @private
 * @param {Function} cb the callback
 */


function commit(cb) {
  var self = this;
  cb = callTogether(cb, self.sem.leave);
  self.sem.take(function () {
    if (self.isCheckpoint) {
      self._checkpoints.pop();

      if (!self.isCheckpoint) {
        self._exitCpMode(true, cb);
      } else {
        cb();
      }
    } else {
      throw new Error('trying to commit when not checkpointed');
    }
  });
}
/**
 * Reverts the trie to the state it was at when `checkpoint` was first called.
 * @method revert
 * @private
 * @param {Function} cb the callback
 */


function revert(cb) {
  var self = this;
  cb = callTogether(cb, self.sem.leave);
  self.sem.take(function () {
    if (self.isCheckpoint) {
      self.root = self._checkpoints.pop();

      if (!self.isCheckpoint) {
        self._exitCpMode(false, cb);

        return;
      }
    }

    cb();
  });
} // enter into checkpoint mode


function _enterCpMode() {
  this._scratch = level();
  this._getDBs = [this._scratch].concat(this._getDBs);
  this.__putDBs = this._putDBs;
  this._putDBs = [this._scratch];
  this._putRaw = this.putRaw;
  this.putRaw = putRaw;
} // exit from checkpoint mode


function _exitCpMode(commitState, cb) {
  var self = this;
  var scratch = this._scratch;
  this._scratch = null;
  this._getDBs = this._getDBs.slice(1);
  this._putDBs = this.__putDBs;
  this.putRaw = this._putRaw;

  function flushScratch(db, cb) {
    self.createScratchReadStream(scratch).pipe(WriteStream(db)).on('close', cb);
  }

  if (commitState) {
    async.map(this._putDBs, flushScratch, cb);
  } else {
    cb();
  }
} // adds the interface when copying the trie


function copy(_super) {
  var trie = _super();

  checkpointInterface.call(trie, trie);
  trie._scratch = this._scratch; // trie._checkpoints = this._checkpoints.slice()

  return trie;
}

function putRaw(key, val, cb) {
  function dbPut(db, cb2) {
    db.put(key, val, {
      keyEncoding: 'binary',
      valueEncoding: 'binary'
    }, cb2);
  }

  async.each(this.__putDBs, dbPut, cb);
}

function createScratchReadStream(scratch) {
  var trie = this.copy();
  scratch = scratch || this._scratch; // only read from the scratch

  trie._getDBs = [scratch];
  trie._scratch = scratch;
  return new ScratchReadStream(trie);
}

/***/ }),

/***/ 822358:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

var BaseTrie = __webpack_require__(577986);

var checkpointInterface = __webpack_require__(241276);

var proof = __webpack_require__(320215);

module.exports =
/*#__PURE__*/
function (_BaseTrie) {
  _inherits(CheckpointTrie, _BaseTrie);

  function CheckpointTrie() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, CheckpointTrie);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CheckpointTrie)).call.apply(_getPrototypeOf2, [this].concat(args)));
    checkpointInterface.call(_assertThisInitialized(_assertThisInitialized(_this)), _assertThisInitialized(_assertThisInitialized(_this)));
    return _this;
  }

  _createClass(CheckpointTrie, null, [{
    key: "prove",
    value: function prove() {
      return proof.prove.apply(proof, arguments);
    }
  }, {
    key: "verifyProof",
    value: function verifyProof() {
      return proof.verifyProof.apply(proof, arguments);
    }
  }]);

  return CheckpointTrie;
}(BaseTrie);

/***/ }),

/***/ 338500:
/***/ (function(module, exports, __webpack_require__) {

/* module decorator */ module = __webpack_require__.nmd(module);
(function (global, factory) {
   true ? factory(exports) :
  0;
}(this, (function (exports) { 'use strict';

function slice(arrayLike, start) {
    start = start|0;
    var newLen = Math.max(arrayLike.length - start, 0);
    var newArr = Array(newLen);
    for(var idx = 0; idx < newLen; idx++)  {
        newArr[idx] = arrayLike[start + idx];
    }
    return newArr;
}

/**
 * Creates a continuation function with some arguments already applied.
 *
 * Useful as a shorthand when combined with other control flow functions. Any
 * arguments passed to the returned function are added to the arguments
 * originally passed to apply.
 *
 * @name apply
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {Function} fn - The function you want to eventually apply all
 * arguments to. Invokes with (arguments...).
 * @param {...*} arguments... - Any number of arguments to automatically apply
 * when the continuation is called.
 * @returns {Function} the partially-applied function
 * @example
 *
 * // using apply
 * async.parallel([
 *     async.apply(fs.writeFile, 'testfile1', 'test1'),
 *     async.apply(fs.writeFile, 'testfile2', 'test2')
 * ]);
 *
 *
 * // the same process without using apply
 * async.parallel([
 *     function(callback) {
 *         fs.writeFile('testfile1', 'test1', callback);
 *     },
 *     function(callback) {
 *         fs.writeFile('testfile2', 'test2', callback);
 *     }
 * ]);
 *
 * // It's possible to pass any number of additional arguments when calling the
 * // continuation:
 *
 * node> var fn = async.apply(sys.puts, 'one');
 * node> fn('two', 'three');
 * one
 * two
 * three
 */
var apply = function(fn/*, ...args*/) {
    var args = slice(arguments, 1);
    return function(/*callArgs*/) {
        var callArgs = slice(arguments);
        return fn.apply(null, args.concat(callArgs));
    };
};

var initialParams = function (fn) {
    return function (/*...args, callback*/) {
        var args = slice(arguments);
        var callback = args.pop();
        fn.call(this, args, callback);
    };
};

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';

function fallback(fn) {
    setTimeout(fn, 0);
}

function wrap(defer) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        defer(function () {
            fn.apply(null, args);
        });
    };
}

var _defer;

if (hasSetImmediate) {
    _defer = setImmediate;
} else if (hasNextTick) {
    _defer = process.nextTick;
} else {
    _defer = fallback;
}

var setImmediate$1 = wrap(_defer);

/**
 * Take a sync function and make it async, passing its return value to a
 * callback. This is useful for plugging sync functions into a waterfall,
 * series, or other async functions. Any arguments passed to the generated
 * function will be passed to the wrapped function (except for the final
 * callback argument). Errors thrown will be passed to the callback.
 *
 * If the function passed to `asyncify` returns a Promise, that promises's
 * resolved/rejected state will be used to call the callback, rather than simply
 * the synchronous return value.
 *
 * This also means you can asyncify ES2017 `async` functions.
 *
 * @name asyncify
 * @static
 * @memberOf module:Utils
 * @method
 * @alias wrapSync
 * @category Util
 * @param {Function} func - The synchronous function, or Promise-returning
 * function to convert to an {@link AsyncFunction}.
 * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
 * invoked with `(args..., callback)`.
 * @example
 *
 * // passing a regular synchronous function
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(JSON.parse),
 *     function (data, next) {
 *         // data is the result of parsing the text.
 *         // If there was a parsing error, it would have been caught.
 *     }
 * ], callback);
 *
 * // passing a function returning a promise
 * async.waterfall([
 *     async.apply(fs.readFile, filename, "utf8"),
 *     async.asyncify(function (contents) {
 *         return db.model.create(contents);
 *     }),
 *     function (model, next) {
 *         // `model` is the instantiated model object.
 *         // If there was an error, this function would be skipped.
 *     }
 * ], callback);
 *
 * // es2017 example, though `asyncify` is not needed if your JS environment
 * // supports async functions out of the box
 * var q = async.queue(async.asyncify(async function(file) {
 *     var intermediateStep = await processFile(file);
 *     return await somePromise(intermediateStep)
 * }));
 *
 * q.push(files);
 */
function asyncify(func) {
    return initialParams(function (args, callback) {
        var result;
        try {
            result = func.apply(this, args);
        } catch (e) {
            return callback(e);
        }
        // if result is Promise object
        if (isObject(result) && typeof result.then === 'function') {
            result.then(function(value) {
                invokeCallback(callback, null, value);
            }, function(err) {
                invokeCallback(callback, err.message ? err : new Error(err));
            });
        } else {
            callback(null, result);
        }
    });
}

function invokeCallback(callback, error, value) {
    try {
        callback(error, value);
    } catch (e) {
        setImmediate$1(rethrow, e);
    }
}

function rethrow(error) {
    throw error;
}

var supportsSymbol = typeof Symbol === 'function';

function isAsync(fn) {
    return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';
}

function wrapAsync(asyncFn) {
    return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn;
}

function applyEach$1(eachfn) {
    return function(fns/*, ...args*/) {
        var args = slice(arguments, 1);
        var go = initialParams(function(args, callback) {
            var that = this;
            return eachfn(fns, function (fn, cb) {
                wrapAsync(fn).apply(that, args.concat(cb));
            }, callback);
        });
        if (args.length) {
            return go.apply(this, args);
        }
        else {
            return go;
        }
    };
}

/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

/** Built-in value references. */
var Symbol$1 = root.Symbol;

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$1 = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$1 = objectProto$1.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString$1.call(value);
}

/** `Object#toString` result references. */
var nullTag = '[object Null]';
var undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]';
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
var proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
var breakLoop = {};

/**
 * This method returns `undefined`.
 *
 * @static
 * @memberOf _
 * @since 2.3.0
 * @category Util
 * @example
 *
 * _.times(2, _.noop);
 * // => [undefined, undefined]
 */
function noop() {
  // No operation performed.
}

function once(fn) {
    return function () {
        if (fn === null) return;
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator;

var getIterator = function (coll) {
    return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]();
};

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

/** `Object#toString` result references. */
var argsTag = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

/** Used for built-in method references. */
var objectProto$3 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$1 = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER$1 : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';
var arrayTag = '[object Array]';
var boolTag = '[object Boolean]';
var dateTag = '[object Date]';
var errorTag = '[object Error]';
var funcTag$1 = '[object Function]';
var mapTag = '[object Map]';
var numberTag = '[object Number]';
var objectTag = '[object Object]';
var regexpTag = '[object RegExp]';
var setTag = '[object Set]';
var stringTag = '[object String]';
var weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]';
var dataViewTag = '[object DataView]';
var float32Tag = '[object Float32Array]';
var float64Tag = '[object Float64Array]';
var int8Tag = '[object Int8Array]';
var int16Tag = '[object Int16Array]';
var int32Tag = '[object Int32Array]';
var uint8Tag = '[object Uint8Array]';
var uint8ClampedTag = '[object Uint8ClampedArray]';
var uint16Tag = '[object Uint16Array]';
var uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && "object" == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports$1 && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/** Used for built-in method references. */
var objectProto$2 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty$1.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$5 = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5;

  return value === proto;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/** Used for built-in method references. */
var objectProto$4 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/**
 * Creates an array of the own enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects. See the
 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * for more details.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keys(new Foo);
 * // => ['a', 'b'] (iteration order is not guaranteed)
 *
 * _.keys('hi');
 * // => ['0', '1']
 */
function keys(object) {
  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}

function createArrayIterator(coll) {
    var i = -1;
    var len = coll.length;
    return function next() {
        return ++i < len ? {value: coll[i], key: i} : null;
    }
}

function createES2015Iterator(iterator) {
    var i = -1;
    return function next() {
        var item = iterator.next();
        if (item.done)
            return null;
        i++;
        return {value: item.value, key: i};
    }
}

function createObjectIterator(obj) {
    var okeys = keys(obj);
    var i = -1;
    var len = okeys.length;
    return function next() {
        var key = okeys[++i];
        return i < len ? {value: obj[key], key: key} : null;
    };
}

function iterator(coll) {
    if (isArrayLike(coll)) {
        return createArrayIterator(coll);
    }

    var iterator = getIterator(coll);
    return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}

function onlyOnce(fn) {
    return function() {
        if (fn === null) throw new Error("Callback was already called.");
        var callFn = fn;
        fn = null;
        callFn.apply(this, arguments);
    };
}

function _eachOfLimit(limit) {
    return function (obj, iteratee, callback) {
        callback = once(callback || noop);
        if (limit <= 0 || !obj) {
            return callback(null);
        }
        var nextElem = iterator(obj);
        var done = false;
        var running = 0;
        var looping = false;

        function iterateeCallback(err, value) {
            running -= 1;
            if (err) {
                done = true;
                callback(err);
            }
            else if (value === breakLoop || (done && running <= 0)) {
                done = true;
                return callback(null);
            }
            else if (!looping) {
                replenish();
            }
        }

        function replenish () {
            looping = true;
            while (running < limit && !done) {
                var elem = nextElem();
                if (elem === null) {
                    done = true;
                    if (running <= 0) {
                        callback(null);
                    }
                    return;
                }
                running += 1;
                iteratee(elem.value, elem.key, onlyOnce(iterateeCallback));
            }
            looping = false;
        }

        replenish();
    };
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name eachOfLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`. The `key` is the item's key, or index in the case of an
 * array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachOfLimit(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback);
}

function doLimit(fn, limit) {
    return function (iterable, iteratee, callback) {
        return fn(iterable, limit, iteratee, callback);
    };
}

// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
    callback = once(callback || noop);
    var index = 0,
        completed = 0,
        length = coll.length;
    if (length === 0) {
        callback(null);
    }

    function iteratorCallback(err, value) {
        if (err) {
            callback(err);
        } else if ((++completed === length) || value === breakLoop) {
            callback(null);
        }
    }

    for (; index < length; index++) {
        iteratee(coll[index], index, onlyOnce(iteratorCallback));
    }
}

// a generic version of eachOf which can handle array, object, and iterator cases.
var eachOfGeneric = doLimit(eachOfLimit, Infinity);

/**
 * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
 * to the iteratee.
 *
 * @name eachOf
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEachOf
 * @category Collection
 * @see [async.each]{@link module:Collections.each}
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each
 * item in `coll`.
 * The `key` is the item's key, or index in the case of an array.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
 * var configs = {};
 *
 * async.forEachOf(obj, function (value, key, callback) {
 *     fs.readFile(__dirname + value, "utf8", function (err, data) {
 *         if (err) return callback(err);
 *         try {
 *             configs[key] = JSON.parse(data);
 *         } catch (e) {
 *             return callback(e);
 *         }
 *         callback();
 *     });
 * }, function (err) {
 *     if (err) console.error(err.message);
 *     // configs is now a map of JSON data
 *     doSomethingWith(configs);
 * });
 */
var eachOf = function(coll, iteratee, callback) {
    var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric;
    eachOfImplementation(coll, wrapAsync(iteratee), callback);
};

function doParallel(fn) {
    return function (obj, iteratee, callback) {
        return fn(eachOf, obj, wrapAsync(iteratee), callback);
    };
}

function _asyncMap(eachfn, arr, iteratee, callback) {
    callback = callback || noop;
    arr = arr || [];
    var results = [];
    var counter = 0;
    var _iteratee = wrapAsync(iteratee);

    eachfn(arr, function (value, _, callback) {
        var index = counter++;
        _iteratee(value, function (err, v) {
            results[index] = v;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Produces a new collection of values by mapping each value in `coll` through
 * the `iteratee` function. The `iteratee` is called with an item from `coll`
 * and a callback for when it has finished processing. Each of these callback
 * takes 2 arguments: an `error`, and the transformed item from `coll`. If
 * `iteratee` passes an error to its callback, the main `callback` (for the
 * `map` function) is immediately called with the error.
 *
 * Note, that since this function applies the `iteratee` to each item in
 * parallel, there is no guarantee that the `iteratee` functions will complete
 * in order. However, the results array will be in the same order as the
 * original `coll`.
 *
 * If `map` is passed an Object, the results will be an Array.  The results
 * will roughly be in the order of the original Objects' keys (but this can
 * vary across JavaScript engines).
 *
 * @name map
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an Array of the
 * transformed items from the `coll`. Invoked with (err, results).
 * @example
 *
 * async.map(['file1','file2','file3'], fs.stat, function(err, results) {
 *     // results is now an array of stats for each file
 * });
 */
var map = doParallel(_asyncMap);

/**
 * Applies the provided arguments to each function in the array, calling
 * `callback` after all functions have completed. If you only provide the first
 * argument, `fns`, then it will return a function which lets you pass in the
 * arguments as if it were a single function call. If more arguments are
 * provided, `callback` is required while `args` is still optional.
 *
 * @name applyEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s
 * to all call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument, `fns`, is provided, it will
 * return a function which lets you pass in the arguments as if it were a single
 * function call. The signature is `(..args, callback)`. If invoked with any
 * arguments, `callback` is required.
 * @example
 *
 * async.applyEach([enableSearch, updateSchema], 'bucket', callback);
 *
 * // partial application example:
 * async.each(
 *     buckets,
 *     async.applyEach([enableSearch, updateSchema]),
 *     callback
 * );
 */
var applyEach = applyEach$1(map);

function doParallelLimit(fn) {
    return function (obj, limit, iteratee, callback) {
        return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback);
    };
}

/**
 * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
 *
 * @name mapLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapLimit = doParallelLimit(_asyncMap);

/**
 * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
 *
 * @name mapSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with the transformed item.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Results is an array of the
 * transformed items from the `coll`. Invoked with (err, results).
 */
var mapSeries = doLimit(mapLimit, 1);

/**
 * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
 *
 * @name applyEachSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.applyEach]{@link module:ControlFlow.applyEach}
 * @category Control Flow
 * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all
 * call with the same arguments
 * @param {...*} [args] - any number of separate arguments to pass to the
 * function.
 * @param {Function} [callback] - the final argument should be the callback,
 * called when all functions have completed processing.
 * @returns {Function} - If only the first argument is provided, it will return
 * a function which lets you pass in the arguments as if it were a single
 * function call.
 */
var applyEachSeries = applyEach$1(mapSeries);

/**
 * A specialized version of `_.forEach` for arrays without support for
 * iteratee shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns `array`.
 */
function arrayEach(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length;

  while (++index < length) {
    if (iteratee(array[index], index, array) === false) {
      break;
    }
  }
  return array;
}

/**
 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new base function.
 */
function createBaseFor(fromRight) {
  return function(object, iteratee, keysFunc) {
    var index = -1,
        iterable = Object(object),
        props = keysFunc(object),
        length = props.length;

    while (length--) {
      var key = props[fromRight ? length : ++index];
      if (iteratee(iterable[key], key, iterable) === false) {
        break;
      }
    }
    return object;
  };
}

/**
 * The base implementation of `baseForOwn` which iterates over `object`
 * properties returned by `keysFunc` and invokes `iteratee` for each property.
 * Iteratee functions may exit iteration early by explicitly returning `false`.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @param {Function} keysFunc The function to get the keys of `object`.
 * @returns {Object} Returns `object`.
 */
var baseFor = createBaseFor();

/**
 * The base implementation of `_.forOwn` without support for iteratee shorthands.
 *
 * @private
 * @param {Object} object The object to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Object} Returns `object`.
 */
function baseForOwn(object, iteratee) {
  return object && baseFor(object, iteratee, keys);
}

/**
 * The base implementation of `_.findIndex` and `_.findLastIndex` without
 * support for iteratee shorthands.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {Function} predicate The function invoked per iteration.
 * @param {number} fromIndex The index to search from.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseFindIndex(array, predicate, fromIndex, fromRight) {
  var length = array.length,
      index = fromIndex + (fromRight ? 1 : -1);

  while ((fromRight ? index-- : ++index < length)) {
    if (predicate(array[index], index, array)) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.isNaN` without support for number objects.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
 */
function baseIsNaN(value) {
  return value !== value;
}

/**
 * A specialized version of `_.indexOf` which performs strict equality
 * comparisons of values, i.e. `===`.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function strictIndexOf(array, value, fromIndex) {
  var index = fromIndex - 1,
      length = array.length;

  while (++index < length) {
    if (array[index] === value) {
      return index;
    }
  }
  return -1;
}

/**
 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {*} value The value to search for.
 * @param {number} fromIndex The index to search from.
 * @returns {number} Returns the index of the matched value, else `-1`.
 */
function baseIndexOf(array, value, fromIndex) {
  return value === value
    ? strictIndexOf(array, value, fromIndex)
    : baseFindIndex(array, baseIsNaN, fromIndex);
}

/**
 * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
 * their requirements. Each function can optionally depend on other functions
 * being completed first, and each function is run as soon as its requirements
 * are satisfied.
 *
 * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
 * will stop. Further tasks will not execute (so any other functions depending
 * on it will not run), and the main `callback` is immediately called with the
 * error.
 *
 * {@link AsyncFunction}s also receive an object containing the results of functions which
 * have completed so far as the first argument, if they have dependencies. If a
 * task function has no dependencies, it will only be passed a callback.
 *
 * @name auto
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Object} tasks - An object. Each of its properties is either a
 * function or an array of requirements, with the {@link AsyncFunction} itself the last item
 * in the array. The object's key of a property serves as the name of the task
 * defined by that property, i.e. can be used when specifying requirements for
 * other tasks. The function receives one or two arguments:
 * * a `results` object, containing the results of the previously executed
 *   functions, only passed if the task has any dependencies,
 * * a `callback(err, result)` function, which must be called when finished,
 *   passing an `error` (which can be `null`) and the result of the function's
 *   execution.
 * @param {number} [concurrency=Infinity] - An optional `integer` for
 * determining the maximum number of tasks that can be run in parallel. By
 * default, as many as possible.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback. Results are always returned; however, if an
 * error occurs, no further `tasks` will be performed, and the results object
 * will only contain partial results. Invoked with (err, results).
 * @returns undefined
 * @example
 *
 * async.auto({
 *     // this function will just be passed a callback
 *     readData: async.apply(fs.readFile, 'data.txt', 'utf-8'),
 *     showData: ['readData', function(results, cb) {
 *         // results.readData is the file's contents
 *         // ...
 *     }]
 * }, callback);
 *
 * async.auto({
 *     get_data: function(callback) {
 *         console.log('in get_data');
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         console.log('in make_folder');
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: ['get_data', 'make_folder', function(results, callback) {
 *         console.log('in write_file', JSON.stringify(results));
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(results, callback) {
 *         console.log('in email_link', JSON.stringify(results));
 *         // once the file is written let's email a link to it...
 *         // results.write_file contains the filename returned by write_file.
 *         callback(null, {'file':results.write_file, 'email':'user@example.com'});
 *     }]
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('results = ', results);
 * });
 */
var auto = function (tasks, concurrency, callback) {
    if (typeof concurrency === 'function') {
        // concurrency is optional, shift the args.
        callback = concurrency;
        concurrency = null;
    }
    callback = once(callback || noop);
    var keys$$1 = keys(tasks);
    var numTasks = keys$$1.length;
    if (!numTasks) {
        return callback(null);
    }
    if (!concurrency) {
        concurrency = numTasks;
    }

    var results = {};
    var runningTasks = 0;
    var hasError = false;

    var listeners = Object.create(null);

    var readyTasks = [];

    // for cycle detection:
    var readyToCheck = []; // tasks that have been identified as reachable
    // without the possibility of returning to an ancestor task
    var uncheckedDependencies = {};

    baseForOwn(tasks, function (task, key) {
        if (!isArray(task)) {
            // no dependencies
            enqueueTask(key, [task]);
            readyToCheck.push(key);
            return;
        }

        var dependencies = task.slice(0, task.length - 1);
        var remainingDependencies = dependencies.length;
        if (remainingDependencies === 0) {
            enqueueTask(key, task);
            readyToCheck.push(key);
            return;
        }
        uncheckedDependencies[key] = remainingDependencies;

        arrayEach(dependencies, function (dependencyName) {
            if (!tasks[dependencyName]) {
                throw new Error('async.auto task `' + key +
                    '` has a non-existent dependency `' +
                    dependencyName + '` in ' +
                    dependencies.join(', '));
            }
            addListener(dependencyName, function () {
                remainingDependencies--;
                if (remainingDependencies === 0) {
                    enqueueTask(key, task);
                }
            });
        });
    });

    checkForDeadlocks();
    processQueue();

    function enqueueTask(key, task) {
        readyTasks.push(function () {
            runTask(key, task);
        });
    }

    function processQueue() {
        if (readyTasks.length === 0 && runningTasks === 0) {
            return callback(null, results);
        }
        while(readyTasks.length && runningTasks < concurrency) {
            var run = readyTasks.shift();
            run();
        }

    }

    function addListener(taskName, fn) {
        var taskListeners = listeners[taskName];
        if (!taskListeners) {
            taskListeners = listeners[taskName] = [];
        }

        taskListeners.push(fn);
    }

    function taskComplete(taskName) {
        var taskListeners = listeners[taskName] || [];
        arrayEach(taskListeners, function (fn) {
            fn();
        });
        processQueue();
    }


    function runTask(key, task) {
        if (hasError) return;

        var taskCallback = onlyOnce(function(err, result) {
            runningTasks--;
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            if (err) {
                var safeResults = {};
                baseForOwn(results, function(val, rkey) {
                    safeResults[rkey] = val;
                });
                safeResults[key] = result;
                hasError = true;
                listeners = Object.create(null);

                callback(err, safeResults);
            } else {
                results[key] = result;
                taskComplete(key);
            }
        });

        runningTasks++;
        var taskFn = wrapAsync(task[task.length - 1]);
        if (task.length > 1) {
            taskFn(results, taskCallback);
        } else {
            taskFn(taskCallback);
        }
    }

    function checkForDeadlocks() {
        // Kahn's algorithm
        // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
        // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
        var currentTask;
        var counter = 0;
        while (readyToCheck.length) {
            currentTask = readyToCheck.pop();
            counter++;
            arrayEach(getDependents(currentTask), function (dependent) {
                if (--uncheckedDependencies[dependent] === 0) {
                    readyToCheck.push(dependent);
                }
            });
        }

        if (counter !== numTasks) {
            throw new Error(
                'async.auto cannot execute tasks due to a recursive dependency'
            );
        }
    }

    function getDependents(taskName) {
        var result = [];
        baseForOwn(tasks, function (task, key) {
            if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) {
                result.push(key);
            }
        });
        return result;
    }
};

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && baseGetTag(value) == symbolTag);
}

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined;
var symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isArray(value)) {
    // Recursively convert values (susceptible to call stack limits).
    return arrayMap(value, baseToString) + '';
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}

/**
 * The base implementation of `_.slice` without an iteratee call guard.
 *
 * @private
 * @param {Array} array The array to slice.
 * @param {number} [start=0] The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the slice of `array`.
 */
function baseSlice(array, start, end) {
  var index = -1,
      length = array.length;

  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = end > length ? length : end;
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}

/**
 * Casts `array` to a slice if it's needed.
 *
 * @private
 * @param {Array} array The array to inspect.
 * @param {number} start The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the cast slice.
 */
function castSlice(array, start, end) {
  var length = array.length;
  end = end === undefined ? length : end;
  return (!start && end >= length) ? array : baseSlice(array, start, end);
}

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the last unmatched string symbol.
 */
function charsEndIndex(strSymbols, chrSymbols) {
  var index = strSymbols.length;

  while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
 * that is not found in the character symbols.
 *
 * @private
 * @param {Array} strSymbols The string symbols to inspect.
 * @param {Array} chrSymbols The character symbols to find.
 * @returns {number} Returns the index of the first unmatched string symbol.
 */
function charsStartIndex(strSymbols, chrSymbols) {
  var index = -1,
      length = strSymbols.length;

  while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  return index;
}

/**
 * Converts an ASCII `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function asciiToArray(string) {
  return string.split('');
}

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff';
var rsComboMarksRange = '\\u0300-\\u036f';
var reComboHalfMarksRange = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange = '\\u20d0-\\u20ff';
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';

/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');

/**
 * Checks if `string` contains Unicode symbols.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
 */
function hasUnicode(string) {
  return reHasUnicode.test(string);
}

/** Used to compose unicode character classes. */
var rsAstralRange$1 = '\\ud800-\\udfff';
var rsComboMarksRange$1 = '\\u0300-\\u036f';
var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f';
var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff';
var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1;
var rsVarRange$1 = '\\ufe0e\\ufe0f';

/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange$1 + ']';
var rsCombo = '[' + rsComboRange$1 + ']';
var rsFitz = '\\ud83c[\\udffb-\\udfff]';
var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')';
var rsNonAstral = '[^' + rsAstralRange$1 + ']';
var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}';
var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]';
var rsZWJ$1 = '\\u200d';

/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?';
var rsOptVar = '[' + rsVarRange$1 + ']?';
var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*';
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';

/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');

/**
 * Converts a Unicode `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function unicodeToArray(string) {
  return string.match(reUnicode) || [];
}

/**
 * Converts `string` to an array.
 *
 * @private
 * @param {string} string The string to convert.
 * @returns {Array} Returns the converted array.
 */
function stringToArray(string) {
  return hasUnicode(string)
    ? unicodeToArray(string)
    : asciiToArray(string);
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/**
 * Removes leading and trailing whitespace or specified characters from `string`.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category String
 * @param {string} [string=''] The string to trim.
 * @param {string} [chars=whitespace] The characters to trim.
 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
 * @returns {string} Returns the trimmed string.
 * @example
 *
 * _.trim('  abc  ');
 * // => 'abc'
 *
 * _.trim('-_-abc-_-', '_-');
 * // => 'abc'
 *
 * _.map(['  foo  ', '  bar  '], _.trim);
 * // => ['foo', 'bar']
 */
function trim(string, chars, guard) {
  string = toString(string);
  if (string && (guard || chars === undefined)) {
    return string.replace(reTrim, '');
  }
  if (!string || !(chars = baseToString(chars))) {
    return string;
  }
  var strSymbols = stringToArray(string),
      chrSymbols = stringToArray(chars),
      start = charsStartIndex(strSymbols, chrSymbols),
      end = charsEndIndex(strSymbols, chrSymbols) + 1;

  return castSlice(strSymbols, start, end).join('');
}

var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;

function parseParams(func) {
    func = func.toString().replace(STRIP_COMMENTS, '');
    func = func.match(FN_ARGS)[2].replace(' ', '');
    func = func ? func.split(FN_ARG_SPLIT) : [];
    func = func.map(function (arg){
        return trim(arg.replace(FN_ARG, ''));
    });
    return func;
}

/**
 * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
 * tasks are specified as parameters to the function, after the usual callback
 * parameter, with the parameter names matching the names of the tasks it
 * depends on. This can provide even more readable task graphs which can be
 * easier to maintain.
 *
 * If a final callback is specified, the task results are similarly injected,
 * specified as named parameters after the initial error parameter.
 *
 * The autoInject function is purely syntactic sugar and its semantics are
 * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
 *
 * @name autoInject
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.auto]{@link module:ControlFlow.auto}
 * @category Control Flow
 * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
 * the form 'func([dependencies...], callback). The object's key of a property
 * serves as the name of the task defined by that property, i.e. can be used
 * when specifying requirements for other tasks.
 * * The `callback` parameter is a `callback(err, result)` which must be called
 *   when finished, passing an `error` (which can be `null`) and the result of
 *   the function's execution. The remaining parameters name other tasks on
 *   which the task is dependent, and the results from those tasks are the
 *   arguments of those parameters.
 * @param {Function} [callback] - An optional callback which is called when all
 * the tasks have been completed. It receives the `err` argument if any `tasks`
 * pass an error to their callback, and a `results` object with any completed
 * task results, similar to `auto`.
 * @example
 *
 * //  The example from `auto` can be rewritten as follows:
 * async.autoInject({
 *     get_data: function(callback) {
 *         // async code to get some data
 *         callback(null, 'data', 'converted to array');
 *     },
 *     make_folder: function(callback) {
 *         // async code to create a directory to store a file in
 *         // this is run at the same time as getting the data
 *         callback(null, 'folder');
 *     },
 *     write_file: function(get_data, make_folder, callback) {
 *         // once there is some data and the directory exists,
 *         // write the data to a file in the directory
 *         callback(null, 'filename');
 *     },
 *     email_link: function(write_file, callback) {
 *         // once the file is written let's email a link to it...
 *         // write_file contains the filename returned by write_file.
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 *
 * // If you are using a JS minifier that mangles parameter names, `autoInject`
 * // will not work with plain functions, since the parameter names will be
 * // collapsed to a single letter identifier.  To work around this, you can
 * // explicitly specify the names of the parameters your task function needs
 * // in an array, similar to Angular.js dependency injection.
 *
 * // This still has an advantage over plain `auto`, since the results a task
 * // depends on are still spread into arguments.
 * async.autoInject({
 *     //...
 *     write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
 *         callback(null, 'filename');
 *     }],
 *     email_link: ['write_file', function(write_file, callback) {
 *         callback(null, {'file':write_file, 'email':'user@example.com'});
 *     }]
 *     //...
 * }, function(err, results) {
 *     console.log('err = ', err);
 *     console.log('email_link = ', results.email_link);
 * });
 */
function autoInject(tasks, callback) {
    var newTasks = {};

    baseForOwn(tasks, function (taskFn, key) {
        var params;
        var fnIsAsync = isAsync(taskFn);
        var hasNoDeps =
            (!fnIsAsync && taskFn.length === 1) ||
            (fnIsAsync && taskFn.length === 0);

        if (isArray(taskFn)) {
            params = taskFn.slice(0, -1);
            taskFn = taskFn[taskFn.length - 1];

            newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
        } else if (hasNoDeps) {
            // no dependencies, use the function as-is
            newTasks[key] = taskFn;
        } else {
            params = parseParams(taskFn);
            if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
                throw new Error("autoInject task functions require explicit parameters.");
            }

            // remove callback param
            if (!fnIsAsync) params.pop();

            newTasks[key] = params.concat(newTask);
        }

        function newTask(results, taskCb) {
            var newArgs = arrayMap(params, function (name) {
                return results[name];
            });
            newArgs.push(taskCb);
            wrapAsync(taskFn).apply(null, newArgs);
        }
    });

    auto(newTasks, callback);
}

// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
function DLL() {
    this.head = this.tail = null;
    this.length = 0;
}

function setInitial(dll, node) {
    dll.length = 1;
    dll.head = dll.tail = node;
}

DLL.prototype.removeLink = function(node) {
    if (node.prev) node.prev.next = node.next;
    else this.head = node.next;
    if (node.next) node.next.prev = node.prev;
    else this.tail = node.prev;

    node.prev = node.next = null;
    this.length -= 1;
    return node;
};

DLL.prototype.empty = function () {
    while(this.head) this.shift();
    return this;
};

DLL.prototype.insertAfter = function(node, newNode) {
    newNode.prev = node;
    newNode.next = node.next;
    if (node.next) node.next.prev = newNode;
    else this.tail = newNode;
    node.next = newNode;
    this.length += 1;
};

DLL.prototype.insertBefore = function(node, newNode) {
    newNode.prev = node.prev;
    newNode.next = node;
    if (node.prev) node.prev.next = newNode;
    else this.head = newNode;
    node.prev = newNode;
    this.length += 1;
};

DLL.prototype.unshift = function(node) {
    if (this.head) this.insertBefore(this.head, node);
    else setInitial(this, node);
};

DLL.prototype.push = function(node) {
    if (this.tail) this.insertAfter(this.tail, node);
    else setInitial(this, node);
};

DLL.prototype.shift = function() {
    return this.head && this.removeLink(this.head);
};

DLL.prototype.pop = function() {
    return this.tail && this.removeLink(this.tail);
};

DLL.prototype.toArray = function () {
    var arr = Array(this.length);
    var curr = this.head;
    for(var idx = 0; idx < this.length; idx++) {
        arr[idx] = curr.data;
        curr = curr.next;
    }
    return arr;
};

DLL.prototype.remove = function (testFn) {
    var curr = this.head;
    while(!!curr) {
        var next = curr.next;
        if (testFn(curr)) {
            this.removeLink(curr);
        }
        curr = next;
    }
    return this;
};

function queue(worker, concurrency, payload) {
    if (concurrency == null) {
        concurrency = 1;
    }
    else if(concurrency === 0) {
        throw new Error('Concurrency must not be zero');
    }

    var _worker = wrapAsync(worker);
    var numRunning = 0;
    var workersList = [];

    var processingScheduled = false;
    function _insert(data, insertAtFront, callback) {
        if (callback != null && typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0 && q.idle()) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                callback: callback || noop
            };

            if (insertAtFront) {
                q._tasks.unshift(item);
            } else {
                q._tasks.push(item);
            }
        }

        if (!processingScheduled) {
            processingScheduled = true;
            setImmediate$1(function() {
                processingScheduled = false;
                q.process();
            });
        }
    }

    function _next(tasks) {
        return function(err){
            numRunning -= 1;

            for (var i = 0, l = tasks.length; i < l; i++) {
                var task = tasks[i];

                var index = baseIndexOf(workersList, task, 0);
                if (index === 0) {
                    workersList.shift();
                } else if (index > 0) {
                    workersList.splice(index, 1);
                }

                task.callback.apply(task, arguments);

                if (err != null) {
                    q.error(err, task.data);
                }
            }

            if (numRunning <= (q.concurrency - q.buffer) ) {
                q.unsaturated();
            }

            if (q.idle()) {
                q.drain();
            }
            q.process();
        };
    }

    var isProcessing = false;
    var q = {
        _tasks: new DLL(),
        concurrency: concurrency,
        payload: payload,
        saturated: noop,
        unsaturated:noop,
        buffer: concurrency / 4,
        empty: noop,
        drain: noop,
        error: noop,
        started: false,
        paused: false,
        push: function (data, callback) {
            _insert(data, false, callback);
        },
        kill: function () {
            q.drain = noop;
            q._tasks.empty();
        },
        unshift: function (data, callback) {
            _insert(data, true, callback);
        },
        remove: function (testFn) {
            q._tasks.remove(testFn);
        },
        process: function () {
            // Avoid trying to start too many processing operations. This can occur
            // when callbacks resolve synchronously (#1267).
            if (isProcessing) {
                return;
            }
            isProcessing = true;
            while(!q.paused && numRunning < q.concurrency && q._tasks.length){
                var tasks = [], data = [];
                var l = q._tasks.length;
                if (q.payload) l = Math.min(l, q.payload);
                for (var i = 0; i < l; i++) {
                    var node = q._tasks.shift();
                    tasks.push(node);
                    workersList.push(node);
                    data.push(node.data);
                }

                numRunning += 1;

                if (q._tasks.length === 0) {
                    q.empty();
                }

                if (numRunning === q.concurrency) {
                    q.saturated();
                }

                var cb = onlyOnce(_next(tasks));
                _worker(data, cb);
            }
            isProcessing = false;
        },
        length: function () {
            return q._tasks.length;
        },
        running: function () {
            return numRunning;
        },
        workersList: function () {
            return workersList;
        },
        idle: function() {
            return q._tasks.length + numRunning === 0;
        },
        pause: function () {
            q.paused = true;
        },
        resume: function () {
            if (q.paused === false) { return; }
            q.paused = false;
            setImmediate$1(q.process);
        }
    };
    return q;
}

/**
 * A cargo of tasks for the worker function to complete. Cargo inherits all of
 * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}.
 * @typedef {Object} CargoObject
 * @memberOf module:ControlFlow
 * @property {Function} length - A function returning the number of items
 * waiting to be processed. Invoke like `cargo.length()`.
 * @property {number} payload - An `integer` for determining how many tasks
 * should be process per round. This property can be changed after a `cargo` is
 * created to alter the payload on-the-fly.
 * @property {Function} push - Adds `task` to the `queue`. The callback is
 * called once the `worker` has finished processing the task. Instead of a
 * single task, an array of `tasks` can be submitted. The respective callback is
 * used for every task in the list. Invoke like `cargo.push(task, [callback])`.
 * @property {Function} saturated - A callback that is called when the
 * `queue.length()` hits the concurrency and further tasks will be queued.
 * @property {Function} empty - A callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - A callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke like `cargo.idle()`.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke like `cargo.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke like `cargo.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`.
 */

/**
 * Creates a `cargo` object with the specified payload. Tasks added to the
 * cargo will be processed altogether (up to the `payload` limit). If the
 * `worker` is in progress, the task is queued until it becomes available. Once
 * the `worker` has completed some tasks, each callback of those tasks is
 * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
 * for how `cargo` and `queue` work.
 *
 * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
 * at a time, cargo passes an array of tasks to a single worker, repeating
 * when the worker is finished.
 *
 * @name cargo
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An asynchronous function for processing an array
 * of queued tasks. Invoked with `(tasks, callback)`.
 * @param {number} [payload=Infinity] - An optional `integer` for determining
 * how many tasks should be processed per round; if omitted, the default is
 * unlimited.
 * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the cargo and inner queue.
 * @example
 *
 * // create a cargo object with payload 2
 * var cargo = async.cargo(function(tasks, callback) {
 *     for (var i=0; i<tasks.length; i++) {
 *         console.log('hello ' + tasks[i].name);
 *     }
 *     callback();
 * }, 2);
 *
 * // add some items
 * cargo.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * cargo.push({name: 'bar'}, function(err) {
 *     console.log('finished processing bar');
 * });
 * cargo.push({name: 'baz'}, function(err) {
 *     console.log('finished processing baz');
 * });
 */
function cargo(worker, payload) {
    return queue(worker, 1, payload);
}

/**
 * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
 *
 * @name eachOfSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.eachOf]{@link module:Collections.eachOf}
 * @alias forEachOfSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * Invoked with (item, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Invoked with (err).
 */
var eachOfSeries = doLimit(eachOfLimit, 1);

/**
 * Reduces `coll` into a single value using an async `iteratee` to return each
 * successive step. `memo` is the initial state of the reduction. This function
 * only operates in series.
 *
 * For performance reasons, it may make sense to split a call to this function
 * into a parallel map, and then use the normal `Array.prototype.reduce` on the
 * results. This function is for situations where each step in the reduction
 * needs to be async; if you can get the data before reducing it, then it's
 * probably a good idea to do so.
 *
 * @name reduce
 * @static
 * @memberOf module:Collections
 * @method
 * @alias inject
 * @alias foldl
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 * @example
 *
 * async.reduce([1,2,3], 0, function(memo, item, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         callback(null, memo + item)
 *     });
 * }, function(err, result) {
 *     // result is now equal to the last value of memo, which is 6
 * });
 */
function reduce(coll, memo, iteratee, callback) {
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    eachOfSeries(coll, function(x, i, callback) {
        _iteratee(memo, x, function(err, v) {
            memo = v;
            callback(err);
        });
    }, function(err) {
        callback(err, memo);
    });
}

/**
 * Version of the compose function that is more natural to read. Each function
 * consumes the return value of the previous function. It is the equivalent of
 * [compose]{@link module:ControlFlow.compose} with the arguments reversed.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name seq
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.compose]{@link module:ControlFlow.compose}
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} a function that composes the `functions` in order
 * @example
 *
 * // Requires lodash (or underscore), express3 and dresende's orm2.
 * // Part of an app, that fetches cats of the logged user.
 * // This example uses `seq` function to avoid overnesting and error
 * // handling clutter.
 * app.get('/cats', function(request, response) {
 *     var User = request.models.User;
 *     async.seq(
 *         _.bind(User.get, User),  // 'User.get' has signature (id, callback(err, data))
 *         function(user, fn) {
 *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))
 *         }
 *     )(req.session.user_id, function (err, cats) {
 *         if (err) {
 *             console.error(err);
 *             response.json({ status: 'error', message: err.message });
 *         } else {
 *             response.json({ status: 'ok', message: 'Cats found', data: cats });
 *         }
 *     });
 * });
 */
function seq(/*...functions*/) {
    var _functions = arrayMap(arguments, wrapAsync);
    return function(/*...args*/) {
        var args = slice(arguments);
        var that = this;

        var cb = args[args.length - 1];
        if (typeof cb == 'function') {
            args.pop();
        } else {
            cb = noop;
        }

        reduce(_functions, args, function(newargs, fn, cb) {
            fn.apply(that, newargs.concat(function(err/*, ...nextargs*/) {
                var nextargs = slice(arguments, 1);
                cb(err, nextargs);
            }));
        },
        function(err, results) {
            cb.apply(that, [err].concat(results));
        });
    };
}

/**
 * Creates a function which is a composition of the passed asynchronous
 * functions. Each function consumes the return value of the function that
 * follows. Composing functions `f()`, `g()`, and `h()` would produce the result
 * of `f(g(h()))`, only this version uses callbacks to obtain the return values.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name compose
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {...AsyncFunction} functions - the asynchronous functions to compose
 * @returns {Function} an asynchronous function that is the composed
 * asynchronous `functions`
 * @example
 *
 * function add1(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n + 1);
 *     }, 10);
 * }
 *
 * function mul3(n, callback) {
 *     setTimeout(function () {
 *         callback(null, n * 3);
 *     }, 10);
 * }
 *
 * var add1mul3 = async.compose(mul3, add1);
 * add1mul3(4, function (err, result) {
 *     // result now equals 15
 * });
 */
var compose = function(/*...args*/) {
    return seq.apply(null, slice(arguments).reverse());
};

var _concat = Array.prototype.concat;

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
 *
 * @name concatLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err /*, ...args*/) {
            if (err) return callback(err);
            return callback(null, slice(arguments, 1));
        });
    }, function(err, mapResults) {
        var result = [];
        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                result = _concat.apply(result, mapResults[i]);
            }
        }

        return callback(err, result);
    });
};

/**
 * Applies `iteratee` to each item in `coll`, concatenating the results. Returns
 * the concatenated list. The `iteratee`s are called in parallel, and the
 * results are concatenated as they return. There is no guarantee that the
 * results array will be returned in the original order of `coll` passed to the
 * `iteratee` function.
 *
 * @name concat
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
 * which should use an array as its result. Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 * @example
 *
 * async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files) {
 *     // files is now a list of filenames that exist in the 3 directories
 * });
 */
var concat = doLimit(concatLimit, Infinity);

/**
 * The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
 *
 * @name concatSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.concat]{@link module:Collections.concat}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
 * The iteratee should complete with an array an array of results.
 * Invoked with (item, callback).
 * @param {Function} [callback(err)] - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is an array
 * containing the concatenated results of the `iteratee` function. Invoked with
 * (err, results).
 */
var concatSeries = doLimit(concatLimit, 1);

/**
 * Returns a function that when called, calls-back with the values provided.
 * Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
 * [`auto`]{@link module:ControlFlow.auto}.
 *
 * @name constant
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {...*} arguments... - Any number of arguments to automatically invoke
 * callback with.
 * @returns {AsyncFunction} Returns a function that when invoked, automatically
 * invokes the callback with the previous given arguments.
 * @example
 *
 * async.waterfall([
 *     async.constant(42),
 *     function (value, next) {
 *         // value === 42
 *     },
 *     //...
 * ], callback);
 *
 * async.waterfall([
 *     async.constant(filename, "utf8"),
 *     fs.readFile,
 *     function (fileData, next) {
 *         //...
 *     }
 *     //...
 * ], callback);
 *
 * async.auto({
 *     hostname: async.constant("https://server.net/"),
 *     port: findFreePort,
 *     launchServer: ["hostname", "port", function (options, cb) {
 *         startServer(options, cb);
 *     }],
 *     //...
 * }, callback);
 */
var constant = function(/*...values*/) {
    var values = slice(arguments);
    var args = [null].concat(values);
    return function (/*...ignoredArgs, callback*/) {
        var callback = arguments[arguments.length - 1];
        return callback.apply(this, args);
    };
};

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

function _createTester(check, getResult) {
    return function(eachfn, arr, iteratee, cb) {
        cb = cb || noop;
        var testPassed = false;
        var testResult;
        eachfn(arr, function(value, _, callback) {
            iteratee(value, function(err, result) {
                if (err) {
                    callback(err);
                } else if (check(result) && !testResult) {
                    testPassed = true;
                    testResult = getResult(true, value);
                    callback(null, breakLoop);
                } else {
                    callback();
                }
            });
        }, function(err) {
            if (err) {
                cb(err);
            } else {
                cb(null, testPassed ? testResult : getResult(false));
            }
        });
    };
}

function _findGetResult(v, x) {
    return x;
}

/**
 * Returns the first value in `coll` that passes an async truth test. The
 * `iteratee` is applied in parallel, meaning the first iteratee to return
 * `true` will fire the detect `callback` with that result. That means the
 * result might not be the first item in the original `coll` (in terms of order)
 * that passes the test.

 * If order within the original `coll` is important, then look at
 * [`detectSeries`]{@link module:Collections.detectSeries}.
 *
 * @name detect
 * @static
 * @memberOf module:Collections
 * @method
 * @alias find
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 * @example
 *
 * async.detect(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // result now equals the first file in the list that exists
 * });
 */
var detect = doParallel(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name detectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findLimit
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectLimit = doParallelLimit(_createTester(identity, _findGetResult));

/**
 * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
 *
 * @name detectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.detect]{@link module:Collections.detect}
 * @alias findSeries
 * @category Collections
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
 * The iteratee must complete with a boolean value as its result.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the `iteratee` functions have finished.
 * Result will be the first item in the array that passes the truth test
 * (iteratee) or the value `undefined` if none passed. Invoked with
 * (err, result).
 */
var detectSeries = doLimit(detectLimit, 1);

function consoleFunc(name) {
    return function (fn/*, ...args*/) {
        var args = slice(arguments, 1);
        args.push(function (err/*, ...args*/) {
            var args = slice(arguments, 1);
            if (typeof console === 'object') {
                if (err) {
                    if (console.error) {
                        console.error(err);
                    }
                } else if (console[name]) {
                    arrayEach(args, function (x) {
                        console[name](x);
                    });
                }
            }
        });
        wrapAsync(fn).apply(null, args);
    };
}

/**
 * Logs the result of an [`async` function]{@link AsyncFunction} to the
 * `console` using `console.dir` to display the properties of the resulting object.
 * Only works in Node.js or in browsers that support `console.dir` and
 * `console.error` (such as FF and Chrome).
 * If multiple arguments are returned from the async function,
 * `console.dir` is called on each argument in order.
 *
 * @name dir
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, {hello: name});
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.dir(hello, 'world');
 * {hello: 'world'}
 */
var dir = consoleFunc('dir');

/**
 * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
 * the order of operations, the arguments `test` and `fn` are switched.
 *
 * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function.
 * @name doDuring
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.during]{@link module:ControlFlow.during}
 * @category Control Flow
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (...args, callback), where `...args` are the
 * non-error args from the previous callback of `fn`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error if one occurred, otherwise `null`.
 */
function doDuring(fn, test, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        args.push(check);
        _test.apply(this, args);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    check(null, true);

}

/**
 * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
 * the order of operations, the arguments `test` and `iteratee` are switched.
 *
 * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
 *
 * @name doWhilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - A function which is called each time `test`
 * passes. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped.
 * `callback` will be passed an error and any arguments passed to the final
 * `iteratee`'s callback. Invoked with (err, [results]);
 */
function doWhilst(iteratee, test, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        var args = slice(arguments, 1);
        if (test.apply(this, args)) return _iteratee(next);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
 * argument ordering differs from `until`.
 *
 * @name doUntil
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
 * @category Control Flow
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} test - synchronous truth test to perform after each
 * execution of `iteratee`. Invoked with any non-error callback results of
 * `iteratee`.
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function doUntil(iteratee, test, callback) {
    doWhilst(iteratee, function() {
        return !test.apply(this, arguments);
    }, callback);
}

/**
 * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
 * is passed a callback in the form of `function (err, truth)`. If error is
 * passed to `test` or `fn`, the main callback is immediately called with the
 * value of the error.
 *
 * @name during
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {AsyncFunction} test - asynchronous truth test to perform before each
 * execution of `fn`. Invoked with (callback).
 * @param {AsyncFunction} fn - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `fn` has stopped. `callback`
 * will be passed an error, if one occurred, otherwise `null`.
 * @example
 *
 * var count = 0;
 *
 * async.during(
 *     function (callback) {
 *         return callback(null, count < 5);
 *     },
 *     function (callback) {
 *         count++;
 *         setTimeout(callback, 1000);
 *     },
 *     function (err) {
 *         // 5 seconds have passed
 *     }
 * );
 */
function during(test, fn, callback) {
    callback = onlyOnce(callback || noop);
    var _fn = wrapAsync(fn);
    var _test = wrapAsync(test);

    function next(err) {
        if (err) return callback(err);
        _test(check);
    }

    function check(err, truth) {
        if (err) return callback(err);
        if (!truth) return callback(null);
        _fn(next);
    }

    _test(check);
}

function _withoutIndex(iteratee) {
    return function (value, index, callback) {
        return iteratee(value, callback);
    };
}

/**
 * Applies the function `iteratee` to each item in `coll`, in parallel.
 * The `iteratee` is called with an item from the list, and a callback for when
 * it has finished. If the `iteratee` passes an error to its `callback`, the
 * main `callback` (for the `each` function) is immediately called with the
 * error.
 *
 * Note, that since this function applies `iteratee` to each item in parallel,
 * there is no guarantee that the iteratee functions will complete in order.
 *
 * @name each
 * @static
 * @memberOf module:Collections
 * @method
 * @alias forEach
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to
 * each item in `coll`. Invoked with (item, callback).
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOf`.
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 * @example
 *
 * // assuming openFiles is an array of file names and saveFile is a function
 * // to save the modified contents of that file:
 *
 * async.each(openFiles, saveFile, function(err){
 *   // if any of the saves produced an error, err would equal that error
 * });
 *
 * // assuming openFiles is an array of file names
 * async.each(openFiles, function(file, callback) {
 *
 *     // Perform operation on file here.
 *     console.log('Processing file ' + file);
 *
 *     if( file.length > 32 ) {
 *       console.log('This file name is too long');
 *       callback('File name too long');
 *     } else {
 *       // Do work to process file here
 *       console.log('File processed');
 *       callback();
 *     }
 * }, function(err) {
 *     // if any of the file processing produced an error, err would equal that error
 *     if( err ) {
 *       // One of the iterations produced an error.
 *       // All processing will now stop.
 *       console.log('A file failed to process');
 *     } else {
 *       console.log('All files have been processed successfully');
 *     }
 * });
 */
function eachLimit(coll, iteratee, callback) {
    eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
 *
 * @name eachLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfLimit`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
function eachLimit$1(coll, limit, iteratee, callback) {
    _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback);
}

/**
 * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
 *
 * @name eachSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.each]{@link module:Collections.each}
 * @alias forEachSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each
 * item in `coll`.
 * The array index is not passed to the iteratee.
 * If you need the index, use `eachOfSeries`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called when all
 * `iteratee` functions have finished, or an error occurs. Invoked with (err).
 */
var eachSeries = doLimit(eachLimit$1, 1);

/**
 * Wrap an async function and ensure it calls its callback on a later tick of
 * the event loop.  If the function already calls its callback on a next tick,
 * no extra deferral is added. This is useful for preventing stack overflows
 * (`RangeError: Maximum call stack size exceeded`) and generally keeping
 * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
 * contained. ES2017 `async` functions are returned as-is -- they are immune
 * to Zalgo's corrupting influences, as they always resolve on a later tick.
 *
 * @name ensureAsync
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - an async function, one that expects a node-style
 * callback as its last argument.
 * @returns {AsyncFunction} Returns a wrapped function with the exact same call
 * signature as the function passed in.
 * @example
 *
 * function sometimesAsync(arg, callback) {
 *     if (cache[arg]) {
 *         return callback(null, cache[arg]); // this would be synchronous!!
 *     } else {
 *         doSomeIO(arg, callback); // this IO would be asynchronous
 *     }
 * }
 *
 * // this has a risk of stack overflows if many results are cached in a row
 * async.mapSeries(args, sometimesAsync, done);
 *
 * // this will defer sometimesAsync's callback if necessary,
 * // preventing stack overflows
 * async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
 */
function ensureAsync(fn) {
    if (isAsync(fn)) return fn;
    return initialParams(function (args, callback) {
        var sync = true;
        args.push(function () {
            var innerArgs = arguments;
            if (sync) {
                setImmediate$1(function () {
                    callback.apply(null, innerArgs);
                });
            } else {
                callback.apply(null, innerArgs);
            }
        });
        fn.apply(this, args);
        sync = false;
    });
}

function notId(v) {
    return !v;
}

/**
 * Returns `true` if every element in `coll` satisfies an async test. If any
 * iteratee call returns `false`, the main `callback` is immediately called.
 *
 * @name every
 * @static
 * @memberOf module:Collections
 * @method
 * @alias all
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 * @example
 *
 * async.every(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then every file exists
 * });
 */
var every = doParallel(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
 *
 * @name everyLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in parallel.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everyLimit = doParallelLimit(_createTester(notId, notId));

/**
 * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
 *
 * @name everySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.every]{@link module:Collections.every}
 * @alias allSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collection in series.
 * The iteratee must complete with a boolean result value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result will be either `true` or `false`
 * depending on the values of the async tests. Invoked with (err, result).
 */
var everySeries = doLimit(everyLimit, 1);

/**
 * The base implementation of `_.property` without support for deep paths.
 *
 * @private
 * @param {string} key The key of the property to get.
 * @returns {Function} Returns the new accessor function.
 */
function baseProperty(key) {
  return function(object) {
    return object == null ? undefined : object[key];
  };
}

function filterArray(eachfn, arr, iteratee, callback) {
    var truthValues = new Array(arr.length);
    eachfn(arr, function (x, index, callback) {
        iteratee(x, function (err, v) {
            truthValues[index] = !!v;
            callback(err);
        });
    }, function (err) {
        if (err) return callback(err);
        var results = [];
        for (var i = 0; i < arr.length; i++) {
            if (truthValues[i]) results.push(arr[i]);
        }
        callback(null, results);
    });
}

function filterGeneric(eachfn, coll, iteratee, callback) {
    var results = [];
    eachfn(coll, function (x, index, callback) {
        iteratee(x, function (err, v) {
            if (err) {
                callback(err);
            } else {
                if (v) {
                    results.push({index: index, value: x});
                }
                callback();
            }
        });
    }, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null, arrayMap(results.sort(function (a, b) {
                return a.index - b.index;
            }), baseProperty('value')));
        }
    });
}

function _filter(eachfn, coll, iteratee, callback) {
    var filter = isArrayLike(coll) ? filterArray : filterGeneric;
    filter(eachfn, coll, wrapAsync(iteratee), callback || noop);
}

/**
 * Returns a new array of all the values in `coll` which pass an async truth
 * test. This operation is performed in parallel, but the results array will be
 * in the same order as the original.
 *
 * @name filter
 * @static
 * @memberOf module:Collections
 * @method
 * @alias select
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.filter(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of the existing files
 * });
 */
var filter = doParallel(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name filterLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var filterLimit = doParallelLimit(_filter);

/**
 * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
 *
 * @name filterSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @alias selectSeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - A truth test to apply to each item in `coll`.
 * The `iteratee` is passed a `callback(err, truthValue)`, which must be called
 * with a boolean argument once it has completed. Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results)
 */
var filterSeries = doLimit(filterLimit, 1);

/**
 * Calls the asynchronous function `fn` with a callback parameter that allows it
 * to call itself again, in series, indefinitely.

 * If an error is passed to the callback then `errback` is called with the
 * error, and execution stops, otherwise it will never be called.
 *
 * @name forever
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} fn - an async function to call repeatedly.
 * Invoked with (next).
 * @param {Function} [errback] - when `fn` passes an error to it's callback,
 * this function will be called, and execution stops. Invoked with (err).
 * @example
 *
 * async.forever(
 *     function(next) {
 *         // next is suitable for passing to things that need a callback(err [, whatever]);
 *         // it will result in this function being called again.
 *     },
 *     function(err) {
 *         // if next is called with a value in its first parameter, it will appear
 *         // in here as 'err', and execution will stop.
 *     }
 * );
 */
function forever(fn, errback) {
    var done = onlyOnce(errback || noop);
    var task = wrapAsync(ensureAsync(fn));

    function next(err) {
        if (err) return done(err);
        task(next);
    }
    next();
}

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
 *
 * @name groupByLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupByLimit = function(coll, limit, iteratee, callback) {
    callback = callback || noop;
    var _iteratee = wrapAsync(iteratee);
    mapLimit(coll, limit, function(val, callback) {
        _iteratee(val, function(err, key) {
            if (err) return callback(err);
            return callback(null, {key: key, val: val});
        });
    }, function(err, mapResults) {
        var result = {};
        // from MDN, handle object having an `hasOwnProperty` prop
        var hasOwnProperty = Object.prototype.hasOwnProperty;

        for (var i = 0; i < mapResults.length; i++) {
            if (mapResults[i]) {
                var key = mapResults[i].key;
                var val = mapResults[i].val;

                if (hasOwnProperty.call(result, key)) {
                    result[key].push(val);
                } else {
                    result[key] = [val];
                }
            }
        }

        return callback(err, result);
    });
};

/**
 * Returns a new object, where each value corresponds to an array of items, from
 * `coll`, that returned the corresponding key. That is, the keys of the object
 * correspond to the values passed to the `iteratee` callback.
 *
 * Note: Since this function applies the `iteratee` to each item in parallel,
 * there is no guarantee that the `iteratee` functions will complete in order.
 * However, the values for each key in the `result` will be in the same order as
 * the original `coll`. For Objects, the values will roughly be in the order of
 * the original Objects' keys (but this can vary across JavaScript engines).
 *
 * @name groupBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 * @example
 *
 * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) {
 *     db.findById(userId, function(err, user) {
 *         if (err) return callback(err);
 *         return callback(null, user.age);
 *     });
 * }, function(err, result) {
 *     // result is object containing the userIds grouped by age
 *     // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']};
 * });
 */
var groupBy = doLimit(groupByLimit, Infinity);

/**
 * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
 *
 * @name groupBySeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.groupBy]{@link module:Collections.groupBy}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a `key` to group the value under.
 * Invoked with (value, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. Result is an `Object` whoses
 * properties are arrays of values which returned the corresponding key.
 */
var groupBySeries = doLimit(groupByLimit, 1);

/**
 * Logs the result of an `async` function to the `console`. Only works in
 * Node.js or in browsers that support `console.log` and `console.error` (such
 * as FF and Chrome). If multiple arguments are returned from the async
 * function, `console.log` is called on each argument in order.
 *
 * @name log
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} function - The function you want to eventually apply
 * all arguments to.
 * @param {...*} arguments... - Any number of arguments to apply to the function.
 * @example
 *
 * // in a module
 * var hello = function(name, callback) {
 *     setTimeout(function() {
 *         callback(null, 'hello ' + name);
 *     }, 1000);
 * };
 *
 * // in the node repl
 * node> async.log(hello, 'world');
 * 'hello world'
 */
var log = consoleFunc('log');

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name mapValuesLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
function mapValuesLimit(obj, limit, iteratee, callback) {
    callback = once(callback || noop);
    var newObj = {};
    var _iteratee = wrapAsync(iteratee);
    eachOfLimit(obj, limit, function(val, key, next) {
        _iteratee(val, key, function (err, result) {
            if (err) return next(err);
            newObj[key] = result;
            next();
        });
    }, function (err) {
        callback(err, newObj);
    });
}

/**
 * A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
 *
 * Produces a new Object by mapping each value of `obj` through the `iteratee`
 * function. The `iteratee` is called each `value` and `key` from `obj` and a
 * callback for when it has finished processing. Each of these callbacks takes
 * two arguments: an `error`, and the transformed item from `obj`. If `iteratee`
 * passes an error to its callback, the main `callback` (for the `mapValues`
 * function) is immediately called with the error.
 *
 * Note, the order of the keys in the result is not guaranteed.  The keys will
 * be roughly in the order they complete, (but this is very engine-specific)
 *
 * @name mapValues
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 * @example
 *
 * async.mapValues({
 *     f1: 'file1',
 *     f2: 'file2',
 *     f3: 'file3'
 * }, function (file, key, callback) {
 *   fs.stat(file, callback);
 * }, function(err, result) {
 *     // result is now a map of stats for each file, e.g.
 *     // {
 *     //     f1: [stats for file1],
 *     //     f2: [stats for file2],
 *     //     f3: [stats for file3]
 *     // }
 * });
 */

var mapValues = doLimit(mapValuesLimit, Infinity);

/**
 * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
 *
 * @name mapValuesSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.mapValues]{@link module:Collections.mapValues}
 * @category Collection
 * @param {Object} obj - A collection to iterate over.
 * @param {AsyncFunction} iteratee - A function to apply to each value and key
 * in `coll`.
 * The iteratee should complete with the transformed value as its result.
 * Invoked with (value, key, callback).
 * @param {Function} [callback] - A callback which is called when all `iteratee`
 * functions have finished, or an error occurs. `result` is a new object consisting
 * of each key from `obj`, with each transformed value on the right-hand side.
 * Invoked with (err, result).
 */
var mapValuesSeries = doLimit(mapValuesLimit, 1);

function has(obj, key) {
    return key in obj;
}

/**
 * Caches the results of an async function. When creating a hash to store
 * function results against, the callback is omitted from the hash and an
 * optional hash function can be used.
 *
 * If no hash function is specified, the first argument is used as a hash key,
 * which may work reasonably if it is a string or a data type that converts to a
 * distinct string. Note that objects and arrays will not behave reasonably.
 * Neither will cases where the other arguments are significant. In such cases,
 * specify your own hash function.
 *
 * The cache of results is exposed as the `memo` property of the function
 * returned by `memoize`.
 *
 * @name memoize
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function to proxy and cache results from.
 * @param {Function} hasher - An optional function for generating a custom hash
 * for storing results. It has all the arguments applied to it apart from the
 * callback, and must be synchronous.
 * @returns {AsyncFunction} a memoized version of `fn`
 * @example
 *
 * var slow_fn = function(name, callback) {
 *     // do something
 *     callback(null, result);
 * };
 * var fn = async.memoize(slow_fn);
 *
 * // fn can now be used as if it were slow_fn
 * fn('some name', function() {
 *     // callback
 * });
 */
function memoize(fn, hasher) {
    var memo = Object.create(null);
    var queues = Object.create(null);
    hasher = hasher || identity;
    var _fn = wrapAsync(fn);
    var memoized = initialParams(function memoized(args, callback) {
        var key = hasher.apply(null, args);
        if (has(memo, key)) {
            setImmediate$1(function() {
                callback.apply(null, memo[key]);
            });
        } else if (has(queues, key)) {
            queues[key].push(callback);
        } else {
            queues[key] = [callback];
            _fn.apply(null, args.concat(function(/*args*/) {
                var args = slice(arguments);
                memo[key] = args;
                var q = queues[key];
                delete queues[key];
                for (var i = 0, l = q.length; i < l; i++) {
                    q[i].apply(null, args);
                }
            }));
        }
    });
    memoized.memo = memo;
    memoized.unmemoized = fn;
    return memoized;
}

/**
 * Calls `callback` on a later loop around the event loop. In Node.js this just
 * calls `process.nextTick`.  In the browser it will use `setImmediate` if
 * available, otherwise `setTimeout(callback, 0)`, which means other higher
 * priority events may precede the execution of `callback`.
 *
 * This is used internally for browser-compatibility purposes.
 *
 * @name nextTick
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.setImmediate]{@link module:Utils.setImmediate}
 * @category Util
 * @param {Function} callback - The function to call on a later loop around
 * the event loop. Invoked with (args...).
 * @param {...*} args... - any number of additional arguments to pass to the
 * callback on the next tick.
 * @example
 *
 * var call_order = [];
 * async.nextTick(function() {
 *     call_order.push('two');
 *     // call_order now equals ['one','two']
 * });
 * call_order.push('one');
 *
 * async.setImmediate(function (a, b, c) {
 *     // a, b, and c equal 1, 2, and 3
 * }, 1, 2, 3);
 */
var _defer$1;

if (hasNextTick) {
    _defer$1 = process.nextTick;
} else if (hasSetImmediate) {
    _defer$1 = setImmediate;
} else {
    _defer$1 = fallback;
}

var nextTick = wrap(_defer$1);

function _parallel(eachfn, tasks, callback) {
    callback = callback || noop;
    var results = isArrayLike(tasks) ? [] : {};

    eachfn(tasks, function (task, key, callback) {
        wrapAsync(task)(function (err, result) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            }
            results[key] = result;
            callback(err);
        });
    }, function (err) {
        callback(err, results);
    });
}

/**
 * Run the `tasks` collection of functions in parallel, without waiting until
 * the previous function has completed. If any of the functions pass an error to
 * its callback, the main `callback` is immediately called with the value of the
 * error. Once the `tasks` have completed, the results are passed to the final
 * `callback` as an array.
 *
 * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about
 * parallel execution of code.  If your tasks do not use any timers or perform
 * any I/O, they will actually be executed in series.  Any synchronous setup
 * sections for each task will happen one after the other.  JavaScript remains
 * single-threaded.
 *
 * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the
 * execution of other tasks when a task fails.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 * results from {@link async.parallel}.
 *
 * @name parallel
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 *
 * @example
 * async.parallel([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // the results array will equal ['one','two'] even though
 *     // the second function had a shorter timeout.
 * });
 *
 * // an example using an object instead of an array
 * async.parallel({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equals to: {one: 1, two: 2}
 * });
 */
function parallelLimit(tasks, callback) {
    _parallel(eachOf, tasks, callback);
}

/**
 * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name parallelLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.parallel]{@link module:ControlFlow.parallel}
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection of
 * [async functions]{@link AsyncFunction} to run.
 * Each async function can complete with any number of optional `result` values.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed successfully. This function gets a results array
 * (or object) containing all the result arguments passed to the task callbacks.
 * Invoked with (err, results).
 */
function parallelLimit$1(tasks, limit, callback) {
    _parallel(_eachOfLimit(limit), tasks, callback);
}

/**
 * A queue of tasks for the worker function to complete.
 * @typedef {Object} QueueObject
 * @memberOf module:ControlFlow
 * @property {Function} length - a function returning the number of items
 * waiting to be processed. Invoke with `queue.length()`.
 * @property {boolean} started - a boolean indicating whether or not any
 * items have been pushed and processed by the queue.
 * @property {Function} running - a function returning the number of items
 * currently being processed. Invoke with `queue.running()`.
 * @property {Function} workersList - a function returning the array of items
 * currently being processed. Invoke with `queue.workersList()`.
 * @property {Function} idle - a function returning false if there are items
 * waiting or being processed, or true if not. Invoke with `queue.idle()`.
 * @property {number} concurrency - an integer for determining how many `worker`
 * functions should be run in parallel. This property can be changed after a
 * `queue` is created to alter the concurrency on-the-fly.
 * @property {Function} push - add a new task to the `queue`. Calls `callback`
 * once the `worker` has finished processing the task. Instead of a single task,
 * a `tasks` array can be submitted. The respective callback is used for every
 * task in the list. Invoke with `queue.push(task, [callback])`,
 * @property {Function} unshift - add a new task to the front of the `queue`.
 * Invoke with `queue.unshift(task, [callback])`.
 * @property {Function} remove - remove items from the queue that match a test
 * function.  The test function will be passed an object with a `data` property,
 * and a `priority` property, if this is a
 * [priorityQueue]{@link module:ControlFlow.priorityQueue} object.
 * Invoked with `queue.remove(testFn)`, where `testFn` is of the form
 * `function ({data, priority}) {}` and returns a Boolean.
 * @property {Function} saturated - a callback that is called when the number of
 * running workers hits the `concurrency` limit, and further tasks will be
 * queued.
 * @property {Function} unsaturated - a callback that is called when the number
 * of running workers is less than the `concurrency` & `buffer` limits, and
 * further tasks will not be queued.
 * @property {number} buffer - A minimum threshold buffer in order to say that
 * the `queue` is `unsaturated`.
 * @property {Function} empty - a callback that is called when the last item
 * from the `queue` is given to a `worker`.
 * @property {Function} drain - a callback that is called when the last item
 * from the `queue` has returned from the `worker`.
 * @property {Function} error - a callback that is called when a task errors.
 * Has the signature `function(error, task)`.
 * @property {boolean} paused - a boolean for determining whether the queue is
 * in a paused state.
 * @property {Function} pause - a function that pauses the processing of tasks
 * until `resume()` is called. Invoke with `queue.pause()`.
 * @property {Function} resume - a function that resumes the processing of
 * queued tasks when the queue is paused. Invoke with `queue.resume()`.
 * @property {Function} kill - a function that removes the `drain` callback and
 * empties remaining tasks from the queue forcing it to go idle. No more tasks
 * should be pushed to the queue after calling this function. Invoke with `queue.kill()`.
 */

/**
 * Creates a `queue` object with the specified `concurrency`. Tasks added to the
 * `queue` are processed in parallel (up to the `concurrency` limit). If all
 * `worker`s are in progress, the task is queued until one becomes available.
 * Once a `worker` completes a `task`, that `task`'s callback is called.
 *
 * @name queue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`. Invoked with (task, callback).
 * @param {number} [concurrency=1] - An `integer` for determining how many
 * `worker` functions should be run in parallel.  If omitted, the concurrency
 * defaults to `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can
 * attached as certain properties to listen for specific events during the
 * lifecycle of the queue.
 * @example
 *
 * // create a queue object with concurrency 2
 * var q = async.queue(function(task, callback) {
 *     console.log('hello ' + task.name);
 *     callback();
 * }, 2);
 *
 * // assign a callback
 * q.drain = function() {
 *     console.log('all items have been processed');
 * };
 *
 * // add some items to the queue
 * q.push({name: 'foo'}, function(err) {
 *     console.log('finished processing foo');
 * });
 * q.push({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 *
 * // add some items to the queue (batch-wise)
 * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) {
 *     console.log('finished processing item');
 * });
 *
 * // add some items to the front of the queue
 * q.unshift({name: 'bar'}, function (err) {
 *     console.log('finished processing bar');
 * });
 */
var queue$1 = function (worker, concurrency) {
    var _worker = wrapAsync(worker);
    return queue(function (items, cb) {
        _worker(items[0], cb);
    }, concurrency, 1);
};

/**
 * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
 * completed in ascending priority order.
 *
 * @name priorityQueue
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.queue]{@link module:ControlFlow.queue}
 * @category Control Flow
 * @param {AsyncFunction} worker - An async function for processing a queued task.
 * If you want to handle errors from an individual task, pass a callback to
 * `q.push()`.
 * Invoked with (task, callback).
 * @param {number} concurrency - An `integer` for determining how many `worker`
 * functions should be run in parallel.  If omitted, the concurrency defaults to
 * `1`.  If the concurrency is `0`, an error is thrown.
 * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
 * differences between `queue` and `priorityQueue` objects:
 * * `push(task, priority, [callback])` - `priority` should be a number. If an
 *   array of `tasks` is given, all tasks will be assigned the same priority.
 * * The `unshift` method was removed.
 */
var priorityQueue = function(worker, concurrency) {
    // Start with a normal queue
    var q = queue$1(worker, concurrency);

    // Override push to accept second parameter representing priority
    q.push = function(data, priority, callback) {
        if (callback == null) callback = noop;
        if (typeof callback !== 'function') {
            throw new Error('task callback must be a function');
        }
        q.started = true;
        if (!isArray(data)) {
            data = [data];
        }
        if (data.length === 0) {
            // call drain immediately if there are no tasks
            return setImmediate$1(function() {
                q.drain();
            });
        }

        priority = priority || 0;
        var nextNode = q._tasks.head;
        while (nextNode && priority >= nextNode.priority) {
            nextNode = nextNode.next;
        }

        for (var i = 0, l = data.length; i < l; i++) {
            var item = {
                data: data[i],
                priority: priority,
                callback: callback
            };

            if (nextNode) {
                q._tasks.insertBefore(nextNode, item);
            } else {
                q._tasks.push(item);
            }
        }
        setImmediate$1(q.process);
    };

    // Remove unshift function
    delete q.unshift;

    return q;
};

/**
 * Runs the `tasks` array of functions in parallel, without waiting until the
 * previous function has completed. Once any of the `tasks` complete or pass an
 * error to its callback, the main `callback` is immediately called. It's
 * equivalent to `Promise.race()`.
 *
 * @name race
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction}
 * to run. Each function can complete with an optional `result` value.
 * @param {Function} callback - A callback to run once any of the functions have
 * completed. This function gets an error or result from the first function that
 * completed. Invoked with (err, result).
 * @returns undefined
 * @example
 *
 * async.race([
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ],
 * // main callback
 * function(err, result) {
 *     // the result will be equal to 'two' as it finishes earlier
 * });
 */
function race(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions'));
    if (!tasks.length) return callback();
    for (var i = 0, l = tasks.length; i < l; i++) {
        wrapAsync(tasks[i])(callback);
    }
}

/**
 * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
 *
 * @name reduceRight
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reduce]{@link module:Collections.reduce}
 * @alias foldr
 * @category Collection
 * @param {Array} array - A collection to iterate over.
 * @param {*} memo - The initial state of the reduction.
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * array to produce the next step in the reduction.
 * The `iteratee` should complete with the next state of the reduction.
 * If the iteratee complete with an error, the reduction is stopped and the
 * main `callback` is immediately called with the error.
 * Invoked with (memo, item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the reduced value. Invoked with
 * (err, result).
 */
function reduceRight (array, memo, iteratee, callback) {
    var reversed = slice(array).reverse();
    reduce(reversed, memo, iteratee, callback);
}

/**
 * Wraps the async function in another function that always completes with a
 * result object, even when it errors.
 *
 * The result object has either the property `error` or `value`.
 *
 * @name reflect
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} fn - The async function you want to wrap
 * @returns {Function} - A function that always passes null to it's callback as
 * the error. The second argument to the callback will be an `object` with
 * either an `error` or a `value` property.
 * @example
 *
 * async.parallel([
 *     async.reflect(function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff but error ...
 *         callback('bad stuff happened');
 *     }),
 *     async.reflect(function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     })
 * ],
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = 'bad stuff happened'
 *     // results[2].value = 'two'
 * });
 */
function reflect(fn) {
    var _fn = wrapAsync(fn);
    return initialParams(function reflectOn(args, reflectCallback) {
        args.push(function callback(error, cbArg) {
            if (error) {
                reflectCallback(null, { error: error });
            } else {
                var value;
                if (arguments.length <= 2) {
                    value = cbArg;
                } else {
                    value = slice(arguments, 1);
                }
                reflectCallback(null, { value: value });
            }
        });

        return _fn.apply(this, args);
    });
}

/**
 * A helper function that wraps an array or an object of functions with `reflect`.
 *
 * @name reflectAll
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.reflect]{@link module:Utils.reflect}
 * @category Util
 * @param {Array|Object|Iterable} tasks - The collection of
 * [async functions]{@link AsyncFunction} to wrap in `async.reflect`.
 * @returns {Array} Returns an array of async functions, each wrapped in
 * `async.reflect`
 * @example
 *
 * let tasks = [
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     function(callback) {
 *         // do some more stuff but error ...
 *         callback(new Error('bad stuff happened'));
 *     },
 *     function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'two');
 *         }, 100);
 *     }
 * ];
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results[0].value = 'one'
 *     // results[1].error = Error('bad stuff happened')
 *     // results[2].value = 'two'
 * });
 *
 * // an example using an object instead of an array
 * let tasks = {
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'one');
 *         }, 200);
 *     },
 *     two: function(callback) {
 *         callback('two');
 *     },
 *     three: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 'three');
 *         }, 100);
 *     }
 * };
 *
 * async.parallel(async.reflectAll(tasks),
 * // optional callback
 * function(err, results) {
 *     // values
 *     // results.one.value = 'one'
 *     // results.two.error = 'two'
 *     // results.three.value = 'three'
 * });
 */
function reflectAll(tasks) {
    var results;
    if (isArray(tasks)) {
        results = arrayMap(tasks, reflect);
    } else {
        results = {};
        baseForOwn(tasks, function(task, key) {
            results[key] = reflect.call(this, task);
        });
    }
    return results;
}

function reject$1(eachfn, arr, iteratee, callback) {
    _filter(eachfn, arr, function(value, cb) {
        iteratee(value, function(err, v) {
            cb(err, !v);
        });
    }, callback);
}

/**
 * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
 *
 * @name reject
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.filter]{@link module:Collections.filter}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 * @example
 *
 * async.reject(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, results) {
 *     // results now equals an array of missing files
 *     createFiles(results);
 * });
 */
var reject = doParallel(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name rejectLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectLimit = doParallelLimit(reject$1);

/**
 * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
 *
 * @name rejectSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.reject]{@link module:Collections.reject}
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {Function} iteratee - An async truth test to apply to each item in
 * `coll`.
 * The should complete with a boolean value as its `result`.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Invoked with (err, results).
 */
var rejectSeries = doLimit(rejectLimit, 1);

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant$1(value) {
  return function() {
    return value;
  };
}

/**
 * Attempts to get a successful response from `task` no more than `times` times
 * before returning an error. If the task is successful, the `callback` will be
 * passed the result of the successful task. If all attempts fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name retry
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @see [async.retryable]{@link module:ControlFlow.retryable}
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an
 * object with `times` and `interval` or a number.
 * * `times` - The number of attempts to make before giving up.  The default
 *   is `5`.
 * * `interval` - The time to wait between retries, in milliseconds.  The
 *   default is `0`. The interval may also be specified as a function of the
 *   retry count (see example).
 * * `errorFilter` - An optional synchronous function that is invoked on
 *   erroneous result. If it returns `true` the retry attempts will continue;
 *   if the function returns `false` the retry flow is aborted with the current
 *   attempt's error and result being returned to the final callback.
 *   Invoked with (err).
 * * If `opts` is a number, the number specifies the number of times to retry,
 *   with the default interval of `0`.
 * @param {AsyncFunction} task - An async function to retry.
 * Invoked with (callback).
 * @param {Function} [callback] - An optional callback which is called when the
 * task has succeeded, or after the final failed attempt. It receives the `err`
 * and `result` arguments of the last attempt at completing the `task`. Invoked
 * with (err, results).
 *
 * @example
 *
 * // The `retry` function can be used as a stand-alone control flow by passing
 * // a callback, as shown below:
 *
 * // try calling apiMethod 3 times
 * async.retry(3, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 3 times, waiting 200 ms between each retry
 * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod 10 times with exponential backoff
 * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds)
 * async.retry({
 *   times: 10,
 *   interval: function(retryCount) {
 *     return 50 * Math.pow(2, retryCount);
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod the default 5 times no delay between each retry
 * async.retry(apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // try calling apiMethod only when error condition satisfies, all other
 * // errors will abort the retry control flow and return to final callback
 * async.retry({
 *   errorFilter: function(err) {
 *     return err.message === 'Temporary error'; // only retry on a specific error
 *   }
 * }, apiMethod, function(err, result) {
 *     // do something with the result
 * });
 *
 * // to retry individual methods that are not as reliable within other
 * // control flow functions, use the `retryable` wrapper:
 * async.auto({
 *     users: api.getUsers.bind(api),
 *     payments: async.retryable(3, api.getPayments.bind(api))
 * }, function(err, results) {
 *     // do something with the results
 * });
 *
 */
function retry(opts, task, callback) {
    var DEFAULT_TIMES = 5;
    var DEFAULT_INTERVAL = 0;

    var options = {
        times: DEFAULT_TIMES,
        intervalFunc: constant$1(DEFAULT_INTERVAL)
    };

    function parseTimes(acc, t) {
        if (typeof t === 'object') {
            acc.times = +t.times || DEFAULT_TIMES;

            acc.intervalFunc = typeof t.interval === 'function' ?
                t.interval :
                constant$1(+t.interval || DEFAULT_INTERVAL);

            acc.errorFilter = t.errorFilter;
        } else if (typeof t === 'number' || typeof t === 'string') {
            acc.times = +t || DEFAULT_TIMES;
        } else {
            throw new Error("Invalid arguments for async.retry");
        }
    }

    if (arguments.length < 3 && typeof opts === 'function') {
        callback = task || noop;
        task = opts;
    } else {
        parseTimes(options, opts);
        callback = callback || noop;
    }

    if (typeof task !== 'function') {
        throw new Error("Invalid arguments for async.retry");
    }

    var _task = wrapAsync(task);

    var attempt = 1;
    function retryAttempt() {
        _task(function(err) {
            if (err && attempt++ < options.times &&
                (typeof options.errorFilter != 'function' ||
                    options.errorFilter(err))) {
                setTimeout(retryAttempt, options.intervalFunc(attempt));
            } else {
                callback.apply(null, arguments);
            }
        });
    }

    retryAttempt();
}

/**
 * A close relative of [`retry`]{@link module:ControlFlow.retry}.  This method
 * wraps a task and makes it retryable, rather than immediately calling it
 * with retries.
 *
 * @name retryable
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.retry]{@link module:ControlFlow.retry}
 * @category Control Flow
 * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
 * options, exactly the same as from `retry`
 * @param {AsyncFunction} task - the asynchronous function to wrap.
 * This function will be passed any arguments passed to the returned wrapper.
 * Invoked with (...args, callback).
 * @returns {AsyncFunction} The wrapped function, which when invoked, will
 * retry on an error, based on the parameters specified in `opts`.
 * This function will accept the same parameters as `task`.
 * @example
 *
 * async.auto({
 *     dep1: async.retryable(3, getFromFlakyService),
 *     process: ["dep1", async.retryable(3, function (results, cb) {
 *         maybeProcessData(results.dep1, cb);
 *     })]
 * }, callback);
 */
var retryable = function (opts, task) {
    if (!task) {
        task = opts;
        opts = null;
    }
    var _task = wrapAsync(task);
    return initialParams(function (args, callback) {
        function taskFn(cb) {
            _task.apply(null, args.concat(cb));
        }

        if (opts) retry(opts, taskFn, callback);
        else retry(taskFn, callback);

    });
};

/**
 * Run the functions in the `tasks` collection in series, each one running once
 * the previous function has completed. If any functions in the series pass an
 * error to its callback, no more functions are run, and `callback` is
 * immediately called with the value of the error. Otherwise, `callback`
 * receives an array of results when `tasks` have completed.
 *
 * It is also possible to use an object instead of an array. Each property will
 * be run as a function, and the results will be passed to the final `callback`
 * as an object instead of an array. This can be a more readable way of handling
 *  results from {@link async.series}.
 *
 * **Note** that while many implementations preserve the order of object
 * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)
 * explicitly states that
 *
 * > The mechanics and order of enumerating the properties is not specified.
 *
 * So if you rely on the order in which your series of functions are executed,
 * and want this to work on all platforms, consider using an array.
 *
 * @name series
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing
 * [async functions]{@link AsyncFunction} to run in series.
 * Each function can complete with any number of optional `result` values.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This function gets a results array (or object)
 * containing all the result arguments passed to the `task` callbacks. Invoked
 * with (err, result).
 * @example
 * async.series([
 *     function(callback) {
 *         // do some stuff ...
 *         callback(null, 'one');
 *     },
 *     function(callback) {
 *         // do some more stuff ...
 *         callback(null, 'two');
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     // results is now equal to ['one', 'two']
 * });
 *
 * async.series({
 *     one: function(callback) {
 *         setTimeout(function() {
 *             callback(null, 1);
 *         }, 200);
 *     },
 *     two: function(callback){
 *         setTimeout(function() {
 *             callback(null, 2);
 *         }, 100);
 *     }
 * }, function(err, results) {
 *     // results is now equal to: {one: 1, two: 2}
 * });
 */
function series(tasks, callback) {
    _parallel(eachOfSeries, tasks, callback);
}

/**
 * Returns `true` if at least one element in the `coll` satisfies an async test.
 * If any iteratee call returns `true`, the main `callback` is immediately
 * called.
 *
 * @name some
 * @static
 * @memberOf module:Collections
 * @method
 * @alias any
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 * @example
 *
 * async.some(['file1','file2','file3'], function(filePath, callback) {
 *     fs.access(filePath, function(err) {
 *         callback(null, !err)
 *     });
 * }, function(err, result) {
 *     // if result is true then at least one of the files exists
 * });
 */
var some = doParallel(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
 *
 * @name someLimit
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anyLimit
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in parallel.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someLimit = doParallelLimit(_createTester(Boolean, identity));

/**
 * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
 *
 * @name someSeries
 * @static
 * @memberOf module:Collections
 * @method
 * @see [async.some]{@link module:Collections.some}
 * @alias anySeries
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async truth test to apply to each item
 * in the collections in series.
 * The iteratee should complete with a boolean `result` value.
 * Invoked with (item, callback).
 * @param {Function} [callback] - A callback which is called as soon as any
 * iteratee returns `true`, or after all the iteratee functions have finished.
 * Result will be either `true` or `false` depending on the values of the async
 * tests. Invoked with (err, result).
 */
var someSeries = doLimit(someLimit, 1);

/**
 * Sorts a list by the results of running each `coll` value through an async
 * `iteratee`.
 *
 * @name sortBy
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {AsyncFunction} iteratee - An async function to apply to each item in
 * `coll`.
 * The iteratee should complete with a value to use as the sort criteria as
 * its `result`.
 * Invoked with (item, callback).
 * @param {Function} callback - A callback which is called after all the
 * `iteratee` functions have finished, or an error occurs. Results is the items
 * from the original `coll` sorted by the values returned by the `iteratee`
 * calls. Invoked with (err, results).
 * @example
 *
 * async.sortBy(['file1','file2','file3'], function(file, callback) {
 *     fs.stat(file, function(err, stats) {
 *         callback(err, stats.mtime);
 *     });
 * }, function(err, results) {
 *     // results is now the original array of files sorted by
 *     // modified date
 * });
 *
 * // By modifying the callback parameter the
 * // sorting order can be influenced:
 *
 * // ascending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x);
 * }, function(err,result) {
 *     // result callback
 * });
 *
 * // descending order
 * async.sortBy([1,9,3,5], function(x, callback) {
 *     callback(null, x*-1);    //<- x*-1 instead of x, turns the order around
 * }, function(err,result) {
 *     // result callback
 * });
 */
function sortBy (coll, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    map(coll, function (x, callback) {
        _iteratee(x, function (err, criteria) {
            if (err) return callback(err);
            callback(null, {value: x, criteria: criteria});
        });
    }, function (err, results) {
        if (err) return callback(err);
        callback(null, arrayMap(results.sort(comparator), baseProperty('value')));
    });

    function comparator(left, right) {
        var a = left.criteria, b = right.criteria;
        return a < b ? -1 : a > b ? 1 : 0;
    }
}

/**
 * Sets a time limit on an asynchronous function. If the function does not call
 * its callback within the specified milliseconds, it will be called with a
 * timeout error. The code property for the error object will be `'ETIMEDOUT'`.
 *
 * @name timeout
 * @static
 * @memberOf module:Utils
 * @method
 * @category Util
 * @param {AsyncFunction} asyncFn - The async function to limit in time.
 * @param {number} milliseconds - The specified time limit.
 * @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
 * to timeout Error for more information..
 * @returns {AsyncFunction} Returns a wrapped function that can be used with any
 * of the control flow functions.
 * Invoke this function with the same parameters as you would `asyncFunc`.
 * @example
 *
 * function myFunction(foo, callback) {
 *     doAsyncTask(foo, function(err, data) {
 *         // handle errors
 *         if (err) return callback(err);
 *
 *         // do some stuff ...
 *
 *         // return processed data
 *         return callback(null, data);
 *     });
 * }
 *
 * var wrapped = async.timeout(myFunction, 1000);
 *
 * // call `wrapped` as you would `myFunction`
 * wrapped({ bar: 'bar' }, function(err, data) {
 *     // if `myFunction` takes < 1000 ms to execute, `err`
 *     // and `data` will have their expected values
 *
 *     // else `err` will be an Error with the code 'ETIMEDOUT'
 * });
 */
function timeout(asyncFn, milliseconds, info) {
    var fn = wrapAsync(asyncFn);

    return initialParams(function (args, callback) {
        var timedOut = false;
        var timer;

        function timeoutCallback() {
            var name = asyncFn.name || 'anonymous';
            var error  = new Error('Callback function "' + name + '" timed out.');
            error.code = 'ETIMEDOUT';
            if (info) {
                error.info = info;
            }
            timedOut = true;
            callback(error);
        }

        args.push(function () {
            if (!timedOut) {
                callback.apply(null, arguments);
                clearTimeout(timer);
            }
        });

        // setup timer and call original function
        timer = setTimeout(timeoutCallback, milliseconds);
        fn.apply(null, args);
    });
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
var nativeMax = Math.max;

/**
 * The base implementation of `_.range` and `_.rangeRight` which doesn't
 * coerce arguments.
 *
 * @private
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @param {number} step The value to increment or decrement by.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Array} Returns the range of numbers.
 */
function baseRange(start, end, step, fromRight) {
  var index = -1,
      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
      result = Array(length);

  while (length--) {
    result[fromRight ? length : ++index] = start;
    start += step;
  }
  return result;
}

/**
 * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
 * time.
 *
 * @name timesLimit
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} count - The number of times to run the function.
 * @param {number} limit - The maximum number of async operations at a time.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see [async.map]{@link module:Collections.map}.
 */
function timeLimit(count, limit, iteratee, callback) {
    var _iteratee = wrapAsync(iteratee);
    mapLimit(baseRange(0, count, 1), limit, _iteratee, callback);
}

/**
 * Calls the `iteratee` function `n` times, and accumulates results in the same
 * manner you would use with [map]{@link module:Collections.map}.
 *
 * @name times
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.map]{@link module:Collections.map}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 * @example
 *
 * // Pretend this is some complicated async factory
 * var createUser = function(id, callback) {
 *     callback(null, {
 *         id: 'user' + id
 *     });
 * };
 *
 * // generate 5 users
 * async.times(5, function(n, next) {
 *     createUser(n, function(err, user) {
 *         next(err, user);
 *     });
 * }, function(err, users) {
 *     // we should now have 5 users
 * });
 */
var times = doLimit(timeLimit, Infinity);

/**
 * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
 *
 * @name timesSeries
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.times]{@link module:ControlFlow.times}
 * @category Control Flow
 * @param {number} n - The number of times to run the function.
 * @param {AsyncFunction} iteratee - The async function to call `n` times.
 * Invoked with the iteration index and a callback: (n, next).
 * @param {Function} callback - see {@link module:Collections.map}.
 */
var timesSeries = doLimit(timeLimit, 1);

/**
 * A relative of `reduce`.  Takes an Object or Array, and iterates over each
 * element in series, each step potentially mutating an `accumulator` value.
 * The type of the accumulator defaults to the type of collection passed in.
 *
 * @name transform
 * @static
 * @memberOf module:Collections
 * @method
 * @category Collection
 * @param {Array|Iterable|Object} coll - A collection to iterate over.
 * @param {*} [accumulator] - The initial state of the transform.  If omitted,
 * it will default to an empty Object or Array, depending on the type of `coll`
 * @param {AsyncFunction} iteratee - A function applied to each item in the
 * collection that potentially modifies the accumulator.
 * Invoked with (accumulator, item, key, callback).
 * @param {Function} [callback] - A callback which is called after all the
 * `iteratee` functions have finished. Result is the transformed accumulator.
 * Invoked with (err, result).
 * @example
 *
 * async.transform([1,2,3], function(acc, item, index, callback) {
 *     // pointless async:
 *     process.nextTick(function() {
 *         acc.push(item * 2)
 *         callback(null)
 *     });
 * }, function(err, result) {
 *     // result is now equal to [2, 4, 6]
 * });
 *
 * @example
 *
 * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) {
 *     setImmediate(function () {
 *         obj[key] = val * 2;
 *         callback();
 *     })
 * }, function (err, result) {
 *     // result is equal to {a: 2, b: 4, c: 6}
 * })
 */
function transform (coll, accumulator, iteratee, callback) {
    if (arguments.length <= 3) {
        callback = iteratee;
        iteratee = accumulator;
        accumulator = isArray(coll) ? [] : {};
    }
    callback = once(callback || noop);
    var _iteratee = wrapAsync(iteratee);

    eachOf(coll, function(v, k, cb) {
        _iteratee(accumulator, v, k, cb);
    }, function(err) {
        callback(err, accumulator);
    });
}

/**
 * It runs each task in series but stops whenever any of the functions were
 * successful. If one of the tasks were successful, the `callback` will be
 * passed the result of the successful task. If all tasks fail, the callback
 * will be passed the error and result (if any) of the final attempt.
 *
 * @name tryEach
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array|Iterable|Object} tasks - A collection containing functions to
 * run, each function is passed a `callback(err, result)` it must call on
 * completion with an error `err` (which can be `null`) and an optional `result`
 * value.
 * @param {Function} [callback] - An optional callback which is called when one
 * of the tasks has succeeded, or all have failed. It receives the `err` and
 * `result` arguments of the last attempt at completing the `task`. Invoked with
 * (err, results).
 * @example
 * async.tryEach([
 *     function getDataFromFirstWebsite(callback) {
 *         // Try getting the data from the first website
 *         callback(err, data);
 *     },
 *     function getDataFromSecondWebsite(callback) {
 *         // First website failed,
 *         // Try getting the data from the backup website
 *         callback(err, data);
 *     }
 * ],
 * // optional callback
 * function(err, results) {
 *     Now do something with the data.
 * });
 *
 */
function tryEach(tasks, callback) {
    var error = null;
    var result;
    callback = callback || noop;
    eachSeries(tasks, function(task, callback) {
        wrapAsync(task)(function (err, res/*, ...args*/) {
            if (arguments.length > 2) {
                result = slice(arguments, 1);
            } else {
                result = res;
            }
            error = err;
            callback(!err);
        });
    }, function () {
        callback(error, result);
    });
}

/**
 * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
 * unmemoized form. Handy for testing.
 *
 * @name unmemoize
 * @static
 * @memberOf module:Utils
 * @method
 * @see [async.memoize]{@link module:Utils.memoize}
 * @category Util
 * @param {AsyncFunction} fn - the memoized function
 * @returns {AsyncFunction} a function that calls the original unmemoized function
 */
function unmemoize(fn) {
    return function () {
        return (fn.unmemoized || fn).apply(null, arguments);
    };
}

/**
 * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs.
 *
 * @name whilst
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` passes. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has failed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 * @returns undefined
 * @example
 *
 * var count = 0;
 * async.whilst(
 *     function() { return count < 5; },
 *     function(callback) {
 *         count++;
 *         setTimeout(function() {
 *             callback(null, count);
 *         }, 1000);
 *     },
 *     function (err, n) {
 *         // 5 seconds have passed, n = 5
 *     }
 * );
 */
function whilst(test, iteratee, callback) {
    callback = onlyOnce(callback || noop);
    var _iteratee = wrapAsync(iteratee);
    if (!test()) return callback(null);
    var next = function(err/*, ...args*/) {
        if (err) return callback(err);
        if (test()) return _iteratee(next);
        var args = slice(arguments, 1);
        callback.apply(null, [null].concat(args));
    };
    _iteratee(next);
}

/**
 * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when
 * stopped, or an error occurs. `callback` will be passed an error and any
 * arguments passed to the final `iteratee`'s callback.
 *
 * The inverse of [whilst]{@link module:ControlFlow.whilst}.
 *
 * @name until
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @see [async.whilst]{@link module:ControlFlow.whilst}
 * @category Control Flow
 * @param {Function} test - synchronous truth test to perform before each
 * execution of `iteratee`. Invoked with ().
 * @param {AsyncFunction} iteratee - An async function which is called each time
 * `test` fails. Invoked with (callback).
 * @param {Function} [callback] - A callback which is called after the test
 * function has passed and repeated execution of `iteratee` has stopped. `callback`
 * will be passed an error and any arguments passed to the final `iteratee`'s
 * callback. Invoked with (err, [results]);
 */
function until(test, iteratee, callback) {
    whilst(function() {
        return !test.apply(this, arguments);
    }, iteratee, callback);
}

/**
 * Runs the `tasks` array of functions in series, each passing their results to
 * the next in the array. However, if any of the `tasks` pass an error to their
 * own callback, the next function is not executed, and the main `callback` is
 * immediately called with the error.
 *
 * @name waterfall
 * @static
 * @memberOf module:ControlFlow
 * @method
 * @category Control Flow
 * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}
 * to run.
 * Each function should complete with any number of `result` values.
 * The `result` values will be passed as arguments, in order, to the next task.
 * @param {Function} [callback] - An optional callback to run once all the
 * functions have completed. This will be passed the results of the last task's
 * callback. Invoked with (err, [results]).
 * @returns undefined
 * @example
 *
 * async.waterfall([
 *     function(callback) {
 *         callback(null, 'one', 'two');
 *     },
 *     function(arg1, arg2, callback) {
 *         // arg1 now equals 'one' and arg2 now equals 'two'
 *         callback(null, 'three');
 *     },
 *     function(arg1, callback) {
 *         // arg1 now equals 'three'
 *         callback(null, 'done');
 *     }
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 *
 * // Or, with named functions:
 * async.waterfall([
 *     myFirstFunction,
 *     mySecondFunction,
 *     myLastFunction,
 * ], function (err, result) {
 *     // result now equals 'done'
 * });
 * function myFirstFunction(callback) {
 *     callback(null, 'one', 'two');
 * }
 * function mySecondFunction(arg1, arg2, callback) {
 *     // arg1 now equals 'one' and arg2 now equals 'two'
 *     callback(null, 'three');
 * }
 * function myLastFunction(arg1, callback) {
 *     // arg1 now equals 'three'
 *     callback(null, 'done');
 * }
 */
var waterfall = function(tasks, callback) {
    callback = once(callback || noop);
    if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));
    if (!tasks.length) return callback();
    var taskIndex = 0;

    function nextTask(args) {
        var task = wrapAsync(tasks[taskIndex++]);
        args.push(onlyOnce(next));
        task.apply(null, args);
    }

    function next(err/*, ...args*/) {
        if (err || taskIndex === tasks.length) {
            return callback.apply(null, arguments);
        }
        nextTask(slice(arguments, 1));
    }

    nextTask([]);
};

/**
 * An "async function" in the context of Async is an asynchronous function with
 * a variable number of parameters, with the final parameter being a callback.
 * (`function (arg1, arg2, ..., callback) {}`)
 * The final callback is of the form `callback(err, results...)`, which must be
 * called once the function is completed.  The callback should be called with a
 * Error as its first argument to signal that an error occurred.
 * Otherwise, if no error occurred, it should be called with `null` as the first
 * argument, and any additional `result` arguments that may apply, to signal
 * successful completion.
 * The callback must be called exactly once, ideally on a later tick of the
 * JavaScript event loop.
 *
 * This type of function is also referred to as a "Node-style async function",
 * or a "continuation passing-style function" (CPS). Most of the methods of this
 * library are themselves CPS/Node-style async functions, or functions that
 * return CPS/Node-style async functions.
 *
 * Wherever we accept a Node-style async function, we also directly accept an
 * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
 * In this case, the `async` function will not be passed a final callback
 * argument, and any thrown error will be used as the `err` argument of the
 * implicit callback, and the return value will be used as the `result` value.
 * (i.e. a `rejected` of the returned Promise becomes the `err` callback
 * argument, and a `resolved` value becomes the `result`.)
 *
 * Note, due to JavaScript limitations, we can only detect native `async`
 * functions and not transpilied implementations.
 * Your environment must have `async`/`await` support for this to work.
 * (e.g. Node > v7.6, or a recent version of a modern browser).
 * If you are using `async` functions through a transpiler (e.g. Babel), you
 * must still wrap the function with [asyncify]{@link module:Utils.asyncify},
 * because the `async function` will be compiled to an ordinary function that
 * returns a promise.
 *
 * @typedef {Function} AsyncFunction
 * @static
 */

/**
 * Async is a utility module which provides straight-forward, powerful functions
 * for working with asynchronous JavaScript. Although originally designed for
 * use with [Node.js](http://nodejs.org) and installable via
 * `npm install --save async`, it can also be used directly in the browser.
 * @module async
 * @see AsyncFunction
 */


/**
 * A collection of `async` functions for manipulating collections, such as
 * arrays and objects.
 * @module Collections
 */

/**
 * A collection of `async` functions for controlling the flow through a script.
 * @module ControlFlow
 */

/**
 * A collection of `async` utility functions.
 * @module Utils
 */

var index = {
    apply: apply,
    applyEach: applyEach,
    applyEachSeries: applyEachSeries,
    asyncify: asyncify,
    auto: auto,
    autoInject: autoInject,
    cargo: cargo,
    compose: compose,
    concat: concat,
    concatLimit: concatLimit,
    concatSeries: concatSeries,
    constant: constant,
    detect: detect,
    detectLimit: detectLimit,
    detectSeries: detectSeries,
    dir: dir,
    doDuring: doDuring,
    doUntil: doUntil,
    doWhilst: doWhilst,
    during: during,
    each: eachLimit,
    eachLimit: eachLimit$1,
    eachOf: eachOf,
    eachOfLimit: eachOfLimit,
    eachOfSeries: eachOfSeries,
    eachSeries: eachSeries,
    ensureAsync: ensureAsync,
    every: every,
    everyLimit: everyLimit,
    everySeries: everySeries,
    filter: filter,
    filterLimit: filterLimit,
    filterSeries: filterSeries,
    forever: forever,
    groupBy: groupBy,
    groupByLimit: groupByLimit,
    groupBySeries: groupBySeries,
    log: log,
    map: map,
    mapLimit: mapLimit,
    mapSeries: mapSeries,
    mapValues: mapValues,
    mapValuesLimit: mapValuesLimit,
    mapValuesSeries: mapValuesSeries,
    memoize: memoize,
    nextTick: nextTick,
    parallel: parallelLimit,
    parallelLimit: parallelLimit$1,
    priorityQueue: priorityQueue,
    queue: queue$1,
    race: race,
    reduce: reduce,
    reduceRight: reduceRight,
    reflect: reflect,
    reflectAll: reflectAll,
    reject: reject,
    rejectLimit: rejectLimit,
    rejectSeries: rejectSeries,
    retry: retry,
    retryable: retryable,
    seq: seq,
    series: series,
    setImmediate: setImmediate$1,
    some: some,
    someLimit: someLimit,
    someSeries: someSeries,
    sortBy: sortBy,
    timeout: timeout,
    times: times,
    timesLimit: timeLimit,
    timesSeries: timesSeries,
    transform: transform,
    tryEach: tryEach,
    unmemoize: unmemoize,
    until: until,
    waterfall: waterfall,
    whilst: whilst,

    // aliases
    all: every,
    allLimit: everyLimit,
    allSeries: everySeries,
    any: some,
    anyLimit: someLimit,
    anySeries: someSeries,
    find: detect,
    findLimit: detectLimit,
    findSeries: detectSeries,
    forEach: eachLimit,
    forEachSeries: eachSeries,
    forEachLimit: eachLimit$1,
    forEachOf: eachOf,
    forEachOfSeries: eachOfSeries,
    forEachOfLimit: eachOfLimit,
    inject: reduce,
    foldl: reduce,
    foldr: reduceRight,
    select: filter,
    selectLimit: filterLimit,
    selectSeries: filterSeries,
    wrapSync: asyncify
};

exports['default'] = index;
exports.apply = apply;
exports.applyEach = applyEach;
exports.applyEachSeries = applyEachSeries;
exports.asyncify = asyncify;
exports.auto = auto;
exports.autoInject = autoInject;
exports.cargo = cargo;
exports.compose = compose;
exports.concat = concat;
exports.concatLimit = concatLimit;
exports.concatSeries = concatSeries;
exports.constant = constant;
exports.detect = detect;
exports.detectLimit = detectLimit;
exports.detectSeries = detectSeries;
exports.dir = dir;
exports.doDuring = doDuring;
exports.doUntil = doUntil;
exports.doWhilst = doWhilst;
exports.during = during;
exports.each = eachLimit;
exports.eachLimit = eachLimit$1;
exports.eachOf = eachOf;
exports.eachOfLimit = eachOfLimit;
exports.eachOfSeries = eachOfSeries;
exports.eachSeries = eachSeries;
exports.ensureAsync = ensureAsync;
exports.every = every;
exports.everyLimit = everyLimit;
exports.everySeries = everySeries;
exports.filter = filter;
exports.filterLimit = filterLimit;
exports.filterSeries = filterSeries;
exports.forever = forever;
exports.groupBy = groupBy;
exports.groupByLimit = groupByLimit;
exports.groupBySeries = groupBySeries;
exports.log = log;
exports.map = map;
exports.mapLimit = mapLimit;
exports.mapSeries = mapSeries;
exports.mapValues = mapValues;
exports.mapValuesLimit = mapValuesLimit;
exports.mapValuesSeries = mapValuesSeries;
exports.memoize = memoize;
exports.nextTick = nextTick;
exports.parallel = parallelLimit;
exports.parallelLimit = parallelLimit$1;
exports.priorityQueue = priorityQueue;
exports.queue = queue$1;
exports.race = race;
exports.reduce = reduce;
exports.reduceRight = reduceRight;
exports.reflect = reflect;
exports.reflectAll = reflectAll;
exports.reject = reject;
exports.rejectLimit = rejectLimit;
exports.rejectSeries = rejectSeries;
exports.retry = retry;
exports.retryable = retryable;
exports.seq = seq;
exports.series = series;
exports.setImmediate = setImmediate$1;
exports.some = some;
exports.someLimit = someLimit;
exports.someSeries = someSeries;
exports.sortBy = sortBy;
exports.timeout = timeout;
exports.times = times;
exports.timesLimit = timeLimit;
exports.timesSeries = timesSeries;
exports.transform = transform;
exports.tryEach = tryEach;
exports.unmemoize = unmemoize;
exports.until = until;
exports.waterfall = waterfall;
exports.whilst = whilst;
exports.all = every;
exports.allLimit = everyLimit;
exports.allSeries = everySeries;
exports.any = some;
exports.anyLimit = someLimit;
exports.anySeries = someSeries;
exports.find = detect;
exports.findLimit = detectLimit;
exports.findSeries = detectSeries;
exports.forEach = eachLimit;
exports.forEachSeries = eachSeries;
exports.forEachLimit = eachLimit$1;
exports.forEachOf = eachOf;
exports.forEachOfSeries = eachOfSeries;
exports.forEachOfLimit = eachOfLimit;
exports.inject = reduce;
exports.foldl = reduce;
exports.foldr = reduceRight;
exports.select = filter;
exports.selectLimit = filterLimit;
exports.selectSeries = filterSeries;
exports.wrapSync = asyncify;

Object.defineProperty(exports, '__esModule', { value: true });

})));


/***/ }),

/***/ 912903:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _require = __webpack_require__(682192),
    keccak224 = _require.keccak224,
    keccak384 = _require.keccak384,
    k256 = _require.keccak256,
    keccak512 = _require.keccak512;

var secp256k1 = __webpack_require__(965490);
var assert = __webpack_require__(742357);
var rlp = __webpack_require__(6636);
var BN = __webpack_require__(213550);
var createHash = __webpack_require__(189913);
var Buffer = __webpack_require__(289509).Buffer;
Object.assign(exports, __webpack_require__(180884));

/**
 * the max integer that this VM can handle (a ```BN```)
 * @var {BN} MAX_INTEGER
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);

/**
 * 2^256 (a ```BN```)
 * @var {BN} TWO_POW256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);

/**
 * Keccak-256 hash of null (a ```String```)
 * @var {String} KECCAK256_NULL_S
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
exports.SHA3_NULL_S = exports.KECCAK256_NULL_S;

/**
 * Keccak-256 hash of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_NULL
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
exports.SHA3_NULL = exports.KECCAK256_NULL;

/**
 * Keccak-256 of an RLP of an empty array (a ```String```)
 * @var {String} KECCAK256_RLP_ARRAY_S
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S;

/**
 * Keccak-256 of an RLP of an empty array (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP_ARRAY
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY;

/**
 * Keccak-256 hash of the RLP of null  (a ```String```)
 * @var {String} KECCAK256_RLP_S
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
exports.SHA3_RLP_S = exports.KECCAK256_RLP_S;

/**
 * Keccak-256 hash of the RLP of null (a ```Buffer```)
 * @var {Buffer} KECCAK256_RLP
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
exports.SHA3_RLP = exports.KECCAK256_RLP;

/**
 * [`BN`](https://github.com/indutny/bn.js)
 * @var {Function}
 */
exports.BN = BN;

/**
 * [`rlp`](https://github.com/ethereumjs/rlp)
 * @var {Function}
 */
exports.rlp = rlp;

/**
 * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/)
 * @var {Object}
 */
exports.secp256k1 = secp256k1;

/**
 * Returns a buffer filled with 0s
 * @method zeros
 * @param {Number} bytes  the number of bytes the buffer should be
 * @return {Buffer}
 */
exports.zeros = function (bytes) {
  return Buffer.allocUnsafe(bytes).fill(0);
};

/**
  * Returns a zero address
  * @method zeroAddress
  * @return {String}
  */
exports.zeroAddress = function () {
  var addressLength = 20;
  var zeroAddress = exports.zeros(addressLength);
  return exports.bufferToHex(zeroAddress);
};

/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @method lsetLength
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @param {Boolean} [right=false] whether to start padding form the left or right
 * @return {Buffer|Array}
 */
exports.setLengthLeft = exports.setLength = function (msg, length, right) {
  var buf = exports.zeros(length);
  msg = exports.toBuffer(msg);
  if (right) {
    if (msg.length < length) {
      msg.copy(buf);
      return buf;
    }
    return msg.slice(0, length);
  } else {
    if (msg.length < length) {
      msg.copy(buf, length - msg.length);
      return buf;
    }
    return msg.slice(-length);
  }
};

/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param {Buffer|Array} msg the value to pad
 * @param {Number} length the number of bytes the output should be
 * @return {Buffer|Array}
 */
exports.setLengthRight = function (msg, length) {
  return exports.setLength(msg, length, true);
};

/**
 * Trims leading zeros from a `Buffer` or an `Array`
 * @param {Buffer|Array|String} a
 * @return {Buffer|Array|String}
 */
exports.unpad = exports.stripZeros = function (a) {
  a = exports.stripHexPrefix(a);
  var first = a[0];
  while (a.length > 0 && first.toString() === '0') {
    a = a.slice(1);
    first = a[0];
  }
  return a;
};
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param {*} v the value
 */
exports.toBuffer = function (v) {
  if (!Buffer.isBuffer(v)) {
    if (Array.isArray(v)) {
      v = Buffer.from(v);
    } else if (typeof v === 'string') {
      if (exports.isHexString(v)) {
        v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex');
      } else {
        v = Buffer.from(v);
      }
    } else if (typeof v === 'number') {
      v = exports.intToBuffer(v);
    } else if (v === null || v === undefined) {
      v = Buffer.allocUnsafe(0);
    } else if (BN.isBN(v)) {
      v = v.toArrayLike(Buffer);
    } else if (v.toArray) {
      // converts a BN to a Buffer
      v = Buffer.from(v.toArray());
    } else {
      throw new Error('invalid type');
    }
  }
  return v;
};

/**
 * Converts a `Buffer` to a `Number`
 * @param {Buffer} buf
 * @return {Number}
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
  return new BN(exports.toBuffer(buf)).toNumber();
};

/**
 * Converts a `Buffer` into a hex `String`
 * @param {Buffer} buf
 * @return {String}
 */
exports.bufferToHex = function (buf) {
  buf = exports.toBuffer(buf);
  return '0x' + buf.toString('hex');
};

/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param {Buffer} num
 * @return {BN}
 */
exports.fromSigned = function (num) {
  return new BN(num).fromTwos(256);
};

/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param {BN} num
 * @return {Buffer}
 */
exports.toUnsigned = function (num) {
  return Buffer.from(num.toTwos(256).toArray());
};

/**
 * Creates Keccak hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the Keccak width
 * @return {Buffer}
 */
exports.keccak = function (a, bits) {
  a = exports.toBuffer(a);
  if (!bits) bits = 256;

  switch (bits) {
    case 224:
      {
        return keccak224(a);
      }
    case 256:
      {
        return k256(a);
      }
    case 384:
      {
        return keccak384(a);
      }
    case 512:
      {
        return keccak512(a);
      }
    default:
      {
        throw new Error('Invald algorithm: keccak' + bits);
      }
  }
};

/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256)
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.keccak256 = function (a) {
  return exports.keccak(a);
};

/**
 * Creates SHA-3 (Keccak) hash of the input [OBSOLETE]
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Number} [bits=256] the SHA-3 width
 * @return {Buffer}
 */
exports.sha3 = exports.keccak;

/**
 * Creates SHA256 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.sha256 = function (a) {
  a = exports.toBuffer(a);
  return createHash('sha256').update(a).digest();
};

/**
 * Creates RIPEMD160 hash of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @param {Boolean} padded whether it should be padded to 256 bits or not
 * @return {Buffer}
 */
exports.ripemd160 = function (a, padded) {
  a = exports.toBuffer(a);
  var hash = createHash('rmd160').update(a).digest();
  if (padded === true) {
    return exports.setLength(hash, 32);
  } else {
    return hash;
  }
};

/**
 * Creates SHA-3 hash of the RLP encoded version of the input
 * @param {Buffer|Array|String|Number} a the input data
 * @return {Buffer}
 */
exports.rlphash = function (a) {
  return exports.keccak(rlp.encode(a));
};

/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 * @param {Buffer} privateKey
 * @return {Boolean}
 */
exports.isValidPrivate = function (privateKey) {
  return secp256k1.privateKeyVerify(privateKey);
};

/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Boolean}
 */
exports.isValidPublic = function (publicKey, sanitize) {
  if (publicKey.length === 64) {
    // Convert to SEC1 for secp256k1
    return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
  }

  if (!sanitize) {
    return false;
  }

  return secp256k1.publicKeyVerify(publicKey);
};

/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param {Boolean} [sanitize=false] Accept public keys in other formats
 * @return {Buffer}
 */
exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) {
  pubKey = exports.toBuffer(pubKey);
  if (sanitize && pubKey.length !== 64) {
    pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
  }
  assert(pubKey.length === 64);
  // Only take the lower 160bits of the hash
  return exports.keccak(pubKey).slice(-20);
};

/**
 * Returns the ethereum public key of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
var privateToPublic = exports.privateToPublic = function (privateKey) {
  privateKey = exports.toBuffer(privateKey);
  // skip the type flag and use the X, Y points
  return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};

/**
 * Converts a public key to the Ethereum format.
 * @param {Buffer} publicKey
 * @return {Buffer}
 */
exports.importPublic = function (publicKey) {
  publicKey = exports.toBuffer(publicKey);
  if (publicKey.length !== 64) {
    publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
  }
  return publicKey;
};

/**
 * ECDSA sign
 * @param {Buffer} msgHash
 * @param {Buffer} privateKey
 * @return {Object}
 */
exports.ecsign = function (msgHash, privateKey) {
  var sig = secp256k1.sign(msgHash, privateKey);

  var ret = {};
  ret.r = sig.signature.slice(0, 32);
  ret.s = sig.signature.slice(32, 64);
  ret.v = sig.recovery + 27;
  return ret;
};

/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 * @param message
 * @returns {Buffer} hash
 */
exports.hashPersonalMessage = function (message) {
  var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString());
  return exports.keccak(Buffer.concat([prefix, message]));
};

/**
 * ECDSA public key recovery from signature
 * @param {Buffer} msgHash
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {Buffer} publicKey
 */
exports.ecrecover = function (msgHash, v, r, s) {
  var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64);
  var recovery = v - 27;
  if (recovery !== 0 && recovery !== 1) {
    throw new Error('Invalid signature v value');
  }
  var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
  return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};

/**
 * Convert signature parameters into the format of `eth_sign` RPC method
 * @param {Number} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @return {String} sig
 */
exports.toRpcSig = function (v, r, s) {
  // NOTE: with potential introduction of chainId this might need to be updated
  if (v !== 27 && v !== 28) {
    throw new Error('Invalid recovery id');
  }

  // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
  // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053
  return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)]));
};

/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 * @param {String} sig
 * @return {Object}
 */
exports.fromRpcSig = function (sig) {
  sig = exports.toBuffer(sig);

  // NOTE: with potential introduction of chainId this might need to be updated
  if (sig.length !== 65) {
    throw new Error('Invalid signature length');
  }

  var v = sig[64];
  // support both versions of `eth_sign` responses
  if (v < 27) {
    v += 27;
  }

  return {
    v: v,
    r: sig.slice(0, 32),
    s: sig.slice(32, 64)
  };
};

/**
 * Returns the ethereum address of a given private key
 * @param {Buffer} privateKey A private key must be 256 bits wide
 * @return {Buffer}
 */
exports.privateToAddress = function (privateKey) {
  return exports.publicToAddress(privateToPublic(privateKey));
};

/**
 * Checks if the address is a valid. Accepts checksummed addresses too
 * @param {String} address
 * @return {Boolean}
 */
exports.isValidAddress = function (address) {
  return (/^0x[0-9a-fA-F]{40}$/.test(address)
  );
};

/**
  * Checks if a given address is a zero address
  * @method isZeroAddress
  * @param {String} address
  * @return {Boolean}
  */
exports.isZeroAddress = function (address) {
  var zeroAddress = exports.zeroAddress();
  return zeroAddress === exports.addHexPrefix(address);
};

/**
 * Returns a checksummed address
 * @param {String} address
 * @return {String}
 */
exports.toChecksumAddress = function (address) {
  address = exports.stripHexPrefix(address).toLowerCase();
  var hash = exports.keccak(address).toString('hex');
  var ret = '0x';

  for (var i = 0; i < address.length; i++) {
    if (parseInt(hash[i], 16) >= 8) {
      ret += address[i].toUpperCase();
    } else {
      ret += address[i];
    }
  }

  return ret;
};

/**
 * Checks if the address is a valid checksummed address
 * @param {Buffer} address
 * @return {Boolean}
 */
exports.isValidChecksumAddress = function (address) {
  return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address;
};

/**
 * Generates an address of a newly created contract
 * @param {Buffer} from the address which is creating this new address
 * @param {Buffer} nonce the nonce of the from account
 * @return {Buffer}
 */
exports.generateAddress = function (from, nonce) {
  from = exports.toBuffer(from);
  nonce = new BN(nonce);

  if (nonce.isZero()) {
    // in RLP we want to encode null in the case of zero nonce
    // read the RLP documentation for an answer if you dare
    nonce = null;
  } else {
    nonce = Buffer.from(nonce.toArray());
  }

  // Only take the lower 160bits of the hash
  return exports.rlphash([from, nonce]).slice(-20);
};

/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium)
 * @param {Buffer|String} address
 * @return {Boolean}
 */
exports.isPrecompiled = function (address) {
  var a = exports.unpad(address);
  return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};

/**
 * Adds "0x" to a given `String` if it does not already start with "0x"
 * @param {String} str
 * @return {String}
 */
exports.addHexPrefix = function (str) {
  if (typeof str !== 'string') {
    return str;
  }

  return exports.isHexPrefixed(str) ? str : '0x' + str;
};

/**
 * Validate ECDSA signature
 * @method isValidSignature
 * @param {Buffer} v
 * @param {Buffer} r
 * @param {Buffer} s
 * @param {Boolean} [homestead=true]
 * @return {Boolean}
 */

exports.isValidSignature = function (v, r, s, homestead) {
  var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
  var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);

  if (r.length !== 32 || s.length !== 32) {
    return false;
  }

  if (v !== 27 && v !== 28) {
    return false;
  }

  r = new BN(r);
  s = new BN(s);

  if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) {
    return false;
  }

  if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) {
    return false;
  }

  return true;
};

/**
 * Converts a `Buffer` or `Array` to JSON
 * @param {Buffer|Array} ba
 * @return {Array|String|null}
 */
exports.baToJSON = function (ba) {
  if (Buffer.isBuffer(ba)) {
    return '0x' + ba.toString('hex');
  } else if (ba instanceof Array) {
    var array = [];
    for (var i = 0; i < ba.length; i++) {
      array.push(exports.baToJSON(ba[i]));
    }
    return array;
  }
};

/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param {Object} self the `Object` to define properties on
 * @param {Array} fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param {*} data data to be validated against the definitions
 */
exports.defineProperties = function (self, fields, data) {
  self.raw = [];
  self._fields = [];

  // attach the `toJSON`
  self.toJSON = function (label) {
    if (label) {
      var obj = {};
      self._fields.forEach(function (field) {
        obj[field] = '0x' + self[field].toString('hex');
      });
      return obj;
    }
    return exports.baToJSON(this.raw);
  };

  self.serialize = function serialize() {
    return rlp.encode(self.raw);
  };

  fields.forEach(function (field, i) {
    self._fields.push(field.name);
    function getter() {
      return self.raw[i];
    }
    function setter(v) {
      v = exports.toBuffer(v);

      if (v.toString('hex') === '00' && !field.allowZero) {
        v = Buffer.allocUnsafe(0);
      }

      if (field.allowLess && field.length) {
        v = exports.stripZeros(v);
        assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes');
      } else if (!(field.allowZero && v.length === 0) && field.length) {
        assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length);
      }

      self.raw[i] = v;
    }

    Object.defineProperty(self, field.name, {
      enumerable: true,
      configurable: true,
      get: getter,
      set: setter
    });

    if (field.default) {
      self[field.name] = field.default;
    }

    // attach alias
    if (field.alias) {
      Object.defineProperty(self, field.alias, {
        enumerable: false,
        configurable: true,
        set: setter,
        get: getter
      });
    }
  });

  // if the constuctor is passed data
  if (data) {
    if (typeof data === 'string') {
      data = Buffer.from(exports.stripHexPrefix(data), 'hex');
    }

    if (Buffer.isBuffer(data)) {
      data = rlp.decode(data);
    }

    if (Array.isArray(data)) {
      if (data.length > self._fields.length) {
        throw new Error('wrong number of fields in data');
      }

      // make sure all the items are buffers
      data.forEach(function (d, i) {
        self[self._fields[i]] = exports.toBuffer(d);
      });
    } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') {
      var keys = Object.keys(data);
      fields.forEach(function (field) {
        if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name];
        if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias];
      });
    } else {
      throw new Error('invalid data');
    }
  }
};

/***/ }),

/***/ 965490:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var secp256k1 = __webpack_require__(795053);

var secp256k1v3 = __webpack_require__(795894);
var der = __webpack_require__(666225);

/**
 * Verify an ECDSA privateKey
 * @method privateKeyVerify
 * @param {Buffer} privateKey
 * @return {boolean}
 */
var privateKeyVerify = function privateKeyVerify(privateKey) {
  // secp256k1 v4 version throws when privateKey length is not 32
  if (privateKey.length !== 32) {
    return false;
  }

  return secp256k1.privateKeyVerify(Uint8Array.from(privateKey));
};

/**
 * Export a privateKey in DER format
 * @method privateKeyExport
 * @param {Buffer} privateKey
 * @param {boolean} compressed
 * @return {boolean}
 */
var privateKeyExport = function privateKeyExport(privateKey, compressed) {
  // privateKeyExport method is not part of secp256k1 v4 package
  // this implementation is based on v3
  if (privateKey.length !== 32) {
    throw new RangeError('private key length is invalid');
  }

  var publicKey = secp256k1v3.privateKeyExport(privateKey, compressed);

  return der.privateKeyExport(privateKey, publicKey, compressed);
};

/**
 * Import a privateKey in DER format
 * @method privateKeyImport
 * @param {Buffer} privateKey
 * @return {Buffer}
 */

var privateKeyImport = function privateKeyImport(privateKey) {
  // privateKeyImport method is not part of secp256k1 v4 package
  // this implementation is based on v3
  privateKey = der.privateKeyImport(privateKey);
  if (privateKey !== null && privateKey.length === 32 && privateKeyVerify(privateKey)) {
    return privateKey;
  }

  throw new Error("couldn't import from DER format");
};

/**
 * Negate a privateKey by subtracting it from the order of the curve's base point
 * @method privateKeyNegate
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
var privateKeyNegate = function privateKeyNegate(privateKey) {
  return Buffer.from(secp256k1.privateKeyNegate(Uint8Array.from(privateKey)));
};

/**
 * Compute the inverse of a privateKey (modulo the order of the curve's base point).
 * @method privateKeyModInverse
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
var privateKeyModInverse = function privateKeyModInverse(privateKey) {
  if (privateKey.length !== 32) {
    throw new Error('private key length is invalid');
  }

  return Buffer.from(secp256k1v3.privateKeyModInverse(Uint8Array.from(privateKey)));
};

/**
 * Tweak a privateKey by adding tweak to it.
 * @method privateKeyTweakAdd
 * @param {Buffer} privateKey
 * @param {Buffer} tweak
 * @return {Buffer}
 */
var privateKeyTweakAdd = function privateKeyTweakAdd(privateKey, tweak) {
  return Buffer.from(secp256k1.privateKeyTweakAdd(Uint8Array.from(privateKey), tweak));
};

/**
 * Tweak a privateKey by multiplying it by a tweak.
 * @method privateKeyTweakMul
 * @param {Buffer} privateKey
 * @param {Buffer} tweak
 * @return {Buffer}
 */
var privateKeyTweakMul = function privateKeyTweakMul(privateKey, tweak) {
  return Buffer.from(secp256k1.privateKeyTweakMul(Uint8Array.from(privateKey), Uint8Array.from(tweak)));
};

/**
 * Compute the public key for a privateKey.
 * @method publicKeyCreate
 * @param {Buffer} privateKey
 * @param {boolean} compressed
 * @return {Buffer}
 */
var publicKeyCreate = function publicKeyCreate(privateKey, compressed) {
  return Buffer.from(secp256k1.publicKeyCreate(Uint8Array.from(privateKey), compressed));
};

/**
 * Convert a publicKey to compressed or uncompressed form.
 * @method publicKeyConvert
 * @param {Buffer} publicKey
 * @param {boolean} compressed
 * @return {Buffer}
 */
var publicKeyConvert = function publicKeyConvert(publicKey, compressed) {
  return Buffer.from(secp256k1.publicKeyConvert(Uint8Array.from(publicKey), compressed));
};

/**
 * Verify an ECDSA publicKey.
 * @method publicKeyVerify
 * @param {Buffer} publicKey
 * @return {boolean}
 */
var publicKeyVerify = function publicKeyVerify(publicKey) {
  // secp256k1 v4 version throws when publicKey length is not 33 or 65
  if (publicKey.length !== 33 && publicKey.length !== 65) {
    return false;
  }

  return secp256k1.publicKeyVerify(Uint8Array.from(publicKey));
};

/**
 * Tweak a publicKey by adding tweak times the generator to it.
 * @method publicKeyTweakAdd
 * @param {Buffer} publicKey
 * @param {Buffer} tweak
 * @param {boolean} compressed
 * @return {Buffer}
 */
var publicKeyTweakAdd = function publicKeyTweakAdd(publicKey, tweak, compressed) {
  return Buffer.from(secp256k1.publicKeyTweakAdd(Uint8Array.from(publicKey), Uint8Array.from(tweak), compressed));
};

/**
 * Tweak a publicKey by multiplying it by a tweak value
 * @method publicKeyTweakMul
 * @param {Buffer} publicKey
 * @param {Buffer} tweak
 * @param {boolean} compressed
 * @return {Buffer}
 */
var publicKeyTweakMul = function publicKeyTweakMul(publicKey, tweak, compressed) {
  return Buffer.from(secp256k1.publicKeyTweakMul(Uint8Array.from(publicKey), Uint8Array.from(tweak), compressed));
};

/**
 * Add a given publicKeys together.
 * @method publicKeyCombine
 * @param {Array<Buffer>} publicKeys
 * @param {boolean} compressed
 * @return {Buffer}
 */
var publicKeyCombine = function publicKeyCombine(publicKeys, compressed) {
  var keys = [];
  publicKeys.forEach(function (publicKey) {
    keys.push(Uint8Array.from(publicKey));
  });

  return Buffer.from(secp256k1.publicKeyCombine(keys, compressed));
};

/**
 * Convert a signature to a normalized lower-S form.
 * @method signatureNormalize
 * @param {Buffer} signature
 * @return {Buffer}
 */
var signatureNormalize = function signatureNormalize(signature) {
  return Buffer.from(secp256k1.signatureNormalize(Uint8Array.from(signature)));
};

/**
 * Serialize an ECDSA signature in DER format.
 * @method signatureExport
 * @param {Buffer} signature
 * @return {Buffer}
 */
var signatureExport = function signatureExport(signature) {
  return Buffer.from(secp256k1.signatureExport(Uint8Array.from(signature)));
};

/**
 * Parse a DER ECDSA signature (follow by [BIP66](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki)).
 * @method signatureImport
 * @param {Buffer} signature
 * @return {Buffer}
 */
var signatureImport = function signatureImport(signature) {
  return Buffer.from(secp256k1.signatureImport(Uint8Array.from(signature)));
};

/**
 * Parse a DER ECDSA signature (not follow by [BIP66](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki)).
 * @method signatureImportLax
 * @param {Buffer} signature
 * @return {Buffer}
 */
var signatureImportLax = function signatureImportLax(signature) {
  // signatureImportLax method is not part of secp256k1 v4 package
  // this implementation is based on v3
  // ensure that signature is greater than 0
  if (signature.length === 0) {
    throw new RangeError('signature length is invalid');
  }

  var sigObj = der.signatureImportLax(signature);
  if (sigObj === null) {
    throw new Error("couldn't parse DER signature");
  }

  return secp256k1v3.signatureImport(sigObj);
};

/**
 * Create an ECDSA signature. Always return low-S signature.
 * @method sign
 * @param {Buffer} message
 * @param {Buffer} privateKey
 * @param {Object} options
 * @return {Buffer}
 */
var sign = function sign(message, privateKey, options) {
  if (options === null) {
    throw new TypeError('options should be an Object');
  }

  var signOptions = void 0;

  if (options) {
    signOptions = {};

    if (options.data === null) {
      throw new TypeError('options.data should be a Buffer');
    }

    if (options.data) {
      // validate option.data length
      if (options.data.length !== 32) {
        throw new RangeError('options.data length is invalid');
      }

      signOptions.data = new Uint8Array(options.data);
    }

    if (options.noncefn === null) {
      throw new TypeError('options.noncefn should be a Function');
    }

    if (options.noncefn) {
      //  convert option.noncefn function signature
      signOptions.noncefn = function (message, privateKey, algo, data, attempt) {
        var bufferAlgo = algo != null ? Buffer.from(algo) : null;
        var bufferData = data != null ? Buffer.from(data) : null;

        var buffer = Buffer.from('');

        if (options.noncefn) {
          buffer = options.noncefn(Buffer.from(message), Buffer.from(privateKey), bufferAlgo, bufferData, attempt);
        }

        return Uint8Array.from(buffer);
      };
    }
  }

  var sig = secp256k1.ecdsaSign(Uint8Array.from(message), Uint8Array.from(privateKey), signOptions);

  return {
    signature: Buffer.from(sig.signature),
    recovery: sig.recid
  };
};

/**
 * Verify an ECDSA signature.
 * @method verify
 * @param {Buffer} message
 * @param {Buffer} signature
 * @param {Buffer} publicKey
 * @return {boolean}
 */
var verify = function verify(message, signature, publicKey) {
  // note: secp256k1 v4 verify method has a different argument order
  return secp256k1.ecdsaVerify(Uint8Array.from(signature), Uint8Array.from(message), publicKey);
};

/**
 * Recover an ECDSA public key from a signature.
 * @method recover
 * @param {Buffer} message
 * @param {Buffer} signature
 * @param {Number} recid
 * @param {boolean} compressed
 * @return {Buffer}
 */
var recover = function recover(message, signature, recid, compressed) {
  // note: secp256k1 v4 recover method has a different argument order
  return Buffer.from(secp256k1.ecdsaRecover(Uint8Array.from(signature), recid, Uint8Array.from(message), compressed));
};

/**
 * Compute an EC Diffie-Hellman secret and applied sha256 to compressed public key.
 * @method ecdh
 * @param {Buffer} publicKey
 * @param {Buffer} privateKey
 * @return {Buffer}
 */
var ecdh = function ecdh(publicKey, privateKey) {
  // note: secp256k1 v3 doesn't allow optional parameter
  return Buffer.from(secp256k1.ecdh(Uint8Array.from(publicKey), Uint8Array.from(privateKey), {}));
};

/**
 * Compute an EC Diffie-Hellman secret and return public key as result
 * @method ecdhUnsafe
 * @param {Buffer} publicKey
 * @param {Buffer} privateKey
 * @param {boolean} compressed
 * @return {Buffer}
 */
var ecdhUnsafe = function ecdhUnsafe(publicKey, privateKey, compressed) {
  // ecdhUnsafe method is not part of secp256k1 v4 package
  // this implementation is based on v3
  // ensure valid publicKey length
  if (publicKey.length !== 33 && publicKey.length !== 65) {
    throw new RangeError('public key length is invalid');
  }

  // ensure valid privateKey length
  if (privateKey.length !== 32) {
    throw new RangeError('private key length is invalid');
  }

  return Buffer.from(secp256k1v3.ecdhUnsafe(Uint8Array.from(publicKey), Uint8Array.from(privateKey), compressed));
};

module.exports = {
  privateKeyVerify: privateKeyVerify,
  privateKeyExport: privateKeyExport,
  privateKeyImport: privateKeyImport,
  privateKeyNegate: privateKeyNegate,
  privateKeyModInverse: privateKeyModInverse,
  privateKeyTweakAdd: privateKeyTweakAdd,
  privateKeyTweakMul: privateKeyTweakMul,

  publicKeyCreate: publicKeyCreate,
  publicKeyConvert: publicKeyConvert,
  publicKeyVerify: publicKeyVerify,
  publicKeyTweakAdd: publicKeyTweakAdd,
  publicKeyTweakMul: publicKeyTweakMul,
  publicKeyCombine: publicKeyCombine,

  signatureNormalize: signatureNormalize,
  signatureExport: signatureExport,
  signatureImport: signatureImport,
  signatureImportLax: signatureImportLax,

  sign: sign,
  verify: verify,
  recover: recover,

  ecdh: ecdh,
  ecdhUnsafe: ecdhUnsafe
};

/***/ }),

/***/ 666225:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


// This file is imported from secp256k1 v3
// https://github.com/cryptocoinjs/secp256k1-node/blob/master/LICENSE

var EC_PRIVKEY_EXPORT_DER_COMPRESSED = Buffer.from([
// begin
0x30, 0x81, 0xd3, 0x02, 0x01, 0x01, 0x04, 0x20,
// private key
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// middle
0xa0, 0x81, 0x85, 0x30, 0x81, 0x82, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfc, 0x2f, 0x30, 0x06, 0x04, 0x01, 0x00, 0x04, 0x01, 0x07, 0x04, 0x21, 0x02, 0x79, 0xbe, 0x66, 0x7e, 0xf9, 0xdc, 0xbb, 0xac, 0x55, 0xa0, 0x62, 0x95, 0xce, 0x87, 0x0b, 0x07, 0x02, 0x9b, 0xfc, 0xdb, 0x2d, 0xce, 0x28, 0xd9, 0x59, 0xf2, 0x81, 0x5b, 0x16, 0xf8, 0x17, 0x98, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x41, 0x02, 0x01, 0x01, 0xa1, 0x24, 0x03, 0x22, 0x00,
// public key
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);

var EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED = Buffer.from([
// begin
0x30, 0x82, 0x01, 0x13, 0x02, 0x01, 0x01, 0x04, 0x20,
// private key
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
// middle
0xa0, 0x81, 0xa5, 0x30, 0x81, 0xa2, 0x02, 0x01, 0x01, 0x30, 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfc, 0x2f, 0x30, 0x06, 0x04, 0x01, 0x00, 0x04, 0x01, 0x07, 0x04, 0x41, 0x04, 0x79, 0xbe, 0x66, 0x7e, 0xf9, 0xdc, 0xbb, 0xac, 0x55, 0xa0, 0x62, 0x95, 0xce, 0x87, 0x0b, 0x07, 0x02, 0x9b, 0xfc, 0xdb, 0x2d, 0xce, 0x28, 0xd9, 0x59, 0xf2, 0x81, 0x5b, 0x16, 0xf8, 0x17, 0x98, 0x48, 0x3a, 0xda, 0x77, 0x26, 0xa3, 0xc4, 0x65, 0x5d, 0xa4, 0xfb, 0xfc, 0x0e, 0x11, 0x08, 0xa8, 0xfd, 0x17, 0xb4, 0x48, 0xa6, 0x85, 0x54, 0x19, 0x9c, 0x47, 0xd0, 0x8f, 0xfb, 0x10, 0xd4, 0xb8, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x41, 0x02, 0x01, 0x01, 0xa1, 0x44, 0x03, 0x42, 0x00,
// public key
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);

exports.privateKeyExport = function (privateKey, publicKey, compressed) {
  var result = Buffer.from(compressed ? EC_PRIVKEY_EXPORT_DER_COMPRESSED : EC_PRIVKEY_EXPORT_DER_UNCOMPRESSED);
  privateKey.copy(result, compressed ? 8 : 9);
  publicKey.copy(result, compressed ? 181 : 214);
  return result;
};

exports.privateKeyImport = function (privateKey) {
  var length = privateKey.length;

  // sequence header
  var index = 0;
  if (length < index + 1 || privateKey[index] !== 0x30) return null;
  index += 1;

  // sequence length constructor
  if (length < index + 1 || !(privateKey[index] & 0x80)) return null;

  var lenb = privateKey[index] & 0x7f;
  index += 1;
  if (lenb < 1 || lenb > 2) return null;
  if (length < index + lenb) return null;

  // sequence length
  var len = privateKey[index + lenb - 1] | (lenb > 1 ? privateKey[index + lenb - 2] << 8 : 0);
  index += lenb;
  if (length < index + len) return null;

  // sequence element 0: version number (=1)
  if (length < index + 3 || privateKey[index] !== 0x02 || privateKey[index + 1] !== 0x01 || privateKey[index + 2] !== 0x01) {
    return null;
  }
  index += 3;

  // sequence element 1: octet string, up to 32 bytes
  if (length < index + 2 || privateKey[index] !== 0x04 || privateKey[index + 1] > 0x20 || length < index + 2 + privateKey[index + 1]) {
    return null;
  }

  return privateKey.slice(index + 2, index + 2 + privateKey[index + 1]);
};

exports.signatureImportLax = function (signature) {
  var r = Buffer.alloc(32, 0);
  var s = Buffer.alloc(32, 0);

  var length = signature.length;
  var index = 0;

  // sequence tag byte
  if (signature[index++] !== 0x30) {
    return null;
  }

  // sequence length byte
  var lenbyte = signature[index++];
  if (lenbyte & 0x80) {
    index += lenbyte - 0x80;
    if (index > length) {
      return null;
    }
  }

  // sequence tag byte for r
  if (signature[index++] !== 0x02) {
    return null;
  }

  // length for r
  var rlen = signature[index++];
  if (rlen & 0x80) {
    lenbyte = rlen - 0x80;
    if (index + lenbyte > length) {
      return null;
    }
    for (; lenbyte > 0 && signature[index] === 0x00; index += 1, lenbyte -= 1) {}
    for (rlen = 0; lenbyte > 0; index += 1, lenbyte -= 1) {
      rlen = (rlen << 8) + signature[index];
    }
  }
  if (rlen > length - index) {
    return null;
  }
  var rindex = index;
  index += rlen;

  // sequence tag byte for s
  if (signature[index++] !== 0x02) {
    return null;
  }

  // length for s
  var slen = signature[index++];
  if (slen & 0x80) {
    lenbyte = slen - 0x80;
    if (index + lenbyte > length) {
      return null;
    }
    for (; lenbyte > 0 && signature[index] === 0x00; index += 1, lenbyte -= 1) {}
    for (slen = 0; lenbyte > 0; index += 1, lenbyte -= 1) {
      slen = (slen << 8) + signature[index];
    }
  }
  if (slen > length - index) {
    return null;
  }
  var sindex = index;
  index += slen;

  // ignore leading zeros in r
  for (; rlen > 0 && signature[rindex] === 0x00; rlen -= 1, rindex += 1) {}
  // copy r value
  if (rlen > 32) {
    return null;
  }
  var rvalue = signature.slice(rindex, rindex + rlen);
  rvalue.copy(r, 32 - rvalue.length);

  // ignore leading zeros in s
  for (; slen > 0 && signature[sindex] === 0x00; slen -= 1, sindex += 1) {}
  // copy s value
  if (slen > 32) {
    return null;
  }
  var svalue = signature.slice(sindex, sindex + slen);
  svalue.copy(s, 32 - svalue.length);

  return { r: r, s: s };
};

/***/ }),

/***/ 795894:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


// This file is imported from secp256k1 v3
// https://github.com/cryptocoinjs/secp256k1-node/blob/master/LICENSE

var BN = __webpack_require__(213550);
var EC = __webpack_require__(378892).ec;

var ec = new EC('secp256k1');
var ecparams = ec.curve;

exports.privateKeyExport = function (privateKey, compressed) {
  var d = new BN(privateKey);
  if (d.ucmp(ecparams.n) >= 0) {
    throw new Error('couldn\'t export to DER format');
  }

  var point = ec.g.mul(d);
  return toPublicKey(point.getX(), point.getY(), compressed);
};

exports.privateKeyModInverse = function (privateKey) {
  var bn = new BN(privateKey);
  if (bn.ucmp(ecparams.n) >= 0 || bn.isZero()) {
    throw new Error('private key range is invalid');
  }

  return bn.invm(ecparams.n).toArrayLike(Buffer, 'be', 32);
};

exports.signatureImport = function (sigObj) {
  var r = new BN(sigObj.r);
  if (r.ucmp(ecparams.n) >= 0) {
    r = new BN(0);
  }

  var s = new BN(sigObj.s);
  if (s.ucmp(ecparams.n) >= 0) {
    s = new BN(0);
  }

  return Buffer.concat([r.toArrayLike(Buffer, 'be', 32), s.toArrayLike(Buffer, 'be', 32)]);
};

exports.ecdhUnsafe = function (publicKey, privateKey, compressed) {
  var point = ec.keyFromPublic(publicKey);

  var scalar = new BN(privateKey);
  if (scalar.ucmp(ecparams.n) >= 0 || scalar.isZero()) {
    throw new Error('scalar was invalid (zero or overflow)');
  }

  var shared = point.pub.mul(scalar);
  return toPublicKey(shared.getX(), shared.getY(), compressed);
};

var toPublicKey = function toPublicKey(x, y, compressed) {
  var publicKey = void 0;

  if (compressed) {
    publicKey = Buffer.alloc(33);
    publicKey[0] = y.isOdd() ? 0x03 : 0x02;
    x.toArrayLike(Buffer, 'be', 32).copy(publicKey, 1);
  } else {
    publicKey = Buffer.alloc(65);
    publicKey[0] = 0x04;
    x.toArrayLike(Buffer, 'be', 32).copy(publicKey, 1);
    y.toArrayLike(Buffer, 'be', 32).copy(publicKey, 33);
  }

  return publicKey;
};

/***/ }),

/***/ 270427:
/***/ ((module) => {

"use strict";


function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

module.exports =
/*#__PURE__*/
function () {
  /**
   * Executes tasks up to maxPoolSize at a time, other items are put in a priority queue.
   * @class PrioritizedTaskExecutor
   * @private
   * @param {Number} maxPoolSize The maximum size of the pool
   * @prop {Number} maxPoolSize The maximum size of the pool
   * @prop {Number} currentPoolSize The current size of the pool
   * @prop {Array} queue The task queue
   */
  function PrioritizedTaskExecutor(maxPoolSize) {
    _classCallCheck(this, PrioritizedTaskExecutor);

    this.maxPoolSize = maxPoolSize;
    this.currentPoolSize = 0;
    this.queue = [];
  }
  /**
   * Executes the task.
   * @private
   * @param {Number} priority The priority of the task
   * @param {Function} task The function that accepts the callback, which must be called upon the task completion.
   */


  _createClass(PrioritizedTaskExecutor, [{
    key: "execute",
    value: function execute(priority, task) {
      var _this = this;

      if (this.currentPoolSize < this.maxPoolSize) {
        this.currentPoolSize++;
        task(function () {
          _this.currentPoolSize--;

          if (_this.queue.length > 0) {
            _this.queue.sort(function (a, b) {
              return b.priority - a.priority;
            });

            var item = _this.queue.shift();

            _this.execute(item.priority, item.task);
          }
        });
      } else {
        this.queue.push({
          priority: priority,
          task: task
        });
      }
    }
  }]);

  return PrioritizedTaskExecutor;
}();

/***/ }),

/***/ 320215:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var TrieNode = __webpack_require__(334568);

var ethUtil = __webpack_require__(912903);

var matchingNibbleLength = __webpack_require__(341574).matchingNibbleLength;
/**
 * Returns a merkle proof for a given key
 * @method prove
 * @param {Trie} trie
 * @param {String} key
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {Array.<TrieNode>} `proof`)
 */


exports.prove = function (trie, key, cb) {
  var nodes;
  trie.findPath(key, function (err, node, remaining, stack) {
    if (err) return cb(err);
    if (remaining.length > 0) return cb(new Error('Node does not contain the key'));
    nodes = stack;
    var p = [];

    for (var i = 0; i < nodes.length; i++) {
      var rlpNode = nodes[i].serialize();

      if (rlpNode.length >= 32 || i === 0) {
        p.push(rlpNode);
      }
    }

    cb(null, p);
  });
};
/**
 * Verifies a merkle proof for a given key
 * @method verifyProof
 * @param {Buffer} rootHash
 * @param {String} key
 * @param {Array.<TrieNode>} proof
 * @param {Function} cb A callback `Function` (arguments {Error} `err`, {String} `val`)
 */


exports.verifyProof = function (rootHash, key, proof, cb) {
  key = TrieNode.stringToNibbles(key);
  var wantHash = ethUtil.toBuffer(rootHash);

  for (var i = 0; i < proof.length; i++) {
    var p = ethUtil.toBuffer(proof[i]);
    var hash = ethUtil.sha3(proof[i]);

    if (Buffer.compare(hash, wantHash)) {
      return cb(new Error('Bad proof node ' + i + ': hash mismatch'));
    }

    var node = new TrieNode(ethUtil.rlp.decode(p));
    var cld;

    if (node.type === 'branch') {
      if (key.length === 0) {
        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (branch)'));
        }

        return cb(null, node.value);
      }

      cld = node.raw[key[0]];
      key = key.slice(1);

      if (cld.length === 2) {
        var embeddedNode = new TrieNode(cld);

        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (embeddedNode)'));
        }

        if (matchingNibbleLength(embeddedNode.key, key) !== embeddedNode.key.length) {
          return cb(new Error('Key length does not match with the proof one (embeddedNode)'));
        }

        key = key.slice(embeddedNode.key.length);

        if (key.length !== 0) {
          return cb(new Error('Key does not match with the proof one (embeddedNode)'));
        }

        return cb(null, embeddedNode.value);
      } else {
        wantHash = cld;
      }
    } else if (node.type === 'extention' || node.type === 'leaf') {
      if (matchingNibbleLength(node.key, key) !== node.key.length) {
        return cb(new Error('Key does not match with the proof one (extention|leaf)'));
      }

      cld = node.value;
      key = key.slice(node.key.length);

      if (key.length === 0 || cld.length === 17 && key.length === 1) {
        // The value is in an embedded branch. Extract it.
        if (cld.length === 17) {
          cld = cld[key[0]][1];
          key = key.slice(1);
        }

        if (i !== proof.length - 1) {
          return cb(new Error('Additional nodes at end of proof (extention|leaf)'));
        }

        return cb(null, cld);
      } else {
        wantHash = cld;
      }
    } else {
      return cb(new Error('Invalid node type'));
    }
  }

  cb(new Error('Unexpected end of proof'));
};

/***/ }),

/***/ 774443:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

var Readable = __webpack_require__(544144).Readable;

var TrieNode = __webpack_require__(334568);

module.exports =
/*#__PURE__*/
function (_Readable) {
  _inherits(TrieReadStream, _Readable);

  function TrieReadStream(trie) {
    var _this;

    _classCallCheck(this, TrieReadStream);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(TrieReadStream).call(this, {
      objectMode: true
    }));
    _this.trie = trie;
    _this.next = null;
    return _this;
  }

  _createClass(TrieReadStream, [{
    key: "_read",
    value: function _read() {
      var _this2 = this;

      if (!this._started) {
        this._started = true;

        this.trie._findValueNodes(function (nodeRef, node, key, next) {
          _this2.push({
            key: TrieNode.nibblesToBuffer(key),
            value: node.value
          });

          next();
        }, function () {
          // close stream
          _this2.push(null);
        });
      }
    }
  }]);

  return TrieReadStream;
}(Readable);

/***/ }),

/***/ 100558:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

var _require = __webpack_require__(544144),
    Readable = _require.Readable; // ScratchReadStream
// this is used to minimally dump the scratch into the db


module.exports =
/*#__PURE__*/
function (_Readable) {
  _inherits(ScratchReadStream, _Readable);

  function ScratchReadStream(trie) {
    var _this;

    _classCallCheck(this, ScratchReadStream);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(ScratchReadStream).call(this, {
      objectMode: true
    }));
    _this.trie = trie;
    _this.next = null;
    return _this;
  }

  _createClass(ScratchReadStream, [{
    key: "_read",
    value: function _read() {
      var _this2 = this;

      if (!this._started) {
        this._started = true;

        this.trie._findDbNodes(function (nodeRef, node, key, next) {
          _this2.push({
            key: nodeRef,
            value: node.serialize()
          });

          next();
        }, function () {
          // close stream
          _this2.push(null);
        });
      }
    }
  }]);

  return ScratchReadStream;
}(Readable);

/***/ }),

/***/ 334568:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var rlp = __webpack_require__(6636);

var ethUtil = __webpack_require__(912903);

module.exports = TrieNode;

function TrieNode(type, key, value) {
  if (Array.isArray(type)) {
    // parse raw node
    this.parseNode(type);
  } else {
    this.type = type;

    if (type === 'branch') {
      var values = key;
      this.raw = Array.apply(null, Array(17));

      if (values) {
        values.forEach(function (keyVal) {
          this.set.apply(this, keyVal);
        });
      }
    } else {
      this.raw = Array(2);
      this.setValue(value);
      this.setKey(key);
    }
  }
}

TrieNode.isRawNode = isRawNode;
TrieNode.addHexPrefix = addHexPrefix;
TrieNode.removeHexPrefix = removeHexPrefix;
TrieNode.isTerminator = isTerminator;
TrieNode.stringToNibbles = stringToNibbles;
TrieNode.nibblesToBuffer = nibblesToBuffer;
TrieNode.getNodeType = getNodeType;
Object.defineProperty(TrieNode.prototype, 'value', {
  get: function get() {
    return this.getValue();
  },
  set: function set(v) {
    this.setValue(v);
  }
});
Object.defineProperty(TrieNode.prototype, 'key', {
  get: function get() {
    return this.getKey();
  },
  set: function set(k) {
    this.setKey(k);
  }
}); // parses a raw node

TrieNode.prototype.parseNode = function (rawNode) {
  this.raw = rawNode;
  this.type = getNodeType(rawNode);
}; // sets the value of the node


TrieNode.prototype.setValue = function (key, value) {
  if (this.type !== 'branch') {
    this.raw[1] = key;
  } else {
    if (arguments.length === 1) {
      value = key;
      key = 16;
    }

    this.raw[key] = value;
  }
};

TrieNode.prototype.getValue = function (key) {
  if (this.type === 'branch') {
    if (arguments.length === 0) {
      key = 16;
    }

    var val = this.raw[key];

    if (val !== null && val !== undefined && val.length !== 0) {
      return val;
    }
  } else {
    return this.raw[1];
  }
};

TrieNode.prototype.setKey = function (key) {
  if (this.type !== 'branch') {
    if (Buffer.isBuffer(key)) {
      key = stringToNibbles(key);
    } else {
      key = key.slice(0); // copy the key
    }

    key = addHexPrefix(key, this.type === 'leaf');
    this.raw[0] = nibblesToBuffer(key);
  }
}; // returns the key as a nibble


TrieNode.prototype.getKey = function () {
  if (this.type !== 'branch') {
    var key = this.raw[0];
    key = removeHexPrefix(stringToNibbles(key));
    return key;
  }
};

TrieNode.prototype.serialize = function () {
  return rlp.encode(this.raw);
};

TrieNode.prototype.hash = function () {
  return ethUtil.sha3(this.serialize());
};

TrieNode.prototype.toString = function () {
  var out = this.type;
  out += ': [';
  this.raw.forEach(function (el) {
    if (Buffer.isBuffer(el)) {
      out += el.toString('hex') + ', ';
    } else if (el) {
      out += 'object, ';
    } else {
      out += 'empty, ';
    }
  });
  out = out.slice(0, -2);
  out += ']';
  return out;
};

TrieNode.prototype.getChildren = function () {
  var children = [];

  switch (this.type) {
    case 'leaf':
      // no children
      break;

    case 'extention':
      // one child
      children.push([this.key, this.getValue()]);
      break;

    case 'branch':
      for (var index = 0, end = 16; index < end; index++) {
        var value = this.getValue(index);

        if (value) {
          children.push([[index], value]);
        }
      }

      break;
  }

  return children;
};
/**
 * @param {Array} dataArr
 * @returns {Buffer} - returns buffer of encoded data
 * hexPrefix
 **/


function addHexPrefix(key, terminator) {
  // odd
  if (key.length % 2) {
    key.unshift(1);
  } else {
    // even
    key.unshift(0);
    key.unshift(0);
  }

  if (terminator) {
    key[0] += 2;
  }

  return key;
}

function removeHexPrefix(val) {
  if (val[0] % 2) {
    val = val.slice(1);
  } else {
    val = val.slice(2);
  }

  return val;
}
/**
 * Determines if a key has Arnold Schwarzenegger in it.
 * @method isTerminator
 * @private
 * @param {Array} key - an hexprefixed array of nibbles
 */


function isTerminator(key) {
  return key[0] > 1;
}
/**
 * Converts a string OR a buffer to a nibble array.
 * @method stringToNibbles
 * @private
 * @param {Buffer| String} key
 */


function stringToNibbles(key) {
  var bkey = new Buffer(key);
  var nibbles = [];

  for (var i = 0; i < bkey.length; i++) {
    var q = i * 2;
    nibbles[q] = bkey[i] >> 4;
    ++q;
    nibbles[q] = bkey[i] % 16;
  }

  return nibbles;
}
/**
 * Converts a nibble array into a buffer.
 * @method nibblesToBuffer
 * @private
 * @param arr
 */


function nibblesToBuffer(arr) {
  var buf = new Buffer(arr.length / 2);

  for (var i = 0; i < buf.length; i++) {
    var q = i * 2;
    buf[i] = (arr[q] << 4) + arr[++q];
  }

  return buf;
}
/**
 * Determines the node type.
 * @private
 * @returns {String} - the node type
 *   - leaf - if the node is a leaf
 *   - branch - if the node is a branch
 *   - extention - if the node is an extention
 *   - unknown - if something else got borked
 */


function getNodeType(node) {
  if (node.length === 17) {
    return 'branch';
  } else if (node.length === 2) {
    var key = stringToNibbles(node[0]);

    if (isTerminator(key)) {
      return 'leaf';
    }

    return 'extention';
  }
}

function isRawNode(node) {
  return Array.isArray(node) && !Buffer.isBuffer(node);
}

/***/ }),

/***/ 341574:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var async = __webpack_require__(338500);

module.exports = {
  matchingNibbleLength: matchingNibbleLength,
  callTogether: callTogether,
  asyncFirstSeries: asyncFirstSeries,
  doKeysMatch: doKeysMatch
  /**
   * Returns the number of in order matching nibbles of two give nibble arrays
   * @method matchingNibbleLength
   * @private
   * @param {Array} nib1
   * @param {Array} nib2
   */

};

function matchingNibbleLength(nib1, nib2) {
  var i = 0;

  while (nib1[i] === nib2[i] && nib1.length > i) {
    i++;
  }

  return i;
}
/**
 * Compare two 'nibble array' keys
 */


function doKeysMatch(keyA, keyB) {
  var length = matchingNibbleLength(keyA, keyB);
  return length === keyA.length && length === keyB.length;
}
/**
 * Take two or more functions and returns a function  that will execute all of
 * the given functions
 */


function callTogether() {
  var funcs = arguments;
  var length = funcs.length;
  var index = length;

  if (!length) {
    return function () {};
  }

  return function () {
    length = index;

    while (length--) {
      var fn = funcs[length];

      if (typeof fn === 'function') {
        var result = funcs[length].apply(this, arguments);
      }
    }

    return result;
  };
}
/**
 * Take a collection of async fns, call the cb on the first to return a truthy value.
 * If all run without a truthy result, return undefined
 */


function asyncFirstSeries(array, iterator, cb) {
  var didComplete = false;
  async.eachSeries(array, function (item, next) {
    if (didComplete) return next;
    iterator(item, function (err, result) {
      if (result) {
        didComplete = true;
        process.nextTick(cb.bind(null, null, result));
      }

      next(err);
    });
  }, function () {
    if (!didComplete) {
      cb();
    }
  });
}

/***/ }),

/***/ 845504:
/***/ ((module) => {

var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;

var isFunction = function (fn) {
	var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]';
	if (!isFunc && typeof window !== 'undefined') {
		isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt;
	}
	return isFunc;
};

module.exports = function forEach(obj, fn) {
	if (!isFunction(fn)) {
		throw new TypeError('iterator must be a function');
	}
	var i, k,
		isString = typeof obj === 'string',
		l = obj.length,
		context = arguments.length > 2 ? arguments[2] : null;
	if (l === +l) {
		for (i = 0; i < l; i++) {
			if (context === null) {
				fn(isString ? obj.charAt(i) : obj[i], i, obj);
			} else {
				fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj);
			}
		}
	} else {
		for (k in obj) {
			if (hasOwn.call(obj, k)) {
				if (context === null) {
					fn(obj[k], k, obj);
				} else {
					fn.call(context, obj[k], k, obj);
				}
			}
		}
	}
};



/***/ }),

/***/ 584908:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = Object.keys || __webpack_require__(978809);



/***/ }),

/***/ 160204:
/***/ ((module) => {

var toString = Object.prototype.toString;

module.exports = function isArguments(value) {
	var str = toString.call(value);
	var isArguments = str === '[object Arguments]';
	if (!isArguments) {
		isArguments = str !== '[object Array]'
			&& value !== null
			&& typeof value === 'object'
			&& typeof value.length === 'number'
			&& value.length >= 0
			&& toString.call(value.callee) === '[object Function]';
	}
	return isArguments;
};



/***/ }),

/***/ 978809:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

(function () {
	"use strict";

	// modified from https://github.com/kriskowal/es5-shim
	var has = Object.prototype.hasOwnProperty,
		toString = Object.prototype.toString,
		forEach = __webpack_require__(845504),
		isArgs = __webpack_require__(160204),
		hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),
		hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),
		dontEnums = [
			"toString",
			"toLocaleString",
			"valueOf",
			"hasOwnProperty",
			"isPrototypeOf",
			"propertyIsEnumerable",
			"constructor"
		],
		keysShim;

	keysShim = function keys(object) {
		var isObject = object !== null && typeof object === 'object',
			isFunction = toString.call(object) === '[object Function]',
			isArguments = isArgs(object),
			theKeys = [];

		if (!isObject && !isFunction && !isArguments) {
			throw new TypeError("Object.keys called on a non-object");
		}

		if (isArguments) {
			forEach(object, function (value) {
				theKeys.push(value);
			});
		} else {
			var name,
				skipProto = hasProtoEnumBug && isFunction;

			for (name in object) {
				if (!(skipProto && name === 'prototype') && has.call(object, name)) {
					theKeys.push(name);
				}
			}
		}

		if (hasDontEnumBug) {
			var ctor = object.constructor,
				skipConstructor = ctor && ctor.prototype === object;

			forEach(dontEnums, function (dontEnum) {
				if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {
					theKeys.push(dontEnum);
				}
			});
		}
		return theKeys;
	};

	module.exports = keysShim;
}());



/***/ }),

/***/ 402421:
/***/ ((module) => {

"use strict";


const codes = {};

function createErrorType(code, message, Base) {
  if (!Base) {
    Base = Error
  }

  function getMessage (arg1, arg2, arg3) {
    if (typeof message === 'string') {
      return message
    } else {
      return message(arg1, arg2, arg3)
    }
  }

  class NodeError extends Base {
    constructor (arg1, arg2, arg3) {
      super(getMessage(arg1, arg2, arg3));
    }
  }

  NodeError.prototype.name = Base.name;
  NodeError.prototype.code = code;

  codes[code] = NodeError;
}

// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
function oneOf(expected, thing) {
  if (Array.isArray(expected)) {
    const len = expected.length;
    expected = expected.map((i) => String(i));
    if (len > 2) {
      return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
             expected[len - 1];
    } else if (len === 2) {
      return `one of ${thing} ${expected[0]} or ${expected[1]}`;
    } else {
      return `of ${thing} ${expected[0]}`;
    }
  } else {
    return `of ${thing} ${String(expected)}`;
  }
}

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
function startsWith(str, search, pos) {
	return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
}

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
function endsWith(str, search, this_len) {
	if (this_len === undefined || this_len > str.length) {
		this_len = str.length;
	}
	return str.substring(this_len - search.length, this_len) === search;
}

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
function includes(str, search, start) {
  if (typeof start !== 'number') {
    start = 0;
  }

  if (start + search.length > str.length) {
    return false;
  } else {
    return str.indexOf(search, start) !== -1;
  }
}

createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
  return 'The value "' + value + '" is invalid for option "' + name + '"'
}, TypeError);
createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
  // determiner: 'must be' or 'must not be'
  let determiner;
  if (typeof expected === 'string' && startsWith(expected, 'not ')) {
    determiner = 'must not be';
    expected = expected.replace(/^not /, '');
  } else {
    determiner = 'must be';
  }

  let msg;
  if (endsWith(name, ' argument')) {
    // For cases like 'first argument'
    msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
  } else {
    const type = includes(name, '.') ? 'property' : 'argument';
    msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
  }

  msg += `. Received type ${typeof actual}`;
  return msg;
}, TypeError);
createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
  return 'The ' + name + ' method is not implemented'
});
createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
createErrorType('ERR_STREAM_DESTROYED', function (name) {
  return 'Cannot call ' + name + ' after a stream was destroyed';
});
createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
  return 'Unknown encoding: ' + arg
}, TypeError);
createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');

module.exports.q = codes;


/***/ }),

/***/ 202625:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.

/*<replacement>*/

var objectKeys = Object.keys || function (obj) {
  var keys = [];

  for (var key in obj) {
    keys.push(key);
  }

  return keys;
};
/*</replacement>*/


module.exports = Duplex;

var Readable = __webpack_require__(126298);

var Writable = __webpack_require__(847576);

__webpack_require__(394378)(Duplex, Readable);

{
  // Allow the keys array to be GC'ed.
  var keys = objectKeys(Writable.prototype);

  for (var v = 0; v < keys.length; v++) {
    var method = keys[v];
    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  }
}

function Duplex(options) {
  if (!(this instanceof Duplex)) return new Duplex(options);
  Readable.call(this, options);
  Writable.call(this, options);
  this.allowHalfOpen = true;

  if (options) {
    if (options.readable === false) this.readable = false;
    if (options.writable === false) this.writable = false;

    if (options.allowHalfOpen === false) {
      this.allowHalfOpen = false;
      this.once('end', onend);
    }
  }
}

Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState.highWaterMark;
  }
});
Object.defineProperty(Duplex.prototype, 'writableBuffer', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState && this._writableState.getBuffer();
  }
});
Object.defineProperty(Duplex.prototype, 'writableLength', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState.length;
  }
}); // the no-half-open enforcer

function onend() {
  // If the writable side ended, then we're ok.
  if (this._writableState.ended) return; // no more data can be written.
  // But allow more writes to happen in this tick.

  process.nextTick(onEndNT, this);
}

function onEndNT(self) {
  self.end();
}

Object.defineProperty(Duplex.prototype, 'destroyed', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    if (this._readableState === undefined || this._writableState === undefined) {
      return false;
    }

    return this._readableState.destroyed && this._writableState.destroyed;
  },
  set: function set(value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (this._readableState === undefined || this._writableState === undefined) {
      return;
    } // backward compatibility, the user is explicitly
    // managing destroyed


    this._readableState.destroyed = value;
    this._writableState.destroyed = value;
  }
});

/***/ }),

/***/ 705380:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.


module.exports = PassThrough;

var Transform = __webpack_require__(837595);

__webpack_require__(394378)(PassThrough, Transform);

function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options);
  Transform.call(this, options);
}

PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk);
};

/***/ }),

/***/ 126298:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.


module.exports = Readable;
/*<replacement>*/

var Duplex;
/*</replacement>*/

Readable.ReadableState = ReadableState;
/*<replacement>*/

var EE = __webpack_require__(128614).EventEmitter;

var EElistenerCount = function EElistenerCount(emitter, type) {
  return emitter.listeners(type).length;
};
/*</replacement>*/

/*<replacement>*/


var Stream = __webpack_require__(647993);
/*</replacement>*/


var Buffer = __webpack_require__(764293).Buffer;

var OurUint8Array = global.Uint8Array || function () {};

function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}

function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
/*<replacement>*/


var debugUtil = __webpack_require__(431669);

var debug;

if (debugUtil && debugUtil.debuglog) {
  debug = debugUtil.debuglog('stream');
} else {
  debug = function debug() {};
}
/*</replacement>*/


var BufferList = __webpack_require__(299657);

var destroyImpl = __webpack_require__(729161);

var _require = __webpack_require__(249462),
    getHighWaterMark = _require.getHighWaterMark;

var _require$codes = __webpack_require__(402421)/* .codes */ .q,
    ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
    ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
    ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.


var StringDecoder;
var createReadableStreamAsyncIterator;
var from;

__webpack_require__(394378)(Readable, Stream);

var errorOrDestroy = destroyImpl.errorOrDestroy;
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];

function prependListener(emitter, event, fn) {
  // Sadly this is not cacheable as some libraries bundle their own
  // event emitter implementation with them.
  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any
  // userland ones.  NEVER DO THIS. This is here only because this code needs
  // to continue to work with older versions of Node.js that do not include
  // the prependListener() method. The goal is to eventually remove this hack.

  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}

function ReadableState(options, stream, isDuplex) {
  Duplex = Duplex || __webpack_require__(202625);
  options = options || {}; // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream.
  // These options can be provided separately as readableXXX and writableXXX.

  if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to
  // make all the buffer merging and length checks go away

  this.objectMode = !!options.objectMode;
  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
  // Note: 0 is a valid value, means "don't call _read preemptively ever"

  this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the
  // linked list can remove elements from the beginning faster than
  // array.shift()

  this.buffer = new BufferList();
  this.length = 0;
  this.pipes = null;
  this.pipesCount = 0;
  this.flowing = null;
  this.ended = false;
  this.endEmitted = false;
  this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted
  // immediately, or on a later tick.  We set this to true at first, because
  // any actions that shouldn't happen until "later" should generally also
  // not happen before the first read call.

  this.sync = true; // whenever we return null, then we set a flag to say
  // that we're awaiting a 'readable' event emission.

  this.needReadable = false;
  this.emittedReadable = false;
  this.readableListening = false;
  this.resumeScheduled = false;
  this.paused = true; // Should close be emitted on destroy. Defaults to true.

  this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')

  this.autoDestroy = !!options.autoDestroy; // has it been destroyed

  this.destroyed = false; // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.

  this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s

  this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled

  this.readingMore = false;
  this.decoder = null;
  this.encoding = null;

  if (options.encoding) {
    if (!StringDecoder) StringDecoder = __webpack_require__(626780)/* .StringDecoder */ .s;
    this.decoder = new StringDecoder(options.encoding);
    this.encoding = options.encoding;
  }
}

function Readable(options) {
  Duplex = Duplex || __webpack_require__(202625);
  if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside
  // the ReadableState constructor, at least with V8 6.5

  var isDuplex = this instanceof Duplex;
  this._readableState = new ReadableState(options, this, isDuplex); // legacy

  this.readable = true;

  if (options) {
    if (typeof options.read === 'function') this._read = options.read;
    if (typeof options.destroy === 'function') this._destroy = options.destroy;
  }

  Stream.call(this);
}

Object.defineProperty(Readable.prototype, 'destroyed', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    if (this._readableState === undefined) {
      return false;
    }

    return this._readableState.destroyed;
  },
  set: function set(value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._readableState) {
      return;
    } // backward compatibility, the user is explicitly
    // managing destroyed


    this._readableState.destroyed = value;
  }
});
Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;

Readable.prototype._destroy = function (err, cb) {
  cb(err);
}; // Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.


Readable.prototype.push = function (chunk, encoding) {
  var state = this._readableState;
  var skipChunkCheck;

  if (!state.objectMode) {
    if (typeof chunk === 'string') {
      encoding = encoding || state.defaultEncoding;

      if (encoding !== state.encoding) {
        chunk = Buffer.from(chunk, encoding);
        encoding = '';
      }

      skipChunkCheck = true;
    }
  } else {
    skipChunkCheck = true;
  }

  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
}; // Unshift should *always* be something directly out of read()


Readable.prototype.unshift = function (chunk) {
  return readableAddChunk(this, chunk, null, true, false);
};

function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  debug('readableAddChunk', chunk);
  var state = stream._readableState;

  if (chunk === null) {
    state.reading = false;
    onEofChunk(stream, state);
  } else {
    var er;
    if (!skipChunkCheck) er = chunkInvalid(state, chunk);

    if (er) {
      errorOrDestroy(stream, er);
    } else if (state.objectMode || chunk && chunk.length > 0) {
      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
        chunk = _uint8ArrayToBuffer(chunk);
      }

      if (addToFront) {
        if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
      } else if (state.ended) {
        errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
      } else if (state.destroyed) {
        return false;
      } else {
        state.reading = false;

        if (state.decoder && !encoding) {
          chunk = state.decoder.write(chunk);
          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
        } else {
          addChunk(stream, state, chunk, false);
        }
      }
    } else if (!addToFront) {
      state.reading = false;
      maybeReadMore(stream, state);
    }
  } // We can push more data if we are below the highWaterMark.
  // Also, if we have no data yet, we can stand some more bytes.
  // This is to work around cases where hwm=0, such as the repl.


  return !state.ended && (state.length < state.highWaterMark || state.length === 0);
}

function addChunk(stream, state, chunk, addToFront) {
  if (state.flowing && state.length === 0 && !state.sync) {
    state.awaitDrain = 0;
    stream.emit('data', chunk);
  } else {
    // update the buffer info.
    state.length += state.objectMode ? 1 : chunk.length;
    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
    if (state.needReadable) emitReadable(stream);
  }

  maybeReadMore(stream, state);
}

function chunkInvalid(state, chunk) {
  var er;

  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
    er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);
  }

  return er;
}

Readable.prototype.isPaused = function () {
  return this._readableState.flowing === false;
}; // backwards compatibility.


Readable.prototype.setEncoding = function (enc) {
  if (!StringDecoder) StringDecoder = __webpack_require__(626780)/* .StringDecoder */ .s;
  var decoder = new StringDecoder(enc);
  this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8

  this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:

  var p = this._readableState.buffer.head;
  var content = '';

  while (p !== null) {
    content += decoder.write(p.data);
    p = p.next;
  }

  this._readableState.buffer.clear();

  if (content !== '') this._readableState.buffer.push(content);
  this._readableState.length = content.length;
  return this;
}; // Don't raise the hwm > 1GB


var MAX_HWM = 0x40000000;

function computeNewHighWaterMark(n) {
  if (n >= MAX_HWM) {
    // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
    n = MAX_HWM;
  } else {
    // Get the next highest power of 2 to prevent increasing hwm excessively in
    // tiny amounts
    n--;
    n |= n >>> 1;
    n |= n >>> 2;
    n |= n >>> 4;
    n |= n >>> 8;
    n |= n >>> 16;
    n++;
  }

  return n;
} // This function is designed to be inlinable, so please take care when making
// changes to the function body.


function howMuchToRead(n, state) {
  if (n <= 0 || state.length === 0 && state.ended) return 0;
  if (state.objectMode) return 1;

  if (n !== n) {
    // Only flow one buffer at a time
    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  } // If we're asking for more than the current hwm, then raise the hwm.


  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  if (n <= state.length) return n; // Don't have enough

  if (!state.ended) {
    state.needReadable = true;
    return 0;
  }

  return state.length;
} // you can override either this method, or the async _read(n) below.


Readable.prototype.read = function (n) {
  debug('read', n);
  n = parseInt(n, 10);
  var state = this._readableState;
  var nOrig = n;
  if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
  // already have a bunch of data in the buffer, then just trigger
  // the 'readable' event and move on.

  if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
    debug('read: emitReadable', state.length, state.ended);
    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
    return null;
  }

  n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.

  if (n === 0 && state.ended) {
    if (state.length === 0) endReadable(this);
    return null;
  } // All the actual chunk generation logic needs to be
  // *below* the call to _read.  The reason is that in certain
  // synthetic stream cases, such as passthrough streams, _read
  // may be a completely synchronous operation which may change
  // the state of the read buffer, providing enough data when
  // before there was *not* enough.
  //
  // So, the steps are:
  // 1. Figure out what the state of things will be after we do
  // a read from the buffer.
  //
  // 2. If that resulting state will trigger a _read, then call _read.
  // Note that this may be asynchronous, or synchronous.  Yes, it is
  // deeply ugly to write APIs this way, but that still doesn't mean
  // that the Readable class should behave improperly, as streams are
  // designed to be sync/async agnostic.
  // Take note if the _read call is sync or async (ie, if the read call
  // has returned yet), so that we know whether or not it's safe to emit
  // 'readable' etc.
  //
  // 3. Actually pull the requested chunks out of the buffer and return.
  // if we need a readable event, then we need to do some reading.


  var doRead = state.needReadable;
  debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some

  if (state.length === 0 || state.length - n < state.highWaterMark) {
    doRead = true;
    debug('length less than watermark', doRead);
  } // however, if we've ended, then there's no point, and if we're already
  // reading, then it's unnecessary.


  if (state.ended || state.reading) {
    doRead = false;
    debug('reading or ended', doRead);
  } else if (doRead) {
    debug('do read');
    state.reading = true;
    state.sync = true; // if the length is currently zero, then we *need* a readable event.

    if (state.length === 0) state.needReadable = true; // call internal read method

    this._read(state.highWaterMark);

    state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
    // and we need to re-evaluate how much data we can return to the user.

    if (!state.reading) n = howMuchToRead(nOrig, state);
  }

  var ret;
  if (n > 0) ret = fromList(n, state);else ret = null;

  if (ret === null) {
    state.needReadable = state.length <= state.highWaterMark;
    n = 0;
  } else {
    state.length -= n;
    state.awaitDrain = 0;
  }

  if (state.length === 0) {
    // If we have nothing in the buffer, then we want to know
    // as soon as we *do* get something into the buffer.
    if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.

    if (nOrig !== n && state.ended) endReadable(this);
  }

  if (ret !== null) this.emit('data', ret);
  return ret;
};

function onEofChunk(stream, state) {
  debug('onEofChunk');
  if (state.ended) return;

  if (state.decoder) {
    var chunk = state.decoder.end();

    if (chunk && chunk.length) {
      state.buffer.push(chunk);
      state.length += state.objectMode ? 1 : chunk.length;
    }
  }

  state.ended = true;

  if (state.sync) {
    // if we are sync, wait until next tick to emit the data.
    // Otherwise we risk emitting data in the flow()
    // the readable code triggers during a read() call
    emitReadable(stream);
  } else {
    // emit 'readable' now to make sure it gets picked up.
    state.needReadable = false;

    if (!state.emittedReadable) {
      state.emittedReadable = true;
      emitReadable_(stream);
    }
  }
} // Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow.  This way, it might trigger
// a nextTick recursion warning, but that's not so bad.


function emitReadable(stream) {
  var state = stream._readableState;
  debug('emitReadable', state.needReadable, state.emittedReadable);
  state.needReadable = false;

  if (!state.emittedReadable) {
    debug('emitReadable', state.flowing);
    state.emittedReadable = true;
    process.nextTick(emitReadable_, stream);
  }
}

function emitReadable_(stream) {
  var state = stream._readableState;
  debug('emitReadable_', state.destroyed, state.length, state.ended);

  if (!state.destroyed && (state.length || state.ended)) {
    stream.emit('readable');
    state.emittedReadable = false;
  } // The stream needs another readable event if
  // 1. It is not flowing, as the flow mechanism will take
  //    care of it.
  // 2. It is not ended.
  // 3. It is below the highWaterMark, so we can schedule
  //    another readable later.


  state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
  flow(stream);
} // at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data.  that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.


function maybeReadMore(stream, state) {
  if (!state.readingMore) {
    state.readingMore = true;
    process.nextTick(maybeReadMore_, stream, state);
  }
}

function maybeReadMore_(stream, state) {
  // Attempt to read more data if we should.
  //
  // The conditions for reading more data are (one of):
  // - Not enough data buffered (state.length < state.highWaterMark). The loop
  //   is responsible for filling the buffer with enough data if such data
  //   is available. If highWaterMark is 0 and we are not in the flowing mode
  //   we should _not_ attempt to buffer any extra data. We'll get more data
  //   when the stream consumer calls read() instead.
  // - No data in the buffer, and the stream is in flowing mode. In this mode
  //   the loop below is responsible for ensuring read() is called. Failing to
  //   call read here would abort the flow and there's no other mechanism for
  //   continuing the flow if the stream consumer has just subscribed to the
  //   'data' event.
  //
  // In addition to the above conditions to keep reading data, the following
  // conditions prevent the data from being read:
  // - The stream has ended (state.ended).
  // - There is already a pending 'read' operation (state.reading). This is a
  //   case where the the stream has called the implementation defined _read()
  //   method, but they are processing the call asynchronously and have _not_
  //   called push() with new data. In this case we skip performing more
  //   read()s. The execution ends in this method again after the _read() ends
  //   up calling push() with more data.
  while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
    var len = state.length;
    debug('maybeReadMore read 0');
    stream.read(0);
    if (len === state.length) // didn't get any data, stop spinning.
      break;
  }

  state.readingMore = false;
} // abstract method.  to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.


Readable.prototype._read = function (n) {
  errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
};

Readable.prototype.pipe = function (dest, pipeOpts) {
  var src = this;
  var state = this._readableState;

  switch (state.pipesCount) {
    case 0:
      state.pipes = dest;
      break;

    case 1:
      state.pipes = [state.pipes, dest];
      break;

    default:
      state.pipes.push(dest);
      break;
  }

  state.pipesCount += 1;
  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  var endFn = doEnd ? onend : unpipe;
  if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);
  dest.on('unpipe', onunpipe);

  function onunpipe(readable, unpipeInfo) {
    debug('onunpipe');

    if (readable === src) {
      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
        unpipeInfo.hasUnpiped = true;
        cleanup();
      }
    }
  }

  function onend() {
    debug('onend');
    dest.end();
  } // when the dest drains, it reduces the awaitDrain counter
  // on the source.  This would be more elegant with a .once()
  // handler in flow(), but adding and removing repeatedly is
  // too slow.


  var ondrain = pipeOnDrain(src);
  dest.on('drain', ondrain);
  var cleanedUp = false;

  function cleanup() {
    debug('cleanup'); // cleanup event handlers once the pipe is broken

    dest.removeListener('close', onclose);
    dest.removeListener('finish', onfinish);
    dest.removeListener('drain', ondrain);
    dest.removeListener('error', onerror);
    dest.removeListener('unpipe', onunpipe);
    src.removeListener('end', onend);
    src.removeListener('end', unpipe);
    src.removeListener('data', ondata);
    cleanedUp = true; // if the reader is waiting for a drain event from this
    // specific writer, then it would cause it to never start
    // flowing again.
    // So, if this is awaiting a drain, then we just call it now.
    // If we don't know, then assume that we are waiting for one.

    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  }

  src.on('data', ondata);

  function ondata(chunk) {
    debug('ondata');
    var ret = dest.write(chunk);
    debug('dest.write', ret);

    if (ret === false) {
      // If the user unpiped during `dest.write()`, it is possible
      // to get stuck in a permanently paused state if that write
      // also returned false.
      // => Check whether `dest` is still a piping destination.
      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
        debug('false write response, pause', state.awaitDrain);
        state.awaitDrain++;
      }

      src.pause();
    }
  } // if the dest has an error, then stop piping into it.
  // however, don't suppress the throwing behavior for this.


  function onerror(er) {
    debug('onerror', er);
    unpipe();
    dest.removeListener('error', onerror);
    if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);
  } // Make sure our error handler is attached before userland ones.


  prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.

  function onclose() {
    dest.removeListener('finish', onfinish);
    unpipe();
  }

  dest.once('close', onclose);

  function onfinish() {
    debug('onfinish');
    dest.removeListener('close', onclose);
    unpipe();
  }

  dest.once('finish', onfinish);

  function unpipe() {
    debug('unpipe');
    src.unpipe(dest);
  } // tell the dest that it's being piped to


  dest.emit('pipe', src); // start the flow if it hasn't been started already.

  if (!state.flowing) {
    debug('pipe resume');
    src.resume();
  }

  return dest;
};

function pipeOnDrain(src) {
  return function pipeOnDrainFunctionResult() {
    var state = src._readableState;
    debug('pipeOnDrain', state.awaitDrain);
    if (state.awaitDrain) state.awaitDrain--;

    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
      state.flowing = true;
      flow(src);
    }
  };
}

Readable.prototype.unpipe = function (dest) {
  var state = this._readableState;
  var unpipeInfo = {
    hasUnpiped: false
  }; // if we're not piping anywhere, then do nothing.

  if (state.pipesCount === 0) return this; // just one destination.  most common case.

  if (state.pipesCount === 1) {
    // passed in one, but it's not the right one.
    if (dest && dest !== state.pipes) return this;
    if (!dest) dest = state.pipes; // got a match.

    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;
    if (dest) dest.emit('unpipe', this, unpipeInfo);
    return this;
  } // slow case. multiple pipe destinations.


  if (!dest) {
    // remove all.
    var dests = state.pipes;
    var len = state.pipesCount;
    state.pipes = null;
    state.pipesCount = 0;
    state.flowing = false;

    for (var i = 0; i < len; i++) {
      dests[i].emit('unpipe', this, {
        hasUnpiped: false
      });
    }

    return this;
  } // try to find the right one.


  var index = indexOf(state.pipes, dest);
  if (index === -1) return this;
  state.pipes.splice(index, 1);
  state.pipesCount -= 1;
  if (state.pipesCount === 1) state.pipes = state.pipes[0];
  dest.emit('unpipe', this, unpipeInfo);
  return this;
}; // set up data events if they are asked for
// Ensure readable listeners eventually get something


Readable.prototype.on = function (ev, fn) {
  var res = Stream.prototype.on.call(this, ev, fn);
  var state = this._readableState;

  if (ev === 'data') {
    // update readableListening so that resume() may be a no-op
    // a few lines down. This is needed to support once('readable').
    state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused

    if (state.flowing !== false) this.resume();
  } else if (ev === 'readable') {
    if (!state.endEmitted && !state.readableListening) {
      state.readableListening = state.needReadable = true;
      state.flowing = false;
      state.emittedReadable = false;
      debug('on readable', state.length, state.reading);

      if (state.length) {
        emitReadable(this);
      } else if (!state.reading) {
        process.nextTick(nReadingNextTick, this);
      }
    }
  }

  return res;
};

Readable.prototype.addListener = Readable.prototype.on;

Readable.prototype.removeListener = function (ev, fn) {
  var res = Stream.prototype.removeListener.call(this, ev, fn);

  if (ev === 'readable') {
    // We need to check if there is someone still listening to
    // readable and reset the state. However this needs to happen
    // after readable has been emitted but before I/O (nextTick) to
    // support once('readable', fn) cycles. This means that calling
    // resume within the same tick will have no
    // effect.
    process.nextTick(updateReadableListening, this);
  }

  return res;
};

Readable.prototype.removeAllListeners = function (ev) {
  var res = Stream.prototype.removeAllListeners.apply(this, arguments);

  if (ev === 'readable' || ev === undefined) {
    // We need to check if there is someone still listening to
    // readable and reset the state. However this needs to happen
    // after readable has been emitted but before I/O (nextTick) to
    // support once('readable', fn) cycles. This means that calling
    // resume within the same tick will have no
    // effect.
    process.nextTick(updateReadableListening, this);
  }

  return res;
};

function updateReadableListening(self) {
  var state = self._readableState;
  state.readableListening = self.listenerCount('readable') > 0;

  if (state.resumeScheduled && !state.paused) {
    // flowing needs to be set to true now, otherwise
    // the upcoming resume will not flow.
    state.flowing = true; // crude way to check if we should resume
  } else if (self.listenerCount('data') > 0) {
    self.resume();
  }
}

function nReadingNextTick(self) {
  debug('readable nexttick read 0');
  self.read(0);
} // pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.


Readable.prototype.resume = function () {
  var state = this._readableState;

  if (!state.flowing) {
    debug('resume'); // we flow only if there is no one listening
    // for readable, but we still have to call
    // resume()

    state.flowing = !state.readableListening;
    resume(this, state);
  }

  state.paused = false;
  return this;
};

function resume(stream, state) {
  if (!state.resumeScheduled) {
    state.resumeScheduled = true;
    process.nextTick(resume_, stream, state);
  }
}

function resume_(stream, state) {
  debug('resume', state.reading);

  if (!state.reading) {
    stream.read(0);
  }

  state.resumeScheduled = false;
  stream.emit('resume');
  flow(stream);
  if (state.flowing && !state.reading) stream.read(0);
}

Readable.prototype.pause = function () {
  debug('call pause flowing=%j', this._readableState.flowing);

  if (this._readableState.flowing !== false) {
    debug('pause');
    this._readableState.flowing = false;
    this.emit('pause');
  }

  this._readableState.paused = true;
  return this;
};

function flow(stream) {
  var state = stream._readableState;
  debug('flow', state.flowing);

  while (state.flowing && stream.read() !== null) {
    ;
  }
} // wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.


Readable.prototype.wrap = function (stream) {
  var _this = this;

  var state = this._readableState;
  var paused = false;
  stream.on('end', function () {
    debug('wrapped end');

    if (state.decoder && !state.ended) {
      var chunk = state.decoder.end();
      if (chunk && chunk.length) _this.push(chunk);
    }

    _this.push(null);
  });
  stream.on('data', function (chunk) {
    debug('wrapped data');
    if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode

    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;

    var ret = _this.push(chunk);

    if (!ret) {
      paused = true;
      stream.pause();
    }
  }); // proxy all the other methods.
  // important when wrapping filters and duplexes.

  for (var i in stream) {
    if (this[i] === undefined && typeof stream[i] === 'function') {
      this[i] = function methodWrap(method) {
        return function methodWrapReturnFunction() {
          return stream[method].apply(stream, arguments);
        };
      }(i);
    }
  } // proxy certain important events.


  for (var n = 0; n < kProxyEvents.length; n++) {
    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  } // when we try to consume some more bytes, simply unpause the
  // underlying stream.


  this._read = function (n) {
    debug('wrapped _read', n);

    if (paused) {
      paused = false;
      stream.resume();
    }
  };

  return this;
};

if (typeof Symbol === 'function') {
  Readable.prototype[Symbol.asyncIterator] = function () {
    if (createReadableStreamAsyncIterator === undefined) {
      createReadableStreamAsyncIterator = __webpack_require__(465780);
    }

    return createReadableStreamAsyncIterator(this);
  };
}

Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._readableState.highWaterMark;
  }
});
Object.defineProperty(Readable.prototype, 'readableBuffer', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._readableState && this._readableState.buffer;
  }
});
Object.defineProperty(Readable.prototype, 'readableFlowing', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._readableState.flowing;
  },
  set: function set(state) {
    if (this._readableState) {
      this._readableState.flowing = state;
    }
  }
}); // exposed for testing purposes only.

Readable._fromList = fromList;
Object.defineProperty(Readable.prototype, 'readableLength', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._readableState.length;
  }
}); // Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.

function fromList(n, state) {
  // nothing buffered
  if (state.length === 0) return null;
  var ret;
  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
    // read it all, truncate the list
    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);
    state.buffer.clear();
  } else {
    // read part of list
    ret = state.buffer.consume(n, state.decoder);
  }
  return ret;
}

function endReadable(stream) {
  var state = stream._readableState;
  debug('endReadable', state.endEmitted);

  if (!state.endEmitted) {
    state.ended = true;
    process.nextTick(endReadableNT, state, stream);
  }
}

function endReadableNT(state, stream) {
  debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.

  if (!state.endEmitted && state.length === 0) {
    state.endEmitted = true;
    stream.readable = false;
    stream.emit('end');

    if (state.autoDestroy) {
      // In case of duplex streams we need a way to detect
      // if the writable side is ready for autoDestroy as well
      var wState = stream._writableState;

      if (!wState || wState.autoDestroy && wState.finished) {
        stream.destroy();
      }
    }
  }
}

if (typeof Symbol === 'function') {
  Readable.from = function (iterable, opts) {
    if (from === undefined) {
      from = __webpack_require__(356227);
    }

    return from(Readable, iterable, opts);
  };
}

function indexOf(xs, x) {
  for (var i = 0, l = xs.length; i < l; i++) {
    if (xs[i] === x) return i;
  }

  return -1;
}

/***/ }),

/***/ 837595:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a transform stream is a readable/writable stream where you do
// something with the data.  Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored.  (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation.  For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes.  When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up.  When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer.  When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks.  If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk.  However,
// a pathological inflate type of transform can cause excessive buffering
// here.  For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output.  In this case, you could write a very small
// amount of input, and end up with a very large amount of output.  In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform.  A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.


module.exports = Transform;

var _require$codes = __webpack_require__(402421)/* .codes */ .q,
    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
    ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
    ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;

var Duplex = __webpack_require__(202625);

__webpack_require__(394378)(Transform, Duplex);

function afterTransform(er, data) {
  var ts = this._transformState;
  ts.transforming = false;
  var cb = ts.writecb;

  if (cb === null) {
    return this.emit('error', new ERR_MULTIPLE_CALLBACK());
  }

  ts.writechunk = null;
  ts.writecb = null;
  if (data != null) // single equals check for both `null` and `undefined`
    this.push(data);
  cb(er);
  var rs = this._readableState;
  rs.reading = false;

  if (rs.needReadable || rs.length < rs.highWaterMark) {
    this._read(rs.highWaterMark);
  }
}

function Transform(options) {
  if (!(this instanceof Transform)) return new Transform(options);
  Duplex.call(this, options);
  this._transformState = {
    afterTransform: afterTransform.bind(this),
    needTransform: false,
    transforming: false,
    writecb: null,
    writechunk: null,
    writeencoding: null
  }; // start out asking for a readable event once data is transformed.

  this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
  // that Readable wants before the first _read call, so unset the
  // sync guard flag.

  this._readableState.sync = false;

  if (options) {
    if (typeof options.transform === 'function') this._transform = options.transform;
    if (typeof options.flush === 'function') this._flush = options.flush;
  } // When the writable side finishes, then flush out anything remaining.


  this.on('prefinish', prefinish);
}

function prefinish() {
  var _this = this;

  if (typeof this._flush === 'function' && !this._readableState.destroyed) {
    this._flush(function (er, data) {
      done(_this, er, data);
    });
  } else {
    done(this, null, null);
  }
}

Transform.prototype.push = function (chunk, encoding) {
  this._transformState.needTransform = false;
  return Duplex.prototype.push.call(this, chunk, encoding);
}; // This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side.  You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk.  If you pass
// an error, then that'll put the hurt on the whole operation.  If you
// never call cb(), then you'll never get another chunk.


Transform.prototype._transform = function (chunk, encoding, cb) {
  cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
};

Transform.prototype._write = function (chunk, encoding, cb) {
  var ts = this._transformState;
  ts.writecb = cb;
  ts.writechunk = chunk;
  ts.writeencoding = encoding;

  if (!ts.transforming) {
    var rs = this._readableState;
    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  }
}; // Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.


Transform.prototype._read = function (n) {
  var ts = this._transformState;

  if (ts.writechunk !== null && !ts.transforming) {
    ts.transforming = true;

    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  } else {
    // mark that we need a transform, so that any data that comes in
    // will get processed, now that we've asked for it.
    ts.needTransform = true;
  }
};

Transform.prototype._destroy = function (err, cb) {
  Duplex.prototype._destroy.call(this, err, function (err2) {
    cb(err2);
  });
};

function done(stream, er, data) {
  if (er) return stream.emit('error', er);
  if (data != null) // single equals check for both `null` and `undefined`
    stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
  // if there's nothing in the write buffer, then that means
  // that nothing more will ever be provided

  if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
  if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
  return stream.push(null);
}

/***/ }),

/***/ 847576:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.


module.exports = Writable;
/* <replacement> */

function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
  this.next = null;
} // It seems a linked list but it is not
// there will be only 2 of these for each stream


function CorkedRequest(state) {
  var _this = this;

  this.next = null;
  this.entry = null;

  this.finish = function () {
    onCorkedFinish(_this, state);
  };
}
/* </replacement> */

/*<replacement>*/


var Duplex;
/*</replacement>*/

Writable.WritableState = WritableState;
/*<replacement>*/

var internalUtil = {
  deprecate: __webpack_require__(741159)
};
/*</replacement>*/

/*<replacement>*/

var Stream = __webpack_require__(647993);
/*</replacement>*/


var Buffer = __webpack_require__(764293).Buffer;

var OurUint8Array = global.Uint8Array || function () {};

function _uint8ArrayToBuffer(chunk) {
  return Buffer.from(chunk);
}

function _isUint8Array(obj) {
  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}

var destroyImpl = __webpack_require__(729161);

var _require = __webpack_require__(249462),
    getHighWaterMark = _require.getHighWaterMark;

var _require$codes = __webpack_require__(402421)/* .codes */ .q,
    ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
    ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
    ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
    ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
    ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;

var errorOrDestroy = destroyImpl.errorOrDestroy;

__webpack_require__(394378)(Writable, Stream);

function nop() {}

function WritableState(options, stream, isDuplex) {
  Duplex = Duplex || __webpack_require__(202625);
  options = options || {}; // Duplex streams are both readable and writable, but share
  // the same options object.
  // However, some cases require setting options to different
  // values for the readable and the writable sides of the duplex stream,
  // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.

  if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
  // contains buffers or objects.

  this.objectMode = !!options.objectMode;
  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
  // Note: 0 is a valid value, means that we always return false if
  // the entire buffer is not flushed immediately on write()

  this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called

  this.finalCalled = false; // drain event flag.

  this.needDrain = false; // at the start of calling end()

  this.ending = false; // when end() has been called, and returned

  this.ended = false; // when 'finish' is emitted

  this.finished = false; // has it been destroyed

  this.destroyed = false; // should we decode strings into buffers before passing to _write?
  // this is here so that some node-core streams can optimize string
  // handling at a lower level.

  var noDecode = options.decodeStrings === false;
  this.decodeStrings = !noDecode; // Crypto is kind of old and crusty.  Historically, its default string
  // encoding is 'binary' so we have to make this configurable.
  // Everything else in the universe uses 'utf8', though.

  this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
  // of how much we're waiting to get pushed to some underlying
  // socket or file.

  this.length = 0; // a flag to see when we're in the middle of a write.

  this.writing = false; // when true all writes will be buffered until .uncork() call

  this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
  // or on a later tick.  We set this to true at first, because any
  // actions that shouldn't happen until "later" should generally also
  // not happen before the first write call.

  this.sync = true; // a flag to know if we're processing previously buffered items, which
  // may call the _write() callback in the same tick, so that we don't
  // end up in an overlapped onwrite situation.

  this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)

  this.onwrite = function (er) {
    onwrite(stream, er);
  }; // the callback that the user supplies to write(chunk,encoding,cb)


  this.writecb = null; // the amount that is being written when _write is called.

  this.writelen = 0;
  this.bufferedRequest = null;
  this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
  // this must be 0 before 'finish' can be emitted

  this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
  // This is relevant for synchronous Transform streams

  this.prefinished = false; // True if the error was already emitted and should not be thrown again

  this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.

  this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')

  this.autoDestroy = !!options.autoDestroy; // count buffered requests

  this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
  // one allocated and free to use, and we maintain at most two

  this.corkedRequestsFree = new CorkedRequest(this);
}

WritableState.prototype.getBuffer = function getBuffer() {
  var current = this.bufferedRequest;
  var out = [];

  while (current) {
    out.push(current);
    current = current.next;
  }

  return out;
};

(function () {
  try {
    Object.defineProperty(WritableState.prototype, 'buffer', {
      get: internalUtil.deprecate(function writableStateBufferGetter() {
        return this.getBuffer();
      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
    });
  } catch (_) {}
})(); // Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.


var realHasInstance;

if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  realHasInstance = Function.prototype[Symbol.hasInstance];
  Object.defineProperty(Writable, Symbol.hasInstance, {
    value: function value(object) {
      if (realHasInstance.call(this, object)) return true;
      if (this !== Writable) return false;
      return object && object._writableState instanceof WritableState;
    }
  });
} else {
  realHasInstance = function realHasInstance(object) {
    return object instanceof this;
  };
}

function Writable(options) {
  Duplex = Duplex || __webpack_require__(202625); // Writable ctor is applied to Duplexes, too.
  // `realHasInstance` is necessary because using plain `instanceof`
  // would return false, as no `_writableState` property is attached.
  // Trying to use the custom `instanceof` for Writable here will also break the
  // Node.js LazyTransform implementation, which has a non-trivial getter for
  // `_writableState` that would lead to infinite recursion.
  // Checking for a Stream.Duplex instance is faster here instead of inside
  // the WritableState constructor, at least with V8 6.5

  var isDuplex = this instanceof Duplex;
  if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
  this._writableState = new WritableState(options, this, isDuplex); // legacy.

  this.writable = true;

  if (options) {
    if (typeof options.write === 'function') this._write = options.write;
    if (typeof options.writev === 'function') this._writev = options.writev;
    if (typeof options.destroy === 'function') this._destroy = options.destroy;
    if (typeof options.final === 'function') this._final = options.final;
  }

  Stream.call(this);
} // Otherwise people can pipe Writable streams, which is just wrong.


Writable.prototype.pipe = function () {
  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
};

function writeAfterEnd(stream, cb) {
  var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb

  errorOrDestroy(stream, er);
  process.nextTick(cb, er);
} // Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.


function validChunk(stream, state, chunk, cb) {
  var er;

  if (chunk === null) {
    er = new ERR_STREAM_NULL_VALUES();
  } else if (typeof chunk !== 'string' && !state.objectMode) {
    er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
  }

  if (er) {
    errorOrDestroy(stream, er);
    process.nextTick(cb, er);
    return false;
  }

  return true;
}

Writable.prototype.write = function (chunk, encoding, cb) {
  var state = this._writableState;
  var ret = false;

  var isBuf = !state.objectMode && _isUint8Array(chunk);

  if (isBuf && !Buffer.isBuffer(chunk)) {
    chunk = _uint8ArrayToBuffer(chunk);
  }

  if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  if (typeof cb !== 'function') cb = nop;
  if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
    state.pendingcb++;
    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  }
  return ret;
};

Writable.prototype.cork = function () {
  this._writableState.corked++;
};

Writable.prototype.uncork = function () {
  var state = this._writableState;

  if (state.corked) {
    state.corked--;
    if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  }
};

Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  // node::ParseEncoding() requires lower case.
  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
  this._writableState.defaultEncoding = encoding;
  return this;
};

Object.defineProperty(Writable.prototype, 'writableBuffer', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState && this._writableState.getBuffer();
  }
});

function decodeChunk(state, chunk, encoding) {
  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
    chunk = Buffer.from(chunk, encoding);
  }

  return chunk;
}

Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState.highWaterMark;
  }
}); // if we're already writing something, then just put this
// in the queue, and wait our turn.  Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.

function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  if (!isBuf) {
    var newChunk = decodeChunk(state, chunk, encoding);

    if (chunk !== newChunk) {
      isBuf = true;
      encoding = 'buffer';
      chunk = newChunk;
    }
  }

  var len = state.objectMode ? 1 : chunk.length;
  state.length += len;
  var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.

  if (!ret) state.needDrain = true;

  if (state.writing || state.corked) {
    var last = state.lastBufferedRequest;
    state.lastBufferedRequest = {
      chunk: chunk,
      encoding: encoding,
      isBuf: isBuf,
      callback: cb,
      next: null
    };

    if (last) {
      last.next = state.lastBufferedRequest;
    } else {
      state.bufferedRequest = state.lastBufferedRequest;
    }

    state.bufferedRequestCount += 1;
  } else {
    doWrite(stream, state, false, len, chunk, encoding, cb);
  }

  return ret;
}

function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  state.writelen = len;
  state.writecb = cb;
  state.writing = true;
  state.sync = true;
  if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  state.sync = false;
}

function onwriteError(stream, state, sync, er, cb) {
  --state.pendingcb;

  if (sync) {
    // defer the callback if we are being called synchronously
    // to avoid piling up things on the stack
    process.nextTick(cb, er); // this can emit finish, and it will always happen
    // after error

    process.nextTick(finishMaybe, stream, state);
    stream._writableState.errorEmitted = true;
    errorOrDestroy(stream, er);
  } else {
    // the caller expect this to happen before if
    // it is async
    cb(er);
    stream._writableState.errorEmitted = true;
    errorOrDestroy(stream, er); // this can emit finish, but finish must
    // always follow error

    finishMaybe(stream, state);
  }
}

function onwriteStateUpdate(state) {
  state.writing = false;
  state.writecb = null;
  state.length -= state.writelen;
  state.writelen = 0;
}

function onwrite(stream, er) {
  var state = stream._writableState;
  var sync = state.sync;
  var cb = state.writecb;
  if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
  onwriteStateUpdate(state);
  if (er) onwriteError(stream, state, sync, er, cb);else {
    // Check if we're actually ready to finish, but don't emit yet
    var finished = needFinish(state) || stream.destroyed;

    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
      clearBuffer(stream, state);
    }

    if (sync) {
      process.nextTick(afterWrite, stream, state, finished, cb);
    } else {
      afterWrite(stream, state, finished, cb);
    }
  }
}

function afterWrite(stream, state, finished, cb) {
  if (!finished) onwriteDrain(stream, state);
  state.pendingcb--;
  cb();
  finishMaybe(stream, state);
} // Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.


function onwriteDrain(stream, state) {
  if (state.length === 0 && state.needDrain) {
    state.needDrain = false;
    stream.emit('drain');
  }
} // if there's something in the buffer waiting, then process it


function clearBuffer(stream, state) {
  state.bufferProcessing = true;
  var entry = state.bufferedRequest;

  if (stream._writev && entry && entry.next) {
    // Fast case, write everything using _writev()
    var l = state.bufferedRequestCount;
    var buffer = new Array(l);
    var holder = state.corkedRequestsFree;
    holder.entry = entry;
    var count = 0;
    var allBuffers = true;

    while (entry) {
      buffer[count] = entry;
      if (!entry.isBuf) allBuffers = false;
      entry = entry.next;
      count += 1;
    }

    buffer.allBuffers = allBuffers;
    doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
    // as the hot path ends with doWrite

    state.pendingcb++;
    state.lastBufferedRequest = null;

    if (holder.next) {
      state.corkedRequestsFree = holder.next;
      holder.next = null;
    } else {
      state.corkedRequestsFree = new CorkedRequest(state);
    }

    state.bufferedRequestCount = 0;
  } else {
    // Slow case, write chunks one-by-one
    while (entry) {
      var chunk = entry.chunk;
      var encoding = entry.encoding;
      var cb = entry.callback;
      var len = state.objectMode ? 1 : chunk.length;
      doWrite(stream, state, false, len, chunk, encoding, cb);
      entry = entry.next;
      state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
      // it means that we need to wait until it does.
      // also, that means that the chunk and cb are currently
      // being processed, so move the buffer counter past them.

      if (state.writing) {
        break;
      }
    }

    if (entry === null) state.lastBufferedRequest = null;
  }

  state.bufferedRequest = entry;
  state.bufferProcessing = false;
}

Writable.prototype._write = function (chunk, encoding, cb) {
  cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));
};

Writable.prototype._writev = null;

Writable.prototype.end = function (chunk, encoding, cb) {
  var state = this._writableState;

  if (typeof chunk === 'function') {
    cb = chunk;
    chunk = null;
    encoding = null;
  } else if (typeof encoding === 'function') {
    cb = encoding;
    encoding = null;
  }

  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks

  if (state.corked) {
    state.corked = 1;
    this.uncork();
  } // ignore unnecessary end() calls.


  if (!state.ending) endWritable(this, state, cb);
  return this;
};

Object.defineProperty(Writable.prototype, 'writableLength', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    return this._writableState.length;
  }
});

function needFinish(state) {
  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}

function callFinal(stream, state) {
  stream._final(function (err) {
    state.pendingcb--;

    if (err) {
      errorOrDestroy(stream, err);
    }

    state.prefinished = true;
    stream.emit('prefinish');
    finishMaybe(stream, state);
  });
}

function prefinish(stream, state) {
  if (!state.prefinished && !state.finalCalled) {
    if (typeof stream._final === 'function' && !state.destroyed) {
      state.pendingcb++;
      state.finalCalled = true;
      process.nextTick(callFinal, stream, state);
    } else {
      state.prefinished = true;
      stream.emit('prefinish');
    }
  }
}

function finishMaybe(stream, state) {
  var need = needFinish(state);

  if (need) {
    prefinish(stream, state);

    if (state.pendingcb === 0) {
      state.finished = true;
      stream.emit('finish');

      if (state.autoDestroy) {
        // In case of duplex streams we need a way to detect
        // if the readable side is ready for autoDestroy as well
        var rState = stream._readableState;

        if (!rState || rState.autoDestroy && rState.endEmitted) {
          stream.destroy();
        }
      }
    }
  }

  return need;
}

function endWritable(stream, state, cb) {
  state.ending = true;
  finishMaybe(stream, state);

  if (cb) {
    if (state.finished) process.nextTick(cb);else stream.once('finish', cb);
  }

  state.ended = true;
  stream.writable = false;
}

function onCorkedFinish(corkReq, state, err) {
  var entry = corkReq.entry;
  corkReq.entry = null;

  while (entry) {
    var cb = entry.callback;
    state.pendingcb--;
    cb(err);
    entry = entry.next;
  } // reuse the free corkReq.


  state.corkedRequestsFree.next = corkReq;
}

Object.defineProperty(Writable.prototype, 'destroyed', {
  // making it explicit this property is not enumerable
  // because otherwise some prototype manipulation in
  // userland will fail
  enumerable: false,
  get: function get() {
    if (this._writableState === undefined) {
      return false;
    }

    return this._writableState.destroyed;
  },
  set: function set(value) {
    // we ignore the value if the stream
    // has not been initialized yet
    if (!this._writableState) {
      return;
    } // backward compatibility, the user is explicitly
    // managing destroyed


    this._writableState.destroyed = value;
  }
});
Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;

Writable.prototype._destroy = function (err, cb) {
  cb(err);
};

/***/ }),

/***/ 465780:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var _Object$setPrototypeO;

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var finished = __webpack_require__(934485);

var kLastResolve = Symbol('lastResolve');
var kLastReject = Symbol('lastReject');
var kError = Symbol('error');
var kEnded = Symbol('ended');
var kLastPromise = Symbol('lastPromise');
var kHandlePromise = Symbol('handlePromise');
var kStream = Symbol('stream');

function createIterResult(value, done) {
  return {
    value: value,
    done: done
  };
}

function readAndResolve(iter) {
  var resolve = iter[kLastResolve];

  if (resolve !== null) {
    var data = iter[kStream].read(); // we defer if data is null
    // we can be expecting either 'end' or
    // 'error'

    if (data !== null) {
      iter[kLastPromise] = null;
      iter[kLastResolve] = null;
      iter[kLastReject] = null;
      resolve(createIterResult(data, false));
    }
  }
}

function onReadable(iter) {
  // we wait for the next tick, because it might
  // emit an error with process.nextTick
  process.nextTick(readAndResolve, iter);
}

function wrapForNext(lastPromise, iter) {
  return function (resolve, reject) {
    lastPromise.then(function () {
      if (iter[kEnded]) {
        resolve(createIterResult(undefined, true));
        return;
      }

      iter[kHandlePromise](resolve, reject);
    }, reject);
  };
}

var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
  get stream() {
    return this[kStream];
  },

  next: function next() {
    var _this = this;

    // if we have detected an error in the meanwhile
    // reject straight away
    var error = this[kError];

    if (error !== null) {
      return Promise.reject(error);
    }

    if (this[kEnded]) {
      return Promise.resolve(createIterResult(undefined, true));
    }

    if (this[kStream].destroyed) {
      // We need to defer via nextTick because if .destroy(err) is
      // called, the error will be emitted via nextTick, and
      // we cannot guarantee that there is no error lingering around
      // waiting to be emitted.
      return new Promise(function (resolve, reject) {
        process.nextTick(function () {
          if (_this[kError]) {
            reject(_this[kError]);
          } else {
            resolve(createIterResult(undefined, true));
          }
        });
      });
    } // if we have multiple next() calls
    // we will wait for the previous Promise to finish
    // this logic is optimized to support for await loops,
    // where next() is only called once at a time


    var lastPromise = this[kLastPromise];
    var promise;

    if (lastPromise) {
      promise = new Promise(wrapForNext(lastPromise, this));
    } else {
      // fast path needed to support multiple this.push()
      // without triggering the next() queue
      var data = this[kStream].read();

      if (data !== null) {
        return Promise.resolve(createIterResult(data, false));
      }

      promise = new Promise(this[kHandlePromise]);
    }

    this[kLastPromise] = promise;
    return promise;
  }
}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
  return this;
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
  var _this2 = this;

  // destroy(err, cb) is a private API
  // we can guarantee we have that here, because we control the
  // Readable class this is attached to
  return new Promise(function (resolve, reject) {
    _this2[kStream].destroy(null, function (err) {
      if (err) {
        reject(err);
        return;
      }

      resolve(createIterResult(undefined, true));
    });
  });
}), _Object$setPrototypeO), AsyncIteratorPrototype);

var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
  var _Object$create;

  var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
    value: stream,
    writable: true
  }), _defineProperty(_Object$create, kLastResolve, {
    value: null,
    writable: true
  }), _defineProperty(_Object$create, kLastReject, {
    value: null,
    writable: true
  }), _defineProperty(_Object$create, kError, {
    value: null,
    writable: true
  }), _defineProperty(_Object$create, kEnded, {
    value: stream._readableState.endEmitted,
    writable: true
  }), _defineProperty(_Object$create, kHandlePromise, {
    value: function value(resolve, reject) {
      var data = iterator[kStream].read();

      if (data) {
        iterator[kLastPromise] = null;
        iterator[kLastResolve] = null;
        iterator[kLastReject] = null;
        resolve(createIterResult(data, false));
      } else {
        iterator[kLastResolve] = resolve;
        iterator[kLastReject] = reject;
      }
    },
    writable: true
  }), _Object$create));
  iterator[kLastPromise] = null;
  finished(stream, function (err) {
    if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
      var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
      // returned by next() and store the error

      if (reject !== null) {
        iterator[kLastPromise] = null;
        iterator[kLastResolve] = null;
        iterator[kLastReject] = null;
        reject(err);
      }

      iterator[kError] = err;
      return;
    }

    var resolve = iterator[kLastResolve];

    if (resolve !== null) {
      iterator[kLastPromise] = null;
      iterator[kLastResolve] = null;
      iterator[kLastReject] = null;
      resolve(createIterResult(undefined, true));
    }

    iterator[kEnded] = true;
  });
  stream.on('readable', onReadable.bind(null, iterator));
  return iterator;
};

module.exports = createReadableStreamAsyncIterator;

/***/ }),

/***/ 299657:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var _require = __webpack_require__(764293),
    Buffer = _require.Buffer;

var _require2 = __webpack_require__(431669),
    inspect = _require2.inspect;

var custom = inspect && inspect.custom || 'inspect';

function copyBuffer(src, target, offset) {
  Buffer.prototype.copy.call(src, target, offset);
}

module.exports =
/*#__PURE__*/
function () {
  function BufferList() {
    _classCallCheck(this, BufferList);

    this.head = null;
    this.tail = null;
    this.length = 0;
  }

  _createClass(BufferList, [{
    key: "push",
    value: function push(v) {
      var entry = {
        data: v,
        next: null
      };
      if (this.length > 0) this.tail.next = entry;else this.head = entry;
      this.tail = entry;
      ++this.length;
    }
  }, {
    key: "unshift",
    value: function unshift(v) {
      var entry = {
        data: v,
        next: this.head
      };
      if (this.length === 0) this.tail = entry;
      this.head = entry;
      ++this.length;
    }
  }, {
    key: "shift",
    value: function shift() {
      if (this.length === 0) return;
      var ret = this.head.data;
      if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
      --this.length;
      return ret;
    }
  }, {
    key: "clear",
    value: function clear() {
      this.head = this.tail = null;
      this.length = 0;
    }
  }, {
    key: "join",
    value: function join(s) {
      if (this.length === 0) return '';
      var p = this.head;
      var ret = '' + p.data;

      while (p = p.next) {
        ret += s + p.data;
      }

      return ret;
    }
  }, {
    key: "concat",
    value: function concat(n) {
      if (this.length === 0) return Buffer.alloc(0);
      var ret = Buffer.allocUnsafe(n >>> 0);
      var p = this.head;
      var i = 0;

      while (p) {
        copyBuffer(p.data, ret, i);
        i += p.data.length;
        p = p.next;
      }

      return ret;
    } // Consumes a specified amount of bytes or characters from the buffered data.

  }, {
    key: "consume",
    value: function consume(n, hasStrings) {
      var ret;

      if (n < this.head.data.length) {
        // `slice` is the same for buffers and strings.
        ret = this.head.data.slice(0, n);
        this.head.data = this.head.data.slice(n);
      } else if (n === this.head.data.length) {
        // First chunk is a perfect match.
        ret = this.shift();
      } else {
        // Result spans more than one buffer.
        ret = hasStrings ? this._getString(n) : this._getBuffer(n);
      }

      return ret;
    }
  }, {
    key: "first",
    value: function first() {
      return this.head.data;
    } // Consumes a specified amount of characters from the buffered data.

  }, {
    key: "_getString",
    value: function _getString(n) {
      var p = this.head;
      var c = 1;
      var ret = p.data;
      n -= ret.length;

      while (p = p.next) {
        var str = p.data;
        var nb = n > str.length ? str.length : n;
        if (nb === str.length) ret += str;else ret += str.slice(0, n);
        n -= nb;

        if (n === 0) {
          if (nb === str.length) {
            ++c;
            if (p.next) this.head = p.next;else this.head = this.tail = null;
          } else {
            this.head = p;
            p.data = str.slice(nb);
          }

          break;
        }

        ++c;
      }

      this.length -= c;
      return ret;
    } // Consumes a specified amount of bytes from the buffered data.

  }, {
    key: "_getBuffer",
    value: function _getBuffer(n) {
      var ret = Buffer.allocUnsafe(n);
      var p = this.head;
      var c = 1;
      p.data.copy(ret);
      n -= p.data.length;

      while (p = p.next) {
        var buf = p.data;
        var nb = n > buf.length ? buf.length : n;
        buf.copy(ret, ret.length - n, 0, nb);
        n -= nb;

        if (n === 0) {
          if (nb === buf.length) {
            ++c;
            if (p.next) this.head = p.next;else this.head = this.tail = null;
          } else {
            this.head = p;
            p.data = buf.slice(nb);
          }

          break;
        }

        ++c;
      }

      this.length -= c;
      return ret;
    } // Make sure the linked list only shows the minimal necessary information.

  }, {
    key: custom,
    value: function value(_, options) {
      return inspect(this, _objectSpread({}, options, {
        // Only inspect one level.
        depth: 0,
        // It should not recurse.
        customInspect: false
      }));
    }
  }]);

  return BufferList;
}();

/***/ }),

/***/ 729161:
/***/ ((module) => {

"use strict";
 // undocumented cb() API, needed for core, not for public API

function destroy(err, cb) {
  var _this = this;

  var readableDestroyed = this._readableState && this._readableState.destroyed;
  var writableDestroyed = this._writableState && this._writableState.destroyed;

  if (readableDestroyed || writableDestroyed) {
    if (cb) {
      cb(err);
    } else if (err) {
      if (!this._writableState) {
        process.nextTick(emitErrorNT, this, err);
      } else if (!this._writableState.errorEmitted) {
        this._writableState.errorEmitted = true;
        process.nextTick(emitErrorNT, this, err);
      }
    }

    return this;
  } // we set destroyed to true before firing error callbacks in order
  // to make it re-entrance safe in case destroy() is called within callbacks


  if (this._readableState) {
    this._readableState.destroyed = true;
  } // if this is a duplex stream mark the writable part as destroyed as well


  if (this._writableState) {
    this._writableState.destroyed = true;
  }

  this._destroy(err || null, function (err) {
    if (!cb && err) {
      if (!_this._writableState) {
        process.nextTick(emitErrorAndCloseNT, _this, err);
      } else if (!_this._writableState.errorEmitted) {
        _this._writableState.errorEmitted = true;
        process.nextTick(emitErrorAndCloseNT, _this, err);
      } else {
        process.nextTick(emitCloseNT, _this);
      }
    } else if (cb) {
      process.nextTick(emitCloseNT, _this);
      cb(err);
    } else {
      process.nextTick(emitCloseNT, _this);
    }
  });

  return this;
}

function emitErrorAndCloseNT(self, err) {
  emitErrorNT(self, err);
  emitCloseNT(self);
}

function emitCloseNT(self) {
  if (self._writableState && !self._writableState.emitClose) return;
  if (self._readableState && !self._readableState.emitClose) return;
  self.emit('close');
}

function undestroy() {
  if (this._readableState) {
    this._readableState.destroyed = false;
    this._readableState.reading = false;
    this._readableState.ended = false;
    this._readableState.endEmitted = false;
  }

  if (this._writableState) {
    this._writableState.destroyed = false;
    this._writableState.ended = false;
    this._writableState.ending = false;
    this._writableState.finalCalled = false;
    this._writableState.prefinished = false;
    this._writableState.finished = false;
    this._writableState.errorEmitted = false;
  }
}

function emitErrorNT(self, err) {
  self.emit('error', err);
}

function errorOrDestroy(stream, err) {
  // We have tests that rely on errors being emitted
  // in the same tick, so changing this is semver major.
  // For now when you opt-in to autoDestroy we allow
  // the error to be emitted nextTick. In a future
  // semver major update we should change the default to this.
  var rState = stream._readableState;
  var wState = stream._writableState;
  if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
}

module.exports = {
  destroy: destroy,
  undestroy: undestroy,
  errorOrDestroy: errorOrDestroy
};

/***/ }),

/***/ 934485:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Ported from https://github.com/mafintosh/end-of-stream with
// permission from the author, Mathias Buus (@mafintosh).


var ERR_STREAM_PREMATURE_CLOSE = __webpack_require__(402421)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE;

function once(callback) {
  var called = false;
  return function () {
    if (called) return;
    called = true;

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    callback.apply(this, args);
  };
}

function noop() {}

function isRequest(stream) {
  return stream.setHeader && typeof stream.abort === 'function';
}

function eos(stream, opts, callback) {
  if (typeof opts === 'function') return eos(stream, null, opts);
  if (!opts) opts = {};
  callback = once(callback || noop);
  var readable = opts.readable || opts.readable !== false && stream.readable;
  var writable = opts.writable || opts.writable !== false && stream.writable;

  var onlegacyfinish = function onlegacyfinish() {
    if (!stream.writable) onfinish();
  };

  var writableEnded = stream._writableState && stream._writableState.finished;

  var onfinish = function onfinish() {
    writable = false;
    writableEnded = true;
    if (!readable) callback.call(stream);
  };

  var readableEnded = stream._readableState && stream._readableState.endEmitted;

  var onend = function onend() {
    readable = false;
    readableEnded = true;
    if (!writable) callback.call(stream);
  };

  var onerror = function onerror(err) {
    callback.call(stream, err);
  };

  var onclose = function onclose() {
    var err;

    if (readable && !readableEnded) {
      if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
      return callback.call(stream, err);
    }

    if (writable && !writableEnded) {
      if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
      return callback.call(stream, err);
    }
  };

  var onrequest = function onrequest() {
    stream.req.on('finish', onfinish);
  };

  if (isRequest(stream)) {
    stream.on('complete', onfinish);
    stream.on('abort', onclose);
    if (stream.req) onrequest();else stream.on('request', onrequest);
  } else if (writable && !stream._writableState) {
    // legacy streams
    stream.on('end', onlegacyfinish);
    stream.on('close', onlegacyfinish);
  }

  stream.on('end', onend);
  stream.on('finish', onfinish);
  if (opts.error !== false) stream.on('error', onerror);
  stream.on('close', onclose);
  return function () {
    stream.removeListener('complete', onfinish);
    stream.removeListener('abort', onclose);
    stream.removeListener('request', onrequest);
    if (stream.req) stream.req.removeListener('finish', onfinish);
    stream.removeListener('end', onlegacyfinish);
    stream.removeListener('close', onlegacyfinish);
    stream.removeListener('finish', onfinish);
    stream.removeListener('end', onend);
    stream.removeListener('error', onerror);
    stream.removeListener('close', onclose);
  };
}

module.exports = eos;

/***/ }),

/***/ 356227:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var ERR_INVALID_ARG_TYPE = __webpack_require__(402421)/* .codes.ERR_INVALID_ARG_TYPE */ .q.ERR_INVALID_ARG_TYPE;

function from(Readable, iterable, opts) {
  var iterator;

  if (iterable && typeof iterable.next === 'function') {
    iterator = iterable;
  } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);

  var readable = new Readable(_objectSpread({
    objectMode: true
  }, opts)); // Reading boolean to protect against _read
  // being called before last iteration completion.

  var reading = false;

  readable._read = function () {
    if (!reading) {
      reading = true;
      next();
    }
  };

  function next() {
    return _next2.apply(this, arguments);
  }

  function _next2() {
    _next2 = _asyncToGenerator(function* () {
      try {
        var _ref = yield iterator.next(),
            value = _ref.value,
            done = _ref.done;

        if (done) {
          readable.push(null);
        } else if (readable.push((yield value))) {
          next();
        } else {
          reading = false;
        }
      } catch (err) {
        readable.destroy(err);
      }
    });
    return _next2.apply(this, arguments);
  }

  return readable;
}

module.exports = from;

/***/ }),

/***/ 382997:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
// Ported from https://github.com/mafintosh/pump with
// permission from the author, Mathias Buus (@mafintosh).


var eos;

function once(callback) {
  var called = false;
  return function () {
    if (called) return;
    called = true;
    callback.apply(void 0, arguments);
  };
}

var _require$codes = __webpack_require__(402421)/* .codes */ .q,
    ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;

function noop(err) {
  // Rethrow the error if it exists to avoid swallowing it
  if (err) throw err;
}

function isRequest(stream) {
  return stream.setHeader && typeof stream.abort === 'function';
}

function destroyer(stream, reading, writing, callback) {
  callback = once(callback);
  var closed = false;
  stream.on('close', function () {
    closed = true;
  });
  if (eos === undefined) eos = __webpack_require__(934485);
  eos(stream, {
    readable: reading,
    writable: writing
  }, function (err) {
    if (err) return callback(err);
    closed = true;
    callback();
  });
  var destroyed = false;
  return function (err) {
    if (closed) return;
    if (destroyed) return;
    destroyed = true; // request.destroy just do .end - .abort is what we want

    if (isRequest(stream)) return stream.abort();
    if (typeof stream.destroy === 'function') return stream.destroy();
    callback(err || new ERR_STREAM_DESTROYED('pipe'));
  };
}

function call(fn) {
  fn();
}

function pipe(from, to) {
  return from.pipe(to);
}

function popCallback(streams) {
  if (!streams.length) return noop;
  if (typeof streams[streams.length - 1] !== 'function') return noop;
  return streams.pop();
}

function pipeline() {
  for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
    streams[_key] = arguments[_key];
  }

  var callback = popCallback(streams);
  if (Array.isArray(streams[0])) streams = streams[0];

  if (streams.length < 2) {
    throw new ERR_MISSING_ARGS('streams');
  }

  var error;
  var destroys = streams.map(function (stream, i) {
    var reading = i < streams.length - 1;
    var writing = i > 0;
    return destroyer(stream, reading, writing, function (err) {
      if (!error) error = err;
      if (err) destroys.forEach(call);
      if (reading) return;
      destroys.forEach(call);
      callback(error);
    });
  });
  return streams.reduce(pipe);
}

module.exports = pipeline;

/***/ }),

/***/ 249462:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var ERR_INVALID_OPT_VALUE = __webpack_require__(402421)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE;

function highWaterMarkFrom(options, isDuplex, duplexKey) {
  return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
}

function getHighWaterMark(state, options, duplexKey, isDuplex) {
  var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);

  if (hwm != null) {
    if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
      var name = isDuplex ? duplexKey : 'highWaterMark';
      throw new ERR_INVALID_OPT_VALUE(name, hwm);
    }

    return Math.floor(hwm);
  } // Default value


  return state.objectMode ? 16 : 16 * 1024;
}

module.exports = {
  getHighWaterMark: getHighWaterMark
};

/***/ }),

/***/ 647993:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(92413);


/***/ }),

/***/ 544144:
/***/ ((module, exports, __webpack_require__) => {

var Stream = __webpack_require__(92413);
if (process.env.READABLE_STREAM === 'disable' && Stream) {
  module.exports = Stream.Readable;
  Object.assign(module.exports, Stream);
  module.exports.Stream = Stream;
} else {
  exports = module.exports = __webpack_require__(126298);
  exports.Stream = Stream || exports;
  exports.Readable = exports;
  exports.Writable = __webpack_require__(847576);
  exports.Duplex = __webpack_require__(202625);
  exports.Transform = __webpack_require__(837595);
  exports.PassThrough = __webpack_require__(705380);
  exports.finished = __webpack_require__(934485);
  exports.pipeline = __webpack_require__(382997);
}


/***/ }),

/***/ 807370:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pbkdf2Sync = __webpack_require__(848601).pbkdf2Sync

var MAX_VALUE = 0x7fffffff

// N = Cpu cost, r = Memory cost, p = parallelization cost
function scrypt (key, salt, N, r, p, dkLen, progressCallback) {
  if (N === 0 || (N & (N - 1)) !== 0) throw Error('N must be > 0 and a power of 2')

  if (N > MAX_VALUE / 128 / r) throw Error('Parameter N is too large')
  if (r > MAX_VALUE / 128 / p) throw Error('Parameter r is too large')

  var XY = new Buffer(256 * r)
  var V = new Buffer(128 * r * N)

  // pseudo global
  var B32 = new Int32Array(16) // salsa20_8
  var x = new Int32Array(16) // salsa20_8
  var _X = new Buffer(64) // blockmix_salsa8

  // pseudo global
  var B = pbkdf2Sync(key, salt, 1, p * 128 * r, 'sha256')

  var tickCallback
  if (progressCallback) {
    var totalOps = p * N * 2
    var currentOp = 0

    tickCallback = function () {
      ++currentOp

      // send progress notifications once every 1,000 ops
      if (currentOp % 1000 === 0) {
        progressCallback({
          current: currentOp,
          total: totalOps,
          percent: (currentOp / totalOps) * 100.0
        })
      }
    }
  }

  for (var i = 0; i < p; i++) {
    smix(B, i * 128 * r, r, N, V, XY)
  }

  return pbkdf2Sync(key, B, 1, dkLen, 'sha256')

  // all of these functions are actually moved to the top
  // due to function hoisting

  function smix (B, Bi, r, N, V, XY) {
    var Xi = 0
    var Yi = 128 * r
    var i

    B.copy(XY, Xi, Bi, Bi + Yi)

    for (i = 0; i < N; i++) {
      XY.copy(V, i * Yi, Xi, Xi + Yi)
      blockmix_salsa8(XY, Xi, Yi, r)

      if (tickCallback) tickCallback()
    }

    for (i = 0; i < N; i++) {
      var offset = Xi + (2 * r - 1) * 64
      var j = XY.readUInt32LE(offset) & (N - 1)
      blockxor(V, j * Yi, XY, Xi, Yi)
      blockmix_salsa8(XY, Xi, Yi, r)

      if (tickCallback) tickCallback()
    }

    XY.copy(B, Bi, Xi, Xi + Yi)
  }

  function blockmix_salsa8 (BY, Bi, Yi, r) {
    var i

    arraycopy(BY, Bi + (2 * r - 1) * 64, _X, 0, 64)

    for (i = 0; i < 2 * r; i++) {
      blockxor(BY, i * 64, _X, 0, 64)
      salsa20_8(_X)
      arraycopy(_X, 0, BY, Yi + (i * 64), 64)
    }

    for (i = 0; i < r; i++) {
      arraycopy(BY, Yi + (i * 2) * 64, BY, Bi + (i * 64), 64)
    }

    for (i = 0; i < r; i++) {
      arraycopy(BY, Yi + (i * 2 + 1) * 64, BY, Bi + (i + r) * 64, 64)
    }
  }

  function R (a, b) {
    return (a << b) | (a >>> (32 - b))
  }

  function salsa20_8 (B) {
    var i

    for (i = 0; i < 16; i++) {
      B32[i] = (B[i * 4 + 0] & 0xff) << 0
      B32[i] |= (B[i * 4 + 1] & 0xff) << 8
      B32[i] |= (B[i * 4 + 2] & 0xff) << 16
      B32[i] |= (B[i * 4 + 3] & 0xff) << 24
      // B32[i] = B.readUInt32LE(i*4)   <--- this is signficantly slower even in Node.js
    }

    arraycopy(B32, 0, x, 0, 16)

    for (i = 8; i > 0; i -= 2) {
      x[ 4] ^= R(x[ 0] + x[12], 7)
      x[ 8] ^= R(x[ 4] + x[ 0], 9)
      x[12] ^= R(x[ 8] + x[ 4], 13)
      x[ 0] ^= R(x[12] + x[ 8], 18)
      x[ 9] ^= R(x[ 5] + x[ 1], 7)
      x[13] ^= R(x[ 9] + x[ 5], 9)
      x[ 1] ^= R(x[13] + x[ 9], 13)
      x[ 5] ^= R(x[ 1] + x[13], 18)
      x[14] ^= R(x[10] + x[ 6], 7)
      x[ 2] ^= R(x[14] + x[10], 9)
      x[ 6] ^= R(x[ 2] + x[14], 13)
      x[10] ^= R(x[ 6] + x[ 2], 18)
      x[ 3] ^= R(x[15] + x[11], 7)
      x[ 7] ^= R(x[ 3] + x[15], 9)
      x[11] ^= R(x[ 7] + x[ 3], 13)
      x[15] ^= R(x[11] + x[ 7], 18)
      x[ 1] ^= R(x[ 0] + x[ 3], 7)
      x[ 2] ^= R(x[ 1] + x[ 0], 9)
      x[ 3] ^= R(x[ 2] + x[ 1], 13)
      x[ 0] ^= R(x[ 3] + x[ 2], 18)
      x[ 6] ^= R(x[ 5] + x[ 4], 7)
      x[ 7] ^= R(x[ 6] + x[ 5], 9)
      x[ 4] ^= R(x[ 7] + x[ 6], 13)
      x[ 5] ^= R(x[ 4] + x[ 7], 18)
      x[11] ^= R(x[10] + x[ 9], 7)
      x[ 8] ^= R(x[11] + x[10], 9)
      x[ 9] ^= R(x[ 8] + x[11], 13)
      x[10] ^= R(x[ 9] + x[ 8], 18)
      x[12] ^= R(x[15] + x[14], 7)
      x[13] ^= R(x[12] + x[15], 9)
      x[14] ^= R(x[13] + x[12], 13)
      x[15] ^= R(x[14] + x[13], 18)
    }

    for (i = 0; i < 16; ++i) B32[i] = x[i] + B32[i]

    for (i = 0; i < 16; i++) {
      var bi = i * 4
      B[bi + 0] = (B32[i] >> 0 & 0xff)
      B[bi + 1] = (B32[i] >> 8 & 0xff)
      B[bi + 2] = (B32[i] >> 16 & 0xff)
      B[bi + 3] = (B32[i] >> 24 & 0xff)
      // B.writeInt32LE(B32[i], i*4)  //<--- this is signficantly slower even in Node.js
    }
  }

  // naive approach... going back to loop unrolling may yield additional performance
  function blockxor (S, Si, D, Di, len) {
    for (var i = 0; i < len; i++) {
      D[Di + i] ^= S[Si + i]
    }
  }
}

function arraycopy (src, srcPos, dest, destPos, length) {
  if (Buffer.isBuffer(src) && Buffer.isBuffer(dest)) {
    src.copy(dest, destPos, srcPos, srcPos + length)
  } else {
    while (length--) {
      dest[destPos++] = src[srcPos++]
    }
  }
}

module.exports = scrypt


/***/ }),

/***/ 2728:
/***/ ((module, exports) => {

exports = module.exports = SemVer;

// The debug function is excluded entirely from the minified version.
/* nomin */ var debug;
/* nomin */ if (typeof process === 'object' &&
    /* nomin */ process.env &&
    /* nomin */ process.env.NODE_DEBUG &&
    /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
  /* nomin */ debug = function() {
    /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
    /* nomin */ args.unshift('SEMVER');
    /* nomin */ console.log.apply(console, args);
    /* nomin */ };
/* nomin */ else
  /* nomin */ debug = function() {};

// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0';

var MAX_LENGTH = 256;
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;

// The actual regexps go on exports.re
var re = exports.re = [];
var src = exports.src = [];
var R = 0;

// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.

// ## Numeric Identifier
// A single `0`, or a non-zero digit followed by zero or more digits.

var NUMERICIDENTIFIER = R++;
src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
var NUMERICIDENTIFIERLOOSE = R++;
src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';


// ## Non-numeric Identifier
// Zero or more digits, followed by a letter or hyphen, and then zero or
// more letters, digits, or hyphens.

var NONNUMERICIDENTIFIER = R++;
src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';


// ## Main Version
// Three dot-separated numeric identifiers.

var MAINVERSION = R++;
src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
                   '(' + src[NUMERICIDENTIFIER] + ')\\.' +
                   '(' + src[NUMERICIDENTIFIER] + ')';

var MAINVERSIONLOOSE = R++;
src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
                        '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
                        '(' + src[NUMERICIDENTIFIERLOOSE] + ')';

// ## Pre-release Version Identifier
// A numeric identifier, or a non-numeric identifier.

var PRERELEASEIDENTIFIER = R++;
src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
                            '|' + src[NONNUMERICIDENTIFIER] + ')';

var PRERELEASEIDENTIFIERLOOSE = R++;
src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
                                 '|' + src[NONNUMERICIDENTIFIER] + ')';


// ## Pre-release Version
// Hyphen, followed by one or more dot-separated pre-release version
// identifiers.

var PRERELEASE = R++;
src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
                  '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';

var PRERELEASELOOSE = R++;
src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
                       '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';

// ## Build Metadata Identifier
// Any combination of digits, letters, or hyphens.

var BUILDIDENTIFIER = R++;
src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';

// ## Build Metadata
// Plus sign, followed by one or more period-separated build metadata
// identifiers.

var BUILD = R++;
src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
             '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';


// ## Full Version String
// A main version, followed optionally by a pre-release version and
// build metadata.

// Note that the only major, minor, patch, and pre-release sections of
// the version string are capturing groups.  The build metadata is not a
// capturing group, because it should not ever be used in version
// comparison.

var FULL = R++;
var FULLPLAIN = 'v?' + src[MAINVERSION] +
                src[PRERELEASE] + '?' +
                src[BUILD] + '?';

src[FULL] = '^' + FULLPLAIN + '$';

// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
// common in the npm registry.
var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
                 src[PRERELEASELOOSE] + '?' +
                 src[BUILD] + '?';

var LOOSE = R++;
src[LOOSE] = '^' + LOOSEPLAIN + '$';

var GTLT = R++;
src[GTLT] = '((?:<|>)?=?)';

// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Only the first item is strictly required.
var XRANGEIDENTIFIERLOOSE = R++;
src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
var XRANGEIDENTIFIER = R++;
src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';

var XRANGEPLAIN = R++;
src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
                   '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
                   '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
                   '(?:' + src[PRERELEASE] + ')?' +
                   src[BUILD] + '?' +
                   ')?)?';

var XRANGEPLAINLOOSE = R++;
src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
                        '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
                        '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
                        '(?:' + src[PRERELEASELOOSE] + ')?' +
                        src[BUILD] + '?' +
                        ')?)?';

var XRANGE = R++;
src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
var XRANGELOOSE = R++;
src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';

// Tilde ranges.
// Meaning is "reasonably at or greater than"
var LONETILDE = R++;
src[LONETILDE] = '(?:~>?)';

var TILDETRIM = R++;
src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
var tildeTrimReplace = '$1~';

var TILDE = R++;
src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
var TILDELOOSE = R++;
src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';

// Caret ranges.
// Meaning is "at least and backwards compatible with"
var LONECARET = R++;
src[LONECARET] = '(?:\\^)';

var CARETTRIM = R++;
src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
var caretTrimReplace = '$1^';

var CARET = R++;
src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
var CARETLOOSE = R++;
src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';

// A simple gt/lt/eq thing, or just "" to indicate "any version"
var COMPARATORLOOSE = R++;
src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
var COMPARATOR = R++;
src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';


// An expression to strip any whitespace between the gtlt and the thing
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
var COMPARATORTRIM = R++;
src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
                      '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';

// this one has to use the /g flag
re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
var comparatorTrimReplace = '$1$2$3';


// Something like `1.2.3 - 1.2.4`
// Note that these all use the loose form, because they'll be
// checked against either the strict or loose comparator form
// later.
var HYPHENRANGE = R++;
src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
                   '\\s+-\\s+' +
                   '(' + src[XRANGEPLAIN] + ')' +
                   '\\s*$';

var HYPHENRANGELOOSE = R++;
src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
                        '\\s+-\\s+' +
                        '(' + src[XRANGEPLAINLOOSE] + ')' +
                        '\\s*$';

// Star ranges basically just allow anything at all.
var STAR = R++;
src[STAR] = '(<|>)?=?\\s*\\*';

// Compile to actual regexp objects.
// All are flag-free, unless they were created above with a flag.
for (var i = 0; i < R; i++) {
  debug(i, src[i]);
  if (!re[i])
    re[i] = new RegExp(src[i]);
}

exports.parse = parse;
function parse(version, loose) {
  if (version instanceof SemVer)
    return version;

  if (typeof version !== 'string')
    return null;

  if (version.length > MAX_LENGTH)
    return null;

  var r = loose ? re[LOOSE] : re[FULL];
  if (!r.test(version))
    return null;

  try {
    return new SemVer(version, loose);
  } catch (er) {
    return null;
  }
}

exports.valid = valid;
function valid(version, loose) {
  var v = parse(version, loose);
  return v ? v.version : null;
}


exports.clean = clean;
function clean(version, loose) {
  var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
  return s ? s.version : null;
}

exports.SemVer = SemVer;

function SemVer(version, loose) {
  if (version instanceof SemVer) {
    if (version.loose === loose)
      return version;
    else
      version = version.version;
  } else if (typeof version !== 'string') {
    throw new TypeError('Invalid Version: ' + version);
  }

  if (version.length > MAX_LENGTH)
    throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')

  if (!(this instanceof SemVer))
    return new SemVer(version, loose);

  debug('SemVer', version, loose);
  this.loose = loose;
  var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);

  if (!m)
    throw new TypeError('Invalid Version: ' + version);

  this.raw = version;

  // these are actually numbers
  this.major = +m[1];
  this.minor = +m[2];
  this.patch = +m[3];

  if (this.major > MAX_SAFE_INTEGER || this.major < 0)
    throw new TypeError('Invalid major version')

  if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
    throw new TypeError('Invalid minor version')

  if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
    throw new TypeError('Invalid patch version')

  // numberify any prerelease numeric ids
  if (!m[4])
    this.prerelease = [];
  else
    this.prerelease = m[4].split('.').map(function(id) {
      if (/^[0-9]+$/.test(id)) {
        var num = +id;
        if (num >= 0 && num < MAX_SAFE_INTEGER)
          return num;
      }
      return id;
    });

  this.build = m[5] ? m[5].split('.') : [];
  this.format();
}

SemVer.prototype.format = function() {
  this.version = this.major + '.' + this.minor + '.' + this.patch;
  if (this.prerelease.length)
    this.version += '-' + this.prerelease.join('.');
  return this.version;
};

SemVer.prototype.toString = function() {
  return this.version;
};

SemVer.prototype.compare = function(other) {
  debug('SemVer.compare', this.version, this.loose, other);
  if (!(other instanceof SemVer))
    other = new SemVer(other, this.loose);

  return this.compareMain(other) || this.comparePre(other);
};

SemVer.prototype.compareMain = function(other) {
  if (!(other instanceof SemVer))
    other = new SemVer(other, this.loose);

  return compareIdentifiers(this.major, other.major) ||
         compareIdentifiers(this.minor, other.minor) ||
         compareIdentifiers(this.patch, other.patch);
};

SemVer.prototype.comparePre = function(other) {
  if (!(other instanceof SemVer))
    other = new SemVer(other, this.loose);

  // NOT having a prerelease is > having one
  if (this.prerelease.length && !other.prerelease.length)
    return -1;
  else if (!this.prerelease.length && other.prerelease.length)
    return 1;
  else if (!this.prerelease.length && !other.prerelease.length)
    return 0;

  var i = 0;
  do {
    var a = this.prerelease[i];
    var b = other.prerelease[i];
    debug('prerelease compare', i, a, b);
    if (a === undefined && b === undefined)
      return 0;
    else if (b === undefined)
      return 1;
    else if (a === undefined)
      return -1;
    else if (a === b)
      continue;
    else
      return compareIdentifiers(a, b);
  } while (++i);
};

// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
SemVer.prototype.inc = function(release, identifier) {
  switch (release) {
    case 'premajor':
      this.prerelease.length = 0;
      this.patch = 0;
      this.minor = 0;
      this.major++;
      this.inc('pre', identifier);
      break;
    case 'preminor':
      this.prerelease.length = 0;
      this.patch = 0;
      this.minor++;
      this.inc('pre', identifier);
      break;
    case 'prepatch':
      // If this is already a prerelease, it will bump to the next version
      // drop any prereleases that might already exist, since they are not
      // relevant at this point.
      this.prerelease.length = 0;
      this.inc('patch', identifier);
      this.inc('pre', identifier);
      break;
    // If the input is a non-prerelease version, this acts the same as
    // prepatch.
    case 'prerelease':
      if (this.prerelease.length === 0)
        this.inc('patch', identifier);
      this.inc('pre', identifier);
      break;

    case 'major':
      // If this is a pre-major version, bump up to the same major version.
      // Otherwise increment major.
      // 1.0.0-5 bumps to 1.0.0
      // 1.1.0 bumps to 2.0.0
      if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
        this.major++;
      this.minor = 0;
      this.patch = 0;
      this.prerelease = [];
      break;
    case 'minor':
      // If this is a pre-minor version, bump up to the same minor version.
      // Otherwise increment minor.
      // 1.2.0-5 bumps to 1.2.0
      // 1.2.1 bumps to 1.3.0
      if (this.patch !== 0 || this.prerelease.length === 0)
        this.minor++;
      this.patch = 0;
      this.prerelease = [];
      break;
    case 'patch':
      // If this is not a pre-release version, it will increment the patch.
      // If it is a pre-release it will bump up to the same patch version.
      // 1.2.0-5 patches to 1.2.0
      // 1.2.0 patches to 1.2.1
      if (this.prerelease.length === 0)
        this.patch++;
      this.prerelease = [];
      break;
    // This probably shouldn't be used publicly.
    // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
    case 'pre':
      if (this.prerelease.length === 0)
        this.prerelease = [0];
      else {
        var i = this.prerelease.length;
        while (--i >= 0) {
          if (typeof this.prerelease[i] === 'number') {
            this.prerelease[i]++;
            i = -2;
          }
        }
        if (i === -1) // didn't increment anything
          this.prerelease.push(0);
      }
      if (identifier) {
        // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
        // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
        if (this.prerelease[0] === identifier) {
          if (isNaN(this.prerelease[1]))
            this.prerelease = [identifier, 0];
        } else
          this.prerelease = [identifier, 0];
      }
      break;

    default:
      throw new Error('invalid increment argument: ' + release);
  }
  this.format();
  this.raw = this.version;
  return this;
};

exports.inc = inc;
function inc(version, release, loose, identifier) {
  if (typeof(loose) === 'string') {
    identifier = loose;
    loose = undefined;
  }

  try {
    return new SemVer(version, loose).inc(release, identifier).version;
  } catch (er) {
    return null;
  }
}

exports.diff = diff;
function diff(version1, version2) {
  if (eq(version1, version2)) {
    return null;
  } else {
    var v1 = parse(version1);
    var v2 = parse(version2);
    if (v1.prerelease.length || v2.prerelease.length) {
      for (var key in v1) {
        if (key === 'major' || key === 'minor' || key === 'patch') {
          if (v1[key] !== v2[key]) {
            return 'pre'+key;
          }
        }
      }
      return 'prerelease';
    }
    for (var key in v1) {
      if (key === 'major' || key === 'minor' || key === 'patch') {
        if (v1[key] !== v2[key]) {
          return key;
        }
      }
    }
  }
}

exports.compareIdentifiers = compareIdentifiers;

var numeric = /^[0-9]+$/;
function compareIdentifiers(a, b) {
  var anum = numeric.test(a);
  var bnum = numeric.test(b);

  if (anum && bnum) {
    a = +a;
    b = +b;
  }

  return (anum && !bnum) ? -1 :
         (bnum && !anum) ? 1 :
         a < b ? -1 :
         a > b ? 1 :
         0;
}

exports.rcompareIdentifiers = rcompareIdentifiers;
function rcompareIdentifiers(a, b) {
  return compareIdentifiers(b, a);
}

exports.major = major;
function major(a, loose) {
  return new SemVer(a, loose).major;
}

exports.minor = minor;
function minor(a, loose) {
  return new SemVer(a, loose).minor;
}

exports.patch = patch;
function patch(a, loose) {
  return new SemVer(a, loose).patch;
}

exports.compare = compare;
function compare(a, b, loose) {
  return new SemVer(a, loose).compare(new SemVer(b, loose));
}

exports.compareLoose = compareLoose;
function compareLoose(a, b) {
  return compare(a, b, true);
}

exports.rcompare = rcompare;
function rcompare(a, b, loose) {
  return compare(b, a, loose);
}

exports.sort = sort;
function sort(list, loose) {
  return list.sort(function(a, b) {
    return exports.compare(a, b, loose);
  });
}

exports.rsort = rsort;
function rsort(list, loose) {
  return list.sort(function(a, b) {
    return exports.rcompare(a, b, loose);
  });
}

exports.gt = gt;
function gt(a, b, loose) {
  return compare(a, b, loose) > 0;
}

exports.lt = lt;
function lt(a, b, loose) {
  return compare(a, b, loose) < 0;
}

exports.eq = eq;
function eq(a, b, loose) {
  return compare(a, b, loose) === 0;
}

exports.neq = neq;
function neq(a, b, loose) {
  return compare(a, b, loose) !== 0;
}

exports.gte = gte;
function gte(a, b, loose) {
  return compare(a, b, loose) >= 0;
}

exports.lte = lte;
function lte(a, b, loose) {
  return compare(a, b, loose) <= 0;
}

exports.cmp = cmp;
function cmp(a, op, b, loose) {
  var ret;
  switch (op) {
    case '===':
      if (typeof a === 'object') a = a.version;
      if (typeof b === 'object') b = b.version;
      ret = a === b;
      break;
    case '!==':
      if (typeof a === 'object') a = a.version;
      if (typeof b === 'object') b = b.version;
      ret = a !== b;
      break;
    case '': case '=': case '==': ret = eq(a, b, loose); break;
    case '!=': ret = neq(a, b, loose); break;
    case '>': ret = gt(a, b, loose); break;
    case '>=': ret = gte(a, b, loose); break;
    case '<': ret = lt(a, b, loose); break;
    case '<=': ret = lte(a, b, loose); break;
    default: throw new TypeError('Invalid operator: ' + op);
  }
  return ret;
}

exports.Comparator = Comparator;
function Comparator(comp, loose) {
  if (comp instanceof Comparator) {
    if (comp.loose === loose)
      return comp;
    else
      comp = comp.value;
  }

  if (!(this instanceof Comparator))
    return new Comparator(comp, loose);

  debug('comparator', comp, loose);
  this.loose = loose;
  this.parse(comp);

  if (this.semver === ANY)
    this.value = '';
  else
    this.value = this.operator + this.semver.version;

  debug('comp', this);
}

var ANY = {};
Comparator.prototype.parse = function(comp) {
  var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
  var m = comp.match(r);

  if (!m)
    throw new TypeError('Invalid comparator: ' + comp);

  this.operator = m[1];
  if (this.operator === '=')
    this.operator = '';

  // if it literally is just '>' or '' then allow anything.
  if (!m[2])
    this.semver = ANY;
  else
    this.semver = new SemVer(m[2], this.loose);
};

Comparator.prototype.toString = function() {
  return this.value;
};

Comparator.prototype.test = function(version) {
  debug('Comparator.test', version, this.loose);

  if (this.semver === ANY)
    return true;

  if (typeof version === 'string')
    version = new SemVer(version, this.loose);

  return cmp(version, this.operator, this.semver, this.loose);
};

Comparator.prototype.intersects = function(comp, loose) {
  if (!(comp instanceof Comparator)) {
    throw new TypeError('a Comparator is required');
  }

  var rangeTmp;

  if (this.operator === '') {
    rangeTmp = new Range(comp.value, loose);
    return satisfies(this.value, rangeTmp, loose);
  } else if (comp.operator === '') {
    rangeTmp = new Range(this.value, loose);
    return satisfies(comp.semver, rangeTmp, loose);
  }

  var sameDirectionIncreasing =
    (this.operator === '>=' || this.operator === '>') &&
    (comp.operator === '>=' || comp.operator === '>');
  var sameDirectionDecreasing =
    (this.operator === '<=' || this.operator === '<') &&
    (comp.operator === '<=' || comp.operator === '<');
  var sameSemVer = this.semver.version === comp.semver.version;
  var differentDirectionsInclusive =
    (this.operator === '>=' || this.operator === '<=') &&
    (comp.operator === '>=' || comp.operator === '<=');
  var oppositeDirectionsLessThan =
    cmp(this.semver, '<', comp.semver, loose) &&
    ((this.operator === '>=' || this.operator === '>') &&
    (comp.operator === '<=' || comp.operator === '<'));
  var oppositeDirectionsGreaterThan =
    cmp(this.semver, '>', comp.semver, loose) &&
    ((this.operator === '<=' || this.operator === '<') &&
    (comp.operator === '>=' || comp.operator === '>'));

  return sameDirectionIncreasing || sameDirectionDecreasing ||
    (sameSemVer && differentDirectionsInclusive) ||
    oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
};


exports.Range = Range;
function Range(range, loose) {
  if (range instanceof Range) {
    if (range.loose === loose) {
      return range;
    } else {
      return new Range(range.raw, loose);
    }
  }

  if (range instanceof Comparator) {
    return new Range(range.value, loose);
  }

  if (!(this instanceof Range))
    return new Range(range, loose);

  this.loose = loose;

  // First, split based on boolean or ||
  this.raw = range;
  this.set = range.split(/\s*\|\|\s*/).map(function(range) {
    return this.parseRange(range.trim());
  }, this).filter(function(c) {
    // throw out any that are not relevant for whatever reason
    return c.length;
  });

  if (!this.set.length) {
    throw new TypeError('Invalid SemVer Range: ' + range);
  }

  this.format();
}

Range.prototype.format = function() {
  this.range = this.set.map(function(comps) {
    return comps.join(' ').trim();
  }).join('||').trim();
  return this.range;
};

Range.prototype.toString = function() {
  return this.range;
};

Range.prototype.parseRange = function(range) {
  var loose = this.loose;
  range = range.trim();
  debug('range', range, loose);
  // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
  var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
  range = range.replace(hr, hyphenReplace);
  debug('hyphen replace', range);
  // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
  range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
  debug('comparator trim', range, re[COMPARATORTRIM]);

  // `~ 1.2.3` => `~1.2.3`
  range = range.replace(re[TILDETRIM], tildeTrimReplace);

  // `^ 1.2.3` => `^1.2.3`
  range = range.replace(re[CARETTRIM], caretTrimReplace);

  // normalize spaces
  range = range.split(/\s+/).join(' ');

  // At this point, the range is completely trimmed and
  // ready to be split into comparators.

  var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
  var set = range.split(' ').map(function(comp) {
    return parseComparator(comp, loose);
  }).join(' ').split(/\s+/);
  if (this.loose) {
    // in loose mode, throw out any that are not valid comparators
    set = set.filter(function(comp) {
      return !!comp.match(compRe);
    });
  }
  set = set.map(function(comp) {
    return new Comparator(comp, loose);
  });

  return set;
};

Range.prototype.intersects = function(range, loose) {
  if (!(range instanceof Range)) {
    throw new TypeError('a Range is required');
  }

  return this.set.some(function(thisComparators) {
    return thisComparators.every(function(thisComparator) {
      return range.set.some(function(rangeComparators) {
        return rangeComparators.every(function(rangeComparator) {
          return thisComparator.intersects(rangeComparator, loose);
        });
      });
    });
  });
};

// Mostly just for testing and legacy API reasons
exports.toComparators = toComparators;
function toComparators(range, loose) {
  return new Range(range, loose).set.map(function(comp) {
    return comp.map(function(c) {
      return c.value;
    }).join(' ').trim().split(' ');
  });
}

// comprised of xranges, tildes, stars, and gtlt's at this point.
// already replaced the hyphen ranges
// turn into a set of JUST comparators.
function parseComparator(comp, loose) {
  debug('comp', comp);
  comp = replaceCarets(comp, loose);
  debug('caret', comp);
  comp = replaceTildes(comp, loose);
  debug('tildes', comp);
  comp = replaceXRanges(comp, loose);
  debug('xrange', comp);
  comp = replaceStars(comp, loose);
  debug('stars', comp);
  return comp;
}

function isX(id) {
  return !id || id.toLowerCase() === 'x' || id === '*';
}

// ~, ~> --> * (any, kinda silly)
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
function replaceTildes(comp, loose) {
  return comp.trim().split(/\s+/).map(function(comp) {
    return replaceTilde(comp, loose);
  }).join(' ');
}

function replaceTilde(comp, loose) {
  var r = loose ? re[TILDELOOSE] : re[TILDE];
  return comp.replace(r, function(_, M, m, p, pr) {
    debug('tilde', comp, _, M, m, p, pr);
    var ret;

    if (isX(M))
      ret = '';
    else if (isX(m))
      ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
    else if (isX(p))
      // ~1.2 == >=1.2.0 <1.3.0
      ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
    else if (pr) {
      debug('replaceTilde pr', pr);
      if (pr.charAt(0) !== '-')
        pr = '-' + pr;
      ret = '>=' + M + '.' + m + '.' + p + pr +
            ' <' + M + '.' + (+m + 1) + '.0';
    } else
      // ~1.2.3 == >=1.2.3 <1.3.0
      ret = '>=' + M + '.' + m + '.' + p +
            ' <' + M + '.' + (+m + 1) + '.0';

    debug('tilde return', ret);
    return ret;
  });
}

// ^ --> * (any, kinda silly)
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
// ^1.2.3 --> >=1.2.3 <2.0.0
// ^1.2.0 --> >=1.2.0 <2.0.0
function replaceCarets(comp, loose) {
  return comp.trim().split(/\s+/).map(function(comp) {
    return replaceCaret(comp, loose);
  }).join(' ');
}

function replaceCaret(comp, loose) {
  debug('caret', comp, loose);
  var r = loose ? re[CARETLOOSE] : re[CARET];
  return comp.replace(r, function(_, M, m, p, pr) {
    debug('caret', comp, _, M, m, p, pr);
    var ret;

    if (isX(M))
      ret = '';
    else if (isX(m))
      ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
    else if (isX(p)) {
      if (M === '0')
        ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
      else
        ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
    } else if (pr) {
      debug('replaceCaret pr', pr);
      if (pr.charAt(0) !== '-')
        pr = '-' + pr;
      if (M === '0') {
        if (m === '0')
          ret = '>=' + M + '.' + m + '.' + p + pr +
                ' <' + M + '.' + m + '.' + (+p + 1);
        else
          ret = '>=' + M + '.' + m + '.' + p + pr +
                ' <' + M + '.' + (+m + 1) + '.0';
      } else
        ret = '>=' + M + '.' + m + '.' + p + pr +
              ' <' + (+M + 1) + '.0.0';
    } else {
      debug('no pr');
      if (M === '0') {
        if (m === '0')
          ret = '>=' + M + '.' + m + '.' + p +
                ' <' + M + '.' + m + '.' + (+p + 1);
        else
          ret = '>=' + M + '.' + m + '.' + p +
                ' <' + M + '.' + (+m + 1) + '.0';
      } else
        ret = '>=' + M + '.' + m + '.' + p +
              ' <' + (+M + 1) + '.0.0';
    }

    debug('caret return', ret);
    return ret;
  });
}

function replaceXRanges(comp, loose) {
  debug('replaceXRanges', comp, loose);
  return comp.split(/\s+/).map(function(comp) {
    return replaceXRange(comp, loose);
  }).join(' ');
}

function replaceXRange(comp, loose) {
  comp = comp.trim();
  var r = loose ? re[XRANGELOOSE] : re[XRANGE];
  return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
    debug('xRange', comp, ret, gtlt, M, m, p, pr);
    var xM = isX(M);
    var xm = xM || isX(m);
    var xp = xm || isX(p);
    var anyX = xp;

    if (gtlt === '=' && anyX)
      gtlt = '';

    if (xM) {
      if (gtlt === '>' || gtlt === '<') {
        // nothing is allowed
        ret = '<0.0.0';
      } else {
        // nothing is forbidden
        ret = '*';
      }
    } else if (gtlt && anyX) {
      // replace X with 0
      if (xm)
        m = 0;
      if (xp)
        p = 0;

      if (gtlt === '>') {
        // >1 => >=2.0.0
        // >1.2 => >=1.3.0
        // >1.2.3 => >= 1.2.4
        gtlt = '>=';
        if (xm) {
          M = +M + 1;
          m = 0;
          p = 0;
        } else if (xp) {
          m = +m + 1;
          p = 0;
        }
      } else if (gtlt === '<=') {
        // <=0.7.x is actually <0.8.0, since any 0.7.x should
        // pass.  Similarly, <=7.x is actually <8.0.0, etc.
        gtlt = '<';
        if (xm)
          M = +M + 1;
        else
          m = +m + 1;
      }

      ret = gtlt + M + '.' + m + '.' + p;
    } else if (xm) {
      ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
    } else if (xp) {
      ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
    }

    debug('xRange return', ret);

    return ret;
  });
}

// Because * is AND-ed with everything else in the comparator,
// and '' means "any version", just remove the *s entirely.
function replaceStars(comp, loose) {
  debug('replaceStars', comp, loose);
  // Looseness is ignored here.  star is always as loose as it gets!
  return comp.trim().replace(re[STAR], '');
}

// This function is passed to string.replace(re[HYPHENRANGE])
// M, m, patch, prerelease, build
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
// 1.2 - 3.4 => >=1.2.0 <3.5.0
function hyphenReplace($0,
                       from, fM, fm, fp, fpr, fb,
                       to, tM, tm, tp, tpr, tb) {

  if (isX(fM))
    from = '';
  else if (isX(fm))
    from = '>=' + fM + '.0.0';
  else if (isX(fp))
    from = '>=' + fM + '.' + fm + '.0';
  else
    from = '>=' + from;

  if (isX(tM))
    to = '';
  else if (isX(tm))
    to = '<' + (+tM + 1) + '.0.0';
  else if (isX(tp))
    to = '<' + tM + '.' + (+tm + 1) + '.0';
  else if (tpr)
    to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  else
    to = '<=' + to;

  return (from + ' ' + to).trim();
}


// if ANY of the sets match ALL of its comparators, then pass
Range.prototype.test = function(version) {
  if (!version)
    return false;

  if (typeof version === 'string')
    version = new SemVer(version, this.loose);

  for (var i = 0; i < this.set.length; i++) {
    if (testSet(this.set[i], version))
      return true;
  }
  return false;
};

function testSet(set, version) {
  for (var i = 0; i < set.length; i++) {
    if (!set[i].test(version))
      return false;
  }

  if (version.prerelease.length) {
    // Find the set of versions that are allowed to have prereleases
    // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
    // That should allow `1.2.3-pr.2` to pass.
    // However, `1.2.4-alpha.notready` should NOT be allowed,
    // even though it's within the range set by the comparators.
    for (var i = 0; i < set.length; i++) {
      debug(set[i].semver);
      if (set[i].semver === ANY)
        continue;

      if (set[i].semver.prerelease.length > 0) {
        var allowed = set[i].semver;
        if (allowed.major === version.major &&
            allowed.minor === version.minor &&
            allowed.patch === version.patch)
          return true;
      }
    }

    // Version has a -pre, but it's not one of the ones we like.
    return false;
  }

  return true;
}

exports.satisfies = satisfies;
function satisfies(version, range, loose) {
  try {
    range = new Range(range, loose);
  } catch (er) {
    return false;
  }
  return range.test(version);
}

exports.maxSatisfying = maxSatisfying;
function maxSatisfying(versions, range, loose) {
  var max = null;
  var maxSV = null;
  try {
    var rangeObj = new Range(range, loose);
  } catch (er) {
    return null;
  }
  versions.forEach(function (v) {
    if (rangeObj.test(v)) { // satisfies(v, range, loose)
      if (!max || maxSV.compare(v) === -1) { // compare(max, v, true)
        max = v;
        maxSV = new SemVer(max, loose);
      }
    }
  })
  return max;
}

exports.minSatisfying = minSatisfying;
function minSatisfying(versions, range, loose) {
  var min = null;
  var minSV = null;
  try {
    var rangeObj = new Range(range, loose);
  } catch (er) {
    return null;
  }
  versions.forEach(function (v) {
    if (rangeObj.test(v)) { // satisfies(v, range, loose)
      if (!min || minSV.compare(v) === 1) { // compare(min, v, true)
        min = v;
        minSV = new SemVer(min, loose);
      }
    }
  })
  return min;
}

exports.validRange = validRange;
function validRange(range, loose) {
  try {
    // Return '*' instead of '' so that truthiness works.
    // This will throw if it's invalid anyway
    return new Range(range, loose).range || '*';
  } catch (er) {
    return null;
  }
}

// Determine if version is less than all the versions possible in the range
exports.ltr = ltr;
function ltr(version, range, loose) {
  return outside(version, range, '<', loose);
}

// Determine if version is greater than all the versions possible in the range.
exports.gtr = gtr;
function gtr(version, range, loose) {
  return outside(version, range, '>', loose);
}

exports.outside = outside;
function outside(version, range, hilo, loose) {
  version = new SemVer(version, loose);
  range = new Range(range, loose);

  var gtfn, ltefn, ltfn, comp, ecomp;
  switch (hilo) {
    case '>':
      gtfn = gt;
      ltefn = lte;
      ltfn = lt;
      comp = '>';
      ecomp = '>=';
      break;
    case '<':
      gtfn = lt;
      ltefn = gte;
      ltfn = gt;
      comp = '<';
      ecomp = '<=';
      break;
    default:
      throw new TypeError('Must provide a hilo val of "<" or ">"');
  }

  // If it satisifes the range it is not outside
  if (satisfies(version, range, loose)) {
    return false;
  }

  // From now on, variable terms are as if we're in "gtr" mode.
  // but note that everything is flipped for the "ltr" function.

  for (var i = 0; i < range.set.length; ++i) {
    var comparators = range.set[i];

    var high = null;
    var low = null;

    comparators.forEach(function(comparator) {
      if (comparator.semver === ANY) {
        comparator = new Comparator('>=0.0.0')
      }
      high = high || comparator;
      low = low || comparator;
      if (gtfn(comparator.semver, high.semver, loose)) {
        high = comparator;
      } else if (ltfn(comparator.semver, low.semver, loose)) {
        low = comparator;
      }
    });

    // If the edge version comparator has a operator then our version
    // isn't outside it
    if (high.operator === comp || high.operator === ecomp) {
      return false;
    }

    // If the lowest version comparator has an operator and our version
    // is less than it then it isn't higher than the range
    if ((!low.operator || low.operator === comp) &&
        ltefn(version, low.semver)) {
      return false;
    } else if (low.operator === ecomp && ltfn(version, low.semver)) {
      return false;
    }
  }
  return true;
}

exports.prerelease = prerelease;
function prerelease(version, loose) {
  var parsed = parse(version, loose);
  return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
}

exports.intersects = intersects;
function intersects(r1, r2, loose) {
  r1 = new Range(r1, loose)
  r2 = new Range(r2, loose)
  return r1.intersects(r2)
}


/***/ }),

/***/ 977575:
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

__webpack_require__(131364).install();


/***/ }),

/***/ 131364:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

var SourceMapConsumer = __webpack_require__(849125).SourceMapConsumer;
var path = __webpack_require__(385622);

var fs;
try {
  fs = __webpack_require__(935747);
  if (!fs.existsSync || !fs.readFileSync) {
    // fs doesn't have all methods we need
    fs = null;
  }
} catch (err) {
  /* nop */
}

var bufferFrom = __webpack_require__(255420);

// Only install once if called multiple times
var errorFormatterInstalled = false;
var uncaughtShimInstalled = false;

// If true, the caches are reset before a stack trace formatting operation
var emptyCacheBetweenOperations = false;

// Supports {browser, node, auto}
var environment = "auto";

// Maps a file path to a string containing the file contents
var fileContentsCache = {};

// Maps a file path to a source map for that file
var sourceMapCache = {};

// Regex for detecting source maps
var reSourceMap = /^data:application\/json[^,]+base64,/;

// Priority list of retrieve handlers
var retrieveFileHandlers = [];
var retrieveMapHandlers = [];

function isInBrowser() {
  if (environment === "browser")
    return true;
  if (environment === "node")
    return false;
  return ((typeof window !== 'undefined') && (typeof XMLHttpRequest === 'function') && !(window.require && window.module && window.process && window.process.type === "renderer"));
}

function hasGlobalProcessEventEmitter() {
  return ((typeof process === 'object') && (process !== null) && (typeof process.on === 'function'));
}

function handlerExec(list) {
  return function(arg) {
    for (var i = 0; i < list.length; i++) {
      var ret = list[i](arg);
      if (ret) {
        return ret;
      }
    }
    return null;
  };
}

var retrieveFile = handlerExec(retrieveFileHandlers);

retrieveFileHandlers.push(function(path) {
  // Trim the path to make sure there is no extra whitespace.
  path = path.trim();
  if (/^file:/.test(path)) {
    // existsSync/readFileSync can't handle file protocol, but once stripped, it works
    path = path.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
      return drive ?
        '' : // file:///C:/dir/file -> C:/dir/file
        '/'; // file:///root-dir/file -> /root-dir/file
    });
  }
  if (path in fileContentsCache) {
    return fileContentsCache[path];
  }

  var contents = '';
  try {
    if (!fs) {
      // Use SJAX if we are in the browser
      var xhr = new XMLHttpRequest();
      xhr.open('GET', path, /** async */ false);
      xhr.send(null);
      if (xhr.readyState === 4 && xhr.status === 200) {
        contents = xhr.responseText;
      }
    } else if (fs.existsSync(path)) {
      // Otherwise, use the filesystem
      contents = fs.readFileSync(path, 'utf8');
    }
  } catch (er) {
    /* ignore any errors */
  }

  return fileContentsCache[path] = contents;
});

// Support URLs relative to a directory, but be careful about a protocol prefix
// in case we are in the browser (i.e. directories may start with "http://" or "file:///")
function supportRelativeURL(file, url) {
  if (!file) return url;
  var dir = path.dirname(file);
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
  var protocol = match ? match[0] : '';
  var startPath = dir.slice(protocol.length);
  if (protocol && /^\/\w\:/.test(startPath)) {
    // handle file:///C:/ paths
    protocol += '/';
    return protocol + path.resolve(dir.slice(protocol.length), url).replace(/\\/g, '/');
  }
  return protocol + path.resolve(dir.slice(protocol.length), url);
}

function retrieveSourceMapURL(source) {
  var fileData;

  if (isInBrowser()) {
     try {
       var xhr = new XMLHttpRequest();
       xhr.open('GET', source, false);
       xhr.send(null);
       fileData = xhr.readyState === 4 ? xhr.responseText : null;

       // Support providing a sourceMappingURL via the SourceMap header
       var sourceMapHeader = xhr.getResponseHeader("SourceMap") ||
                             xhr.getResponseHeader("X-SourceMap");
       if (sourceMapHeader) {
         return sourceMapHeader;
       }
     } catch (e) {
     }
  }

  // Get the URL of the source map
  fileData = retrieveFile(source);
  var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;
  // Keep executing the search to find the *last* sourceMappingURL to avoid
  // picking up sourceMappingURLs from comments, strings, etc.
  var lastMatch, match;
  while (match = re.exec(fileData)) lastMatch = match;
  if (!lastMatch) return null;
  return lastMatch[1];
};

// Can be overridden by the retrieveSourceMap option to install. Takes a
// generated source filename; returns a {map, optional url} object, or null if
// there is no source map.  The map field may be either a string or the parsed
// JSON object (ie, it must be a valid argument to the SourceMapConsumer
// constructor).
var retrieveSourceMap = handlerExec(retrieveMapHandlers);
retrieveMapHandlers.push(function(source) {
  var sourceMappingURL = retrieveSourceMapURL(source);
  if (!sourceMappingURL) return null;

  // Read the contents of the source map
  var sourceMapData;
  if (reSourceMap.test(sourceMappingURL)) {
    // Support source map URL as a data url
    var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1);
    sourceMapData = bufferFrom(rawData, "base64").toString();
    sourceMappingURL = source;
  } else {
    // Support source map URLs relative to the source URL
    sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
    sourceMapData = retrieveFile(sourceMappingURL);
  }

  if (!sourceMapData) {
    return null;
  }

  return {
    url: sourceMappingURL,
    map: sourceMapData
  };
});

function mapSourcePosition(position) {
  var sourceMap = sourceMapCache[position.source];
  if (!sourceMap) {
    // Call the (overrideable) retrieveSourceMap function to get the source map.
    var urlAndMap = retrieveSourceMap(position.source);
    if (urlAndMap) {
      sourceMap = sourceMapCache[position.source] = {
        url: urlAndMap.url,
        map: new SourceMapConsumer(urlAndMap.map)
      };

      // Load all sources stored inline with the source map into the file cache
      // to pretend like they are already loaded. They may not exist on disk.
      if (sourceMap.map.sourcesContent) {
        sourceMap.map.sources.forEach(function(source, i) {
          var contents = sourceMap.map.sourcesContent[i];
          if (contents) {
            var url = supportRelativeURL(sourceMap.url, source);
            fileContentsCache[url] = contents;
          }
        });
      }
    } else {
      sourceMap = sourceMapCache[position.source] = {
        url: null,
        map: null
      };
    }
  }

  // Resolve the source URL relative to the URL of the source map
  if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') {
    var originalPosition = sourceMap.map.originalPositionFor(position);

    // Only return the original position if a matching line was found. If no
    // matching line is found then we return position instead, which will cause
    // the stack trace to print the path and line for the compiled file. It is
    // better to give a precise location in the compiled file than a vague
    // location in the original file.
    if (originalPosition.source !== null) {
      originalPosition.source = supportRelativeURL(
        sourceMap.url, originalPosition.source);
      return originalPosition;
    }
  }

  return position;
}

// Parses code generated by FormatEvalOrigin(), a function inside V8:
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js
function mapEvalOrigin(origin) {
  // Most eval() calls are in this format
  var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
  if (match) {
    var position = mapSourcePosition({
      source: match[2],
      line: +match[3],
      column: match[4] - 1
    });
    return 'eval at ' + match[1] + ' (' + position.source + ':' +
      position.line + ':' + (position.column + 1) + ')';
  }

  // Parse nested eval() calls using recursion
  match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
  if (match) {
    return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')';
  }

  // Make sure we still return useful information if we didn't find anything
  return origin;
}

// This is copied almost verbatim from the V8 source code at
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The
// implementation of wrapCallSite() used to just forward to the actual source
// code of CallSite.prototype.toString but unfortunately a new release of V8
// did something to the prototype chain and broke the shim. The only fix I
// could find was copy/paste.
function CallSiteToString() {
  var fileName;
  var fileLocation = "";
  if (this.isNative()) {
    fileLocation = "native";
  } else {
    fileName = this.getScriptNameOrSourceURL();
    if (!fileName && this.isEval()) {
      fileLocation = this.getEvalOrigin();
      fileLocation += ", ";  // Expecting source position to follow.
    }

    if (fileName) {
      fileLocation += fileName;
    } else {
      // Source code does not originate from a file and is not native, but we
      // can still get the source position inside the source string, e.g. in
      // an eval string.
      fileLocation += "<anonymous>";
    }
    var lineNumber = this.getLineNumber();
    if (lineNumber != null) {
      fileLocation += ":" + lineNumber;
      var columnNumber = this.getColumnNumber();
      if (columnNumber) {
        fileLocation += ":" + columnNumber;
      }
    }
  }

  var line = "";
  var functionName = this.getFunctionName();
  var addSuffix = true;
  var isConstructor = this.isConstructor();
  var isMethodCall = !(this.isToplevel() || isConstructor);
  if (isMethodCall) {
    var typeName = this.getTypeName();
    // Fixes shim to be backward compatable with Node v0 to v4
    if (typeName === "[object Object]") {
      typeName = "null";
    }
    var methodName = this.getMethodName();
    if (functionName) {
      if (typeName && functionName.indexOf(typeName) != 0) {
        line += typeName + ".";
      }
      line += functionName;
      if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
        line += " [as " + methodName + "]";
      }
    } else {
      line += typeName + "." + (methodName || "<anonymous>");
    }
  } else if (isConstructor) {
    line += "new " + (functionName || "<anonymous>");
  } else if (functionName) {
    line += functionName;
  } else {
    line += fileLocation;
    addSuffix = false;
  }
  if (addSuffix) {
    line += " (" + fileLocation + ")";
  }
  return line;
}

function cloneCallSite(frame) {
  var object = {};
  Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
    object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name];
  });
  object.toString = CallSiteToString;
  return object;
}

function wrapCallSite(frame) {
  if(frame.isNative()) {
    return frame;
  }

  // Most call sites will return the source file from getFileName(), but code
  // passed to eval() ending in "//# sourceURL=..." will return the source file
  // from getScriptNameOrSourceURL() instead
  var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
  if (source) {
    var line = frame.getLineNumber();
    var column = frame.getColumnNumber() - 1;

    // Fix position in Node where some (internal) code is prepended.
    // See https://github.com/evanw/node-source-map-support/issues/36
    var headerLength = 62;
    if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
      column -= headerLength;
    }

    var position = mapSourcePosition({
      source: source,
      line: line,
      column: column
    });
    frame = cloneCallSite(frame);
    var originalFunctionName = frame.getFunctionName;
    frame.getFunctionName = function() { return position.name || originalFunctionName(); };
    frame.getFileName = function() { return position.source; };
    frame.getLineNumber = function() { return position.line; };
    frame.getColumnNumber = function() { return position.column + 1; };
    frame.getScriptNameOrSourceURL = function() { return position.source; };
    return frame;
  }

  // Code called using eval() needs special handling
  var origin = frame.isEval() && frame.getEvalOrigin();
  if (origin) {
    origin = mapEvalOrigin(origin);
    frame = cloneCallSite(frame);
    frame.getEvalOrigin = function() { return origin; };
    return frame;
  }

  // If we get here then we were unable to change the source position
  return frame;
}

// This function is part of the V8 stack trace API, for more info see:
// https://v8.dev/docs/stack-trace-api
function prepareStackTrace(error, stack) {
  if (emptyCacheBetweenOperations) {
    fileContentsCache = {};
    sourceMapCache = {};
  }

  var name = error.name || 'Error';
  var message = error.message || '';
  var errorString = name + ": " + message;

  return errorString + stack.map(function(frame) {
    return '\n    at ' + wrapCallSite(frame);
  }).join('');
}

// Generate position and snippet of original source with pointer
function getErrorSource(error) {
  var match = /\n    at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
  if (match) {
    var source = match[1];
    var line = +match[2];
    var column = +match[3];

    // Support the inline sourceContents inside the source map
    var contents = fileContentsCache[source];

    // Support files on disk
    if (!contents && fs && fs.existsSync(source)) {
      try {
        contents = fs.readFileSync(source, 'utf8');
      } catch (er) {
        contents = '';
      }
    }

    // Format the line from the original source code like node does
    if (contents) {
      var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
      if (code) {
        return source + ':' + line + '\n' + code + '\n' +
          new Array(column).join(' ') + '^';
      }
    }
  }
  return null;
}

function printErrorAndExit (error) {
  var source = getErrorSource(error);

  // Ensure error is printed synchronously and not truncated
  if (process.stderr._handle && process.stderr._handle.setBlocking) {
    process.stderr._handle.setBlocking(true);
  }

  if (source) {
    console.error();
    console.error(source);
  }

  console.error(error.stack);
  process.exit(1);
}

function shimEmitUncaughtException () {
  var origEmit = process.emit;

  process.emit = function (type) {
    if (type === 'uncaughtException') {
      var hasStack = (arguments[1] && arguments[1].stack);
      var hasListeners = (this.listeners(type).length > 0);

      if (hasStack && !hasListeners) {
        return printErrorAndExit(arguments[1]);
      }
    }

    return origEmit.apply(this, arguments);
  };
}

var originalRetrieveFileHandlers = retrieveFileHandlers.slice(0);
var originalRetrieveMapHandlers = retrieveMapHandlers.slice(0);

exports.wrapCallSite = wrapCallSite;
exports.getErrorSource = getErrorSource;
exports.mapSourcePosition = mapSourcePosition;
exports.retrieveSourceMap = retrieveSourceMap;

exports.install = function(options) {
  options = options || {};

  if (options.environment) {
    environment = options.environment;
    if (["node", "browser", "auto"].indexOf(environment) === -1) {
      throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}")
    }
  }

  // Allow sources to be found by methods other than reading the files
  // directly from disk.
  if (options.retrieveFile) {
    if (options.overrideRetrieveFile) {
      retrieveFileHandlers.length = 0;
    }

    retrieveFileHandlers.unshift(options.retrieveFile);
  }

  // Allow source maps to be found by methods other than reading the files
  // directly from disk.
  if (options.retrieveSourceMap) {
    if (options.overrideRetrieveSourceMap) {
      retrieveMapHandlers.length = 0;
    }

    retrieveMapHandlers.unshift(options.retrieveSourceMap);
  }

  // Support runtime transpilers that include inline source maps
  if (options.hookRequire && !isInBrowser()) {
    var Module;
    try {
      Module = __webpack_require__(132282);
    } catch (err) {
      // NOP: Loading in catch block to convert webpack error to warning.
    }
    var $compile = Module.prototype._compile;

    if (!$compile.__sourceMapSupport) {
      Module.prototype._compile = function(content, filename) {
        fileContentsCache[filename] = content;
        sourceMapCache[filename] = undefined;
        return $compile.call(this, content, filename);
      };

      Module.prototype._compile.__sourceMapSupport = true;
    }
  }

  // Configure options
  if (!emptyCacheBetweenOperations) {
    emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ?
      options.emptyCacheBetweenOperations : false;
  }

  // Install the error reformatter
  if (!errorFormatterInstalled) {
    errorFormatterInstalled = true;
    Error.prepareStackTrace = prepareStackTrace;
  }

  if (!uncaughtShimInstalled) {
    var installHandler = 'handleUncaughtExceptions' in options ?
      options.handleUncaughtExceptions : true;

    // Provide the option to not install the uncaught exception handler. This is
    // to support other uncaught exception handlers (in test frameworks, for
    // example). If this handler is not installed and there are no other uncaught
    // exception handlers, uncaught exceptions will be caught by node's built-in
    // exception handler and the process will still be terminated. However, the
    // generated JavaScript code will be shown above the stack trace instead of
    // the original source code.
    if (installHandler && hasGlobalProcessEventEmitter()) {
      uncaughtShimInstalled = true;
      shimEmitUncaughtException();
    }
  }
};

exports.resetRetrieveHandlers = function() {
  retrieveFileHandlers.length = 0;
  retrieveMapHandlers.length = 0;

  retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
  retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
  
  retrieveSourceMap = handlerExec(retrieveMapHandlers);
  retrieveFile = handlerExec(retrieveFileHandlers);
}


/***/ }),

/***/ 626780:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



/*<replacement>*/

var Buffer = __webpack_require__(289509).Buffer;
/*</replacement>*/

var isEncoding = Buffer.isEncoding || function (encoding) {
  encoding = '' + encoding;
  switch (encoding && encoding.toLowerCase()) {
    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
      return true;
    default:
      return false;
  }
};

function _normalizeEncoding(enc) {
  if (!enc) return 'utf8';
  var retried;
  while (true) {
    switch (enc) {
      case 'utf8':
      case 'utf-8':
        return 'utf8';
      case 'ucs2':
      case 'ucs-2':
      case 'utf16le':
      case 'utf-16le':
        return 'utf16le';
      case 'latin1':
      case 'binary':
        return 'latin1';
      case 'base64':
      case 'ascii':
      case 'hex':
        return enc;
      default:
        if (retried) return; // undefined
        enc = ('' + enc).toLowerCase();
        retried = true;
    }
  }
};

// Do not cache `Buffer.isEncoding` when checking encoding names as some
// modules monkey-patch it to support additional encodings
function normalizeEncoding(enc) {
  var nenc = _normalizeEncoding(enc);
  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  return nenc || enc;
}

// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters.
exports.s = StringDecoder;
function StringDecoder(encoding) {
  this.encoding = normalizeEncoding(encoding);
  var nb;
  switch (this.encoding) {
    case 'utf16le':
      this.text = utf16Text;
      this.end = utf16End;
      nb = 4;
      break;
    case 'utf8':
      this.fillLast = utf8FillLast;
      nb = 4;
      break;
    case 'base64':
      this.text = base64Text;
      this.end = base64End;
      nb = 3;
      break;
    default:
      this.write = simpleWrite;
      this.end = simpleEnd;
      return;
  }
  this.lastNeed = 0;
  this.lastTotal = 0;
  this.lastChar = Buffer.allocUnsafe(nb);
}

StringDecoder.prototype.write = function (buf) {
  if (buf.length === 0) return '';
  var r;
  var i;
  if (this.lastNeed) {
    r = this.fillLast(buf);
    if (r === undefined) return '';
    i = this.lastNeed;
    this.lastNeed = 0;
  } else {
    i = 0;
  }
  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  return r || '';
};

StringDecoder.prototype.end = utf8End;

// Returns only complete characters in a Buffer
StringDecoder.prototype.text = utf8Text;

// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
StringDecoder.prototype.fillLast = function (buf) {
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  this.lastNeed -= buf.length;
};

// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
// continuation byte. If an invalid byte is detected, -2 is returned.
function utf8CheckByte(byte) {
  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  return byte >> 6 === 0x02 ? -1 : -2;
}

// Checks at most 3 bytes at the end of a Buffer in order to detect an
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
// needed to complete the UTF-8 character (if applicable) are returned.
function utf8CheckIncomplete(self, buf, i) {
  var j = buf.length - 1;
  if (j < i) return 0;
  var nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 1;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) self.lastNeed = nb - 2;
    return nb;
  }
  if (--j < i || nb === -2) return 0;
  nb = utf8CheckByte(buf[j]);
  if (nb >= 0) {
    if (nb > 0) {
      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
    }
    return nb;
  }
  return 0;
}

// Validates as many continuation bytes for a multi-byte UTF-8 character as
// needed or are available. If we see a non-continuation byte where we expect
// one, we "replace" the validated continuation bytes we've seen so far with
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
// behavior. The continuation byte check is included three times in the case
// where all of the continuation bytes for a character exist in the same buffer.
// It is also done this way as a slight performance increase instead of using a
// loop.
function utf8CheckExtraBytes(self, buf, p) {
  if ((buf[0] & 0xC0) !== 0x80) {
    self.lastNeed = 0;
    return '\ufffd';
  }
  if (self.lastNeed > 1 && buf.length > 1) {
    if ((buf[1] & 0xC0) !== 0x80) {
      self.lastNeed = 1;
      return '\ufffd';
    }
    if (self.lastNeed > 2 && buf.length > 2) {
      if ((buf[2] & 0xC0) !== 0x80) {
        self.lastNeed = 2;
        return '\ufffd';
      }
    }
  }
}

// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
function utf8FillLast(buf) {
  var p = this.lastTotal - this.lastNeed;
  var r = utf8CheckExtraBytes(this, buf, p);
  if (r !== undefined) return r;
  if (this.lastNeed <= buf.length) {
    buf.copy(this.lastChar, p, 0, this.lastNeed);
    return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  }
  buf.copy(this.lastChar, p, 0, buf.length);
  this.lastNeed -= buf.length;
}

// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
// partial character, the character's bytes are buffered until the required
// number of bytes are available.
function utf8Text(buf, i) {
  var total = utf8CheckIncomplete(this, buf, i);
  if (!this.lastNeed) return buf.toString('utf8', i);
  this.lastTotal = total;
  var end = buf.length - (total - this.lastNeed);
  buf.copy(this.lastChar, 0, end);
  return buf.toString('utf8', i, end);
}

// For UTF-8, a replacement character is added when ending on a partial
// character.
function utf8End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + '\ufffd';
  return r;
}

// UTF-16LE typically needs two bytes per character, but even if we have an even
// number of bytes available, we need to check if we end on a leading/high
// surrogate. In that case, we need to wait for the next two bytes in order to
// decode the last character properly.
function utf16Text(buf, i) {
  if ((buf.length - i) % 2 === 0) {
    var r = buf.toString('utf16le', i);
    if (r) {
      var c = r.charCodeAt(r.length - 1);
      if (c >= 0xD800 && c <= 0xDBFF) {
        this.lastNeed = 2;
        this.lastTotal = 4;
        this.lastChar[0] = buf[buf.length - 2];
        this.lastChar[1] = buf[buf.length - 1];
        return r.slice(0, -1);
      }
    }
    return r;
  }
  this.lastNeed = 1;
  this.lastTotal = 2;
  this.lastChar[0] = buf[buf.length - 1];
  return buf.toString('utf16le', i, buf.length - 1);
}

// For UTF-16LE we do not explicitly append special replacement characters if we
// end on a partial character, we simply let v8 handle that.
function utf16End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) {
    var end = this.lastTotal - this.lastNeed;
    return r + this.lastChar.toString('utf16le', 0, end);
  }
  return r;
}

function base64Text(buf, i) {
  var n = (buf.length - i) % 3;
  if (n === 0) return buf.toString('base64', i);
  this.lastNeed = 3 - n;
  this.lastTotal = 3;
  if (n === 1) {
    this.lastChar[0] = buf[buf.length - 1];
  } else {
    this.lastChar[0] = buf[buf.length - 2];
    this.lastChar[1] = buf[buf.length - 1];
  }
  return buf.toString('base64', i, buf.length - n);
}

function base64End(buf) {
  var r = buf && buf.length ? this.write(buf) : '';
  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  return r;
}

// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) {
  return buf.toString(this.encoding);
}

function simpleEnd(buf) {
  return buf && buf.length ? this.write(buf) : '';
}

/***/ }),

/***/ 156783:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*!
 * Tmp
 *
 * Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
 *
 * MIT Licensed
 */

/*
 * Module dependencies.
 */
const fs = __webpack_require__(935747);
const os = __webpack_require__(712087);
const path = __webpack_require__(385622);
const crypto = __webpack_require__(676417);
const _c = fs.constants && os.constants ?
  { fs: fs.constants, os: os.constants } :
  process.binding('constants');
const rimraf = __webpack_require__(950984);

/*
 * The working inner variables.
 */
const
  // the random characters to choose from
  RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',

  TEMPLATE_PATTERN = /XXXXXX/,

  DEFAULT_TRIES = 3,

  CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR),

  EBADF = _c.EBADF || _c.os.errno.EBADF,
  ENOENT = _c.ENOENT || _c.os.errno.ENOENT,

  DIR_MODE = 448 /* 0o700 */,
  FILE_MODE = 384 /* 0o600 */,

  EXIT = 'exit',

  SIGINT = 'SIGINT',

  // this will hold the objects need to be removed on exit
  _removeObjects = [];

var
  _gracefulCleanup = false;

/**
 * Random name generator based on crypto.
 * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
 *
 * @param {number} howMany
 * @returns {string} the generated random name
 * @private
 */
function _randomChars(howMany) {
  var
    value = [],
    rnd = null;

  // make sure that we do not fail because we ran out of entropy
  try {
    rnd = crypto.randomBytes(howMany);
  } catch (e) {
    rnd = crypto.pseudoRandomBytes(howMany);
  }

  for (var i = 0; i < howMany; i++) {
    value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
  }

  return value.join('');
}

/**
 * Checks whether the `obj` parameter is defined or not.
 *
 * @param {Object} obj
 * @returns {boolean} true if the object is undefined
 * @private
 */
function _isUndefined(obj) {
  return typeof obj === 'undefined';
}

/**
 * Parses the function arguments.
 *
 * This function helps to have optional arguments.
 *
 * @param {(Options|Function)} options
 * @param {Function} callback
 * @returns {Array} parsed arguments
 * @private
 */
function _parseArguments(options, callback) {
  /* istanbul ignore else */
  if (typeof options === 'function') {
    return [{}, options];
  }

  /* istanbul ignore else */
  if (_isUndefined(options)) {
    return [{}, callback];
  }

  return [options, callback];
}

/**
 * Generates a new temporary name.
 *
 * @param {Object} opts
 * @returns {string} the new random name according to opts
 * @private
 */
function _generateTmpName(opts) {

  const tmpDir = _getTmpDir();

  // fail early on missing tmp dir
  if (isBlank(opts.dir) && isBlank(tmpDir)) {
    throw new Error('No tmp dir specified');
  }

  /* istanbul ignore else */
  if (!isBlank(opts.name)) {
    return path.join(opts.dir || tmpDir, opts.name);
  }

  // mkstemps like template
  // opts.template has already been guarded in tmpName() below
  /* istanbul ignore else */
  if (opts.template) {
    var template = opts.template;
    // make sure that we prepend the tmp path if none was given
    /* istanbul ignore else */
    if (path.basename(template) === template)
      template = path.join(opts.dir || tmpDir, template);
    return template.replace(TEMPLATE_PATTERN, _randomChars(6));
  }

  // prefix and postfix
  const name = [
    (isBlank(opts.prefix) ? 'tmp-' : opts.prefix),
    process.pid,
    _randomChars(12),
    (opts.postfix ? opts.postfix : '')
  ].join('');

  return path.join(opts.dir || tmpDir, name);
}

/**
 * Gets a temporary file name.
 *
 * @param {(Options|tmpNameCallback)} options options or callback
 * @param {?tmpNameCallback} callback the callback function
 */
function tmpName(options, callback) {
  var
    args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1],
    tries = !isBlank(opts.name) ? 1 : opts.tries || DEFAULT_TRIES;

  /* istanbul ignore else */
  if (isNaN(tries) || tries < 0)
    return cb(new Error('Invalid tries'));

  /* istanbul ignore else */
  if (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    return cb(new Error('Invalid template provided'));

  (function _getUniqueName() {
    try {
      const name = _generateTmpName(opts);

      // check whether the path exists then retry if needed
      fs.stat(name, function (err) {
        /* istanbul ignore else */
        if (!err) {
          /* istanbul ignore else */
          if (tries-- > 0) return _getUniqueName();

          return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
        }

        cb(null, name);
      });
    } catch (err) {
      cb(err);
    }
  }());
}

/**
 * Synchronous version of tmpName.
 *
 * @param {Object} options
 * @returns {string} the generated random name
 * @throws {Error} if the options are invalid or could not generate a filename
 */
function tmpNameSync(options) {
  var
    args = _parseArguments(options),
    opts = args[0],
    tries = !isBlank(opts.name) ? 1 : opts.tries || DEFAULT_TRIES;

  /* istanbul ignore else */
  if (isNaN(tries) || tries < 0)
    throw new Error('Invalid tries');

  /* istanbul ignore else */
  if (opts.template && !opts.template.match(TEMPLATE_PATTERN))
    throw new Error('Invalid template provided');

  do {
    const name = _generateTmpName(opts);
    try {
      fs.statSync(name);
    } catch (e) {
      return name;
    }
  } while (tries-- > 0);

  throw new Error('Could not get a unique tmp filename, max tries reached');
}

/**
 * Creates and opens a temporary file.
 *
 * @param {(Options|fileCallback)} options the config options or the callback function
 * @param {?fileCallback} callback
 */
function file(options, callback) {
  var
    args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1];

  // gets a temporary filename
  tmpName(opts, function _tmpNameCreated(err, name) {
    /* istanbul ignore else */
    if (err) return cb(err);

    // create and open the file
    fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
      /* istanbul ignore else */
      if (err) return cb(err);

      if (opts.discardDescriptor) {
        return fs.close(fd, function _discardCallback(err) {
          /* istanbul ignore else */
          if (err) {
            // Low probability, and the file exists, so this could be
            // ignored.  If it isn't we certainly need to unlink the
            // file, and if that fails too its error is more
            // important.
            try {
              fs.unlinkSync(name);
            } catch (e) {
              if (!isENOENT(e)) {
                err = e;
              }
            }
            return cb(err);
          }
          cb(null, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts));
        });
      }
      /* istanbul ignore else */
      if (opts.detachDescriptor) {
        return cb(null, name, fd, _prepareTmpFileRemoveCallback(name, -1, opts));
      }
      cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts));
    });
  });
}

/**
 * Synchronous version of file.
 *
 * @param {Options} options
 * @returns {FileSyncObject} object consists of name, fd and removeCallback
 * @throws {Error} if cannot create a file
 */
function fileSync(options) {
  var
    args = _parseArguments(options),
    opts = args[0];

  const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
  const name = tmpNameSync(opts);
  var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
  /* istanbul ignore else */
  if (opts.discardDescriptor) {
    fs.closeSync(fd);
    fd = undefined;
  }

  return {
    name: name,
    fd: fd,
    removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts)
  };
}

/**
 * Creates a temporary directory.
 *
 * @param {(Options|dirCallback)} options the options or the callback function
 * @param {?dirCallback} callback
 */
function dir(options, callback) {
  var
    args = _parseArguments(options, callback),
    opts = args[0],
    cb = args[1];

  // gets a temporary filename
  tmpName(opts, function _tmpNameCreated(err, name) {
    /* istanbul ignore else */
    if (err) return cb(err);

    // create the directory
    fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
      /* istanbul ignore else */
      if (err) return cb(err);

      cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
    });
  });
}

/**
 * Synchronous version of dir.
 *
 * @param {Options} options
 * @returns {DirSyncObject} object consists of name and removeCallback
 * @throws {Error} if it cannot create a directory
 */
function dirSync(options) {
  var
    args = _parseArguments(options),
    opts = args[0];

  const name = tmpNameSync(opts);
  fs.mkdirSync(name, opts.mode || DIR_MODE);

  return {
    name: name,
    removeCallback: _prepareTmpDirRemoveCallback(name, opts)
  };
}

/**
 * Removes files asynchronously.
 *
 * @param {Object} fdPath
 * @param {Function} next
 * @private
 */
function _removeFileAsync(fdPath, next) {
  const _handler = function (err) {
    if (err && !isENOENT(err)) {
      // reraise any unanticipated error
      return next(err);
    }
    next();
  }

  if (0 <= fdPath[0])
    fs.close(fdPath[0], function (err) {
      fs.unlink(fdPath[1], _handler);
    });
  else fs.unlink(fdPath[1], _handler);
}

/**
 * Removes files synchronously.
 *
 * @param {Object} fdPath
 * @private
 */
function _removeFileSync(fdPath) {
  try {
    if (0 <= fdPath[0]) fs.closeSync(fdPath[0]);
  } catch (e) {
    // reraise any unanticipated error
    if (!isEBADF(e) && !isENOENT(e)) throw e;
  } finally {
    try {
      fs.unlinkSync(fdPath[1]);
    }
    catch (e) {
      // reraise any unanticipated error
      if (!isENOENT(e)) throw e;
    }
  }
}

/**
 * Prepares the callback for removal of the temporary file.
 *
 * @param {string} name the path of the file
 * @param {number} fd file descriptor
 * @param {Object} opts
 * @returns {fileCallback}
 * @private
 */
function _prepareTmpFileRemoveCallback(name, fd, opts) {
  const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name]);
  const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], removeCallbackSync);

  if (!opts.keep) _removeObjects.unshift(removeCallbackSync);

  return removeCallback;
}

/**
 * Simple wrapper for rimraf.
 *
 * @param {string} dirPath
 * @param {Function} next
 * @private
 */
function _rimrafRemoveDirWrapper(dirPath, next) {
  rimraf(dirPath, next);
}

/**
 * Simple wrapper for rimraf.sync.
 *
 * @param {string} dirPath
 * @private
 */
function _rimrafRemoveDirSyncWrapper(dirPath, next) {
  try {
    return next(null, rimraf.sync(dirPath));
  } catch (err) {
    return next(err);
  }
}

/**
 * Prepares the callback for removal of the temporary directory.
 *
 * @param {string} name
 * @param {Object} opts
 * @returns {Function} the callback
 * @private
 */
function _prepareTmpDirRemoveCallback(name, opts) {
  const removeFunction = opts.unsafeCleanup ? _rimrafRemoveDirWrapper : fs.rmdir.bind(fs);
  const removeFunctionSync = opts.unsafeCleanup ? _rimrafRemoveDirSyncWrapper : fs.rmdirSync.bind(fs);
  const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name);
  const removeCallback = _prepareRemoveCallback(removeFunction, name, removeCallbackSync);
  if (!opts.keep) _removeObjects.unshift(removeCallbackSync);

  return removeCallback;
}

/**
 * Creates a guarded function wrapping the removeFunction call.
 *
 * @param {Function} removeFunction
 * @param {Object} arg
 * @returns {Function}
 * @private
 */
function _prepareRemoveCallback(removeFunction, arg, cleanupCallbackSync) {
  var called = false;

  return function _cleanupCallback(next) {
    next = next || function () {};
    if (!called) {
      const toRemove = cleanupCallbackSync || _cleanupCallback;
      const index = _removeObjects.indexOf(toRemove);
      /* istanbul ignore else */
      if (index >= 0) _removeObjects.splice(index, 1);

      called = true;
      // sync?
      if (removeFunction.length === 1) {
        try {
          removeFunction(arg);
          return next(null);
        }
        catch (err) {
          // if no next is provided and since we are
          // in silent cleanup mode on process exit,
          // we will ignore the error
          return next(err);
        }
      } else return removeFunction(arg, next);
    } else return next(new Error('cleanup callback has already been called'));
  };
}

/**
 * The garbage collector.
 *
 * @private
 */
function _garbageCollector() {
  /* istanbul ignore else */
  if (!_gracefulCleanup) return;

  // the function being called removes itself from _removeObjects,
  // loop until _removeObjects is empty
  while (_removeObjects.length) {
    try {
      _removeObjects[0]();
    } catch (e) {
      // already removed?
    }
  }
}

/**
 * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows.
 */
function isEBADF(error) {
  return isExpectedError(error, -EBADF, 'EBADF');
}

/**
 * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows.
 */
function isENOENT(error) {
  return isExpectedError(error, -ENOENT, 'ENOENT');
}

/**
 * Helper to determine whether the expected error code matches the actual code and errno,
 * which will differ between the supported node versions.
 *
 * - Node >= 7.0:
 *   error.code {string}
 *   error.errno {string|number} any numerical value will be negated
 *
 * - Node >= 6.0 < 7.0:
 *   error.code {string}
 *   error.errno {number} negated
 *
 * - Node >= 4.0 < 6.0: introduces SystemError
 *   error.code {string}
 *   error.errno {number} negated
 *
 * - Node >= 0.10 < 4.0:
 *   error.code {number} negated
 *   error.errno n/a
 */
function isExpectedError(error, code, errno) {
  return error.code === code || error.code === errno;
}

/**
 * Helper which determines whether a string s is blank, that is undefined, or empty or null.
 *
 * @private
 * @param {string} s
 * @returns {Boolean} true whether the string s is blank, false otherwise
 */
function isBlank(s) {
  return s === null || s === undefined || !s.trim();
}

/**
 * Sets the graceful cleanup.
 */
function setGracefulCleanup() {
  _gracefulCleanup = true;
}

/**
 * Returns the currently configured tmp dir from os.tmpdir().
 *
 * @private
 * @returns {string} the currently configured tmp dir
 */
function _getTmpDir() {
  return os.tmpdir();
}

/**
 * If there are multiple different versions of tmp in place, make sure that
 * we recognize the old listeners.
 *
 * @param {Function} listener
 * @private
 * @returns {Boolean} true whether listener is a legacy listener
 */
function _is_legacy_listener(listener) {
  return (listener.name === '_exit' || listener.name === '_uncaughtExceptionThrown')
    && listener.toString().indexOf('_garbageCollector();') > -1;
}

/**
 * Safely install SIGINT listener.
 *
 * NOTE: this will only work on OSX and Linux.
 *
 * @private
 */
function _safely_install_sigint_listener() {

  const listeners = process.listeners(SIGINT);
  const existingListeners = [];
  for (let i = 0, length = listeners.length; i < length; i++) {
    const lstnr = listeners[i];
    /* istanbul ignore else */
    if (lstnr.name === '_tmp$sigint_listener') {
      existingListeners.push(lstnr);
      process.removeListener(SIGINT, lstnr);
    }
  }
  process.on(SIGINT, function _tmp$sigint_listener(doExit) {
    for (let i = 0, length = existingListeners.length; i < length; i++) {
      // let the existing listener do the garbage collection (e.g. jest sandbox)
      try {
        existingListeners[i](false);
      } catch (err) {
        // ignore
      }
    }
    try {
      // force the garbage collector even it is called again in the exit listener
      _garbageCollector();
    } finally {
      if (!!doExit) {
        process.exit(0);
      }
    }
  });
}

/**
 * Safely install process exit listener.
 *
 * @private
 */
function _safely_install_exit_listener() {
  const listeners = process.listeners(EXIT);

  // collect any existing listeners
  const existingListeners = [];
  for (let i = 0, length = listeners.length; i < length; i++) {
    const lstnr = listeners[i];
    /* istanbul ignore else */
    // TODO: remove support for legacy listeners once release 1.0.0 is out
    if (lstnr.name === '_tmp$safe_listener' || _is_legacy_listener(lstnr)) {
      // we must forget about the uncaughtException listener, hopefully it is ours
      if (lstnr.name !== '_uncaughtExceptionThrown') {
        existingListeners.push(lstnr);
      }
      process.removeListener(EXIT, lstnr);
    }
  }
  // TODO: what was the data parameter good for?
  process.addListener(EXIT, function _tmp$safe_listener(data) {
    for (let i = 0, length = existingListeners.length; i < length; i++) {
      // let the existing listener do the garbage collection (e.g. jest sandbox)
      try {
        existingListeners[i](data);
      } catch (err) {
        // ignore
      }
    }
    _garbageCollector();
  });
}

_safely_install_exit_listener();
_safely_install_sigint_listener();

/**
 * Configuration options.
 *
 * @typedef {Object} Options
 * @property {?number} tries the number of tries before give up the name generation
 * @property {?string} template the "mkstemp" like filename template
 * @property {?string} name fix name
 * @property {?string} dir the tmp directory to use
 * @property {?string} prefix prefix for the generated name
 * @property {?string} postfix postfix for the generated name
 * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty
 */

/**
 * @typedef {Object} FileSyncObject
 * @property {string} name the name of the file
 * @property {string} fd the file descriptor
 * @property {fileCallback} removeCallback the callback function to remove the file
 */

/**
 * @typedef {Object} DirSyncObject
 * @property {string} name the name of the directory
 * @property {fileCallback} removeCallback the callback function to remove the directory
 */

/**
 * @callback tmpNameCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 */

/**
 * @callback fileCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {number} fd the file descriptor
 * @param {cleanupCallback} fn the cleanup callback function
 */

/**
 * @callback dirCallback
 * @param {?Error} err the error object if anything goes wrong
 * @param {string} name the temporary file name
 * @param {cleanupCallback} fn the cleanup callback function
 */

/**
 * Removes the temporary created file or directory.
 *
 * @callback cleanupCallback
 * @param {simpleCallback} [next] function to call after entry was removed
 */

/**
 * Callback function for function composition.
 * @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57}
 *
 * @callback simpleCallback
 */

// exporting all the needed methods

// evaluate os.tmpdir() lazily, mainly for simplifying testing but it also will
// allow users to reconfigure the temporary directory
Object.defineProperty(module.exports, "tmpdir", ({
  enumerable: true,
  configurable: false,
  get: function () {
    return _getTmpDir();
  }
}));

module.exports.dir = dir;
module.exports.dirSync = dirSync;

module.exports.file = file;
module.exports.fileSync = fileSync;

module.exports.tmpName = tmpName;
module.exports.tmpNameSync = tmpNameSync;

module.exports.setGracefulCleanup = setGracefulCleanup;


/***/ }),

/***/ 836695:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var swarm = __webpack_require__(567325);


var Bzz = function Bzz(provider) {

    this.givenProvider = Bzz.givenProvider;

    if (provider && provider._requestManager) {
        provider = provider.currentProvider;
    }

    // only allow file picker when in browser
    if(typeof document !== 'undefined') {
        this.pick = swarm.pick;
    }

    this.setProvider(provider);
};

// set default ethereum provider
/* jshint ignore:start */
Bzz.givenProvider = null;
if (typeof ethereum !== 'undefined' && ethereum.bzz) {
    Bzz.givenProvider = ethereum.bzz;
}
/* jshint ignore:end */

Bzz.prototype.setProvider = function(provider) {
    // is ethereum provider
    if(_.isObject(provider) && _.isString(provider.bzz)) {
        provider = provider.bzz;
    // is no string, set default
    }
    // else if(!_.isString(provider)) {
    //      provider = 'http://swarm-gateways.net'; // default to gateway
    // }


    if(_.isString(provider)) {
        this.currentProvider = provider;
    } else {
        this.currentProvider = null;

        var noProviderError = new Error('No provider set, please set one using bzz.setProvider().');

        this.download = this.upload = this.isAvailable = function(){
            throw noProviderError;
        };

        return false;
    }

    // add functions
    this.download = swarm.at(provider).download;
    this.upload = swarm.at(provider).upload;
    this.isAvailable = swarm.at(provider).isAvailable;

    return true;
};


module.exports = Bzz;



/***/ }),

/***/ 706531:
/***/ ((module) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file errors.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @author Marek Kotewicz <marek@parity.io>
 * @date 2017
 */



module.exports = {
    ErrorResponse: function (result) {
        var message = !!result && !!result.error && !!result.error.message ? result.error.message : JSON.stringify(result);
        var data = (!!result.error && !!result.error.data) ? result.error.data : null;
        var err = new Error('Returned error: ' + message);
        err.data = data;
        return err;
    },
    InvalidNumberOfParams: function (got, expected, method) {
        return new Error('Invalid number of parameters for "'+ method +'". Got '+ got +' expected '+ expected +'!');
    },
    InvalidConnection: function (host, event){
        return this.ConnectionError('CONNECTION ERROR: Couldn\'t connect to node '+ host +'.', event);
    },
    InvalidProvider: function () {
        return new Error('Provider not set or invalid');
    },
    InvalidResponse: function (result){
        var message = !!result && !!result.error && !!result.error.message ? result.error.message : 'Invalid JSON RPC response: ' + JSON.stringify(result);
        return new Error(message);
    },
    ConnectionTimeout: function (ms){
        return new Error('CONNECTION TIMEOUT: timeout of ' + ms + ' ms achived');
    },
    ConnectionNotOpenError: function (event){
        return this.ConnectionError('connection not open on send()', event);
    },
    ConnectionCloseError: function (event){
        if (typeof event === 'object' && event.code && event.reason) {
            return this.ConnectionError(
                'CONNECTION ERROR: The connection got closed with ' +
                'the close code `' + event.code + '` and the following ' +
                'reason string `' + event.reason + '`',
                event
            );
        }

        return new Error('CONNECTION ERROR: The connection closed unexpectedly');
    },
    MaxAttemptsReachedOnReconnectingError: function (){
        return new Error('Maximum number of reconnect attempts reached!');
    },
    PendingRequestsOnReconnectingError: function (){
        return new Error('CONNECTION ERROR: Provider started to reconnect before the response got received!');
    },
    ConnectionError: function (msg, event){
        const error = new Error(msg);
        if (event) {
            error.code = event.code;
            error.reason = event.reason;
        }

        return error;
    },
    RevertInstructionError: function(reason, signature) {
        var error = new Error('Your request got reverted with the following reason string: ' + reason);
        error.reason = reason;
        error.signature = signature;

        return error;
    },
    TransactionRevertInstructionError: function(reason, signature, receipt) {
        var error = new Error('Transaction has been reverted by the EVM:\n' + JSON.stringify(receipt, null, 2));
        error.reason = reason;
        error.signature = signature;
        error.receipt = receipt;

        return error;
    },
    TransactionError: function(message, receipt) {
        var error = new Error(message);
        error.receipt = receipt;

        return error;
    },
    NoContractAddressFoundError: function(receipt) {
       return this.TransactionError('The transaction receipt didn\'t contain a contract address.', receipt);
    },
    ContractCodeNotStoredError: function(receipt) {
        return this.TransactionError('The contract code couldn\'t be stored, please check your gas limit.', receipt);
    },
    TransactionRevertedWithoutReasonError: function(receipt) {
        return this.TransactionError('Transaction has been reverted by the EVM:\n' + JSON.stringify(receipt, null, 2), receipt);
    },
    TransactionOutOfGasError: function(receipt) {
        return this.TransactionError('Transaction ran out of gas. Please provide more gas:\n' + JSON.stringify(receipt, null, 2), receipt);
    },
    ResolverMethodMissingError: function(address, name) {
        return new Error('The resolver at ' + address + 'does not implement requested method: "' + name + '".');
    },
    ContractMissingABIError: function() {
        return new Error('You must provide the json interface of the contract when instantiating a contract object.');
    },
    ContractOnceRequiresCallbackError: function() {
        return new Error('Once requires a callback as the second parameter.');
    },
    ContractEventDoesNotExistError: function(eventName) {
        return new Error('Event "' + eventName + '" doesn\'t exist in this contract.');
    },
    ContractReservedEventError: function(type) {
        return new Error('The event "'+ type +'" is a reserved event name, you can\'t use it.');
    },
    ContractMissingDeployDataError: function() {
        return new Error('No "data" specified in neither the given options, nor the default options.');
    },
    ContractNoAddressDefinedError: function() {
        return new Error('This contract object doesn\'t have address set yet, please set an address first.');
    },
    ContractNoFromAddressDefinedError: function() {
        return new Error('No "from" address specified in neither the given options, nor the default options.');
    }
};


/***/ }),

/***/ 646886:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file formatters.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @author Marek Kotewicz <marek@parity.io>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var utils = __webpack_require__(328700);
var Iban = __webpack_require__(838109);


/**
 * Will format the given storage key array values to hex strings.
 *
 * @method inputStorageKeysFormatter
 *
 * @param {Array<Number|String|BN|BigNumber>} keys
 *
 * @returns {Array<String>}
 */
var inputStorageKeysFormatter = function (keys) {
    return keys.map(utils.numberToHex);
};

/**
 * Will format the given proof response from the node.
 *
 * @method outputProofFormatter
 *
 * @param {object} proof
 *
 * @returns {object}
 */
var outputProofFormatter = function (proof) {
    proof.address = utils.toChecksumAddress(proof.address);
    proof.nonce = utils.hexToNumberString(proof.nonce);
    proof.balance = utils.hexToNumberString(proof.balance);

    return proof;
};

/**
 * Should the format output to a big number
 *
 * @method outputBigNumberFormatter
 *
 * @param {String|Number|BigNumber|BN} number
 *
 * @returns {BN} object
 */
var outputBigNumberFormatter = function (number) {
    return utils.toBN(number).toString(10);
};

/**
 * Returns true if the given blockNumber is 'latest', 'pending', or 'earliest.
 *
 * @method isPredefinedBlockNumber
 *
 * @param {String} blockNumber
 *
 * @returns {Boolean}
 */
var isPredefinedBlockNumber = function (blockNumber) {
    return blockNumber === 'latest' || blockNumber === 'pending' || blockNumber === 'earliest';
};

/**
 * Returns the given block number as hex string or does return the defaultBlock property of the current module
 *
 * @method inputDefaultBlockNumberFormatter
 *
 * @param {String|Number|BN|BigNumber} blockNumber
 *
 * @returns {String}
 */
var inputDefaultBlockNumberFormatter = function (blockNumber) {
    if (this && (blockNumber === undefined || blockNumber === null)) {
        return inputBlockNumberFormatter(this.defaultBlock);
    }

    return inputBlockNumberFormatter(blockNumber);
};

/**
 * Returns the given block number as hex string or the predefined block number 'latest', 'pending', 'earliest', 'genesis'
 *
 * @param {String|Number|BN|BigNumber} blockNumber
 *
 * @returns {String}
 */
var inputBlockNumberFormatter = function (blockNumber) {
    if (blockNumber === undefined) {
        return undefined;
    }

    if (isPredefinedBlockNumber(blockNumber)) {
        return blockNumber;
    }

    if (blockNumber === 'genesis') {
        return '0x0';
    }

    return (utils.isHexStrict(blockNumber)) ? ((_.isString(blockNumber)) ? blockNumber.toLowerCase() : blockNumber) : utils.numberToHex(blockNumber);
};

/**
 * Formats the input of a transaction and converts all values to HEX
 *
 * @method _txInputFormatter
 * @param {Object} transaction options
 * @returns object
 */
var _txInputFormatter = function (options) {

    if (options.to) { // it might be contract creation
        options.to = inputAddressFormatter(options.to);
    }

    if (options.data && options.input) {
        throw new Error('You can\'t have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.');
    }

    if (!options.data && options.input) {
        options.data = options.input;
        delete options.input;
    }

    if (options.data && !options.data.startsWith('0x')) {
        options.data = '0x' + options.data;
    }

    if (options.data && !utils.isHex(options.data)) {
        throw new Error('The data field must be HEX encoded data.');
    }

    // allow both
    if (options.gas || options.gasLimit) {
        options.gas = options.gas || options.gasLimit;
    }

    ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) {
        return options[key] !== undefined;
    }).forEach(function (key) {
        options[key] = utils.numberToHex(options[key]);
    });

    return options;
};

/**
 * Formats the input of a transaction and converts all values to HEX
 *
 * @method inputCallFormatter
 * @param {Object} transaction options
 * @returns object
 */
var inputCallFormatter = function (options) {

    options = _txInputFormatter(options);

    var from = options.from || (this ? this.defaultAccount : null);

    if (from) {
        options.from = inputAddressFormatter(from);
    }


    return options;
};

/**
 * Formats the input of a transaction and converts all values to HEX
 *
 * @method inputTransactionFormatter
 * @param {Object} options
 * @returns object
 */
var inputTransactionFormatter = function (options) {

    options = _txInputFormatter(options);

    // check from, only if not number, or object
    if (!_.isNumber(options.from) && !_.isObject(options.from)) {
        options.from = options.from || (this ? this.defaultAccount : null);

        if (!options.from && !_.isNumber(options.from)) {
            throw new Error('The send transactions "from" field must be defined!');
        }

        options.from = inputAddressFormatter(options.from);
    }

    return options;
};

/**
 * Hex encodes the data passed to eth_sign and personal_sign
 *
 * @method inputSignFormatter
 * @param {String} data
 * @returns {String}
 */
var inputSignFormatter = function (data) {
    return (utils.isHexStrict(data)) ? data : utils.utf8ToHex(data);
};

/**
 * Formats the output of a transaction to its proper values
 *
 * @method outputTransactionFormatter
 * @param {Object} tx
 * @returns {Object}
 */
var outputTransactionFormatter = function (tx) {
    if (tx.blockNumber !== null)
        tx.blockNumber = utils.hexToNumber(tx.blockNumber);
    if (tx.transactionIndex !== null)
        tx.transactionIndex = utils.hexToNumber(tx.transactionIndex);
    tx.nonce = utils.hexToNumber(tx.nonce);
    tx.gas = utils.hexToNumber(tx.gas);
    tx.gasPrice = outputBigNumberFormatter(tx.gasPrice);
    tx.value = outputBigNumberFormatter(tx.value);

    if (tx.to && utils.isAddress(tx.to)) { // tx.to could be `0x0` or `null` while contract creation
        tx.to = utils.toChecksumAddress(tx.to);
    } else {
        tx.to = null; // set to `null` if invalid address
    }

    if (tx.from) {
        tx.from = utils.toChecksumAddress(tx.from);
    }

    return tx;
};

/**
 * Formats the output of a transaction receipt to its proper values
 *
 * @method outputTransactionReceiptFormatter
 * @param {Object} receipt
 * @returns {Object}
 */
var outputTransactionReceiptFormatter = function (receipt) {
    if (typeof receipt !== 'object') {
        throw new Error('Received receipt is invalid: ' + receipt);
    }

    if (receipt.blockNumber !== null)
        receipt.blockNumber = utils.hexToNumber(receipt.blockNumber);
    if (receipt.transactionIndex !== null)
        receipt.transactionIndex = utils.hexToNumber(receipt.transactionIndex);
    receipt.cumulativeGasUsed = utils.hexToNumber(receipt.cumulativeGasUsed);
    receipt.gasUsed = utils.hexToNumber(receipt.gasUsed);

    if (_.isArray(receipt.logs)) {
        receipt.logs = receipt.logs.map(outputLogFormatter);
    }

    if (receipt.contractAddress) {
        receipt.contractAddress = utils.toChecksumAddress(receipt.contractAddress);
    }

    if (typeof receipt.status !== 'undefined' && receipt.status !== null) {
        receipt.status = Boolean(parseInt(receipt.status));
    }

    return receipt;
};

/**
 * Formats the output of a block to its proper values
 *
 * @method outputBlockFormatter
 * @param {Object} block
 * @returns {Object}
 */
var outputBlockFormatter = function (block) {

    // transform to number
    block.gasLimit = utils.hexToNumber(block.gasLimit);
    block.gasUsed = utils.hexToNumber(block.gasUsed);
    block.size = utils.hexToNumber(block.size);
    block.timestamp = utils.hexToNumber(block.timestamp);
    if (block.number !== null)
        block.number = utils.hexToNumber(block.number);

    if (block.difficulty)
        block.difficulty = outputBigNumberFormatter(block.difficulty);
    if (block.totalDifficulty)
        block.totalDifficulty = outputBigNumberFormatter(block.totalDifficulty);

    if (_.isArray(block.transactions)) {
        block.transactions.forEach(function (item) {
            if (!_.isString(item))
                return outputTransactionFormatter(item);
        });
    }

    if (block.miner)
        block.miner = utils.toChecksumAddress(block.miner);

    return block;
};

/**
 * Formats the input of a log
 *
 * @method inputLogFormatter
 * @param {Object} log object
 * @returns {Object} log
 */
var inputLogFormatter = function (options) {
    var toTopic = function (value) {

        if (value === null || typeof value === 'undefined')
            return null;

        value = String(value);

        if (value.indexOf('0x') === 0)
            return value;
        else
            return utils.fromUtf8(value);
    };

    if (options.fromBlock || options.fromBlock === 0)
        options.fromBlock = inputBlockNumberFormatter(options.fromBlock);

    if (options.toBlock || options.toBlock === 0)
        options.toBlock = inputBlockNumberFormatter(options.toBlock);


    // make sure topics, get converted to hex
    options.topics = options.topics || [];
    options.topics = options.topics.map(function (topic) {
        return (_.isArray(topic)) ? topic.map(toTopic) : toTopic(topic);
    });

    toTopic = null;

    if (options.address) {
        options.address = (_.isArray(options.address)) ? options.address.map(function (addr) {
            return inputAddressFormatter(addr);
        }) : inputAddressFormatter(options.address);
    }

    return options;
};

/**
 * Formats the output of a log
 *
 * @method outputLogFormatter
 * @param {Object} log object
 * @returns {Object} log
 */
var outputLogFormatter = function (log) {

    // generate a custom log id
    if (typeof log.blockHash === 'string' &&
        typeof log.transactionHash === 'string' &&
        typeof log.logIndex === 'string') {
        var shaId = utils.sha3(log.blockHash.replace('0x', '') + log.transactionHash.replace('0x', '') + log.logIndex.replace('0x', ''));
        log.id = 'log_' + shaId.replace('0x', '').substr(0, 8);
    } else if (!log.id) {
        log.id = null;
    }

    if (log.blockNumber !== null)
        log.blockNumber = utils.hexToNumber(log.blockNumber);
    if (log.transactionIndex !== null)
        log.transactionIndex = utils.hexToNumber(log.transactionIndex);
    if (log.logIndex !== null)
        log.logIndex = utils.hexToNumber(log.logIndex);

    if (log.address) {
        log.address = utils.toChecksumAddress(log.address);
    }

    return log;
};

/**
 * Formats the input of a whisper post and converts all values to HEX
 *
 * @method inputPostFormatter
 * @param {Object} transaction object
 * @returns {Object}
 */
var inputPostFormatter = function (post) {

    // post.payload = utils.toHex(post.payload);

    if (post.ttl)
        post.ttl = utils.numberToHex(post.ttl);
    if (post.workToProve)
        post.workToProve = utils.numberToHex(post.workToProve);
    if (post.priority)
        post.priority = utils.numberToHex(post.priority);

    // fallback
    if (!_.isArray(post.topics)) {
        post.topics = post.topics ? [post.topics] : [];
    }

    // format the following options
    post.topics = post.topics.map(function (topic) {
        // convert only if not hex
        return (topic.indexOf('0x') === 0) ? topic : utils.fromUtf8(topic);
    });

    return post;
};

/**
 * Formats the output of a received post message
 *
 * @method outputPostFormatter
 * @param {Object}
 * @returns {Object}
 */
var outputPostFormatter = function (post) {

    post.expiry = utils.hexToNumber(post.expiry);
    post.sent = utils.hexToNumber(post.sent);
    post.ttl = utils.hexToNumber(post.ttl);
    post.workProved = utils.hexToNumber(post.workProved);
    // post.payloadRaw = post.payload;
    // post.payload = utils.hexToAscii(post.payload);

    // if (utils.isJson(post.payload)) {
    //     post.payload = JSON.parse(post.payload);
    // }

    // format the following options
    if (!post.topics) {
        post.topics = [];
    }
    post.topics = post.topics.map(function (topic) {
        return utils.toUtf8(topic);
    });

    return post;
};

var inputAddressFormatter = function (address) {
    var iban = new Iban(address);
    if (iban.isValid() && iban.isDirect()) {
        return iban.toAddress().toLowerCase();
    } else if (utils.isAddress(address)) {
        return '0x' + address.toLowerCase().replace('0x', '');
    }
    throw new Error('Provided address "' + address + '" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can\'t be converted.');
};


var outputSyncingFormatter = function (result) {

    result.startingBlock = utils.hexToNumber(result.startingBlock);
    result.currentBlock = utils.hexToNumber(result.currentBlock);
    result.highestBlock = utils.hexToNumber(result.highestBlock);
    if (result.knownStates) {
        result.knownStates = utils.hexToNumber(result.knownStates);
        result.pulledStates = utils.hexToNumber(result.pulledStates);
    }

    return result;
};

module.exports = {
    inputDefaultBlockNumberFormatter: inputDefaultBlockNumberFormatter,
    inputBlockNumberFormatter: inputBlockNumberFormatter,
    inputCallFormatter: inputCallFormatter,
    inputTransactionFormatter: inputTransactionFormatter,
    inputAddressFormatter: inputAddressFormatter,
    inputPostFormatter: inputPostFormatter,
    inputLogFormatter: inputLogFormatter,
    inputSignFormatter: inputSignFormatter,
    inputStorageKeysFormatter: inputStorageKeysFormatter,
    outputProofFormatter: outputProofFormatter,
    outputBigNumberFormatter: outputBigNumberFormatter,
    outputTransactionFormatter: outputTransactionFormatter,
    outputTransactionReceiptFormatter: outputTransactionReceiptFormatter,
    outputBlockFormatter: outputBlockFormatter,
    outputLogFormatter: outputLogFormatter,
    outputPostFormatter: outputPostFormatter,
    outputSyncingFormatter: outputSyncingFormatter
};



/***/ }),

/***/ 524763:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var errors = __webpack_require__(706531);
var formatters = __webpack_require__(646886);

module.exports = {
    errors: errors,
    formatters: formatters
};



/***/ }),

/***/ 827123:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @author Marek Kotewicz <marek@parity.io>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var errors = __webpack_require__(524763).errors;
var formatters = __webpack_require__(524763).formatters;
var utils = __webpack_require__(328700);
var promiEvent = __webpack_require__(346327);
var Subscriptions = __webpack_require__(839351).subscriptions;

var EthersTransactionUtils = __webpack_require__(546275);

var Method = function Method(options) {

    if (!options.call || !options.name) {
        throw new Error('When creating a method you need to provide at least the "name" and "call" property.');
    }

    this.name = options.name;
    this.call = options.call;
    this.params = options.params || 0;
    this.inputFormatter = options.inputFormatter;
    this.outputFormatter = options.outputFormatter;
    this.transformPayload = options.transformPayload;
    this.extraFormatters = options.extraFormatters;
    this.abiCoder = options.abiCoder; // Will be used to encode the revert reason string

    this.requestManager = options.requestManager;

    // reference to eth.accounts
    this.accounts = options.accounts;

    this.defaultBlock = options.defaultBlock || 'latest';
    this.defaultAccount = options.defaultAccount || null;
    this.transactionBlockTimeout = options.transactionBlockTimeout || 50;
    this.transactionConfirmationBlocks = options.transactionConfirmationBlocks || 24;
    this.transactionPollingTimeout = options.transactionPollingTimeout || 750;
    this.defaultCommon = options.defaultCommon;
    this.defaultChain = options.defaultChain;
    this.defaultHardfork = options.defaultHardfork;
    this.handleRevert = options.handleRevert;
};

Method.prototype.setRequestManager = function (requestManager, accounts) {
    this.requestManager = requestManager;

    // reference to eth.accounts
    if (accounts) {
        this.accounts = accounts;
    }

};

Method.prototype.createFunction = function (requestManager, accounts) {
    var func = this.buildCall();
    func.call = this.call;

    this.setRequestManager(requestManager || this.requestManager, accounts || this.accounts);

    return func;
};

Method.prototype.attachToObject = function (obj) {
    var func = this.buildCall();
    func.call = this.call;
    var name = this.name.split('.');
    if (name.length > 1) {
        obj[name[0]] = obj[name[0]] || {};
        obj[name[0]][name[1]] = func;
    } else {
        obj[name[0]] = func;
    }
};

/**
 * Should be used to determine name of the jsonrpc method based on arguments
 *
 * @method getCall
 * @param {Array} arguments
 * @return {String} name of jsonrpc method
 */
Method.prototype.getCall = function (args) {
    return _.isFunction(this.call) ? this.call(args) : this.call;
};

/**
 * Should be used to extract callback from array of arguments. Modifies input param
 *
 * @method extractCallback
 * @param {Array} arguments
 * @return {Function|Null} callback, if exists
 */
Method.prototype.extractCallback = function (args) {
    if (_.isFunction(args[args.length - 1])) {
        return args.pop(); // modify the args array!
    }
};

/**
 * Should be called to check if the number of arguments is correct
 *
 * @method validateArgs
 * @param {Array} arguments
 * @throws {Error} if it is not
 */
Method.prototype.validateArgs = function (args) {
    if (args.length !== this.params) {
        throw errors.InvalidNumberOfParams(args.length, this.params, this.name);
    }
};

/**
 * Should be called to format input args of method
 *
 * @method formatInput
 * @param {Array}
 * @return {Array}
 */
Method.prototype.formatInput = function (args) {
    var _this = this;

    if (!this.inputFormatter) {
        return args;
    }

    return this.inputFormatter.map(function (formatter, index) {
        // bind this for defaultBlock, and defaultAccount
        return formatter ? formatter.call(_this, args[index]) : args[index];
    });
};

/**
 * Should be called to format output(result) of method
 *
 * @method formatOutput
 * @param {Object}
 * @return {Object}
 */
Method.prototype.formatOutput = function (result) {
    var _this = this;

    if (_.isArray(result)) {
        return result.map(function (res) {
            return _this.outputFormatter && res ? _this.outputFormatter(res) : res;
        });
    } else {
        return this.outputFormatter && result ? this.outputFormatter(result) : result;
    }
};

/**
 * Should create payload from given input args
 *
 * @method toPayload
 * @param {Array} args
 * @return {Object}
 */
Method.prototype.toPayload = function (args) {
    var call = this.getCall(args);
    var callback = this.extractCallback(args);
    var params = this.formatInput(args);
    this.validateArgs(params);

    var payload = {
        method: call,
        params: params,
        callback: callback
    };

    if (this.transformPayload) {
        payload = this.transformPayload(payload);
    }

    return payload;
};


Method.prototype._confirmTransaction = function (defer, result, payload) {
    var method = this,
        promiseResolved = false,
        canUnsubscribe = true,
        timeoutCount = 0,
        confirmationCount = 0,
        intervalId = null,
        lastBlock = null,
        receiptJSON = '',
        gasProvided = (_.isObject(payload.params[0]) && payload.params[0].gas) ? payload.params[0].gas : null,
        isContractDeployment = _.isObject(payload.params[0]) &&
            payload.params[0].data &&
            payload.params[0].from &&
            !payload.params[0].to,
        hasBytecode = isContractDeployment && payload.params[0].data.length > 2;

    // add custom send Methods
    var _ethereumCalls = [
        new Method({
            name: 'getBlockByNumber',
            call: 'eth_getBlockByNumber',
            params: 2,
            inputFormatter: [formatters.inputBlockNumberFormatter, function (val) {
                return !!val;
            }],
            outputFormatter: formatters.outputBlockFormatter
        }),
        new Method({
            name: 'getTransactionReceipt',
            call: 'eth_getTransactionReceipt',
            params: 1,
            inputFormatter: [null],
            outputFormatter: formatters.outputTransactionReceiptFormatter
        }),
        new Method({
            name: 'getCode',
            call: 'eth_getCode',
            params: 2,
            inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter]
        }),
        new Method({
            name: 'getTransactionByHash',
            call: 'eth_getTransactionByHash',
            params: 1,
            inputFormatter: [null],
            outputFormatter: formatters.outputTransactionFormatter
        }),
        new Subscriptions({
            name: 'subscribe',
            type: 'eth',
            subscriptions: {
                'newBlockHeaders': {
                    subscriptionName: 'newHeads', // replace subscription with this name
                    params: 0,
                    outputFormatter: formatters.outputBlockFormatter
                }
            }
        })
    ];
    // attach methods to this._ethereumCall
    var _ethereumCall = {};
    _.each(_ethereumCalls, function (mthd) {
        mthd.attachToObject(_ethereumCall);
        mthd.requestManager = method.requestManager; // assign rather than call setRequestManager()
    });


    // fire "receipt" and confirmation events and resolve after
    var checkConfirmation = function (existingReceipt, isPolling, err, blockHeader, sub) {
        if (!err) {
            // create fake unsubscribe
            if (!sub) {
                sub = {
                    unsubscribe: function () {
                        clearInterval(intervalId);
                    }
                };
            }
            // if we have a valid receipt we don't need to send a request
            return (existingReceipt ? promiEvent.resolve(existingReceipt) : _ethereumCall.getTransactionReceipt(result))
            // catch error from requesting receipt
                .catch(function (err) {
                    sub.unsubscribe();
                    promiseResolved = true;
                    utils._fireError(
                        {
                            message: 'Failed to check for transaction receipt:',
                            data: err
                        },
                        defer.eventEmitter,
                        defer.reject
                    );
                })
                // if CONFIRMATION listener exists check for confirmations, by setting canUnsubscribe = false
                .then(async function (receipt) {
                    if (!receipt || !receipt.blockHash) {
                        throw new Error('Receipt missing or blockHash null');
                    }

                    // apply extra formatters
                    if (method.extraFormatters && method.extraFormatters.receiptFormatter) {
                        receipt = method.extraFormatters.receiptFormatter(receipt);
                    }

                    // check if confirmation listener exists
                    if (defer.eventEmitter.listeners('confirmation').length > 0) {
                        var block;

                        // If there was an immediately retrieved receipt, it's already
                        // been confirmed by the direct call to checkConfirmation needed
                        // for parity instant-seal
                        if (existingReceipt === undefined || confirmationCount !== 0) {
                            // Get latest block to emit with confirmation
                            var latestBlock = await _ethereumCall.getBlockByNumber('latest');
                            var latestBlockHash = latestBlock ? latestBlock.hash : null;

                            if (isPolling) { // Check if actually a new block is existing on polling
                                if (lastBlock) {
                                    block = await _ethereumCall.getBlockByNumber(lastBlock.number + 1);
                                    if (block) {
                                        lastBlock = block;
                                        defer.eventEmitter.emit('confirmation', confirmationCount, receipt, latestBlockHash);
                                    }
                                } else {
                                    block = await _ethereumCall.getBlockByNumber(receipt.blockNumber);
                                    lastBlock = block;
                                    defer.eventEmitter.emit('confirmation', confirmationCount, receipt, latestBlockHash);
                                }
                            } else {
                                defer.eventEmitter.emit('confirmation', confirmationCount, receipt, latestBlockHash);
                            }
                        }

                        if ((isPolling && block) || !isPolling) {
                            confirmationCount++;
                        }
                        canUnsubscribe = false;

                        if (confirmationCount === method.transactionConfirmationBlocks + 1) { // add 1 so we account for conf 0
                            sub.unsubscribe();
                            defer.eventEmitter.removeAllListeners();
                        }
                    }

                    return receipt;
                })
                // CHECK for CONTRACT DEPLOYMENT
                .then(async function (receipt) {

                    if (isContractDeployment && !promiseResolved) {

                        if (!receipt.contractAddress) {

                            if (canUnsubscribe) {
                                sub.unsubscribe();
                                promiseResolved = true;
                            }

                            utils._fireError(
                                errors.NoContractAddressFoundError(receipt),
                                defer.eventEmitter,
                                defer.reject,
                                null,
                                receipt
                            );
                            return;
                        }

                        var code;
                        try {
                            code = await _ethereumCall.getCode(receipt.contractAddress);
                        } catch(err){
                            // ignore;
                        }

                        if (!code) {
                            return;
                        }

                        // If deployment is status.true and there was a real
                        // bytecode string, assume it was successful.
                        var deploymentSuccess = receipt.status === true && hasBytecode;

                        if (deploymentSuccess || code.length > 2) {
                            defer.eventEmitter.emit('receipt', receipt);

                            // if contract, return instance instead of receipt
                            if (method.extraFormatters && method.extraFormatters.contractDeployFormatter) {
                                defer.resolve(method.extraFormatters.contractDeployFormatter(receipt));
                            } else {
                                defer.resolve(receipt);
                            }

                            // need to remove listeners, as they aren't removed automatically when succesfull
                            if (canUnsubscribe) {
                                defer.eventEmitter.removeAllListeners();
                            }

                        } else {
                            utils._fireError(
                                errors.ContractCodeNotStoredError(receipt),
                                defer.eventEmitter,
                                defer.reject,
                                null,
                                receipt
                            );
                        }

                        if (canUnsubscribe) {
                            sub.unsubscribe();
                        }
                        promiseResolved = true;
                    }

                    return receipt;
                })
                // CHECK for normal tx check for receipt only
                .then(async function (receipt) {
                    if (!isContractDeployment && !promiseResolved) {
                        if (!receipt.outOfGas &&
                            (!gasProvided || gasProvided !== receipt.gasUsed) &&
                            (receipt.status === true || receipt.status === '0x1' || typeof receipt.status === 'undefined')) {
                            defer.eventEmitter.emit('receipt', receipt);
                            defer.resolve(receipt);

                            // need to remove listeners, as they aren't removed automatically when succesfull
                            if (canUnsubscribe) {
                                defer.eventEmitter.removeAllListeners();
                            }

                        } else {
                            receiptJSON = JSON.stringify(receipt, null, 2);

                            if (receipt.status === false || receipt.status === '0x0') {
                                try {
                                    var revertMessage = null;

                                    if ( method.handleRevert &&
                                        (method.call === 'eth_sendTransaction' || method.call === 'eth_sendRawTransaction'))
                                    {
                                        var txReplayOptions = payload.params[0];

                                        // If send was raw, fetch the transaction and reconstitute the
                                        // original params so they can be replayed with `eth_call`
                                        if (method.call === 'eth_sendRawTransaction'){
                                            var rawTransactionHex = payload.params[0];

                                            var parsedTx = EthersTransactionUtils.parse(rawTransactionHex);

                                            txReplayOptions = formatters.inputTransactionFormatter({
                                                data: parsedTx.data,
                                                to: parsedTx.to,
                                                from: parsedTx.from,
                                                gas: parsedTx.gasLimit.toHexString(),
                                                gasPrice: parsedTx.gasPrice.toHexString(),
                                                value: parsedTx.value.toHexString()
                                            })
                                        }

                                        // Get revert reason string with eth_call
                                        revertMessage = await method.getRevertReason(
                                            txReplayOptions,
                                            receipt.blockNumber
                                        );

                                        if (revertMessage) { // Only throw a revert error if a revert reason is existing
                                            utils._fireError(
                                                errors.TransactionRevertInstructionError(revertMessage.reason, revertMessage.signature, receipt),
                                                defer.eventEmitter,
                                                defer.reject,
                                                null,
                                                receipt
                                            );
                                        } else {
                                            throw false; // Throw false and let the try/catch statement handle the error correctly after
                                        }
                                    } else {
                                        throw false; // Throw false and let the try/catch statement handle the error correctly after
                                    }
                                } catch (error) {
                                    // Throw an normal revert error if no revert reason is given or the detection of it is disabled
                                    utils._fireError(
                                        errors.TransactionRevertedWithoutReasonError(receipt),
                                        defer.eventEmitter,
                                        defer.reject,
                                        null,
                                        receipt
                                    );
                                }
                            } else {
                                // Throw OOG if status is not existing and provided gas and used gas are equal
                                utils._fireError(
                                    errors.TransactionOutOfGasError(receipt),
                                    defer.eventEmitter,
                                    defer.reject,
                                    null,
                                    receipt
                                );
                            }
                        }

                        if (canUnsubscribe) {
                            sub.unsubscribe();
                        }
                        promiseResolved = true;
                    }

                })
                // time out the transaction if not mined after 50 blocks
                .catch(function () {
                    timeoutCount++;

                    // check to see if we are http polling
                    if (!!isPolling) {
                        // polling timeout is different than transactionBlockTimeout blocks since we are triggering every second
                        if (timeoutCount - 1 >= method.transactionPollingTimeout) {
                            sub.unsubscribe();
                            promiseResolved = true;
                            utils._fireError(
                                errors.TransactionError('Transaction was not mined within ' + method.transactionPollingTimeout + ' seconds, please make sure your transaction was properly sent. Be aware that it might still be mined!'),
                                defer.eventEmitter,
                                defer.reject
                            );
                        }
                    } else {
                        if (timeoutCount - 1 >= method.transactionBlockTimeout) {
                            sub.unsubscribe();
                            promiseResolved = true;
                            utils._fireError(
                                errors.TransactionError('Transaction was not mined within ' + method.transactionBlockTimeout + ' blocks, please make sure your transaction was properly sent. Be aware that it might still be mined!'),
                                defer.eventEmitter,
                                defer.reject
                            );
                        }
                    }
                });


        } else {
            sub.unsubscribe();
            promiseResolved = true;
            utils._fireError({
                message: 'Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.',
                data: err
            }, defer.eventEmitter, defer.reject);
        }
    };

    // start watching for confirmation depending on the support features of the provider
    var startWatching = function (existingReceipt) {
        const startInterval = () => {
            intervalId = setInterval(checkConfirmation.bind(null, existingReceipt, true), 1000);
        }

        if (!this.requestManager.provider.on) {
            startInterval()
        } else {
            _ethereumCall.subscribe('newBlockHeaders', function (err, blockHeader, sub) {
                if (err || !blockHeader) {
                    // fall back to polling
                    startInterval()
                } else {
                    checkConfirmation(existingReceipt, false, err, blockHeader, sub);
                }
            })
        }
    }.bind(this);


    // first check if we already have a confirmed transaction
    _ethereumCall.getTransactionReceipt(result)
        .then(function (receipt) {
            if (receipt && receipt.blockHash) {
                if (defer.eventEmitter.listeners('confirmation').length > 0) {
                    // We must keep on watching for new Blocks, if a confirmation listener is present
                    startWatching(receipt);
                }
                checkConfirmation(receipt, false);

            } else if (!promiseResolved) {
                startWatching();
            }
        })
        .catch(function () {
            if (!promiseResolved) startWatching();
        });

};


var getWallet = function (from, accounts) {
    var wallet = null;

    // is index given
    if (_.isNumber(from)) {
        wallet = accounts.wallet[from];

        // is account given
    } else if (_.isObject(from) && from.address && from.privateKey) {
        wallet = from;

        // search in wallet for address
    } else {
        wallet = accounts.wallet[from.toLowerCase()];
    }

    return wallet;
};

Method.prototype.buildCall = function () {
    var method = this,
        isSendTx = (method.call === 'eth_sendTransaction' || method.call === 'eth_sendRawTransaction'), // || method.call === 'personal_sendTransaction'
        isCall = (method.call === 'eth_call');

    // actual send function
    var send = function () {
        var defer = promiEvent(!isSendTx),
            payload = method.toPayload(Array.prototype.slice.call(arguments));

        // CALLBACK function
        var sendTxCallback = function (err, result) {
            if (method.handleRevert && isCall && method.abiCoder) {
                var reasonData;

                // Ganache / Geth <= 1.9.13 return the reason data as a successful eth_call response
                // Geth >= 1.9.15 attaches the reason data to an error object.
                // Geth 1.9.14 is missing revert reason (https://github.com/ethereum/web3.js/issues/3520)
                if (!err && method.isRevertReasonString(result)){
                    reasonData = result.substring(10);
                } else if (err && err.data){
                    reasonData = err.data.substring(10);
                }

                if (reasonData){
                    var reason = method.abiCoder.decodeParameter('string', '0x' + reasonData);
                    var signature = 'Error(String)';

                    utils._fireError(
                        errors.RevertInstructionError(reason, signature),
                        defer.eventEmitter,
                        defer.reject,
                        payload.callback,
                        {
                            reason: reason,
                            signature: signature
                        }
                    );

                    return;
                }
            }

            try {
                result = method.formatOutput(result);
            } catch (e) {
                err = e;
            }

            if (result instanceof Error) {
                err = result;
            }

            if (!err) {
                if (payload.callback) {
                    payload.callback(null, result);
                }
            } else {
                if (err.error) {
                    err = err.error;
                }

                return utils._fireError(err, defer.eventEmitter, defer.reject, payload.callback);
            }

            // return PROMISE
            if (!isSendTx) {
                if (!err) {
                    defer.resolve(result);
                }

                // return PROMIEVENT
            } else {
                defer.eventEmitter.emit('transactionHash', result);

                method._confirmTransaction(defer, result, payload);
            }

        };

        // SENDS the SIGNED SIGNATURE
        var sendSignedTx = function (sign) {

            var signedPayload = _.extend({}, payload, {
                method: 'eth_sendRawTransaction',
                params: [sign.rawTransaction]
            });

            method.requestManager.send(signedPayload, sendTxCallback);
        };


        var sendRequest = function (payload, method) {

            if (method && method.accounts && method.accounts.wallet && method.accounts.wallet.length) {
                var wallet;

                // ETH_SENDTRANSACTION
                if (payload.method === 'eth_sendTransaction') {
                    var tx = payload.params[0];
                    wallet = getWallet((_.isObject(tx)) ? tx.from : null, method.accounts);


                    // If wallet was found, sign tx, and send using sendRawTransaction
                    if (wallet && wallet.privateKey) {
                        var txOptions = _.omit(tx, 'from');

                        if (method.defaultChain && !txOptions.chain) {
                            txOptions.chain = method.defaultChain;
                        }

                        if (method.defaultHardfork && !txOptions.hardfork) {
                            txOptions.hardfork = method.defaultHardfork;
                        }

                        if (method.defaultCommon && !txOptions.common) {
                            txOptions.common = method.defaultCommon;
                        }

                        return method.accounts.signTransaction(txOptions, wallet.privateKey)
                            .then(sendSignedTx)
                            .catch(function (err) {
                                if (_.isFunction(defer.eventEmitter.listeners) && defer.eventEmitter.listeners('error').length) {
                                    defer.eventEmitter.emit('error', err);
                                    defer.eventEmitter.removeAllListeners();
                                    defer.eventEmitter.catch(function () {
                                    });
                                }
                                defer.reject(err);
                            });
                    }

                    // ETH_SIGN
                } else if (payload.method === 'eth_sign') {
                    var data = payload.params[1];
                    wallet = getWallet(payload.params[0], method.accounts);

                    // If wallet was found, sign tx, and send using sendRawTransaction
                    if (wallet && wallet.privateKey) {
                        var sign = method.accounts.sign(data, wallet.privateKey);

                        if (payload.callback) {
                            payload.callback(null, sign.signature);
                        }

                        defer.resolve(sign.signature);
                        return;
                    }


                }
            }


            return method.requestManager.send(payload, sendTxCallback);
        };

        // Send the actual transaction
        if (isSendTx && _.isObject(payload.params[0]) && typeof payload.params[0].gasPrice === 'undefined') {

            var getGasPrice = (new Method({
                name: 'getGasPrice',
                call: 'eth_gasPrice',
                params: 0
            })).createFunction(method.requestManager);

            getGasPrice(function (err, gasPrice) {

                if (gasPrice) {
                    payload.params[0].gasPrice = gasPrice;
                }

                if (isSendTx) {
                    setTimeout(() => {
                        defer.eventEmitter.emit('sending', payload);
                    }, 0);
                }

                sendRequest(payload, method);
            });

        } else {
            if (isSendTx) {
                setTimeout(() => {
                    defer.eventEmitter.emit('sending', payload);
                }, 0);
            }

            sendRequest(payload, method);
        }

        if (isSendTx) {
            setTimeout(() => {
                defer.eventEmitter.emit('sent', payload);
            }, 0);
        }

        return defer.eventEmitter;
    };

    // necessary to attach things to the method
    send.method = method;
    // necessary for batch requests
    send.request = this.request.bind(this);
    return send;
};

/**
 * Returns the revert reason string if existing or otherwise false.
 *
 * @method getRevertReason
 *
 * @param {Object} txOptions
 * @param {Number} blockNumber
 *
 * @returns {Promise<Boolean|String>}
 */
Method.prototype.getRevertReason = function (txOptions, blockNumber) {
    var self = this;

    return new Promise(function (resolve, reject) {
        (new Method({
            name: 'call',
            call: 'eth_call',
            params: 2,
            abiCoder: self.abiCoder,
            handleRevert: true
        }))
            .createFunction(self.requestManager)(txOptions, utils.numberToHex(blockNumber))
            .then(function () {
                resolve(false);
            })
            .catch(function (error) {
                if (error.reason) {
                    resolve({
                        reason: error.reason,
                        signature: error.signature
                    });
                } else {
                    reject(error);
                }
            });
    });
};

/**
 * Checks if the given hex string is a revert message from the EVM
 *
 * @method isRevertReasonString
 *
 * @param {String} data - Hex string prefixed with 0x
 *
 * @returns {Boolean}
 */
Method.prototype.isRevertReasonString = function (data) {
    return _.isString(data) && ((data.length - 2) / 2) % 32 === 4 && data.substring(0, 10) === '0x08c379a0';
};

/**
 * Should be called to create the pure JSONRPC request which can be used in a batch request
 *
 * @method request
 * @return {Object} jsonrpc request
 */
Method.prototype.request = function () {
    var payload = this.toPayload(Array.prototype.slice.call(arguments));
    payload.format = this.formatOutput.bind(this);
    return payload;
};

module.exports = Method;


/***/ }),

/***/ 346327:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2016
 */



var EventEmitter = __webpack_require__(226729);

/**
 * This function generates a defer promise and adds eventEmitter functionality to it
 *
 * @method eventifiedPromise
 */
var PromiEvent = function PromiEvent(justPromise) {
    var resolve, reject,
        eventEmitter = new Promise(function() {
            resolve = arguments[0];
            reject = arguments[1];
        });

    if(justPromise) {
        return {
            resolve: resolve,
            reject: reject,
            eventEmitter: eventEmitter
        };
    }

    // get eventEmitter
    var emitter = new EventEmitter();

    // add eventEmitter to the promise
    eventEmitter._events = emitter._events;
    eventEmitter.emit = emitter.emit;
    eventEmitter.on = emitter.on;
    eventEmitter.once = emitter.once;
    eventEmitter.off = emitter.off;
    eventEmitter.listeners = emitter.listeners;
    eventEmitter.addListener = emitter.addListener;
    eventEmitter.removeListener = emitter.removeListener;
    eventEmitter.removeAllListeners = emitter.removeAllListeners;

    return {
        resolve: resolve,
        reject: reject,
        eventEmitter: eventEmitter
    };
};

PromiEvent.resolve = function(value) {
    var promise = PromiEvent(true);
    promise.resolve(value);
    return promise.eventEmitter;
};

module.exports = PromiEvent;


/***/ }),

/***/ 378574:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file batch.js
 * @author Marek Kotewicz <marek@ethdev.com>
 * @date 2015
 */



var Jsonrpc = __webpack_require__(231672);
var errors = __webpack_require__(524763).errors;

var Batch = function (requestManager) {
    this.requestManager = requestManager;
    this.requests = [];
};

/**
 * Should be called to add create new request to batch request
 *
 * @method add
 * @param {Object} jsonrpc requet object
 */
Batch.prototype.add = function (request) {
    this.requests.push(request);
};

/**
 * Should be called to execute batch request
 *
 * @method execute
 */
Batch.prototype.execute = function () {
    var requests = this.requests;
    this.requestManager.sendBatch(requests, function (err, results) {
        results = results || [];
        requests.map(function (request, index) {
            return results[index] || {};
        }).forEach(function (result, index) {
            if (requests[index].callback) {
                if (result && result.error) {
                    return requests[index].callback(errors.ErrorResponse(result));
                }

                if (!Jsonrpc.isValidResponse(result)) {
                    return requests[index].callback(errors.InvalidResponse(result));
                }

                try {
                    requests[index].callback(null, requests[index].format ? requests[index].format(result.result) : result.result);
                } catch (err) {
                    requests[index].callback(err);
                }
            }
        });
    });
};

module.exports = Batch;



/***/ }),

/***/ 287264:
/***/ ((module) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file givenProvider.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var givenProvider = null;

// ADD GIVEN PROVIDER
/* jshint ignore:start */
var global;
try {
  global = Function('return this')();
} catch (e) {
  global = window;
}

// EIP-1193: window.ethereum
if (typeof global.ethereum !== 'undefined') {
    givenProvider = global.ethereum;

// Legacy web3.currentProvider
} else if(typeof global.web3 !== 'undefined' && global.web3.currentProvider) {

    if(global.web3.currentProvider.sendAsync) {
        global.web3.currentProvider.send = global.web3.currentProvider.sendAsync;
        delete global.web3.currentProvider.sendAsync;
    }

    // if connection is 'ipcProviderWrapper', add subscription support
    if(!global.web3.currentProvider.on &&
        global.web3.currentProvider.connection &&
        global.web3.currentProvider.connection.constructor.name === 'ipcProviderWrapper') {

        global.web3.currentProvider.on = function (type, callback) {

            if(typeof callback !== 'function')
                throw new Error('The second parameter callback must be a function.');

            switch(type){
                case 'data':
                    this.connection.on('data', function(data) {
                        var result = '';

                        data = data.toString();

                        try {
                            result = JSON.parse(data);
                        } catch(e) {
                            return callback(new Error('Couldn\'t parse response data'+ data));
                        }

                        // notification
                        if(!result.id && result.method.indexOf('_subscription') !== -1) {
                            callback(null, result);
                        }

                    });
                    break;

                default:
                    this.connection.on(type, callback);
                    break;
            }
        };
    }

    givenProvider = global.web3.currentProvider;
}
/* jshint ignore:end */


module.exports = givenProvider;


/***/ }),

/***/ 274974:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */




const { callbackify } = __webpack_require__(431669);
var _ = __webpack_require__(513469);
var errors = __webpack_require__(524763).errors;
var Jsonrpc = __webpack_require__(231672);
var BatchManager = __webpack_require__(378574);
var givenProvider = __webpack_require__(287264);

/**
 * It's responsible for passing messages to providers
 * It's also responsible for polling the ethereum node for incoming messages
 * Default poll timeout is 1 second
 * Singleton
 *
 * @param {string|Object}provider
 * @param {Net.Socket} net
 *
 * @constructor
 */
var RequestManager = function RequestManager(provider, net) {
    this.provider = null;
    this.providers = RequestManager.providers;

    this.setProvider(provider, net);
    this.subscriptions = new Map();
};


RequestManager.givenProvider = givenProvider;

RequestManager.providers = {
    WebsocketProvider: __webpack_require__(912797),
    HttpProvider: __webpack_require__(32899),
    IpcProvider: __webpack_require__(99042)
};


/**
 * Should be used to set provider of request manager
 *
 * @method setProvider
 *
 * @param {Object} provider
 * @param {net.Socket} net
 *
 * @returns void
 */
RequestManager.prototype.setProvider = function (provider, net) {
    var _this = this;

    // autodetect provider
    if (provider && typeof provider === 'string' && this.providers) {

        // HTTP
        if (/^http(s)?:\/\//i.test(provider)) {
            provider = new this.providers.HttpProvider(provider);

            // WS
        } else if (/^ws(s)?:\/\//i.test(provider)) {
            provider = new this.providers.WebsocketProvider(provider);

            // IPC
        } else if (provider && typeof net === 'object' && typeof net.connect === 'function') {
            provider = new this.providers.IpcProvider(provider, net);

        } else if (provider) {
            throw new Error('Can\'t autodetect provider for "' + provider + '"');
        }
    }


    // reset the old one before changing, if still connected
    if(this.provider && this.provider.connected)
        this.clearSubscriptions();

    this.provider = provider || null;

    // listen to incoming notifications
    if (this.provider && this.provider.on) {
        this.provider.on('data', function data(result, deprecatedResult) {
            result = result || deprecatedResult; // this is for possible old providers, which may had the error first handler

            // check for result.method, to prevent old providers errors to pass as result
            if (result.method && _this.subscriptions.has(result.params.subscription)) {
                _this.subscriptions.get(result.params.subscription).callback(null, result.params.result);
            }
        });

        // resubscribe if the provider has reconnected
        this.provider.on('connect', function connect() {
            _this.subscriptions.forEach(function (subscription) {
                subscription.subscription.resubscribe();
            });
        });

        // notify all subscriptions about the error condition
        this.provider.on('error', function error(error) {
            _this.subscriptions.forEach(function (subscription) {
                subscription.callback(error);
            });
        });

        // notify all subscriptions about bad close conditions
        this.provider.on('close', function close(event) {
            if (!_this._isCleanCloseEvent(event) || _this._isIpcCloseError(event)){
                _this.subscriptions.forEach(function (subscription) {
                    subscription.callback(errors.ConnectionCloseError(event));
                    _this.subscriptions.delete(subscription.subscription.id);
                });

                if(_this.provider && _this.provider.emit){
                    _this.provider.emit('error', errors.ConnectionCloseError(event));
                }
            }
            if(_this.provider && _this.provider.emit){
                _this.provider.emit('end', event);
            }
        });

        // TODO add end, timeout??
    }
};

/**
 * Asynchronously send request to provider.
 * Prefers to use the `request` method available on the provider as specified in [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193).
 * If `request` is not available, falls back to `sendAsync` and `send` respectively.
 * @method send
 * @param {Object} data
 * @param {Function} callback
 */
RequestManager.prototype.send = function (data, callback) {
    callback = callback || function () {};

    if (!this.provider) {
        return callback(errors.InvalidProvider());
    }

    const payload = Jsonrpc.toPayload(data.method, data.params);

    const onJsonrpcResult = function (err, result) {
        if(result && result.id && payload.id !== result.id) {
            return callback(new Error(`Wrong response id ${result.id} (expected: ${payload.id}) in ${JSON.stringify(payload)}`));
        }

        if (err) {
            return callback(err);
        }

        if (result && result.error) {
            return callback(errors.ErrorResponse(result));
        }

        if (!Jsonrpc.isValidResponse(result)) {
            return callback(errors.InvalidResponse(result));
        }

        callback(null, result.result);
    };

    if (this.provider.request) {
        callbackify(this.provider.request.bind(this.provider))(payload, callback);
    } else if (this.provider.sendAsync) {
        this.provider.sendAsync(payload, onJsonrpcResult);
    } else if (this.provider.send) {
        this.provider.send(payload, onJsonrpcResult);
    } else {
        throw new Error('Provider does not have a request or send method to use.');
    }
};

/**
 * Asynchronously send batch request.
 * Only works if provider supports batch methods through `sendAsync` or `send`.
 * @method sendBatch
 * @param {Array} data - array of payload objects
 * @param {Function} callback
 */
RequestManager.prototype.sendBatch = function (data, callback) {
    if (!this.provider) {
        return callback(errors.InvalidProvider());
    }

    var payload = Jsonrpc.toBatchPayload(data);
    this.provider[this.provider.sendAsync ? 'sendAsync' : 'send'](payload, function (err, results) {
        if (err) {
            return callback(err);
        }

        if (!_.isArray(results)) {
            return callback(errors.InvalidResponse(results));
        }

        callback(null, results);
    });
};


/**
 * Waits for notifications
 *
 * @method addSubscription
 * @param {Subscription} subscription         the subscription
 * @param {String} type         the subscription namespace (eth, personal, etc)
 * @param {Function} callback   the callback to call for incoming notifications
 */
RequestManager.prototype.addSubscription = function (subscription, callback) {
    if (this.provider.on) {
        this.subscriptions.set(
            subscription.id,
            {
                callback: callback,
                subscription: subscription
            }
        );
    } else {
        throw new Error('The provider doesn\'t support subscriptions: '+ this.provider.constructor.name);
    }
};

/**
 * Waits for notifications
 *
 * @method removeSubscription
 * @param {String} id           the subscription id
 * @param {Function} callback   fired once the subscription is removed
 */
RequestManager.prototype.removeSubscription = function (id, callback) {
    if (this.subscriptions.has(id)) {
        var type = this.subscriptions.get(id).subscription.options.type;

        // remove subscription first to avoid reentry
        this.subscriptions.delete(id);

        // then, try to actually unsubscribe
        this.send({
            method: type + '_unsubscribe',
            params: [id]
        }, callback);

        return;
    }

    if (typeof callback === 'function') {
        // call the callback if the subscription was already removed
        callback(null);
    }
};

/**
 * Should be called to reset the subscriptions
 *
 * @method reset
 */
RequestManager.prototype.clearSubscriptions = function (keepIsSyncing) {
    var _this = this;

    // uninstall all subscriptions
    if (this.subscriptions.size > 0) {
        this.subscriptions.forEach(function (value, id) {
            if (!keepIsSyncing || value.name !== 'syncing')
                _this.removeSubscription(id);
        });
    }

    //  reset notification callbacks etc.
    if(this.provider.reset)
        this.provider.reset();
};

/**
 * Evaluates WS close event
 *
 * @method _isCleanClose
 *
 * @param {CloseEvent | boolean} event WS close event or exception flag
 *
 * @returns {boolean}
 */
RequestManager.prototype._isCleanCloseEvent = function (event) {
    return typeof event === 'object' && ([1000].includes(event.code) || event.wasClean === true);
};

/**
 * Detects Ipc close error. The node.net module emits ('close', isException)
 *
 * @method _isIpcCloseError
 *
 * @param {CloseEvent | boolean} event WS close event or exception flag
 *
 * @returns {boolean}
 */
RequestManager.prototype._isIpcCloseError = function (event) {
    return typeof event === 'boolean' && event;
};

module.exports = {
    Manager: RequestManager,
    BatchManager: BatchManager
};


/***/ }),

/***/ 231672:
/***/ ((module) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/** @file jsonrpc.js
 * @authors:
 *   Fabian Vogelsteller <fabian@ethereum.org>
 *   Marek Kotewicz <marek@ethdev.com>
 *   Aaron Kumavis <aaron@kumavis.me>
 * @date 2015
 */



// Initialize Jsonrpc as a simple object with utility functions.
var Jsonrpc = {
    messageId: 0
};

/**
 * Should be called to valid json create payload object
 *
 * @method toPayload
 * @param {Function} method of jsonrpc call, required
 * @param {Array} params, an array of method params, optional
 * @returns {Object} valid jsonrpc payload object
 */
Jsonrpc.toPayload = function (method, params) {
    if (!method) {
        throw new Error('JSONRPC method should be specified for params: "'+ JSON.stringify(params) +'"!');
    }

    // advance message ID
    Jsonrpc.messageId++;

    return {
        jsonrpc: '2.0',
        id: Jsonrpc.messageId,
        method: method,
        params: params || []
    };
};

/**
 * Should be called to check if jsonrpc response is valid
 *
 * @method isValidResponse
 * @param {Object}
 * @returns {Boolean} true if response is valid, otherwise false
 */
Jsonrpc.isValidResponse = function (response) {
    return Array.isArray(response) ? response.every(validateSingleMessage) : validateSingleMessage(response);

    function validateSingleMessage(message){
      return !!message &&
        !message.error &&
        message.jsonrpc === '2.0' &&
        (typeof message.id === 'number' || typeof message.id === 'string') &&
        message.result !== undefined; // only undefined is not valid json object
    }
};

/**
 * Should be called to create batch payload object
 *
 * @method toBatchPayload
 * @param {Array} messages, an array of objects with method (required) and params (optional) fields
 * @returns {Array} batch payload
 */
Jsonrpc.toBatchPayload = function (messages) {
    return messages.map(function (message) {
        return Jsonrpc.toPayload(message.method, message.params);
    });
};

module.exports = Jsonrpc;



/***/ }),

/***/ 839351:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var Subscription = __webpack_require__(568762);


var Subscriptions = function Subscriptions(options) {
    this.name = options.name;
    this.type = options.type;
    this.subscriptions = options.subscriptions || {};
    this.requestManager = null;
};


Subscriptions.prototype.setRequestManager = function (rm) {
    this.requestManager = rm;
};


Subscriptions.prototype.attachToObject = function (obj) {
    var func = this.buildCall();
    var name = this.name.split('.');
    if (name.length > 1) {
        obj[name[0]] = obj[name[0]] || {};
        obj[name[0]][name[1]] = func;
    } else {
        obj[name[0]] = func;
    }
};


Subscriptions.prototype.buildCall = function() {
    var _this = this;

    return function(){
        if(!_this.subscriptions[arguments[0]]) {
            console.warn('Subscription '+ JSON.stringify(arguments[0]) +' doesn\'t exist. Subscribing anyway.');
        }

        var subscription = new Subscription({
            subscription: _this.subscriptions[arguments[0]] || {}, // Subscript might not exist
            requestManager: _this.requestManager,
            type: _this.type
        });

        return subscription.subscribe.apply(subscription, arguments);
    };
};


module.exports = {
    subscriptions: Subscriptions,
    subscription: Subscription
};


/***/ }),

/***/ 568762:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file subscription.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var errors = __webpack_require__(524763).errors;
var EventEmitter = __webpack_require__(226729);
var formatters = __webpack_require__(524763).formatters;

function Subscription(options) {
    EventEmitter.call(this);

    this.id = null;
    this.callback = _.identity;
    this.arguments = null;
    this.lastBlock = null; // "from" block tracker for backfilling events on reconnection

    this.options = {
        subscription: options.subscription,
        type: options.type,
        requestManager: options.requestManager
    };
}

// INHERIT
Subscription.prototype = Object.create(EventEmitter.prototype);
Subscription.prototype.constructor = Subscription;


/**
 * Should be used to extract callback from array of arguments. Modifies input param
 *
 * @method extractCallback
 * @param {Array} arguments
 * @return {Function|Null} callback, if exists
 */

Subscription.prototype._extractCallback = function (args) {
    if (_.isFunction(args[args.length - 1])) {
        return args.pop(); // modify the args array!
    }
};

/**
 * Should be called to check if the number of arguments is correct
 *
 * @method validateArgs
 * @param {Array} arguments
 * @throws {Error} if it is not
 */

Subscription.prototype._validateArgs = function (args) {
    var subscription = this.options.subscription;

    if(!subscription)
        subscription = {};

    if(!subscription.params)
        subscription.params = 0;

    if (args.length !== subscription.params) {
        throw errors.InvalidNumberOfParams(
            args.length,
            subscription.params,
            subscription.subscriptionName
        );
    }
};

/**
 * Should be called to format input args of method
 *
 * @method formatInput
 * @param {Array}
 * @return {Array}
 */

Subscription.prototype._formatInput = function (args) {
    var subscription = this.options.subscription;

    if (!subscription) {
        return args;
    }

    if (!subscription.inputFormatter) {
        return args;
    }

    var formattedArgs = subscription.inputFormatter.map(function (formatter, index) {
        return formatter ? formatter(args[index]) : args[index];
    });

    return formattedArgs;
};

/**
 * Should be called to format output(result) of method
 *
 * @method formatOutput
 * @param result {Object}
 * @return {Object}
 */

Subscription.prototype._formatOutput = function (result) {
    var subscription = this.options.subscription;

    return (subscription && subscription.outputFormatter && result) ? subscription.outputFormatter(result) : result;
};

/**
 * Should create payload from given input args
 *
 * @method toPayload
 * @param {Array} args
 * @return {Object}
 */
Subscription.prototype._toPayload = function (args) {
    var params = [];
    this.callback = this._extractCallback(args) || _.identity;

    if (!this.subscriptionMethod) {
        this.subscriptionMethod = args.shift();

        // replace subscription with given name
        if (this.options.subscription.subscriptionName) {
            this.subscriptionMethod = this.options.subscription.subscriptionName;
        }
    }

    if (!this.arguments) {
        this.arguments = this._formatInput(args);
        this._validateArgs(this.arguments);
        args = []; // make empty after validation

    }

    // re-add subscriptionName
    params.push(this.subscriptionMethod);
    params = params.concat(this.arguments);


    if (args.length) {
        throw new Error('Only a callback is allowed as parameter on an already instantiated subscription.');
    }

    return {
        method: this.options.type + '_subscribe',
        params: params
    };
};

/**
 * Unsubscribes and clears callbacks
 *
 * @method unsubscribe
 * @return {Object}
 */
Subscription.prototype.unsubscribe = function(callback) {
    this.options.requestManager.removeSubscription(this.id, callback);
    this.id = null;
    this.lastBlock = null;
    this.removeAllListeners();
};

/**
 * Subscribes and watches for changes
 *
 * @method subscribe
 * @param {String} subscription the subscription
 * @param {Object} options the options object with address topics and fromBlock
 * @return {Object}
 */
Subscription.prototype.subscribe = function() {
    var _this = this;
    var args = Array.prototype.slice.call(arguments);
    var payload = this._toPayload(args);

    if(!payload) {
        return this;
    }

    // throw error, if provider is not set
    if(!this.options.requestManager.provider) {
        setTimeout(function(){
            var err1 = new Error('No provider set.');
            _this.callback(err1, null, _this);
            _this.emit('error', err1);
        },0);

        return this;
    }

    // throw error, if provider doesnt support subscriptions
    if(!this.options.requestManager.provider.on) {
        setTimeout(function(){
            var err2 = new Error(
                'The current provider doesn\'t support subscriptions: ' +
                _this.options.requestManager.provider.constructor.name
            );
            _this.callback(err2, null, _this);
            _this.emit('error', err2);
        },0);

        return this;
    }

    // Re-subscription only: continue fetching from the last block we received.
    // a dropped connection may have resulted in gaps in the logs...
    if (this.lastBlock && _.isObject(this.options.params)){
        payload.params[1] = this.options.params
        payload.params[1].fromBlock = formatters.inputBlockNumberFormatter(this.lastBlock + 1);
    }

    // if id is there unsubscribe first
    if (this.id) {
        this.unsubscribe();
    }

    // store the params in the options object
    this.options.params = payload.params[1];

    // get past logs, if fromBlock is available
    if(payload.params[0] === 'logs' && _.isObject(payload.params[1]) && payload.params[1].hasOwnProperty('fromBlock') && isFinite(payload.params[1].fromBlock)) {
        // send the subscription request

        // copy the params to avoid race-condition with deletion below this block
        var blockParams = Object.assign({}, payload.params[1]);

        this.options.requestManager.send({
            method: 'eth_getLogs',
            params: [blockParams]
        }, function (err, logs) {
            if(!err) {
                logs.forEach(function(log){
                    var output = _this._formatOutput(log);
                    _this.callback(null, output, _this);
                    _this.emit('data', output);
                });

                // TODO subscribe here? after the past logs?

            } else {
                setTimeout(function(){
                    _this.callback(err, null, _this);
                    _this.emit('error', err);
                },0);
            }
        });
    }

    // create subscription
    // TODO move to separate function? so that past logs can go first?

    if(typeof payload.params[1] === 'object')
        delete payload.params[1].fromBlock;

    this.options.requestManager.send(payload, function (err, result) {
        if(!err && result) {
            _this.id = result;
            _this.method = payload.params[0];
            _this.emit('connected', result);

            // call callback on notifications
            _this.options.requestManager.addSubscription(_this, function(error, result) {
                if (!error) {
                    if (!_.isArray(result)) {
                        result = [result];
                    }

                    result.forEach(function(resultItem) {
                        var output = _this._formatOutput(resultItem);

                        // Track current block (for gaps introduced by dropped connections)
                        _this.lastBlock = _.isObject(output) ? output.blockNumber : null;

                        if (_.isFunction(_this.options.subscription.subscriptionHandler)) {
                            return _this.options.subscription.subscriptionHandler.call(_this, output);
                        } else {
                            _this.emit('data', output);
                        }

                        // call the callback, last so that unsubscribe there won't affect the emit above
                        _this.callback(null, output, _this);
                    });
                } else {
                    _this.callback(error, false, _this);
                    _this.emit('error', error);
                }
            });
        } else {
            setTimeout(function(){
                _this.callback(err, false, _this);
                _this.emit('error', err);
            },0);
        }
    });

    // return an object to cancel the subscription
    return this;
};

/**
 * Resubscribe
 *
 * @method resubscribe
 *
 * @returns {void}
 */
Subscription.prototype.resubscribe = function () {
    this.options.requestManager.removeSubscription(this.id); // unsubscribe
    this.id = null;

    this.subscribe(this.callback);
};

module.exports = Subscription;


/***/ }),

/***/ 518294:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file extend.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */




var formatters = __webpack_require__(524763).formatters;
var Method = __webpack_require__(827123);
var utils = __webpack_require__(328700);


var extend = function (pckg) {
    /* jshint maxcomplexity:5 */
    var ex = function (extension) {

        var extendedObject;
        if (extension.property) {
            if (!pckg[extension.property]) {
                pckg[extension.property] = {};
            }
            extendedObject = pckg[extension.property];
        } else {
            extendedObject = pckg;
        }

        if (extension.methods) {
            extension.methods.forEach(function (method) {
                if(!(method instanceof Method)) {
                    method = new Method(method);
                }

                method.attachToObject(extendedObject);
                method.setRequestManager(pckg._requestManager);
            });
        }

        return pckg;
    };

    ex.formatters = formatters;
    ex.utils = utils;
    ex.Method = Method;

    return ex;
};



module.exports = extend;



/***/ }),

/***/ 751931:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */




var requestManager = __webpack_require__(274974);
var extend = __webpack_require__(518294);

module.exports = {
    packageInit: function (pkg, args) {
        args = Array.prototype.slice.call(args);

        if (!pkg) {
            throw new Error('You need to instantiate using the "new" keyword.');
        }

        // make property of pkg._provider, which can properly set providers
        Object.defineProperty(pkg, 'currentProvider', {
            get: function () {
                return pkg._provider;
            },
            set: function (value) {
                return pkg.setProvider(value);
            },
            enumerable: true,
            configurable: true
        });

        // inherit from parent package or create a new RequestManager
        if (args[0] && args[0]._requestManager) {
            pkg._requestManager = args[0]._requestManager;
        } else {
            pkg._requestManager = new requestManager.Manager(args[0], args[1]);
        }

        // add givenProvider
        pkg.givenProvider = requestManager.Manager.givenProvider;
        pkg.providers = requestManager.Manager.providers;

        pkg._provider = pkg._requestManager.provider;

        // add SETPROVIDER function (don't overwrite if already existing)
        if (!pkg.setProvider) {
            pkg.setProvider = function (provider, net) {
                pkg._requestManager.setProvider(provider, net);
                pkg._provider = pkg._requestManager.provider;
                return true;
            };
        }

        pkg.setRequestManager = function(manager) {
            pkg._requestManager = manager;
            pkg._provider = manager.provider;
        };

        // attach batch request creation
        pkg.BatchRequest = requestManager.BatchManager.bind(null, pkg._requestManager);

        // attach extend function
        pkg.extend = extend(pkg);
    },
    addProviders: function (pkg) {
        pkg.givenProvider = requestManager.Manager.givenProvider;
        pkg.providers = requestManager.Manager.providers;
    }
};


/***/ }),

/***/ 264560:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file index.js
 * @author Marek Kotewicz <marek@parity.io>
 * @author Fabian Vogelsteller <fabian@frozeman.de>
 * @date 2018
 */

var Buffer = __webpack_require__(764293).Buffer;
var _ = __webpack_require__(513469);
var utils = __webpack_require__(328700);

var EthersAbiCoder = __webpack_require__(228929)/* .AbiCoder */ .RQ;
var ParamType = __webpack_require__(228929)/* .ParamType */ ._R;
var ethersAbiCoder = new EthersAbiCoder(function (type, value) {
    if (type.match(/^u?int/) && !_.isArray(value) && (!_.isObject(value) || value.constructor.name !== 'BN')) {
        return value.toString();
    }
    return value;
});

// result method
function Result() {
}

/**
 * ABICoder prototype should be used to encode/decode solidity params of any type
 */
var ABICoder = function () {
};

/**
 * Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including  types.
 *
 * @method encodeFunctionSignature
 * @param {String|Object} functionName
 * @return {String} encoded function name
 */
ABICoder.prototype.encodeFunctionSignature = function (functionName) {
    if (_.isObject(functionName)) {
        functionName = utils._jsonInterfaceMethodToString(functionName);
    }

    return utils.sha3(functionName).slice(0, 10);
};

/**
 * Encodes the function name to its ABI representation, which are the first 4 bytes of the sha3 of the function name including  types.
 *
 * @method encodeEventSignature
 * @param {String|Object} functionName
 * @return {String} encoded function name
 */
ABICoder.prototype.encodeEventSignature = function (functionName) {
    if (_.isObject(functionName)) {
        functionName = utils._jsonInterfaceMethodToString(functionName);
    }

    return utils.sha3(functionName);
};

/**
 * Should be used to encode plain param
 *
 * @method encodeParameter
 *
 * @param {String|Object} type
 * @param {any} param
 *
 * @return {String} encoded plain param
 */
ABICoder.prototype.encodeParameter = function (type, param) {
    return this.encodeParameters([type], [param]);
};

/**
 * Should be used to encode list of params
 *
 * @method encodeParameters
 *
 * @param {Array<String|Object>} types
 * @param {Array<any>} params
 *
 * @return {String} encoded list of params
 */
ABICoder.prototype.encodeParameters = function (types, params) {
    var self = this;
    types = self.mapTypes(types)

    params = params.map(function (param, index) {
        let type = types[index]
        if (typeof type === 'object' && type.type) {
            // We may get a named type of shape {name, type}
            type = type.type
        }

        param = self.formatParam(type, param)

        // Format params for tuples
        if (typeof type === 'string' && type.includes('tuple')) {
            const coder = ethersAbiCoder._getCoder(ParamType.from(type));
            const modifyParams = (coder, param) => {
                if (coder.name === 'array') {
                    return param.map(p =>
                        modifyParams(
                            ethersAbiCoder._getCoder(ParamType.from(coder.type.replace('[]', ''))),
                            p
                        )
                    )
                }
                coder.coders.forEach((c, i) => {
                    if (c.name === 'tuple') {
                        modifyParams(c, param[i])
                    } else {
                        param[i] = self.formatParam(c.name, param[i])
                    }
                })
            }
            modifyParams(coder, param)
        }

        return param;
    })

    return ethersAbiCoder.encode(types, params);
};

/**
 * Map types if simplified format is used
 *
 * @method mapTypes
 * @param {Array} types
 * @return {Array}
 */
ABICoder.prototype.mapTypes = function (types) {
    var self = this;
    var mappedTypes = [];
    types.forEach(function (type) {
        // Remap `function` type params to bytes24 since Ethers does not
        // recognize former type. Solidity docs say `Function` is a bytes24
        // encoding the contract address followed by the function selector hash.
        if (typeof type === 'object' && type.type === 'function'){
            type.type = "bytes24"
        }
        if (self.isSimplifiedStructFormat(type)) {
            var structName = Object.keys(type)[0];
            mappedTypes.push(
                Object.assign(
                    self.mapStructNameAndType(structName),
                    {
                        components: self.mapStructToCoderFormat(type[structName])
                    }
                )
            );

            return;
        }

        mappedTypes.push(type);
    });

    return mappedTypes;
};

/**
 * Check if type is simplified struct format
 *
 * @method isSimplifiedStructFormat
 * @param {string | Object} type
 * @returns {boolean}
 */
ABICoder.prototype.isSimplifiedStructFormat = function (type) {
    return typeof type === 'object' && typeof type.components === 'undefined' && typeof type.name === 'undefined';
};

/**
 * Maps the correct tuple type and name when the simplified format in encode/decodeParameter is used
 *
 * @method mapStructNameAndType
 * @param {string} structName
 * @return {{type: string, name: *}}
 */
ABICoder.prototype.mapStructNameAndType = function (structName) {
    var type = 'tuple';

    if (structName.indexOf('[]') > -1) {
        type = 'tuple[]';
        structName = structName.slice(0, -2);
    }

    return {type: type, name: structName};
};

/**
 * Maps the simplified format in to the expected format of the ABICoder
 *
 * @method mapStructToCoderFormat
 * @param {Object} struct
 * @return {Array}
 */
ABICoder.prototype.mapStructToCoderFormat = function (struct) {
    var self = this;
    var components = [];
    Object.keys(struct).forEach(function (key) {
        if (typeof struct[key] === 'object') {
            components.push(
                Object.assign(
                    self.mapStructNameAndType(key),
                    {
                        components: self.mapStructToCoderFormat(struct[key])
                    }
                )
            );

            return;
        }

        components.push({
            name: key,
            type: struct[key]
        });
    });

    return components;
};

/**
 * Handle some formatting of params for backwards compatability with Ethers V4
 *
 * @method formatParam
 * @param {String} - type
 * @param {any} - param
 * @return {any} - The formatted param
 */
ABICoder.prototype.formatParam = function (type, param) {
    const paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);
    const paramTypeBytesArray = new RegExp(/^bytes([0-9]*)\[\]$/);
    const paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);
    const paramTypeNumberArray = new RegExp(/^(u?int)([0-9]*)\[\]$/);

    // Format BN to string
    if (utils.isBN(param) || utils.isBigNumber(param)) {
        return param.toString(10);
    }

    if (type.match(paramTypeBytesArray) || type.match(paramTypeNumberArray)) {
        return param.map(p => this.formatParam(type.replace('[]', ''), p))
    }

    // Format correct width for u?int[0-9]*
    let match = type.match(paramTypeNumber);
    if (match) {
        let size = parseInt(match[2] || "256");
        if (size / 8 < param.length) {
            // pad to correct bit width
            param = utils.leftPad(param, size);
        }
    }

    // Format correct length for bytes[0-9]+
    match = type.match(paramTypeBytes);
    if (match) {
        if (Buffer.isBuffer(param)) {
            param = utils.toHex(param);
        }

        // format to correct length
        let size = parseInt(match[1]);
        if (size) {
            let maxSize = size * 2;
            if (param.substring(0, 2) === '0x') {
                maxSize += 2;
            }
            if (param.length < maxSize) {
                // pad to correct length
                param = utils.rightPad(param, size * 2)
            }
        }

        // format odd-length bytes to even-length
        if (param.length % 2 === 1) {
            param = '0x0' + param.substring(2)
        }
    }

    return param
};

/**
 * Encodes a function call from its json interface and parameters.
 *
 * @method encodeFunctionCall
 * @param {Array} jsonInterface
 * @param {Array} params
 * @return {String} The encoded ABI for this function call
 */
ABICoder.prototype.encodeFunctionCall = function (jsonInterface, params) {
    return this.encodeFunctionSignature(jsonInterface) + this.encodeParameters(jsonInterface.inputs, params).replace('0x', '');
};

/**
 * Should be used to decode bytes to plain param
 *
 * @method decodeParameter
 * @param {String} type
 * @param {String} bytes
 * @return {Object} plain param
 */
ABICoder.prototype.decodeParameter = function (type, bytes) {
    return this.decodeParameters([type], bytes)[0];
};

/**
 * Should be used to decode list of params
 *
 * @method decodeParameter
 * @param {Array} outputs
 * @param {String} bytes
 * @return {Array} array of plain params
 */
ABICoder.prototype.decodeParameters = function (outputs, bytes) {
    if (outputs.length > 0 && (!bytes || bytes === '0x' || bytes === '0X')) {
        throw new Error(
            'Returned values aren\'t valid, did it run Out of Gas? ' +
            'You might also see this error if you are not using the ' +
            'correct ABI for the contract you are retrieving data from, ' +
            'requesting data from a block number that does not exist, ' +
            'or querying a node which is not fully synced.'
        );
    }

    var res = ethersAbiCoder.decode(this.mapTypes(outputs), '0x' + bytes.replace(/0x/i, ''));
    var returnValue = new Result();
    returnValue.__length__ = 0;

    outputs.forEach(function (output, i) {
        var decodedValue = res[returnValue.__length__];
        decodedValue = (decodedValue === '0x') ? null : decodedValue;

        returnValue[i] = decodedValue;

        if (_.isObject(output) && output.name) {
            returnValue[output.name] = decodedValue;
        }

        returnValue.__length__++;
    });

    return returnValue;
};

/**
 * Decodes events non- and indexed parameters.
 *
 * @method decodeLog
 * @param {Object} inputs
 * @param {String} data
 * @param {Array} topics
 * @return {Array} array of plain params
 */
ABICoder.prototype.decodeLog = function (inputs, data, topics) {
    var _this = this;
    topics = _.isArray(topics) ? topics : [topics];

    data = data || '';

    var notIndexedInputs = [];
    var indexedParams = [];
    var topicCount = 0;

    // TODO check for anonymous logs?

    inputs.forEach(function (input, i) {
        if (input.indexed) {
            indexedParams[i] = (['bool', 'int', 'uint', 'address', 'fixed', 'ufixed'].find(function (staticType) {
                return input.type.indexOf(staticType) !== -1;
            })) ? _this.decodeParameter(input.type, topics[topicCount]) : topics[topicCount];
            topicCount++;
        } else {
            notIndexedInputs[i] = input;
        }
    });


    var nonIndexedData = data;
    var notIndexedParams = (nonIndexedData) ? this.decodeParameters(notIndexedInputs, nonIndexedData) : [];

    var returnValue = new Result();
    returnValue.__length__ = 0;


    inputs.forEach(function (res, i) {
        returnValue[i] = (res.type === 'string') ? '' : null;

        if (typeof notIndexedParams[i] !== 'undefined') {
            returnValue[i] = notIndexedParams[i];
        }
        if (typeof indexedParams[i] !== 'undefined') {
            returnValue[i] = indexedParams[i];
        }

        if (res.name) {
            returnValue[res.name] = returnValue[i];
        }

        returnValue.__length__++;
    });

    return returnValue;
};

var coder = new ABICoder();

module.exports = coder;


/***/ }),

/***/ 848869:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(751837);
var buffer_1 = __webpack_require__(764293);
var transaction_1 = __webpack_require__(520167);
/**
 * Creates a new transaction object that doesn't need to be signed.
 *
 * @param data - A transaction can be initialized with its rlp representation, an array containing
 * the value of its fields in order, or an object containing them by name.
 *
 * @param opts - The transaction's options, used to indicate the chain and hardfork the
 * transactions belongs to.
 *
 * @see Transaction
 */
var FakeTransaction = /** @class */ (function (_super) {
    __extends(FakeTransaction, _super);
    function FakeTransaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        var _this = _super.call(this, data, opts) || this;
        Object.defineProperty(_this, 'from', {
            enumerable: true,
            configurable: true,
            get: function () { return _this.getSenderAddress(); },
            set: function (val) {
                if (val) {
                    _this._from = ethereumjs_util_1.toBuffer(val);
                }
            },
        });
        var txData = data;
        if (txData.from) {
            _this.from = ethereumjs_util_1.toBuffer(txData.from);
        }
        return _this;
    }
    /**
     * Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake
     * signature.
     *
     * @param includeSignature - Whether or not to include the signature
     */
    FakeTransaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        if (includeSignature && this._from && this._from.toString('hex') !== '') {
            // include a fake signature using the from address as a private key
            var fakeKey = buffer_1.Buffer.concat([this._from, this._from.slice(0, 12)]);
            this.sign(fakeKey);
        }
        return _super.prototype.hash.call(this, includeSignature);
    };
    return FakeTransaction;
}(transaction_1.default));
exports.default = FakeTransaction;
//# sourceMappingURL=fake.js.map

/***/ }),

/***/ 651283:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";
var __webpack_unused_export__;

__webpack_unused_export__ = ({ value: true });
var transaction_1 = __webpack_require__(520167);
exports.YW = transaction_1.default;
var fake_1 = __webpack_require__(848869);
__webpack_unused_export__ = fake_1.default;
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 520167:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethereumjs_util_1 = __webpack_require__(751837);
var ethereumjs_common_1 = __webpack_require__(265982);
var buffer_1 = __webpack_require__(764293);
// secp256k1n/2
var N_DIV_2 = new ethereumjs_util_1.BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
/**
 * An Ethereum transaction.
 */
var Transaction = /** @class */ (function () {
    /**
     * Creates a new transaction from an object with its fields' values.
     *
     * @param data - A transaction can be initialized with its rlp representation, an array containing
     * the value of its fields in order, or an object containing them by name.
     *
     * @param opts - The transaction's options, used to indicate the chain and hardfork the
     * transactions belongs to.
     *
     * @note Transaction objects implement EIP155 by default. To disable it, use the constructor's
     * second parameter to set a chain and hardfork before EIP155 activation (i.e. before Spurious
     * Dragon.)
     *
     * @example
     * ```js
     * const txData = {
     *   nonce: '0x00',
     *   gasPrice: '0x09184e72a000',
     *   gasLimit: '0x2710',
     *   to: '0x0000000000000000000000000000000000000000',
     *   value: '0x00',
     *   data: '0x7f7465737432000000000000000000000000000000000000000000000000000000600057',
     *   v: '0x1c',
     *   r: '0x5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab',
     *   s: '0x5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13'
     * };
     * const tx = new Transaction(txData);
     * ```
     */
    function Transaction(data, opts) {
        if (data === void 0) { data = {}; }
        if (opts === void 0) { opts = {}; }
        // instantiate Common class instance based on passed options
        if (opts.common) {
            if (opts.chain || opts.hardfork) {
                throw new Error('Instantiation with both opts.common, and opts.chain and opts.hardfork parameter not allowed!');
            }
            this._common = opts.common;
        }
        else {
            var chain = opts.chain ? opts.chain : 'mainnet';
            var hardfork = opts.hardfork ? opts.hardfork : 'petersburg';
            this._common = new ethereumjs_common_1.default(chain, hardfork);
        }
        // Define Properties
        var fields = [
            {
                name: 'nonce',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasPrice',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'gasLimit',
                alias: 'gas',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'to',
                allowZero: true,
                length: 20,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'value',
                length: 32,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'data',
                alias: 'input',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'v',
                allowZero: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 'r',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
            {
                name: 's',
                length: 32,
                allowZero: true,
                allowLess: true,
                default: new buffer_1.Buffer([]),
            },
        ];
        // attached serialize
        ethereumjs_util_1.defineProperties(this, fields, data);
        /**
         * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters.
         * @name from
         * @memberof Transaction
         */
        Object.defineProperty(this, 'from', {
            enumerable: true,
            configurable: true,
            get: this.getSenderAddress.bind(this),
        });
        this._validateV(this.v);
        this._overrideVSetterWithValidation();
    }
    /**
     * If the tx's `to` is to the creation address
     */
    Transaction.prototype.toCreationAddress = function () {
        return this.to.toString('hex') === '';
    };
    /**
     * Computes a sha3-256 hash of the serialized tx
     * @param includeSignature - Whether or not to include the signature
     */
    Transaction.prototype.hash = function (includeSignature) {
        if (includeSignature === void 0) { includeSignature = true; }
        var items;
        if (includeSignature) {
            items = this.raw;
        }
        else {
            if (this._implementsEIP155()) {
                items = this.raw.slice(0, 6).concat([
                    ethereumjs_util_1.toBuffer(this.getChainId()),
                    // TODO: stripping zeros should probably be a responsibility of the rlp module
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                    ethereumjs_util_1.stripZeros(ethereumjs_util_1.toBuffer(0)),
                ]);
            }
            else {
                items = this.raw.slice(0, 6);
            }
        }
        // create hash
        return ethereumjs_util_1.rlphash(items);
    };
    /**
     * returns chain ID
     */
    Transaction.prototype.getChainId = function () {
        return this._common.chainId();
    };
    /**
     * returns the sender's address
     */
    Transaction.prototype.getSenderAddress = function () {
        if (this._from) {
            return this._from;
        }
        var pubkey = this.getSenderPublicKey();
        this._from = ethereumjs_util_1.publicToAddress(pubkey);
        return this._from;
    };
    /**
     * returns the public key of the sender
     */
    Transaction.prototype.getSenderPublicKey = function () {
        if (!this.verifySignature()) {
            throw new Error('Invalid Signature');
        }
        // If the signature was verified successfully the _senderPubKey field is defined
        return this._senderPubKey;
    };
    /**
     * Determines if the signature is valid
     */
    Transaction.prototype.verifySignature = function () {
        var msgHash = this.hash(false);
        // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid.
        if (this._common.gteHardfork('homestead') && new ethereumjs_util_1.BN(this.s).cmp(N_DIV_2) === 1) {
            return false;
        }
        try {
            var v = ethereumjs_util_1.bufferToInt(this.v);
            var useChainIdWhileRecoveringPubKey = v >= this.getChainId() * 2 + 35 && this._common.gteHardfork('spuriousDragon');
            this._senderPubKey = ethereumjs_util_1.ecrecover(msgHash, v, this.r, this.s, useChainIdWhileRecoveringPubKey ? this.getChainId() : undefined);
        }
        catch (e) {
            return false;
        }
        return !!this._senderPubKey;
    };
    /**
     * sign a transaction with a given private key
     * @param privateKey - Must be 32 bytes in length
     */
    Transaction.prototype.sign = function (privateKey) {
        // We clear any previous signature before signing it. Otherwise, _implementsEIP155's can give
        // different results if this tx was already signed.
        this.v = new buffer_1.Buffer([]);
        this.s = new buffer_1.Buffer([]);
        this.r = new buffer_1.Buffer([]);
        var msgHash = this.hash(false);
        var sig = ethereumjs_util_1.ecsign(msgHash, privateKey);
        if (this._implementsEIP155()) {
            sig.v += this.getChainId() * 2 + 8;
        }
        Object.assign(this, sig);
    };
    /**
     * The amount of gas paid for the data in this tx
     */
    Transaction.prototype.getDataFee = function () {
        var data = this.raw[5];
        var cost = new ethereumjs_util_1.BN(0);
        for (var i = 0; i < data.length; i++) {
            data[i] === 0
                ? cost.iaddn(this._common.param('gasPrices', 'txDataZero'))
                : cost.iaddn(this._common.param('gasPrices', 'txDataNonZero'));
        }
        return cost;
    };
    /**
     * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)
     */
    Transaction.prototype.getBaseFee = function () {
        var fee = this.getDataFee().iaddn(this._common.param('gasPrices', 'tx'));
        if (this._common.gteHardfork('homestead') && this.toCreationAddress()) {
            fee.iaddn(this._common.param('gasPrices', 'txCreation'));
        }
        return fee;
    };
    /**
     * the up front amount that an account must have for this transaction to be valid
     */
    Transaction.prototype.getUpfrontCost = function () {
        return new ethereumjs_util_1.BN(this.gasLimit).imul(new ethereumjs_util_1.BN(this.gasPrice)).iadd(new ethereumjs_util_1.BN(this.value));
    };
    Transaction.prototype.validate = function (stringError) {
        if (stringError === void 0) { stringError = false; }
        var errors = [];
        if (!this.verifySignature()) {
            errors.push('Invalid Signature');
        }
        if (this.getBaseFee().cmp(new ethereumjs_util_1.BN(this.gasLimit)) > 0) {
            errors.push(["gas limit is too low. Need at least " + this.getBaseFee()]);
        }
        if (stringError === false) {
            return errors.length === 0;
        }
        else {
            return errors.join(' ');
        }
    };
    /**
     * Returns the rlp encoding of the transaction
     */
    Transaction.prototype.serialize = function () {
        // Note: This never gets executed, defineProperties overwrites it.
        return ethereumjs_util_1.rlp.encode(this.raw);
    };
    /**
     * Returns the transaction in JSON format
     * @see {@link https://github.com/ethereumjs/ethereumjs-util/blob/master/docs/index.md#defineproperties|ethereumjs-util}
     */
    Transaction.prototype.toJSON = function (labels) {
        if (labels === void 0) { labels = false; }
        // Note: This never gets executed, defineProperties overwrites it.
        return {};
    };
    Transaction.prototype._validateV = function (v) {
        if (v === undefined || v.length === 0) {
            return;
        }
        if (!this._common.gteHardfork('spuriousDragon')) {
            return;
        }
        var vInt = ethereumjs_util_1.bufferToInt(v);
        if (vInt === 27 || vInt === 28) {
            return;
        }
        var isValidEIP155V = vInt === this.getChainId() * 2 + 35 || vInt === this.getChainId() * 2 + 36;
        if (!isValidEIP155V) {
            throw new Error("Incompatible EIP155-based V " + vInt + " and chain id " + this.getChainId() + ". See the second parameter of the Transaction constructor to set the chain id.");
        }
    };
    Transaction.prototype._isSigned = function () {
        return this.v.length > 0 && this.r.length > 0 && this.s.length > 0;
    };
    Transaction.prototype._overrideVSetterWithValidation = function () {
        var _this = this;
        var vDescriptor = Object.getOwnPropertyDescriptor(this, 'v');
        Object.defineProperty(this, 'v', __assign({}, vDescriptor, { set: function (v) {
                if (v !== undefined) {
                    _this._validateV(ethereumjs_util_1.toBuffer(v));
                }
                vDescriptor.set(v);
            } }));
    };
    Transaction.prototype._implementsEIP155 = function () {
        var onEIP155BlockOrLater = this._common.gteHardfork('spuriousDragon');
        if (!this._isSigned()) {
            // We sign with EIP155 all unsigned transactions after spuriousDragon
            return onEIP155BlockOrLater;
        }
        // EIP155 spec:
        // If block.number >= 2,675,000 and v = CHAIN_ID * 2 + 35 or v = CHAIN_ID * 2 + 36, then when computing
        // the hash of a transaction for purposes of signing or recovering, instead of hashing only the first six
        // elements (i.e. nonce, gasprice, startgas, to, value, data), hash nine elements, with v replaced by
        // CHAIN_ID, r = 0 and s = 0.
        var v = ethereumjs_util_1.bufferToInt(this.v);
        var vAndChainIdMeetEIP155Conditions = v === this.getChainId() * 2 + 35 || v === this.getChainId() * 2 + 36;
        return vAndChainIdMeetEIP155Conditions && onEIP155BlockOrLater;
    };
    return Transaction;
}());
exports.default = Transaction;
//# sourceMappingURL=transaction.js.map

/***/ }),

/***/ 189502:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(990322);
var hash_1 = __webpack_require__(871638);
/**
 * Returns a zero address.
 */
exports.zeroAddress = function () {
    var addressLength = 20;
    var addr = bytes_1.zeros(addressLength);
    return bytes_1.bufferToHex(addr);
};
/**
 * Checks if the address is a valid. Accepts checksummed addresses too.
 */
exports.isValidAddress = function (address) {
    return /^0x[0-9a-fA-F]{40}$/.test(address);
};
/**
 * Checks if a given address is a zero address.
 */
exports.isZeroAddress = function (address) {
    var zeroAddr = exports.zeroAddress();
    return zeroAddr === bytes_1.addHexPrefix(address);
};
/**
 * Returns a checksummed address.
 *
 * If a eip1191ChainId is provided, the chainId will be included in the checksum calculation. This
 * has the effect of checksummed addresses for one chain having invalid checksums for others.
 * For more details, consult EIP-1191.
 *
 * WARNING: Checksums with and without the chainId will differ. As of 2019-06-26, the most commonly
 * used variation in Ethereum was without the chainId. This may change in the future.
 */
exports.toChecksumAddress = function (address, eip1191ChainId) {
    address = ethjsUtil.stripHexPrefix(address).toLowerCase();
    var prefix = eip1191ChainId !== undefined ? eip1191ChainId.toString() + '0x' : '';
    var hash = hash_1.keccak(prefix + address).toString('hex');
    var ret = '0x';
    for (var i = 0; i < address.length; i++) {
        if (parseInt(hash[i], 16) >= 8) {
            ret += address[i].toUpperCase();
        }
        else {
            ret += address[i];
        }
    }
    return ret;
};
/**
 * Checks if the address is a valid checksummed address.
 *
 * See toChecksumAddress' documentation for details about the eip1191ChainId parameter.
 */
exports.isValidChecksumAddress = function (address, eip1191ChainId) {
    return exports.isValidAddress(address) && exports.toChecksumAddress(address, eip1191ChainId) === address;
};
/**
 * Generates an address of a newly created contract.
 * @param from The address which is creating this new address
 * @param nonce The nonce of the from account
 */
exports.generateAddress = function (from, nonce) {
    from = bytes_1.toBuffer(from);
    var nonceBN = new BN(nonce);
    if (nonceBN.isZero()) {
        // in RLP we want to encode null in the case of zero nonce
        // read the RLP documentation for an answer if you dare
        return hash_1.rlphash([from, null]).slice(-20);
    }
    // Only take the lower 160bits of the hash
    return hash_1.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20);
};
/**
 * Generates an address for a contract created using CREATE2.
 * @param from The address which is creating this new address
 * @param salt A salt
 * @param initCode The init code of the contract being created
 */
exports.generateAddress2 = function (from, salt, initCode) {
    var fromBuf = bytes_1.toBuffer(from);
    var saltBuf = bytes_1.toBuffer(salt);
    var initCodeBuf = bytes_1.toBuffer(initCode);
    assert(fromBuf.length === 20);
    assert(saltBuf.length === 32);
    var address = hash_1.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, hash_1.keccak256(initCodeBuf)]));
    return address.slice(-20);
};
/**
 * Returns true if the supplied address belongs to a precompiled account (Byzantium).
 */
exports.isPrecompiled = function (address) {
    var a = bytes_1.unpad(address);
    return a.length === 1 && a[0] >= 1 && a[0] <= 8;
};
/**
 * Checks if the private key satisfies the rules of the curve secp256k1.
 */
exports.isValidPrivate = function (privateKey) {
    return secp256k1.privateKeyVerify(privateKey);
};
/**
 * Checks if the public key satisfies the rules of the curve secp256k1
 * and the requirements of Ethereum.
 * @param publicKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.isValidPublic = function (publicKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    if (publicKey.length === 64) {
        // Convert to SEC1 for secp256k1
        return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey]));
    }
    if (!sanitize) {
        return false;
    }
    return secp256k1.publicKeyVerify(publicKey);
};
/**
 * Returns the ethereum address of a given public key.
 * Accepts "Ethereum public keys" and SEC1 encoded keys.
 * @param pubKey The two points of an uncompressed key, unless sanitize is enabled
 * @param sanitize Accept public keys in other formats
 */
exports.pubToAddress = function (pubKey, sanitize) {
    if (sanitize === void 0) { sanitize = false; }
    pubKey = bytes_1.toBuffer(pubKey);
    if (sanitize && pubKey.length !== 64) {
        pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1);
    }
    assert(pubKey.length === 64);
    // Only take the lower 160bits of the hash
    return hash_1.keccak(pubKey).slice(-20);
};
exports.publicToAddress = exports.pubToAddress;
/**
 * Returns the ethereum address of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToAddress = function (privateKey) {
    return exports.publicToAddress(exports.privateToPublic(privateKey));
};
/**
 * Returns the ethereum public key of a given private key.
 * @param privateKey A private key must be 256 bits wide
 */
exports.privateToPublic = function (privateKey) {
    privateKey = bytes_1.toBuffer(privateKey);
    // skip the type flag and use the X, Y points
    return secp256k1.publicKeyCreate(privateKey, false).slice(1);
};
/**
 * Converts a public key to the Ethereum format.
 */
exports.importPublic = function (publicKey) {
    publicKey = bytes_1.toBuffer(publicKey);
    if (publicKey.length !== 64) {
        publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1);
    }
    return publicKey;
};
//# sourceMappingURL=account.js.map

/***/ }),

/***/ 990322:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
/**
 * Returns a buffer filled with 0s.
 * @param bytes the number of bytes the buffer should be
 */
exports.zeros = function (bytes) {
    return Buffer.allocUnsafe(bytes).fill(0);
};
/**
 * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @param right whether to start padding form the left or right
 * @return (Buffer|Array)
 */
exports.setLengthLeft = function (msg, length, right) {
    if (right === void 0) { right = false; }
    var buf = exports.zeros(length);
    msg = exports.toBuffer(msg);
    if (right) {
        if (msg.length < length) {
            msg.copy(buf);
            return buf;
        }
        return msg.slice(0, length);
    }
    else {
        if (msg.length < length) {
            msg.copy(buf, length - msg.length);
            return buf;
        }
        return msg.slice(-length);
    }
};
exports.setLength = exports.setLengthLeft;
/**
 * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes.
 * Or it truncates the beginning if it exceeds.
 * @param msg the value to pad (Buffer|Array)
 * @param length the number of bytes the output should be
 * @return (Buffer|Array)
 */
exports.setLengthRight = function (msg, length) {
    return exports.setLength(msg, length, true);
};
/**
 * Trims leading zeros from a `Buffer` or an `Array`.
 * @param a (Buffer|Array|String)
 * @return (Buffer|Array|String)
 */
exports.unpad = function (a) {
    a = ethjsUtil.stripHexPrefix(a);
    var first = a[0];
    while (a.length > 0 && first.toString() === '0') {
        a = a.slice(1);
        first = a[0];
    }
    return a;
};
exports.stripZeros = exports.unpad;
/**
 * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method.
 * @param v the value
 */
exports.toBuffer = function (v) {
    if (!Buffer.isBuffer(v)) {
        if (Array.isArray(v)) {
            v = Buffer.from(v);
        }
        else if (typeof v === 'string') {
            if (ethjsUtil.isHexString(v)) {
                v = Buffer.from(ethjsUtil.padToEven(ethjsUtil.stripHexPrefix(v)), 'hex');
            }
            else {
                throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: " + v);
            }
        }
        else if (typeof v === 'number') {
            v = ethjsUtil.intToBuffer(v);
        }
        else if (v === null || v === undefined) {
            v = Buffer.allocUnsafe(0);
        }
        else if (BN.isBN(v)) {
            v = v.toArrayLike(Buffer);
        }
        else if (v.toArray) {
            // converts a BN to a Buffer
            v = Buffer.from(v.toArray());
        }
        else {
            throw new Error('invalid type');
        }
    }
    return v;
};
/**
 * Converts a `Buffer` to a `Number`.
 * @param buf `Buffer` object to convert
 * @throws If the input number exceeds 53 bits.
 */
exports.bufferToInt = function (buf) {
    return new BN(exports.toBuffer(buf)).toNumber();
};
/**
 * Converts a `Buffer` into a `0x`-prefixed hex `String`.
 * @param buf `Buffer` object to convert
 */
exports.bufferToHex = function (buf) {
    buf = exports.toBuffer(buf);
    return '0x' + buf.toString('hex');
};
/**
 * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers.
 * @param num Signed integer value
 */
exports.fromSigned = function (num) {
    return new BN(num).fromTwos(256);
};
/**
 * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers.
 * @param num
 */
exports.toUnsigned = function (num) {
    return Buffer.from(num.toTwos(256).toArray());
};
/**
 * Adds "0x" to a given `String` if it does not already start with "0x".
 */
exports.addHexPrefix = function (str) {
    if (typeof str !== 'string') {
        return str;
    }
    return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str;
};
/**
 * Converts a `Buffer` or `Array` to JSON.
 * @param ba (Buffer|Array)
 * @return (Array|String|null)
 */
exports.baToJSON = function (ba) {
    if (Buffer.isBuffer(ba)) {
        return "0x" + ba.toString('hex');
    }
    else if (ba instanceof Array) {
        var array = [];
        for (var i = 0; i < ba.length; i++) {
            array.push(exports.baToJSON(ba[i]));
        }
        return array;
    }
};
//# sourceMappingURL=bytes.js.map

/***/ }),

/***/ 593270:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var BN = __webpack_require__(213550);
/**
 * The max integer that this VM can handle
 */
exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16);
/**
 * 2^256
 */
exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16);
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';
/**
 * Keccak-256 hash of null
 */
exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex');
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347';
/**
 * Keccak-256 of an RLP of an empty array
 */
exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex');
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421';
/**
 * Keccak-256 hash of the RLP of null
 */
exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex');
//# sourceMappingURL=constants.js.map

/***/ }),

/***/ 871638:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var createKeccakHash = __webpack_require__(700841);
var createHash = __webpack_require__(189913);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(990322);
/**
 * Creates Keccak hash of the input
 * @param a The input data (Buffer|Array|String|Number) If the string is a 0x-prefixed hex value
 * it's interpreted as hexadecimal, otherwise as utf8.
 * @param bits The Keccak width
 */
exports.keccak = function (a, bits) {
    if (bits === void 0) { bits = 256; }
    if (typeof a === 'string' && !ethjsUtil.isHexString(a)) {
        a = Buffer.from(a, 'utf8');
    }
    else {
        a = bytes_1.toBuffer(a);
    }
    if (!bits)
        bits = 256;
    return createKeccakHash("keccak" + bits)
        .update(a)
        .digest();
};
/**
 * Creates Keccak-256 hash of the input, alias for keccak(a, 256).
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.keccak256 = function (a) {
    return exports.keccak(a);
};
/**
 * Creates SHA256 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 */
exports.sha256 = function (a) {
    a = bytes_1.toBuffer(a);
    return createHash('sha256')
        .update(a)
        .digest();
};
/**
 * Creates RIPEMD160 hash of the input.
 * @param a The input data (Buffer|Array|String|Number)
 * @param padded Whether it should be padded to 256 bits or not
 */
exports.ripemd160 = function (a, padded) {
    a = bytes_1.toBuffer(a);
    var hash = createHash('rmd160')
        .update(a)
        .digest();
    if (padded === true) {
        return bytes_1.setLength(hash, 32);
    }
    else {
        return hash;
    }
};
/**
 * Creates SHA-3 hash of the RLP encoded version of the input.
 * @param a The input data
 */
exports.rlphash = function (a) {
    return exports.keccak(rlp.encode(a));
};
//# sourceMappingURL=hash.js.map

/***/ }),

/***/ 751837:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
exports.secp256k1 = secp256k1;
var ethjsUtil = __webpack_require__(180884);
var BN = __webpack_require__(213550);
exports.BN = BN;
var rlp = __webpack_require__(6636);
exports.rlp = rlp;
Object.assign(exports, ethjsUtil);
/**
 * Constants
 */
__export(__webpack_require__(593270));
/**
 * Public-key cryptography (secp256k1) and addresses
 */
__export(__webpack_require__(189502));
/**
 * Hash functions
 */
__export(__webpack_require__(871638));
/**
 * ECDSA signature
 */
__export(__webpack_require__(908243));
/**
 * Utilities for manipulating Buffers, byte arrays, etc.
 */
__export(__webpack_require__(990322));
/**
 * Function for definining properties on an object
 */
__export(__webpack_require__(559984));
//# sourceMappingURL=index.js.map

/***/ }),

/***/ 559984:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var assert = __webpack_require__(742357);
var ethjsUtil = __webpack_require__(180884);
var rlp = __webpack_require__(6636);
var bytes_1 = __webpack_require__(990322);
/**
 * Defines properties on a `Object`. It make the assumption that underlying data is binary.
 * @param self the `Object` to define properties on
 * @param fields an array fields to define. Fields can contain:
 * * `name` - the name of the properties
 * * `length` - the number of bytes the field can have
 * * `allowLess` - if the field can be less than the length
 * * `allowEmpty`
 * @param data data to be validated against the definitions
 * @deprecated
 */
exports.defineProperties = function (self, fields, data) {
    self.raw = [];
    self._fields = [];
    // attach the `toJSON`
    self.toJSON = function (label) {
        if (label === void 0) { label = false; }
        if (label) {
            var obj_1 = {};
            self._fields.forEach(function (field) {
                obj_1[field] = "0x" + self[field].toString('hex');
            });
            return obj_1;
        }
        return bytes_1.baToJSON(self.raw);
    };
    self.serialize = function serialize() {
        return rlp.encode(self.raw);
    };
    fields.forEach(function (field, i) {
        self._fields.push(field.name);
        function getter() {
            return self.raw[i];
        }
        function setter(v) {
            v = bytes_1.toBuffer(v);
            if (v.toString('hex') === '00' && !field.allowZero) {
                v = Buffer.allocUnsafe(0);
            }
            if (field.allowLess && field.length) {
                v = bytes_1.stripZeros(v);
                assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes");
            }
            else if (!(field.allowZero && v.length === 0) && field.length) {
                assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length);
            }
            self.raw[i] = v;
        }
        Object.defineProperty(self, field.name, {
            enumerable: true,
            configurable: true,
            get: getter,
            set: setter,
        });
        if (field.default) {
            self[field.name] = field.default;
        }
        // attach alias
        if (field.alias) {
            Object.defineProperty(self, field.alias, {
                enumerable: false,
                configurable: true,
                set: setter,
                get: getter,
            });
        }
    });
    // if the constuctor is passed data
    if (data) {
        if (typeof data === 'string') {
            data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex');
        }
        if (Buffer.isBuffer(data)) {
            data = rlp.decode(data);
        }
        if (Array.isArray(data)) {
            if (data.length > self._fields.length) {
                throw new Error('wrong number of fields in data');
            }
            // make sure all the items are buffers
            data.forEach(function (d, i) {
                self[self._fields[i]] = bytes_1.toBuffer(d);
            });
        }
        else if (typeof data === 'object') {
            var keys_1 = Object.keys(data);
            fields.forEach(function (field) {
                if (keys_1.indexOf(field.name) !== -1)
                    self[field.name] = data[field.name];
                if (keys_1.indexOf(field.alias) !== -1)
                    self[field.alias] = data[field.alias];
            });
        }
        else {
            throw new Error('invalid data');
        }
    }
};
//# sourceMappingURL=object.js.map

/***/ }),

/***/ 908243:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
var secp256k1 = __webpack_require__(907972);
var BN = __webpack_require__(213550);
var bytes_1 = __webpack_require__(990322);
var hash_1 = __webpack_require__(871638);
/**
 * Returns the ECDSA signature of a message hash.
 */
exports.ecsign = function (msgHash, privateKey, chainId) {
    var sig = secp256k1.sign(msgHash, privateKey);
    var recovery = sig.recovery;
    var ret = {
        r: sig.signature.slice(0, 32),
        s: sig.signature.slice(32, 64),
        v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27,
    };
    return ret;
};
/**
 * ECDSA public key recovery from signature.
 * @returns Recovered public key
 */
exports.ecrecover = function (msgHash, v, r, s, chainId) {
    var signature = Buffer.concat([bytes_1.setLength(r, 32), bytes_1.setLength(s, 32)], 64);
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    var senderPubKey = secp256k1.recover(msgHash, signature, recovery);
    return secp256k1.publicKeyConvert(senderPubKey, false).slice(1);
};
/**
 * Convert signature parameters into the format of `eth_sign` RPC method.
 * @returns Signature
 */
exports.toRpcSig = function (v, r, s, chainId) {
    var recovery = calculateSigRecovery(v, chainId);
    if (!isValidSigRecovery(recovery)) {
        throw new Error('Invalid signature v value');
    }
    // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin
    return bytes_1.bufferToHex(Buffer.concat([bytes_1.setLengthLeft(r, 32), bytes_1.setLengthLeft(s, 32), bytes_1.toBuffer(v)]));
};
/**
 * Convert signature format of the `eth_sign` RPC method to signature parameters
 * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053
 */
exports.fromRpcSig = function (sig) {
    var buf = bytes_1.toBuffer(sig);
    // NOTE: with potential introduction of chainId this might need to be updated
    if (buf.length !== 65) {
        throw new Error('Invalid signature length');
    }
    var v = buf[64];
    // support both versions of `eth_sign` responses
    if (v < 27) {
        v += 27;
    }
    return {
        v: v,
        r: buf.slice(0, 32),
        s: buf.slice(32, 64),
    };
};
/**
 * Validate a ECDSA signature.
 * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one
 */
exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) {
    if (homesteadOrLater === void 0) { homesteadOrLater = true; }
    var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16);
    var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16);
    if (r.length !== 32 || s.length !== 32) {
        return false;
    }
    if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) {
        return false;
    }
    var rBN = new BN(r);
    var sBN = new BN(s);
    if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) {
        return false;
    }
    if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) {
        return false;
    }
    return true;
};
/**
 * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call.
 * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign`
 * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key
 * used to produce the signature.
 */
exports.hashPersonalMessage = function (message) {
    var prefix = Buffer.from("\u0019Ethereum Signed Message:\n" + message.length.toString(), 'utf-8');
    return hash_1.keccak(Buffer.concat([prefix, message]));
};
function calculateSigRecovery(v, chainId) {
    return chainId ? v - (2 * chainId + 35) : v - 27;
}
function isValidSigRecovery(recovery) {
    return recovery === 0 || recovery === 1;
}
//# sourceMappingURL=signature.js.map

/***/ }),

/***/ 500775:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(516850)(__webpack_require__(810289)('keccak'))


/***/ }),

/***/ 700841:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

try {
  module.exports = __webpack_require__(500775)
} catch (err) {
  if (process.env.DEBUG) {
    console.error('Keccak bindings are not compiled. Pure JS implementation will be used.')
  }

  module.exports = __webpack_require__(882069)
}


/***/ }),

/***/ 882069:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

module.exports = __webpack_require__(516850)(__webpack_require__(301513))


/***/ }),

/***/ 516850:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const createKeccak = __webpack_require__(522881)
const createShake = __webpack_require__(756697)

module.exports = function (KeccakState) {
  const Keccak = createKeccak(KeccakState)
  const Shake = createShake(KeccakState)

  return function (algorithm, options) {
    const hash = typeof algorithm === 'string' ? algorithm.toLowerCase() : algorithm
    switch (hash) {
      case 'keccak224': return new Keccak(1152, 448, null, 224, options)
      case 'keccak256': return new Keccak(1088, 512, null, 256, options)
      case 'keccak384': return new Keccak(832, 768, null, 384, options)
      case 'keccak512': return new Keccak(576, 1024, null, 512, options)

      case 'sha3-224': return new Keccak(1152, 448, 0x06, 224, options)
      case 'sha3-256': return new Keccak(1088, 512, 0x06, 256, options)
      case 'sha3-384': return new Keccak(832, 768, 0x06, 384, options)
      case 'sha3-512': return new Keccak(576, 1024, 0x06, 512, options)

      case 'shake128': return new Shake(1344, 256, 0x1f, options)
      case 'shake256': return new Shake(1088, 512, 0x1f, options)

      default: throw new Error('Invald algorithm: ' + algorithm)
    }
  }
}


/***/ }),

/***/ 522881:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Keccak (rate, capacity, delimitedSuffix, hashBitLength, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._hashBitLength = hashBitLength
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Keccak, Transform)

  Keccak.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype._flush = function (callback) {
    let error = null
    try {
      this.push(this.digest())
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Keccak.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Digest already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Keccak.prototype.digest = function (encoding) {
    if (this._finalized) throw new Error('Digest already called')
    this._finalized = true

    if (this._delimitedSuffix) this._state.absorbLastFewBits(this._delimitedSuffix)
    let digest = this._state.squeeze(this._hashBitLength / 8)
    if (encoding !== undefined) digest = digest.toString(encoding)

    this._resetState()

    return digest
  }

  // remove result from memory
  Keccak.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  // because sometimes we need hash right now and little later
  Keccak.prototype._clone = function () {
    const clone = new Keccak(this._rate, this._capacity, this._delimitedSuffix, this._hashBitLength, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Keccak
}


/***/ }),

/***/ 756697:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const Transform = __webpack_require__(92413).Transform
const inherits = __webpack_require__(394378)

module.exports = function (KeccakState) {
  function Shake (rate, capacity, delimitedSuffix, options) {
    Transform.call(this, options)

    this._rate = rate
    this._capacity = capacity
    this._delimitedSuffix = delimitedSuffix
    this._options = options

    this._state = new KeccakState()
    this._state.initialize(rate, capacity)
    this._finalized = false
  }

  inherits(Shake, Transform)

  Shake.prototype._transform = function (chunk, encoding, callback) {
    let error = null
    try {
      this.update(chunk, encoding)
    } catch (err) {
      error = err
    }

    callback(error)
  }

  Shake.prototype._flush = function () {}

  Shake.prototype._read = function (size) {
    this.push(this.squeeze(size))
  }

  Shake.prototype.update = function (data, encoding) {
    if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
    if (this._finalized) throw new Error('Squeeze already called')
    if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)

    this._state.absorb(data)

    return this
  }

  Shake.prototype.squeeze = function (dataByteLength, encoding) {
    if (!this._finalized) {
      this._finalized = true
      this._state.absorbLastFewBits(this._delimitedSuffix)
    }

    let data = this._state.squeeze(dataByteLength)
    if (encoding !== undefined) data = data.toString(encoding)

    return data
  }

  Shake.prototype._resetState = function () {
    this._state.initialize(this._rate, this._capacity)
    return this
  }

  Shake.prototype._clone = function () {
    const clone = new Shake(this._rate, this._capacity, this._delimitedSuffix, this._options)
    this._state.copy(clone._state)
    clone._finalized = this._finalized

    return clone
  }

  return Shake
}


/***/ }),

/***/ 198165:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

const P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648]

exports.p1600 = function (s) {
  for (let round = 0; round < 24; ++round) {
    // theta
    const lo0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]
    const hi0 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]
    const lo1 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]
    const hi1 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]
    const lo2 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]
    const hi2 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]
    const lo3 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]
    const hi3 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]
    const lo4 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]
    const hi4 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]

    let lo = lo4 ^ (lo1 << 1 | hi1 >>> 31)
    let hi = hi4 ^ (hi1 << 1 | lo1 >>> 31)
    const t1slo0 = s[0] ^ lo
    const t1shi0 = s[1] ^ hi
    const t1slo5 = s[10] ^ lo
    const t1shi5 = s[11] ^ hi
    const t1slo10 = s[20] ^ lo
    const t1shi10 = s[21] ^ hi
    const t1slo15 = s[30] ^ lo
    const t1shi15 = s[31] ^ hi
    const t1slo20 = s[40] ^ lo
    const t1shi20 = s[41] ^ hi
    lo = lo0 ^ (lo2 << 1 | hi2 >>> 31)
    hi = hi0 ^ (hi2 << 1 | lo2 >>> 31)
    const t1slo1 = s[2] ^ lo
    const t1shi1 = s[3] ^ hi
    const t1slo6 = s[12] ^ lo
    const t1shi6 = s[13] ^ hi
    const t1slo11 = s[22] ^ lo
    const t1shi11 = s[23] ^ hi
    const t1slo16 = s[32] ^ lo
    const t1shi16 = s[33] ^ hi
    const t1slo21 = s[42] ^ lo
    const t1shi21 = s[43] ^ hi
    lo = lo1 ^ (lo3 << 1 | hi3 >>> 31)
    hi = hi1 ^ (hi3 << 1 | lo3 >>> 31)
    const t1slo2 = s[4] ^ lo
    const t1shi2 = s[5] ^ hi
    const t1slo7 = s[14] ^ lo
    const t1shi7 = s[15] ^ hi
    const t1slo12 = s[24] ^ lo
    const t1shi12 = s[25] ^ hi
    const t1slo17 = s[34] ^ lo
    const t1shi17 = s[35] ^ hi
    const t1slo22 = s[44] ^ lo
    const t1shi22 = s[45] ^ hi
    lo = lo2 ^ (lo4 << 1 | hi4 >>> 31)
    hi = hi2 ^ (hi4 << 1 | lo4 >>> 31)
    const t1slo3 = s[6] ^ lo
    const t1shi3 = s[7] ^ hi
    const t1slo8 = s[16] ^ lo
    const t1shi8 = s[17] ^ hi
    const t1slo13 = s[26] ^ lo
    const t1shi13 = s[27] ^ hi
    const t1slo18 = s[36] ^ lo
    const t1shi18 = s[37] ^ hi
    const t1slo23 = s[46] ^ lo
    const t1shi23 = s[47] ^ hi
    lo = lo3 ^ (lo0 << 1 | hi0 >>> 31)
    hi = hi3 ^ (hi0 << 1 | lo0 >>> 31)
    const t1slo4 = s[8] ^ lo
    const t1shi4 = s[9] ^ hi
    const t1slo9 = s[18] ^ lo
    const t1shi9 = s[19] ^ hi
    const t1slo14 = s[28] ^ lo
    const t1shi14 = s[29] ^ hi
    const t1slo19 = s[38] ^ lo
    const t1shi19 = s[39] ^ hi
    const t1slo24 = s[48] ^ lo
    const t1shi24 = s[49] ^ hi

    // rho & pi
    const t2slo0 = t1slo0
    const t2shi0 = t1shi0
    const t2slo16 = (t1shi5 << 4 | t1slo5 >>> 28)
    const t2shi16 = (t1slo5 << 4 | t1shi5 >>> 28)
    const t2slo7 = (t1slo10 << 3 | t1shi10 >>> 29)
    const t2shi7 = (t1shi10 << 3 | t1slo10 >>> 29)
    const t2slo23 = (t1shi15 << 9 | t1slo15 >>> 23)
    const t2shi23 = (t1slo15 << 9 | t1shi15 >>> 23)
    const t2slo14 = (t1slo20 << 18 | t1shi20 >>> 14)
    const t2shi14 = (t1shi20 << 18 | t1slo20 >>> 14)
    const t2slo10 = (t1slo1 << 1 | t1shi1 >>> 31)
    const t2shi10 = (t1shi1 << 1 | t1slo1 >>> 31)
    const t2slo1 = (t1shi6 << 12 | t1slo6 >>> 20)
    const t2shi1 = (t1slo6 << 12 | t1shi6 >>> 20)
    const t2slo17 = (t1slo11 << 10 | t1shi11 >>> 22)
    const t2shi17 = (t1shi11 << 10 | t1slo11 >>> 22)
    const t2slo8 = (t1shi16 << 13 | t1slo16 >>> 19)
    const t2shi8 = (t1slo16 << 13 | t1shi16 >>> 19)
    const t2slo24 = (t1slo21 << 2 | t1shi21 >>> 30)
    const t2shi24 = (t1shi21 << 2 | t1slo21 >>> 30)
    const t2slo20 = (t1shi2 << 30 | t1slo2 >>> 2)
    const t2shi20 = (t1slo2 << 30 | t1shi2 >>> 2)
    const t2slo11 = (t1slo7 << 6 | t1shi7 >>> 26)
    const t2shi11 = (t1shi7 << 6 | t1slo7 >>> 26)
    const t2slo2 = (t1shi12 << 11 | t1slo12 >>> 21)
    const t2shi2 = (t1slo12 << 11 | t1shi12 >>> 21)
    const t2slo18 = (t1slo17 << 15 | t1shi17 >>> 17)
    const t2shi18 = (t1shi17 << 15 | t1slo17 >>> 17)
    const t2slo9 = (t1shi22 << 29 | t1slo22 >>> 3)
    const t2shi9 = (t1slo22 << 29 | t1shi22 >>> 3)
    const t2slo5 = (t1slo3 << 28 | t1shi3 >>> 4)
    const t2shi5 = (t1shi3 << 28 | t1slo3 >>> 4)
    const t2slo21 = (t1shi8 << 23 | t1slo8 >>> 9)
    const t2shi21 = (t1slo8 << 23 | t1shi8 >>> 9)
    const t2slo12 = (t1slo13 << 25 | t1shi13 >>> 7)
    const t2shi12 = (t1shi13 << 25 | t1slo13 >>> 7)
    const t2slo3 = (t1slo18 << 21 | t1shi18 >>> 11)
    const t2shi3 = (t1shi18 << 21 | t1slo18 >>> 11)
    const t2slo19 = (t1shi23 << 24 | t1slo23 >>> 8)
    const t2shi19 = (t1slo23 << 24 | t1shi23 >>> 8)
    const t2slo15 = (t1slo4 << 27 | t1shi4 >>> 5)
    const t2shi15 = (t1shi4 << 27 | t1slo4 >>> 5)
    const t2slo6 = (t1slo9 << 20 | t1shi9 >>> 12)
    const t2shi6 = (t1shi9 << 20 | t1slo9 >>> 12)
    const t2slo22 = (t1shi14 << 7 | t1slo14 >>> 25)
    const t2shi22 = (t1slo14 << 7 | t1shi14 >>> 25)
    const t2slo13 = (t1slo19 << 8 | t1shi19 >>> 24)
    const t2shi13 = (t1shi19 << 8 | t1slo19 >>> 24)
    const t2slo4 = (t1slo24 << 14 | t1shi24 >>> 18)
    const t2shi4 = (t1shi24 << 14 | t1slo24 >>> 18)

    // chi
    s[0] = t2slo0 ^ (~t2slo1 & t2slo2)
    s[1] = t2shi0 ^ (~t2shi1 & t2shi2)
    s[10] = t2slo5 ^ (~t2slo6 & t2slo7)
    s[11] = t2shi5 ^ (~t2shi6 & t2shi7)
    s[20] = t2slo10 ^ (~t2slo11 & t2slo12)
    s[21] = t2shi10 ^ (~t2shi11 & t2shi12)
    s[30] = t2slo15 ^ (~t2slo16 & t2slo17)
    s[31] = t2shi15 ^ (~t2shi16 & t2shi17)
    s[40] = t2slo20 ^ (~t2slo21 & t2slo22)
    s[41] = t2shi20 ^ (~t2shi21 & t2shi22)
    s[2] = t2slo1 ^ (~t2slo2 & t2slo3)
    s[3] = t2shi1 ^ (~t2shi2 & t2shi3)
    s[12] = t2slo6 ^ (~t2slo7 & t2slo8)
    s[13] = t2shi6 ^ (~t2shi7 & t2shi8)
    s[22] = t2slo11 ^ (~t2slo12 & t2slo13)
    s[23] = t2shi11 ^ (~t2shi12 & t2shi13)
    s[32] = t2slo16 ^ (~t2slo17 & t2slo18)
    s[33] = t2shi16 ^ (~t2shi17 & t2shi18)
    s[42] = t2slo21 ^ (~t2slo22 & t2slo23)
    s[43] = t2shi21 ^ (~t2shi22 & t2shi23)
    s[4] = t2slo2 ^ (~t2slo3 & t2slo4)
    s[5] = t2shi2 ^ (~t2shi3 & t2shi4)
    s[14] = t2slo7 ^ (~t2slo8 & t2slo9)
    s[15] = t2shi7 ^ (~t2shi8 & t2shi9)
    s[24] = t2slo12 ^ (~t2slo13 & t2slo14)
    s[25] = t2shi12 ^ (~t2shi13 & t2shi14)
    s[34] = t2slo17 ^ (~t2slo18 & t2slo19)
    s[35] = t2shi17 ^ (~t2shi18 & t2shi19)
    s[44] = t2slo22 ^ (~t2slo23 & t2slo24)
    s[45] = t2shi22 ^ (~t2shi23 & t2shi24)
    s[6] = t2slo3 ^ (~t2slo4 & t2slo0)
    s[7] = t2shi3 ^ (~t2shi4 & t2shi0)
    s[16] = t2slo8 ^ (~t2slo9 & t2slo5)
    s[17] = t2shi8 ^ (~t2shi9 & t2shi5)
    s[26] = t2slo13 ^ (~t2slo14 & t2slo10)
    s[27] = t2shi13 ^ (~t2shi14 & t2shi10)
    s[36] = t2slo18 ^ (~t2slo19 & t2slo15)
    s[37] = t2shi18 ^ (~t2shi19 & t2shi15)
    s[46] = t2slo23 ^ (~t2slo24 & t2slo20)
    s[47] = t2shi23 ^ (~t2shi24 & t2shi20)
    s[8] = t2slo4 ^ (~t2slo0 & t2slo1)
    s[9] = t2shi4 ^ (~t2shi0 & t2shi1)
    s[18] = t2slo9 ^ (~t2slo5 & t2slo6)
    s[19] = t2shi9 ^ (~t2shi5 & t2shi6)
    s[28] = t2slo14 ^ (~t2slo10 & t2slo11)
    s[29] = t2shi14 ^ (~t2shi10 & t2shi11)
    s[38] = t2slo19 ^ (~t2slo15 & t2slo16)
    s[39] = t2shi19 ^ (~t2shi15 & t2shi16)
    s[48] = t2slo24 ^ (~t2slo20 & t2slo21)
    s[49] = t2shi24 ^ (~t2shi20 & t2shi21)

    // iota
    s[0] ^= P1600_ROUND_CONSTANTS[round * 2]
    s[1] ^= P1600_ROUND_CONSTANTS[round * 2 + 1]
  }
}


/***/ }),

/***/ 301513:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

const Buffer = __webpack_require__(289509).Buffer
const keccakState = __webpack_require__(198165)

function Keccak () {
  // much faster than `new Array(50)`
  this.state = [
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0,
    0, 0, 0, 0, 0
  ]

  this.blockSize = null
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.initialize = function (rate, capacity) {
  for (let i = 0; i < 50; ++i) this.state[i] = 0
  this.blockSize = rate / 8
  this.count = 0
  this.squeezing = false
}

Keccak.prototype.absorb = function (data) {
  for (let i = 0; i < data.length; ++i) {
    this.state[~~(this.count / 4)] ^= data[i] << (8 * (this.count % 4))
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }
}

Keccak.prototype.absorbLastFewBits = function (bits) {
  this.state[~~(this.count / 4)] ^= bits << (8 * (this.count % 4))
  if ((bits & 0x80) !== 0 && this.count === (this.blockSize - 1)) keccakState.p1600(this.state)
  this.state[~~((this.blockSize - 1) / 4)] ^= 0x80 << (8 * ((this.blockSize - 1) % 4))
  keccakState.p1600(this.state)
  this.count = 0
  this.squeezing = true
}

Keccak.prototype.squeeze = function (length) {
  if (!this.squeezing) this.absorbLastFewBits(0x01)

  const output = Buffer.alloc(length)
  for (var i = 0; i < length; ++i) {
    output[i] = (this.state[~~(this.count / 4)] >>> (8 * (this.count % 4))) & 0xff
    this.count += 1
    if (this.count === this.blockSize) {
      keccakState.p1600(this.state)
      this.count = 0
    }
  }

  return output
}

Keccak.prototype.copy = function (dest) {
  for (let i = 0; i < 50; ++i) dest.state[i] = this.state[i]
  dest.blockSize = this.blockSize
  dest.count = this.count
  dest.squeezing = this.squeezing
}

module.exports = Keccak


/***/ }),

/***/ 534369:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var v1 = __webpack_require__(26309);
var v4 = __webpack_require__(882352);

var uuid = v4;
uuid.v1 = v1;
uuid.v4 = v4;

module.exports = uuid;


/***/ }),

/***/ 255018:
/***/ ((module) => {

/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */
var byteToHex = [];
for (var i = 0; i < 256; ++i) {
  byteToHex[i] = (i + 0x100).toString(16).substr(1);
}

function bytesToUuid(buf, offset) {
  var i = offset || 0;
  var bth = byteToHex;
  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
  return ([bth[buf[i++]], bth[buf[i++]], 
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]], '-',
	bth[buf[i++]], bth[buf[i++]],
	bth[buf[i++]], bth[buf[i++]],
	bth[buf[i++]], bth[buf[i++]]]).join('');
}

module.exports = bytesToUuid;


/***/ }),

/***/ 804340:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Unique ID creation requires a high quality random # generator.  In node.js
// this is pretty straight-forward - we use the crypto API.

var crypto = __webpack_require__(676417);

module.exports = function nodeRNG() {
  return crypto.randomBytes(16);
};


/***/ }),

/***/ 26309:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var rng = __webpack_require__(804340);
var bytesToUuid = __webpack_require__(255018);

// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html

var _nodeId;
var _clockseq;

// Previous uuid creation time
var _lastMSecs = 0;
var _lastNSecs = 0;

// See https://github.com/broofa/node-uuid for API details
function v1(options, buf, offset) {
  var i = buf && offset || 0;
  var b = buf || [];

  options = options || {};
  var node = options.node || _nodeId;
  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;

  // node and clockseq need to be initialized to random values if they're not
  // specified.  We do this lazily to minimize issues related to insufficient
  // system entropy.  See #189
  if (node == null || clockseq == null) {
    var seedBytes = rng();
    if (node == null) {
      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
      node = _nodeId = [
        seedBytes[0] | 0x01,
        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
      ];
    }
    if (clockseq == null) {
      // Per 4.2.2, randomize (14 bit) clockseq
      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
    }
  }

  // UUID timestamps are 100 nano-second units since the Gregorian epoch,
  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();

  // Per 4.2.1.2, use count of uuid's generated during the current clock
  // cycle to simulate higher resolution clock
  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;

  // Time since last uuid creation (in msecs)
  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;

  // Per 4.2.1.2, Bump clockseq on clock regression
  if (dt < 0 && options.clockseq === undefined) {
    clockseq = clockseq + 1 & 0x3fff;
  }

  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
  // time interval
  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
    nsecs = 0;
  }

  // Per 4.2.1.2 Throw error if too many uuids are requested
  if (nsecs >= 10000) {
    throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
  }

  _lastMSecs = msecs;
  _lastNSecs = nsecs;
  _clockseq = clockseq;

  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
  msecs += 12219292800000;

  // `time_low`
  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
  b[i++] = tl >>> 24 & 0xff;
  b[i++] = tl >>> 16 & 0xff;
  b[i++] = tl >>> 8 & 0xff;
  b[i++] = tl & 0xff;

  // `time_mid`
  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
  b[i++] = tmh >>> 8 & 0xff;
  b[i++] = tmh & 0xff;

  // `time_high_and_version`
  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
  b[i++] = tmh >>> 16 & 0xff;

  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
  b[i++] = clockseq >>> 8 | 0x80;

  // `clock_seq_low`
  b[i++] = clockseq & 0xff;

  // `node`
  for (var n = 0; n < 6; ++n) {
    b[i + n] = node[n];
  }

  return buf ? buf : bytesToUuid(b);
}

module.exports = v1;


/***/ }),

/***/ 882352:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var rng = __webpack_require__(804340);
var bytesToUuid = __webpack_require__(255018);

function v4(options, buf, offset) {
  var i = buf && offset || 0;

  if (typeof(options) == 'string') {
    buf = options === 'binary' ? new Array(16) : null;
    options = null;
  }
  options = options || {};

  var rnds = options.random || (options.rng || rng)();

  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6] = (rnds[6] & 0x0f) | 0x40;
  rnds[8] = (rnds[8] & 0x3f) | 0x80;

  // Copy bytes to buffer, if provided
  if (buf) {
    for (var ii = 0; ii < 16; ++ii) {
      buf[i + ii] = rnds[ii];
    }
  }

  return buf || bytesToUuid(rnds);
}

module.exports = v4;


/***/ }),

/***/ 616119:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file accounts.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var core = __webpack_require__(751931);
var Method = __webpack_require__(827123);
var Account = __webpack_require__(793608);
var Hash = __webpack_require__(701538);
var RLP = __webpack_require__(73390);// jshint ignore:line
var Bytes = __webpack_require__(859494);// jshint ignore:line
var cryp = (typeof global === 'undefined') ? __webpack_require__(855835) : __webpack_require__(676417);
var scrypt = __webpack_require__(617635);
var uuid = __webpack_require__(534369);
var utils = __webpack_require__(328700);
var helpers = __webpack_require__(524763);
var Transaction = __webpack_require__(651283)/* .Transaction */ .YW;
var Common = __webpack_require__(265982).default;


var isNot = function(value) {
    return (_.isUndefined(value) || _.isNull(value));
};

var Accounts = function Accounts() {
    var _this = this;

    // sets _requestmanager
    core.packageInit(this, arguments);

    // remove unecessary core functions
    delete this.BatchRequest;
    delete this.extend;

    var _ethereumCall = [
        new Method({
            name: 'getNetworkId',
            call: 'net_version',
            params: 0,
            outputFormatter: parseInt
        }),
        new Method({
            name: 'getChainId',
            call: 'eth_chainId',
            params: 0,
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'getGasPrice',
            call: 'eth_gasPrice',
            params: 0
        }),
        new Method({
            name: 'getTransactionCount',
            call: 'eth_getTransactionCount',
            params: 2,
            inputFormatter: [function(address) {
                if (utils.isAddress(address)) {
                    return address;
                } else {
                    throw new Error('Address ' + address + ' is not a valid address to get the "transactionCount".');
                }
            }, function() {
                return 'latest';
            }]
        })
    ];
    // attach methods to this._ethereumCall
    this._ethereumCall = {};
    _.each(_ethereumCall, function(method) {
        method.attachToObject(_this._ethereumCall);
        method.setRequestManager(_this._requestManager);
    });


    this.wallet = new Wallet(this);
};

Accounts.prototype._addAccountFunctions = function(account) {
    var _this = this;

    // add sign functions
    account.signTransaction = function signTransaction(tx, callback) {
        return _this.signTransaction(tx, account.privateKey, callback);
    };
    account.sign = function sign(data) {
        return _this.sign(data, account.privateKey);
    };

    account.encrypt = function encrypt(password, options) {
        return _this.encrypt(account.privateKey, password, options);
    };


    return account;
};

Accounts.prototype.create = function create(entropy) {
    return this._addAccountFunctions(Account.create(entropy || utils.randomHex(32)));
};

Accounts.prototype.privateKeyToAccount = function privateKeyToAccount(privateKey, ignoreLength) {
    if (!privateKey.startsWith('0x')) {
        privateKey = '0x' + privateKey;
    }

    // 64 hex characters + hex-prefix
    if (!ignoreLength && privateKey.length !== 66) {
        throw new Error("Private key must be 32 bytes long");
    }

    return this._addAccountFunctions(Account.fromPrivate(privateKey));
};

Accounts.prototype.signTransaction = function signTransaction(tx, privateKey, callback) {
    var _this = this,
        error = false,
        transactionOptions = {},
        hasTxSigningOptions = !!(tx && ((tx.chain && tx.hardfork) || tx.common));

    callback = callback || function() {
    };

    if (!tx) {
        error = new Error('No transaction object given!');

        callback(error);
        return Promise.reject(error);
    }

    function signed(tx) {
        if (tx.common && (tx.chain && tx.hardfork)) {
            error = new Error(
                'Please provide the ethereumjs-common object or the chain and hardfork property but not all together.'
            );
        }

        if ((tx.chain && !tx.hardfork) || (tx.hardfork && !tx.chain)) {
            error = new Error(
                'When specifying chain and hardfork, both values must be defined. ' +
                'Received "chain": ' + tx.chain + ', "hardfork": ' + tx.hardfork
            );
        }

        if (!tx.gas && !tx.gasLimit) {
            error = new Error('"gas" is missing');
        }

        if (tx.nonce < 0 ||
            tx.gas < 0 ||
            tx.gasPrice < 0 ||
            tx.chainId < 0) {
            error = new Error('Gas, gasPrice, nonce or chainId is lower than 0');
        }

        if (error) {
            callback(error);
            return Promise.reject(error);
        }

        try {
            var transaction = helpers.formatters.inputCallFormatter(_.clone(tx));
            transaction.to = transaction.to || '0x';
            transaction.data = transaction.data || '0x';
            transaction.value = transaction.value || '0x';
            transaction.chainId = utils.numberToHex(transaction.chainId);

            // Because tx has no ethereumjs-tx signing options we use fetched vals.
            if (!hasTxSigningOptions) {
                transactionOptions.common = Common.forCustomChain(
                    'mainnet',
                    {
                        name: 'custom-network',
                        networkId: transaction.networkId,
                        chainId: transaction.chainId
                    },
                    'petersburg'
                );

                delete transaction.networkId;
            } else {
                if (transaction.common) {
                    transactionOptions.common = Common.forCustomChain(
                        transaction.common.baseChain || 'mainnet',
                        {
                            name: transaction.common.customChain.name || 'custom-network',
                            networkId: transaction.common.customChain.networkId,
                            chainId: transaction.common.customChain.chainId
                        },
                        transaction.common.hardfork || 'petersburg'
                    );

                    delete transaction.common;
                }

                if (transaction.chain) {
                    transactionOptions.chain = transaction.chain;
                    delete transaction.chain;
                }

                if (transaction.hardfork) {
                    transactionOptions.hardfork = transaction.hardfork;
                    delete transaction.hardfork;
                }
            }

            if (privateKey.startsWith('0x')) {
                privateKey = privateKey.substring(2);
            }

            var ethTx = new Transaction(transaction, transactionOptions);

            ethTx.sign(Buffer.from(privateKey, 'hex'));

            var validationResult = ethTx.validate(true);

            if (validationResult !== '') {
                throw new Error('Signer Error: ' + validationResult);
            }

            var rlpEncoded = ethTx.serialize().toString('hex');
            var rawTransaction = '0x' + rlpEncoded;
            var transactionHash = utils.keccak256(rawTransaction);

            var result = {
                messageHash: '0x' + Buffer.from(ethTx.hash(false)).toString('hex'),
                v: '0x' + Buffer.from(ethTx.v).toString('hex'),
                r: '0x' + Buffer.from(ethTx.r).toString('hex'),
                s: '0x' + Buffer.from(ethTx.s).toString('hex'),
                rawTransaction: rawTransaction,
                transactionHash: transactionHash
            };

            callback(null, result);
            return result;

        } catch (e) {
            callback(e);
            return Promise.reject(e);
        }
    }


    // Resolve immediately if nonce, chainId, price and signing options are provided
    if (tx.nonce !== undefined && tx.chainId !== undefined && tx.gasPrice !== undefined && hasTxSigningOptions) {
        return Promise.resolve(signed(tx));
    }

    // Otherwise, get the missing info from the Ethereum Node
    return Promise.all([
        isNot(tx.chainId) ? _this._ethereumCall.getChainId() : tx.chainId,
        isNot(tx.gasPrice) ? _this._ethereumCall.getGasPrice() : tx.gasPrice,
        isNot(tx.nonce) ? _this._ethereumCall.getTransactionCount(_this.privateKeyToAccount(privateKey).address) : tx.nonce,
        isNot(hasTxSigningOptions) ? _this._ethereumCall.getNetworkId() : 1
    ]).then(function(args) {
        if (isNot(args[0]) || isNot(args[1]) || isNot(args[2]) || isNot(args[3])) {
            throw new Error('One of the values "chainId", "networkId", "gasPrice", or "nonce" couldn\'t be fetched: ' + JSON.stringify(args));
        }
        return signed(_.extend(tx, {chainId: args[0], gasPrice: args[1], nonce: args[2], networkId: args[3]}));
    });
};

/* jshint ignore:start */
Accounts.prototype.recoverTransaction = function recoverTransaction(rawTx) {
    var values = RLP.decode(rawTx);
    var signature = Account.encodeSignature(values.slice(6, 9));
    var recovery = Bytes.toNumber(values[6]);
    var extraData = recovery < 35 ? [] : [Bytes.fromNumber((recovery - 35) >> 1), '0x', '0x'];
    var signingData = values.slice(0, 6).concat(extraData);
    var signingDataHex = RLP.encode(signingData);
    return Account.recover(Hash.keccak256(signingDataHex), signature);
};
/* jshint ignore:end */

Accounts.prototype.hashMessage = function hashMessage(data) {
    var messageHex = utils.isHexStrict(data) ? data : utils.utf8ToHex(data);
    var messageBytes = utils.hexToBytes(messageHex)
    var messageBuffer = Buffer.from(messageBytes);
    var preamble = '\x19Ethereum Signed Message:\n' + messageBytes.length;
    var preambleBuffer = Buffer.from(preamble);
    var ethMessage = Buffer.concat([preambleBuffer, messageBuffer]);
    return Hash.keccak256s(ethMessage);
};

Accounts.prototype.sign = function sign(data, privateKey) {
    if (!privateKey.startsWith('0x')) {
        privateKey = '0x' + privateKey;
    }

    // 64 hex characters + hex-prefix
    if (privateKey.length !== 66) {
        throw new Error("Private key must be 32 bytes long");
    }

    var hash = this.hashMessage(data);
    var signature = Account.sign(hash, privateKey);
    var vrs = Account.decodeSignature(signature);
    return {
        message: data,
        messageHash: hash,
        v: vrs[0],
        r: vrs[1],
        s: vrs[2],
        signature: signature
    };
};

Accounts.prototype.recover = function recover(message, signature, preFixed) {
    var args = [].slice.apply(arguments);


    if (_.isObject(message)) {
        return this.recover(message.messageHash, Account.encodeSignature([message.v, message.r, message.s]), true);
    }

    if (!preFixed) {
        message = this.hashMessage(message);
    }

    if (args.length >= 4) {
        preFixed = args.slice(-1)[0];
        preFixed = _.isBoolean(preFixed) ? !!preFixed : false;

        return this.recover(message, Account.encodeSignature(args.slice(1, 4)), preFixed); // v, r, s
    }
    return Account.recover(message, signature);
};

// Taken from https://github.com/ethereumjs/ethereumjs-wallet
Accounts.prototype.decrypt = function(v3Keystore, password, nonStrict) {
    /* jshint maxcomplexity: 10 */

    if (!_.isString(password)) {
        throw new Error('No password given.');
    }

    var json = (_.isObject(v3Keystore)) ? v3Keystore : JSON.parse(nonStrict ? v3Keystore.toLowerCase() : v3Keystore);

    if (json.version !== 3) {
        throw new Error('Not a valid V3 wallet');
    }

    var derivedKey;
    var kdfparams;
    if (json.crypto.kdf === 'scrypt') {
        kdfparams = json.crypto.kdfparams;

        // FIXME: support progress reporting callback
        derivedKey = scrypt.syncScrypt(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen);
    } else if (json.crypto.kdf === 'pbkdf2') {
        kdfparams = json.crypto.kdfparams;

        if (kdfparams.prf !== 'hmac-sha256') {
            throw new Error('Unsupported parameters to PBKDF2');
        }

        derivedKey = cryp.pbkdf2Sync(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256');
    } else {
        throw new Error('Unsupported key derivation scheme');
    }

    var ciphertext = Buffer.from(json.crypto.ciphertext, 'hex');

    var mac = utils.sha3(Buffer.from([...derivedKey.slice(16, 32), ...ciphertext])).replace('0x', '');
    if (mac !== json.crypto.mac) {
        throw new Error('Key derivation failed - possibly wrong password');
    }

    var decipher = cryp.createDecipheriv(json.crypto.cipher, derivedKey.slice(0, 16), Buffer.from(json.crypto.cipherparams.iv, 'hex'));
    var seed = '0x' + Buffer.from([...decipher.update(ciphertext), ...decipher.final()]).toString('hex');

    return this.privateKeyToAccount(seed, true);
};

Accounts.prototype.encrypt = function(privateKey, password, options) {
    /* jshint maxcomplexity: 20 */
    var account = this.privateKeyToAccount(privateKey, true);

    options = options || {};
    var salt = options.salt || cryp.randomBytes(32);
    var iv = options.iv || cryp.randomBytes(16);

    var derivedKey;
    var kdf = options.kdf || 'scrypt';
    var kdfparams = {
        dklen: options.dklen || 32,
        salt: salt.toString('hex')
    };

    if (kdf === 'pbkdf2') {
        kdfparams.c = options.c || 262144;
        kdfparams.prf = 'hmac-sha256';
        derivedKey = cryp.pbkdf2Sync(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256');
    } else if (kdf === 'scrypt') {
        // FIXME: support progress reporting callback
        kdfparams.n = options.n || 8192; // 2048 4096 8192 16384
        kdfparams.r = options.r || 8;
        kdfparams.p = options.p || 1;
        derivedKey = scrypt.syncScrypt(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.n, kdfparams.r, kdfparams.p, kdfparams.dklen);
    } else {
        throw new Error('Unsupported kdf');
    }

    var cipher = cryp.createCipheriv(options.cipher || 'aes-128-ctr', derivedKey.slice(0, 16), iv);
    if (!cipher) {
        throw new Error('Unsupported cipher');
    }


    var ciphertext = Buffer.from([
        ...cipher.update(Buffer.from(account.privateKey.replace('0x', ''), 'hex')),
        ...cipher.final()]
    );

    var mac = utils.sha3(Buffer.from([...derivedKey.slice(16, 32), ...ciphertext])).replace('0x', '');

    return {
        version: 3,
        id: uuid.v4({random: options.uuid || cryp.randomBytes(16)}),
        address: account.address.toLowerCase().replace('0x', ''),
        crypto: {
            ciphertext: ciphertext.toString('hex'),
            cipherparams: {
                iv: iv.toString('hex')
            },
            cipher: options.cipher || 'aes-128-ctr',
            kdf: kdf,
            kdfparams: kdfparams,
            mac: mac.toString('hex')
        }
    };
};


// Note: this is trying to follow closely the specs on
// http://web3js.readthedocs.io/en/1.0/web3-eth-accounts.html

function Wallet(accounts) {
    this._accounts = accounts;
    this.length = 0;
    this.defaultKeyName = 'web3js_wallet';
}

Wallet.prototype._findSafeIndex = function(pointer) {
    pointer = pointer || 0;
    if (_.has(this, pointer)) {
        return this._findSafeIndex(pointer + 1);
    } else {
        return pointer;
    }
};

Wallet.prototype._currentIndexes = function() {
    var keys = Object.keys(this);
    var indexes = keys
        .map(function(key) {
            return parseInt(key);
        })
        .filter(function(n) {
            return (n < 9e20);
        });

    return indexes;
};

Wallet.prototype.create = function(numberOfAccounts, entropy) {
    for (var i = 0; i < numberOfAccounts; ++i) {
        this.add(this._accounts.create(entropy).privateKey);
    }
    return this;
};

Wallet.prototype.add = function(account) {

    if (_.isString(account)) {
        account = this._accounts.privateKeyToAccount(account);
    }
    if (!this[account.address]) {
        account = this._accounts.privateKeyToAccount(account.privateKey);
        account.index = this._findSafeIndex();

        this[account.index] = account;
        this[account.address] = account;
        this[account.address.toLowerCase()] = account;

        this.length++;

        return account;
    } else {
        return this[account.address];
    }
};

Wallet.prototype.remove = function(addressOrIndex) {
    var account = this[addressOrIndex];

    if (account && account.address) {
        // address
        this[account.address].privateKey = null;
        delete this[account.address];
        // address lowercase
        this[account.address.toLowerCase()].privateKey = null;
        delete this[account.address.toLowerCase()];
        // index
        this[account.index].privateKey = null;
        delete this[account.index];

        this.length--;

        return true;
    } else {
        return false;
    }
};

Wallet.prototype.clear = function() {
    var _this = this;
    var indexes = this._currentIndexes();

    indexes.forEach(function(index) {
        _this.remove(index);
    });

    return this;
};

Wallet.prototype.encrypt = function(password, options) {
    var _this = this;
    var indexes = this._currentIndexes();

    var accounts = indexes.map(function(index) {
        return _this[index].encrypt(password, options);
    });

    return accounts;
};


Wallet.prototype.decrypt = function(encryptedWallet, password) {
    var _this = this;

    encryptedWallet.forEach(function(keystore) {
        var account = _this._accounts.decrypt(keystore, password);

        if (account) {
            _this.add(account);
        } else {
            throw new Error('Couldn\'t decrypt accounts. Password wrong?');
        }
    });

    return this;
};

Wallet.prototype.save = function(password, keyName) {
    localStorage.setItem(keyName || this.defaultKeyName, JSON.stringify(this.encrypt(password)));

    return true;
};

Wallet.prototype.load = function(password, keyName) {
    var keystore = localStorage.getItem(keyName || this.defaultKeyName);

    if (keystore) {
        try {
            keystore = JSON.parse(keystore);
        } catch (e) {

        }
    }

    return this.decrypt(keystore || [], password);
};

if (!storageAvailable('localStorage')) {
    delete Wallet.prototype.save;
    delete Wallet.prototype.load;
}

/**
 * Checks whether a storage type is available or not
 * For more info on how this works, please refer to MDN documentation
 * https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#Feature-detecting_localStorage
 *
 * @method storageAvailable
 * @param {String} type the type of storage ('localStorage', 'sessionStorage')
 * @returns {Boolean} a boolean indicating whether the specified storage is available or not
 */
function storageAvailable(type) {
    var storage;
    try {
        storage = window[type];
        var x = '__storage_test__';
        storage.setItem(x, x);
        storage.removeItem(x);
        return true;
    } catch (e) {
        return e && (
                // everything except Firefox
            e.code === 22 ||
            // Firefox
            e.code === 1014 ||
            // test name field too, because code might not be present
            // everything except Firefox
            e.name === 'QuotaExceededError' ||
            // Firefox
            e.name === 'NS_ERROR_DOM_QUOTA_REACHED') &&
            // acknowledge QuotaExceededError only if there's something already stored
            (storage && storage.length !== 0);
    }
}


module.exports = Accounts;


/***/ }),

/***/ 81677:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file contract.js
 *
 * To initialize a contract use:
 *
 *  var Contract = require('web3-eth-contract');
 *  Contract.setProvider('ws://localhost:8546');
 *  var contract = new Contract(abi, address, ...);
 *
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */





var _ = __webpack_require__(513469);
var core = __webpack_require__(751931);
var Method = __webpack_require__(827123);
var utils = __webpack_require__(328700);
var Subscription = __webpack_require__(839351).subscription;
var formatters = __webpack_require__(524763).formatters;
var errors = __webpack_require__(524763).errors;
var promiEvent = __webpack_require__(346327);
var abi = __webpack_require__(264560);


/**
 * Should be called to create new contract instance
 *
 * @method Contract
 * @constructor
 * @param {Array} jsonInterface
 * @param {String} address
 * @param {Object} options
 */
var Contract = function Contract(jsonInterface, address, options) {
    var _this = this,
        args = Array.prototype.slice.call(arguments);

    if(!(this instanceof Contract)) {
        throw new Error('Please use the "new" keyword to instantiate a web3.eth.Contract() object!');
    }

    this.setProvider = function () {
        core.packageInit(_this, arguments);

        _this.clearSubscriptions = _this._requestManager.clearSubscriptions;
    };

    // sets _requestmanager
    core.packageInit(this, [this.constructor]);

    this.clearSubscriptions = this._requestManager.clearSubscriptions;

    if(!jsonInterface || !(Array.isArray(jsonInterface))) {
        throw errors.ContractMissingABIError();
    }

    // create the options object
    this.options = {};

    var lastArg = args[args.length - 1];
    if(_.isObject(lastArg) && !_.isArray(lastArg)) {
        options = lastArg;

        this.options = _.extend(this.options, this._getOrSetDefaultOptions(options));
        if(_.isObject(address)) {
            address = null;
        }
    }

    // set address
    Object.defineProperty(this.options, 'address', {
        set: function(value){
            if(value) {
                _this._address = utils.toChecksumAddress(formatters.inputAddressFormatter(value));
            }
        },
        get: function(){
            return _this._address;
        },
        enumerable: true
    });

    // add method and event signatures, when the jsonInterface gets set
    Object.defineProperty(this.options, 'jsonInterface', {
        set: function(value){
            _this.methods = {};
            _this.events = {};

            _this._jsonInterface = value.map(function(method) {
                var func,
                    funcName;

                // make constant and payable backwards compatible
                method.constant = (method.stateMutability === "view" || method.stateMutability === "pure" || method.constant);
                method.payable = (method.stateMutability === "payable" || method.payable);


                if (method.name) {
                    funcName = utils._jsonInterfaceMethodToString(method);
                }


                // function
                if (method.type === 'function') {
                    method.signature = abi.encodeFunctionSignature(funcName);
                    func = _this._createTxObject.bind({
                        method: method,
                        parent: _this
                    });


                    // add method only if not one already exists
                    if(!_this.methods[method.name]) {
                        _this.methods[method.name] = func;
                    } else {
                        var cascadeFunc = _this._createTxObject.bind({
                            method: method,
                            parent: _this,
                            nextMethod: _this.methods[method.name]
                        });
                        _this.methods[method.name] = cascadeFunc;
                    }

                    // definitely add the method based on its signature
                    _this.methods[method.signature] = func;

                    // add method by name
                    _this.methods[funcName] = func;


                // event
                } else if (method.type === 'event') {
                    method.signature = abi.encodeEventSignature(funcName);
                    var event = _this._on.bind(_this, method.signature);

                    // add method only if not already exists
                    if(!_this.events[method.name] || _this.events[method.name].name === 'bound ')
                        _this.events[method.name] = event;

                    // definitely add the method based on its signature
                    _this.events[method.signature] = event;

                    // add event by name
                    _this.events[funcName] = event;
                }


                return method;
            });

            // add allEvents
            _this.events.allEvents = _this._on.bind(_this, 'allevents');

            return _this._jsonInterface;
        },
        get: function(){
            return _this._jsonInterface;
        },
        enumerable: true
    });

    // get default account from the Class
    var defaultAccount = this.constructor.defaultAccount;
    var defaultBlock = this.constructor.defaultBlock || 'latest';

    Object.defineProperty(this, 'handleRevert', {
        get: function () {
            if (_this.options.handleRevert === false || _this.options.handleRevert === true) {
                return _this.options.handleRevert;
            }

            return this.constructor.handleRevert;
        },
        set: function (val) {
            _this.options.handleRevert = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultCommon', {
        get: function () {
            return _this.options.common || this.constructor.defaultCommon;
        },
        set: function (val) {
            _this.options.common = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultHardfork', {
        get: function () {
            return _this.options.hardfork || this.constructor.defaultHardfork;
        },
        set: function (val) {
            _this.options.hardfork = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultChain', {
        get: function () {
            return _this.options.chain || this.constructor.defaultChain;
        },
        set: function (val) {
            _this.options.chain = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionPollingTimeout', {
        get: function () {
            if (_this.options.transactionPollingTimeout === 0) {
                return _this.options.transactionPollingTimeout;
            }

            return _this.options.transactionPollingTimeout || this.constructor.transactionPollingTimeout;
        },
        set: function (val) {
            _this.options.transactionPollingTimeout = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionConfirmationBlocks', {
        get: function () {
            if (_this.options.transactionConfirmationBlocks === 0) {
                return _this.options.transactionConfirmationBlocks;
            }

            return _this.options.transactionConfirmationBlocks || this.constructor.transactionConfirmationBlocks;
        },
        set: function (val) {
            _this.options.transactionConfirmationBlocks = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionBlockTimeout', {
        get: function () {
            if (_this.options.transactionBlockTimeout === 0) {
                return _this.options.transactionBlockTimeout;
            }

            return _this.options.transactionBlockTimeout || this.constructor.transactionBlockTimeout;
        },
        set: function (val) {
            _this.options.transactionBlockTimeout = val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultAccount', {
        get: function () {
            return defaultAccount;
        },
        set: function (val) {
            if(val) {
                defaultAccount = utils.toChecksumAddress(formatters.inputAddressFormatter(val));
            }

            return val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultBlock', {
        get: function () {
            return defaultBlock;
        },
        set: function (val) {
            defaultBlock = val;

            return val;
        },
        enumerable: true
    });

    // properties
    this.methods = {};
    this.events = {};

    this._address = null;
    this._jsonInterface = [];

    // set getter/setter properties
    this.options.address = address;
    this.options.jsonInterface = jsonInterface;

};

/**
 * Sets the new provider, creates a new requestManager, registers the "data" listener on the provider and sets the
 * accounts module for the Contract class.
 *
 * @method setProvider
 *
 * @param {string|provider} provider
 * @param {Accounts} accounts
 *
 * @returns void
 */
Contract.setProvider = function(provider, accounts) {
    // Contract.currentProvider = provider;
    core.packageInit(this, [provider]);

    this._ethAccounts = accounts;
};


/**
 * Get the callback and modify the array if necessary
 *
 * @method _getCallback
 * @param {Array} args
 * @return {Function} the callback
 */
Contract.prototype._getCallback = function getCallback(args) {
    if (args && _.isFunction(args[args.length - 1])) {
        return args.pop(); // modify the args array!
    }
};

/**
 * Checks that no listener with name "newListener" or "removeListener" is added.
 *
 * @method _checkListener
 * @param {String} type
 * @param {String} event
 * @return {Object} the contract instance
 */
Contract.prototype._checkListener = function(type, event){
    if(event === type) {
        throw errors.ContractReservedEventError(type);
    }
};


/**
 * Use default values, if options are not available
 *
 * @method _getOrSetDefaultOptions
 * @param {Object} options the options gived by the user
 * @return {Object} the options with gaps filled by defaults
 */
Contract.prototype._getOrSetDefaultOptions = function getOrSetDefaultOptions(options) {
    var gasPrice = options.gasPrice ? String(options.gasPrice): null;
    var from = options.from ? utils.toChecksumAddress(formatters.inputAddressFormatter(options.from)) : null;

    options.data = options.data || this.options.data;

    options.from = from || this.options.from;
    options.gasPrice = gasPrice || this.options.gasPrice;
    options.gas = options.gas || options.gasLimit || this.options.gas;

    // TODO replace with only gasLimit?
    delete options.gasLimit;

    return options;
};


/**
 * Should be used to encode indexed params and options to one final object
 *
 * @method _encodeEventABI
 * @param {Object} event
 * @param {Object} options
 * @return {Object} everything combined together and encoded
 */
Contract.prototype._encodeEventABI = function (event, options) {
    options = options || {};
    var filter = options.filter || {},
        result = {};

    ['fromBlock', 'toBlock'].filter(function (f) {
        return options[f] !== undefined;
    }).forEach(function (f) {
        result[f] = formatters.inputBlockNumberFormatter(options[f]);
    });

    // use given topics
    if(_.isArray(options.topics)) {
        result.topics = options.topics;

    // create topics based on filter
    } else {

        result.topics = [];

        // add event signature
        if (event && !event.anonymous && event.name !== 'ALLEVENTS') {
            result.topics.push(event.signature);
        }

        // add event topics (indexed arguments)
        if (event.name !== 'ALLEVENTS') {
            var indexedTopics = event.inputs.filter(function (i) {
                return i.indexed === true;
            }).map(function (i) {
                var value = filter[i.name];
                if (!value) {
                    return null;
                }

                // TODO: https://github.com/ethereum/web3.js/issues/344
                // TODO: deal properly with components

                if (_.isArray(value)) {
                    return value.map(function (v) {
                        return abi.encodeParameter(i.type, v);
                    });
                }
                return abi.encodeParameter(i.type, value);
            });

            result.topics = result.topics.concat(indexedTopics);
        }

        if(!result.topics.length)
            delete result.topics;
    }

    if(this.options.address) {
        result.address = this.options.address.toLowerCase();
    }

    return result;
};

/**
 * Should be used to decode indexed params and options
 *
 * @method _decodeEventABI
 * @param {Object} data
 * @return {Object} result object with decoded indexed && not indexed params
 */
Contract.prototype._decodeEventABI = function (data) {
    var event = this;

    data.data = data.data || '';
    data.topics = data.topics || [];
    var result = formatters.outputLogFormatter(data);

    // if allEvents get the right event
    if(event.name === 'ALLEVENTS') {
        event = event.jsonInterface.find(function (intf) {
            return (intf.signature === data.topics[0]);
        }) || {anonymous: true};
    }

    // create empty inputs if none are present (e.g. anonymous events on allEvents)
    event.inputs = event.inputs || [];

    // Handle case where an event signature shadows the current ABI with non-identical
    // arg indexing. If # of topics doesn't match, event is anon.
    if (!event.anonymous){
        let indexedInputs = 0;
        event.inputs.forEach(input => input.indexed ? indexedInputs++ : null);

        if (indexedInputs > 0 && (data.topics.length !== indexedInputs + 1)){
            event = {
                anonymous: true,
                inputs: []
            };
        }
    }

    var argTopics = event.anonymous ? data.topics : data.topics.slice(1);

    result.returnValues = abi.decodeLog(event.inputs, data.data, argTopics);
    delete result.returnValues.__length__;

    // add name
    result.event = event.name;

    // add signature
    result.signature = (event.anonymous || !data.topics[0]) ? null : data.topics[0];

    // move the data and topics to "raw"
    result.raw = {
        data: result.data,
        topics: result.topics
    };
    delete result.data;
    delete result.topics;


    return result;
};

/**
 * Encodes an ABI for a method, including signature or the method.
 * Or when constructor encodes only the constructor parameters.
 *
 * @method _encodeMethodABI
 * @param {Mixed} args the arguments to encode
 * @param {String} the encoded ABI
 */
Contract.prototype._encodeMethodABI = function _encodeMethodABI() {
    var methodSignature = this._method.signature,
        args = this.arguments || [];

    var signature = false,
        paramsABI = this._parent.options.jsonInterface.filter(function (json) {
            return ((methodSignature === 'constructor' && json.type === methodSignature) ||
                ((json.signature === methodSignature || json.signature === methodSignature.replace('0x','') || json.name === methodSignature) && json.type === 'function'));
        }).map(function (json) {
            var inputLength = (_.isArray(json.inputs)) ? json.inputs.length : 0;

            if (inputLength !== args.length) {
                throw new Error('The number of arguments is not matching the methods required number. You need to pass '+ inputLength +' arguments.');
            }

            if (json.type === 'function') {
                signature = json.signature;
            }
            return _.isArray(json.inputs) ? json.inputs : [];
        }).map(function (inputs) {
            return abi.encodeParameters(inputs, args).replace('0x','');
        })[0] || '';

    // return constructor
    if(methodSignature === 'constructor') {
        if(!this._deployData)
            throw new Error('The contract has no contract data option set. This is necessary to append the constructor parameters.');

        if(!this._deployData.startsWith('0x')) {
            this._deployData = '0x' + this._deployData;
        }

        return this._deployData + paramsABI;

    }

    // return method
    var returnValue = (signature) ? signature + paramsABI : paramsABI;

    if(!returnValue) {
        throw new Error('Couldn\'t find a matching contract method named "'+ this._method.name +'".');
    }

    return returnValue;
};


/**
 * Decode method return values
 *
 * @method _decodeMethodReturn
 * @param {Array} outputs
 * @param {String} returnValues
 * @return {Object} decoded output return values
 */
Contract.prototype._decodeMethodReturn = function (outputs, returnValues) {
    if (!returnValues) {
        return null;
    }

    returnValues = returnValues.length >= 2 ? returnValues.slice(2) : returnValues;
    var result = abi.decodeParameters(outputs, returnValues);

    if (result.__length__ === 1) {
        return result[0];
    }

    delete result.__length__;
    return result;
};


/**
 * Deploys a contract and fire events based on its state: transactionHash, receipt
 *
 * All event listeners will be removed, once the last possible event is fired ("error", or "receipt")
 *
 * @method deploy
 * @param {Object} options
 * @param {Function} callback
 * @return {Object} EventEmitter possible events are "error", "transactionHash" and "receipt"
 */
Contract.prototype.deploy = function(options, callback){

    options = options || {};

    options.arguments = options.arguments || [];
    options = this._getOrSetDefaultOptions(options);


    // throw error, if no "data" is specified
    if(!options.data) {
        if (typeof callback === 'function'){
            return callback(errors.ContractMissingDeployDataError());
        }
        throw errors.ContractMissingDeployDataError();
    }

    var constructor = _.find(this.options.jsonInterface, function (method) {
        return (method.type === 'constructor');
    }) || {};
    constructor.signature = 'constructor';

    return this._createTxObject.apply({
        method: constructor,
        parent: this,
        deployData: options.data,
        _ethAccounts: this.constructor._ethAccounts
    }, options.arguments);

};

/**
 * Gets the event signature and outputFormatters
 *
 * @method _generateEventOptions
 * @param {Object} event
 * @param {Object} options
 * @param {Function} callback
 * @return {Object} the event options object
 */
Contract.prototype._generateEventOptions = function() {
    var args = Array.prototype.slice.call(arguments);

    // get the callback
    var callback = this._getCallback(args);

    // get the options
    var options = (_.isObject(args[args.length - 1])) ? args.pop() : {};

    var eventName = (_.isString(args[0])) ? args[0] : 'allevents';
    var event = (eventName.toLowerCase() === 'allevents') ? {
            name: 'ALLEVENTS',
            jsonInterface: this.options.jsonInterface
        } : this.options.jsonInterface.find(function (json) {
            return (json.type === 'event' && (json.name === eventName || json.signature === '0x'+ eventName.replace('0x','')));
        });

    if (!event) {
        throw errors.ContractEventDoesNotExistError(eventName);
    }

    if (!utils.isAddress(this.options.address)) {
        throw errors.ContractNoAddressDefinedError();
    }

    return {
        params: this._encodeEventABI(event, options),
        event: event,
        callback: callback
    };
};

/**
 * Adds event listeners and creates a subscription, and remove it once its fired.
 *
 * @method clone
 * @return {Object} the event subscription
 */
Contract.prototype.clone = function() {
    return new this.constructor(this.options.jsonInterface, this.options.address, this.options);
};


/**
 * Adds event listeners and creates a subscription, and remove it once its fired.
 *
 * @method once
 * @param {String} event
 * @param {Object} options
 * @param {Function} callback
 * @return {Object} the event subscription
 */
Contract.prototype.once = function(event, options, callback) {
    var args = Array.prototype.slice.call(arguments);

    // get the callback
    callback = this._getCallback(args);

    if (!callback) {
        throw errors.ContractOnceRequiresCallbackError();
    }

    // don't allow fromBlock
    if (options)
        delete options.fromBlock;

    // don't return as once shouldn't provide "on"
    this._on(event, options, function (err, res, sub) {
        sub.unsubscribe();
        if(_.isFunction(callback)){
            callback(err, res, sub);
        }
    });

    return undefined;
};

/**
 * Adds event listeners and creates a subscription.
 *
 * @method _on
 *
 * @param {String} event
 * @param {Object} options
 * @param {Function} callback
 *
 * @return {Object} the event subscription
 */
Contract.prototype._on = function(){
    var subOptions = this._generateEventOptions.apply(this, arguments);

    if (subOptions.params && subOptions.params.toBlock) {
        delete subOptions.params.toBlock;
        console.warn('Invalid option: toBlock. Use getPastEvents for specific range.');
    }

    // prevent the event "newListener" and "removeListener" from being overwritten
    this._checkListener('newListener', subOptions.event.name);
    this._checkListener('removeListener', subOptions.event.name);

    // TODO check if listener already exists? and reuse subscription if options are the same.

    // create new subscription
    var subscription = new Subscription({
        subscription: {
            params: 1,
            inputFormatter: [formatters.inputLogFormatter],
            outputFormatter: this._decodeEventABI.bind(subOptions.event),
            // DUBLICATE, also in web3-eth
            subscriptionHandler: function (output) {
                if(output.removed) {
                    this.emit('changed', output);
                } else {
                    this.emit('data', output);
                }

                if (_.isFunction(this.callback)) {
                    this.callback(null, output, this);
                }
            }
        },
        type: 'eth',
        requestManager: this._requestManager
    });

    subscription.subscribe('logs', subOptions.params, subOptions.callback || function () {});

    return subscription;
};

/**
 * Get past events from contracts
 *
 * @method getPastEvents
 * @param {String} event
 * @param {Object} options
 * @param {Function} callback
 * @return {Object} the promievent
 */
Contract.prototype.getPastEvents = function(){
    var subOptions = this._generateEventOptions.apply(this, arguments);

    var getPastLogs = new Method({
        name: 'getPastLogs',
        call: 'eth_getLogs',
        params: 1,
        inputFormatter: [formatters.inputLogFormatter],
        outputFormatter: this._decodeEventABI.bind(subOptions.event)
    });
    getPastLogs.setRequestManager(this._requestManager);
    var call = getPastLogs.buildCall();

    getPastLogs = null;

    return call(subOptions.params, subOptions.callback);
};


/**
 * returns the an object with call, send, estimate functions
 *
 * @method _createTxObject
 * @returns {Object} an object with functions to call the methods
 */
Contract.prototype._createTxObject =  function _createTxObject(){
    var args = Array.prototype.slice.call(arguments);
    var txObject = {};

    if(this.method.type === 'function') {

        txObject.call = this.parent._executeMethod.bind(txObject, 'call');
        txObject.call.request = this.parent._executeMethod.bind(txObject, 'call', true); // to make batch requests

    }

    txObject.send = this.parent._executeMethod.bind(txObject, 'send');
    txObject.send.request = this.parent._executeMethod.bind(txObject, 'send', true); // to make batch requests
    txObject.encodeABI = this.parent._encodeMethodABI.bind(txObject);
    txObject.estimateGas = this.parent._executeMethod.bind(txObject, 'estimate');

    if (args && this.method.inputs && args.length !== this.method.inputs.length) {
        if (this.nextMethod) {
            return this.nextMethod.apply(null, args);
        }
        throw errors.InvalidNumberOfParams(args.length, this.method.inputs.length, this.method.name);
    }

    txObject.arguments = args || [];
    txObject._method = this.method;
    txObject._parent = this.parent;
    txObject._ethAccounts = this.parent.constructor._ethAccounts || this._ethAccounts;

    if(this.deployData) {
        txObject._deployData = this.deployData;
    }

    return txObject;
};


/**
 * Generates the options for the execute call
 *
 * @method _processExecuteArguments
 * @param {Array} args
 * @param {Promise} defer
 */
Contract.prototype._processExecuteArguments = function _processExecuteArguments(args, defer) {
    var processedArgs = {};

    processedArgs.type = args.shift();

    // get the callback
    processedArgs.callback = this._parent._getCallback(args);

    // get block number to use for call
    if(processedArgs.type === 'call' && args[args.length - 1] !== true && (_.isString(args[args.length - 1]) || isFinite(args[args.length - 1])))
        processedArgs.defaultBlock = args.pop();

    // get the options
    processedArgs.options = (_.isObject(args[args.length - 1])) ? args.pop() : {};

    // get the generateRequest argument for batch requests
    processedArgs.generateRequest = (args[args.length - 1] === true)? args.pop() : false;

    processedArgs.options = this._parent._getOrSetDefaultOptions(processedArgs.options);
    processedArgs.options.data = this.encodeABI();

    // add contract address
    if(!this._deployData && !utils.isAddress(this._parent.options.address))
        throw errors.ContractNoAddressDefinedError();

    if(!this._deployData)
        processedArgs.options.to = this._parent.options.address;

    // return error, if no "data" is specified
    if(!processedArgs.options.data)
        return utils._fireError(new Error('Couldn\'t find a matching contract method, or the number of parameters is wrong.'), defer.eventEmitter, defer.reject, processedArgs.callback);

    return processedArgs;
};

/**
 * Executes a call, transact or estimateGas on a contract function
 *
 * @method _executeMethod
 * @param {String} type the type this execute function should execute
 * @param {Boolean} makeRequest if true, it simply returns the request parameters, rather than executing it
 */
Contract.prototype._executeMethod = function _executeMethod(){
    var _this = this,
        args = this._parent._processExecuteArguments.call(this, Array.prototype.slice.call(arguments), defer),
        defer = promiEvent((args.type !== 'send')),
        ethAccounts = _this.constructor._ethAccounts || _this._ethAccounts;

    // simple return request for batch requests
    if(args.generateRequest) {

        var payload = {
            params: [formatters.inputCallFormatter.call(this._parent, args.options)],
            callback: args.callback
        };

        if(args.type === 'call') {
            payload.params.push(formatters.inputDefaultBlockNumberFormatter.call(this._parent, args.defaultBlock));
            payload.method = 'eth_call';
            payload.format = this._parent._decodeMethodReturn.bind(null, this._method.outputs);
        } else {
            payload.method = 'eth_sendTransaction';
        }

        return payload;

    }

    switch (args.type) {
        case 'estimate':

            var estimateGas = (new Method({
                name: 'estimateGas',
                call: 'eth_estimateGas',
                params: 1,
                inputFormatter: [formatters.inputCallFormatter],
                outputFormatter: utils.hexToNumber,
                requestManager: _this._parent._requestManager,
                accounts: ethAccounts, // is eth.accounts (necessary for wallet signing)
                defaultAccount: _this._parent.defaultAccount,
                defaultBlock: _this._parent.defaultBlock
            })).createFunction();

            return estimateGas(args.options, args.callback);

        case 'call':

            // TODO check errors: missing "from" should give error on deploy and send, call ?

            var call = (new Method({
                name: 'call',
                call: 'eth_call',
                params: 2,
                inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter],
                // add output formatter for decoding
                outputFormatter: function (result) {
                    return _this._parent._decodeMethodReturn(_this._method.outputs, result);
                },
                requestManager: _this._parent._requestManager,
                accounts: ethAccounts, // is eth.accounts (necessary for wallet signing)
                defaultAccount: _this._parent.defaultAccount,
                defaultBlock: _this._parent.defaultBlock,
                handleRevert: _this._parent.handleRevert,
                abiCoder: abi
            })).createFunction();

            return call(args.options, args.defaultBlock, args.callback);

        case 'send':

            // return error, if no "from" is specified
            if(!utils.isAddress(args.options.from)) {
                return utils._fireError(errors.ContractNoFromAddressDefinedError(), defer.eventEmitter, defer.reject, args.callback);
            }

            if (_.isBoolean(this._method.payable) && !this._method.payable && args.options.value && args.options.value > 0) {
                return utils._fireError(new Error('Can not send value to non-payable contract method or constructor'), defer.eventEmitter, defer.reject, args.callback);
            }


            // make sure receipt logs are decoded
            var extraFormatters = {
                receiptFormatter: function (receipt) {
                    if (_.isArray(receipt.logs)) {

                        // decode logs
                        var events = _.map(receipt.logs, function(log) {
                            return _this._parent._decodeEventABI.call({
                                name: 'ALLEVENTS',
                                jsonInterface: _this._parent.options.jsonInterface
                            }, log);
                        });

                        // make log names keys
                        receipt.events = {};
                        var count = 0;
                        events.forEach(function (ev) {
                            if (ev.event) {
                                // if > 1 of the same event, don't overwrite any existing events
                                if (receipt.events[ev.event]) {
                                    if (Array.isArray(receipt.events[ ev.event ])) {
                                        receipt.events[ ev.event ].push(ev);
                                    } else {
                                        receipt.events[ev.event] = [receipt.events[ev.event], ev];
                                    }
                                } else {
                                    receipt.events[ ev.event ] = ev;
                                }
                            } else {
                                receipt.events[count] = ev;
                                count++;
                            }
                        });

                        delete receipt.logs;
                    }
                    return receipt;
                },
                contractDeployFormatter: function (receipt) {
                    var newContract = _this._parent.clone();
                    newContract.options.address = receipt.contractAddress;
                    return newContract;
                }
            };

            var sendTransaction = (new Method({
                name: 'sendTransaction',
                call: 'eth_sendTransaction',
                params: 1,
                inputFormatter: [formatters.inputTransactionFormatter],
                requestManager: _this._parent._requestManager,
                accounts: _this.constructor._ethAccounts || _this._ethAccounts, // is eth.accounts (necessary for wallet signing)
                defaultAccount: _this._parent.defaultAccount,
                defaultBlock: _this._parent.defaultBlock,
                transactionBlockTimeout: _this._parent.transactionBlockTimeout,
                transactionConfirmationBlocks: _this._parent.transactionConfirmationBlocks,
                transactionPollingTimeout: _this._parent.transactionPollingTimeout,
                defaultCommon: _this._parent.defaultCommon,
                defaultChain: _this._parent.defaultChain,
                defaultHardfork: _this._parent.defaultHardfork,
                handleRevert: _this._parent.handleRevert,
                extraFormatters: extraFormatters,
                abiCoder: abi
            })).createFunction();

            return sendTransaction(args.options, args.callback);

        default:
            throw new Error('Method "' + args.type + '" not implemented.');

    }


};

module.exports = Contract;


/***/ }),

/***/ 895909:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file ENS.js
 *
 * @author Samuel Furter <samuel@ethereum.org>
 * @date 2018
 */



var _ = __webpack_require__(513469);
var config = __webpack_require__(392106);
var formatters = __webpack_require__(524763).formatters;
var utils = __webpack_require__(328700);
var Registry = __webpack_require__(978860);
var ResolverMethodHandler = __webpack_require__(187596);
var contenthash = __webpack_require__(48074);

/**
 * Constructs a new instance of ENS
 *
 * @param {Eth} eth
 *
 * @constructor
 */
function ENS(eth) {
    this.eth = eth;
    var registryAddress = null;
    this._detectedAddress = null;
    this._lastSyncCheck = null;

    Object.defineProperty(this, 'registry', {
        get: function () {
            return new Registry(this);
        },
        enumerable: true
    });

    Object.defineProperty(this, 'resolverMethodHandler', {
        get: function () {
            return new ResolverMethodHandler(this.registry);
        },
        enumerable: true
    });

    Object.defineProperty(this, 'registryAddress', {
        get: function () {
            return registryAddress;
        },
        set: function (value) {
            if (value === null) {
                registryAddress = value;

                return;
            }

            registryAddress = formatters.inputAddressFormatter(value);
        },
        enumerable: true
    });
}

/**
 * Returns true if the given interfaceId is supported and otherwise false.
 *
 * @method supportsInterface
 *
 * @param {string} name
 * @param {string} interfaceId
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<boolean>}
 */
ENS.prototype.supportsInterface = function (name, interfaceId, callback) {
    return this.getResolver(name).then(function (resolver) {
        if (!utils.isHexStrict(interfaceId)) {
            interfaceId = utils.sha3(interfaceId).slice(0,10);
        }

        return resolver.methods.supportsInterface(interfaceId).call(callback);
    }).catch(function(error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        throw error;
    });
};

/**
 * Returns the Resolver by the given address
 *
 * @deprecated Please use the "getResolver" method instead of "resolver"
 *
 * @method resolver
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<Contract>}
 */
ENS.prototype.resolver = function (name, callback) {
    return this.registry.resolver(name, callback);
};

/**
 * Returns the Resolver by the given address
 *
 * @method getResolver
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<Contract>}
 */
ENS.prototype.getResolver = function (name, callback) {
    return this.registry.getResolver(name, callback);
};

/**
 * Does set the resolver of the given name
 *
 * @method setResolver
 *
 * @param {string} name
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setResolver = function (name, address, txConfig, callback) {
    return this.registry.setResolver(name, address, txConfig, callback);
};

/**
 * Sets the owner, resolver, and TTL for an ENS record in a single operation.
 *
 * @method setRecord
 *
 * @param {string} name
 * @param {string} owner
 * @param {string} resolver
 * @param {string | number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setRecord = function (name, owner, resolver, ttl, txConfig, callback) {
    return this.registry.setRecord(name, owner, resolver, ttl, txConfig, callback);
};

/**
 * Sets the owner, resolver and TTL for a subdomain, creating it if necessary.
 *
 * @method setSubnodeRecord
 *
 * @param {string} name
 * @param {string} label
 * @param {string} owner
 * @param {string} resolver
 * @param {string | number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setSubnodeRecord = function (name, label, owner, resolver, ttl, txConfig, callback) {
    return this.registry.setSubnodeRecord(name, label, owner, resolver, ttl, txConfig, callback);
};

/**
 * Sets or clears an approval by the given operator.
 *
 * @method setApprovalForAll
 *
 * @param {string} operator
 * @param {boolean} approved
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setApprovalForAll = function (operator, approved, txConfig, callback) {
    return this.registry.setApprovalForAll(operator, approved, txConfig, callback);
};

/**
 * Returns true if the operator is approved
 *
 * @method isApprovedForAll
 *
 * @param {string} owner
 * @param {string} operator
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<boolean>}
 */
ENS.prototype.isApprovedForAll = function (owner, operator, callback) {
    return this.registry.isApprovedForAll(owner, operator, callback);
};

/**
 * Returns true if the record exists
 *
 * @method recordExists
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<boolean>}
 */
ENS.prototype.recordExists = function (name, callback) {
    return this.registry.recordExists(name, callback);
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setSubnodeOwner
 *
 * @param {string} name
 * @param {string} label
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setSubnodeOwner = function (name, label, address, txConfig, callback) {
    return this.registry.setSubnodeOwner(name, label, address, txConfig, callback);
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method getTTL
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getTTL = function (name, callback) {
    return this.registry.getTTL(name, callback);
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setTTL
 *
 * @param {string} name
 * @param {number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setTTL = function (name, ttl, txConfig, callback) {
    return this.registry.setTTL(name, ttl, txConfig, callback);
};

/**
 * Returns the owner by the given name and current configured or detected Registry
 *
 * @method getOwner
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getOwner = function (name, callback) {
    return this.registry.getOwner(name, callback);
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setOwner
 *
 * @param {string} name
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setOwner = function (name, address, txConfig, callback) {
    return this.registry.setOwner(name, address, txConfig, callback);
};

/**
 * Returns the address record associated with a name.
 *
 * @method getAddress
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getAddress = function (name, callback) {
    return this.resolverMethodHandler.method(name, 'addr', []).call(callback);
};

/**
 * Sets a new address
 *
 * @method setAddress
 *
 * @param {string} name
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setAddress = function (name, address, txConfig, callback) {
    return this.resolverMethodHandler.method(name, 'setAddr', [address]).send(txConfig, callback);
};

/**
 * Returns the public key
 *
 * @method getPubkey
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getPubkey = function (name, callback) {
    return this.resolverMethodHandler.method(name, 'pubkey', [], null, callback).call(callback);
};

/**
 * Set the new public key
 *
 * @method setPubkey
 *
 * @param {string} name
 * @param {string} x
 * @param {string} y
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setPubkey = function (name, x, y, txConfig, callback) {
    return this.resolverMethodHandler.method(name, 'setPubkey', [x, y]).send(txConfig, callback);
};

/**
 * Returns the content
 *
 * @method getContent
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getContent = function (name, callback) {
    return this.resolverMethodHandler.method(name, 'content', []).call(callback);
};

/**
 * Set the content
 *
 * @method setContent
 *
 * @param {string} name
 * @param {string} hash
 * @param {function} callback
 * @param {TransactionConfig} txConfig
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setContent = function (name, hash, txConfig, callback) {
    return this.resolverMethodHandler.method(name, 'setContent', [hash]).send(txConfig, callback);
};

/**
 * Returns the contenthash
 *
 * @method getContenthash
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<ContentHash>}
 */
ENS.prototype.getContenthash = function (name, callback) {
    return this.resolverMethodHandler.method(name, 'contenthash', [], contenthash.decode).call(callback);
};

/**
 * Set the contenthash
 *
 * @method setContent
 *
 * @param {string} name
 * @param {string} hash
 * @param {function} callback
 * @param {TransactionConfig} txConfig
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setContenthash = function (name, hash, txConfig, callback) {
    var encoded;
    try {
        encoded = contenthash.encode(hash);
    } catch(err){
        var error = new Error('Could not encode ' + hash + '. See docs for supported hash protocols.');

        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        throw error;
    }
    return this.resolverMethodHandler.method(name, 'setContenthash', [encoded]).send(txConfig, callback);
};

/**
 * Get the multihash
 *
 * @method getMultihash
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.getMultihash = function (name, callback) {
    return this.resolverMethodHandler.method(name, 'multihash', []).call(callback);
};

/**
 * Set the multihash
 *
 * @method setMultihash
 *
 * @param {string} name
 * @param {string} hash
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
ENS.prototype.setMultihash = function (name, hash, txConfig, callback) {
    return this.resolverMethodHandler.method(name, 'multihash', [hash]).send(txConfig, callback);
};

/**
 * Checks if the current used network is synced and looks for ENS support there.
 * Throws an error if not.
 *
 * @returns {Promise<string>}
 */
ENS.prototype.checkNetwork = async function () {
    var now = new Date() / 1000;

    if (!this._lastSyncCheck || (now - this._lastSyncCheck) > 3600) {
        var block = await this.eth.getBlock('latest');
        var headAge = now - block.timestamp;

        if (headAge > 3600) {
            throw new Error("Network not synced; last block was " + headAge + " seconds ago");
        }

        this._lastSyncCheck = now;
    }

    if (this.registryAddress) {
        return this.registryAddress;
    }

    if (!this._detectedAddress) {
        var networkType = await this.eth.net.getNetworkType();
        var addr = config.addresses[networkType];

        if (typeof addr === 'undefined') {
            throw new Error("ENS is not supported on network " + networkType);
        }

        this._detectedAddress = addr;

        return this._detectedAddress;
    }

    return this._detectedAddress;
};

module.exports = ENS;


/***/ }),

/***/ 392106:
/***/ ((module) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file config.js
 *
 * @author Samuel Furter <samuel@ethereum.org>
 * @date 2017
 */



/**
 * Source: https://docs.ens.domains/ens-deployments
 *
 * @type {{addresses: {main: string, rinkeby: string, goerli: string, ropsten: string}}}
 */
var config = {
    addresses: {
        main: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
        ropsten: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
        rinkeby: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
        goerli: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
    },
    // These ids obtained at ensdomains docs:
    // https://docs.ens.domains/contract-developer-guide/writing-a-resolver
    interfaceIds: {
        addr: "0x3b3b57de",
        setAddr: "0x3b3b57de",
        pubkey: "0xc8690233",
        setPubkey: "0xc8690233",
        contenthash: "0xbc1c58d1",
        setContenthash: "0xbc1c58d1",
        content: "0xd8389dc5",
        setContent: "0xd8389dc5"
    }
};

module.exports = config;


/***/ }),

/***/ 978860:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file Registry.js
 *
 * @author Samuel Furter <samuel@ethereum.org>
 * @date 2018
 */



var _ = __webpack_require__(513469);
var Contract = __webpack_require__(81677);
var namehash = __webpack_require__(159873);
var PromiEvent = __webpack_require__(346327);
var formatters = __webpack_require__(524763).formatters;
var utils = __webpack_require__(328700);
var REGISTRY_ABI = __webpack_require__(624477);
var RESOLVER_ABI = __webpack_require__(936564);


/**
 * A wrapper around the ENS registry contract.
 *
 * @method Registry
 * @param {Ens} ens
 * @constructor
 */
function Registry(ens) {
    var self = this;
    this.ens = ens;
    this.contract = ens.checkNetwork().then(function (address) {
        var contract = new Contract(REGISTRY_ABI, address);
        contract.setProvider(self.ens.eth.currentProvider);

        return contract;
    });
}

/**
 * Returns the address of the owner of an ENS name.
 *
 * @deprecated Please use the "getOwner" method instead of "owner"
 *
 * @method owner
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<string>}
 */
Registry.prototype.owner = function (name, callback) {
    console.warn('Deprecated: Please use the "getOwner" method instead of "owner".');

    return this.getOwner(name, callback);
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method getOwner
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<string>}
 */
Registry.prototype.getOwner = function (name, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.owner(namehash.hash(name)).call();
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setOwner
 *
 * @param {string} name
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setOwner = function (name, address, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.setOwner(namehash.hash(name), formatters.inputAddressFormatter(address)).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns the TTL of the given node by his name
 *
 * @method getTTL
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returnss {Promise<string>}
 */
Registry.prototype.getTTL = function (name, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.ttl(namehash.hash(name)).call();
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setTTL
 *
 * @param {string} name
 * @param {number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setTTL = function (name, ttl, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.setTTL(namehash.hash(name), ttl).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setSubnodeOwner
 *
 * @param {string} name
 * @param {string} label
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setSubnodeOwner = function (name, label, address, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    if (!utils.isHexStrict(label)) {
        label = utils.sha3(label);
    }

    this.contract.then(function (contract) {
        return contract.methods.setSubnodeOwner(
            namehash.hash(name),
            label,
            formatters.inputAddressFormatter(address)
        ).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Sets the owner, resolver, and TTL for an ENS record in a single operation.
 *
 * @method setRecord
 *
 * @param {string} name
 * @param {string} owner
 * @param {string} resolver
 * @param {string | number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setRecord = function (name, owner, resolver, ttl, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.setRecord(
            namehash.hash(name),
            formatters.inputAddressFormatter(owner),
            formatters.inputAddressFormatter(resolver),
            ttl
        ).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Sets the owner, resolver and TTL for a subdomain, creating it if necessary.
 *
 * @method setSubnodeRecord
 *
 * @param {string} name
 * @param {string} label
 * @param {string} owner
 * @param {string} resolver
 * @param {string | number} ttl
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setSubnodeRecord = function (name, label, owner, resolver, ttl, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    if (!utils.isHexStrict(label)) {
        label = utils.sha3(label);
    }

    this.contract.then(function (contract) {
        return contract.methods.setSubnodeRecord(
            namehash.hash(name),
            label,
            formatters.inputAddressFormatter(owner),
            formatters.inputAddressFormatter(resolver),
            ttl
        ).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Sets or clears an approval by the given operator.
 *
 * @method setApprovalForAll
 *
 * @param {string} operator
 * @param {boolean} approved
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setApprovalForAll = function (operator, approved, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.setApprovalForAll(formatters.inputAddressFormatter(operator), approved).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns true if the operator is approved
 *
 * @method isApprovedForAll
 *
 * @param {string} owner
 * @param {string} operator
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<boolean>}
 */
Registry.prototype.isApprovedForAll = function (owner, operator, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.isApprovedForAll(
            formatters.inputAddressFormatter(owner),
            formatters.inputAddressFormatter(operator)
        ).call();
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns true if the record exists
 *
 * @method recordExists
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<boolean>}
 */
Registry.prototype.recordExists = function (name, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.recordExists(namehash.hash(name)).call();
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Returns the resolver contract associated with a name.
 *
 * @deprecated Please use the "getResolver" method instead of "resolver"
 *
 * @method resolver
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<Contract>}
 */
Registry.prototype.resolver = function (name, callback) {
    console.warn('Deprecated: Please use the "getResolver" method instead of "resolver".');

    return this.getResolver(name, callback);
};

/**
 * Returns the resolver contract associated with a name.
 *
 * @method getResolver
 *
 * @param {string} name
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {Promise<Contract>}
 */
Registry.prototype.getResolver = function (name, callback) {
    var self = this;

    return this.contract.then(function (contract) {
        return contract.methods.resolver(namehash.hash(name)).call();
    }).then(function (address) {
        var contract = new Contract(RESOLVER_ABI, address);
        contract.setProvider(self.ens.eth.currentProvider);

        if (_.isFunction(callback)) {
            // It's required to pass the contract to the first argument to be backward compatible and to have the required consistency
            callback(contract, contract);

            return;
        }

        return contract;
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        throw error;
    });
};

/**
 * Returns the address of the owner of an ENS name.
 *
 * @method setResolver
 *
 * @param {string} name
 * @param {string} address
 * @param {TransactionConfig} txConfig
 * @param {function} callback
 *
 * @callback callback callback(error, result)
 * @returns {PromiEvent<TransactionReceipt | TransactionRevertInstructionError>}
 */
Registry.prototype.setResolver = function (name, address, txConfig, callback) {
    var promiEvent = new PromiEvent(true);

    this.contract.then(function (contract) {
        return contract.methods.setResolver(namehash.hash(name), formatters.inputAddressFormatter(address)).send(txConfig);
    }).then(function (receipt) {
        if (_.isFunction(callback)) {
            // It's required to pass the receipt to the first argument to be backward compatible and to have the required consistency
            callback(receipt, receipt);

            return;
        }

        promiEvent.resolve(receipt);
    }).catch(function (error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

module.exports = Registry;


/***/ }),

/***/ 734960:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 *
 * @author Samuel Furter <samuel@ethereum.org>
 * @date 2018
 */



var ENS = __webpack_require__(895909);

module.exports = ENS;


/***/ }),

/***/ 187596:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.
    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file ResolverMethodHandler.js
 *
 * @author Samuel Furter <samuel@ethereum.org>
 * @date 2018
 */



var PromiEvent = __webpack_require__(346327);
var namehash = __webpack_require__(159873);
var errors = __webpack_require__(524763).errors;
var _ = __webpack_require__(513469);
var interfaceIds = __webpack_require__(392106).interfaceIds;

/**
 * @param {Registry} registry
 * @constructor
 */
function ResolverMethodHandler(registry) {
    this.registry = registry;
}

/**
 * Executes an resolver method and returns an eventifiedPromise
 *
 * @param {string} ensName
 * @param {string} methodName
 * @param {array} methodArguments
 * @param {function} callback
 * @returns {Object}
 */
ResolverMethodHandler.prototype.method = function (ensName, methodName, methodArguments, outputFormatter, callback) {
    return {
        call: this.call.bind({
            ensName: ensName,
            methodName: methodName,
            methodArguments: methodArguments,
            callback: callback,
            parent: this,
            outputFormatter: outputFormatter
        }),
        send: this.send.bind({
            ensName: ensName,
            methodName: methodName,
            methodArguments: methodArguments,
            callback: callback,
            parent: this
        })
    };
};

/**
 * Executes call
 *
 * @returns {eventifiedPromise}
 */
ResolverMethodHandler.prototype.call = function (callback) {
    var self = this;
    var promiEvent = new PromiEvent();
    var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments);
    var outputFormatter = this.outputFormatter || null;

    this.parent.registry.getResolver(this.ensName).then(async function (resolver) {
        await self.parent.checkInterfaceSupport(resolver, self.methodName);
        self.parent.handleCall(promiEvent, resolver.methods[self.methodName], preparedArguments, outputFormatter, callback);
    }).catch(function(error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};


/**
 * Executes send
 *
 * @param {Object} sendOptions
 * @param {function} callback
 * @returns {eventifiedPromise}
 */
ResolverMethodHandler.prototype.send = function (sendOptions, callback) {
    var self = this;
    var promiEvent = new PromiEvent();
    var preparedArguments = this.parent.prepareArguments(this.ensName, this.methodArguments);

    this.parent.registry.getResolver(this.ensName).then(async function (resolver) {
        await self.parent.checkInterfaceSupport(resolver, self.methodName);
        self.parent.handleSend(promiEvent, resolver.methods[self.methodName], preparedArguments, sendOptions, callback);
    }).catch(function(error) {
        if (_.isFunction(callback)) {
            callback(error, null);

            return;
        }

        promiEvent.reject(error);
    });

    return promiEvent.eventEmitter;
};

/**
 * Handles a call method
 *
 * @param {eventifiedPromise} promiEvent
 * @param {function} method
 * @param {array} preparedArguments
 * @param {function} callback
 * @returns {eventifiedPromise}
 */
ResolverMethodHandler.prototype.handleCall = function (promiEvent, method, preparedArguments, outputFormatter, callback) {
    method.apply(this, preparedArguments).call()
        .then(function (result) {
            if (outputFormatter){
                result = outputFormatter(result);
            }

            if (_.isFunction(callback)) {
                // It's required to pass the receipt to the second argument to be backwards compatible and to have the required consistency
                callback(result, result);

                return;
            }

            promiEvent.resolve(result);
        }).catch(function (error) {
            if (_.isFunction(callback)) {
                callback(error, null);

                return;
            }

            promiEvent.reject(error);
        });

    return promiEvent;
};

/**
 * Handles a send method
 *
 * @param {eventifiedPromise} promiEvent
 * @param {function} method
 * @param {array} preparedArguments
 * @param {Object} sendOptions
 * @param {function} callback
 * @returns {eventifiedPromise}
 */
ResolverMethodHandler.prototype.handleSend = function (promiEvent, method, preparedArguments, sendOptions, callback) {
    method.apply(this, preparedArguments).send(sendOptions)
        .on('sending', function () {
            promiEvent.eventEmitter.emit('sending');
        })
        .on('sent', function () {
            promiEvent.eventEmitter.emit('sent');
        })
        .on('transactionHash', function (hash) {
            promiEvent.eventEmitter.emit('transactionHash', hash);
        })
        .on('confirmation', function (confirmationNumber, receipt) {
            promiEvent.eventEmitter.emit('confirmation', confirmationNumber, receipt);
        })
        .on('receipt', function (receipt) {
            promiEvent.eventEmitter.emit('receipt', receipt);
            promiEvent.resolve(receipt);

            if (_.isFunction(callback)) {
                // It's required to pass the receipt to the second argument to be backwards compatible and to have the required consistency
                callback(receipt, receipt);
            }
        })
        .on('error', function (error) {
            promiEvent.eventEmitter.emit('error', error);

            if (_.isFunction(callback)) {
                callback(error, null);

                return;
            }

            promiEvent.reject(error);
        });

    return promiEvent;
};

/**
 * Adds the ENS node to the arguments
 *
 * @param {string} name
 * @param {array} methodArguments
 *
 * @returns {array}
 */
ResolverMethodHandler.prototype.prepareArguments = function (name, methodArguments) {
    var node = namehash.hash(name);

    if (methodArguments.length > 0) {
        methodArguments.unshift(node);

        return methodArguments;
    }

    return [node];
};

/**
 *
 *
 * @param {Contract} resolver
 * @param {string} methodName
 *
 * @returns {Promise}
 */
ResolverMethodHandler.prototype.checkInterfaceSupport = async function (resolver, methodName) {
    // Skip validation for undocumented interface ids (ex: multihash)
    if (!interfaceIds[methodName]) return;

    var supported = false;
    try {
        supported = await resolver
            .methods
            .supportsInterface(interfaceIds[methodName])
            .call();
    } catch(err) {
        console.warn('Could not verify interface of resolver contract at "' + resolver.options.address + '". ');
    }

    if (!supported){
        throw errors.ResolverMethodMissingError(resolver.options.address, methodName);
    }
};

module.exports = ResolverMethodHandler;


/***/ }),

/***/ 48074:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
Adapted from ensdomains/ui
https://github.com/ensdomains/ui/blob/3e62e440b53466eeec9dd1c63d73924eefbd88c1/src/utils/contents.js#L1-L85

BSD 2-Clause License

Copyright (c) 2019, Ethereum Name Service
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

var contentHash = __webpack_require__(378138);

function decode(encoded) {
  var decoded = null;
  var protocolType = null;
  var error = null;

  if (encoded && encoded.error) {
    return {
      protocolType: null,
      decoded: encoded.error
    };
  }
  if (encoded) {
    try {
      decoded = contentHash.decode(encoded);
      var codec = contentHash.getCodec(encoded);
      if (codec === 'ipfs-ns') {
        protocolType = 'ipfs';
      } else if (codec === 'swarm-ns') {
        protocolType = 'bzz';
      } else if (codec === 'onion') {
        protocolType = 'onion';
      } else if (codec === 'onion3') {
        protocolType = 'onion3';
      } else {
        decoded = encoded;
      }
    } catch (e) {
      error = e.message;
    }
  }
  return {
    protocolType: protocolType,
    decoded: decoded,
    error: error
  };
}

function encode(text) {
  var content, contentType;
  var encoded = false;
  if (!!text) {
    var matched = text.match(/^(ipfs|bzz|onion|onion3):\/\/(.*)/) || text.match(/\/(ipfs)\/(.*)/);
    if (matched) {
      contentType = matched[1];
      content = matched[2];
    }

    try {
      if (contentType === 'ipfs') {
        if(content.length >= 4) {
          encoded = '0x' + contentHash.fromIpfs(content);
        }
      } else if (contentType === 'bzz') {
        if(content.length >= 4) {
          encoded = '0x' + contentHash.fromSwarm(content);
        }
      } else if (contentType === 'onion') {
        if(content.length === 16) {
          encoded = '0x' + contentHash.encode('onion', content);
        }
      } else if (contentType === 'onion3') {
        if(content.length === 56) {
          encoded = '0x' + contentHash.encode('onion3', content);
        }
      } else {
        throw new Error('Could not encode content hash: unsupported content type');
      }
    } catch (err) {
      throw err;
    }
  }
  return encoded;
}

module.exports = {
  decode: decode,
  encode: encode
};


/***/ }),

/***/ 624477:
/***/ ((module) => {

"use strict";


var REGISTRY = [
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "resolver",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "owner",
        "outputs": [
            {
                "name": "",
                "type": "address"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "label",
                "type": "bytes32"
            },
            {
                "name": "owner",
                "type": "address"
            }
        ],
        "name": "setSubnodeOwner",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "ttl",
                "type": "uint64"
            }
        ],
        "name": "setTTL",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "ttl",
        "outputs": [
            {
                "name": "",
                "type": "uint64"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "resolver",
                "type": "address"
            }
        ],
        "name": "setResolver",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "owner",
                "type": "address"
            }
        ],
        "name": "setOwner",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "owner",
                "type": "address"
            }
        ],
        "name": "Transfer",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "name": "label",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "owner",
                "type": "address"
            }
        ],
        "name": "NewOwner",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "resolver",
                "type": "address"
            }
        ],
        "name": "NewResolver",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "ttl",
                "type": "uint64"
            }
        ],
        "name": "NewTTL",
        "type": "event"
    },
    {
        "constant": false,
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "node",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "resolver",
                "type": "address"
            },
            {
                "internalType": "uint64",
                "name": "ttl",
                "type": "uint64"
            }
        ],
        "name": "setRecord",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "internalType": "address",
                "name": "operator",
                "type": "address"
            },
            {
                "internalType": "bool",
                "name": "approved",
                "type": "bool"
            }
        ],
        "name": "setApprovalForAll",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "indexed": true,
                "internalType": "address",
                "name": "operator",
                "type": "address"
            },
            {
                "indexed": false,
                "internalType": "bool",
                "name": "approved",
                "type": "bool"
            }
        ],
        "name": "ApprovalForAll",
        "type": "event"
    },
    {
        "constant": true,
        "inputs": [
            {
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "operator",
                "type": "address"
            }
        ],
        "name": "isApprovedForAll",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool"
            }
        ],
        "payable": false,
        "stateMutability": "view",
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "recordExists",
        "outputs": [
            {
                "internalType": "bool",
                "name": "",
                "type": "bool"
            }
        ],
        "payable": false,
        "stateMutability": "view",
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "internalType": "bytes32",
                "name": "node",
                "type": "bytes32"
            },
            {
                "internalType": "bytes32",
                "name": "label",
                "type": "bytes32"
            },
            {
                "internalType": "address",
                "name": "owner",
                "type": "address"
            },
            {
                "internalType": "address",
                "name": "resolver",
                "type": "address"
            },
            {
                "internalType": "uint64",
                "name": "ttl",
                "type": "uint64"
            }
        ],
        "name": "setSubnodeRecord",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    }
];

module.exports = REGISTRY;


/***/ }),

/***/ 936564:
/***/ ((module) => {

"use strict";


var RESOLVER = [
    {
        "constant": true,
        "inputs": [
            {
                "name": "interfaceID",
                "type": "bytes4"
            }
        ],
        "name": "supportsInterface",
        "outputs": [
            {
                "name": "",
                "type": "bool"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "contentTypes",
                "type": "uint256"
            }
        ],
        "name": "ABI",
        "outputs": [
            {
                "name": "contentType",
                "type": "uint256"
            },
            {
                "name": "data",
                "type": "bytes"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "hash",
                "type": "bytes"
            }
        ],
        "name": "setMultihash",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "multihash",
        "outputs": [
            {
                "name": "",
                "type": "bytes"
            }
        ],
        "payable": false,
        "stateMutability": "view",
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "x",
                "type": "bytes32"
            },
            {
                "name": "y",
                "type": "bytes32"
            }
        ],
        "name": "setPubkey",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "content",
        "outputs": [
            {
                "name": "ret",
                "type": "bytes32"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "addr",
        "outputs": [
            {
                "name": "ret",
                "type": "address"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "contentType",
                "type": "uint256"
            },
            {
                "name": "data",
                "type": "bytes"
            }
        ],
        "name": "setABI",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "name",
        "outputs": [
            {
                "name": "ret",
                "type": "string"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "name",
                "type": "string"
            }
        ],
        "name": "setName",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "hash",
                "type": "bytes32"
            }
        ],
        "name": "setContent",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "pubkey",
        "outputs": [
            {
                "name": "x",
                "type": "bytes32"
            },
            {
                "name": "y",
                "type": "bytes32"
            }
        ],
        "payable": false,
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "addr",
                "type": "address"
            }
        ],
        "name": "setAddr",
        "outputs": [],
        "payable": false,
        "type": "function"
    },
    {
        "inputs": [
            {
                "name": "ensAddr",
                "type": "address"
            }
        ],
        "payable": false,
        "type": "constructor"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "a",
                "type": "address"
            }
        ],
        "name": "AddrChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "hash",
                "type": "bytes32"
            }
        ],
        "name": "ContentChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "name",
                "type": "string"
            }
        ],
        "name": "NameChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": true,
                "name": "contentType",
                "type": "uint256"
            }
        ],
        "name": "ABIChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "x",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "y",
                "type": "bytes32"
            }
        ],
        "name": "PubkeyChanged",
        "type": "event"
    },
    {
        "anonymous": false,
        "inputs": [
            {
                "indexed": true,
                "name": "node",
                "type": "bytes32"
            },
            {
                "indexed": false,
                "name": "hash",
                "type": "bytes"
            }
        ],
        "name": "ContenthashChanged",
        "type": "event"
    },
    {
        "constant": true,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            }
        ],
        "name": "contenthash",
        "outputs": [
            {
                "name": "",
                "type": "bytes"
            }
        ],
        "payable": false,
        "stateMutability": "view",
        "type": "function"
    },
    {
        "constant": false,
        "inputs": [
            {
                "name": "node",
                "type": "bytes32"
            },
            {
                "name": "hash",
                "type": "bytes"
            }
        ],
        "name": "setContenthash",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function"
    }
];

module.exports = RESOLVER;

/***/ }),

/***/ 838109:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file iban.js
 *
 * Details: https://github.com/ethereum/wiki/wiki/ICAP:-Inter-exchange-Client-Address-Protocol
 *
 * @author Marek Kotewicz <marek@parity.io>
 * @date 2015
 */



var utils = __webpack_require__(328700);
var BigNumber = __webpack_require__(213550);


var leftPad = function (string, bytes) {
    var result = string;
    while (result.length < bytes * 2) {
        result = '0' + result;
    }
    return result;
};

/**
 * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to
 * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.
 *
 * @method iso13616Prepare
 * @param {String} iban the IBAN
 * @returns {String} the prepared IBAN
 */
var iso13616Prepare = function (iban) {
    var A = 'A'.charCodeAt(0);
    var Z = 'Z'.charCodeAt(0);

    iban = iban.toUpperCase();
    iban = iban.substr(4) + iban.substr(0,4);

    return iban.split('').map(function(n){
        var code = n.charCodeAt(0);
        if (code >= A && code <= Z){
            // A = 10, B = 11, ... Z = 35
            return code - A + 10;
        } else {
            return n;
        }
    }).join('');
};

/**
 * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.
 *
 * @method mod9710
 * @param {String} iban
 * @returns {Number}
 */
var mod9710 = function (iban) {
    var remainder = iban,
        block;

    while (remainder.length > 2){
        block = remainder.slice(0, 9);
        remainder = parseInt(block, 10) % 97 + remainder.slice(block.length);
    }

    return parseInt(remainder, 10) % 97;
};

/**
 * This prototype should be used to create iban object from iban correct string
 *
 * @param {String} iban
 */
var Iban = function Iban(iban) {
    this._iban = iban;
};

/**
 * This method should be used to create an ethereum address from a direct iban address
 *
 * @method toAddress
 * @param {String} iban address
 * @return {String} the ethereum address
 */
Iban.toAddress = function (ib) {
    ib = new Iban(ib);

    if(!ib.isDirect()) {
        throw new Error('IBAN is indirect and can\'t be converted');
    }

    return ib.toAddress();
};

/**
 * This method should be used to create iban address from an ethereum address
 *
 * @method toIban
 * @param {String} address
 * @return {String} the IBAN address
 */
Iban.toIban = function (address) {
    return Iban.fromAddress(address).toString();
};

/**
 * This method should be used to create iban object from an ethereum address
 *
 * @method fromAddress
 * @param {String} address
 * @return {Iban} the IBAN object
 */
Iban.fromAddress = function (address) {
    if(!utils.isAddress(address)){
        throw new Error('Provided address is not a valid address: '+ address);
    }

    address = address.replace('0x','').replace('0X','');

    var asBn = new BigNumber(address, 16);
    var base36 = asBn.toString(36);
    var padded = leftPad(base36, 15);
    return Iban.fromBban(padded.toUpperCase());
};

/**
 * Convert the passed BBAN to an IBAN for this country specification.
 * Please note that <i>"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account"</i>.
 * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits
 *
 * @method fromBban
 * @param {String} bban the BBAN to convert to IBAN
 * @returns {Iban} the IBAN object
 */
Iban.fromBban = function (bban) {
    var countryCode = 'XE';

    var remainder = mod9710(iso13616Prepare(countryCode + '00' + bban));
    var checkDigit = ('0' + (98 - remainder)).slice(-2);

    return new Iban(countryCode + checkDigit + bban);
};

/**
 * Should be used to create IBAN object for given institution and identifier
 *
 * @method createIndirect
 * @param {Object} options, required options are "institution" and "identifier"
 * @return {Iban} the IBAN object
 */
Iban.createIndirect = function (options) {
    return Iban.fromBban('ETH' + options.institution + options.identifier);
};

/**
 * This method should be used to check if given string is valid iban object
 *
 * @method isValid
 * @param {String} iban string
 * @return {Boolean} true if it is valid IBAN
 */
Iban.isValid = function (iban) {
    var i = new Iban(iban);
    return i.isValid();
};

/**
 * Should be called to check if iban is correct
 *
 * @method isValid
 * @returns {Boolean} true if it is, otherwise false
 */
Iban.prototype.isValid = function () {
    return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) &&
        mod9710(iso13616Prepare(this._iban)) === 1;
};

/**
 * Should be called to check if iban number is direct
 *
 * @method isDirect
 * @returns {Boolean} true if it is, otherwise false
 */
Iban.prototype.isDirect = function () {
    return this._iban.length === 34 || this._iban.length === 35;
};

/**
 * Should be called to check if iban number if indirect
 *
 * @method isIndirect
 * @returns {Boolean} true if it is, otherwise false
 */
Iban.prototype.isIndirect = function () {
    return this._iban.length === 20;
};

/**
 * Should be called to get iban checksum
 * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003)
 *
 * @method checksum
 * @returns {String} checksum
 */
Iban.prototype.checksum = function () {
    return this._iban.substr(2, 2);
};

/**
 * Should be called to get institution identifier
 * eg. XREG
 *
 * @method institution
 * @returns {String} institution identifier
 */
Iban.prototype.institution = function () {
    return this.isIndirect() ? this._iban.substr(7, 4) : '';
};

/**
 * Should be called to get client identifier within institution
 * eg. GAVOFYORK
 *
 * @method client
 * @returns {String} client identifier
 */
Iban.prototype.client = function () {
    return this.isIndirect() ? this._iban.substr(11) : '';
};

/**
 * Should be called to get client direct address
 *
 * @method toAddress
 * @returns {String} ethereum address
 */
Iban.prototype.toAddress = function () {
    if (this.isDirect()) {
        var base36 = this._iban.substr(4);
        var asBn = new BigNumber(base36, 36);
        return utils.toChecksumAddress(asBn.toString(16, 20));
    }

    return '';
};

Iban.prototype.toString = function () {
    return this._iban;
};

module.exports = Iban;


/***/ }),

/***/ 621940:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var core = __webpack_require__(751931);
var Method = __webpack_require__(827123);
var utils = __webpack_require__(328700);
var Net = __webpack_require__(264717);

var formatters = __webpack_require__(524763).formatters;


var Personal = function Personal() {
    var _this = this;

    // sets _requestmanager
    core.packageInit(this, arguments);

    this.net = new Net(this);

    var defaultAccount = null;
    var defaultBlock = 'latest';

    Object.defineProperty(this, 'defaultAccount', {
        get: function () {
            return defaultAccount;
        },
        set: function (val) {
            if(val) {
                defaultAccount = utils.toChecksumAddress(formatters.inputAddressFormatter(val));
            }

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultAccount = defaultAccount;
            });

            return val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultBlock', {
        get: function () {
            return defaultBlock;
        },
        set: function (val) {
            defaultBlock = val;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultBlock = defaultBlock;
            });

            return val;
        },
        enumerable: true
    });


    var methods = [
        new Method({
            name: 'getAccounts',
            call: 'personal_listAccounts',
            params: 0,
            outputFormatter: utils.toChecksumAddress
        }),
        new Method({
            name: 'newAccount',
            call: 'personal_newAccount',
            params: 1,
            inputFormatter: [null],
            outputFormatter: utils.toChecksumAddress
        }),
        new Method({
            name: 'unlockAccount',
            call: 'personal_unlockAccount',
            params: 3,
            inputFormatter: [formatters.inputAddressFormatter, null, null]
        }),
        new Method({
            name: 'lockAccount',
            call: 'personal_lockAccount',
            params: 1,
            inputFormatter: [formatters.inputAddressFormatter]
        }),
        new Method({
            name: 'importRawKey',
            call: 'personal_importRawKey',
            params: 2
        }),
        new Method({
            name: 'sendTransaction',
            call: 'personal_sendTransaction',
            params: 2,
            inputFormatter: [formatters.inputTransactionFormatter, null]
        }),
        new Method({
            name: 'signTransaction',
            call: 'personal_signTransaction',
            params: 2,
            inputFormatter: [formatters.inputTransactionFormatter, null]
        }),
        new Method({
            name: 'sign',
            call: 'personal_sign',
            params: 3,
            inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null]
        }),
        new Method({
            name: 'ecRecover',
            call: 'personal_ecRecover',
            params: 2,
            inputFormatter: [formatters.inputSignFormatter, null]
        })
    ];
    methods.forEach(function(method) {
        method.attachToObject(_this);
        method.setRequestManager(_this._requestManager);
        method.defaultBlock = _this.defaultBlock;
        method.defaultAccount = _this.defaultAccount;
    });
};

core.addProviders(Personal);



module.exports = Personal;




/***/ }),

/***/ 890991:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file getNetworkType.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);

var getNetworkType = function (callback) {
    var _this = this,
        id;


    return this.net.getId()
        .then(function (givenId) {

            id = givenId;

            return _this.getBlock(0);
        })
        .then(function (genesis) {
            var returnValue = 'private';

            if (genesis.hash === '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' &&
                id === 1) {
                returnValue = 'main';
            }
            if (genesis.hash === '0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303' &&
                id === 2) {
                returnValue = 'morden';
            }
            if (genesis.hash === '0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d' &&
                id === 3) {
                returnValue = 'ropsten';
            }
            if (genesis.hash === '0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177' &&
                id === 4) {
                returnValue = 'rinkeby';
            }
            if (genesis.hash === '0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a' &&
                id === 5) {
                returnValue = 'goerli';
            }
            if (genesis.hash === '0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9' &&
                id === 42) {
                returnValue = 'kovan';
            }

            if (_.isFunction(callback)) {
                callback(null, returnValue);
            }

            return returnValue;
        })
        .catch(function (err) {
            if (_.isFunction(callback)) {
                callback(err);
            } else {
                throw err;
            }
        });
};

module.exports = getNetworkType;


/***/ }),

/***/ 656841:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var core = __webpack_require__(751931);
var helpers = __webpack_require__(524763);
var Subscriptions = __webpack_require__(839351).subscriptions;
var Method = __webpack_require__(827123);
var utils = __webpack_require__(328700);
var Net = __webpack_require__(264717);

var ENS = __webpack_require__(734960);
var Personal = __webpack_require__(621940);
var BaseContract = __webpack_require__(81677);
var Iban = __webpack_require__(838109);
var Accounts = __webpack_require__(616119);
var abi = __webpack_require__(264560);

var getNetworkType = __webpack_require__(890991);
var formatter = helpers.formatters;


var blockCall = function (args) {
    return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? "eth_getBlockByHash" : "eth_getBlockByNumber";
};

var transactionFromBlockCall = function (args) {
    return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex';
};

var uncleCall = function (args) {
    return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex';
};

var getBlockTransactionCountCall = function (args) {
    return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber';
};

var uncleCountCall = function (args) {
    return (_.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber';
};


var Eth = function Eth() {
    var _this = this;

    // sets _requestmanager
    core.packageInit(this, arguments);

    // overwrite package setRequestManager
    var setRequestManager = this.setRequestManager;
    this.setRequestManager = function (manager) {
        setRequestManager(manager);

        _this.net.setRequestManager(manager);
        _this.personal.setRequestManager(manager);
        _this.accounts.setRequestManager(manager);
        _this.Contract._requestManager = _this._requestManager;
        _this.Contract.currentProvider = _this._provider;

        return true;
    };

    // overwrite setProvider
    var setProvider = this.setProvider;
    this.setProvider = function () {
        setProvider.apply(_this, arguments);

        _this.setRequestManager(_this._requestManager);

        // Set detectedAddress/lastSyncCheck back to null because the provider could be connected to a different chain now
        _this.ens._detectedAddress = null;
        _this.ens._lastSyncCheck = null;
    };


    var handleRevert = false;
    var defaultAccount = null;
    var defaultBlock = 'latest';
    var transactionBlockTimeout = 50;
    var transactionConfirmationBlocks = 24;
    var transactionPollingTimeout = 750;
    var maxListenersWarningThreshold = 100;
    var defaultChain, defaultHardfork, defaultCommon;

    Object.defineProperty(this, 'handleRevert', {
        get: function () {
            return handleRevert;
        },
        set: function (val) {
            handleRevert = val;

            // also set on the Contract object
            _this.Contract.handleRevert = handleRevert;

            // update handleRevert
            methods.forEach(function(method) {
                method.handleRevert = handleRevert;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultCommon', {
        get: function () {
            return defaultCommon;
        },
        set: function (val) {
            defaultCommon = val;

            // also set on the Contract object
            _this.Contract.defaultCommon = defaultCommon;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultCommon = defaultCommon;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultHardfork', {
        get: function () {
            return defaultHardfork;
        },
        set: function (val) {
            defaultHardfork = val;

            // also set on the Contract object
            _this.Contract.defaultHardfork = defaultHardfork;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultHardfork = defaultHardfork;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultChain', {
        get: function () {
            return defaultChain;
        },
        set: function (val) {
            defaultChain = val;

            // also set on the Contract object
            _this.Contract.defaultChain = defaultChain;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultChain = defaultChain;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionPollingTimeout', {
        get: function () {
            return transactionPollingTimeout;
        },
        set: function (val) {
            transactionPollingTimeout = val;

            // also set on the Contract object
            _this.Contract.transactionPollingTimeout = transactionPollingTimeout;

            // update defaultBlock
            methods.forEach(function(method) {
                method.transactionPollingTimeout = transactionPollingTimeout;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionConfirmationBlocks', {
        get: function () {
            return transactionConfirmationBlocks;
        },
        set: function (val) {
            transactionConfirmationBlocks = val;

            // also set on the Contract object
            _this.Contract.transactionConfirmationBlocks = transactionConfirmationBlocks;

            // update defaultBlock
            methods.forEach(function(method) {
                method.transactionConfirmationBlocks = transactionConfirmationBlocks;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'transactionBlockTimeout', {
        get: function () {
            return transactionBlockTimeout;
        },
        set: function (val) {
            transactionBlockTimeout = val;

            // also set on the Contract object
            _this.Contract.transactionBlockTimeout = transactionBlockTimeout;

            // update defaultBlock
            methods.forEach(function(method) {
                method.transactionBlockTimeout = transactionBlockTimeout;
            });
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultAccount', {
        get: function () {
            return defaultAccount;
        },
        set: function (val) {
            if(val) {
                defaultAccount = utils.toChecksumAddress(formatter.inputAddressFormatter(val));
            }

            // also set on the Contract object
            _this.Contract.defaultAccount = defaultAccount;
            _this.personal.defaultAccount = defaultAccount;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultAccount = defaultAccount;
            });

            return val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'defaultBlock', {
        get: function () {
            return defaultBlock;
        },
        set: function (val) {
            defaultBlock = val;
            // also set on the Contract object
            _this.Contract.defaultBlock = defaultBlock;
            _this.personal.defaultBlock = defaultBlock;

            // update defaultBlock
            methods.forEach(function(method) {
                method.defaultBlock = defaultBlock;
            });

            return val;
        },
        enumerable: true
    });
    Object.defineProperty(this, 'maxListenersWarningThreshold', {
        get: function () {
            return maxListenersWarningThreshold;
        },
        set: function (val) {
            if (_this.currentProvider && _this.currentProvider.setMaxListeners){
                maxListenersWarningThreshold = val;
                _this.currentProvider.setMaxListeners(val);
            }
        },
        enumerable: true
    });


    this.clearSubscriptions = _this._requestManager.clearSubscriptions.bind(_this._requestManager);

    // add net
    this.net = new Net(this);
    // add chain detection
    this.net.getNetworkType = getNetworkType.bind(this);

    // add accounts
    this.accounts = new Accounts(this);

    // add personal
    this.personal = new Personal(this);
    this.personal.defaultAccount = this.defaultAccount;

    // set warnings threshold
    this.maxListenersWarningThreshold = maxListenersWarningThreshold;

    // create a proxy Contract type for this instance, as a Contract's provider
    // is stored as a class member rather than an instance variable. If we do
    // not create this proxy type, changing the provider in one instance of
    // web3-eth would subsequently change the provider for _all_ contract
    // instances!
    var self = this;
    var Contract = function Contract() {
        BaseContract.apply(this, arguments);

        // when Eth.setProvider is called, call packageInit
        // on all contract instances instantiated via this Eth
        // instances. This will update the currentProvider for
        // the contract instances
        var _this = this;
        var setProvider = self.setProvider;
        self.setProvider = function() {
          setProvider.apply(self, arguments);
          core.packageInit(_this, [self]);
        };
    };

    Contract.setProvider = function() {
        BaseContract.setProvider.apply(this, arguments);
    };

    // make our proxy Contract inherit from web3-eth-contract so that it has all
    // the right functionality and so that instanceof and friends work properly
    Contract.prototype = Object.create(BaseContract.prototype);
    Contract.prototype.constructor = Contract;

    // add contract
    this.Contract = Contract;
    this.Contract.defaultAccount = this.defaultAccount;
    this.Contract.defaultBlock = this.defaultBlock;
    this.Contract.transactionBlockTimeout = this.transactionBlockTimeout;
    this.Contract.transactionConfirmationBlocks = this.transactionConfirmationBlocks;
    this.Contract.transactionPollingTimeout = this.transactionPollingTimeout;
    this.Contract.handleRevert = this.handleRevert;
    this.Contract._requestManager = this._requestManager;
    this.Contract._ethAccounts = this.accounts;
    this.Contract.currentProvider = this._requestManager.provider;

    // add IBAN
    this.Iban = Iban;

    // add ABI
    this.abi = abi;

    // add ENS
    this.ens = new ENS(this);

    var methods = [
        new Method({
            name: 'getNodeInfo',
            call: 'web3_clientVersion'
        }),
        new Method({
            name: 'getProtocolVersion',
            call: 'eth_protocolVersion',
            params: 0
        }),
        new Method({
            name: 'getCoinbase',
            call: 'eth_coinbase',
            params: 0
        }),
        new Method({
            name: 'isMining',
            call: 'eth_mining',
            params: 0
        }),
        new Method({
            name: 'getHashrate',
            call: 'eth_hashrate',
            params: 0,
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'isSyncing',
            call: 'eth_syncing',
            params: 0,
            outputFormatter: formatter.outputSyncingFormatter
        }),
        new Method({
            name: 'getGasPrice',
            call: 'eth_gasPrice',
            params: 0,
            outputFormatter: formatter.outputBigNumberFormatter
        }),
        new Method({
            name: 'getAccounts',
            call: 'eth_accounts',
            params: 0,
            outputFormatter: utils.toChecksumAddress
        }),
        new Method({
            name: 'getBlockNumber',
            call: 'eth_blockNumber',
            params: 0,
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'getBalance',
            call: 'eth_getBalance',
            params: 2,
            inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter],
            outputFormatter: formatter.outputBigNumberFormatter
        }),
        new Method({
            name: 'getStorageAt',
            call: 'eth_getStorageAt',
            params: 3,
            inputFormatter: [formatter.inputAddressFormatter, utils.numberToHex, formatter.inputDefaultBlockNumberFormatter]
        }),
        new Method({
            name: 'getCode',
            call: 'eth_getCode',
            params: 2,
            inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter]
        }),
        new Method({
            name: 'getBlock',
            call: blockCall,
            params: 2,
            inputFormatter: [formatter.inputBlockNumberFormatter, function (val) { return !!val; }],
            outputFormatter: formatter.outputBlockFormatter
        }),
        new Method({
            name: 'getUncle',
            call: uncleCall,
            params: 2,
            inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex],
            outputFormatter: formatter.outputBlockFormatter,

        }),
        new Method({
            name: 'getBlockTransactionCount',
            call: getBlockTransactionCountCall,
            params: 1,
            inputFormatter: [formatter.inputBlockNumberFormatter],
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'getBlockUncleCount',
            call: uncleCountCall,
            params: 1,
            inputFormatter: [formatter.inputBlockNumberFormatter],
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'getTransaction',
            call: 'eth_getTransactionByHash',
            params: 1,
            inputFormatter: [null],
            outputFormatter: formatter.outputTransactionFormatter
        }),
        new Method({
            name: 'getTransactionFromBlock',
            call: transactionFromBlockCall,
            params: 2,
            inputFormatter: [formatter.inputBlockNumberFormatter, utils.numberToHex],
            outputFormatter: formatter.outputTransactionFormatter
        }),
        new Method({
            name: 'getTransactionReceipt',
            call: 'eth_getTransactionReceipt',
            params: 1,
            inputFormatter: [null],
            outputFormatter: formatter.outputTransactionReceiptFormatter
        }),
        new Method({
            name: 'getTransactionCount',
            call: 'eth_getTransactionCount',
            params: 2,
            inputFormatter: [formatter.inputAddressFormatter, formatter.inputDefaultBlockNumberFormatter],
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'sendSignedTransaction',
            call: 'eth_sendRawTransaction',
            params: 1,
            inputFormatter: [null],
            abiCoder: abi
        }),
        new Method({
            name: 'signTransaction',
            call: 'eth_signTransaction',
            params: 1,
            inputFormatter: [formatter.inputTransactionFormatter]
        }),
        new Method({
            name: 'sendTransaction',
            call: 'eth_sendTransaction',
            params: 1,
            inputFormatter: [formatter.inputTransactionFormatter],
            abiCoder: abi
        }),
        new Method({
            name: 'sign',
            call: 'eth_sign',
            params: 2,
            inputFormatter: [formatter.inputSignFormatter, formatter.inputAddressFormatter],
            transformPayload: function (payload) {
                payload.params.reverse();
                return payload;
            }
        }),
        new Method({
            name: 'call',
            call: 'eth_call',
            params: 2,
            inputFormatter: [formatter.inputCallFormatter, formatter.inputDefaultBlockNumberFormatter],
            abiCoder: abi
        }),
        new Method({
            name: 'estimateGas',
            call: 'eth_estimateGas',
            params: 1,
            inputFormatter: [formatter.inputCallFormatter],
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'submitWork',
            call: 'eth_submitWork',
            params: 3
        }),
        new Method({
            name: 'getWork',
            call: 'eth_getWork',
            params: 0
        }),
        new Method({
            name: 'getPastLogs',
            call: 'eth_getLogs',
            params: 1,
            inputFormatter: [formatter.inputLogFormatter],
            outputFormatter: formatter.outputLogFormatter
        }),
        new Method({
            name: 'getChainId',
            call: 'eth_chainId',
            params: 0,
            outputFormatter: utils.hexToNumber
        }),
        new Method({
            name: 'requestAccounts',
            call: 'eth_requestAccounts',
            params: 0,
            outputFormatter: utils.toChecksumAddress
        }),
        new Method({
            name: 'getProof',
            call: 'eth_getProof',
            params: 3,
            inputFormatter: [formatter.inputAddressFormatter, formatter.inputStorageKeysFormatter, formatter.inputDefaultBlockNumberFormatter],
            outputFormatter: formatter.outputProofFormatter
        }),
        new Method({
            name: 'getPendingTransactions',
            call: 'eth_pendingTransactions',
            params: 0,
            outputFormatter: formatter.outputTransactionFormatter
        }),

        // subscriptions
        new Subscriptions({
            name: 'subscribe',
            type: 'eth',
            subscriptions: {
                'newBlockHeaders': {
                    // TODO rename on RPC side?
                    subscriptionName: 'newHeads', // replace subscription with this name
                    params: 0,
                    outputFormatter: formatter.outputBlockFormatter
                },
                'pendingTransactions': {
                    subscriptionName: 'newPendingTransactions', // replace subscription with this name
                    params: 0
                },
                'logs': {
                    params: 1,
                    inputFormatter: [formatter.inputLogFormatter],
                    outputFormatter: formatter.outputLogFormatter,
                    // DUBLICATE, also in web3-eth-contract
                    subscriptionHandler: function (output) {
                        if(output.removed) {
                            this.emit('changed', output);
                        } else {
                            this.emit('data', output);
                        }

                        if (_.isFunction(this.callback)) {
                            this.callback(null, output, this);
                        }
                    }
                },
                'syncing': {
                    params: 0,
                    outputFormatter: formatter.outputSyncingFormatter,
                    subscriptionHandler: function (output) {
                        var _this = this;

                        // fire TRUE at start
                        if(this._isSyncing !== true) {
                            this._isSyncing = true;
                            this.emit('changed', _this._isSyncing);

                            if (_.isFunction(this.callback)) {
                                this.callback(null, _this._isSyncing, this);
                            }

                            setTimeout(function () {
                                _this.emit('data', output);

                                if (_.isFunction(_this.callback)) {
                                    _this.callback(null, output, _this);
                                }
                            }, 0);

                            // fire sync status
                        } else {
                            this.emit('data', output);
                            if (_.isFunction(_this.callback)) {
                                this.callback(null, output, this);
                            }

                            // wait for some time before fireing the FALSE
                            clearTimeout(this._isSyncingTimeout);
                            this._isSyncingTimeout = setTimeout(function () {
                                if(output.currentBlock > output.highestBlock - 200) {
                                    _this._isSyncing = false;
                                    _this.emit('changed', _this._isSyncing);

                                    if (_.isFunction(_this.callback)) {
                                        _this.callback(null, _this._isSyncing, _this);
                                    }
                                }
                            }, 500);
                        }
                    }
                }
            }
        })
    ];

    methods.forEach(function(method) {
        method.attachToObject(_this);
        method.setRequestManager(_this._requestManager, _this.accounts); // second param is the eth.accounts module (necessary for signing transactions locally)
        method.defaultBlock = _this.defaultBlock;
        method.defaultAccount = _this.defaultAccount;
        method.transactionBlockTimeout = _this.transactionBlockTimeout;
        method.transactionConfirmationBlocks = _this.transactionConfirmationBlocks;
        method.transactionPollingTimeout = _this.transactionPollingTimeout;
        method.handleRevert = _this.handleRevert;
    });

};

// Adds the static givenProvider and providers property to the Eth module
core.addProviders(Eth);


module.exports = Eth;



/***/ }),

/***/ 264717:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var core = __webpack_require__(751931);
var Method = __webpack_require__(827123);
var utils = __webpack_require__(328700);


var Net = function () {
    var _this = this;

    // sets _requestmanager
    core.packageInit(this, arguments);


    [
        new Method({
            name: 'getId',
            call: 'net_version',
            params: 0,
            outputFormatter: parseInt
        }),
        new Method({
            name: 'isListening',
            call: 'net_listening',
            params: 0
        }),
        new Method({
            name: 'getPeerCount',
            call: 'net_peerCount',
            params: 0,
            outputFormatter: utils.hexToNumber
        })
    ].forEach(function(method) {
        method.attachToObject(_this);
        method.setRequestManager(_this._requestManager);
    });

};

core.addProviders(Net);


module.exports = Net;




/***/ }),

/***/ 32899:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/** @file httpprovider.js
 * @authors:
 *   Marek Kotewicz <marek@parity.io>
 *   Marian Oancea
 *   Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2015
 */

var errors = __webpack_require__(524763).errors;
var XHR2 = __webpack_require__(159536).XMLHttpRequest; // jshint ignore: line
var http = __webpack_require__(298605);
var https = __webpack_require__(957211);


/**
 * HttpProvider should be used to send rpc calls over http
 */
var HttpProvider = function HttpProvider(host, options) {
    options = options || {};

    this.withCredentials = options.withCredentials || false;
    this.timeout = options.timeout || 0;
    this.headers = options.headers;
    this.agent = options.agent;
    this.connected = false;

    // keepAlive is true unless explicitly set to false
    const keepAlive = options.keepAlive !== false;
    this.host = host || 'http://localhost:8545';
    if (!this.agent) {
        if (this.host.substring(0,5) === "https") {
            this.httpsAgent = new https.Agent({ keepAlive });
        } else {
            this.httpAgent = new http.Agent({ keepAlive });
        }
    }
};

HttpProvider.prototype._prepareRequest = function(){
    var request;

    // the current runtime is a browser
    if (typeof XMLHttpRequest !== 'undefined') {
        request = new XMLHttpRequest();
    } else {
        request = new XHR2();
        var agents = {httpsAgent: this.httpsAgent, httpAgent: this.httpAgent, baseUrl: this.baseUrl};

        if (this.agent) {
            agents.httpsAgent = this.agent.https;
            agents.httpAgent = this.agent.http;
            agents.baseUrl = this.agent.baseUrl;
        }

        request.nodejsSet(agents);
    }

    request.open('POST', this.host, true);
    request.setRequestHeader('Content-Type','application/json');
    request.timeout = this.timeout;
    request.withCredentials = this.withCredentials;

    if(this.headers) {
        this.headers.forEach(function(header) {
            request.setRequestHeader(header.name, header.value);
        });
    }

    return request;
};

/**
 * Should be used to make async request
 *
 * @method send
 * @param {Object} payload
 * @param {Function} callback triggered on end with (err, result)
 */
HttpProvider.prototype.send = function (payload, callback) {
    var _this = this;
    var request = this._prepareRequest();

    request.onreadystatechange = function() {
        if (request.readyState === 4 && request.timeout !== 1) {
            var result = request.responseText;
            var error = null;

            try {
                result = JSON.parse(result);
            } catch(e) {
                error = errors.InvalidResponse(request.responseText);
            }

            _this.connected = true;
            callback(error, result);
        }
    };

    request.ontimeout = function() {
        _this.connected = false;
        callback(errors.ConnectionTimeout(this.timeout));
    };

    try {
        request.send(JSON.stringify(payload));
    } catch(error) {
        this.connected = false;
        callback(errors.InvalidConnection(this.host));
    }
};

HttpProvider.prototype.disconnect = function () {
    //NO OP
};

/**
 * Returns the desired boolean.
 *
 * @method supportsSubscriptions
 * @returns {boolean}
 */
HttpProvider.prototype.supportsSubscriptions = function () {
    return false;
};

module.exports = HttpProvider;


/***/ }),

/***/ 99042:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/** @file index.js
 * @authors:
 *   Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var _ = __webpack_require__(513469);
var errors = __webpack_require__(524763).errors;
var oboe = __webpack_require__(367757);


var IpcProvider = function IpcProvider(path, net) {
    var _this = this;
    this.responseCallbacks = {};
    this.notificationCallbacks = [];
    this.path = path;
    this.connected = false;

    this.connection = net.connect({path: this.path});

    this.addDefaultEvents();

    // LISTEN FOR CONNECTION RESPONSES
    var callback = function(result) {
        /*jshint maxcomplexity: 6 */

        var id = null;

        // get the id which matches the returned id
        if(_.isArray(result)) {
            result.forEach(function(load){
                if(_this.responseCallbacks[load.id])
                    id = load.id;
            });
        } else {
            id = result.id;
        }

        // notification
        if(!id && result.method.indexOf('_subscription') !== -1) {
            _this.notificationCallbacks.forEach(function(callback){
                if(_.isFunction(callback))
                    callback(result);
            });

            // fire the callback
        } else if(_this.responseCallbacks[id]) {
            _this.responseCallbacks[id](null, result);
            delete _this.responseCallbacks[id];
        }
    };

    // use oboe.js for Sockets
    if (net.constructor.name === 'Socket') {
        oboe(this.connection)
        .done(callback);
    } else {
        this.connection.on('data', function(data){
            _this._parseResponse(data.toString()).forEach(callback);
        });
    }
};

/**
Will add the error and end event to timeout existing calls

@method addDefaultEvents
*/
IpcProvider.prototype.addDefaultEvents = function(){
    var _this = this;

    this.connection.on('connect', function(){
        _this.connected = true;
    });

    this.connection.on('close', function(){
        _this.connected = false;
    });

    this.connection.on('error', function(){
        _this._timeout();
    });

    this.connection.on('end', function(){
        _this._timeout();
    });

    this.connection.on('timeout', function(){
        _this._timeout();
    });
};


/**
 Will parse the response and make an array out of it.

 NOTE, this exists for backwards compatibility reasons.

 @method _parseResponse
 @param {String} data
 */
IpcProvider.prototype._parseResponse = function(data) {
    var _this = this,
        returnValues = [];

    // DE-CHUNKER
    var dechunkedData = data
        .replace(/\}[\n\r]?\{/g,'}|--|{') // }{
        .replace(/\}\][\n\r]?\[\{/g,'}]|--|[{') // }][{
        .replace(/\}[\n\r]?\[\{/g,'}|--|[{') // }[{
        .replace(/\}\][\n\r]?\{/g,'}]|--|{') // }]{
        .split('|--|');

    dechunkedData.forEach(function(data){

        // prepend the last chunk
        if(_this.lastChunk)
            data = _this.lastChunk + data;

        var result = null;

        try {
            result = JSON.parse(data);

        } catch(e) {

            _this.lastChunk = data;

            // start timeout to cancel all requests
            clearTimeout(_this.lastChunkTimeout);
            _this.lastChunkTimeout = setTimeout(function(){
                _this._timeout();
                throw errors.InvalidResponse(data);
            }, 1000 * 15);

            return;
        }

        // cancel timeout and set chunk to null
        clearTimeout(_this.lastChunkTimeout);
        _this.lastChunk = null;

        if(result)
            returnValues.push(result);
    });

    return returnValues;
};


/**
Get the adds a callback to the responseCallbacks object,
which will be called if a response matching the response Id will arrive.

@method _addResponseCallback
*/
IpcProvider.prototype._addResponseCallback = function(payload, callback) {
    var id = payload.id || payload[0].id;
    var method = payload.method || payload[0].method;

    this.responseCallbacks[id] = callback;
    this.responseCallbacks[id].method = method;
};

/**
Timeout all requests when the end/error event is fired

@method _timeout
*/
IpcProvider.prototype._timeout = function() {
    for(var key in this.responseCallbacks) {
        if(this.responseCallbacks.hasOwnProperty(key)){
            this.responseCallbacks[key](errors.InvalidConnection('on IPC'));
            delete this.responseCallbacks[key];
        }
    }
};

/**
 Try to reconnect

 @method reconnect
 */
IpcProvider.prototype.reconnect = function() {
    this.connection.connect({path: this.path});
};


IpcProvider.prototype.send = function (payload, callback) {
    // try reconnect, when connection is gone
    if(!this.connection.writable)
        this.connection.connect({path: this.path});


    this.connection.write(JSON.stringify(payload));
    this._addResponseCallback(payload, callback);
};

/**
Subscribes to provider events.provider

@method on
@param {String} type    'notification', 'connect', 'error', 'end' or 'data'
@param {Function} callback   the callback to call
*/
IpcProvider.prototype.on = function (type, callback) {

    if(typeof callback !== 'function')
        throw new Error('The second parameter callback must be a function.');

    switch(type){
        case 'data':
            this.notificationCallbacks.push(callback);
            break;

        // adds error, end, timeout, connect
        default:
            this.connection.on(type, callback);
            break;
    }
};

/**
 Subscribes to provider events.provider

 @method on
 @param {String} type    'connect', 'error', 'end' or 'data'
 @param {Function} callback   the callback to call
 */
IpcProvider.prototype.once = function (type, callback) {

    if(typeof callback !== 'function')
        throw new Error('The second parameter callback must be a function.');

    this.connection.once(type, callback);
};

/**
Removes event listener

@method removeListener
@param {String} type    'data', 'connect', 'error', 'end' or 'data'
@param {Function} callback   the callback to call
*/
IpcProvider.prototype.removeListener = function (type, callback) {
    var _this = this;

    switch(type){
        case 'data':
            this.notificationCallbacks.forEach(function(cb, index){
                if(cb === callback)
                    _this.notificationCallbacks.splice(index, 1);
            });
            break;

        default:
            this.connection.removeListener(type, callback);
            break;
    }
};

/**
Removes all event listeners

@method removeAllListeners
@param {String} type    'data', 'connect', 'error', 'end' or 'data'
*/
IpcProvider.prototype.removeAllListeners = function (type) {
    switch(type){
        case 'data':
            this.notificationCallbacks = [];
            break;

        default:
            this.connection.removeAllListeners(type);
            break;
    }
};

/**
Resets the providers, clears all callbacks

@method reset
*/
IpcProvider.prototype.reset = function () {
    this._timeout();
    this.notificationCallbacks = [];

    this.connection.removeAllListeners('error');
    this.connection.removeAllListeners('end');
    this.connection.removeAllListeners('timeout');

    this.addDefaultEvents();
};

/**
 * Returns the desired boolean.
 *
 * @method supportsSubscriptions
 * @returns {boolean}
 */
IpcProvider.prototype.supportsSubscriptions = function () {
    return true;
};

module.exports = IpcProvider;



/***/ }),

/***/ 460044:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var isNode = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';

var _btoa = null;
var helpers = null;
if (isNode) {
    _btoa = function(str) {
        return Buffer.from(str).toString('base64');
    };
    var url = __webpack_require__(978835);
    if (url.URL) {
        // Use the new Node 6+ API for parsing URLs that supports username/password
        var newURL = url.URL;
        helpers = function(url) {
            return new newURL(url);
        };
    } else {
        // Web3 supports Node.js 5, so fall back to the legacy URL API if necessary
        helpers = __webpack_require__(978835).parse;
    }
} else {
    _btoa = btoa.bind(window);
    helpers = function(url) {
        return new URL(url);
    };
}

module.exports = {
    parseURL: helpers,
    btoa: _btoa
};


/***/ }),

/***/ 912797:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file WebsocketProvider.js
 * @authors: Samuel Furter <samuel@ethereum.org>, Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2019
 */



var EventEmitter = __webpack_require__(226729);
var helpers = __webpack_require__(460044);
var errors = __webpack_require__(524763).errors;
var Ws = __webpack_require__(55159).w3cwebsocket;

/**
 * @param {string} url
 * @param {Object} options
 *
 * @constructor
 */
var WebsocketProvider = function WebsocketProvider(url, options) {
    EventEmitter.call(this);

    options = options || {};
    this.url = url;
    this._customTimeout = options.timeout || 1000 * 15;
    this.headers = options.headers || {};
    this.protocol = options.protocol || undefined;
    this.reconnectOptions = Object.assign({
            auto: false,
            delay: 5000,
            maxAttempts: false,
            onTimeout: false
        },
        options.reconnect
    );
    this.clientConfig = options.clientConfig || undefined; // Allow a custom client configuration
    this.requestOptions = options.requestOptions || undefined; // Allow a custom request options (https://github.com/theturtle32/WebSocket-Node/blob/master/docs/WebSocketClient.md#connectrequesturl-requestedprotocols-origin-headers-requestoptions)

    this.DATA = 'data';
    this.CLOSE = 'close';
    this.ERROR = 'error';
    this.CONNECT = 'connect';
    this.RECONNECT = 'reconnect';

    this.connection = null;
    this.requestQueue = new Map();
    this.responseQueue = new Map();
    this.reconnectAttempts = 0;
    this.reconnecting = false;

    // The w3cwebsocket implementation does not support Basic Auth
    // username/password in the URL. So generate the basic auth header, and
    // pass through with any additional headers supplied in constructor
    var parsedURL = helpers.parseURL(url);
    if (parsedURL.username && parsedURL.password) {
        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.username + ':' + parsedURL.password);
    }

    // When all node core implementations that do not have the
    // WHATWG compatible URL parser go out of service this line can be removed.
    if (parsedURL.auth) {
        this.headers.authorization = 'Basic ' + helpers.btoa(parsedURL.auth);
    }

    // make property `connected` which will return the current connection status
    Object.defineProperty(this, 'connected', {
        get: function () {
            return this.connection && this.connection.readyState === this.connection.OPEN;
        },
        enumerable: true
    });

    this.connect();
};

// Inherit from EventEmitter
WebsocketProvider.prototype = Object.create(EventEmitter.prototype);
WebsocketProvider.prototype.constructor = WebsocketProvider;

/**
 * Connects to the configured node
 *
 * @method connect
 *
 * @returns {void}
 */
WebsocketProvider.prototype.connect = function () {
    this.connection = new Ws(this.url, this.protocol, undefined, this.headers, this.requestOptions, this.clientConfig);
    this._addSocketListeners();
};

/**
 * Listener for the `data` event of the underlying WebSocket object
 *
 * @method _onMessage
 *
 * @returns {void}
 */
WebsocketProvider.prototype._onMessage = function (e) {
    var _this = this;

    this._parseResponse((typeof e.data === 'string') ? e.data : '').forEach(function (result) {
        if (result.method && result.method.indexOf('_subscription') !== -1) {
            _this.emit(_this.DATA, result);

            return;
        }

        var id = result.id;

        // get the id which matches the returned id
        if (Array.isArray(result)) {
            id = result[0].id;
        }

        if (_this.responseQueue.has(id)) {
            if(_this.responseQueue.get(id).callback !== undefined) {
                _this.responseQueue.get(id).callback(false, result);
            }
            _this.responseQueue.delete(id);
        }
    });
};

/**
 * Listener for the `open` event of the underlying WebSocket object
 *
 * @method _onConnect
 *
 * @returns {void}
 */
WebsocketProvider.prototype._onConnect = function () {
    this.emit(this.CONNECT);
    this.reconnectAttempts = 0;
    this.reconnecting = false;

    if (this.requestQueue.size > 0) {
        var _this = this;

        this.requestQueue.forEach(function (request, key) {
            _this.send(request.payload, request.callback);
            _this.requestQueue.delete(key);
        });
    }
};

/**
 * Listener for the `close` event of the underlying WebSocket object
 *
 * @method _onClose
 *
 * @returns {void}
 */
WebsocketProvider.prototype._onClose = function (event) {
    var _this = this;

    if (this.reconnectOptions.auto && (![1000, 1001].includes(event.code) || event.wasClean === false)) {
        this.reconnect();

        return;
    }

    this.emit(this.CLOSE, event);

    if (this.requestQueue.size > 0) {
        this.requestQueue.forEach(function (request, key) {
            request.callback(errors.ConnectionNotOpenError(event));
            _this.requestQueue.delete(key);
        });
    }

    if (this.responseQueue.size > 0) {
        this.responseQueue.forEach(function (request, key) {
            request.callback(errors.InvalidConnection('on WS', event));
            _this.responseQueue.delete(key);
        });
    }

    this._removeSocketListeners();
    this.removeAllListeners();
};

/**
 * Will add the required socket listeners
 *
 * @method _addSocketListeners
 *
 * @returns {void}
 */
WebsocketProvider.prototype._addSocketListeners = function () {
    this.connection.addEventListener('message', this._onMessage.bind(this));
    this.connection.addEventListener('open', this._onConnect.bind(this));
    this.connection.addEventListener('close', this._onClose.bind(this));
};

/**
 * Will remove all socket listeners
 *
 * @method _removeSocketListeners
 *
 * @returns {void}
 */
WebsocketProvider.prototype._removeSocketListeners = function () {
    this.connection.removeEventListener('message', this._onMessage);
    this.connection.removeEventListener('open', this._onConnect);
    this.connection.removeEventListener('close', this._onClose);
};

/**
 * Will parse the response and make an array out of it.
 *
 * @method _parseResponse
 *
 * @param {String} data
 *
 * @returns {Array}
 */
WebsocketProvider.prototype._parseResponse = function (data) {
    var _this = this,
        returnValues = [];

    // DE-CHUNKER
    var dechunkedData = data
        .replace(/\}[\n\r]?\{/g, '}|--|{') // }{
        .replace(/\}\][\n\r]?\[\{/g, '}]|--|[{') // }][{
        .replace(/\}[\n\r]?\[\{/g, '}|--|[{') // }[{
        .replace(/\}\][\n\r]?\{/g, '}]|--|{') // }]{
        .split('|--|');

    dechunkedData.forEach(function (data) {

        // prepend the last chunk
        if (_this.lastChunk)
            data = _this.lastChunk + data;

        var result = null;

        try {
            result = JSON.parse(data);
        } catch (e) {

            _this.lastChunk = data;

            // start timeout to cancel all requests
            clearTimeout(_this.lastChunkTimeout);
            _this.lastChunkTimeout = setTimeout(function () {
                if (_this.reconnectOptions.auto && _this.reconnectOptions.onTimeout) {
                    _this.reconnect();

                    return;
                }


                _this.emit(_this.ERROR, errors.ConnectionTimeout(_this._customTimeout));

                if (_this.requestQueue.size > 0) {
                    _this.requestQueue.forEach(function (request, key) {
                        request.callback(errors.ConnectionTimeout(_this._customTimeout));
                        _this.requestQueue.delete(key);
                    });
                }
            }, _this._customTimeout);

            return;
        }

        // cancel timeout and set chunk to null
        clearTimeout(_this.lastChunkTimeout);
        _this.lastChunk = null;

        if (result)
            returnValues.push(result);
    });

    return returnValues;
};

/**
 * Does check if the provider is connecting and will add it to the queue or will send it directly
 *
 * @method send
 *
 * @param {Object} payload
 * @param {Function} callback
 *
 * @returns {void}
 */
WebsocketProvider.prototype.send = function (payload, callback) {
    var _this = this;
    var id = payload.id;
    var request = {payload: payload, callback: callback};

    if (Array.isArray(payload)) {
        id = payload[0].id;
    }

    if (this.connection.readyState === this.connection.CONNECTING || this.reconnecting) {
        this.requestQueue.set(id, request);

        return;
    }

    if (this.connection.readyState !== this.connection.OPEN) {
        this.requestQueue.delete(id);

        this.emit(this.ERROR, errors.ConnectionNotOpenError());
        request.callback(errors.ConnectionNotOpenError());

        return;
    }

    this.responseQueue.set(id, request);
    this.requestQueue.delete(id);

    try {
        this.connection.send(JSON.stringify(request.payload));
    } catch (error) {
        request.callback(error);
        _this.responseQueue.delete(id);
    }
};

/**
 * Resets the providers, clears all callbacks
 *
 * @method reset
 *
 * @returns {void}
 */
WebsocketProvider.prototype.reset = function () {
    this.responseQueue.clear();
    this.requestQueue.clear();

    this.removeAllListeners();

    this._removeSocketListeners();
    this._addSocketListeners();
};

/**
 * Closes the current connection with the given code and reason arguments
 *
 * @method disconnect
 *
 * @param {number} code
 * @param {string} reason
 *
 * @returns {void}
 */
WebsocketProvider.prototype.disconnect = function (code, reason) {
    this._removeSocketListeners();
    this.connection.close(code || 1000, reason);
};

/**
 * Returns the desired boolean.
 *
 * @method supportsSubscriptions
 *
 * @returns {boolean}
 */
WebsocketProvider.prototype.supportsSubscriptions = function () {
    return true;
};

/**
 * Removes the listeners and reconnects to the socket.
 *
 * @method reconnect
 *
 * @returns {void}
 */
WebsocketProvider.prototype.reconnect = function () {
    var _this = this;
    this.reconnecting = true;

    if (this.responseQueue.size > 0) {
        this.responseQueue.forEach(function (request, key) {
            request.callback(errors.PendingRequestsOnReconnectingError());
            _this.responseQueue.delete(key);
        });
    }

    if (
        !this.reconnectOptions.maxAttempts ||
        this.reconnectAttempts < this.reconnectOptions.maxAttempts
    ) {
        setTimeout(function () {
            _this.reconnectAttempts++;
            _this._removeSocketListeners();
            _this.emit(_this.RECONNECT, _this.reconnectAttempts);
            _this.connect();
        }, this.reconnectOptions.delay);

        return;
    }

    this.emit(this.ERROR, errors.MaxAttemptsReachedOnReconnectingError());
    this.reconnecting = false;

    if (this.requestQueue.size > 0) {
        this.requestQueue.forEach(function (request, key) {
            request.callback(errors.MaxAttemptsReachedOnReconnectingError());
            _this.requestQueue.delete(key);
        });
    }
};

module.exports = WebsocketProvider;


/***/ }),

/***/ 718816:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */



var core = __webpack_require__(751931);
var Subscriptions = __webpack_require__(839351).subscriptions;
var Method = __webpack_require__(827123);
// var formatters = require('web3-core-helpers').formatters;
var Net = __webpack_require__(264717);


var Shh = function Shh() {
    var _this = this;

    // sets _requestmanager
    core.packageInit(this, arguments);

    // overwrite package setRequestManager
    var setRequestManager = this.setRequestManager;
    this.setRequestManager = function (manager) {
        setRequestManager(manager);

        _this.net.setRequestManager(manager);

        return true;
    };

    // overwrite setProvider
    var setProvider = this.setProvider;
    this.setProvider = function () {
        setProvider.apply(_this, arguments);

        _this.setRequestManager(_this._requestManager);
    };

    this.net = new Net(this);

    [
        new Subscriptions({
            name: 'subscribe',
            type: 'shh',
            subscriptions: {
                'messages': {
                    params: 1
                    // inputFormatter: [formatters.inputPostFormatter],
                    // outputFormatter: formatters.outputPostFormatter
                }
            }
        }),

        new Method({
            name: 'getVersion',
            call: 'shh_version',
            params: 0
        }),
        new Method({
            name: 'getInfo',
            call: 'shh_info',
            params: 0
        }),
        new Method({
            name: 'setMaxMessageSize',
            call: 'shh_setMaxMessageSize',
            params: 1
        }),
        new Method({
            name: 'setMinPoW',
            call: 'shh_setMinPoW',
            params: 1
        }),
        new Method({
            name: 'markTrustedPeer',
            call: 'shh_markTrustedPeer',
            params: 1
        }),
        new Method({
            name: 'newKeyPair',
            call: 'shh_newKeyPair',
            params: 0
        }),
        new Method({
            name: 'addPrivateKey',
            call: 'shh_addPrivateKey',
            params: 1
        }),
        new Method({
            name: 'deleteKeyPair',
            call: 'shh_deleteKeyPair',
            params: 1
        }),
        new Method({
            name: 'hasKeyPair',
            call: 'shh_hasKeyPair',
            params: 1
        }),
        new Method({
            name: 'getPublicKey',
            call: 'shh_getPublicKey',
            params: 1
        }),
        new Method({
            name: 'getPrivateKey',
            call: 'shh_getPrivateKey',
            params: 1
        }),
        new Method({
            name: 'newSymKey',
            call: 'shh_newSymKey',
            params: 0
        }),
        new Method({
            name: 'addSymKey',
            call: 'shh_addSymKey',
            params: 1
        }),
        new Method({
            name: 'generateSymKeyFromPassword',
            call: 'shh_generateSymKeyFromPassword',
            params: 1
        }),
        new Method({
            name: 'hasSymKey',
            call: 'shh_hasSymKey',
            params: 1
        }),
        new Method({
            name: 'getSymKey',
            call: 'shh_getSymKey',
            params: 1
        }),
        new Method({
            name: 'deleteSymKey',
            call: 'shh_deleteSymKey',
            params: 1
        }),

        new Method({
            name: 'newMessageFilter',
            call: 'shh_newMessageFilter',
            params: 1
        }),
        new Method({
            name: 'getFilterMessages',
            call: 'shh_getFilterMessages',
            params: 1
        }),
        new Method({
            name: 'deleteMessageFilter',
            call: 'shh_deleteMessageFilter',
            params: 1
        }),

        new Method({
            name: 'post',
            call: 'shh_post',
            params: 1,
            inputFormatter: [null]
        }),

        new Method({
            name: 'unsubscribe',
            call: 'shh_unsubscribe',
            params: 1
        })
    ].forEach(function(method) {
        method.attachToObject(_this);
        method.setRequestManager(_this._requestManager);
    });
};

Shh.prototype.clearSubscriptions = function () {
     this._requestManager.clearSubscriptions();
};

core.addProviders(Shh);



module.exports = Shh;




/***/ }),

/***/ 328700:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file utils.js
 * @author Marek Kotewicz <marek@parity.io>
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */


var _ = __webpack_require__(513469);
var ethjsUnit = __webpack_require__(694278);
var utils = __webpack_require__(903163);
var soliditySha3 = __webpack_require__(153127);
var randombytes = __webpack_require__(351353);



/**
 * Fires an error in an event emitter and callback and returns the eventemitter
 *
 * @method _fireError
 * @param {Object} error a string, a error, or an object with {message, data}
 * @param {Object} emitter
 * @param {Function} reject
 * @param {Function} callback
 * @param {any} optionalData
 * @return {Object} the emitter
 */
var _fireError = function (error, emitter, reject, callback, optionalData) {
    /*jshint maxcomplexity: 10 */

    // add data if given
    if(_.isObject(error) && !(error instanceof Error) &&  error.data) {
        if(_.isObject(error.data) || _.isArray(error.data)) {
            error.data = JSON.stringify(error.data, null, 2);
        }

        error = error.message +"\n"+ error.data;
    }

    if(_.isString(error)) {
        error = new Error(error);
    }

    if (_.isFunction(callback)) {
        callback(error, optionalData);
    }
    if (_.isFunction(reject)) {
        // suppress uncatched error if an error listener is present
        // OR suppress uncatched error if an callback listener is present
        if (
            emitter &&
            (_.isFunction(emitter.listeners) &&
            emitter.listeners('error').length) || _.isFunction(callback)
        ) {
            emitter.catch(function(){});
        }
        // reject later, to be able to return emitter
        setTimeout(function () {
            reject(error);
        }, 1);
    }

    if(emitter && _.isFunction(emitter.emit)) {
        // emit later, to be able to return emitter
        setTimeout(function () {
            emitter.emit('error', error, optionalData);
            emitter.removeAllListeners();
        }, 1);
    }

    return emitter;
};

/**
 * Should be used to create full function/event name from json abi
 *
 * @method _jsonInterfaceMethodToString
 * @param {Object} json
 * @return {String} full function/event name
 */
var _jsonInterfaceMethodToString = function (json) {
    if (_.isObject(json) && json.name && json.name.indexOf('(') !== -1) {
        return json.name;
    }

    return json.name + '(' + _flattenTypes(false, json.inputs).join(',') + ')';
};


/**
 * Should be used to flatten json abi inputs/outputs into an array of type-representing-strings
 *
 * @method _flattenTypes
 * @param {bool} includeTuple
 * @param {Object} puts
 * @return {Array} parameters as strings
 */
var _flattenTypes = function(includeTuple, puts)
{
    // console.log("entered _flattenTypes. inputs/outputs: " + puts)
    var types = [];

    puts.forEach(function(param) {
        if (typeof param.components === 'object') {
            if (param.type.substring(0, 5) !== 'tuple') {
                throw new Error('components found but type is not tuple; report on GitHub');
            }
            var suffix = '';
            var arrayBracket = param.type.indexOf('[');
            if (arrayBracket >= 0) { suffix = param.type.substring(arrayBracket); }
            var result = _flattenTypes(includeTuple, param.components);
            // console.log("result should have things: " + result)
            if(_.isArray(result) && includeTuple) {
                // console.log("include tuple word, and its an array. joining...: " + result.types)
                types.push('tuple(' + result.join(',') + ')' + suffix);
            }
            else if(!includeTuple) {
                // console.log("don't include tuple, but its an array. joining...: " + result)
                types.push('(' + result.join(',') + ')' + suffix);
            }
            else {
                // console.log("its a single type within a tuple: " + result.types)
                types.push('(' + result + ')');
            }
        } else {
            // console.log("its a type and not directly in a tuple: " + param.type)
            types.push(param.type);
        }
    });

    return types;
};


/**
 * Returns a random hex string by the given bytes size
 *
 * @param {Number} size
 * @returns {string}
 */
var randomHex = function(size) {
    return '0x' + randombytes(size).toString('hex');
};

/**
 * Should be called to get ascii from it's hex representation
 *
 * @method hexToAscii
 * @param {String} hex
 * @returns {String} ascii string representation of hex value
 */
var hexToAscii = function(hex) {
    if (!utils.isHexStrict(hex))
        throw new Error('The parameter must be a valid HEX string.');

    var str = "";
    var i = 0, l = hex.length;
    if (hex.substring(0, 2) === '0x') {
        i = 2;
    }
    for (; i < l; i+=2) {
        var code = parseInt(hex.substr(i, 2), 16);
        str += String.fromCharCode(code);
    }

    return str;
};

/**
 * Should be called to get hex representation (prefixed by 0x) of ascii string
 *
 * @method asciiToHex
 * @param {String} str
 * @returns {String} hex representation of input string
 */
var asciiToHex = function(str) {
    if(!str)
        return "0x00";
    var hex = "";
    for(var i = 0; i < str.length; i++) {
        var code = str.charCodeAt(i);
        var n = code.toString(16);
        hex += n.length < 2 ? '0' + n : n;
    }

    return "0x" + hex;
};



/**
 * Returns value of unit in Wei
 *
 * @method getUnitValue
 * @param {String} unit the unit to convert to, default ether
 * @returns {BN} value of the unit (in Wei)
 * @throws error if the unit is not correct:w
 */
var getUnitValue = function (unit) {
    unit = unit ? unit.toLowerCase() : 'ether';
    if (!ethjsUnit.unitMap[unit]) {
        throw new Error('This unit "'+ unit +'" doesn\'t exist, please use the one of the following units' + JSON.stringify(ethjsUnit.unitMap, null, 2));
    }
    return unit;
};

/**
 * Takes a number of wei and converts it to any other ether unit.
 *
 * Possible units are:
 *   SI Short   SI Full        Effigy       Other
 * - kwei       femtoether     babbage
 * - mwei       picoether      lovelace
 * - gwei       nanoether      shannon      nano
 * - --         microether     szabo        micro
 * - --         milliether     finney       milli
 * - ether      --             --
 * - kether                    --           grand
 * - mether
 * - gether
 * - tether
 *
 * @method fromWei
 * @param {Number|String} number can be a number, number string or a HEX of a decimal
 * @param {String} unit the unit to convert to, default ether
 * @return {String|Object} When given a BN object it returns one as well, otherwise a number
 */
var fromWei = function(number, unit) {
    unit = getUnitValue(unit);

    if(!utils.isBN(number) && !_.isString(number)) {
        throw new Error('Please pass numbers as strings or BN objects to avoid precision errors.');
    }

    return utils.isBN(number) ? ethjsUnit.fromWei(number, unit) : ethjsUnit.fromWei(number, unit).toString(10);
};

/**
 * Takes a number of a unit and converts it to wei.
 *
 * Possible units are:
 *   SI Short   SI Full        Effigy       Other
 * - kwei       femtoether     babbage
 * - mwei       picoether      lovelace
 * - gwei       nanoether      shannon      nano
 * - --         microether     szabo        micro
 * - --         microether     szabo        micro
 * - --         milliether     finney       milli
 * - ether      --             --
 * - kether                    --           grand
 * - mether
 * - gether
 * - tether
 *
 * @method toWei
 * @param {Number|String|BN} number can be a number, number string or a HEX of a decimal
 * @param {String} unit the unit to convert from, default ether
 * @return {String|Object} When given a BN object it returns one as well, otherwise a number
 */
var toWei = function(number, unit) {
    unit = getUnitValue(unit);

    if(!utils.isBN(number) && !_.isString(number)) {
        throw new Error('Please pass numbers as strings or BN objects to avoid precision errors.');
    }

    return utils.isBN(number) ? ethjsUnit.toWei(number, unit) : ethjsUnit.toWei(number, unit).toString(10);
};




/**
 * Converts to a checksum address
 *
 * @method toChecksumAddress
 * @param {String} address the given HEX address
 * @return {String}
 */
var toChecksumAddress = function (address) {
    if (typeof address === 'undefined') return '';

    if(!/^(0x)?[0-9a-f]{40}$/i.test(address))
        throw new Error('Given address "'+ address +'" is not a valid Ethereum address.');



    address = address.toLowerCase().replace(/^0x/i,'');
    var addressHash = utils.sha3(address).replace(/^0x/i,'');
    var checksumAddress = '0x';

    for (var i = 0; i < address.length; i++ ) {
        // If ith character is 9 to f then make it uppercase
        if (parseInt(addressHash[i], 16) > 7) {
            checksumAddress += address[i].toUpperCase();
        } else {
            checksumAddress += address[i];
        }
    }
    return checksumAddress;
};

module.exports = {
    _fireError: _fireError,
    _jsonInterfaceMethodToString: _jsonInterfaceMethodToString,
    _flattenTypes: _flattenTypes,
    // extractDisplayName: extractDisplayName,
    // extractTypeName: extractTypeName,
    randomHex: randomHex,
    _: _,
    BN: utils.BN,
    isBN: utils.isBN,
    isBigNumber: utils.isBigNumber,
    isHex: utils.isHex,
    isHexStrict: utils.isHexStrict,
    sha3: utils.sha3,
    sha3Raw: utils.sha3Raw,
    keccak256: utils.sha3,
    soliditySha3: soliditySha3.soliditySha3,
    soliditySha3Raw: soliditySha3.soliditySha3Raw,
    isAddress: utils.isAddress,
    checkAddressChecksum: utils.checkAddressChecksum,
    toChecksumAddress: toChecksumAddress,
    toHex: utils.toHex,
    toBN: utils.toBN,

    bytesToHex: utils.bytesToHex,
    hexToBytes: utils.hexToBytes,

    hexToNumberString: utils.hexToNumberString,

    hexToNumber: utils.hexToNumber,
    toDecimal: utils.hexToNumber, // alias

    numberToHex: utils.numberToHex,
    fromDecimal: utils.numberToHex, // alias

    hexToUtf8: utils.hexToUtf8,
    hexToString: utils.hexToUtf8,
    toUtf8: utils.hexToUtf8,

    utf8ToHex: utils.utf8ToHex,
    stringToHex: utils.utf8ToHex,
    fromUtf8: utils.utf8ToHex,

    hexToAscii: hexToAscii,
    toAscii: hexToAscii,
    asciiToHex: asciiToHex,
    fromAscii: asciiToHex,

    unitMap: ethjsUnit.unitMap,
    toWei: toWei,
    fromWei: fromWei,

    padLeft: utils.leftPad,
    leftPad: utils.leftPad,
    padRight: utils.rightPad,
    rightPad: utils.rightPad,
    toTwosComplement: utils.toTwosComplement,

    isBloom: utils.isBloom,
    isUserEthereumAddressInBloom: utils.isUserEthereumAddressInBloom,
    isContractAddressInBloom: utils.isContractAddressInBloom,
    isTopic: utils.isTopic,
    isTopicInBloom: utils.isTopicInBloom,
    isInBloom: utils.isInBloom
};


/***/ }),

/***/ 153127:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file soliditySha3.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */

var _ = __webpack_require__(513469);
var BN = __webpack_require__(213550);
var utils = __webpack_require__(903163);


var _elementaryName = function (name) {
    /*jshint maxcomplexity:false */

    if (name.startsWith('int[')) {
        return 'int256' + name.slice(3);
    } else if (name === 'int') {
        return 'int256';
    } else if (name.startsWith('uint[')) {
        return 'uint256' + name.slice(4);
    } else if (name === 'uint') {
        return 'uint256';
    } else if (name.startsWith('fixed[')) {
        return 'fixed128x128' + name.slice(5);
    } else if (name === 'fixed') {
        return 'fixed128x128';
    } else if (name.startsWith('ufixed[')) {
        return 'ufixed128x128' + name.slice(6);
    } else if (name === 'ufixed') {
        return 'ufixed128x128';
    }
    return name;
};

// Parse N from type<N>
var _parseTypeN = function (type) {
    var typesize = /^\D+(\d+).*$/.exec(type);
    return typesize ? parseInt(typesize[1], 10) : null;
};

// Parse N from type[<N>]
var _parseTypeNArray = function (type) {
    var arraySize = /^\D+\d*\[(\d+)\]$/.exec(type);
    return arraySize ? parseInt(arraySize[1], 10) : null;
};

var _parseNumber = function (arg) {
    var type = typeof arg;
    if (type === 'string') {
        if (utils.isHexStrict(arg)) {
            return new BN(arg.replace(/0x/i,''), 16);
        } else {
            return new BN(arg, 10);
        }
    } else if (type === 'number') {
        return new BN(arg);
    } else if (utils.isBigNumber(arg)) {
        return new BN(arg.toString(10));
    } else if (utils.isBN(arg)) {
        return arg;
    } else {
        throw new Error(arg +' is not a number');
    }
};

var _solidityPack = function (type, value, arraySize) {
    /*jshint maxcomplexity:false */

    var size, num;
    type = _elementaryName(type);


    if (type === 'bytes') {

        if (value.replace(/^0x/i,'').length % 2 !== 0) {
            throw new Error('Invalid bytes characters '+ value.length);
        }

        return value;
    } else if (type === 'string') {
        return utils.utf8ToHex(value);
    } else if (type === 'bool') {
        return value ? '01' : '00';
    } else if (type.startsWith('address')) {
        if(arraySize) {
            size = 64;
        } else {
            size = 40;
        }

        if(!utils.isAddress(value)) {
            throw new Error(value +' is not a valid address, or the checksum is invalid.');
        }

        return utils.leftPad(value.toLowerCase(), size);
    }

    size = _parseTypeN(type);

    if (type.startsWith('bytes')) {

        if(!size) {
            throw new Error('bytes[] not yet supported in solidity');
        }

        // must be 32 byte slices when in an array
        if(arraySize) {
            size = 32;
        }

        if (size < 1 || size > 32 || size < value.replace(/^0x/i,'').length / 2 ) {
            throw new Error('Invalid bytes' + size +' for '+ value);
        }

        return utils.rightPad(value, size * 2);
    } else if (type.startsWith('uint')) {

        if ((size % 8) || (size < 8) || (size > 256)) {
            throw new Error('Invalid uint'+size+' size');
        }

        num = _parseNumber(value);
        if (num.bitLength() > size) {
            throw new Error('Supplied uint exceeds width: ' + size + ' vs ' + num.bitLength());
        }

        if(num.lt(new BN(0))) {
            throw new Error('Supplied uint '+ num.toString() +' is negative');
        }

        return size ? utils.leftPad(num.toString('hex'), size/8 * 2) : num;
    } else if (type.startsWith('int')) {

        if ((size % 8) || (size < 8) || (size > 256)) {
            throw new Error('Invalid int'+size+' size');
        }

        num = _parseNumber(value);
        if (num.bitLength() > size) {
            throw new Error('Supplied int exceeds width: ' + size + ' vs ' + num.bitLength());
        }

        if(num.lt(new BN(0))) {
            return num.toTwos(size).toString('hex');
        } else {
            return size ? utils.leftPad(num.toString('hex'), size/8 * 2) : num;
        }

    } else {
        // FIXME: support all other types
        throw new Error('Unsupported or invalid type: ' + type);
    }
};


var _processSoliditySha3Args = function (arg) {
    /*jshint maxcomplexity:false */

    if(_.isArray(arg)) {
        throw new Error('Autodetection of array types is not supported.');
    }

    var type, value = '';
    var hexArg, arraySize;

    // if type is given
    if (_.isObject(arg) && (arg.hasOwnProperty('v') || arg.hasOwnProperty('t') || arg.hasOwnProperty('value') || arg.hasOwnProperty('type'))) {
        type = arg.hasOwnProperty('t') ? arg.t : arg.type;
        value = arg.hasOwnProperty('v') ? arg.v : arg.value;

    // otherwise try to guess the type
    } else {

        type = utils.toHex(arg, true);
        value = utils.toHex(arg);

        if (!type.startsWith('int') && !type.startsWith('uint')) {
            type = 'bytes';
        }
    }

    if ((type.startsWith('int') || type.startsWith('uint')) &&  typeof value === 'string' && !/^(-)?0x/i.test(value)) {
        value = new BN(value);
    }

    // get the array size
    if(_.isArray(value)) {
        arraySize = _parseTypeNArray(type);
        if(arraySize && value.length !== arraySize) {
            throw new Error(type +' is not matching the given array '+ JSON.stringify(value));
        } else {
            arraySize = value.length;
        }
    }


    if (_.isArray(value)) {
        hexArg = value.map(function (val) {
            return _solidityPack(type, val, arraySize).toString('hex').replace('0x','');
        });
        return hexArg.join('');
    } else {
        hexArg = _solidityPack(type, value, arraySize);
        return hexArg.toString('hex').replace('0x','');
    }

};

/**
 * Hashes solidity values to a sha3 hash using keccak 256
 *
 * @method soliditySha3
 * @return {Object} the sha3
 */
var soliditySha3 = function () {
    /*jshint maxcomplexity:false */

    var args = Array.prototype.slice.call(arguments);

    var hexArgs = _.map(args, _processSoliditySha3Args);

    // console.log(args, hexArgs);
    // console.log('0x'+ hexArgs.join(''));

    return utils.sha3('0x'+ hexArgs.join(''));
};

/**
 * Hashes solidity values to a sha3 hash using keccak 256 but does return the hash of value `null` instead of `null`
 *
 * @method soliditySha3Raw
 * @return {Object} the sha3
 */
var soliditySha3Raw = function () {
    return utils.sha3Raw('0x'+ _.map(Array.prototype.slice.call(arguments), _processSoliditySha3Args).join(''));
};


module.exports = {
    soliditySha3: soliditySha3,
    soliditySha3Raw: soliditySha3Raw
};


/***/ }),

/***/ 903163:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*
 This file is part of web3.js.

 web3.js is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 web3.js is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * @file utils.js
 * @author Fabian Vogelsteller <fabian@ethereum.org>
 * @date 2017
 */

var _ = __webpack_require__(513469);
var BN = __webpack_require__(213550);
var numberToBN = __webpack_require__(383206);
var utf8 = __webpack_require__(957458);
var Hash = __webpack_require__(701538);
var ethereumBloomFilters = __webpack_require__(746877);



/**
 * Returns true if object is BN, otherwise false
 *
 * @method isBN
 * @param {Object} object
 * @return {Boolean}
 */
var isBN = function (object) {
    return BN.isBN(object);
};

/**
 * Returns true if object is BigNumber, otherwise false
 *
 * @method isBigNumber
 * @param {Object} object
 * @return {Boolean}
 */
var isBigNumber = function (object) {
    return object && object.constructor && object.constructor.name === 'BigNumber';
};

/**
 * Takes an input and transforms it into an BN
 *
 * @method toBN
 * @param {Number|String|BN} number, string, HEX string or BN
 * @return {BN} BN
 */
var toBN = function(number){
    try {
        return numberToBN.apply(null, arguments);
    } catch(e) {
        throw new Error(e + ' Given value: "'+ number +'"');
    }
};


/**
 * Takes and input transforms it into BN and if it is negative value, into two's complement
 *
 * @method toTwosComplement
 * @param {Number|String|BN} number
 * @return {String}
 */
var toTwosComplement = function (number) {
    return '0x'+ toBN(number).toTwos(256).toString(16, 64);
};

/**
 * Checks if the given string is an address
 *
 * @method isAddress
 * @param {String} address the given HEX address
 * @return {Boolean}
 */
var isAddress = function (address) {
    // check if it has the basic requirements of an address
    if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) {
        return false;
        // If it's ALL lowercase or ALL upppercase
    } else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) {
        return true;
        // Otherwise check each case
    } else {
        return checkAddressChecksum(address);
    }
};



/**
 * Checks if the given string is a checksummed address
 *
 * @method checkAddressChecksum
 * @param {String} address the given HEX address
 * @return {Boolean}
 */
var checkAddressChecksum = function (address) {
    // Check each case
    address = address.replace(/^0x/i,'');
    var addressHash = sha3(address.toLowerCase()).replace(/^0x/i,'');

    for (var i = 0; i < 40; i++ ) {
        // the nth letter should be uppercase if the nth digit of casemap is 1
        if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) || (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {
            return false;
        }
    }
    return true;
};

/**
 * Should be called to pad string to expected length
 *
 * @method leftPad
 * @param {String} string to be padded
 * @param {Number} chars that result string should have
 * @param {String} sign, by default 0
 * @returns {String} right aligned string
 */
var leftPad = function (string, chars, sign) {
    var hasPrefix = /^0x/i.test(string) || typeof string === 'number';
    string = string.toString(16).replace(/^0x/i,'');

    var padding = (chars - string.length + 1 >= 0) ? chars - string.length + 1 : 0;

    return (hasPrefix ? '0x' : '') + new Array(padding).join(sign ? sign : "0") + string;
};

/**
 * Should be called to pad string to expected length
 *
 * @method rightPad
 * @param {String} string to be padded
 * @param {Number} chars that result string should have
 * @param {String} sign, by default 0
 * @returns {String} right aligned string
 */
var rightPad = function (string, chars, sign) {
    var hasPrefix = /^0x/i.test(string) || typeof string === 'number';
    string = string.toString(16).replace(/^0x/i,'');

    var padding = (chars - string.length + 1 >= 0) ? chars - string.length + 1 : 0;

    return (hasPrefix ? '0x' : '') + string + (new Array(padding).join(sign ? sign : "0"));
};


/**
 * Should be called to get hex representation (prefixed by 0x) of utf8 string
 *
 * @method utf8ToHex
 * @param {String} str
 * @returns {String} hex representation of input string
 */
var utf8ToHex = function(str) {
    str = utf8.encode(str);
    var hex = "";

    // remove \u0000 padding from either side
    str = str.replace(/^(?:\u0000)*/,'');
    str = str.split("").reverse().join("");
    str = str.replace(/^(?:\u0000)*/,'');
    str = str.split("").reverse().join("");

    for(var i = 0; i < str.length; i++) {
        var code = str.charCodeAt(i);
        // if (code !== 0) {
        var n = code.toString(16);
        hex += n.length < 2 ? '0' + n : n;
        // }
    }

    return "0x" + hex;
};

/**
 * Should be called to get utf8 from it's hex representation
 *
 * @method hexToUtf8
 * @param {String} hex
 * @returns {String} ascii string representation of hex value
 */
var hexToUtf8 = function(hex) {
    if (!isHexStrict(hex))
        throw new Error('The parameter "'+ hex +'" must be a valid HEX string.');

    var str = "";
    var code = 0;
    hex = hex.replace(/^0x/i,'');

    // remove 00 padding from either side
    hex = hex.replace(/^(?:00)*/,'');
    hex = hex.split("").reverse().join("");
    hex = hex.replace(/^(?:00)*/,'');
    hex = hex.split("").reverse().join("");

    var l = hex.length;

    for (var i=0; i < l; i+=2) {
        code = parseInt(hex.substr(i, 2), 16);
        // if (code !== 0) {
        str += String.fromCharCode(code);
        // }
    }

    return utf8.decode(str);
};


/**
 * Converts value to it's number representation
 *
 * @method hexToNumber
 * @param {String|Number|BN} value
 * @return {String}
 */
var hexToNumber = function (value) {
    if (!value) {
        return value;
    }

    if (_.isString(value) && !isHexStrict(value)) {
        throw new Error('Given value "'+value+'" is not a valid hex string.');
    }

    return toBN(value).toNumber();
};

/**
 * Converts value to it's decimal representation in string
 *
 * @method hexToNumberString
 * @param {String|Number|BN} value
 * @return {String}
 */
var hexToNumberString = function (value) {
    if (!value) return value;

    if (_.isString(value) && !isHexStrict(value)) {
        throw new Error('Given value "'+value+'" is not a valid hex string.');
    }

    return toBN(value).toString(10);
};


/**
 * Converts value to it's hex representation
 *
 * @method numberToHex
 * @param {String|Number|BN} value
 * @return {String}
 */
var numberToHex = function (value) {
    if (_.isNull(value) || _.isUndefined(value)) {
        return value;
    }

    if (!isFinite(value) && !isHexStrict(value)) {
        throw new Error('Given input "'+value+'" is not a number.');
    }

    var number = toBN(value);
    var result = number.toString(16);

    return number.lt(new BN(0)) ? '-0x' + result.substr(1) : '0x' + result;
};


/**
 * Convert a byte array to a hex string
 *
 * Note: Implementation from crypto-js
 *
 * @method bytesToHex
 * @param {Array} bytes
 * @return {String} the hex string
 */
var bytesToHex = function(bytes) {
    for (var hex = [], i = 0; i < bytes.length; i++) {
        /* jshint ignore:start */
        hex.push((bytes[i] >>> 4).toString(16));
        hex.push((bytes[i] & 0xF).toString(16));
        /* jshint ignore:end */
    }
    return '0x'+ hex.join("");
};

/**
 * Convert a hex string to a byte array
 *
 * Note: Implementation from crypto-js
 *
 * @method hexToBytes
 * @param {string} hex
 * @return {Array} the byte array
 */
var hexToBytes = function(hex) {
    hex = hex.toString(16);

    if (!isHexStrict(hex)) {
        throw new Error('Given value "'+ hex +'" is not a valid hex string.');
    }

    hex = hex.replace(/^0x/i,'');

    for (var bytes = [], c = 0; c < hex.length; c += 2)
        bytes.push(parseInt(hex.substr(c, 2), 16));
    return bytes;
};

/**
 * Auto converts any given value into it's hex representation.
 *
 * And even stringifys objects before.
 *
 * @method toHex
 * @param {String|Number|BN|Object|Buffer} value
 * @param {Boolean} returnType
 * @return {String}
 */
var toHex = function (value, returnType) {
    /*jshint maxcomplexity: false */

    if (isAddress(value)) {
        return returnType ? 'address' : '0x'+ value.toLowerCase().replace(/^0x/i,'');
    }

    if (_.isBoolean(value)) {
        return returnType ? 'bool' : value ? '0x01' : '0x00';
    }

    if (Buffer.isBuffer(value)) {
        return '0x' + value.toString('hex');
    }

    if (_.isObject(value) && !isBigNumber(value) && !isBN(value)) {
        return returnType ? 'string' : utf8ToHex(JSON.stringify(value));
    }

    // if its a negative number, pass it through numberToHex
    if (_.isString(value)) {
        if (value.indexOf('-0x') === 0 || value.indexOf('-0X') === 0) {
            return returnType ? 'int256' : numberToHex(value);
        } else if(value.indexOf('0x') === 0 || value.indexOf('0X') === 0) {
            return returnType ? 'bytes' : value;
        } else if (!isFinite(value)) {
            return returnType ? 'string' : utf8ToHex(value);
        }
    }

    return returnType ? (value < 0 ? 'int256' : 'uint256') : numberToHex(value);
};


/**
 * Check if string is HEX, requires a 0x in front
 *
 * @method isHexStrict
 * @param {String} hex to be checked
 * @returns {Boolean}
 */
var isHexStrict = function (hex) {
    return ((_.isString(hex) || _.isNumber(hex)) && /^(-)?0x[0-9a-f]*$/i.test(hex));
};

/**
 * Check if string is HEX
 *
 * @method isHex
 * @param {String} hex to be checked
 * @returns {Boolean}
 */
var isHex = function (hex) {
    return ((_.isString(hex) || _.isNumber(hex)) && /^(-0x|0x)?[0-9a-f]*$/i.test(hex));
};


/**
 * Returns true if given string is a valid Ethereum block header bloom.
 *
 * @method isBloom
 * @param {String} bloom encoded bloom filter
 * @return {Boolean}
 */
var isBloom = function (bloom) {
    return ethereumBloomFilters.isBloom(bloom);
};

/**
 * Returns true if the ethereum users address is part of the given bloom
 * note: false positives are possible.
 *
 * @method isUserEthereumAddressInBloom
 * @param {String} ethereumAddress encoded bloom filter
 * @param {String} bloom ethereum addresss
 * @return {Boolean}
 */
var isUserEthereumAddressInBloom = function (bloom, ethereumAddress) {
    return ethereumBloomFilters.isUserEthereumAddressInBloom(bloom, ethereumAddress);
};

/**
 * Returns true if the contract address is part of the given bloom
 * note: false positives are possible.
 *
 * @method isUserEthereumAddressInBloom
 * @param {String} bloom encoded bloom filter
 * @param {String} contractAddress contract addresss
 * @return {Boolean}
 */
var isContractAddressInBloom = function (bloom, contractAddress) {
    return ethereumBloomFilters.isContractAddressInBloom(bloom, contractAddress);
};

/**
 * Returns true if given string is a valid log topic.
 *
 * @method isTopic
 * @param {String} topic encoded topic
 * @return {Boolean}
 */
var isTopic = function (topic) {
    return ethereumBloomFilters.isTopic(topic);
};

/**
 * Returns true if the topic is part of the given bloom
 * note: false positives are possible.
 *
 * @method isTopicInBloom
 * @param {String} bloom encoded bloom filter
 * @param {String} topic encoded topic
 * @return {Boolean}
 */
var isTopicInBloom = function (bloom, topic) {
    return ethereumBloomFilters.isTopicInBloom(bloom, topic);
};

/**
 * Returns true if the value is part of the given bloom
 * note: false positives are possible.
 *
 * @method isInBloom
 * @param {String} bloom encoded bloom filter
 * @param {String | Uint8Array} topic encoded value
 * @return {Boolean}
 */
var isInBloom = function (bloom, topic) {
    return ethereumBloomFilters.isInBloom(bloom, topic);
};

/**
 * Hashes values to a sha3 hash using keccak 256
 *
 * To hash a HEX string the hex must have 0x in front.
 *
 * @method sha3
 * @return {String} the sha3 string
 */
var SHA3_NULL_S = '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470';

var sha3 = function (value) {
    if (isBN(value)) {
        value = value.toString();
    }

    if (isHexStrict(value) && /^0x/i.test((value).toString())) {
        value = hexToBytes(value);
    }

    var returnValue = Hash.keccak256(value); // jshint ignore:line

    if(returnValue === SHA3_NULL_S) {
        return null;
    } else {
        return returnValue;
    }
};
// expose the under the hood keccak256
sha3._Hash = Hash;

/**
 * @method sha3Raw
 *
 * @param value
 *
 * @returns {string}
 */
var sha3Raw = function(value) {
    value = sha3(value);

    if (value === null) {
        return SHA3_NULL_S;
    }

    return value;
};


module.exports = {
    BN: BN,
    isBN: isBN,
    isBigNumber: isBigNumber,
    toBN: toBN,
    isAddress: isAddress,
    isBloom: isBloom,
    isUserEthereumAddressInBloom: isUserEthereumAddressInBloom,
    isContractAddressInBloom: isContractAddressInBloom,
    isTopic: isTopic,
    isTopicInBloom: isTopicInBloom,
    isInBloom: isInBloom,
    checkAddressChecksum: checkAddressChecksum,
    utf8ToHex: utf8ToHex,
    hexToUtf8: hexToUtf8,
    hexToNumber: hexToNumber,
    hexToNumberString: hexToNumberString,
    numberToHex: numberToHex,
    toHex: toHex,
    hexToBytes: hexToBytes,
    bytesToHex: bytesToHex,
    isHex: isHex,
    isHexStrict: isHexStrict,
    leftPad: leftPad,
    rightPad: rightPad,
    toTwosComplement: toTwosComplement,
    sha3: sha3,
    sha3Raw: sha3Raw
};


/***/ }),

/***/ 579726:
/***/ ((module) => {

"use strict";
module.exports = {"i8":"1.2.11"};

/***/ }),

/***/ 230812:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*
    This file is part of web3.js.

    web3.js is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    web3.js is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with web3.js.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * @file index.js
 * @authors:
 *   Fabian Vogelsteller <fabian@ethereum.org>
 *   Gav Wood <gav@parity.io>
 *   Jeffrey Wilcke <jeffrey.wilcke@ethereum.org>
 *   Marek Kotewicz <marek@parity.io>
 *   Marian Oancea <marian@ethereum.org>
 * @date 2017
 */




var version = __webpack_require__(579726)/* .version */ .i8;
var core = __webpack_require__(751931);
var Eth = __webpack_require__(656841);
var Net = __webpack_require__(264717);
var Personal = __webpack_require__(621940);
var Shh = __webpack_require__(718816);
var Bzz = __webpack_require__(836695);
var utils = __webpack_require__(328700);

var Web3 = function Web3() {
    var _this = this;

    // sets _requestmanager etc
    core.packageInit(this, arguments);

    this.version = version;
    this.utils = utils;

    this.eth = new Eth(this);
    this.shh = new Shh(this);
    this.bzz = new Bzz(this);

    // overwrite package setProvider
    var setProvider = this.setProvider;
    this.setProvider = function (provider, net) {
        setProvider.apply(_this, arguments);

        _this.eth.setRequestManager(_this._requestManager);
        _this.shh.setRequestManager(_this._requestManager);
        _this.bzz.setProvider(provider);

        return true;
    };
};

Web3.version = version;
Web3.utils = utils;
Web3.modules = {
    Eth: Eth,
    Net: Net,
    Personal: Personal,
    Shh: Shh,
    Bzz: Bzz
};

core.addProviders(Web3);

module.exports = Web3;



/***/ }),

/***/ 138642:
/***/ ((module) => {

"use strict";
module.exports = JSON.parse("{\"name\":\"ganache-core\",\"version\":\"2.13.0\",\"main\":\"./index.js\",\"types\":\"./typings/index.d.ts\",\"engines\":{\"node\":\">=8.9.0\"},\"directories\":{\"lib\":\"./lib\"},\"scripts\":{\"_mocha\":\"mocha --check-leaks --recursive\",\"nyc_mocha\":\"nyc npm run _mocha\",\"_lint\":\"eslint --ignore-path .gitignore .\",\"build\":\"webpack-cli --config ./webpack/node/core.webpack.config.js\",\"build-web\":\"webpack-cli --config ./webpack/web-experimental/core.webpack.config.js\",\"format\":\"prettier --write \\\"{lib,perf,test}/**/*.js\\\" && eslint --fix --ignore-path .gitignore .\",\"prepare\":\"patch-package\",\"prepublishOnly\":\"npm run test && npm run build && npm run test-build && npm prune --production && mv npm-shrinkwrap.json npm-shrinkwrap.json.bak && npm shrinkwrap\",\"postpublish\":\"rm npm-shrinkwrap.json && mv npm-shrinkwrap.json.bak npm-shrinkwrap.json && npm ci\",\"test\":\"npm run _lint && npm run nyc_mocha ./test/local\",\"test-smoke\":\"npm run _mocha ./test/smoke\",\"test-build\":\"cross-env TEST_BUILD=node npm run _mocha\",\"test-web-experimental\":\"cross-env TEST_BUILD=web-experimental npm run _mocha\",\"coverage\":\"nyc report --reporter=text-lcov | coveralls\"},\"bundleDependencies\":[\"keccak\"],\"dependencies\":{\"abstract-leveldown\":\"3.0.0\",\"async\":\"2.6.2\",\"bip39\":\"2.5.0\",\"cachedown\":\"1.0.0\",\"clone\":\"2.1.2\",\"debug\":\"3.2.6\",\"encoding-down\":\"5.0.4\",\"eth-sig-util\":\"2.3.0\",\"ethereumjs-abi\":\"0.6.7\",\"ethereumjs-account\":\"3.0.0\",\"ethereumjs-block\":\"2.2.2\",\"ethereumjs-common\":\"1.5.0\",\"ethereumjs-tx\":\"2.1.2\",\"ethereumjs-util\":\"6.2.1\",\"ethereumjs-vm\":\"4.2.0\",\"ethereumjs-wallet\":\"0.6.5\",\"heap\":\"0.2.6\",\"keccak\":\"3.0.1\",\"level-sublevel\":\"6.6.4\",\"levelup\":\"3.1.1\",\"lodash\":\"4.17.20\",\"lru-cache\":\"5.1.1\",\"merkle-patricia-tree\":\"3.0.0\",\"patch-package\":\"6.2.2\",\"seedrandom\":\"3.0.1\",\"source-map-support\":\"0.5.12\",\"tmp\":\"0.1.0\",\"web3\":\"1.2.11\",\"web3-provider-engine\":\"14.2.1\",\"websocket\":\"1.0.32\"},\"devDependencies\":{\"@types/web3\":\"^1.0.19\",\"assert-match\":\"^1.1.1\",\"browserfs\":\"1.4.3\",\"coveralls\":\"^3.0.9\",\"cross-env\":\"6.0.3\",\"eslint\":\"6.8.0\",\"eslint-config-standard\":\"14.1.0\",\"eslint-plugin-import\":\"2.20.0\",\"eslint-plugin-node\":\"11.0.0\",\"eslint-plugin-promise\":\"4.2.1\",\"eslint-plugin-standard\":\"4.0.1\",\"ethereumjs-wallet\":\"0.6.5\",\"ethers\":\"4.0.48\",\"husky\":\"4.0.10\",\"js-scrypt\":\"0.2.0\",\"lint-staged\":\"10.0.0\",\"memdown\":\"5.1.0\",\"mocha\":\"7.2.0\",\"mocha-lcov-reporter\":\"^1.3.0\",\"number-to-bn\":\"1.7.0\",\"nyc\":\"^15.1.0\",\"pify\":\"4.0.1\",\"portfinder\":\"^1.0.25\",\"prettier\":\"^1.19.1\",\"request\":\"^2.88.0\",\"semver\":\"7.1.1\",\"solc\":\"0.6.1\",\"temp\":\"0.9.1\",\"terser-webpack-plugin\":\"2.3.8\",\"web3\":\"1.2.11\",\"webpack\":\"4.41.5\",\"webpack-bundle-size-analyzer\":\"3.1.0\",\"webpack-cli\":\"3.3.10\"},\"optionalDependencies\":{\"ethereumjs-wallet\":\"0.6.5\",\"web3\":\"1.2.11\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/trufflesuite/ganache-core\"},\"license\":\"MIT\",\"husky\":{\"hooks\":{\"pre-commit\":\"lint-staged\"}},\"lint-staged\":{\"*.js\":[\"prettier --write\",\"eslint --fix --ignore-path .gitignore\",\"git add\"]},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true,\"es6\":true},\"parserOptions\":{\"ecmaVersion\":8,\"sourceType\":\"module\",\"ecmaFeatures\":{\"impliedStrict\":true}},\"extends\":\"standard\",\"rules\":{\"brace-style\":[\"error\",\"1tbs\",{\"allowSingleLine\":false}],\"curly\":[\"error\",\"all\"],\"max-len\":[\"error\",120,{\"ignoreRegExpLiterals\":true}],\"quotes\":[\"error\",\"double\"],\"semi\":[\"error\",\"always\"],\"space-before-function-paren\":[\"error\",\"never\"],\"wrap-iife\":[\"error\",\"outside\"]}},\"prettier\":{\"printWidth\":120,\"arrowParens\":\"always\"}}");

/***/ }),

/***/ 968321:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// make sourcemaps work!
__webpack_require__(977575);

const Provider = __webpack_require__(419767);
const Server = __webpack_require__(97216);

// This interface exists so as not to cause breaking changes.
module.exports = {
  server: function(options) {
    return Server.create(options);
  },
  provider: function(options) {
    return new Provider(options);
  },
  _webpacked: true
};


/***/ }),

/***/ 241405:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var origSymbol = global.Symbol;
var hasSymbolSham = __webpack_require__(455419);

module.exports = function hasNativeSymbols() {
	if (typeof origSymbol !== 'function') { return false; }
	if (typeof Symbol !== 'function') { return false; }
	if (typeof origSymbol('foo') !== 'symbol') { return false; }
	if (typeof Symbol('bar') !== 'symbol') { return false; }

	return hasSymbolSham();
};


/***/ }),

/***/ 455419:
/***/ ((module) => {

"use strict";


/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
	if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
	if (typeof Symbol.iterator === 'symbol') { return true; }

	var obj = {};
	var sym = Symbol('test');
	var symObj = Object(sym);
	if (typeof sym === 'string') { return false; }

	if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
	if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }

	// temp disabled per https://github.com/ljharb/object.assign/issues/17
	// if (sym instanceof Symbol) { return false; }
	// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
	// if (!(symObj instanceof Symbol)) { return false; }

	// if (typeof Symbol.prototype.toString !== 'function') { return false; }
	// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }

	var symVal = 42;
	obj[sym] = symVal;
	for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
	if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }

	if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }

	var syms = Object.getOwnPropertySymbols(obj);
	if (syms.length !== 1 || syms[0] !== sym) { return false; }

	if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }

	if (typeof Object.getOwnPropertyDescriptor === 'function') {
		var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
		if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
	}

	return true;
};


/***/ }),

/***/ 117642:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var bind = __webpack_require__(158612);

module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);


/***/ }),

/***/ 354485:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(122894);


/***/ }),

/***/ 122894:
/***/ (function(module, exports) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Generated by CoffeeScript 1.8.0
(function() {
  var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup;

  floor = Math.floor, min = Math.min;


  /*
  Default comparison function to be used
   */

  defaultCmp = function(x, y) {
    if (x < y) {
      return -1;
    }
    if (x > y) {
      return 1;
    }
    return 0;
  };


  /*
  Insert item x in list a, and keep it sorted assuming a is sorted.
  
  If x is already in a, insert it to the right of the rightmost x.
  
  Optional args lo (default 0) and hi (default a.length) bound the slice
  of a to be searched.
   */

  insort = function(a, x, lo, hi, cmp) {
    var mid;
    if (lo == null) {
      lo = 0;
    }
    if (cmp == null) {
      cmp = defaultCmp;
    }
    if (lo < 0) {
      throw new Error('lo must be non-negative');
    }
    if (hi == null) {
      hi = a.length;
    }
    while (lo < hi) {
      mid = floor((lo + hi) / 2);
      if (cmp(x, a[mid]) < 0) {
        hi = mid;
      } else {
        lo = mid + 1;
      }
    }
    return ([].splice.apply(a, [lo, lo - lo].concat(x)), x);
  };


  /*
  Push item onto heap, maintaining the heap invariant.
   */

  heappush = function(array, item, cmp) {
    if (cmp == null) {
      cmp = defaultCmp;
    }
    array.push(item);
    return _siftdown(array, 0, array.length - 1, cmp);
  };


  /*
  Pop the smallest item off the heap, maintaining the heap invariant.
   */

  heappop = function(array, cmp) {
    var lastelt, returnitem;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    lastelt = array.pop();
    if (array.length) {
      returnitem = array[0];
      array[0] = lastelt;
      _siftup(array, 0, cmp);
    } else {
      returnitem = lastelt;
    }
    return returnitem;
  };


  /*
  Pop and return the current smallest value, and add the new item.
  
  This is more efficient than heappop() followed by heappush(), and can be
  more appropriate when using a fixed size heap. Note that the value
  returned may be larger than item! That constrains reasonable use of
  this routine unless written as part of a conditional replacement:
      if item > array[0]
        item = heapreplace(array, item)
   */

  heapreplace = function(array, item, cmp) {
    var returnitem;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    returnitem = array[0];
    array[0] = item;
    _siftup(array, 0, cmp);
    return returnitem;
  };


  /*
  Fast version of a heappush followed by a heappop.
   */

  heappushpop = function(array, item, cmp) {
    var _ref;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    if (array.length && cmp(array[0], item) < 0) {
      _ref = [array[0], item], item = _ref[0], array[0] = _ref[1];
      _siftup(array, 0, cmp);
    }
    return item;
  };


  /*
  Transform list into a heap, in-place, in O(array.length) time.
   */

  heapify = function(array, cmp) {
    var i, _i, _j, _len, _ref, _ref1, _results, _results1;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    _ref1 = (function() {
      _results1 = [];
      for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); }
      return _results1;
    }).apply(this).reverse();
    _results = [];
    for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
      i = _ref1[_i];
      _results.push(_siftup(array, i, cmp));
    }
    return _results;
  };


  /*
  Update the position of the given item in the heap.
  This function should be called every time the item is being modified.
   */

  updateItem = function(array, item, cmp) {
    var pos;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    pos = array.indexOf(item);
    if (pos === -1) {
      return;
    }
    _siftdown(array, 0, pos, cmp);
    return _siftup(array, pos, cmp);
  };


  /*
  Find the n largest elements in a dataset.
   */

  nlargest = function(array, n, cmp) {
    var elem, result, _i, _len, _ref;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    result = array.slice(0, n);
    if (!result.length) {
      return result;
    }
    heapify(result, cmp);
    _ref = array.slice(n);
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      elem = _ref[_i];
      heappushpop(result, elem, cmp);
    }
    return result.sort(cmp).reverse();
  };


  /*
  Find the n smallest elements in a dataset.
   */

  nsmallest = function(array, n, cmp) {
    var elem, i, los, result, _i, _j, _len, _ref, _ref1, _results;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    if (n * 10 <= array.length) {
      result = array.slice(0, n).sort(cmp);
      if (!result.length) {
        return result;
      }
      los = result[result.length - 1];
      _ref = array.slice(n);
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        elem = _ref[_i];
        if (cmp(elem, los) < 0) {
          insort(result, elem, 0, null, cmp);
          result.pop();
          los = result[result.length - 1];
        }
      }
      return result;
    }
    heapify(array, cmp);
    _results = [];
    for (i = _j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
      _results.push(heappop(array, cmp));
    }
    return _results;
  };

  _siftdown = function(array, startpos, pos, cmp) {
    var newitem, parent, parentpos;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    newitem = array[pos];
    while (pos > startpos) {
      parentpos = (pos - 1) >> 1;
      parent = array[parentpos];
      if (cmp(newitem, parent) < 0) {
        array[pos] = parent;
        pos = parentpos;
        continue;
      }
      break;
    }
    return array[pos] = newitem;
  };

  _siftup = function(array, pos, cmp) {
    var childpos, endpos, newitem, rightpos, startpos;
    if (cmp == null) {
      cmp = defaultCmp;
    }
    endpos = array.length;
    startpos = pos;
    newitem = array[pos];
    childpos = 2 * pos + 1;
    while (childpos < endpos) {
      rightpos = childpos + 1;
      if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) {
        childpos = rightpos;
      }
      array[pos] = array[childpos];
      pos = childpos;
      childpos = 2 * pos + 1;
    }
    array[pos] = newitem;
    return _siftdown(array, startpos, pos, cmp);
  };

  Heap = (function() {
    Heap.push = heappush;

    Heap.pop = heappop;

    Heap.replace = heapreplace;

    Heap.pushpop = heappushpop;

    Heap.heapify = heapify;

    Heap.updateItem = updateItem;

    Heap.nlargest = nlargest;

    Heap.nsmallest = nsmallest;

    function Heap(cmp) {
      this.cmp = cmp != null ? cmp : defaultCmp;
      this.nodes = [];
    }

    Heap.prototype.push = function(x) {
      return heappush(this.nodes, x, this.cmp);
    };

    Heap.prototype.pop = function() {
      return heappop(this.nodes, this.cmp);
    };

    Heap.prototype.peek = function() {
      return this.nodes[0];
    };

    Heap.prototype.contains = function(x) {
      return this.nodes.indexOf(x) !== -1;
    };

    Heap.prototype.replace = function(x) {
      return heapreplace(this.nodes, x, this.cmp);
    };

    Heap.prototype.pushpop = function(x) {
      return heappushpop(this.nodes, x, this.cmp);
    };

    Heap.prototype.heapify = function() {
      return heapify(this.nodes, this.cmp);
    };

    Heap.prototype.updateItem = function(x) {
      return updateItem(this.nodes, x, this.cmp);
    };

    Heap.prototype.clear = function() {
      return this.nodes = [];
    };

    Heap.prototype.empty = function() {
      return this.nodes.length === 0;
    };

    Heap.prototype.size = function() {
      return this.nodes.length;
    };

    Heap.prototype.clone = function() {
      var heap;
      heap = new Heap();
      heap.nodes = this.nodes.slice(0);
      return heap;
    };

    Heap.prototype.toArray = function() {
      return this.nodes.slice(0);
    };

    Heap.prototype.insert = Heap.prototype.push;

    Heap.prototype.top = Heap.prototype.peek;

    Heap.prototype.front = Heap.prototype.peek;

    Heap.prototype.has = Heap.prototype.contains;

    Heap.prototype.copy = Heap.prototype.clone;

    return Heap;

  })();

  (function(root, factory) {
    if (true) {
      return !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
		__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
		(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
    } else {}
  })(this, function() {
    return Heap;
  });

}).call(this);


/***/ })

};
;
//# sourceMappingURL=394.bundled.js.map