ETH Price: $2,957.41 (+0.03%)

Token

ClipperDirect Pool Token (CLPRDRPL)

Overview

Max Total Supply

1,722.549400222398192351 CLPRDRPL

Holders

254

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0.100023866771898368 CLPRDRPL

Value
$0.00
0x66d9546086ae72d7cc3a0a684d0b468ba5339a2d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
ClipperPackedVerifiedExchange

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Arbiscan.io on 2022-10-19
*/

// File: @prb/math/contracts/PRBMath.sol


pragma solidity >=0.8.4;

/// @notice Emitted when the result overflows uint256.
error PRBMath__MulDivFixedPointOverflow(uint256 prod1);

/// @notice Emitted when the result overflows uint256.
error PRBMath__MulDivOverflow(uint256 prod1, uint256 denominator);

/// @notice Emitted when one of the inputs is type(int256).min.
error PRBMath__MulDivSignedInputTooSmall();

/// @notice Emitted when the intermediary absolute result overflows int256.
error PRBMath__MulDivSignedOverflow(uint256 rAbs);

/// @notice Emitted when the input is MIN_SD59x18.
error PRBMathSD59x18__AbsInputTooSmall();

/// @notice Emitted when ceiling a number overflows SD59x18.
error PRBMathSD59x18__CeilOverflow(int256 x);

/// @notice Emitted when one of the inputs is MIN_SD59x18.
error PRBMathSD59x18__DivInputTooSmall();

/// @notice Emitted when one of the intermediary unsigned results overflows SD59x18.
error PRBMathSD59x18__DivOverflow(uint256 rAbs);

/// @notice Emitted when the input is greater than 133.084258667509499441.
error PRBMathSD59x18__ExpInputTooBig(int256 x);

/// @notice Emitted when the input is greater than 192.
error PRBMathSD59x18__Exp2InputTooBig(int256 x);

/// @notice Emitted when flooring a number underflows SD59x18.
error PRBMathSD59x18__FloorUnderflow(int256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format overflows SD59x18.
error PRBMathSD59x18__FromIntOverflow(int256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format underflows SD59x18.
error PRBMathSD59x18__FromIntUnderflow(int256 x);

/// @notice Emitted when the product of the inputs is negative.
error PRBMathSD59x18__GmNegativeProduct(int256 x, int256 y);

/// @notice Emitted when multiplying the inputs overflows SD59x18.
error PRBMathSD59x18__GmOverflow(int256 x, int256 y);

/// @notice Emitted when the input is less than or equal to zero.
error PRBMathSD59x18__LogInputTooSmall(int256 x);

/// @notice Emitted when one of the inputs is MIN_SD59x18.
error PRBMathSD59x18__MulInputTooSmall();

/// @notice Emitted when the intermediary absolute result overflows SD59x18.
error PRBMathSD59x18__MulOverflow(uint256 rAbs);

/// @notice Emitted when the intermediary absolute result overflows SD59x18.
error PRBMathSD59x18__PowuOverflow(uint256 rAbs);

/// @notice Emitted when the input is negative.
error PRBMathSD59x18__SqrtNegativeInput(int256 x);

/// @notice Emitted when the calculating the square root overflows SD59x18.
error PRBMathSD59x18__SqrtOverflow(int256 x);

/// @notice Emitted when addition overflows UD60x18.
error PRBMathUD60x18__AddOverflow(uint256 x, uint256 y);

/// @notice Emitted when ceiling a number overflows UD60x18.
error PRBMathUD60x18__CeilOverflow(uint256 x);

/// @notice Emitted when the input is greater than 133.084258667509499441.
error PRBMathUD60x18__ExpInputTooBig(uint256 x);

/// @notice Emitted when the input is greater than 192.
error PRBMathUD60x18__Exp2InputTooBig(uint256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format format overflows UD60x18.
error PRBMathUD60x18__FromUintOverflow(uint256 x);

/// @notice Emitted when multiplying the inputs overflows UD60x18.
error PRBMathUD60x18__GmOverflow(uint256 x, uint256 y);

/// @notice Emitted when the input is less than 1.
error PRBMathUD60x18__LogInputTooSmall(uint256 x);

/// @notice Emitted when the calculating the square root overflows UD60x18.
error PRBMathUD60x18__SqrtOverflow(uint256 x);

/// @notice Emitted when subtraction underflows UD60x18.
error PRBMathUD60x18__SubUnderflow(uint256 x, uint256 y);

/// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library
/// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point
/// representation. When it does not, it is explicitly mentioned in the NatSpec documentation.
library PRBMath {
    /// STRUCTS ///

    struct SD59x18 {
        int256 value;
    }

    struct UD60x18 {
        uint256 value;
    }

    /// STORAGE ///

    /// @dev How many trailing decimals can be represented.
    uint256 internal constant SCALE = 1e18;

    /// @dev Largest power of two divisor of SCALE.
    uint256 internal constant SCALE_LPOTD = 262144;

    /// @dev SCALE inverted mod 2^256.
    uint256 internal constant SCALE_INVERSE =
        78156646155174841979727994598816262306175212592076161876661_508869554232690281;

    /// FUNCTIONS ///

    /// @notice Calculates the binary exponent of x using the binary fraction method.
    /// @dev Has to use 192.64-bit fixed-point numbers.
    /// See https://ethereum.stackexchange.com/a/96594/24693.
    /// @param x The exponent as an unsigned 192.64-bit fixed-point number.
    /// @return result The result as an unsigned 60.18-decimal fixed-point number.
    function exp2(uint256 x) internal pure returns (uint256 result) {
        unchecked {
            // Start from 0.5 in the 192.64-bit fixed-point format.
            result = 0x800000000000000000000000000000000000000000000000;

            // Multiply the result by root(2, 2^-i) when the bit at position i is 1. None of the intermediary results overflows
            // because the initial result is 2^191 and all magic factors are less than 2^65.
            if (x & 0x8000000000000000 > 0) {
                result = (result * 0x16A09E667F3BCC909) >> 64;
            }
            if (x & 0x4000000000000000 > 0) {
                result = (result * 0x1306FE0A31B7152DF) >> 64;
            }
            if (x & 0x2000000000000000 > 0) {
                result = (result * 0x1172B83C7D517ADCE) >> 64;
            }
            if (x & 0x1000000000000000 > 0) {
                result = (result * 0x10B5586CF9890F62A) >> 64;
            }
            if (x & 0x800000000000000 > 0) {
                result = (result * 0x1059B0D31585743AE) >> 64;
            }
            if (x & 0x400000000000000 > 0) {
                result = (result * 0x102C9A3E778060EE7) >> 64;
            }
            if (x & 0x200000000000000 > 0) {
                result = (result * 0x10163DA9FB33356D8) >> 64;
            }
            if (x & 0x100000000000000 > 0) {
                result = (result * 0x100B1AFA5ABCBED61) >> 64;
            }
            if (x & 0x80000000000000 > 0) {
                result = (result * 0x10058C86DA1C09EA2) >> 64;
            }
            if (x & 0x40000000000000 > 0) {
                result = (result * 0x1002C605E2E8CEC50) >> 64;
            }
            if (x & 0x20000000000000 > 0) {
                result = (result * 0x100162F3904051FA1) >> 64;
            }
            if (x & 0x10000000000000 > 0) {
                result = (result * 0x1000B175EFFDC76BA) >> 64;
            }
            if (x & 0x8000000000000 > 0) {
                result = (result * 0x100058BA01FB9F96D) >> 64;
            }
            if (x & 0x4000000000000 > 0) {
                result = (result * 0x10002C5CC37DA9492) >> 64;
            }
            if (x & 0x2000000000000 > 0) {
                result = (result * 0x1000162E525EE0547) >> 64;
            }
            if (x & 0x1000000000000 > 0) {
                result = (result * 0x10000B17255775C04) >> 64;
            }
            if (x & 0x800000000000 > 0) {
                result = (result * 0x1000058B91B5BC9AE) >> 64;
            }
            if (x & 0x400000000000 > 0) {
                result = (result * 0x100002C5C89D5EC6D) >> 64;
            }
            if (x & 0x200000000000 > 0) {
                result = (result * 0x10000162E43F4F831) >> 64;
            }
            if (x & 0x100000000000 > 0) {
                result = (result * 0x100000B1721BCFC9A) >> 64;
            }
            if (x & 0x80000000000 > 0) {
                result = (result * 0x10000058B90CF1E6E) >> 64;
            }
            if (x & 0x40000000000 > 0) {
                result = (result * 0x1000002C5C863B73F) >> 64;
            }
            if (x & 0x20000000000 > 0) {
                result = (result * 0x100000162E430E5A2) >> 64;
            }
            if (x & 0x10000000000 > 0) {
                result = (result * 0x1000000B172183551) >> 64;
            }
            if (x & 0x8000000000 > 0) {
                result = (result * 0x100000058B90C0B49) >> 64;
            }
            if (x & 0x4000000000 > 0) {
                result = (result * 0x10000002C5C8601CC) >> 64;
            }
            if (x & 0x2000000000 > 0) {
                result = (result * 0x1000000162E42FFF0) >> 64;
            }
            if (x & 0x1000000000 > 0) {
                result = (result * 0x10000000B17217FBB) >> 64;
            }
            if (x & 0x800000000 > 0) {
                result = (result * 0x1000000058B90BFCE) >> 64;
            }
            if (x & 0x400000000 > 0) {
                result = (result * 0x100000002C5C85FE3) >> 64;
            }
            if (x & 0x200000000 > 0) {
                result = (result * 0x10000000162E42FF1) >> 64;
            }
            if (x & 0x100000000 > 0) {
                result = (result * 0x100000000B17217F8) >> 64;
            }
            if (x & 0x80000000 > 0) {
                result = (result * 0x10000000058B90BFC) >> 64;
            }
            if (x & 0x40000000 > 0) {
                result = (result * 0x1000000002C5C85FE) >> 64;
            }
            if (x & 0x20000000 > 0) {
                result = (result * 0x100000000162E42FF) >> 64;
            }
            if (x & 0x10000000 > 0) {
                result = (result * 0x1000000000B17217F) >> 64;
            }
            if (x & 0x8000000 > 0) {
                result = (result * 0x100000000058B90C0) >> 64;
            }
            if (x & 0x4000000 > 0) {
                result = (result * 0x10000000002C5C860) >> 64;
            }
            if (x & 0x2000000 > 0) {
                result = (result * 0x1000000000162E430) >> 64;
            }
            if (x & 0x1000000 > 0) {
                result = (result * 0x10000000000B17218) >> 64;
            }
            if (x & 0x800000 > 0) {
                result = (result * 0x1000000000058B90C) >> 64;
            }
            if (x & 0x400000 > 0) {
                result = (result * 0x100000000002C5C86) >> 64;
            }
            if (x & 0x200000 > 0) {
                result = (result * 0x10000000000162E43) >> 64;
            }
            if (x & 0x100000 > 0) {
                result = (result * 0x100000000000B1721) >> 64;
            }
            if (x & 0x80000 > 0) {
                result = (result * 0x10000000000058B91) >> 64;
            }
            if (x & 0x40000 > 0) {
                result = (result * 0x1000000000002C5C8) >> 64;
            }
            if (x & 0x20000 > 0) {
                result = (result * 0x100000000000162E4) >> 64;
            }
            if (x & 0x10000 > 0) {
                result = (result * 0x1000000000000B172) >> 64;
            }
            if (x & 0x8000 > 0) {
                result = (result * 0x100000000000058B9) >> 64;
            }
            if (x & 0x4000 > 0) {
                result = (result * 0x10000000000002C5D) >> 64;
            }
            if (x & 0x2000 > 0) {
                result = (result * 0x1000000000000162E) >> 64;
            }
            if (x & 0x1000 > 0) {
                result = (result * 0x10000000000000B17) >> 64;
            }
            if (x & 0x800 > 0) {
                result = (result * 0x1000000000000058C) >> 64;
            }
            if (x & 0x400 > 0) {
                result = (result * 0x100000000000002C6) >> 64;
            }
            if (x & 0x200 > 0) {
                result = (result * 0x10000000000000163) >> 64;
            }
            if (x & 0x100 > 0) {
                result = (result * 0x100000000000000B1) >> 64;
            }
            if (x & 0x80 > 0) {
                result = (result * 0x10000000000000059) >> 64;
            }
            if (x & 0x40 > 0) {
                result = (result * 0x1000000000000002C) >> 64;
            }
            if (x & 0x20 > 0) {
                result = (result * 0x10000000000000016) >> 64;
            }
            if (x & 0x10 > 0) {
                result = (result * 0x1000000000000000B) >> 64;
            }
            if (x & 0x8 > 0) {
                result = (result * 0x10000000000000006) >> 64;
            }
            if (x & 0x4 > 0) {
                result = (result * 0x10000000000000003) >> 64;
            }
            if (x & 0x2 > 0) {
                result = (result * 0x10000000000000001) >> 64;
            }
            if (x & 0x1 > 0) {
                result = (result * 0x10000000000000001) >> 64;
            }

            // We're doing two things at the same time:
            //
            //   1. Multiply the result by 2^n + 1, where "2^n" is the integer part and the one is added to account for
            //      the fact that we initially set the result to 0.5. This is accomplished by subtracting from 191
            //      rather than 192.
            //   2. Convert the result to the unsigned 60.18-decimal fixed-point format.
            //
            // This works because 2^(191-ip) = 2^ip / 2^191, where "ip" is the integer part "2^n".
            result *= SCALE;
            result >>= (191 - (x >> 64));
        }
    }

    /// @notice Finds the zero-based index of the first one in the binary representation of x.
    /// @dev See the note on msb in the "Find First Set" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set
    /// @param x The uint256 number for which to find the index of the most significant bit.
    /// @return msb The index of the most significant bit as an uint256.
    function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) {
        if (x >= 2**128) {
            x >>= 128;
            msb += 128;
        }
        if (x >= 2**64) {
            x >>= 64;
            msb += 64;
        }
        if (x >= 2**32) {
            x >>= 32;
            msb += 32;
        }
        if (x >= 2**16) {
            x >>= 16;
            msb += 16;
        }
        if (x >= 2**8) {
            x >>= 8;
            msb += 8;
        }
        if (x >= 2**4) {
            x >>= 4;
            msb += 4;
        }
        if (x >= 2**2) {
            x >>= 2;
            msb += 2;
        }
        if (x >= 2**1) {
            // No need to shift x any more.
            msb += 1;
        }
    }

    /// @notice Calculates floor(x*y÷denominator) with full precision.
    ///
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv.
    ///
    /// Requirements:
    /// - The denominator cannot be zero.
    /// - The result must fit within uint256.
    ///
    /// Caveats:
    /// - This function does not work with fixed-point numbers.
    ///
    /// @param x The multiplicand as an uint256.
    /// @param y The multiplier as an uint256.
    /// @param denominator The divisor as an uint256.
    /// @return result The result as an uint256.
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
        // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2^256 + prod0.
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(x, y, not(0))
            prod0 := mul(x, y)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division.
        if (prod1 == 0) {
            unchecked {
                result = prod0 / denominator;
            }
            return result;
        }

        // Make sure the result is less than 2^256. Also prevents denominator == 0.
        if (prod1 >= denominator) {
            revert PRBMath__MulDivOverflow(prod1, denominator);
        }

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Make division exact by subtracting the remainder from [prod1 prod0].
        uint256 remainder;
        assembly {
            // Compute remainder using mulmod.
            remainder := mulmod(x, y, denominator)

            // Subtract 256 bit number from 512 bit number.
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
        // See https://cs.stackexchange.com/q/138556/92363.
        unchecked {
            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 lpotdod = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by lpotdod.
                denominator := div(denominator, lpotdod)

                // Divide [prod1 prod0] by lpotdod.
                prod0 := div(prod0, lpotdod)

                // Flip lpotdod such that it is 2^256 / lpotdod. If lpotdod is zero, then it becomes one.
                lpotdod := add(div(sub(0, lpotdod), lpotdod), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * lpotdod;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /// @notice Calculates floor(x*y÷1e18) with full precision.
    ///
    /// @dev Variant of "mulDiv" with constant folding, i.e. in which the denominator is always 1e18. Before returning the
    /// final result, we add 1 if (x * y) % SCALE >= HALF_SCALE. Without this, 6.6e-19 would be truncated to 0 instead of
    /// being rounded to 1e-18.  See "Listing 6" and text above it at https://accu.org/index.php/journals/1717.
    ///
    /// Requirements:
    /// - The result must fit within uint256.
    ///
    /// Caveats:
    /// - The body is purposely left uncommented; see the NatSpec comments in "PRBMath.mulDiv" to understand how this works.
    /// - It is assumed that the result can never be type(uint256).max when x and y solve the following two equations:
    ///     1. x * y = type(uint256).max * SCALE
    ///     2. (x * y) % SCALE >= SCALE / 2
    ///
    /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number.
    /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number.
    /// @return result The result as an unsigned 60.18-decimal fixed-point number.
    function mulDivFixedPoint(uint256 x, uint256 y) internal pure returns (uint256 result) {
        uint256 prod0;
        uint256 prod1;
        assembly {
            let mm := mulmod(x, y, not(0))
            prod0 := mul(x, y)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        if (prod1 >= SCALE) {
            revert PRBMath__MulDivFixedPointOverflow(prod1);
        }

        uint256 remainder;
        uint256 roundUpUnit;
        assembly {
            remainder := mulmod(x, y, SCALE)
            roundUpUnit := gt(remainder, 499999999999999999)
        }

        if (prod1 == 0) {
            unchecked {
                result = (prod0 / SCALE) + roundUpUnit;
                return result;
            }
        }

        assembly {
            result := add(
                mul(
                    or(
                        div(sub(prod0, remainder), SCALE_LPOTD),
                        mul(sub(prod1, gt(remainder, prod0)), add(div(sub(0, SCALE_LPOTD), SCALE_LPOTD), 1))
                    ),
                    SCALE_INVERSE
                ),
                roundUpUnit
            )
        }
    }

    /// @notice Calculates floor(x*y÷denominator) with full precision.
    ///
    /// @dev An extension of "mulDiv" for signed numbers. Works by computing the signs and the absolute values separately.
    ///
    /// Requirements:
    /// - None of the inputs can be type(int256).min.
    /// - The result must fit within int256.
    ///
    /// @param x The multiplicand as an int256.
    /// @param y The multiplier as an int256.
    /// @param denominator The divisor as an int256.
    /// @return result The result as an int256.
    function mulDivSigned(
        int256 x,
        int256 y,
        int256 denominator
    ) internal pure returns (int256 result) {
        if (x == type(int256).min || y == type(int256).min || denominator == type(int256).min) {
            revert PRBMath__MulDivSignedInputTooSmall();
        }

        // Get hold of the absolute values of x, y and the denominator.
        uint256 ax;
        uint256 ay;
        uint256 ad;
        unchecked {
            ax = x < 0 ? uint256(-x) : uint256(x);
            ay = y < 0 ? uint256(-y) : uint256(y);
            ad = denominator < 0 ? uint256(-denominator) : uint256(denominator);
        }

        // Compute the absolute value of (x*y)÷denominator. The result must fit within int256.
        uint256 rAbs = mulDiv(ax, ay, ad);
        if (rAbs > uint256(type(int256).max)) {
            revert PRBMath__MulDivSignedOverflow(rAbs);
        }

        // Get the signs of x, y and the denominator.
        uint256 sx;
        uint256 sy;
        uint256 sd;
        assembly {
            sx := sgt(x, sub(0, 1))
            sy := sgt(y, sub(0, 1))
            sd := sgt(denominator, sub(0, 1))
        }

        // XOR over sx, sy and sd. This is checking whether there are one or three negative signs in the inputs.
        // If yes, the result should be negative.
        result = sx ^ sy ^ sd == 0 ? -int256(rAbs) : int256(rAbs);
    }

    /// @notice Calculates the square root of x, rounding down.
    /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method.
    ///
    /// Caveats:
    /// - This function does not work with fixed-point numbers.
    ///
    /// @param x The uint256 number for which to calculate the square root.
    /// @return result The result as an uint256.
    function sqrt(uint256 x) internal pure returns (uint256 result) {
        if (x == 0) {
            return 0;
        }

        // Set the initial guess to the least power of two that is greater than or equal to sqrt(x).
        uint256 xAux = uint256(x);
        result = 1;
        if (xAux >= 0x100000000000000000000000000000000) {
            xAux >>= 128;
            result <<= 64;
        }
        if (xAux >= 0x10000000000000000) {
            xAux >>= 64;
            result <<= 32;
        }
        if (xAux >= 0x100000000) {
            xAux >>= 32;
            result <<= 16;
        }
        if (xAux >= 0x10000) {
            xAux >>= 16;
            result <<= 8;
        }
        if (xAux >= 0x100) {
            xAux >>= 8;
            result <<= 4;
        }
        if (xAux >= 0x10) {
            xAux >>= 4;
            result <<= 2;
        }
        if (xAux >= 0x8) {
            result <<= 1;
        }

        // The operations can never overflow because the result is max 2^127 when it enters this block.
        unchecked {
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1; // Seven iterations should be enough
            uint256 roundedDownResult = x / result;
            return result >= roundedDownResult ? roundedDownResult : result;
        }
    }
}

// File: @prb/math/contracts/PRBMathSD59x18.sol


pragma solidity >=0.8.4;


/// @title PRBMathSD59x18
/// @author Paul Razvan Berg
/// @notice Smart contract library for advanced fixed-point math that works with int256 numbers considered to have 18
/// trailing decimals. We call this number representation signed 59.18-decimal fixed-point, since the numbers can have
/// a sign and there can be up to 59 digits in the integer part and up to 18 decimals in the fractional part. The numbers
/// are bound by the minimum and the maximum values permitted by the Solidity type int256.
library PRBMathSD59x18 {
    /// @dev log2(e) as a signed 59.18-decimal fixed-point number.
    int256 internal constant LOG2_E = 1_442695040888963407;

    /// @dev Half the SCALE number.
    int256 internal constant HALF_SCALE = 5e17;

    /// @dev The maximum value a signed 59.18-decimal fixed-point number can have.
    int256 internal constant MAX_SD59x18 =
        57896044618658097711785492504343953926634992332820282019728_792003956564819967;

    /// @dev The maximum whole value a signed 59.18-decimal fixed-point number can have.
    int256 internal constant MAX_WHOLE_SD59x18 =
        57896044618658097711785492504343953926634992332820282019728_000000000000000000;

    /// @dev The minimum value a signed 59.18-decimal fixed-point number can have.
    int256 internal constant MIN_SD59x18 =
        -57896044618658097711785492504343953926634992332820282019728_792003956564819968;

    /// @dev The minimum whole value a signed 59.18-decimal fixed-point number can have.
    int256 internal constant MIN_WHOLE_SD59x18 =
        -57896044618658097711785492504343953926634992332820282019728_000000000000000000;

    /// @dev How many trailing decimals can be represented.
    int256 internal constant SCALE = 1e18;

    /// INTERNAL FUNCTIONS ///

    /// @notice Calculate the absolute value of x.
    ///
    /// @dev Requirements:
    /// - x must be greater than MIN_SD59x18.
    ///
    /// @param x The number to calculate the absolute value for.
    /// @param result The absolute value of x.
    function abs(int256 x) internal pure returns (int256 result) {
        unchecked {
            if (x == MIN_SD59x18) {
                revert PRBMathSD59x18__AbsInputTooSmall();
            }
            result = x < 0 ? -x : x;
        }
    }

    /// @notice Calculates the arithmetic average of x and y, rounding down.
    /// @param x The first operand as a signed 59.18-decimal fixed-point number.
    /// @param y The second operand as a signed 59.18-decimal fixed-point number.
    /// @return result The arithmetic average as a signed 59.18-decimal fixed-point number.
    function avg(int256 x, int256 y) internal pure returns (int256 result) {
        // The operations can never overflow.
        unchecked {
            int256 sum = (x >> 1) + (y >> 1);
            if (sum < 0) {
                // If at least one of x and y is odd, we add 1 to the result. This is because shifting negative numbers to the
                // right rounds down to infinity.
                assembly {
                    result := add(sum, and(or(x, y), 1))
                }
            } else {
                // If both x and y are odd, we add 1 to the result. This is because if both numbers are odd, the 0.5
                // remainder gets truncated twice.
                result = sum + (x & y & 1);
            }
        }
    }

    /// @notice Yields the least greatest signed 59.18 decimal fixed-point number greater than or equal to x.
    ///
    /// @dev Optimized for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts.
    /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions.
    ///
    /// Requirements:
    /// - x must be less than or equal to MAX_WHOLE_SD59x18.
    ///
    /// @param x The signed 59.18-decimal fixed-point number to ceil.
    /// @param result The least integer greater than or equal to x, as a signed 58.18-decimal fixed-point number.
    function ceil(int256 x) internal pure returns (int256 result) {
        if (x > MAX_WHOLE_SD59x18) {
            revert PRBMathSD59x18__CeilOverflow(x);
        }
        unchecked {
            int256 remainder = x % SCALE;
            if (remainder == 0) {
                result = x;
            } else {
                // Solidity uses C fmod style, which returns a modulus with the same sign as x.
                result = x - remainder;
                if (x > 0) {
                    result += SCALE;
                }
            }
        }
    }

    /// @notice Divides two signed 59.18-decimal fixed-point numbers, returning a new signed 59.18-decimal fixed-point number.
    ///
    /// @dev Variant of "mulDiv" that works with signed numbers. Works by computing the signs and the absolute values separately.
    ///
    /// Requirements:
    /// - All from "PRBMath.mulDiv".
    /// - None of the inputs can be MIN_SD59x18.
    /// - The denominator cannot be zero.
    /// - The result must fit within int256.
    ///
    /// Caveats:
    /// - All from "PRBMath.mulDiv".
    ///
    /// @param x The numerator as a signed 59.18-decimal fixed-point number.
    /// @param y The denominator as a signed 59.18-decimal fixed-point number.
    /// @param result The quotient as a signed 59.18-decimal fixed-point number.
    function div(int256 x, int256 y) internal pure returns (int256 result) {
        if (x == MIN_SD59x18 || y == MIN_SD59x18) {
            revert PRBMathSD59x18__DivInputTooSmall();
        }

        // Get hold of the absolute values of x and y.
        uint256 ax;
        uint256 ay;
        unchecked {
            ax = x < 0 ? uint256(-x) : uint256(x);
            ay = y < 0 ? uint256(-y) : uint256(y);
        }

        // Compute the absolute value of (x*SCALE)÷y. The result must fit within int256.
        uint256 rAbs = PRBMath.mulDiv(ax, uint256(SCALE), ay);
        if (rAbs > uint256(MAX_SD59x18)) {
            revert PRBMathSD59x18__DivOverflow(rAbs);
        }

        // Get the signs of x and y.
        uint256 sx;
        uint256 sy;
        assembly {
            sx := sgt(x, sub(0, 1))
            sy := sgt(y, sub(0, 1))
        }

        // XOR over sx and sy. This is basically checking whether the inputs have the same sign. If yes, the result
        // should be positive. Otherwise, it should be negative.
        result = sx ^ sy == 1 ? -int256(rAbs) : int256(rAbs);
    }

    /// @notice Returns Euler's number as a signed 59.18-decimal fixed-point number.
    /// @dev See https://en.wikipedia.org/wiki/E_(mathematical_constant).
    function e() internal pure returns (int256 result) {
        result = 2_718281828459045235;
    }

    /// @notice Calculates the natural exponent of x.
    ///
    /// @dev Based on the insight that e^x = 2^(x * log2(e)).
    ///
    /// Requirements:
    /// - All from "log2".
    /// - x must be less than 133.084258667509499441.
    ///
    /// Caveats:
    /// - All from "exp2".
    /// - For any x less than -41.446531673892822322, the result is zero.
    ///
    /// @param x The exponent as a signed 59.18-decimal fixed-point number.
    /// @return result The result as a signed 59.18-decimal fixed-point number.
    function exp(int256 x) internal pure returns (int256 result) {
        // Without this check, the value passed to "exp2" would be less than -59.794705707972522261.
        if (x < -41_446531673892822322) {
            return 0;
        }

        // Without this check, the value passed to "exp2" would be greater than 192.
        if (x >= 133_084258667509499441) {
            revert PRBMathSD59x18__ExpInputTooBig(x);
        }

        // Do the fixed-point multiplication inline to save gas.
        unchecked {
            int256 doubleScaleProduct = x * LOG2_E;
            result = exp2((doubleScaleProduct + HALF_SCALE) / SCALE);
        }
    }

    /// @notice Calculates the binary exponent of x using the binary fraction method.
    ///
    /// @dev See https://ethereum.stackexchange.com/q/79903/24693.
    ///
    /// Requirements:
    /// - x must be 192 or less.
    /// - The result must fit within MAX_SD59x18.
    ///
    /// Caveats:
    /// - For any x less than -59.794705707972522261, the result is zero.
    ///
    /// @param x The exponent as a signed 59.18-decimal fixed-point number.
    /// @return result The result as a signed 59.18-decimal fixed-point number.
    function exp2(int256 x) internal pure returns (int256 result) {
        // This works because 2^(-x) = 1/2^x.
        if (x < 0) {
            // 2^59.794705707972522262 is the maximum number whose inverse does not truncate down to zero.
            if (x < -59_794705707972522261) {
                return 0;
            }

            // Do the fixed-point inversion inline to save gas. The numerator is SCALE * SCALE.
            unchecked {
                result = 1e36 / exp2(-x);
            }
        } else {
            // 2^192 doesn't fit within the 192.64-bit format used internally in this function.
            if (x >= 192e18) {
                revert PRBMathSD59x18__Exp2InputTooBig(x);
            }

            unchecked {
                // Convert x to the 192.64-bit fixed-point format.
                uint256 x192x64 = (uint256(x) << 64) / uint256(SCALE);

                // Safe to convert the result to int256 directly because the maximum input allowed is 192.
                result = int256(PRBMath.exp2(x192x64));
            }
        }
    }

    /// @notice Yields the greatest signed 59.18 decimal fixed-point number less than or equal to x.
    ///
    /// @dev Optimized for fractional value inputs, because for every whole value there are (1e18 - 1) fractional counterparts.
    /// See https://en.wikipedia.org/wiki/Floor_and_ceiling_functions.
    ///
    /// Requirements:
    /// - x must be greater than or equal to MIN_WHOLE_SD59x18.
    ///
    /// @param x The signed 59.18-decimal fixed-point number to floor.
    /// @param result The greatest integer less than or equal to x, as a signed 58.18-decimal fixed-point number.
    function floor(int256 x) internal pure returns (int256 result) {
        if (x < MIN_WHOLE_SD59x18) {
            revert PRBMathSD59x18__FloorUnderflow(x);
        }
        unchecked {
            int256 remainder = x % SCALE;
            if (remainder == 0) {
                result = x;
            } else {
                // Solidity uses C fmod style, which returns a modulus with the same sign as x.
                result = x - remainder;
                if (x < 0) {
                    result -= SCALE;
                }
            }
        }
    }

    /// @notice Yields the excess beyond the floor of x for positive numbers and the part of the number to the right
    /// of the radix point for negative numbers.
    /// @dev Based on the odd function definition. https://en.wikipedia.org/wiki/Fractional_part
    /// @param x The signed 59.18-decimal fixed-point number to get the fractional part of.
    /// @param result The fractional part of x as a signed 59.18-decimal fixed-point number.
    function frac(int256 x) internal pure returns (int256 result) {
        unchecked {
            result = x % SCALE;
        }
    }

    /// @notice Converts a number from basic integer form to signed 59.18-decimal fixed-point representation.
    ///
    /// @dev Requirements:
    /// - x must be greater than or equal to MIN_SD59x18 divided by SCALE.
    /// - x must be less than or equal to MAX_SD59x18 divided by SCALE.
    ///
    /// @param x The basic integer to convert.
    /// @param result The same number in signed 59.18-decimal fixed-point representation.
    function fromInt(int256 x) internal pure returns (int256 result) {
        unchecked {
            if (x < MIN_SD59x18 / SCALE) {
                revert PRBMathSD59x18__FromIntUnderflow(x);
            }
            if (x > MAX_SD59x18 / SCALE) {
                revert PRBMathSD59x18__FromIntOverflow(x);
            }
            result = x * SCALE;
        }
    }

    /// @notice Calculates geometric mean of x and y, i.e. sqrt(x * y), rounding down.
    ///
    /// @dev Requirements:
    /// - x * y must fit within MAX_SD59x18, lest it overflows.
    /// - x * y cannot be negative.
    ///
    /// @param x The first operand as a signed 59.18-decimal fixed-point number.
    /// @param y The second operand as a signed 59.18-decimal fixed-point number.
    /// @return result The result as a signed 59.18-decimal fixed-point number.
    function gm(int256 x, int256 y) internal pure returns (int256 result) {
        if (x == 0) {
            return 0;
        }

        unchecked {
            // Checking for overflow this way is faster than letting Solidity do it.
            int256 xy = x * y;
            if (xy / x != y) {
                revert PRBMathSD59x18__GmOverflow(x, y);
            }

            // The product cannot be negative.
            if (xy < 0) {
                revert PRBMathSD59x18__GmNegativeProduct(x, y);
            }

            // We don't need to multiply by the SCALE here because the x*y product had already picked up a factor of SCALE
            // during multiplication. See the comments within the "sqrt" function.
            result = int256(PRBMath.sqrt(uint256(xy)));
        }
    }

    /// @notice Calculates 1 / x, rounding toward zero.
    ///
    /// @dev Requirements:
    /// - x cannot be zero.
    ///
    /// @param x The signed 59.18-decimal fixed-point number for which to calculate the inverse.
    /// @return result The inverse as a signed 59.18-decimal fixed-point number.
    function inv(int256 x) internal pure returns (int256 result) {
        unchecked {
            // 1e36 is SCALE * SCALE.
            result = 1e36 / x;
        }
    }

    /// @notice Calculates the natural logarithm of x.
    ///
    /// @dev Based on the insight that ln(x) = log2(x) / log2(e).
    ///
    /// Requirements:
    /// - All from "log2".
    ///
    /// Caveats:
    /// - All from "log2".
    /// - This doesn't return exactly 1 for 2718281828459045235, for that we would need more fine-grained precision.
    ///
    /// @param x The signed 59.18-decimal fixed-point number for which to calculate the natural logarithm.
    /// @return result The natural logarithm as a signed 59.18-decimal fixed-point number.
    function ln(int256 x) internal pure returns (int256 result) {
        // Do the fixed-point multiplication inline to save gas. This is overflow-safe because the maximum value that log2(x)
        // can return is 195205294292027477728.
        unchecked {
            result = (log2(x) * SCALE) / LOG2_E;
        }
    }

    /// @notice Calculates the common logarithm of x.
    ///
    /// @dev First checks if x is an exact power of ten and it stops if yes. If it's not, calculates the common
    /// logarithm based on the insight that log10(x) = log2(x) / log2(10).
    ///
    /// Requirements:
    /// - All from "log2".
    ///
    /// Caveats:
    /// - All from "log2".
    ///
    /// @param x The signed 59.18-decimal fixed-point number for which to calculate the common logarithm.
    /// @return result The common logarithm as a signed 59.18-decimal fixed-point number.
    function log10(int256 x) internal pure returns (int256 result) {
        if (x <= 0) {
            revert PRBMathSD59x18__LogInputTooSmall(x);
        }

        // Note that the "mul" in this block is the assembly mul operation, not the "mul" function defined in this contract.
        // prettier-ignore
        assembly {
            switch x
            case 1 { result := mul(SCALE, sub(0, 18)) }
            case 10 { result := mul(SCALE, sub(1, 18)) }
            case 100 { result := mul(SCALE, sub(2, 18)) }
            case 1000 { result := mul(SCALE, sub(3, 18)) }
            case 10000 { result := mul(SCALE, sub(4, 18)) }
            case 100000 { result := mul(SCALE, sub(5, 18)) }
            case 1000000 { result := mul(SCALE, sub(6, 18)) }
            case 10000000 { result := mul(SCALE, sub(7, 18)) }
            case 100000000 { result := mul(SCALE, sub(8, 18)) }
            case 1000000000 { result := mul(SCALE, sub(9, 18)) }
            case 10000000000 { result := mul(SCALE, sub(10, 18)) }
            case 100000000000 { result := mul(SCALE, sub(11, 18)) }
            case 1000000000000 { result := mul(SCALE, sub(12, 18)) }
            case 10000000000000 { result := mul(SCALE, sub(13, 18)) }
            case 100000000000000 { result := mul(SCALE, sub(14, 18)) }
            case 1000000000000000 { result := mul(SCALE, sub(15, 18)) }
            case 10000000000000000 { result := mul(SCALE, sub(16, 18)) }
            case 100000000000000000 { result := mul(SCALE, sub(17, 18)) }
            case 1000000000000000000 { result := 0 }
            case 10000000000000000000 { result := SCALE }
            case 100000000000000000000 { result := mul(SCALE, 2) }
            case 1000000000000000000000 { result := mul(SCALE, 3) }
            case 10000000000000000000000 { result := mul(SCALE, 4) }
            case 100000000000000000000000 { result := mul(SCALE, 5) }
            case 1000000000000000000000000 { result := mul(SCALE, 6) }
            case 10000000000000000000000000 { result := mul(SCALE, 7) }
            case 100000000000000000000000000 { result := mul(SCALE, 8) }
            case 1000000000000000000000000000 { result := mul(SCALE, 9) }
            case 10000000000000000000000000000 { result := mul(SCALE, 10) }
            case 100000000000000000000000000000 { result := mul(SCALE, 11) }
            case 1000000000000000000000000000000 { result := mul(SCALE, 12) }
            case 10000000000000000000000000000000 { result := mul(SCALE, 13) }
            case 100000000000000000000000000000000 { result := mul(SCALE, 14) }
            case 1000000000000000000000000000000000 { result := mul(SCALE, 15) }
            case 10000000000000000000000000000000000 { result := mul(SCALE, 16) }
            case 100000000000000000000000000000000000 { result := mul(SCALE, 17) }
            case 1000000000000000000000000000000000000 { result := mul(SCALE, 18) }
            case 10000000000000000000000000000000000000 { result := mul(SCALE, 19) }
            case 100000000000000000000000000000000000000 { result := mul(SCALE, 20) }
            case 1000000000000000000000000000000000000000 { result := mul(SCALE, 21) }
            case 10000000000000000000000000000000000000000 { result := mul(SCALE, 22) }
            case 100000000000000000000000000000000000000000 { result := mul(SCALE, 23) }
            case 1000000000000000000000000000000000000000000 { result := mul(SCALE, 24) }
            case 10000000000000000000000000000000000000000000 { result := mul(SCALE, 25) }
            case 100000000000000000000000000000000000000000000 { result := mul(SCALE, 26) }
            case 1000000000000000000000000000000000000000000000 { result := mul(SCALE, 27) }
            case 10000000000000000000000000000000000000000000000 { result := mul(SCALE, 28) }
            case 100000000000000000000000000000000000000000000000 { result := mul(SCALE, 29) }
            case 1000000000000000000000000000000000000000000000000 { result := mul(SCALE, 30) }
            case 10000000000000000000000000000000000000000000000000 { result := mul(SCALE, 31) }
            case 100000000000000000000000000000000000000000000000000 { result := mul(SCALE, 32) }
            case 1000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 33) }
            case 10000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 34) }
            case 100000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 35) }
            case 1000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 36) }
            case 10000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 37) }
            case 100000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 38) }
            case 1000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 39) }
            case 10000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 40) }
            case 100000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 41) }
            case 1000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 42) }
            case 10000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 43) }
            case 100000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 44) }
            case 1000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 45) }
            case 10000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 46) }
            case 100000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 47) }
            case 1000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 48) }
            case 10000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 49) }
            case 100000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 50) }
            case 1000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 51) }
            case 10000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 52) }
            case 100000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 53) }
            case 1000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 54) }
            case 10000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 55) }
            case 100000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 56) }
            case 1000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 57) }
            case 10000000000000000000000000000000000000000000000000000000000000000000000000000 { result := mul(SCALE, 58) }
            default {
                result := MAX_SD59x18
            }
        }

        if (result == MAX_SD59x18) {
            // Do the fixed-point division inline to save gas. The denominator is log2(10).
            unchecked {
                result = (log2(x) * SCALE) / 3_321928094887362347;
            }
        }
    }

    /// @notice Calculates the binary logarithm of x.
    ///
    /// @dev Based on the iterative approximation algorithm.
    /// https://en.wikipedia.org/wiki/Binary_logarithm#Iterative_approximation
    ///
    /// Requirements:
    /// - x must be greater than zero.
    ///
    /// Caveats:
    /// - The results are not perfectly accurate to the last decimal, due to the lossy precision of the iterative approximation.
    ///
    /// @param x The signed 59.18-decimal fixed-point number for which to calculate the binary logarithm.
    /// @return result The binary logarithm as a signed 59.18-decimal fixed-point number.
    function log2(int256 x) internal pure returns (int256 result) {
        if (x <= 0) {
            revert PRBMathSD59x18__LogInputTooSmall(x);
        }
        unchecked {
            // This works because log2(x) = -log2(1/x).
            int256 sign;
            if (x >= SCALE) {
                sign = 1;
            } else {
                sign = -1;
                // Do the fixed-point inversion inline to save gas. The numerator is SCALE * SCALE.
                assembly {
                    x := div(1000000000000000000000000000000000000, x)
                }
            }

            // Calculate the integer part of the logarithm and add it to the result and finally calculate y = x * 2^(-n).
            uint256 n = PRBMath.mostSignificantBit(uint256(x / SCALE));

            // The integer part of the logarithm as a signed 59.18-decimal fixed-point number. The operation can't overflow
            // because n is maximum 255, SCALE is 1e18 and sign is either 1 or -1.
            result = int256(n) * SCALE;

            // This is y = x * 2^(-n).
            int256 y = x >> n;

            // If y = 1, the fractional part is zero.
            if (y == SCALE) {
                return result * sign;
            }

            // Calculate the fractional part via the iterative approximation.
            // The "delta >>= 1" part is equivalent to "delta /= 2", but shifting bits is faster.
            for (int256 delta = int256(HALF_SCALE); delta > 0; delta >>= 1) {
                y = (y * y) / SCALE;

                // Is y^2 > 2 and so in the range [2,4)?
                if (y >= 2 * SCALE) {
                    // Add the 2^(-m) factor to the logarithm.
                    result += delta;

                    // Corresponds to z/2 on Wikipedia.
                    y >>= 1;
                }
            }
            result *= sign;
        }
    }

    /// @notice Multiplies two signed 59.18-decimal fixed-point numbers together, returning a new signed 59.18-decimal
    /// fixed-point number.
    ///
    /// @dev Variant of "mulDiv" that works with signed numbers and employs constant folding, i.e. the denominator is
    /// always 1e18.
    ///
    /// Requirements:
    /// - All from "PRBMath.mulDivFixedPoint".
    /// - None of the inputs can be MIN_SD59x18
    /// - The result must fit within MAX_SD59x18.
    ///
    /// Caveats:
    /// - The body is purposely left uncommented; see the NatSpec comments in "PRBMath.mulDiv" to understand how this works.
    ///
    /// @param x The multiplicand as a signed 59.18-decimal fixed-point number.
    /// @param y The multiplier as a signed 59.18-decimal fixed-point number.
    /// @return result The product as a signed 59.18-decimal fixed-point number.
    function mul(int256 x, int256 y) internal pure returns (int256 result) {
        if (x == MIN_SD59x18 || y == MIN_SD59x18) {
            revert PRBMathSD59x18__MulInputTooSmall();
        }

        unchecked {
            uint256 ax;
            uint256 ay;
            ax = x < 0 ? uint256(-x) : uint256(x);
            ay = y < 0 ? uint256(-y) : uint256(y);

            uint256 rAbs = PRBMath.mulDivFixedPoint(ax, ay);
            if (rAbs > uint256(MAX_SD59x18)) {
                revert PRBMathSD59x18__MulOverflow(rAbs);
            }

            uint256 sx;
            uint256 sy;
            assembly {
                sx := sgt(x, sub(0, 1))
                sy := sgt(y, sub(0, 1))
            }
            result = sx ^ sy == 1 ? -int256(rAbs) : int256(rAbs);
        }
    }

    /// @notice Returns PI as a signed 59.18-decimal fixed-point number.
    function pi() internal pure returns (int256 result) {
        result = 3_141592653589793238;
    }

    /// @notice Raises x to the power of y.
    ///
    /// @dev Based on the insight that x^y = 2^(log2(x) * y).
    ///
    /// Requirements:
    /// - All from "exp2", "log2" and "mul".
    /// - z cannot be zero.
    ///
    /// Caveats:
    /// - All from "exp2", "log2" and "mul".
    /// - Assumes 0^0 is 1.
    ///
    /// @param x Number to raise to given power y, as a signed 59.18-decimal fixed-point number.
    /// @param y Exponent to raise x to, as a signed 59.18-decimal fixed-point number.
    /// @return result x raised to power y, as a signed 59.18-decimal fixed-point number.
    function pow(int256 x, int256 y) internal pure returns (int256 result) {
        if (x == 0) {
            result = y == 0 ? SCALE : int256(0);
        } else {
            result = exp2(mul(log2(x), y));
        }
    }

    /// @notice Raises x (signed 59.18-decimal fixed-point number) to the power of y (basic unsigned integer) using the
    /// famous algorithm "exponentiation by squaring".
    ///
    /// @dev See https://en.wikipedia.org/wiki/Exponentiation_by_squaring
    ///
    /// Requirements:
    /// - All from "abs" and "PRBMath.mulDivFixedPoint".
    /// - The result must fit within MAX_SD59x18.
    ///
    /// Caveats:
    /// - All from "PRBMath.mulDivFixedPoint".
    /// - Assumes 0^0 is 1.
    ///
    /// @param x The base as a signed 59.18-decimal fixed-point number.
    /// @param y The exponent as an uint256.
    /// @return result The result as a signed 59.18-decimal fixed-point number.
    function powu(int256 x, uint256 y) internal pure returns (int256 result) {
        uint256 xAbs = uint256(abs(x));

        // Calculate the first iteration of the loop in advance.
        uint256 rAbs = y & 1 > 0 ? xAbs : uint256(SCALE);

        // Equivalent to "for(y /= 2; y > 0; y /= 2)" but faster.
        uint256 yAux = y;
        for (yAux >>= 1; yAux > 0; yAux >>= 1) {
            xAbs = PRBMath.mulDivFixedPoint(xAbs, xAbs);

            // Equivalent to "y % 2 == 1" but faster.
            if (yAux & 1 > 0) {
                rAbs = PRBMath.mulDivFixedPoint(rAbs, xAbs);
            }
        }

        // The result must fit within the 59.18-decimal fixed-point representation.
        if (rAbs > uint256(MAX_SD59x18)) {
            revert PRBMathSD59x18__PowuOverflow(rAbs);
        }

        // Is the base negative and the exponent an odd number?
        bool isNegative = x < 0 && y & 1 == 1;
        result = isNegative ? -int256(rAbs) : int256(rAbs);
    }

    /// @notice Returns 1 as a signed 59.18-decimal fixed-point number.
    function scale() internal pure returns (int256 result) {
        result = SCALE;
    }

    /// @notice Calculates the square root of x, rounding down.
    /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method.
    ///
    /// Requirements:
    /// - x cannot be negative.
    /// - x must be less than MAX_SD59x18 / SCALE.
    ///
    /// @param x The signed 59.18-decimal fixed-point number for which to calculate the square root.
    /// @return result The result as a signed 59.18-decimal fixed-point .
    function sqrt(int256 x) internal pure returns (int256 result) {
        unchecked {
            if (x < 0) {
                revert PRBMathSD59x18__SqrtNegativeInput(x);
            }
            if (x > MAX_SD59x18 / SCALE) {
                revert PRBMathSD59x18__SqrtOverflow(x);
            }
            // Multiply x by the SCALE to account for the factor of SCALE that is picked up when multiplying two signed
            // 59.18-decimal fixed-point numbers together (in this case, those two numbers are both the square root).
            result = int256(PRBMath.sqrt(uint256(x * SCALE)));
        }
    }

    /// @notice Converts a signed 59.18-decimal fixed-point number to basic integer form, rounding down in the process.
    /// @param x The signed 59.18-decimal fixed-point number to convert.
    /// @return result The same number in basic integer form.
    function toInt(int256 x) internal pure returns (int256 result) {
        unchecked {
            result = x / SCALE;
        }
    }
}

// File: @openzeppelin/contracts/utils/math/SafeCast.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.2._
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v2.5._
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.2._
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v2.5._
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v2.5._
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v2.5._
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v2.5._
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     *
     * _Available since v3.0._
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toInt248(int256 value) internal pure returns (int248) {
        require(value >= type(int248).min && value <= type(int248).max, "SafeCast: value doesn't fit in 248 bits");
        return int248(value);
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toInt240(int256 value) internal pure returns (int240) {
        require(value >= type(int240).min && value <= type(int240).max, "SafeCast: value doesn't fit in 240 bits");
        return int240(value);
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toInt232(int256 value) internal pure returns (int232) {
        require(value >= type(int232).min && value <= type(int232).max, "SafeCast: value doesn't fit in 232 bits");
        return int232(value);
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.7._
     */
    function toInt224(int256 value) internal pure returns (int224) {
        require(value >= type(int224).min && value <= type(int224).max, "SafeCast: value doesn't fit in 224 bits");
        return int224(value);
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toInt216(int256 value) internal pure returns (int216) {
        require(value >= type(int216).min && value <= type(int216).max, "SafeCast: value doesn't fit in 216 bits");
        return int216(value);
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toInt208(int256 value) internal pure returns (int208) {
        require(value >= type(int208).min && value <= type(int208).max, "SafeCast: value doesn't fit in 208 bits");
        return int208(value);
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toInt200(int256 value) internal pure returns (int200) {
        require(value >= type(int200).min && value <= type(int200).max, "SafeCast: value doesn't fit in 200 bits");
        return int200(value);
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toInt192(int256 value) internal pure returns (int192) {
        require(value >= type(int192).min && value <= type(int192).max, "SafeCast: value doesn't fit in 192 bits");
        return int192(value);
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toInt184(int256 value) internal pure returns (int184) {
        require(value >= type(int184).min && value <= type(int184).max, "SafeCast: value doesn't fit in 184 bits");
        return int184(value);
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toInt176(int256 value) internal pure returns (int176) {
        require(value >= type(int176).min && value <= type(int176).max, "SafeCast: value doesn't fit in 176 bits");
        return int176(value);
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toInt168(int256 value) internal pure returns (int168) {
        require(value >= type(int168).min && value <= type(int168).max, "SafeCast: value doesn't fit in 168 bits");
        return int168(value);
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toInt160(int256 value) internal pure returns (int160) {
        require(value >= type(int160).min && value <= type(int160).max, "SafeCast: value doesn't fit in 160 bits");
        return int160(value);
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toInt152(int256 value) internal pure returns (int152) {
        require(value >= type(int152).min && value <= type(int152).max, "SafeCast: value doesn't fit in 152 bits");
        return int152(value);
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toInt144(int256 value) internal pure returns (int144) {
        require(value >= type(int144).min && value <= type(int144).max, "SafeCast: value doesn't fit in 144 bits");
        return int144(value);
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toInt136(int256 value) internal pure returns (int136) {
        require(value >= type(int136).min && value <= type(int136).max, "SafeCast: value doesn't fit in 136 bits");
        return int136(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toInt120(int256 value) internal pure returns (int120) {
        require(value >= type(int120).min && value <= type(int120).max, "SafeCast: value doesn't fit in 120 bits");
        return int120(value);
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toInt112(int256 value) internal pure returns (int112) {
        require(value >= type(int112).min && value <= type(int112).max, "SafeCast: value doesn't fit in 112 bits");
        return int112(value);
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toInt104(int256 value) internal pure returns (int104) {
        require(value >= type(int104).min && value <= type(int104).max, "SafeCast: value doesn't fit in 104 bits");
        return int104(value);
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.7._
     */
    function toInt96(int256 value) internal pure returns (int96) {
        require(value >= type(int96).min && value <= type(int96).max, "SafeCast: value doesn't fit in 96 bits");
        return int96(value);
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toInt88(int256 value) internal pure returns (int88) {
        require(value >= type(int88).min && value <= type(int88).max, "SafeCast: value doesn't fit in 88 bits");
        return int88(value);
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toInt80(int256 value) internal pure returns (int80) {
        require(value >= type(int80).min && value <= type(int80).max, "SafeCast: value doesn't fit in 80 bits");
        return int80(value);
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toInt72(int256 value) internal pure returns (int72) {
        require(value >= type(int72).min && value <= type(int72).max, "SafeCast: value doesn't fit in 72 bits");
        return int72(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toInt56(int256 value) internal pure returns (int56) {
        require(value >= type(int56).min && value <= type(int56).max, "SafeCast: value doesn't fit in 56 bits");
        return int56(value);
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toInt48(int256 value) internal pure returns (int48) {
        require(value >= type(int48).min && value <= type(int48).max, "SafeCast: value doesn't fit in 48 bits");
        return int48(value);
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toInt40(int256 value) internal pure returns (int40) {
        require(value >= type(int40).min && value <= type(int40).max, "SafeCast: value doesn't fit in 40 bits");
        return int40(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toInt24(int256 value) internal pure returns (int24) {
        require(value >= type(int24).min && value <= type(int24).max, "SafeCast: value doesn't fit in 24 bits");
        return int24(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     *
     * _Available since v3.0._
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

// File: contracts/interfaces/WrapperContractInterface.sol

pragma solidity ^0.8.0;

interface WrapperContractInterface {
  function withdraw(uint256 amount) external;
}
// File: @openzeppelin/contracts/utils/structs/EnumerableSet.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

// File: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol


// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;


/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/ClipperCommonExchange.sol

pragma solidity ^0.8.0;








abstract contract ClipperCommonExchange is ERC20, ReentrancyGuard {

  using SafeERC20 for IERC20;
  using EnumerableSet for EnumerableSet.AddressSet;

  struct Signature {
    uint8 v;
    bytes32 r;
    bytes32 s;
  }

  struct Deposit {
      uint lockedUntil;
      uint256 poolTokenAmount;
  }

  uint256 constant ONE_IN_TEN_DECIMALS = 1e10;
  // Allow for inputs up to 0.5% more than quoted values to have scaled output.
  // Inputs higher than this value just get 0.5% more.
  uint256 constant MAX_ALLOWED_OVER_TEN_DECIMALS = ONE_IN_TEN_DECIMALS+50*1e6;

  // Signer is passed in on construction, hence "immutable"
  address immutable public DESIGNATED_SIGNER;
  address immutable public WRAPPER_CONTRACT;
  // Constant values for EIP-712 signing
  bytes32 immutable DOMAIN_SEPARATOR;
  string constant VERSION = "1.0.0";
  string constant NAME = "ClipperDirect";

  address constant CLIPPER_ETH_SIGIL = address(0);

  bytes32 constant EIP712DOMAIN_TYPEHASH = keccak256(
     abi.encodePacked("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")
  );

  bytes32 constant OFFERSTRUCT_TYPEHASH = keccak256(
    abi.encodePacked("OfferStruct(address input_token,address output_token,uint256 input_amount,uint256 output_amount,uint256 good_until,address destination_address)")
  );

  bytes32 constant DEPOSITSTRUCT_TYPEHASH = keccak256(
    abi.encodePacked("DepositStruct(address sender,uint256[] deposit_amounts,uint256 days_locked,uint256 pool_tokens,uint256 good_until)")
  );

  bytes32 constant SINGLEDEPOSITSTRUCT_TYPEHASH = keccak256(
    abi.encodePacked("SingleDepositStruct(address sender,address token,uint256 amount,uint256 days_locked,uint256 pool_tokens,uint256 good_until)")
  );

  bytes32 constant WITHDRAWALSTRUCT_TYPEHASH = keccak256(
    abi.encodePacked("WithdrawalStruct(address token_holder,uint256 pool_token_amount_to_burn,address asset_address,uint256 asset_amount,uint256 good_until)")
  );

  // Assets
  // lastBalances: used for "transmit then swap then sync" modality
  // assetSet is a set of keys that have lastBalances
  mapping(address => uint256) public lastBalances;
  EnumerableSet.AddressSet assetSet;


  // Allows lookup
  mapping(address => Deposit) public vestingDeposits;

  // Events
  event Swapped(
    address indexed inAsset,
    address indexed outAsset,
    address indexed recipient,
    uint256 inAmount,
    uint256 outAmount,
    bytes auxiliaryData
  );

  event Deposited(
    address indexed depositor,
    uint256 poolTokens,
    uint256 nDays
  );

  event Withdrawn(
    address indexed withdrawer,
    uint256 poolTokens,
    uint256 fractionOfPool
  );

  event AssetWithdrawn(
    address indexed withdrawer,
    uint256 poolTokens,    
    address indexed assetAddress,
    uint256 assetAmount
  );

  // Take in the designated signer address and the token list
  constructor(address theSigner, address theWrapper, address[] memory tokens) ERC20("ClipperDirect Pool Token", "CLPRDRPL") {
    DESIGNATED_SIGNER = theSigner;
    uint i;
    uint n = tokens.length;
    while(i < n) {
        assetSet.add(tokens[i]);
        i++;
    }
    DOMAIN_SEPARATOR = createDomainSeparator(NAME, VERSION, address(this));
    WRAPPER_CONTRACT = theWrapper;
  }

  // Allows the receipt of ETH directly
  receive() external payable {
  }

  function safeEthSend(address recipient, uint256 howMuch) internal {
    (bool success, ) = payable(recipient).call{value: howMuch}("");
    require(success, "Call with value failed");
  }

  /* TOKEN AND ASSET FUNCTIONS */
  function nTokens() public view returns (uint) {
    return assetSet.length();
  }

  function tokenAt(uint i) public view returns (address) {
    return assetSet.at(i);
  }

  function isToken(address token) public view returns (bool) {
    return assetSet.contains(token);
  }

  function _sync(address token) internal virtual;

  // Can be overridden as in Caravel
  function getLastBalance(address token) public view virtual returns (uint256) {
    return lastBalances[token];
  }

  function allTokensBalance() external view returns (uint256[] memory, address[] memory, uint256){
    uint n = nTokens();
    uint256[] memory balances = new uint256[](n);
    address[] memory tokens = new address[](n);
    for (uint i = 0; i < n; i++) {
      address token = tokenAt(i);
      balances[i] = getLastBalance(token);
      tokens[i] = token;
    }

    return (balances, tokens, totalSupply());
  }

  // nonReentrant asset transfer
  function transferAsset(address token, address recipient, uint256 amount) internal nonReentrant {
    IERC20(token).safeTransfer(recipient, amount);
    // We never want to transfer an asset without sync'ing
    _sync(token);
  }

  function calculateFairOutput(uint256 statedInput, uint256 actualInput, uint256 statedOutput) internal pure returns (uint256) {
    if(actualInput == statedInput) {
      return statedOutput;
    } else {
      uint256 theFraction = (ONE_IN_TEN_DECIMALS*actualInput)/statedInput;
      if(theFraction >= MAX_ALLOWED_OVER_TEN_DECIMALS) {
        return (MAX_ALLOWED_OVER_TEN_DECIMALS*statedOutput)/ONE_IN_TEN_DECIMALS;
      } else {
        return (theFraction*statedOutput)/ONE_IN_TEN_DECIMALS;
      }
    }
  }

  /* DEPOSIT FUNCTIONALITY */
  function canUnlockDeposit(address theAddress) public view returns (bool) {
      Deposit storage myDeposit = vestingDeposits[theAddress];
      return (myDeposit.poolTokenAmount > 0) && (myDeposit.lockedUntil <= block.timestamp);
  }

  function unlockDeposit() external returns (uint256 poolTokens) {
    require(canUnlockDeposit(msg.sender), "ClipperDirect: Deposit cannot be unlocked");
    poolTokens = vestingDeposits[msg.sender].poolTokenAmount;
    delete vestingDeposits[msg.sender];

    _transfer(address(this), msg.sender, poolTokens);
  }

  function _mintOrVesting(address sender, uint256 nDays, uint256 poolTokens) internal {
    if(nDays==0){
      // No vesting period required - mint tokens directly for the user
      _mint(sender, poolTokens);
    } else {
      // Set up a vesting deposit for the sender
      _createVestingDeposit(sender, nDays, poolTokens);
    }
  }

  // Mints tokens to this contract to hold for vesting
  function _createVestingDeposit(address theAddress, uint256 nDays, uint256 numPoolTokens) internal {
    require(nDays > 0, "ClipperDirect: Cannot create vesting deposit without positive vesting period");
    require(vestingDeposits[theAddress].poolTokenAmount==0, "ClipperDirect: Depositor already has an active deposit");

    Deposit memory myDeposit = Deposit({
      lockedUntil: block.timestamp + (nDays * 1 days),
      poolTokenAmount: numPoolTokens
    });
    vestingDeposits[theAddress] = myDeposit;
    _mint(address(this), numPoolTokens);
  }

  function transmitAndDeposit(uint256[] calldata depositAmounts, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) external {
    uint i=0;
    uint n = depositAmounts.length;
    while(i < n){
      uint256 transferAmount = depositAmounts[i];
      if(transferAmount > 0){
        IERC20(tokenAt(i)).safeTransferFrom(msg.sender, address(this), transferAmount);
      }
      i++;
    }
    deposit(msg.sender, depositAmounts, nDays, poolTokens, goodUntil, theSignature);
  }

  function transmitAndDepositSingleAsset(address inputToken, uint256 inputAmount, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) external virtual;

  function deposit(address sender, uint256[] calldata depositAmounts, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) public payable virtual;

  function depositSingleAsset(address sender, address inputToken, uint256 inputAmount, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) public payable virtual;

  /* WITHDRAWAL FUNCTIONALITY */
  function _proportionalWithdrawal(uint256 myFraction) internal {
    uint256 toTransfer;

    uint i;
    uint n = nTokens();
    while(i < n) {
        address theToken = tokenAt(i);
        toTransfer = (myFraction*getLastBalance(theToken)) / ONE_IN_TEN_DECIMALS;
        // syncs done automatically on transfer
        transferAsset(theToken, msg.sender, toTransfer);
        i++;
    }
  }

  function burnToWithdraw(uint256 amount) external {
    // Capture the fraction first, before burning
    uint256 theFractionBaseTen = (ONE_IN_TEN_DECIMALS*amount)/totalSupply();
    
    // Reverts if balance is insufficient
    _burn(msg.sender, amount);

    _proportionalWithdrawal(theFractionBaseTen);
    emit Withdrawn(msg.sender, amount, theFractionBaseTen);
  }

  function withdrawSingleAsset(address tokenHolder, uint256 poolTokenAmountToBurn, address assetAddress, uint256 assetAmount, uint256 goodUntil, Signature calldata theSignature) external virtual;

  /* SWAP Functionality: Virtual */
  function sellEthForToken(address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external payable virtual;
  function sellTokenForEth(address inputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external virtual;
  function transmitAndSellTokenForEth(address inputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external virtual;
  function transmitAndSwap(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external virtual;
  function swap(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) public virtual;

  /* SIGNING Functionality */
  function createDomainSeparator(string memory name, string memory version, address theSigner) internal view returns (bytes32) {
    return keccak256(abi.encode(
        EIP712DOMAIN_TYPEHASH,
        keccak256(abi.encodePacked(name)),
        keccak256(abi.encodePacked(version)),
        uint256(block.chainid),
        theSigner
      ));
  }

  function hashInputOffer(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress) internal pure returns (bytes32) {
    return keccak256(abi.encode(
            OFFERSTRUCT_TYPEHASH,
            inputToken,
            outputToken,
            inputAmount,
            outputAmount,
            goodUntil,
            destinationAddress
        ));
  }

  function hashDeposit(address sender, uint256[] calldata depositAmounts, uint256 daysLocked, uint256 poolTokens, uint256 goodUntil) internal pure returns (bytes32) {
    bytes32 depositAmountsHash = keccak256(abi.encodePacked(depositAmounts));
    return keccak256(abi.encode(
        DEPOSITSTRUCT_TYPEHASH,
        sender,
        depositAmountsHash,
        daysLocked,
        poolTokens,
        goodUntil
      ));
  }

  function hashSingleDeposit(address sender, address inputToken, uint256 inputAmount, uint256 daysLocked, uint256 poolTokens, uint256 goodUntil) internal pure returns (bytes32) {
    return keccak256(abi.encode(
        SINGLEDEPOSITSTRUCT_TYPEHASH,
        sender,
        inputToken,
        inputAmount,
        daysLocked,
        poolTokens,
        goodUntil
      ));
  }

  function hashWithdrawal(address tokenHolder, uint256 poolTokenAmountToBurn, address assetAddress, uint256 assetAmount,
                    uint256 goodUntil) internal pure returns (bytes32) {
    return keccak256(abi.encode(
        WITHDRAWALSTRUCT_TYPEHASH,
        tokenHolder,
        poolTokenAmountToBurn,
        assetAddress,
        assetAmount,
        goodUntil
      ));
  }

  function createSwapDigest(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress) internal view returns (bytes32 digest){
    bytes32 hashedInput = hashInputOffer(inputToken, outputToken, inputAmount, outputAmount, goodUntil, destinationAddress);    
    digest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, hashedInput);
  }

  function createDepositDigest(address sender, uint256[] calldata depositAmounts, uint256 nDays, uint256 poolTokens, uint256 goodUntil) internal view returns (bytes32 depositDigest){
    bytes32 hashedInput = hashDeposit(sender, depositAmounts, nDays, poolTokens, goodUntil);    
    depositDigest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, hashedInput);
  }

  function createSingleDepositDigest(address sender, address inputToken, uint256 inputAmount, uint256 nDays, uint256 poolTokens, uint256 goodUntil) internal view returns (bytes32 depositDigest){
    bytes32 hashedInput = hashSingleDeposit(sender, inputToken, inputAmount, nDays, poolTokens, goodUntil);
    depositDigest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, hashedInput);
  }

  function createWithdrawalDigest(address tokenHolder, uint256 poolTokenAmountToBurn, address assetAddress, uint256 assetAmount,
                    uint256 goodUntil) internal view returns (bytes32 withdrawalDigest){
    bytes32 hashedInput = hashWithdrawal(tokenHolder, poolTokenAmountToBurn, assetAddress, assetAmount, goodUntil);
    withdrawalDigest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, hashedInput);
  }

  function verifyDigestSignature(bytes32 theDigest, Signature calldata theSignature) internal view {
    address signingAddress = ecrecover(theDigest, theSignature.v, theSignature.r, theSignature.s);

    require(signingAddress==DESIGNATED_SIGNER, "Message signed by incorrect address");
  }

}

// File: contracts/ClipperDirectExchange.sol

pragma solidity ^0.8.0;









contract ClipperDirectExchange is ClipperCommonExchange {
  
  using SafeERC20 for IERC20;
  using EnumerableSet for EnumerableSet.AddressSet;

  // For prevention of replay attacks
  mapping(bytes32 => bool) invalidatedDigests;

  constructor(address theSigner, address theWrapper, address[] memory tokens) 
    ClipperCommonExchange(theSigner, theWrapper, tokens)
    {}

  function currentDeltaOverLastBalance(address token) internal view returns (uint256) {
    return IERC20(token).balanceOf(address(this))-lastBalances[token];
  }

  function _sync(address token) internal override {
    lastBalances[token] = IERC20(token).balanceOf(address(this));
  }

  function _syncAll() internal {
    uint i;
    uint n=assetSet.length();
    while(i < n) {
      _sync(tokenAt(i));
      i++;
    }
  }


  // syncAndTransfer() and unwrapAndForwardEth() are the two additional ways tokens leave the pool
  // Since they transfer assets, they are all marked as nonReentrant
  function syncAndTransfer(address inputToken, address outputToken, address recipient, uint256 amount) internal nonReentrant {
    _sync(inputToken);
    IERC20(outputToken).safeTransfer(recipient, amount);
    _sync(outputToken);
  }

  // Essentially transferAsset, but for raw ETH
  function unwrapAndForwardEth(address recipient, uint256 amount) internal nonReentrant {
    /* EFFECTS */
    WrapperContractInterface(WRAPPER_CONTRACT).withdraw(amount);
    _sync(WRAPPER_CONTRACT);
    /* INTERACTIONS */
    safeEthSend(recipient, amount);
  }

  /* DEPOSIT FUNCTIONALITY */
  function deposit(address sender, uint256[] calldata depositAmounts, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) public payable override {
    // Wrap if it's there
    if(msg.value > 0){
      safeEthSend(WRAPPER_CONTRACT, msg.value);
    }
    require(msg.sender==sender, "Listed sender does not match msg.sender");
    // Did we actually deposit what we said we would? Revert otherwise
    verifyDepositAmounts(depositAmounts);
    // Check the signature
    bytes32 depositDigest = createDepositDigest(sender, depositAmounts, nDays, poolTokens, goodUntil);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(depositDigest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(depositDigest, goodUntil);
    // OK now we're good
    _syncAll();
    _mintOrVesting(sender, nDays, poolTokens);
    emit Deposited(sender, poolTokens, nDays);
  }

  function depositSingleAsset(address sender, address inputToken, uint256 inputAmount, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) public payable override {
    // Wrap if it's there
    if(msg.value > 0){
      safeEthSend(WRAPPER_CONTRACT, msg.value);
    }
    require(msg.sender==sender && isToken(inputToken), "Invalid input");

    // Did we actually deposit what we said we would? Revert otherwise
    uint256 delta = currentDeltaOverLastBalance(inputToken);
    require(delta >= inputAmount, "Insufficient token deposit");

    // Check the signature
    bytes32 depositDigest = createSingleDepositDigest(sender, inputToken, inputAmount, nDays, poolTokens, goodUntil);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(depositDigest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(depositDigest, goodUntil);

    // OK now we're good
    _sync(inputToken);
    _mintOrVesting(sender, nDays, poolTokens);
    emit Deposited(sender, poolTokens, nDays);
  }

  function verifyDepositAmounts(uint256[] calldata depositAmounts) internal view {
    uint i=0;
    uint n = depositAmounts.length;
    while(i < n){
      uint256 myDeposit = depositAmounts[i];
      if(myDeposit > 0){
        address token = tokenAt(i);
        uint256 delta = currentDeltaOverLastBalance(token);
        require(delta >= myDeposit, "Insufficient token deposit");
      }
      i++;
    }
  }

  /* Single asset withdrawal functionality */
  function withdrawSingleAsset(address tokenHolder, uint256 poolTokenAmountToBurn, address assetAddress, uint256 assetAmount, uint256 goodUntil, Signature calldata theSignature) external override {
    // Make sure the withdrawer is allowed
    require(msg.sender==tokenHolder, "tokenHolder does not match msg.sender");
    
    bool sendEthBack;
    if(assetAddress == CLIPPER_ETH_SIGIL) {
      assetAddress = WRAPPER_CONTRACT;
      sendEthBack = true;
    }

    // Check the signature
    bytes32 withdrawalDigest = createWithdrawalDigest(tokenHolder, poolTokenAmountToBurn, assetAddress, assetAmount, goodUntil);
    // Reverts if it's signed by the wrong address
    verifyDigestSignature(withdrawalDigest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(withdrawalDigest, goodUntil);
    // Reverts if balance is insufficient
    _burn(msg.sender, poolTokenAmountToBurn);
    // Reverts if balance is insufficient
    // syncs done automatically on transfer
    if(sendEthBack){
      unwrapAndForwardEth(msg.sender, assetAmount);
    } else {
      transferAsset(assetAddress, msg.sender, assetAmount);
    }

    emit AssetWithdrawn(tokenHolder, poolTokenAmountToBurn, assetAddress, assetAmount);
  }

  /* SWAP Functionality */

  // Don't need a separate "transmit" function here since it's already payable
  function sellEthForToken(address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external payable override {
    // Wrap ETH (as balance or value) as input
    safeEthSend(WRAPPER_CONTRACT, inputAmount);
    swap(WRAPPER_CONTRACT, outputToken, inputAmount, outputAmount, goodUntil, destinationAddress, theSignature, auxiliaryData);
  }

  // Mostly copied from swap functionality
  function sellTokenForEth(address inputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external virtual override {
    (uint256 actualInput, uint256 fairOutput) = verifyTokensAndGetAmounts(inputToken, WRAPPER_CONTRACT, inputAmount, outputAmount);
    
    bytes32 digest = createSwapDigest(inputToken, WRAPPER_CONTRACT, inputAmount, outputAmount, goodUntil, destinationAddress);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(digest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(digest, goodUntil);
    
    // We have to _sync the input token manually here
    _sync(inputToken);
    unwrapAndForwardEth(destinationAddress, fairOutput);

    emit Swapped(inputToken, WRAPPER_CONTRACT, destinationAddress, actualInput, fairOutput, auxiliaryData);
  }

  function transmitAndDepositSingleAsset(address inputToken, uint256 inputAmount, uint256 nDays, uint256 poolTokens, uint256 goodUntil, Signature calldata theSignature) external override{
    IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputAmount);
    depositSingleAsset(msg.sender, inputToken, inputAmount, nDays, poolTokens, goodUntil, theSignature);
  }

  function transmitAndSellTokenForEth(address inputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external override {
    IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputAmount);
    this.sellTokenForEth(inputToken, inputAmount, outputAmount, goodUntil, destinationAddress, theSignature, auxiliaryData);
  }

  // all-in-one transfer from msg.sender to destinationAddress.
  function transmitAndSwap(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external override {
    IERC20(inputToken).safeTransferFrom(msg.sender, address(this), inputAmount);
    swap(inputToken, outputToken, inputAmount, outputAmount, goodUntil, destinationAddress, theSignature, auxiliaryData);
  }

  function swap(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 goodUntil, address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) public virtual override {
    // Revert if the tokens don't exist
    (uint256 actualInput, uint256 fairOutput) = verifyTokensAndGetAmounts(inputToken, outputToken, inputAmount, outputAmount);
    
    bytes32 digest = createSwapDigest(inputToken, outputToken, inputAmount, outputAmount, goodUntil, destinationAddress);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(digest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(digest, goodUntil);
    // OK, now we are safe to transfer
    syncAndTransfer(inputToken, outputToken, destinationAddress, fairOutput);
    emit Swapped(inputToken, outputToken, destinationAddress, actualInput, fairOutput, auxiliaryData);
  }

  function verifyTokensAndGetAmounts(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount) internal view returns (uint256 actualInput, uint256 fairOutput) {
    require(isToken(inputToken) && isToken(outputToken), "Tokens not present in pool");
    actualInput = currentDeltaOverLastBalance(inputToken);
    fairOutput = calculateFairOutput(inputAmount, actualInput, outputAmount);
  }

  // Used to invalidate swap and deposit digests
  function checkTimestampAndInvalidateDigest(bytes32 theDigest, uint256 goodUntil) internal {
    require(!invalidatedDigests[theDigest], "Message digest already present");
    require(goodUntil >= block.timestamp, "Message received after allowed timestamp");
    invalidatedDigests[theDigest] = true;
  }

}

// File: contracts/ClipperVerifiedExchange.sol

pragma solidity ^0.8.0;






contract ClipperVerifiedExchange is ClipperDirectExchange {

  using PRBMathSD59x18 for int256;
  using SafeCast for uint256;
  using SafeCast for int256;

  uint256 constant ONE_IN_DEFAULT_DECIMALS = 1e18;
  uint256 constant ONE_IN_PRICE_DECIMALS = 1e8;

  struct UtilStruct {
    uint256 qX;
    uint256 qY;
    uint256 decimalMultiplierX;
    uint256 decimalMultiplierY;
  }

  constructor(address theSigner, address theWrapper, address[] memory tokens)
    ClipperDirectExchange(theSigner, theWrapper, tokens)
  {}

  function sellTokenForEth(address inputToken, uint256 inputAmount, uint256 outputAmount, uint256 packedGoodUntil,
    address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) external override {

    (uint256 actualInput, uint256 fairOutput) = verifyTokensAndGetAmounts(inputToken, WRAPPER_CONTRACT, inputAmount, outputAmount);

    uint256 goodUntil = unpackAndCheckInvariant(inputToken, actualInput, WRAPPER_CONTRACT, fairOutput, packedGoodUntil);

    bytes32 digest = createSwapDigest(inputToken, WRAPPER_CONTRACT, inputAmount, outputAmount, packedGoodUntil, destinationAddress);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(digest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(digest, goodUntil);

    // We have to _sync the input token manually here
    _sync(inputToken);
    unwrapAndForwardEth(destinationAddress, fairOutput);

    emit Swapped(inputToken, WRAPPER_CONTRACT, destinationAddress, actualInput, fairOutput, auxiliaryData);
  }

  function swap(address inputToken, address outputToken, uint256 inputAmount, uint256 outputAmount, uint256 packedGoodUntil,
    address destinationAddress, Signature calldata theSignature, bytes calldata auxiliaryData) public override {

    // Revert if the tokens don't exist
    (uint256 actualInput, uint256 fairOutput) = verifyTokensAndGetAmounts(inputToken, outputToken, inputAmount, outputAmount);
    uint256 goodUntil = unpackAndCheckInvariant(inputToken, actualInput, outputToken, fairOutput, packedGoodUntil);

    bytes32 digest = createSwapDigest(inputToken, outputToken, inputAmount, outputAmount, packedGoodUntil, destinationAddress);
    // Revert if it's signed by the wrong address
    verifyDigestSignature(digest, theSignature);
    // Revert if it's a replay, or if the timestamp is too late
    checkTimestampAndInvalidateDigest(digest, goodUntil);
    // OK, now we are safe to transfer
    syncAndTransfer(inputToken, outputToken, destinationAddress, fairOutput);
    emit Swapped(inputToken, outputToken, destinationAddress, actualInput, fairOutput, auxiliaryData);
  }

  function unpackAndCheckInvariant(address inputToken, uint256 inputAmount, address outputToken, uint256 outputAmount,
    uint256 packedGoodUntil) internal view returns (uint256) {

    UtilStruct memory s;

    (uint256 pX, uint256 pY,uint256 wX, uint256 wY, uint256 k) = unpackGoodUntil(packedGoodUntil);
    s.qX = lastBalances[inputToken];
    s.qY = lastBalances[outputToken];
    s.decimalMultiplierX = 10**(18 - IERC20Metadata(inputToken).decimals());
    s.decimalMultiplierY = 10**(18 - IERC20Metadata(outputToken).decimals());

    require(swapIncreasesInvariant(inputAmount * s.decimalMultiplierX, pX, s.qX * s.decimalMultiplierX, wX,
        outputAmount * s.decimalMultiplierY, pY, s.qY * s.decimalMultiplierY, wY, k), "Invariant check failed");

    return uint256(uint32(packedGoodUntil));
  }

  function unpackGoodUntil(uint256 packedGoodUntil) public pure
    returns (uint256 pX, uint256 pY, uint256 wX, uint256 wY, uint256 k) {
    /*
        * Input asset price in 8 decimals - uint64
        * Output asset price in 8 decimals - uint64
        * k value in 18 decimals - uint64
        * Input asset weight - uint16
        * Output asset weight - uint16
        * Current good until value - uint32 - can be taken as uint256(uint32(packedGoodUntil))
    */
    // goodUntil = uint256(uint32(packedGoodUntil));
    packedGoodUntil = packedGoodUntil >> 32;
    wY = uint256(uint16(packedGoodUntil));
    packedGoodUntil = packedGoodUntil >> 16;
    wX = uint256(uint16(packedGoodUntil));
    packedGoodUntil = packedGoodUntil >> 16;
    k = uint256(uint64(packedGoodUntil));
    packedGoodUntil = packedGoodUntil >> 64;
    pY = uint256(uint64(packedGoodUntil));
    packedGoodUntil = packedGoodUntil >> 64;
    pX = uint256(uint64(packedGoodUntil));
  }

  /*
  Before calling:
  Set qX = lastBalances[inAsset];
  Set qY = lastBalances[outAsset];

  Multiply all quantities (q and in/out) by 10**(18-asset.decimals()).
  This puts all quantities in 18 decimals.

  Assumed decimals:
  K: 18
  Quantities: 18 (ONE_IN_DEFAULT_DECIMALS = 1e18)
  Prices: 8 (ONE_IN_PRICE_DECIMALS = 1e8)
  Weights: 0 (100 = 100)
  */
  function swapIncreasesInvariant(uint256 inX, uint256 pX, uint256 qX, uint256 wX, uint256 outY, uint256 pY, uint256 qY,
    uint256 wY, uint256 k) internal pure returns (bool) {

    uint256 invariantBefore;
    uint256 invariantAfter;
    {
      uint256 pqX = pX * qX / ONE_IN_PRICE_DECIMALS;
      uint256 pqwXk = fractionalPow(pqX * wX, k);
      if (pqwXk > 0) {
        invariantBefore += (ONE_IN_DEFAULT_DECIMALS * pqX) / pqwXk;
      }

      uint256 pqY = pY * qY / ONE_IN_PRICE_DECIMALS;
      uint256 pqwYk = fractionalPow(pqY * wY, k);
      if (pqwYk > 0) {
        invariantBefore += (ONE_IN_DEFAULT_DECIMALS * pqY) / pqwYk;
      }
    }
    {
      uint256 pqXinX = (pX * (qX + inX)) / ONE_IN_PRICE_DECIMALS;
      uint256 pqwXinXk = fractionalPow(pqXinX * wX, k);
      if (pqwXinXk > 0) {
        invariantAfter += (ONE_IN_DEFAULT_DECIMALS * pqXinX) / pqwXinXk;
      }

      uint256 pqYoutY = pY * (qY - outY) / ONE_IN_PRICE_DECIMALS;
      uint256 pqwYoutYk = fractionalPow(pqYoutY * wY, k);
      if (pqwYoutYk > 0) {
        invariantAfter += (ONE_IN_DEFAULT_DECIMALS * pqYoutY) / pqwYoutYk;
      }
    }
    return invariantAfter > invariantBefore;
  }

  function fractionalPow(uint256 input, uint256 pow) internal pure returns (uint256) {
    if (input == 0) {
      return 0;
    } else {
      // input^(pow/1e18) -> exp2( (pow * log2( input ) / 1e18 ) )
      return exp2((int256(pow) * log2(input.toInt256())) / int256(ONE_IN_DEFAULT_DECIMALS));
    }
  }

  function exp2(int256 x) internal pure returns (uint256) {
    return x.exp2().toUint256();
  }

  function log2(int256 x) internal pure returns (int256 y) {
    y = x.log2();
  }

}

// File: contracts/ClipperCommonPacked.sol

pragma solidity ^0.8.0;




abstract contract ClipperCommonPacked is ClipperCommonExchange {
  using SafeERC20 for IERC20;
 
  /*
    unpack: internal function to unpack uint256 representation
    Input arguments:
      amountAndAddress: uint256 where first 24 hexchars are a uint96 shortened uint256
                         and last 40 hexchars are an address
    Returns: unpacked amount and address
  */
  function unpack(uint256 amountAndAddress) internal pure returns (uint256 amount, address contractAddress) {
    // uint256 -> uint160 automatically takes just last 40 hexchars
    contractAddress = address(uint160(amountAndAddress));
    // shift over the 40 hexchars to capture the amount
    amount = amountAndAddress >> 160;
  }

  function unpackAndSwap(uint256 packedInput, uint256 packedOutput, uint256 packedDestination, bytes32 auxData, bytes32 r, bytes32 vs, bool performTransfer) internal virtual;

  // external function to transfer tokens and perform swap from packed calldata
  function packedTransmitAndSwap(uint256 packedInput, uint256 packedOutput, uint256 packedDestination, bytes32 auxData, bytes32 r, bytes32 vs) external payable {
    unpackAndSwap(packedInput, packedOutput, packedDestination, auxData, r, vs, true);
  }
  
  // external function to perform swap from packed calldata
  function packedSwap(uint256 packedInput, uint256 packedOutput, uint256 packedDestination, bytes32 auxData, bytes32 r, bytes32 vs) external payable {
    unpackAndSwap(packedInput, packedOutput, packedDestination, auxData, r, vs, false);
  }

  /*
    packedTransmitAndDepositOneAsset: deposit a single asset in a calldata-efficient way
    Input arguments:
      packedInput: Amount and contract address of asset to deposit
      packedConfig: First 32 hexchars are poolTokens, next 24 are goodUntil, next 6 are nDays, final 2 are v
      r, s: Signature values
  */
  function packedTransmitAndDepositOneAsset(uint256 packedInput, uint256 packedConfig, bytes32 r, bytes32 s) external payable {
    (uint256 inputAmount, address inputContractAddress) = unpack(packedInput);
    uint256 poolTokens = packedConfig >> 128;
    uint256 goodUntil = uint256(uint96(packedConfig >> 32));
    uint256 nDays = uint256(uint24(packedConfig >> 8));
    uint8 v = uint8(packedConfig);
    bool inputIsRawEth = (inputContractAddress==CLIPPER_ETH_SIGIL);

    Signature memory theSignature = Signature(v,r,s);
    delete v;

    if(inputIsRawEth){
      // Don't need to wrap the ETH here, do it in the deposit function
      inputContractAddress = WRAPPER_CONTRACT;
    } else {
      IERC20(inputContractAddress).safeTransferFrom(msg.sender, address(this), inputAmount);
    }

    uint i = 0;
    uint n = nTokens();
    uint256[] memory depositAmounts = new uint256[](n); 

    while(i < n){
      depositAmounts[i] = (tokenAt(i) == inputContractAddress) ? inputAmount : 0;
      i++;
    }

    // Have to use delegatecall to preserve msg.sender context
    (bool success, ) = address(this).delegatecall(
      abi.encodeWithSignature(
        "deposit(address,uint256[],uint256,uint256,uint256,(uint8,bytes32,bytes32))",
        msg.sender,
        depositAmounts,
        nDays,
        poolTokens,
        goodUntil,
        theSignature));
    require(success, "Clipper: Deposit failed");
  }

}

// File: contracts/ClipperPackedVerifiedExchange.sol

//SPDX-License-Identifier: Copyright 2022 Shipyard Software, Inc.
pragma solidity ^0.8.0;




contract ClipperPackedVerifiedExchange is ClipperCommonPacked, ClipperVerifiedExchange {
  using SafeERC20 for IERC20;
 
  constructor(address theSigner, address theWrapper, address[] memory tokens) 
    ClipperVerifiedExchange(theSigner, theWrapper, tokens)
    {}

  /*
    unpackAndSwap: internal function that performs unpacks a set of calldata-packed inputs and performs a swap
    Input arguments:
      packedInput: input amount and contract
      packedOutput: output amount and contract
      packedGoodUntil: packed good until (for verifier, direct from server)
      auxData: bytes32, identifier. Final 20 bytes are destination address. First 12 bytes are auxData identifier string.
      r, vs: Signature values using EIP 2098 - https://eips.ethereum.org/EIPS/eip-2098
      performTransfer: if tokens should be transferred from msg.sender
  */
  function unpackAndSwap(uint256 packedInput, uint256 packedOutput, uint256 packedGoodUntil, bytes32 auxData, bytes32 r, bytes32 vs, bool performTransfer) internal override {    
    (uint256 inputAmount, address inputContractAddress) = unpack(packedInput);
    (uint256 outputAmount, address outputContractAddress) = unpack(packedOutput);
    Signature memory theSignature;

    {
      // Directly from https://eips.ethereum.org/EIPS/eip-2098
      bytes32 s = vs & 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
      uint8 v = 27 + uint8(uint256(vs) >> 255);

      theSignature = Signature(v,r,s);
    }

    if(performTransfer && (inputContractAddress!=CLIPPER_ETH_SIGIL)) {
      IERC20(inputContractAddress).safeTransferFrom(msg.sender, address(this), inputAmount);
    }

    performUnpackedSwap(inputContractAddress, outputContractAddress, inputAmount, outputAmount, packedGoodUntil, auxData, theSignature);
  }

  function performUnpackedSwap(address inputContractAddress, address outputContractAddress, uint256 inputAmount, uint256 outputAmount, uint256 packedGoodUntil, bytes32 auxData, Signature memory theSignature) internal {
      address destinationAddress = address(uint160(uint256(auxData)));
      bytes memory auxiliaryData = abi.encodePacked(auxData >> 160);
      
      if(inputContractAddress==CLIPPER_ETH_SIGIL) {
        this.sellEthForToken(outputContractAddress, inputAmount, outputAmount, packedGoodUntil, destinationAddress, theSignature, auxiliaryData);
      } else if(outputContractAddress==CLIPPER_ETH_SIGIL) {
        this.sellTokenForEth(inputContractAddress, inputAmount, outputAmount, packedGoodUntil, destinationAddress, theSignature, auxiliaryData);
      } else {
        this.swap(inputContractAddress, outputContractAddress, inputAmount, outputAmount, packedGoodUntil, destinationAddress, theSignature, auxiliaryData);
      }

  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"theSigner","type":"address"},{"internalType":"address","name":"theWrapper","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"int256","name":"x","type":"int256"}],"name":"PRBMathSD59x18__Exp2InputTooBig","type":"error"},{"inputs":[{"internalType":"int256","name":"x","type":"int256"}],"name":"PRBMathSD59x18__LogInputTooSmall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolTokens","type":"uint256"},{"indexed":true,"internalType":"address","name":"assetAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"assetAmount","type":"uint256"}],"name":"AssetWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nDays","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"inAsset","type":"address"},{"indexed":true,"internalType":"address","name":"outAsset","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"inAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outAmount","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"Swapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fractionOfPool","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DESIGNATED_SIGNER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WRAPPER_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allTokensBalance","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnToWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"theAddress","type":"address"}],"name":"canUnlockDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256[]","name":"depositAmounts","type":"uint256[]"},{"internalType":"uint256","name":"nDays","type":"uint256"},{"internalType":"uint256","name":"poolTokens","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"nDays","type":"uint256"},{"internalType":"uint256","name":"poolTokens","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"}],"name":"depositSingleAsset","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getLastBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"packedInput","type":"uint256"},{"internalType":"uint256","name":"packedOutput","type":"uint256"},{"internalType":"uint256","name":"packedDestination","type":"uint256"},{"internalType":"bytes32","name":"auxData","type":"bytes32"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"vs","type":"bytes32"}],"name":"packedSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"packedInput","type":"uint256"},{"internalType":"uint256","name":"packedConfig","type":"uint256"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"packedTransmitAndDepositOneAsset","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"packedInput","type":"uint256"},{"internalType":"uint256","name":"packedOutput","type":"uint256"},{"internalType":"uint256","name":"packedDestination","type":"uint256"},{"internalType":"bytes32","name":"auxData","type":"bytes32"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"vs","type":"bytes32"}],"name":"packedTransmitAndSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"internalType":"address","name":"destinationAddress","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"},{"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"sellEthForToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"packedGoodUntil","type":"uint256"},{"internalType":"address","name":"destinationAddress","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"},{"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"sellTokenForEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"packedGoodUntil","type":"uint256"},{"internalType":"address","name":"destinationAddress","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"},{"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"tokenAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"depositAmounts","type":"uint256[]"},{"internalType":"uint256","name":"nDays","type":"uint256"},{"internalType":"uint256","name":"poolTokens","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"}],"name":"transmitAndDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"nDays","type":"uint256"},{"internalType":"uint256","name":"poolTokens","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"}],"name":"transmitAndDepositSingleAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"internalType":"address","name":"destinationAddress","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"},{"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"transmitAndSellTokenForEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"internalType":"address","name":"destinationAddress","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"},{"internalType":"bytes","name":"auxiliaryData","type":"bytes"}],"name":"transmitAndSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockDeposit","outputs":[{"internalType":"uint256","name":"poolTokens","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"packedGoodUntil","type":"uint256"}],"name":"unpackGoodUntil","outputs":[{"internalType":"uint256","name":"pX","type":"uint256"},{"internalType":"uint256","name":"pY","type":"uint256"},{"internalType":"uint256","name":"wX","type":"uint256"},{"internalType":"uint256","name":"wY","type":"uint256"},{"internalType":"uint256","name":"k","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vestingDeposits","outputs":[{"internalType":"uint256","name":"lockedUntil","type":"uint256"},{"internalType":"uint256","name":"poolTokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenHolder","type":"address"},{"internalType":"uint256","name":"poolTokenAmountToBurn","type":"uint256"},{"internalType":"address","name":"assetAddress","type":"address"},{"internalType":"uint256","name":"assetAmount","type":"uint256"},{"internalType":"uint256","name":"goodUntil","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct ClipperCommonExchange.Signature","name":"theSignature","type":"tuple"}],"name":"withdrawSingleAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b506040516200518638038062005186833981016040819052620000349162000422565b8282828282828282826040518060400160405280601881526020017f436c697070657244697265637420506f6f6c20546f6b656e00000000000000008152506040518060400160405280600881526020016710d314149114941360c21b8152508160039080519060200190620000ac9291906200035f565b508051620000c29060049060208401906200035f565b50506001600555506001600160601b0319606084901b1660805280516000905b8082101562000144576200012e8383815181106200011057634e487b7160e01b600052603260045260246000fd5b60200260200101516007620001c060201b620016621790919060201c565b50816200013b8162000597565b925050620000e2565b620001996040518060400160405280600d81526020016c10db1a5c1c195c911a5c9958dd609a1b815250604051806040016040528060058152602001640312e302e360dc1b81525030620001e060201b60201c565b60c05250505060601b6001600160601b03191660a05250620005d598505050505050505050565b6000620001d7836001600160a01b0384166200030d565b90505b92915050565b600060405160200162000257907f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520190565b60405160208183030381529060405280519060200120846040516020016200028091906200051e565b6040516020818303038152906040528051906020012084604051602001620002a991906200051e565b60408051601f1981840301815282825280516020918201209083019490945281019190915260608101919091524660808201526001600160a01b03831660a082015260c0016040516020818303038152906040528051906020012090509392505050565b60008181526001830160205260408120546200035657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001da565b506000620001da565b8280546200036d906200055a565b90600052602060002090601f016020900481019282620003915760008555620003dc565b82601f10620003ac57805160ff1916838001178555620003dc565b82800160010185558215620003dc579182015b82811115620003dc578251825591602001919060010190620003bf565b50620003ea929150620003ee565b5090565b5b80821115620003ea5760008155600101620003ef565b80516001600160a01b03811681146200041d57600080fd5b919050565b60008060006060848603121562000437578283fd5b620004428462000405565b925060206200045381860162000405565b60408601519093506001600160401b038082111562000470578384fd5b818701915087601f83011262000484578384fd5b815181811115620004995762000499620005bf565b8060051b604051601f19603f83011681018181108582111715620004c157620004c1620005bf565b604052828152858101935084860182860187018c1015620004e0578788fd5b8795505b838610156200050d57620004f88162000405565b855260019590950194938601938601620004e4565b508096505050505050509250925092565b60008251815b8181101562000540576020818601810151858301520162000524565b818111156200054f5782828501525b509190910192915050565b600181811c908216806200056f57607f821691505b602082108114156200059157634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620005b857634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c60c051614b196200066d60003960008181611eb1015261259401526000818161050b01528181610a0301528181610a2d01528181610d1501528181610d4801528181610d7801528181610dd501528181610e5d01528181610ff4015281816111270152818161133e015281816123b3015261241c0152600081816105d30152611f560152614b196000f3fe60806040526004361061021e5760003560e01c80634cb6864c1161012357806395d89b41116100ab578063c325a5491161006f578063c325a5491461069d578063c72da66a146106e6578063dd62ed3e14610706578063eb1c645314610726578063ecc7633d1461074657600080fd5b806395d89b4114610615578063a457c2d71461062a578063a7d46c2f1461064a578063a9059cbb1461065d578063c0d5ebfd1461067d57600080fd5b806366d5d61b116100f257806366d5d61b1461056557806370a082311461057857806387e08c25146105ae5780638dda8f3f146105c157806392a91a3a146105f557600080fd5b80634cb6864c146104c65780635250d730146104e65780635aecdda5146104f957806362fb4e011461054557600080fd5b806329d0c8fc116101a6578063368dfc1811610175578063368dfc18146103d75780633721f29c146103f7578063377a368c1461047157806339509351146104865780633b26e4eb146104a657600080fd5b806329d0c8fc146103455780632b651a6c14610365578063313ce5671461038557806334cb3d7f146103a157600080fd5b806319f37361116101ed57806319f37361146102b95780631b6a8759146102d95780631dc6f5a5146102ee57806323b872dd1461031257806327a9b4241461033257600080fd5b806306fdde031461022a578063095ea7b3146102555780630ce9a63d1461028557806318160ddd1461029a57600080fd5b3661022557005b600080fd5b34801561023657600080fd5b5061023f610773565b60405161024c919061476c565b60405180910390f35b34801561026157600080fd5b506102756102703660046141b9565b610805565b604051901515815260200161024c565b610298610293366004614405565b61081f565b005b3480156102a657600080fd5b506002545b60405190815260200161024c565b3480156102c557600080fd5b506102756102d4366004613fae565b610837565b3480156102e557600080fd5b506102ab610844565b3480156102fa57600080fd5b50610303610855565b60405161024c93929190614704565b34801561031e57600080fd5b5061027561032d366004613ffa565b6109d8565b610298610340366004614242565b6109fe565b34801561035157600080fd5b50610298610360366004614322565b610a63565b34801561037157600080fd5b50610298610380366004614035565b610ae5565b34801561039157600080fd5b506040516012815260200161024c565b3480156103ad57600080fd5b506102ab6103bc366004613fae565b6001600160a01b031660009081526006602052604090205490565b3480156103e357600080fd5b506102986103f23660046143a4565b610ba5565b34801561040357600080fd5b506104496104123660046143a4565b60c081901c9167ffffffffffffffff608083901c81169261ffff603082901c811693602083901c9091169260409290921c90911690565b604080519586526020860194909452928401919091526060830152608082015260a00161024c565b34801561047d57600080fd5b506102ab610c1d565b34801561049257600080fd5b506102756104a13660046141b9565b610cb9565b3480156104b257600080fd5b506102986104c1366004614035565b610cdb565b3480156104d257600080fd5b506102986104e1366004614242565b610d0c565b6102986104f4366004614146565b610e52565b34801561050557600080fd5b5061052d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024c565b34801561055157600080fd5b506102986105603660046141e2565b610f7b565b6102986105733660046143d4565b6110c7565b34801561058457600080fd5b506102ab610593366004613fae565b6001600160a01b031660009081526020819052604090205490565b6102986105bc3660046140db565b611333565b3480156105cd57600080fd5b5061052d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060157600080fd5b5061052d6106103660046143a4565b6114a1565b34801561062157600080fd5b5061023f6114ae565b34801561063657600080fd5b506102756106453660046141b9565b6114bd565b610298610658366004614405565b611543565b34801561066957600080fd5b506102756106783660046141b9565b611553565b34801561068957600080fd5b506102986106983660046142d5565b611561565b3480156106a957600080fd5b506106d16106b8366004613fae565b6009602052600090815260409020805460019091015482565b6040805192835260208301919091520161024c565b3480156106f257600080fd5b50610298610701366004614242565b611585565b34801561071257600080fd5b506102ab610721366004613fc8565b611607565b34801561073257600080fd5b50610275610741366004613fae565b611632565b34801561075257600080fd5b506102ab610761366004613fae565b60066020526000908152604090205481565b60606003805461078290614a55565b80601f01602080910402602001604051908101604052809291908181526020018280546107ae90614a55565b80156107fb5780601f106107d0576101008083540402835291602001916107fb565b820191906000526020600020905b8154815290600101906020018083116107de57829003601f168201915b5050505050905090565b600033610813818585611677565b60019150505b92915050565b61082f868686868686600161179b565b505050505050565b600061081960078361183f565b60006108506007611861565b905090565b606080600080610863610844565b905060008167ffffffffffffffff81111561088e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156108b7578160200160208202803683370190505b50905060008267ffffffffffffffff8111156108e357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561090c578160200160208202803683370190505b50905060005b838110156109be576000610925826114a1565b9050610946816001600160a01b031660009081526006602052604090205490565b84838151811061096657634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508083838151811061099357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015250806109b681614a8a565b915050610912565b5081816109ca60025490565b955095509550505050909192565b6000336109e685828561186b565b6109f18585856118e5565b60019150505b9392505050565b610a287f000000000000000000000000000000000000000000000000000000000000000088611ab3565b610a597f00000000000000000000000000000000000000000000000000000000000000008989898989898989610ae5565b5050505050505050565b6000855b80821015610ad6576000888884818110610a9157634e487b7160e01b600052603260045260246000fd5b9050602002013590506000811115610ac357610ac3333083610ab2876114a1565b6001600160a01b0316929190611b54565b82610acd81614a8a565b93505050610a67565b610a5933898989898989610e52565b600080610af48b8b8b8b611bbf565b915091506000610b078c848d858c611c48565b90506000610b198d8d8d8d8d8d611e99565b9050610b258188611ee2565b610b2f8183611fe1565b610b3b8d8d8a866120bd565b876001600160a01b03168c6001600160a01b03168e6001600160a01b03167f4be05c8d54f5e056ab2cfa033e9f582057001268c3e28561bb999d35d2c8f2c887878b8b604051610b8e94939291906147b6565b60405180910390a450505050505050505050505050565b6000610bb060025490565b610bbf836402540be4006149d0565b610bc9919061484b565b9050610bd53383612116565b610bde81612264565b604080518381526020810183905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a25050565b6000610c2833611632565b610c8b5760405162461bcd60e51b815260206004820152602960248201527f436c69707065724469726563743a204465706f7369742063616e6e6f74206265604482015268081d5b9b1bd8dad95960ba1b60648201526084015b60405180910390fd5b50336000818152600960205260408120600181018054918390559190915590610cb6903090836118e5565b90565b600033610813818585610ccc8383611607565b610cd691906147e0565b611677565b610cf06001600160a01b038a1633308a611b54565b610d01898989898989898989610ae5565b505050505050505050565b600080610d3b8a7f00000000000000000000000000000000000000000000000000000000000000008b8b611bbf565b915091506000610d6e8b847f0000000000000000000000000000000000000000000000000000000000000000858c611c48565b90506000610da08c7f00000000000000000000000000000000000000000000000000000000000000008d8d8d8d611e99565b9050610dac8188611ee2565b610db68183611fe1565b610dbf8c6122e2565b610dc98884612375565b876001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168d6001600160a01b03167f4be05c8d54f5e056ab2cfa033e9f582057001268c3e28561bb999d35d2c8f2c887878b8b604051610e3c94939291906147b6565b60405180910390a4505050505050505050505050565b3415610e8257610e827f000000000000000000000000000000000000000000000000000000000000000034611ab3565b336001600160a01b03881614610eea5760405162461bcd60e51b815260206004820152602760248201527f4c69737465642073656e64657220646f6573206e6f74206d61746368206d73676044820152661739b2b73232b960c91b6064820152608401610c82565b610ef48686612453565b6000610f04888888888888612513565b9050610f108183611ee2565b610f1a8184611fe1565b610f22612524565b610f2d888686612563565b60408051858152602081018790526001600160a01b038a16917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a25050505050505050565b336001600160a01b03871614610fe15760405162461bcd60e51b815260206004820152602560248201527f746f6b656e486f6c64657220646f6573206e6f74206d61746368206d73672e7360448201526432b73232b960d91b6064820152608401610c82565b60006001600160a01b03851661101857507f0000000000000000000000000000000000000000000000000000000000000000935060015b6000611027888888888861257d565b90506110338184611ee2565b61103d8185611fe1565b6110473388612116565b811561105c576110573386612375565b611067565b6110678633876125c4565b856001600160a01b0316886001600160a01b03167f41e79959bad1d45680578f8a544fb5af76d72b04090e65a51b4d0eaab959a9ab89886040516110b5929190918252602082015260400190565b60405180910390a35050505050505050565b6040805160608101825260ff85168152602080820185905291810183905260a086901c918691608087901c9187901c6bffffffffffffffffffffffff1690600888901c62ffffff16906000906001600160a01b0386161590811561114d577f00000000000000000000000000000000000000000000000000000000000000009650611162565b6111626001600160a01b03881633308b611b54565b60008061116d610844565b905060008167ffffffffffffffff81111561119857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111c1578160200160208202803683370190505b5090505b8183101561123457896001600160a01b03166111e0846114a1565b6001600160a01b0316146111f55760006111f7565b8a5b81848151811061121757634e487b7160e01b600052603260045260246000fd5b60209081029190910101528261122c81614a8a565b9350506111c5565b6000306001600160a01b031633838a8d8d8a60405160240161125b969594939291906145d0565b60408051601f198184030181529181526020820180516001600160e01b03166305250d7360e41b179052516112909190614538565b600060405180830381855af49150503d80600081146112cb576040519150601f19603f3d011682016040523d82523d6000602084013e6112d0565b606091505b50509050806113215760405162461bcd60e51b815260206004820152601760248201527f436c69707065723a204465706f736974206661696c65640000000000000000006044820152606401610c82565b50505050505050505050505050505050565b3415611363576113637f000000000000000000000000000000000000000000000000000000000000000034611ab3565b336001600160a01b03881614801561137f575061137f86610837565b6113bb5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610c82565b60006113c687612613565b9050858110156114185760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e206465706f7369740000000000006044820152606401610c82565b60006114288989898989896126a6565b90506114348184611ee2565b61143e8185611fe1565b611447886122e2565b611452898787612563565b60408051868152602081018890526001600160a01b038b16917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a2505050505050505050565b60006108196007836126b7565b60606004805461078290614a55565b600033816114cb8286611607565b90508381101561152b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610c82565b6115388286868403611677565b506001949350505050565b61082f868686868686600061179b565b6000336108138185856118e5565b6115766001600160a01b038716333088611b54565b61082f33878787878787611333565b61159a6001600160a01b03891633308a611b54565b60405163132da19360e21b81523090634cb6864c906115cb908b908b908b908b908b908b908b908b9060040161462e565b600060405180830381600087803b1580156115e557600080fd5b505af11580156115f9573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03811660009081526009602052604081206001810154158015906109f757505442101592915050565b60006109f7836001600160a01b0384166126c3565b6001600160a01b0383166116d95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610c82565b6001600160a01b03821661173a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610c82565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040805160608101825260008082526020820181905291810182905260a089811c928a92918a901c918a916001600160ff1b038816906117e060ff8a901c601b6147f8565b6040805160608101825260ff9092168252602082018c905281019290925250905085801561181657506001600160a01b03841615155b15611830576118306001600160a01b038516333088611b54565b6115f9848387868e8e87612712565b6001600160a01b038116600090815260018301602052604081205415156109f7565b6000610819825490565b60006118778484611607565b905060001981146118df57818110156118d25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610c82565b6118df8484848403611677565b50505050565b6001600160a01b0383166119495760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610c82565b6001600160a01b0382166119ab5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610c82565b6001600160a01b03831660009081526020819052604090205481811015611a235760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610c82565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611a5a9084906147e0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611aa691815260200190565b60405180910390a36118df565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611b00576040519150601f19603f3d011682016040523d82523d6000602084013e611b05565b606091505b5050905080611b4f5760405162461bcd60e51b815260206004820152601660248201527510d85b1b081dda5d1a081d985b1d594819985a5b195960521b6044820152606401610c82565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526118df9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612857565b600080611bcb86610837565b8015611bdb5750611bdb85610837565b611c275760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e73206e6f742070726573656e7420696e20706f6f6c0000000000006044820152606401610c82565b611c3086612613565b9150611c3d848385612929565b905094509492505050565b6000611c756040518060800160405280600081526020016000815260200160008152602001600081525090565b6001600160a01b038781166000818152600660208181526040808420548752948a168352908152908390205484820152825163313ce56760e01b8152835160c088901c9467ffffffffffffffff60808a901c81169561ffff60308c901c8116968c811c90911695938c901c90921693909263313ce567926004808301939192829003018186803b158015611d0857600080fd5b505afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190614463565b611d4b906012614a06565b611d5690600a6148a2565b866040018181525050896001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9857600080fd5b505afa158015611dac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd09190614463565b611ddb906012614a06565b611de690600a6148a2565b60608701526040860151611e3d90611dfe908d6149d0565b604088015188518891611e10916149d0565b868a606001518e611e2191906149d0565b898c606001518d60200151611e3691906149d0565b89896129b2565b611e825760405162461bcd60e51b8152602060048201526016602482015275125b9d985c9a585b9d0818da1958dac819985a5b195960521b6044820152606401610c82565b505063ffffffff9095169998505050505050505050565b600080611eaa888888888888612b67565b9050611ed67f000000000000000000000000000000000000000000000000000000000000000082612c9f565b98975050505050505050565b6000600183611ef46020850185614447565b604080516000815260208181018084529490945260ff9092168282015291850135606082015290840135608082015260a0016020604051602081039080840390855afa158015611f48573d6000803e3d6000fd5b5050506020604051035190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614611b4f5760405162461bcd60e51b815260206004820152602360248201527f4d657373616765207369676e656420627920696e636f7272656374206164647260448201526265737360e81b6064820152608401610c82565b6000828152600a602052604090205460ff16156120405760405162461bcd60e51b815260206004820152601e60248201527f4d6573736167652064696765737420616c72656164792070726573656e7400006044820152606401610c82565b428110156120a15760405162461bcd60e51b815260206004820152602860248201527f4d65737361676520726563656976656420616674657220616c6c6f77656420746044820152670696d657374616d760c41b6064820152608401610c82565b506000908152600a60205260409020805460ff19166001179055565b600260055414156120e05760405162461bcd60e51b8152600401610c829061477f565b60026005556120ee846122e2565b6121026001600160a01b0384168383612cdf565b61210b836122e2565b505060016005555050565b6001600160a01b0382166121765760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610c82565b6001600160a01b038216600090815260208190526040902054818110156121ea5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610c82565b6001600160a01b03831660009081526020819052604081208383039055600280548492906122199084906149ef565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000806000612271610844565b90505b808210156118df576000612287836114a1565b90506402540be4006122ae826001600160a01b031660009081526006602052604090205490565b6122b890876149d0565b6122c2919061484b565b93506122cf8133866125c4565b826122d981614a8a565b93505050612274565b6040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b15801561232157600080fd5b505afa158015612335573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235991906143bc565b6001600160a01b03909116600090815260066020526040902055565b600260055414156123985760405162461bcd60e51b8152600401610c829061477f565b6002600555604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156123ff57600080fd5b505af1158015612413573d6000803e3d6000fd5b505050506124407f00000000000000000000000000000000000000000000000000000000000000006122e2565b61244a8282611ab3565b50506001600555565b6000815b808210156118df57600084848481811061248157634e487b7160e01b600052603260045260246000fd5b905060200201359050600081111561250057600061249e846114a1565b905060006124ab82612613565b9050828110156124fd5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e206465706f7369740000000000006044820152606401610c82565b50505b8261250a81614a8a565b93505050612457565b600080611eaa888888888888612d0f565b6000806125316007611861565b90505b8082101561255f5761254d612548836114a1565b6122e2565b8161255781614a8a565b925050612534565b5050565b8161257257611b4f8382612e43565b611b4f838383612f22565b60008061258d8787878787613096565b90506125b97f000000000000000000000000000000000000000000000000000000000000000082612c9f565b979650505050505050565b600260055414156125e75760405162461bcd60e51b8152600401610c829061477f565b60026005556126006001600160a01b0384168383612cdf565b612609836122e2565b5050600160055550565b6001600160a01b0381166000818152600660205260408082205490516370a0823160e01b8152306004820152919290916370a082319060240160206040518083038186803b15801561266457600080fd5b505afa158015612678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269c91906143bc565b61081991906149ef565b600080611eaa8888888888886131b3565b60006109f783836132b4565b600081815260018301602052604081205461270a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610819565b506000610819565b6040805160a084901c602082015283916000910160408051601f1981840301815291905290506001600160a01b0389166127ac576040516309ea6d0960e21b815230906327a9b42490612775908b908b908b908b9089908b908a90600401614698565b600060405180830381600087803b15801561278f57600080fd5b505af11580156127a3573d6000803e3d6000fd5b50505050610d01565b6001600160a01b0388166127e95760405163132da19360e21b81523090634cb6864c90612775908c908b908b908b9089908b908a90600401614698565b604051630ad9469b60e21b81523090632b651a6c9061281a908c908c908c908c908c908a908c908b90600401614554565b600060405180830381600087803b15801561283457600080fd5b505af1158015612848573d6000803e3d6000fd5b50505050505050505050505050565b60006128ac826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132ec9092919063ffffffff16565b805190915015611b4f57808060200190518101906128ca9190614384565b611b4f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c82565b60008383141561293a5750806109f7565b60008461294c856402540be4006149d0565b612956919061484b565b905061296b6402540be4006302faf0806147e0565b81106129a2576402540be40083612986826302faf0806147e0565b61299091906149d0565b61299a919061484b565b9150506109f7565b6402540be40061299084836149d0565b60008080806305f5e1006129c68c8e6149d0565b6129d0919061484b565b905060006129e76129e18c846149d0565b87613303565b90508015612a195780612a0283670de0b6b3a76400006149d0565b612a0c919061484b565b612a1690856147e0565b93505b60006305f5e100612a2a8a8c6149d0565b612a34919061484b565b90506000612a4b612a458a846149d0565b89613303565b90508015612a7d5780612a6683670de0b6b3a76400006149d0565b612a70919061484b565b612a7a90876147e0565b95505b5050505060006305f5e1008d8c612a9491906147e0565b612a9e908e6149d0565b612aa8919061484b565b90506000612ab96129e18c846149d0565b90508015612aeb5780612ad483670de0b6b3a76400006149d0565b612ade919061484b565b612ae890846147e0565b92505b60006305f5e100612afc8c8b6149ef565b612b06908c6149d0565b612b10919061484b565b90506000612b21612a458a846149d0565b90508015612b535780612b3c83670de0b6b3a76400006149d0565b612b46919061484b565b612b5090866147e0565b94505b50505091109b9a5050505050505050505050565b6000604051602001612c26907f4f66666572537472756374286164647265737320696e7075745f746f6b656e2c81527f61646472657373206f75747075745f746f6b656e2c75696e7432353620696e7060208201527f75745f616d6f756e742c75696e74323536206f75747075745f616d6f756e742c60408201527f75696e7432353620676f6f645f756e74696c2c6164647265737320646573746960608201526e6e6174696f6e5f616464726573732960881b6080820152608f0190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03808a169183019190915280881660608301526080820187905260a0820186905260c08201859052831660e0820152610100015b6040516020818303038152906040528051906020012090509695505050505050565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6040516001600160a01b038316602482015260448101829052611b4f90849063a9059cbb60e01b90606401611b88565b6000808686604051602001612d2592919061450e565b604051602081830303815290604052805190602001209050604051602001612dd7907f4465706f73697453747275637428616464726573732073656e6465722c75696e81527f743235365b5d206465706f7369745f616d6f756e74732c75696e74323536206460208201527f6179735f6c6f636b65642c75696e7432353620706f6f6c5f746f6b656e732c75604082015271696e7432353620676f6f645f756e74696c2960701b606082015260720190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038a1690820152606081018290526080810186905260a0810185905260c0810184905260e001604051602081830303815290604052805190602001209150509695505050505050565b6001600160a01b038216612e995760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610c82565b8060026000828254612eab91906147e0565b90915550506001600160a01b03821660009081526020819052604081208054839290612ed89084906147e0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008211612fad5760405162461bcd60e51b815260206004820152604c60248201527f436c69707065724469726563743a2043616e6e6f74206372656174652076657360448201527f74696e67206465706f73697420776974686f757420706f73697469766520766560648201526b1cdd1a5b99c81c195c9a5bd960a21b608482015260a401610c82565b6001600160a01b038316600090815260096020526040902060010154156130355760405162461bcd60e51b815260206004820152603660248201527f436c69707065724469726563743a204465706f7369746f7220616c7265616479604482015275081a185cc8185b881858dd1a5d994819195c1bdcda5d60521b6064820152608401610c82565b60006040518060400160405280846201518061305191906149d0565b61305b90426147e0565b815260209081018490526001600160a01b03861660009081526009825260409020825181559082015160019091015590506118df3083612e43565b600060405160200161314c907f5769746864726177616c537472756374286164647265737320746f6b656e5f6881527f6f6c6465722c75696e7432353620706f6f6c5f746f6b656e5f616d6f756e745f60208201527f746f5f6275726e2c616464726573732061737365745f616464726573732c756960408201527f6e743235362061737365745f616d6f756e742c75696e7432353620676f6f645f606082015265756e74696c2960d01b608082015260860190565b60408051808303601f190181528282528051602091820120818401526001600160a01b039889168383015260608301979097529490961660808701525060a085019190915260c0808501919091528151808503909101815260e09093019052815191012090565b600060405160200161325a907f53696e676c654465706f73697453747275637428616464726573732073656e6481527f65722c6164647265737320746f6b656e2c75696e7432353620616d6f756e742c60208201527f75696e7432353620646179735f6c6f636b65642c75696e7432353620706f6f6c60408201527f5f746f6b656e732c75696e7432353620676f6f645f756e74696c2900000000006060820152607b0190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03808a1691830191909152871660608201526080810186905260a0810185905260c0810184905260e0810183905261010001612c7d565b60008260000182815481106132d957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606132fb848460008561334f565b949350505050565b60008261331257506000610819565b613348670de0b6b3a764000061332f61332a86613475565b6134e3565b613339908561494d565b613343919061481d565b6134ee565b9050610819565b6060824710156133b05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c82565b6001600160a01b0385163b6134075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c82565b600080866001600160a01b031685876040516134239190614538565b60006040518083038185875af1925050503d8060008114613460576040519150601f19603f3d011682016040523d82523d6000602084013e613465565b606091505b50915091506125b9828286613501565b60006001600160ff1b038211156134df5760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401610c82565b5090565b60006108198261353a565b60006108196134fc83613619565b6136c4565b606083156135105750816109f7565b8251156135205782518084602001fd5b8160405162461bcd60e51b8152600401610c82919061476c565b600080821361355f5760405163309fa7dd60e11b815260048101839052602401610c82565b6000670de0b6b3a7640000831261357857506001613592565b6000199050826ec097ce7bc90715b34b9f10000000000492505b60006135a7670de0b6b3a76400008505613716565b670de0b6b3a7640000808202945090915084821d908114156135cb57505002919050565b6706f05b59d3b200005b600081131561361057670de0b6b3a7640000828002059150671bc16d674ec800008212613608579384019360019190911d905b60011d6135d5565b50505002919050565b60008082121561367b5768033dd1780914b971141982121561363d57506000919050565b61364982600003613619565b6ec097ce7bc90715b34b9f10000000008161367457634e487b7160e01b600052601260045260246000fd5b0592915050565b680a688906bd8b00000082126136a75760405163e69458f960e01b815260048101839052602401610c82565b670de0b6b3a7640000604083901b046109f7816137fa565b919050565b6000808212156134df5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610c82565b6000600160801b821061373657608091821c9161373390826147e0565b90505b68010000000000000000821061375957604091821c9161375690826147e0565b90505b640100000000821061377857602091821c9161377590826147e0565b90505b62010000821061379557601091821c9161379290826147e0565b90505b61010082106137b157600891821c916137ae90826147e0565b90505b601082106137cc57600491821c916137c990826147e0565b90505b600482106137e757600291821c916137e490826147e0565b90505b600282106136bf576108196001826147e0565b600160bf1b67800000000000000082161561381e5768016a09e667f3bcc9090260401c5b67400000000000000082161561383d576801306fe0a31b7152df0260401c5b67200000000000000082161561385c576801172b83c7d517adce0260401c5b67100000000000000082161561387b5768010b5586cf9890f62a0260401c5b67080000000000000082161561389a576801059b0d31585743ae0260401c5b6704000000000000008216156138b957680102c9a3e778060ee70260401c5b6702000000000000008216156138d85768010163da9fb33356d80260401c5b6701000000000000008216156138f757680100b1afa5abcbed610260401c5b66800000000000008216156139155768010058c86da1c09ea20260401c5b6640000000000000821615613933576801002c605e2e8cec500260401c5b662000000000000082161561395157680100162f3904051fa10260401c5b661000000000000082161561396f576801000b175effdc76ba0260401c5b660800000000000082161561398d57680100058ba01fb9f96d0260401c5b66040000000000008216156139ab5768010002c5cc37da94920260401c5b66020000000000008216156139c9576801000162e525ee05470260401c5b66010000000000008216156139e75768010000b17255775c040260401c5b65800000000000821615613a04576801000058b91b5bc9ae0260401c5b65400000000000821615613a2157680100002c5c89d5ec6d0260401c5b65200000000000821615613a3e5768010000162e43f4f8310260401c5b65100000000000821615613a5b57680100000b1721bcfc9a0260401c5b65080000000000821615613a785768010000058b90cf1e6e0260401c5b65040000000000821615613a95576801000002c5c863b73f0260401c5b65020000000000821615613ab257680100000162e430e5a20260401c5b65010000000000821615613acf576801000000b1721835510260401c5b648000000000821615613aeb57680100000058b90c0b490260401c5b644000000000821615613b075768010000002c5c8601cc0260401c5b642000000000821615613b23576801000000162e42fff00260401c5b641000000000821615613b3f5768010000000b17217fbb0260401c5b640800000000821615613b5b576801000000058b90bfce0260401c5b640400000000821615613b7757680100000002c5c85fe30260401c5b640200000000821615613b935768010000000162e42ff10260401c5b640100000000821615613baf57680100000000b17217f80260401c5b6380000000821615613bca5768010000000058b90bfc0260401c5b6340000000821615613be5576801000000002c5c85fe0260401c5b6320000000821615613c0057680100000000162e42ff0260401c5b6310000000821615613c1b576801000000000b17217f0260401c5b6308000000821615613c3657680100000000058b90c00260401c5b6304000000821615613c515768010000000002c5c8600260401c5b6302000000821615613c6c576801000000000162e4300260401c5b6301000000821615613c875768010000000000b172180260401c5b62800000821615613ca1576801000000000058b90c0260401c5b62400000821615613cbb57680100000000002c5c860260401c5b62200000821615613cd55768010000000000162e430260401c5b62100000821615613cef57680100000000000b17210260401c5b62080000821615613d095768010000000000058b910260401c5b62040000821615613d23576801000000000002c5c80260401c5b62020000821615613d3d57680100000000000162e40260401c5b62010000821615613d57576801000000000000b1720260401c5b618000821615613d7057680100000000000058b90260401c5b614000821615613d895768010000000000002c5d0260401c5b612000821615613da2576801000000000000162e0260401c5b611000821615613dbb5768010000000000000b170260401c5b610800821615613dd4576801000000000000058c0260401c5b610400821615613ded57680100000000000002c60260401c5b610200821615613e0657680100000000000001630260401c5b610100821615613e1f57680100000000000000b10260401c5b6080821615613e3757680100000000000000590260401c5b6040821615613e4f576801000000000000002c0260401c5b6020821615613e6757680100000000000000160260401c5b6010821615613e7f576801000000000000000b0260401c5b6008821615613e9757680100000000000000060260401c5b6004821615613eaf57680100000000000000030260401c5b6002821615613ec757680100000000000000010260401c5b6001821615613edf57680100000000000000010260401c5b670de0b6b3a76400000260409190911c60bf031c90565b80356001600160a01b03811681146136bf57600080fd5b60008083601f840112613f1e578182fd5b50813567ffffffffffffffff811115613f35578182fd5b6020830191508360208260051b8501011115613f5057600080fd5b9250929050565b60008083601f840112613f68578182fd5b50813567ffffffffffffffff811115613f7f578182fd5b602083019150836020828501011115613f5057600080fd5b600060608284031215613fa8578081fd5b50919050565b600060208284031215613fbf578081fd5b6109f782613ef6565b60008060408385031215613fda578081fd5b613fe383613ef6565b9150613ff160208401613ef6565b90509250929050565b60008060006060848603121561400e578081fd5b61401784613ef6565b925061402560208501613ef6565b9150604084013590509250925092565b60008060008060008060008060006101408a8c031215614053578485fd5b61405c8a613ef6565b985061406a60208b01613ef6565b975060408a0135965060608a0135955060808a0135945061408d60a08b01613ef6565b935061409c8b60c08c01613f97565b92506101208a013567ffffffffffffffff8111156140b8578283fd5b6140c48c828d01613f57565b915080935050809150509295985092959850929598565b6000806000806000806000610120888a0312156140f6578283fd5b6140ff88613ef6565b965061410d60208901613ef6565b955060408801359450606088013593506080880135925060a088013591506141388960c08a01613f97565b905092959891949750929550565b6000806000806000806000610100888a031215614161578283fd5b61416a88613ef6565b9650602088013567ffffffffffffffff811115614185578384fd5b6141918a828b01613f0d565b9097509550506040880135935060608801359250608088013591506141388960a08a01613f97565b600080604083850312156141cb578182fd5b6141d483613ef6565b946020939093013593505050565b60008060008060008061010087890312156141fb578182fd5b61420487613ef6565b95506020870135945061421960408801613ef6565b935060608701359250608087013591506142368860a08901613f97565b90509295509295509295565b600080600080600080600080610120898b03121561425e578182fd5b61426789613ef6565b975060208901359650604089013595506060890135945061428a60808a01613ef6565b93506142998a60a08b01613f97565b925061010089013567ffffffffffffffff8111156142b5578283fd5b6142c18b828c01613f57565b999c989b5096995094979396929594505050565b60008060008060008061010087890312156142ee578384fd5b6142f787613ef6565b9550602087013594506040870135935060608701359250608087013591506142368860a08901613f97565b60008060008060008060e0878903121561433a578384fd5b863567ffffffffffffffff811115614350578485fd5b61435c89828a01613f0d565b9097509550506020870135935060408701359250606087013591506142368860808901613f97565b600060208284031215614395578081fd5b815180151581146109f7578182fd5b6000602082840312156143b5578081fd5b5035919050565b6000602082840312156143cd578081fd5b5051919050565b600080600080608085870312156143e9578182fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060c0878903121561441d578384fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600060208284031215614458578081fd5b81356109f781614ad1565b600060208284031215614474578081fd5b81516109f781614ad1565b6000815180845260208085019450808401835b838110156144ae57815187529582019590820190600101614492565b509495945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526144fa816020860160208601614a29565b601f01601f19169290920160200192915050565b60006001600160fb1b03831115614523578081fd5b8260051b808584379190910190815292915050565b6000825161454a818460208701614a29565b9190910192915050565b6001600160a01b0389811682528881166020830152604082018890526060820187905260808201869052841660a082015260006101406145ae60c0840186805160ff16825260208082015190830152604090810151910152565b806101208401526145c1818401856144e2565b9b9a5050505050505050505050565b6001600160a01b0387168152610100602082018190526000906145f58382018961447f565b9150508560408301528460608301528360808301526125b960a0830184805160ff16825260208082015190830152604090810151910152565b6001600160a01b038981168252602082018990526040820188905260608201879052851660808201526000610120853561466781614ad1565b60ff1660a0840152602086013560c0840152604086013560e084015261010083018190526145c181840185876144b9565b6001600160a01b03888116825260208083018990526040808401899052606084018890529186166080840152845160ff1660a084015284015160c083015283015160e08201526000610120806101008401526146f6818401856144e2565b9a9950505050505050505050565b606081526000614717606083018661447f565b828103602084810191909152855180835286820192820190845b818110156147565784516001600160a01b031683529383019391830191600101614731565b5050809350505050826040830152949350505050565b6020815260006109f760208301846144e2565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b8481528360208201526060604082015260006147d66060830184866144b9565b9695505050505050565b600082198211156147f3576147f3614aa5565b500190565b600060ff821660ff84168060ff0382111561481557614815614aa5565b019392505050565b60008261482c5761482c614abb565b600160ff1b82146000198414161561484657614846614aa5565b500590565b60008261485a5761485a614abb565b500490565b600181815b8085111561489a57816000190482111561488057614880614aa5565b8085161561488d57918102915b93841c9390800290614864565b509250929050565b60006109f760ff8416836000826148bb57506001610819565b816148c857506000610819565b81600181146148de57600281146148e857614904565b6001915050610819565b60ff8411156148f9576148f9614aa5565b50506001821b610819565b5060208310610133831016604e8410600b8410161715614927575081810a610819565b614931838361485f565b806000190482111561494557614945614aa5565b029392505050565b60006001600160ff1b038184138284138082168684048611161561497357614973614aa5565b600160ff1b8487128281168783058912161561499157614991614aa5565b8587129250878205871284841616156149ac576149ac614aa5565b878505871281841616156149c2576149c2614aa5565b505050929093029392505050565b60008160001904831182151516156149ea576149ea614aa5565b500290565b600082821015614a0157614a01614aa5565b500390565b600060ff821660ff841680821015614a2057614a20614aa5565b90039392505050565b60005b83811015614a44578181015183820152602001614a2c565b838111156118df5750506000910152565b600181811c90821680614a6957607f821691505b60208210811415613fa857634e487b7160e01b600052602260045260246000fd5b6000600019821415614a9e57614a9e614aa5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60ff81168114614ae057600080fd5b5056fea2646970667358221220b7c6a17716b0b195f1d2657f6cd0f179ee9947eec560bf6ca6a15e1bdccd167164736f6c6343000804003300000000000000000000000008938a61ba9523298dbcacee0cda5b371fb7f1f800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da10000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f

Deployed Bytecode

0x60806040526004361061021e5760003560e01c80634cb6864c1161012357806395d89b41116100ab578063c325a5491161006f578063c325a5491461069d578063c72da66a146106e6578063dd62ed3e14610706578063eb1c645314610726578063ecc7633d1461074657600080fd5b806395d89b4114610615578063a457c2d71461062a578063a7d46c2f1461064a578063a9059cbb1461065d578063c0d5ebfd1461067d57600080fd5b806366d5d61b116100f257806366d5d61b1461056557806370a082311461057857806387e08c25146105ae5780638dda8f3f146105c157806392a91a3a146105f557600080fd5b80634cb6864c146104c65780635250d730146104e65780635aecdda5146104f957806362fb4e011461054557600080fd5b806329d0c8fc116101a6578063368dfc1811610175578063368dfc18146103d75780633721f29c146103f7578063377a368c1461047157806339509351146104865780633b26e4eb146104a657600080fd5b806329d0c8fc146103455780632b651a6c14610365578063313ce5671461038557806334cb3d7f146103a157600080fd5b806319f37361116101ed57806319f37361146102b95780631b6a8759146102d95780631dc6f5a5146102ee57806323b872dd1461031257806327a9b4241461033257600080fd5b806306fdde031461022a578063095ea7b3146102555780630ce9a63d1461028557806318160ddd1461029a57600080fd5b3661022557005b600080fd5b34801561023657600080fd5b5061023f610773565b60405161024c919061476c565b60405180910390f35b34801561026157600080fd5b506102756102703660046141b9565b610805565b604051901515815260200161024c565b610298610293366004614405565b61081f565b005b3480156102a657600080fd5b506002545b60405190815260200161024c565b3480156102c557600080fd5b506102756102d4366004613fae565b610837565b3480156102e557600080fd5b506102ab610844565b3480156102fa57600080fd5b50610303610855565b60405161024c93929190614704565b34801561031e57600080fd5b5061027561032d366004613ffa565b6109d8565b610298610340366004614242565b6109fe565b34801561035157600080fd5b50610298610360366004614322565b610a63565b34801561037157600080fd5b50610298610380366004614035565b610ae5565b34801561039157600080fd5b506040516012815260200161024c565b3480156103ad57600080fd5b506102ab6103bc366004613fae565b6001600160a01b031660009081526006602052604090205490565b3480156103e357600080fd5b506102986103f23660046143a4565b610ba5565b34801561040357600080fd5b506104496104123660046143a4565b60c081901c9167ffffffffffffffff608083901c81169261ffff603082901c811693602083901c9091169260409290921c90911690565b604080519586526020860194909452928401919091526060830152608082015260a00161024c565b34801561047d57600080fd5b506102ab610c1d565b34801561049257600080fd5b506102756104a13660046141b9565b610cb9565b3480156104b257600080fd5b506102986104c1366004614035565b610cdb565b3480156104d257600080fd5b506102986104e1366004614242565b610d0c565b6102986104f4366004614146565b610e52565b34801561050557600080fd5b5061052d7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab181565b6040516001600160a01b03909116815260200161024c565b34801561055157600080fd5b506102986105603660046141e2565b610f7b565b6102986105733660046143d4565b6110c7565b34801561058457600080fd5b506102ab610593366004613fae565b6001600160a01b031660009081526020819052604090205490565b6102986105bc3660046140db565b611333565b3480156105cd57600080fd5b5061052d7f00000000000000000000000008938a61ba9523298dbcacee0cda5b371fb7f1f881565b34801561060157600080fd5b5061052d6106103660046143a4565b6114a1565b34801561062157600080fd5b5061023f6114ae565b34801561063657600080fd5b506102756106453660046141b9565b6114bd565b610298610658366004614405565b611543565b34801561066957600080fd5b506102756106783660046141b9565b611553565b34801561068957600080fd5b506102986106983660046142d5565b611561565b3480156106a957600080fd5b506106d16106b8366004613fae565b6009602052600090815260409020805460019091015482565b6040805192835260208301919091520161024c565b3480156106f257600080fd5b50610298610701366004614242565b611585565b34801561071257600080fd5b506102ab610721366004613fc8565b611607565b34801561073257600080fd5b50610275610741366004613fae565b611632565b34801561075257600080fd5b506102ab610761366004613fae565b60066020526000908152604090205481565b60606003805461078290614a55565b80601f01602080910402602001604051908101604052809291908181526020018280546107ae90614a55565b80156107fb5780601f106107d0576101008083540402835291602001916107fb565b820191906000526020600020905b8154815290600101906020018083116107de57829003601f168201915b5050505050905090565b600033610813818585611677565b60019150505b92915050565b61082f868686868686600161179b565b505050505050565b600061081960078361183f565b60006108506007611861565b905090565b606080600080610863610844565b905060008167ffffffffffffffff81111561088e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156108b7578160200160208202803683370190505b50905060008267ffffffffffffffff8111156108e357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561090c578160200160208202803683370190505b50905060005b838110156109be576000610925826114a1565b9050610946816001600160a01b031660009081526006602052604090205490565b84838151811061096657634e487b7160e01b600052603260045260246000fd5b6020026020010181815250508083838151811061099357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015250806109b681614a8a565b915050610912565b5081816109ca60025490565b955095509550505050909192565b6000336109e685828561186b565b6109f18585856118e5565b60019150505b9392505050565b610a287f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab188611ab3565b610a597f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab18989898989898989610ae5565b5050505050505050565b6000855b80821015610ad6576000888884818110610a9157634e487b7160e01b600052603260045260246000fd5b9050602002013590506000811115610ac357610ac3333083610ab2876114a1565b6001600160a01b0316929190611b54565b82610acd81614a8a565b93505050610a67565b610a5933898989898989610e52565b600080610af48b8b8b8b611bbf565b915091506000610b078c848d858c611c48565b90506000610b198d8d8d8d8d8d611e99565b9050610b258188611ee2565b610b2f8183611fe1565b610b3b8d8d8a866120bd565b876001600160a01b03168c6001600160a01b03168e6001600160a01b03167f4be05c8d54f5e056ab2cfa033e9f582057001268c3e28561bb999d35d2c8f2c887878b8b604051610b8e94939291906147b6565b60405180910390a450505050505050505050505050565b6000610bb060025490565b610bbf836402540be4006149d0565b610bc9919061484b565b9050610bd53383612116565b610bde81612264565b604080518381526020810183905233917f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6910160405180910390a25050565b6000610c2833611632565b610c8b5760405162461bcd60e51b815260206004820152602960248201527f436c69707065724469726563743a204465706f7369742063616e6e6f74206265604482015268081d5b9b1bd8dad95960ba1b60648201526084015b60405180910390fd5b50336000818152600960205260408120600181018054918390559190915590610cb6903090836118e5565b90565b600033610813818585610ccc8383611607565b610cd691906147e0565b611677565b610cf06001600160a01b038a1633308a611b54565b610d01898989898989898989610ae5565b505050505050505050565b600080610d3b8a7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab18b8b611bbf565b915091506000610d6e8b847f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1858c611c48565b90506000610da08c7f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab18d8d8d8d611e99565b9050610dac8188611ee2565b610db68183611fe1565b610dbf8c6122e2565b610dc98884612375565b876001600160a01b03167f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab16001600160a01b03168d6001600160a01b03167f4be05c8d54f5e056ab2cfa033e9f582057001268c3e28561bb999d35d2c8f2c887878b8b604051610e3c94939291906147b6565b60405180910390a4505050505050505050505050565b3415610e8257610e827f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab134611ab3565b336001600160a01b03881614610eea5760405162461bcd60e51b815260206004820152602760248201527f4c69737465642073656e64657220646f6573206e6f74206d61746368206d73676044820152661739b2b73232b960c91b6064820152608401610c82565b610ef48686612453565b6000610f04888888888888612513565b9050610f108183611ee2565b610f1a8184611fe1565b610f22612524565b610f2d888686612563565b60408051858152602081018790526001600160a01b038a16917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a25050505050505050565b336001600160a01b03871614610fe15760405162461bcd60e51b815260206004820152602560248201527f746f6b656e486f6c64657220646f6573206e6f74206d61746368206d73672e7360448201526432b73232b960d91b6064820152608401610c82565b60006001600160a01b03851661101857507f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1935060015b6000611027888888888861257d565b90506110338184611ee2565b61103d8185611fe1565b6110473388612116565b811561105c576110573386612375565b611067565b6110678633876125c4565b856001600160a01b0316886001600160a01b03167f41e79959bad1d45680578f8a544fb5af76d72b04090e65a51b4d0eaab959a9ab89886040516110b5929190918252602082015260400190565b60405180910390a35050505050505050565b6040805160608101825260ff85168152602080820185905291810183905260a086901c918691608087901c9187901c6bffffffffffffffffffffffff1690600888901c62ffffff16906000906001600160a01b0386161590811561114d577f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab19650611162565b6111626001600160a01b03881633308b611b54565b60008061116d610844565b905060008167ffffffffffffffff81111561119857634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156111c1578160200160208202803683370190505b5090505b8183101561123457896001600160a01b03166111e0846114a1565b6001600160a01b0316146111f55760006111f7565b8a5b81848151811061121757634e487b7160e01b600052603260045260246000fd5b60209081029190910101528261122c81614a8a565b9350506111c5565b6000306001600160a01b031633838a8d8d8a60405160240161125b969594939291906145d0565b60408051601f198184030181529181526020820180516001600160e01b03166305250d7360e41b179052516112909190614538565b600060405180830381855af49150503d80600081146112cb576040519150601f19603f3d011682016040523d82523d6000602084013e6112d0565b606091505b50509050806113215760405162461bcd60e51b815260206004820152601760248201527f436c69707065723a204465706f736974206661696c65640000000000000000006044820152606401610c82565b50505050505050505050505050505050565b3415611363576113637f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab134611ab3565b336001600160a01b03881614801561137f575061137f86610837565b6113bb5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610c82565b60006113c687612613565b9050858110156114185760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e206465706f7369740000000000006044820152606401610c82565b60006114288989898989896126a6565b90506114348184611ee2565b61143e8185611fe1565b611447886122e2565b611452898787612563565b60408051868152602081018890526001600160a01b038b16917f73a19dd210f1a7f902193214c0ee91dd35ee5b4d920cba8d519eca65a7b488ca910160405180910390a2505050505050505050565b60006108196007836126b7565b60606004805461078290614a55565b600033816114cb8286611607565b90508381101561152b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610c82565b6115388286868403611677565b506001949350505050565b61082f868686868686600061179b565b6000336108138185856118e5565b6115766001600160a01b038716333088611b54565b61082f33878787878787611333565b61159a6001600160a01b03891633308a611b54565b60405163132da19360e21b81523090634cb6864c906115cb908b908b908b908b908b908b908b908b9060040161462e565b600060405180830381600087803b1580156115e557600080fd5b505af11580156115f9573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03811660009081526009602052604081206001810154158015906109f757505442101592915050565b60006109f7836001600160a01b0384166126c3565b6001600160a01b0383166116d95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610c82565b6001600160a01b03821661173a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610c82565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040805160608101825260008082526020820181905291810182905260a089811c928a92918a901c918a916001600160ff1b038816906117e060ff8a901c601b6147f8565b6040805160608101825260ff9092168252602082018c905281019290925250905085801561181657506001600160a01b03841615155b15611830576118306001600160a01b038516333088611b54565b6115f9848387868e8e87612712565b6001600160a01b038116600090815260018301602052604081205415156109f7565b6000610819825490565b60006118778484611607565b905060001981146118df57818110156118d25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610c82565b6118df8484848403611677565b50505050565b6001600160a01b0383166119495760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610c82565b6001600160a01b0382166119ab5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610c82565b6001600160a01b03831660009081526020819052604090205481811015611a235760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610c82565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611a5a9084906147e0565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611aa691815260200190565b60405180910390a36118df565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611b00576040519150601f19603f3d011682016040523d82523d6000602084013e611b05565b606091505b5050905080611b4f5760405162461bcd60e51b815260206004820152601660248201527510d85b1b081dda5d1a081d985b1d594819985a5b195960521b6044820152606401610c82565b505050565b6040516001600160a01b03808516602483015283166044820152606481018290526118df9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612857565b600080611bcb86610837565b8015611bdb5750611bdb85610837565b611c275760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e73206e6f742070726573656e7420696e20706f6f6c0000000000006044820152606401610c82565b611c3086612613565b9150611c3d848385612929565b905094509492505050565b6000611c756040518060800160405280600081526020016000815260200160008152602001600081525090565b6001600160a01b038781166000818152600660208181526040808420548752948a168352908152908390205484820152825163313ce56760e01b8152835160c088901c9467ffffffffffffffff60808a901c81169561ffff60308c901c8116968c811c90911695938c901c90921693909263313ce567926004808301939192829003018186803b158015611d0857600080fd5b505afa158015611d1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d409190614463565b611d4b906012614a06565b611d5690600a6148a2565b866040018181525050896001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611d9857600080fd5b505afa158015611dac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd09190614463565b611ddb906012614a06565b611de690600a6148a2565b60608701526040860151611e3d90611dfe908d6149d0565b604088015188518891611e10916149d0565b868a606001518e611e2191906149d0565b898c606001518d60200151611e3691906149d0565b89896129b2565b611e825760405162461bcd60e51b8152602060048201526016602482015275125b9d985c9a585b9d0818da1958dac819985a5b195960521b6044820152606401610c82565b505063ffffffff9095169998505050505050505050565b600080611eaa888888888888612b67565b9050611ed67fd7b85a890fa8c10dde71d0367d4b538ea069710be5e670de439260d7fbee0daf82612c9f565b98975050505050505050565b6000600183611ef46020850185614447565b604080516000815260208181018084529490945260ff9092168282015291850135606082015290840135608082015260a0016020604051602081039080840390855afa158015611f48573d6000803e3d6000fd5b5050506020604051035190507f00000000000000000000000008938a61ba9523298dbcacee0cda5b371fb7f1f86001600160a01b0316816001600160a01b031614611b4f5760405162461bcd60e51b815260206004820152602360248201527f4d657373616765207369676e656420627920696e636f7272656374206164647260448201526265737360e81b6064820152608401610c82565b6000828152600a602052604090205460ff16156120405760405162461bcd60e51b815260206004820152601e60248201527f4d6573736167652064696765737420616c72656164792070726573656e7400006044820152606401610c82565b428110156120a15760405162461bcd60e51b815260206004820152602860248201527f4d65737361676520726563656976656420616674657220616c6c6f77656420746044820152670696d657374616d760c41b6064820152608401610c82565b506000908152600a60205260409020805460ff19166001179055565b600260055414156120e05760405162461bcd60e51b8152600401610c829061477f565b60026005556120ee846122e2565b6121026001600160a01b0384168383612cdf565b61210b836122e2565b505060016005555050565b6001600160a01b0382166121765760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610c82565b6001600160a01b038216600090815260208190526040902054818110156121ea5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610c82565b6001600160a01b03831660009081526020819052604081208383039055600280548492906122199084906149ef565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000806000612271610844565b90505b808210156118df576000612287836114a1565b90506402540be4006122ae826001600160a01b031660009081526006602052604090205490565b6122b890876149d0565b6122c2919061484b565b93506122cf8133866125c4565b826122d981614a8a565b93505050612274565b6040516370a0823160e01b81523060048201526001600160a01b038216906370a082319060240160206040518083038186803b15801561232157600080fd5b505afa158015612335573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235991906143bc565b6001600160a01b03909116600090815260066020526040902055565b600260055414156123985760405162461bcd60e51b8152600401610c829061477f565b6002600555604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab16001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156123ff57600080fd5b505af1158015612413573d6000803e3d6000fd5b505050506124407f00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab16122e2565b61244a8282611ab3565b50506001600555565b6000815b808210156118df57600084848481811061248157634e487b7160e01b600052603260045260246000fd5b905060200201359050600081111561250057600061249e846114a1565b905060006124ab82612613565b9050828110156124fd5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e206465706f7369740000000000006044820152606401610c82565b50505b8261250a81614a8a565b93505050612457565b600080611eaa888888888888612d0f565b6000806125316007611861565b90505b8082101561255f5761254d612548836114a1565b6122e2565b8161255781614a8a565b925050612534565b5050565b8161257257611b4f8382612e43565b611b4f838383612f22565b60008061258d8787878787613096565b90506125b97fd7b85a890fa8c10dde71d0367d4b538ea069710be5e670de439260d7fbee0daf82612c9f565b979650505050505050565b600260055414156125e75760405162461bcd60e51b8152600401610c829061477f565b60026005556126006001600160a01b0384168383612cdf565b612609836122e2565b5050600160055550565b6001600160a01b0381166000818152600660205260408082205490516370a0823160e01b8152306004820152919290916370a082319060240160206040518083038186803b15801561266457600080fd5b505afa158015612678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269c91906143bc565b61081991906149ef565b600080611eaa8888888888886131b3565b60006109f783836132b4565b600081815260018301602052604081205461270a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610819565b506000610819565b6040805160a084901c602082015283916000910160408051601f1981840301815291905290506001600160a01b0389166127ac576040516309ea6d0960e21b815230906327a9b42490612775908b908b908b908b9089908b908a90600401614698565b600060405180830381600087803b15801561278f57600080fd5b505af11580156127a3573d6000803e3d6000fd5b50505050610d01565b6001600160a01b0388166127e95760405163132da19360e21b81523090634cb6864c90612775908c908b908b908b9089908b908a90600401614698565b604051630ad9469b60e21b81523090632b651a6c9061281a908c908c908c908c908c908a908c908b90600401614554565b600060405180830381600087803b15801561283457600080fd5b505af1158015612848573d6000803e3d6000fd5b50505050505050505050505050565b60006128ac826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132ec9092919063ffffffff16565b805190915015611b4f57808060200190518101906128ca9190614384565b611b4f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610c82565b60008383141561293a5750806109f7565b60008461294c856402540be4006149d0565b612956919061484b565b905061296b6402540be4006302faf0806147e0565b81106129a2576402540be40083612986826302faf0806147e0565b61299091906149d0565b61299a919061484b565b9150506109f7565b6402540be40061299084836149d0565b60008080806305f5e1006129c68c8e6149d0565b6129d0919061484b565b905060006129e76129e18c846149d0565b87613303565b90508015612a195780612a0283670de0b6b3a76400006149d0565b612a0c919061484b565b612a1690856147e0565b93505b60006305f5e100612a2a8a8c6149d0565b612a34919061484b565b90506000612a4b612a458a846149d0565b89613303565b90508015612a7d5780612a6683670de0b6b3a76400006149d0565b612a70919061484b565b612a7a90876147e0565b95505b5050505060006305f5e1008d8c612a9491906147e0565b612a9e908e6149d0565b612aa8919061484b565b90506000612ab96129e18c846149d0565b90508015612aeb5780612ad483670de0b6b3a76400006149d0565b612ade919061484b565b612ae890846147e0565b92505b60006305f5e100612afc8c8b6149ef565b612b06908c6149d0565b612b10919061484b565b90506000612b21612a458a846149d0565b90508015612b535780612b3c83670de0b6b3a76400006149d0565b612b46919061484b565b612b5090866147e0565b94505b50505091109b9a5050505050505050505050565b6000604051602001612c26907f4f66666572537472756374286164647265737320696e7075745f746f6b656e2c81527f61646472657373206f75747075745f746f6b656e2c75696e7432353620696e7060208201527f75745f616d6f756e742c75696e74323536206f75747075745f616d6f756e742c60408201527f75696e7432353620676f6f645f756e74696c2c6164647265737320646573746960608201526e6e6174696f6e5f616464726573732960881b6080820152608f0190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03808a169183019190915280881660608301526080820187905260a0820186905260c08201859052831660e0820152610100015b6040516020818303038152906040528051906020012090509695505050505050565b60405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6040516001600160a01b038316602482015260448101829052611b4f90849063a9059cbb60e01b90606401611b88565b6000808686604051602001612d2592919061450e565b604051602081830303815290604052805190602001209050604051602001612dd7907f4465706f73697453747275637428616464726573732073656e6465722c75696e81527f743235365b5d206465706f7369745f616d6f756e74732c75696e74323536206460208201527f6179735f6c6f636b65642c75696e7432353620706f6f6c5f746f6b656e732c75604082015271696e7432353620676f6f645f756e74696c2960701b606082015260720190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038a1690820152606081018290526080810186905260a0810185905260c0810184905260e001604051602081830303815290604052805190602001209150509695505050505050565b6001600160a01b038216612e995760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610c82565b8060026000828254612eab91906147e0565b90915550506001600160a01b03821660009081526020819052604081208054839290612ed89084906147e0565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60008211612fad5760405162461bcd60e51b815260206004820152604c60248201527f436c69707065724469726563743a2043616e6e6f74206372656174652076657360448201527f74696e67206465706f73697420776974686f757420706f73697469766520766560648201526b1cdd1a5b99c81c195c9a5bd960a21b608482015260a401610c82565b6001600160a01b038316600090815260096020526040902060010154156130355760405162461bcd60e51b815260206004820152603660248201527f436c69707065724469726563743a204465706f7369746f7220616c7265616479604482015275081a185cc8185b881858dd1a5d994819195c1bdcda5d60521b6064820152608401610c82565b60006040518060400160405280846201518061305191906149d0565b61305b90426147e0565b815260209081018490526001600160a01b03861660009081526009825260409020825181559082015160019091015590506118df3083612e43565b600060405160200161314c907f5769746864726177616c537472756374286164647265737320746f6b656e5f6881527f6f6c6465722c75696e7432353620706f6f6c5f746f6b656e5f616d6f756e745f60208201527f746f5f6275726e2c616464726573732061737365745f616464726573732c756960408201527f6e743235362061737365745f616d6f756e742c75696e7432353620676f6f645f606082015265756e74696c2960d01b608082015260860190565b60408051808303601f190181528282528051602091820120818401526001600160a01b039889168383015260608301979097529490961660808701525060a085019190915260c0808501919091528151808503909101815260e09093019052815191012090565b600060405160200161325a907f53696e676c654465706f73697453747275637428616464726573732073656e6481527f65722c6164647265737320746f6b656e2c75696e7432353620616d6f756e742c60208201527f75696e7432353620646179735f6c6f636b65642c75696e7432353620706f6f6c60408201527f5f746f6b656e732c75696e7432353620676f6f645f756e74696c2900000000006060820152607b0190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03808a1691830191909152871660608201526080810186905260a0810185905260c0810184905260e0810183905261010001612c7d565b60008260000182815481106132d957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606132fb848460008561334f565b949350505050565b60008261331257506000610819565b613348670de0b6b3a764000061332f61332a86613475565b6134e3565b613339908561494d565b613343919061481d565b6134ee565b9050610819565b6060824710156133b05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610c82565b6001600160a01b0385163b6134075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c82565b600080866001600160a01b031685876040516134239190614538565b60006040518083038185875af1925050503d8060008114613460576040519150601f19603f3d011682016040523d82523d6000602084013e613465565b606091505b50915091506125b9828286613501565b60006001600160ff1b038211156134df5760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401610c82565b5090565b60006108198261353a565b60006108196134fc83613619565b6136c4565b606083156135105750816109f7565b8251156135205782518084602001fd5b8160405162461bcd60e51b8152600401610c82919061476c565b600080821361355f5760405163309fa7dd60e11b815260048101839052602401610c82565b6000670de0b6b3a7640000831261357857506001613592565b6000199050826ec097ce7bc90715b34b9f10000000000492505b60006135a7670de0b6b3a76400008505613716565b670de0b6b3a7640000808202945090915084821d908114156135cb57505002919050565b6706f05b59d3b200005b600081131561361057670de0b6b3a7640000828002059150671bc16d674ec800008212613608579384019360019190911d905b60011d6135d5565b50505002919050565b60008082121561367b5768033dd1780914b971141982121561363d57506000919050565b61364982600003613619565b6ec097ce7bc90715b34b9f10000000008161367457634e487b7160e01b600052601260045260246000fd5b0592915050565b680a688906bd8b00000082126136a75760405163e69458f960e01b815260048101839052602401610c82565b670de0b6b3a7640000604083901b046109f7816137fa565b919050565b6000808212156134df5760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610c82565b6000600160801b821061373657608091821c9161373390826147e0565b90505b68010000000000000000821061375957604091821c9161375690826147e0565b90505b640100000000821061377857602091821c9161377590826147e0565b90505b62010000821061379557601091821c9161379290826147e0565b90505b61010082106137b157600891821c916137ae90826147e0565b90505b601082106137cc57600491821c916137c990826147e0565b90505b600482106137e757600291821c916137e490826147e0565b90505b600282106136bf576108196001826147e0565b600160bf1b67800000000000000082161561381e5768016a09e667f3bcc9090260401c5b67400000000000000082161561383d576801306fe0a31b7152df0260401c5b67200000000000000082161561385c576801172b83c7d517adce0260401c5b67100000000000000082161561387b5768010b5586cf9890f62a0260401c5b67080000000000000082161561389a576801059b0d31585743ae0260401c5b6704000000000000008216156138b957680102c9a3e778060ee70260401c5b6702000000000000008216156138d85768010163da9fb33356d80260401c5b6701000000000000008216156138f757680100b1afa5abcbed610260401c5b66800000000000008216156139155768010058c86da1c09ea20260401c5b6640000000000000821615613933576801002c605e2e8cec500260401c5b662000000000000082161561395157680100162f3904051fa10260401c5b661000000000000082161561396f576801000b175effdc76ba0260401c5b660800000000000082161561398d57680100058ba01fb9f96d0260401c5b66040000000000008216156139ab5768010002c5cc37da94920260401c5b66020000000000008216156139c9576801000162e525ee05470260401c5b66010000000000008216156139e75768010000b17255775c040260401c5b65800000000000821615613a04576801000058b91b5bc9ae0260401c5b65400000000000821615613a2157680100002c5c89d5ec6d0260401c5b65200000000000821615613a3e5768010000162e43f4f8310260401c5b65100000000000821615613a5b57680100000b1721bcfc9a0260401c5b65080000000000821615613a785768010000058b90cf1e6e0260401c5b65040000000000821615613a95576801000002c5c863b73f0260401c5b65020000000000821615613ab257680100000162e430e5a20260401c5b65010000000000821615613acf576801000000b1721835510260401c5b648000000000821615613aeb57680100000058b90c0b490260401c5b644000000000821615613b075768010000002c5c8601cc0260401c5b642000000000821615613b23576801000000162e42fff00260401c5b641000000000821615613b3f5768010000000b17217fbb0260401c5b640800000000821615613b5b576801000000058b90bfce0260401c5b640400000000821615613b7757680100000002c5c85fe30260401c5b640200000000821615613b935768010000000162e42ff10260401c5b640100000000821615613baf57680100000000b17217f80260401c5b6380000000821615613bca5768010000000058b90bfc0260401c5b6340000000821615613be5576801000000002c5c85fe0260401c5b6320000000821615613c0057680100000000162e42ff0260401c5b6310000000821615613c1b576801000000000b17217f0260401c5b6308000000821615613c3657680100000000058b90c00260401c5b6304000000821615613c515768010000000002c5c8600260401c5b6302000000821615613c6c576801000000000162e4300260401c5b6301000000821615613c875768010000000000b172180260401c5b62800000821615613ca1576801000000000058b90c0260401c5b62400000821615613cbb57680100000000002c5c860260401c5b62200000821615613cd55768010000000000162e430260401c5b62100000821615613cef57680100000000000b17210260401c5b62080000821615613d095768010000000000058b910260401c5b62040000821615613d23576801000000000002c5c80260401c5b62020000821615613d3d57680100000000000162e40260401c5b62010000821615613d57576801000000000000b1720260401c5b618000821615613d7057680100000000000058b90260401c5b614000821615613d895768010000000000002c5d0260401c5b612000821615613da2576801000000000000162e0260401c5b611000821615613dbb5768010000000000000b170260401c5b610800821615613dd4576801000000000000058c0260401c5b610400821615613ded57680100000000000002c60260401c5b610200821615613e0657680100000000000001630260401c5b610100821615613e1f57680100000000000000b10260401c5b6080821615613e3757680100000000000000590260401c5b6040821615613e4f576801000000000000002c0260401c5b6020821615613e6757680100000000000000160260401c5b6010821615613e7f576801000000000000000b0260401c5b6008821615613e9757680100000000000000060260401c5b6004821615613eaf57680100000000000000030260401c5b6002821615613ec757680100000000000000010260401c5b6001821615613edf57680100000000000000010260401c5b670de0b6b3a76400000260409190911c60bf031c90565b80356001600160a01b03811681146136bf57600080fd5b60008083601f840112613f1e578182fd5b50813567ffffffffffffffff811115613f35578182fd5b6020830191508360208260051b8501011115613f5057600080fd5b9250929050565b60008083601f840112613f68578182fd5b50813567ffffffffffffffff811115613f7f578182fd5b602083019150836020828501011115613f5057600080fd5b600060608284031215613fa8578081fd5b50919050565b600060208284031215613fbf578081fd5b6109f782613ef6565b60008060408385031215613fda578081fd5b613fe383613ef6565b9150613ff160208401613ef6565b90509250929050565b60008060006060848603121561400e578081fd5b61401784613ef6565b925061402560208501613ef6565b9150604084013590509250925092565b60008060008060008060008060006101408a8c031215614053578485fd5b61405c8a613ef6565b985061406a60208b01613ef6565b975060408a0135965060608a0135955060808a0135945061408d60a08b01613ef6565b935061409c8b60c08c01613f97565b92506101208a013567ffffffffffffffff8111156140b8578283fd5b6140c48c828d01613f57565b915080935050809150509295985092959850929598565b6000806000806000806000610120888a0312156140f6578283fd5b6140ff88613ef6565b965061410d60208901613ef6565b955060408801359450606088013593506080880135925060a088013591506141388960c08a01613f97565b905092959891949750929550565b6000806000806000806000610100888a031215614161578283fd5b61416a88613ef6565b9650602088013567ffffffffffffffff811115614185578384fd5b6141918a828b01613f0d565b9097509550506040880135935060608801359250608088013591506141388960a08a01613f97565b600080604083850312156141cb578182fd5b6141d483613ef6565b946020939093013593505050565b60008060008060008061010087890312156141fb578182fd5b61420487613ef6565b95506020870135945061421960408801613ef6565b935060608701359250608087013591506142368860a08901613f97565b90509295509295509295565b600080600080600080600080610120898b03121561425e578182fd5b61426789613ef6565b975060208901359650604089013595506060890135945061428a60808a01613ef6565b93506142998a60a08b01613f97565b925061010089013567ffffffffffffffff8111156142b5578283fd5b6142c18b828c01613f57565b999c989b5096995094979396929594505050565b60008060008060008061010087890312156142ee578384fd5b6142f787613ef6565b9550602087013594506040870135935060608701359250608087013591506142368860a08901613f97565b60008060008060008060e0878903121561433a578384fd5b863567ffffffffffffffff811115614350578485fd5b61435c89828a01613f0d565b9097509550506020870135935060408701359250606087013591506142368860808901613f97565b600060208284031215614395578081fd5b815180151581146109f7578182fd5b6000602082840312156143b5578081fd5b5035919050565b6000602082840312156143cd578081fd5b5051919050565b600080600080608085870312156143e9578182fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060c0878903121561441d578384fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b600060208284031215614458578081fd5b81356109f781614ad1565b600060208284031215614474578081fd5b81516109f781614ad1565b6000815180845260208085019450808401835b838110156144ae57815187529582019590820190600101614492565b509495945050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526144fa816020860160208601614a29565b601f01601f19169290920160200192915050565b60006001600160fb1b03831115614523578081fd5b8260051b808584379190910190815292915050565b6000825161454a818460208701614a29565b9190910192915050565b6001600160a01b0389811682528881166020830152604082018890526060820187905260808201869052841660a082015260006101406145ae60c0840186805160ff16825260208082015190830152604090810151910152565b806101208401526145c1818401856144e2565b9b9a5050505050505050505050565b6001600160a01b0387168152610100602082018190526000906145f58382018961447f565b9150508560408301528460608301528360808301526125b960a0830184805160ff16825260208082015190830152604090810151910152565b6001600160a01b038981168252602082018990526040820188905260608201879052851660808201526000610120853561466781614ad1565b60ff1660a0840152602086013560c0840152604086013560e084015261010083018190526145c181840185876144b9565b6001600160a01b03888116825260208083018990526040808401899052606084018890529186166080840152845160ff1660a084015284015160c083015283015160e08201526000610120806101008401526146f6818401856144e2565b9a9950505050505050505050565b606081526000614717606083018661447f565b828103602084810191909152855180835286820192820190845b818110156147565784516001600160a01b031683529383019391830191600101614731565b5050809350505050826040830152949350505050565b6020815260006109f760208301846144e2565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b8481528360208201526060604082015260006147d66060830184866144b9565b9695505050505050565b600082198211156147f3576147f3614aa5565b500190565b600060ff821660ff84168060ff0382111561481557614815614aa5565b019392505050565b60008261482c5761482c614abb565b600160ff1b82146000198414161561484657614846614aa5565b500590565b60008261485a5761485a614abb565b500490565b600181815b8085111561489a57816000190482111561488057614880614aa5565b8085161561488d57918102915b93841c9390800290614864565b509250929050565b60006109f760ff8416836000826148bb57506001610819565b816148c857506000610819565b81600181146148de57600281146148e857614904565b6001915050610819565b60ff8411156148f9576148f9614aa5565b50506001821b610819565b5060208310610133831016604e8410600b8410161715614927575081810a610819565b614931838361485f565b806000190482111561494557614945614aa5565b029392505050565b60006001600160ff1b038184138284138082168684048611161561497357614973614aa5565b600160ff1b8487128281168783058912161561499157614991614aa5565b8587129250878205871284841616156149ac576149ac614aa5565b878505871281841616156149c2576149c2614aa5565b505050929093029392505050565b60008160001904831182151516156149ea576149ea614aa5565b500290565b600082821015614a0157614a01614aa5565b500390565b600060ff821660ff841680821015614a2057614a20614aa5565b90039392505050565b60005b83811015614a44578181015183820152602001614a2c565b838111156118df5750506000910152565b600181811c90821680614a6957607f821691505b60208210811415613fa857634e487b7160e01b600052602260045260246000fd5b6000600019821415614a9e57614a9e614aa5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60ff81168114614ae057600080fd5b5056fea2646970667358221220b7c6a17716b0b195f1d2657f6cd0f179ee9947eec560bf6ca6a15e1bdccd167164736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000008938a61ba9523298dbcacee0cda5b371fb7f1f800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc800000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da10000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f

-----Decoded View---------------
Arg [0] : theSigner (address): 0x08938a61BA9523298dbCAceE0cda5B371FB7f1F8
Arg [1] : theWrapper (address): 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
Arg [2] : tokens (address[]): 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8,0x82aF49447D8a07e3bd95BD0d56f35241523fBab1,0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9,0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1,0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000008938a61ba9523298dbcacee0cda5b371fb7f1f8
Arg [1] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc8
Arg [5] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
Arg [6] : 000000000000000000000000fd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9
Arg [7] : 000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1
Arg [8] : 0000000000000000000000002f2a2543b76a4166549f7aab2e75bef0aefc5b0f


Deployed Bytecode Sourcemap

189947:2806:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139644:100;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;141995:201;;;;;;;;;;-1:-1:-1;141995:201:0;;;;;:::i;:::-;;:::i;:::-;;;19970:14:1;;19963:22;19945:41;;19933:2;19918:18;141995:201:0;19900:92:1;187426:252:0;;;;;;:::i;:::-;;:::i;:::-;;140764:108;;;;;;;;;;-1:-1:-1;140852:12:0;;140764:108;;;23051:25:1;;;23039:2;23024:18;140764:108:0;23006:76:1;158876:103:0;;;;;;;;;;-1:-1:-1;158876:103:0;;;;;:::i;:::-;;:::i;158692:83::-;;;;;;;;;;;;;:::i;159198:423::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;:::i;142776:295::-;;;;;;;;;;-1:-1:-1;142776:295:0;;;;;:::i;:::-;;:::i;174970:457::-;;;;;;:::i;:::-;;:::i;162002:521::-;;;;;;;;;;-1:-1:-1;162002:521:0;;;;;:::i;:::-;;:::i;181326:1108::-;;;;;;;;;;-1:-1:-1;181326:1108:0;;;;;:::i;:::-;;:::i;140606:93::-;;;;;;;;;;-1:-1:-1;140606:93:0;;140689:2;36417:36:1;;36405:2;36390:18;140606:93:0;36372:87:1;159076:116:0;;;;;;;;;;-1:-1:-1;159076:116:0;;;;;:::i;:::-;-1:-1:-1;;;;;159167:19:0;159144:7;159167:19;;;:12;:19;;;;;;;159076:116;163548:378;;;;;;;;;;-1:-1:-1;163548:378:0;;;;;:::i;:::-;;:::i;183268:983::-;;;;;;;;;;-1:-1:-1;183268:983:0;;;;;:::i;:::-;184180:21;;;;;184033:32;184090:21;;;;184123:32;;;183854;183911:21;;;;183944:32;;;183840:2;183821:21;;;183854:32;;;;184001:21;;;;;184033:32;;;;183268:983;;;;;36066:25:1;;;36122:2;36107:18;;36100:34;;;;36150:18;;;36143:34;;;;36208:2;36193:18;;36186:34;36251:3;36236:19;;36229:35;36053:3;36038:19;183268:983:0;36020:250:1;160701:319:0;;;;;;;;;;;;;:::i;143480:238::-;;;;;;;;;;-1:-1:-1;143480:238:0;;;;;:::i;:::-;;:::i;177355:448::-;;;;;;;;;;-1:-1:-1;177355:448:0;;;;;:::i;:::-;;:::i;180217:1103::-;;;;;;;;;;-1:-1:-1;180217:1103:0;;;;;:::i;:::-;;:::i;170948:994::-;;;;;;:::i;:::-;;:::i;155716:41::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14722:32:1;;;14704:51;;14692:2;14677:18;155716:41:0;14659:102:1;173550:1304:0;;;;;;;;;;-1:-1:-1;173550:1304:0;;;;;:::i;:::-;;:::i;188327:1455::-;;;;;;:::i;:::-;;:::i;140935:127::-;;;;;;;;;;-1:-1:-1;140935:127:0;;;;;:::i;:::-;-1:-1:-1;;;;;141036:18:0;141009:7;141036:18;;;;;;;;;;;;140935:127;171948:1121;;;;;;:::i;:::-;;:::i;155669:42::-;;;;;;;;;;;;;;;158781:89;;;;;;;;;;-1:-1:-1;158781:89:0;;;;;:::i;:::-;;:::i;139863:104::-;;;;;;;;;;;;;:::i;144221:436::-;;;;;;;;;;-1:-1:-1;144221:436:0;;;;;:::i;:::-;;:::i;187747:242::-;;;;;;:::i;:::-;;:::i;141268:193::-;;;;;;;;;;-1:-1:-1;141268:193:0;;;;;:::i;:::-;;:::i;176459:378::-;;;;;;;;;;-1:-1:-1;176459:378:0;;;;;:::i;:::-;;:::i;157284:50::-;;;;;;;;;;-1:-1:-1;157284:50:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;35337:25:1;;;35393:2;35378:18;;35371:34;;;;35310:18;157284:50:0;35292:119:1;176843:441:0;;;;;;;;;;-1:-1:-1;176843:441:0;;;;;:::i;:::-;;:::i;141524:151::-;;;;;;;;;;-1:-1:-1;141524:151:0;;;;;:::i;:::-;;:::i;160459:236::-;;;;;;;;;;-1:-1:-1;160459:236:0;;;;;:::i;:::-;;:::i;157170:47::-;;;;;;;;;;-1:-1:-1;157170:47:0;;;;;:::i;:::-;;;;;;;;;;;;;;139644:100;139698:13;139731:5;139724:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139644:100;:::o;141995:201::-;142078:4;120073:10;142134:32;120073:10;142150:7;142159:6;142134:8;:32::i;:::-;142184:4;142177:11;;;141995:201;;;;;:::o;187426:252::-;187591:81;187605:11;187618:12;187632:17;187651:7;187660:1;187663:2;187667:4;187591:13;:81::i;:::-;187426:252;;;;;;:::o;158876:103::-;158929:4;158949:24;:8;158967:5;158949:17;:24::i;158692:83::-;158732:4;158752:17;:8;:15;:17::i;:::-;158745:24;;158692:83;:::o;159198:423::-;159249:16;159267;159285:7;159300:6;159309:9;:7;:9::i;:::-;159300:18;;159325:25;159367:1;159353:16;;;;;;-1:-1:-1;;;159353:16:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;159353:16:0;;159325:44;;159376:23;159416:1;159402:16;;;;;;-1:-1:-1;;;159402:16:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;159402:16:0;;159376:42;;159430:6;159425:142;159446:1;159442;:5;159425:142;;;159463:13;159479:10;159487:1;159479:7;:10::i;:::-;159463:26;;159512:21;159527:5;-1:-1:-1;;;;;159167:19:0;159144:7;159167:19;;;:12;:19;;;;;;;159076:116;159512:21;159498:8;159507:1;159498:11;;;;;;-1:-1:-1;;;159498:11:0;;;;;;;;;;;;;;:35;;;;;159554:5;159542:6;159549:1;159542:9;;;;;;-1:-1:-1;;;159542:9:0;;;;;;;;;-1:-1:-1;;;;;159542:17:0;;;:9;;;;;;;;;;;:17;-1:-1:-1;159449:3:0;;;;:::i;:::-;;;;159425:142;;;;159583:8;159593:6;159601:13;140852:12;;;140764:108;159601:13;159575:40;;;;;;;;;159198:423;;;:::o;142776:295::-;142907:4;120073:10;142965:38;142981:4;120073:10;142996:6;142965:15;:38::i;:::-;143014:27;143024:4;143030:2;143034:6;143014:9;:27::i;:::-;143059:4;143052:11;;;142776:295;;;;;;:::o;174970:457::-;175250:42;175262:16;175280:11;175250;:42::i;:::-;175299:122;175304:16;175322:11;175335;175348:12;175362:9;175373:18;175393:12;175407:13;;175299:4;:122::i;:::-;174970:457;;;;;;;;:::o;162002:521::-;162168:6;162192:14;162220:212;162230:1;162226;:5;162220:212;;;162241:22;162266:14;;162281:1;162266:17;;;;;-1:-1:-1;;;162266:17:0;;;;;;;;;;;;;;;162241:42;;162312:1;162295:14;:18;162292:121;;;162325:78;162361:10;162381:4;162388:14;162332:10;162340:1;162332:7;:10::i;:::-;-1:-1:-1;;;;;162325:35:0;;:78;;:35;:78::i;:::-;162421:3;;;;:::i;:::-;;;;162220:212;;;;162438:79;162446:10;162458:14;;162474:5;162481:10;162493:9;162504:12;162438:7;:79::i;181326:1108::-;181612:19;181633:18;181655:77;181681:10;181693:11;181706;181719:12;181655:25;:77::i;:::-;181611:121;;;;181739:17;181759:90;181783:10;181795:11;181808;181821:10;181833:15;181759:23;:90::i;:::-;181739:110;;181858:14;181875:105;181892:10;181904:11;181917;181930:12;181944:15;181961:18;181875:16;:105::i;:::-;181858:122;;182038:43;182060:6;182068:12;182038:21;:43::i;:::-;182153:52;182187:6;182195:9;182153:33;:52::i;:::-;182252:72;182268:10;182280:11;182293:18;182313:10;182252:15;:72::i;:::-;182369:18;-1:-1:-1;;;;;182336:92:0;182356:11;-1:-1:-1;;;;;182336:92:0;182344:10;-1:-1:-1;;;;;182336:92:0;;182389:11;182402:10;182414:13;;182336:92;;;;;;;;;:::i;:::-;;;;;;;;181326:1108;;;;;;;;;;;;;:::o;163548:378::-;163655:26;163713:13;140852:12;;;140764:108;163713:13;163685:26;163705:6;155380:4;163685:26;:::i;:::-;163684:42;;;;:::i;:::-;163655:71;;163782:25;163788:10;163800:6;163782:5;:25::i;:::-;163816:43;163840:18;163816:23;:43::i;:::-;163871:49;;;35337:25:1;;;35393:2;35378:18;;35371:34;;;163881:10:0;;163871:49;;35310:18:1;163871:49:0;;;;;;;163548:378;;:::o;160701:319::-;160744:18;160779:28;160796:10;160779:16;:28::i;:::-;160771:82;;;;-1:-1:-1;;;160771:82:0;;28264:2:1;160771:82:0;;;28246:21:1;28303:2;28283:18;;;28276:30;28342:34;28322:18;;;28315:62;-1:-1:-1;;;28393:18:1;;;28386:39;28442:19;;160771:82:0;;;;;;;;;-1:-1:-1;160889:10:0;160873:27;;;;:15;:27;;;;;:43;;;;;160923:34;;;;;;;;160873:43;160966:48;;160984:4;;160873:43;160966:9;:48::i;:::-;160701:319;:::o;143480:238::-;143568:4;120073:10;143624:64;120073:10;143640:7;143677:10;143649:25;120073:10;143640:7;143649:9;:25::i;:::-;:38;;;;:::i;:::-;143624:8;:64::i;177355:448::-;177599:75;-1:-1:-1;;;;;177599:35:0;;177635:10;177655:4;177662:11;177599:35;:75::i;:::-;177681:116;177686:10;177698:11;177711;177724:12;177738:9;177749:18;177769:12;177783:13;;177681:4;:116::i;:::-;177355:448;;;;;;;;;:::o;180217:1103::-;180454:19;180475:18;180497:82;180523:10;180535:16;180553:11;180566:12;180497:25;:82::i;:::-;180453:126;;;;180588:17;180608:95;180632:10;180644:11;180657:16;180675:10;180687:15;180608:23;:95::i;:::-;180588:115;;180712:14;180729:110;180746:10;180758:16;180776:11;180789:12;180803:15;180820:18;180729:16;:110::i;:::-;180712:127;;180897:43;180919:6;180927:12;180897:21;:43::i;:::-;181012:52;181046:6;181054:9;181012:33;:52::i;:::-;181128:17;181134:10;181128:5;:17::i;:::-;181152:51;181172:18;181192:10;181152:19;:51::i;:::-;181255:18;-1:-1:-1;;;;;181217:97:0;181237:16;-1:-1:-1;;;;;181217:97:0;181225:10;-1:-1:-1;;;;;181217:97:0;;181275:11;181288:10;181300:13;;181217:97;;;;;;;;;:::i;:::-;;;;;;;;180217:1103;;;;;;;;;;;;:::o;170948:994::-;171164:9;:13;171161:74;;171187:40;171199:16;171217:9;171187:11;:40::i;:::-;171249:10;-1:-1:-1;;;;;171249:18:0;;;171241:70;;;;-1:-1:-1;;;171241:70:0;;23917:2:1;171241:70:0;;;23899:21:1;23956:2;23936:18;;;23929:30;23995:34;23975:18;;;23968:62;-1:-1:-1;;;24046:18:1;;;24039:37;24093:19;;171241:70:0;23889:229:1;171241:70:0;171390:36;171411:14;;171390:20;:36::i;:::-;171461:21;171485:73;171505:6;171513:14;;171529:5;171536:10;171548:9;171485:19;:73::i;:::-;171461:97;;171616:50;171638:13;171653:12;171616:21;:50::i;:::-;171738:59;171772:13;171787:9;171738:33;:59::i;:::-;171830:10;:8;:10::i;:::-;171847:41;171862:6;171870:5;171877:10;171847:14;:41::i;:::-;171900:36;;;35337:25:1;;;35393:2;35378:18;;35371:34;;;-1:-1:-1;;;;;171900:36:0;;;;;35310:18:1;171900:36:0;;;;;;;170948:994;;;;;;;;:::o;173550:1304::-;173803:10;-1:-1:-1;;;;;173803:23:0;;;173795:73;;;;-1:-1:-1;;;173795:73:0;;29822:2:1;173795:73:0;;;29804:21:1;29861:2;29841:18;;;29834:30;29900:34;29880:18;;;29873:62;-1:-1:-1;;;29951:18:1;;;29944:35;29996:19;;173795:73:0;29794:227:1;173795:73:0;173881:16;-1:-1:-1;;;;;173907:33:0;;173904:113;;-1:-1:-1;173966:16:0;;-1:-1:-1;174005:4:0;173904:113;174053:24;174080:96;174103:11;174116:21;174139:12;174153:11;174166:9;174080:22;:96::i;:::-;174053:123;;174235:53;174257:16;174275:12;174235:21;:53::i;:::-;174360:62;174394:16;174412:9;174360:33;:62::i;:::-;174472:40;174478:10;174490:21;174472:5;:40::i;:::-;174610:11;174607:151;;;174631:44;174651:10;174663:11;174631:19;:44::i;:::-;174607:151;;;174698:52;174712:12;174726:10;174738:11;174698:13;:52::i;:::-;174822:12;-1:-1:-1;;;;;174771:77:0;174786:11;-1:-1:-1;;;;;174771:77:0;;174799:21;174836:11;174771:77;;;;;;35337:25:1;;;35393:2;35378:18;;35371:34;35325:2;35310:18;;35292:119;174771:77:0;;;;;;;;173550:1304;;;;;;;;:::o;188327:1455::-;188843:16;;;;;;;;;;;;;188636:2;188843:16;;;;;;;;;;;;187152:3;187132:23;;;;;;188575:3;188559:19;;;;188620:18;;;188605:35;;;188694:1;188678:17;;;188663:34;;;-1:-1:-1;;;;;;;188762:39:0;;;;188883:254;;;;189005:16;188982:39;;188883:254;;;189044:85;-1:-1:-1;;;;;189044:45:0;;189090:10;189110:4;189117:11;189044:45;:85::i;:::-;189145:6;189162;189171:9;:7;:9::i;:::-;189162:18;;189187:31;189235:1;189221:16;;;;;;-1:-1:-1;;;189221:16:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;189221:16:0;;189187:50;;189247:115;189257:1;189253;:5;189247:115;;;189303:20;-1:-1:-1;;;;;189289:34:0;:10;189297:1;189289:7;:10::i;:::-;-1:-1:-1;;;;;189289:34:0;;189288:54;;189341:1;189288:54;;;189327:11;189288:54;189268:14;189283:1;189268:17;;;;;;-1:-1:-1;;;189268:17:0;;;;;;;;;;;;;;;;;;:74;189351:3;;;;:::i;:::-;;;;189247:115;;;189435:12;189461:4;-1:-1:-1;;;;;189453:26:0;189609:10;189630:14;189655:5;189671:10;189692:9;189712:12;189488:237;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;189488:237:0;;;;;;;;;;;;;;-1:-1:-1;;;;;189488:237:0;-1:-1:-1;;;189488:237:0;;;189453:273;;;189488:237;189453:273;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;189434:292;;;189741:7;189733:43;;;;-1:-1:-1;;;189733:43:0;;32103:2:1;189733:43:0;;;32085:21:1;32142:2;32122:18;;;32115:30;32181:25;32161:18;;;32154:53;32224:18;;189733:43:0;32075:173:1;189733:43:0;188327:1455;;;;;;;;;;;;;;;;:::o;171948:1121::-;172181:9;:13;172178:74;;172204:40;172216:16;172234:9;172204:11;:40::i;:::-;172266:10;-1:-1:-1;;;;;172266:18:0;;;:41;;;;;172288:19;172296:10;172288:7;:19::i;:::-;172258:67;;;;-1:-1:-1;;;172258:67:0;;29078:2:1;172258:67:0;;;29060:21:1;29117:2;29097:18;;;29090:30;-1:-1:-1;;;29136:18:1;;;29129:43;29189:18;;172258:67:0;29050:163:1;172258:67:0;172406:13;172422:39;172450:10;172422:27;:39::i;:::-;172406:55;;172485:11;172476:5;:20;;172468:59;;;;-1:-1:-1;;;172468:59:0;;30634:2:1;172468:59:0;;;30616:21:1;30673:2;30653:18;;;30646:30;30712:28;30692:18;;;30685:56;30758:18;;172468:59:0;30606:176:1;172468:59:0;172564:21;172588:88;172614:6;172622:10;172634:11;172647:5;172654:10;172666:9;172588:25;:88::i;:::-;172564:112;;172734:50;172756:13;172771:12;172734:21;:50::i;:::-;172856:59;172890:13;172905:9;172856:33;:59::i;:::-;172950:17;172956:10;172950:5;:17::i;:::-;172974:41;172989:6;172997:5;173004:10;172974:14;:41::i;:::-;173027:36;;;35337:25:1;;;35393:2;35378:18;;35371:34;;;-1:-1:-1;;;;;173027:36:0;;;;;35310:18:1;173027:36:0;;;;;;;171948:1121;;;;;;;;;:::o;158781:89::-;158827:7;158850:14;:8;158862:1;158850:11;:14::i;139863:104::-;139919:13;139952:7;139945:14;;;;;:::i;144221:436::-;144314:4;120073:10;144314:4;144397:25;120073:10;144414:7;144397:9;:25::i;:::-;144370:52;;144461:15;144441:16;:35;;144433:85;;;;-1:-1:-1;;;144433:85:0;;34417:2:1;144433:85:0;;;34399:21:1;34456:2;34436:18;;;34429:30;34495:34;34475:18;;;34468:62;-1:-1:-1;;;34546:18:1;;;34539:35;34591:19;;144433:85:0;34389:227:1;144433:85:0;144554:60;144563:5;144570:7;144598:15;144579:16;:34;144554:8;:60::i;:::-;-1:-1:-1;144645:4:0;;144221:436;-1:-1:-1;;;;144221:436:0:o;187747:242::-;187901:82;187915:11;187928:12;187942:17;187961:7;187970:1;187973:2;187977:5;187901:13;:82::i;141268:193::-;141347:4;120073:10;141403:28;120073:10;141420:2;141424:6;141403:9;:28::i;176459:378::-;176650:75;-1:-1:-1;;;;;176650:35:0;;176686:10;176706:4;176713:11;176650:35;:75::i;:::-;176732:99;176751:10;176763;176775:11;176788:5;176795:10;176807:9;176818:12;176732:18;:99::i;176843:441::-;177077:75;-1:-1:-1;;;;;177077:35:0;;177113:10;177133:4;177140:11;177077:35;:75::i;:::-;177159:119;;-1:-1:-1;;;177159:119:0;;:4;;:20;;:119;;177180:10;;177192:11;;177205:12;;177219:9;;177230:18;;177250:12;;177264:13;;;;177159:119;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;176843:441;;;;;;;;:::o;141524:151::-;-1:-1:-1;;;;;141640:18:0;;;141613:7;141640:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;141524:151::o;160459:236::-;-1:-1:-1;;;;;160569:27:0;;160526:4;160569:27;;;:15;:27;;;;;160613:25;;;;:29;;;;160612:77;;-1:-1:-1;160648:21:0;160673:15;-1:-1:-1;160648:40:0;;160605:84;-1:-1:-1;;160459:236:0:o;103051:152::-;103121:4;103145:50;103150:3;-1:-1:-1;;;;;103170:23:0;;103145:4;:50::i;147846:380::-;-1:-1:-1;;;;;147982:19:0;;147974:68;;;;-1:-1:-1;;;147974:68:0;;30989:2:1;147974:68:0;;;30971:21:1;31028:2;31008:18;;;31001:30;31067:34;31047:18;;;31040:62;-1:-1:-1;;;31118:18:1;;;31111:34;31162:19;;147974:68:0;30961:226:1;147974:68:0;-1:-1:-1;;;;;148061:21:0;;148053:68;;;;-1:-1:-1;;;148053:68:0;;25213:2:1;148053:68:0;;;25195:21:1;25252:2;25232:18;;;25225:30;25291:34;25271:18;;;25264:62;-1:-1:-1;;;25342:18:1;;;25335:32;25384:19;;148053:68:0;25185:224:1;148053:68:0;-1:-1:-1;;;;;148134:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;148186:32;;23051:25:1;;;148186:32:0;;23024:18:1;148186:32:0;;;;;;;147846:380;;;:::o;190823:958::-;-1:-1:-1;;;;;;;;191006:19:0;-1:-1:-1;;;;;;;;;;;;;;;187152:3:0;187132:23;;;;;;;;;;;;;-1:-1:-1;;;;;191291:71:0;;;191381:30;191407:3;191392:18;;;191381:2;:30;:::i;:::-;191437:16;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;191437:16:0;-1:-1:-1;191472:15:0;:60;;;;-1:-1:-1;;;;;;191492:39:0;;;;191472:60;191469:167;;;191543:85;-1:-1:-1;;;;;191543:45:0;;191589:10;191609:4;191616:11;191543:45;:85::i;:::-;191644:131;191664:20;191686:21;191709:11;191722:12;191736:15;191753:7;191762:12;191644:19;:131::i;103623:167::-;-1:-1:-1;;;;;103757:23:0;;103703:4;99159:19;;;:12;;;:19;;;;;;:24;;103727:55;99062:129;103876:117;103939:7;103966:19;103974:3;99360:18;;99277:109;148517:453;148652:24;148679:25;148689:5;148696:7;148679:9;:25::i;:::-;148652:52;;-1:-1:-1;;148719:16:0;:37;148715:248;;148801:6;148781:16;:26;;148773:68;;;;-1:-1:-1;;;148773:68:0;;25616:2:1;148773:68:0;;;25598:21:1;25655:2;25635:18;;;25628:30;25694:31;25674:18;;;25667:59;25743:18;;148773:68:0;25588:179:1;148773:68:0;148885:51;148894:5;148901:7;148929:6;148910:16;:25;148885:8;:51::i;:::-;148517:453;;;;:::o;145127:671::-;-1:-1:-1;;;;;145258:18:0;;145250:68;;;;-1:-1:-1;;;145250:68:0;;30228:2:1;145250:68:0;;;30210:21:1;30267:2;30247:18;;;30240:30;30306:34;30286:18;;;30279:62;-1:-1:-1;;;30357:18:1;;;30350:35;30402:19;;145250:68:0;30200:227:1;145250:68:0;-1:-1:-1;;;;;145337:16:0;;145329:64;;;;-1:-1:-1;;;145329:64:0;;23513:2:1;145329:64:0;;;23495:21:1;23552:2;23532:18;;;23525:30;23591:34;23571:18;;;23564:62;-1:-1:-1;;;23642:18:1;;;23635:33;23685:19;;145329:64:0;23485:225:1;145329:64:0;-1:-1:-1;;;;;145479:15:0;;145457:19;145479:15;;;;;;;;;;;145513:21;;;;145505:72;;;;-1:-1:-1;;;145505:72:0;;26329:2:1;145505:72:0;;;26311:21:1;26368:2;26348:18;;;26341:30;26407:34;26387:18;;;26380:62;-1:-1:-1;;;26458:18:1;;;26451:36;26504:19;;145505:72:0;26301:228:1;145505:72:0;-1:-1:-1;;;;;145613:15:0;;;:9;:15;;;;;;;;;;;145631:20;;;145613:38;;145673:13;;;;;;;;:23;;145645:6;;145613:9;145673:23;;145645:6;;145673:23;:::i;:::-;;;;;;;;145729:2;-1:-1:-1;;;;;145714:26:0;145723:4;-1:-1:-1;;;;;145714:26:0;;145733:6;145714:26;;;;23051:25:1;;23039:2;23024:18;;23006:76;145714:26:0;;;;;;;;145753:37;158461:190;;158535:12;158561:9;-1:-1:-1;;;;;158553:23:0;158584:7;158553:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;158534:62;;;158611:7;158603:42;;;;-1:-1:-1;;;158603:42:0;;27145:2:1;158603:42:0;;;27127:21:1;27184:2;27164:18;;;27157:30;-1:-1:-1;;;27203:18:1;;;27196:52;27265:18;;158603:42:0;27117:172:1;158603:42:0;158461:190;;;:::o;151363:248::-;151534:68;;-1:-1:-1;;;;;15024:15:1;;;151534:68:0;;;15006:34:1;15076:15;;15056:18;;;15049:43;15108:18;;;15101:34;;;151507:96:0;;151527:5;;-1:-1:-1;;;151557:27:0;14941:18:1;;151534:68:0;;;;-1:-1:-1;;151534:68:0;;;;;;;;;;;;;;-1:-1:-1;;;;;151534:68:0;-1:-1:-1;;;;;;151534:68:0;;;;;;;;;;151507:19;:96::i;178799:417::-;178941:19;178962:18;178997:19;179005:10;178997:7;:19::i;:::-;:43;;;;;179020:20;179028:11;179020:7;:20::i;:::-;178989:82;;;;-1:-1:-1;;;178989:82:0;;25974:2:1;178989:82:0;;;25956:21:1;26013:2;25993:18;;;25986:30;26052:28;26032:18;;;26025:56;26098:18;;178989:82:0;25946:176:1;178989:82:0;179092:39;179120:10;179092:27;:39::i;:::-;179078:53;;179151:59;179171:11;179184;179197:12;179151:19;:59::i;:::-;179138:72;;178799:417;;;;;;;:::o;182440:822::-;182610:7;182628:19;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;182628:19:0;-1:-1:-1;;;;;182763:24:0;;;182657:10;182763:24;;;:12;183840:2;182763:24;;;184001:21;182763:24;;;;182756:31;;182801:25;;;;;;;;;;;;;182794:4;;;:32;182866:37;;-1:-1:-1;;;182866:37:0;;;;184180:21;;;;;184033:32;184090:21;;;;184123:32;;;183854;183911:21;;;;183944:32;;;183821:21;;;183854:32;;;;184001:21;;;;184033:32;;;;182763:24;;182866:35;;:37;;;;;183840:2;;182866:37;;;;;182763:24;182866:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;182861:42;;:2;:42;:::i;:::-;182856:48;;:2;:48;:::i;:::-;182833:1;:20;;:71;;;;;182959:11;-1:-1:-1;;;;;182944:36:0;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;182939:43;;:2;:43;:::i;:::-;182934:49;;:2;:49;:::i;:::-;182911:20;;;:72;183037:20;;;;183000:181;;183023:34;;:11;:34;:::i;:::-;183070:20;;;;183063:4;;183059:2;;183063:27;;;:::i;:::-;183092:2;183120:1;:20;;;183105:12;:35;;;;:::i;:::-;183142:2;183153:1;:20;;;183146:1;:4;;;:27;;;;:::i;:::-;183175:2;183179:1;183000:22;:181::i;:::-;182992:216;;;;-1:-1:-1;;;182992:216:0;;31394:2:1;182992:216:0;;;31376:21:1;31433:2;31413:18;;;31406:30;-1:-1:-1;;;31452:18:1;;;31445:52;31514:18;;182992:216:0;31366:172:1;182992:216:0;-1:-1:-1;;183224:32:0;;;;;182440:822;-1:-1:-1;;;;;;;;;182440:822:0:o;167376:399::-;167556:14;167578:19;167600:97;167615:10;167627:11;167640;167653:12;167667:9;167678:18;167600:14;:97::i;:::-;167578:119;;167717:52;167739:16;167757:11;167717:21;:52::i;:::-;167708:61;167376:399;-1:-1:-1;;;;;;;;167376:399:0:o;168954:293::-;169058:22;169083:68;169093:9;169104:14;;;;:12;:14;:::i;:::-;169136;169083:68;;;;;169120:14;169083:68;;;;;;22731:25:1;;;;22804:4;22792:17;;;22772:18;;;22765:45;169120:14:0;;;;22826:18:1;;;22819:34;169136:14:0;;;;22869:18:1;;;22862:34;22703:19;;169083:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;169058:93;;169184:17;-1:-1:-1;;;;;169168:33:0;:14;-1:-1:-1;;;;;169168:33:0;;169160:81;;;;-1:-1:-1;;;169160:81:0;;28674:2:1;169160:81:0;;;28656:21:1;28713:2;28693:18;;;28686:30;28752:34;28732:18;;;28725:62;-1:-1:-1;;;28803:18:1;;;28796:33;28846:19;;169160:81:0;28646:225:1;179272:307:0;179378:29;;;;:18;:29;;;;;;;;179377:30;179369:73;;;;-1:-1:-1;;;179369:73:0;;32878:2:1;179369:73:0;;;32860:21:1;32917:2;32897:18;;;32890:30;32956:32;32936:18;;;32929:60;33006:18;;179369:73:0;32850:180:1;179369:73:0;179470:15;179457:9;:28;;179449:81;;;;-1:-1:-1;;;179449:81:0;;26736:2:1;179449:81:0;;;26718:21:1;26775:2;26755:18;;;26748:30;26814:34;26794:18;;;26787:62;-1:-1:-1;;;26865:18:1;;;26858:38;26913:19;;179449:81:0;26708:230:1;179449:81:0;-1:-1:-1;179537:29:0;;;;:18;:29;;;;;:36;;-1:-1:-1;;179537:36:0;179569:4;179537:36;;;179272:307::o;170352:236::-;122019:1;122617:7;;:19;;122609:63;;;;-1:-1:-1;;;122609:63:0;;;;;;;:::i;:::-;122019:1;122750:7;:18;170482:17:::1;170488:10:::0;170482:5:::1;:17::i;:::-;170506:51;-1:-1:-1::0;;;;;170506:32:0;::::1;170539:9:::0;170550:6;170506:32:::1;:51::i;:::-;170564:18;170570:11;170564:5;:18::i;:::-;-1:-1:-1::0;;121975:1:0;122929:7;:22;-1:-1:-1;;170352:236:0:o;146817:591::-;-1:-1:-1;;;;;146901:21:0;;146893:67;;;;-1:-1:-1;;;146893:67:0;;29420:2:1;146893:67:0;;;29402:21:1;29459:2;29439:18;;;29432:30;29498:34;29478:18;;;29471:62;-1:-1:-1;;;29549:18:1;;;29542:31;29590:19;;146893:67:0;29392:223:1;146893:67:0;-1:-1:-1;;;;;147060:18:0;;147035:22;147060:18;;;;;;;;;;;147097:24;;;;147089:71;;;;-1:-1:-1;;;147089:71:0;;24325:2:1;147089:71:0;;;24307:21:1;24364:2;24344:18;;;24337:30;24403:34;24383:18;;;24376:62;-1:-1:-1;;;24454:18:1;;;24447:32;24496:19;;147089:71:0;24297:224:1;147089:71:0;-1:-1:-1;;;;;147196:18:0;;:9;:18;;;;;;;;;;147217:23;;;147196:44;;147262:12;:22;;147234:6;;147196:9;147262:22;;147234:6;;147262:22;:::i;:::-;;;;-1:-1:-1;;147302:37:0;;23051:25:1;;;147328:1:0;;-1:-1:-1;;;;;147302:37:0;;;;;23039:2:1;23024:18;147302:37:0;;;;;;;158461:190;;;:::o;163138:404::-;163207:18;163234:6;163247;163256:9;:7;:9::i;:::-;163247:18;;163272:265;163282:1;163278;:5;163272:265;;;163296:16;163315:10;163323:1;163315:7;:10::i;:::-;163296:29;;155380:4;163361:24;163376:8;-1:-1:-1;;;;;159167:19:0;159144:7;159167:19;;;:12;:19;;;;;;;159076:116;163361:24;163350:35;;:10;:35;:::i;:::-;163349:59;;;;:::i;:::-;163336:72;;163468:47;163482:8;163492:10;163504;163468:13;:47::i;:::-;163526:3;;;;:::i;:::-;;;;163272:265;;;169903:121;169980:38;;-1:-1:-1;;;169980:38:0;;170012:4;169980:38;;;14704:51:1;-1:-1:-1;;;;;169980:23:0;;;;;14677:18:1;;169980:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;169958:19:0;;;;;;;:12;:19;;;;;:60;169903:121::o;170643:268::-;122019:1;122617:7;;:19;;122609:63;;;;-1:-1:-1;;;122609:63:0;;;;;;;:::i;:::-;122019:1;122750:7;:18;170755:59:::1;::::0;-1:-1:-1;;;170755:59:0;;::::1;::::0;::::1;23051:25:1::0;;;170780:16:0::1;-1:-1:-1::0;;;;;170755:51:0::1;::::0;::::1;::::0;23024:18:1;;170755:59:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;170821:23;170827:16;170821:5;:23::i;:::-;170875:30;170887:9;170898:6;170875:11;:30::i;:::-;-1:-1:-1::0;;121975:1:0;122929:7;:22;170643:268::o;173075:422::-;173161:6;173185:14;173213:279;173223:1;173219;:5;173213:279;;;173234:17;173254:14;;173269:1;173254:17;;;;;-1:-1:-1;;;173254:17:0;;;;;;;;;;;;;;;173234:37;;173295:1;173283:9;:13;173280:193;;;173308:13;173324:10;173332:1;173324:7;:10::i;:::-;173308:26;;173345:13;173361:34;173389:5;173361:27;:34::i;:::-;173345:50;;173423:9;173414:5;:18;;173406:57;;;;-1:-1:-1;;;173406:57:0;;30634:2:1;173406:57:0;;;30616:21:1;30673:2;30653:18;;;30646:30;30712:28;30692:18;;;30685:56;30758:18;;173406:57:0;30606:176:1;173406:57:0;173280:193;;;173481:3;;;;:::i;:::-;;;;173213:279;;;167781:358;167938:21;167967:19;167989:65;168001:6;168009:14;;168025:5;168032:10;168044:9;167989:11;:65::i;170030:144::-;170066:6;170079;170086:17;:8;:15;:17::i;:::-;170079:24;;170110:59;170120:1;170116;:5;170110:59;;;170132:17;170138:10;170146:1;170138:7;:10::i;:::-;170132:5;:17::i;:::-;170158:3;;;;:::i;:::-;;;;170110:59;;;170030:144;;:::o;161026:344::-;161120:8;161117:248;;161211:25;161217:6;161225:10;161211:5;:25::i;161117:248::-;161309:48;161331:6;161339:5;161346:10;161309:21;:48::i;168532:416::-;168722:24;168754:19;168776:88;168791:11;168804:21;168827:12;168841:11;168854:9;168776:14;:88::i;:::-;168754:110;;168890:52;168912:16;168930:11;168890:21;:52::i;:::-;168871:71;168532:416;-1:-1:-1;;;;;;;168532:416:0:o;159661:232::-;122019:1;122617:7;;:19;;122609:63;;;;-1:-1:-1;;;122609:63:0;;;;;;;:::i;:::-;122019:1;122750:7;:18;159763:45:::1;-1:-1:-1::0;;;;;159763:26:0;::::1;159790:9:::0;159801:6;159763:26:::1;:45::i;:::-;159875:12;159881:5;159875;:12::i;:::-;-1:-1:-1::0;;121975:1:0;122929:7;:22;-1:-1:-1;159661:232:0:o;169735:162::-;-1:-1:-1;;;;;169872:19:0;;169810:7;169872:19;;;:12;:19;;;;;;;169833:38;;-1:-1:-1;;;169833:38:0;;169865:4;169833:38;;;14704:51:1;169810:7:0;;169872:19;;169833:23;;14677:18:1;;169833:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:58;;;;:::i;168145:381::-;168314:21;168343:19;168365:80;168383:6;168391:10;168403:11;168416:5;168423:10;168435:9;168365:17;:80::i;104347:158::-;104421:7;104472:22;104476:3;104488:5;104472:3;:22::i;96966:414::-;97029:4;99159:19;;;:12;;;:19;;;;;;97046:327;;-1:-1:-1;97089:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;97272:18;;97250:19;;;:12;;;:19;;;;;;:40;;;;97305:11;;97046:327;-1:-1:-1;97356:5:0;97349:12;;191787:963;192112:32;;;192140:3;192129:14;;;192112:32;;;11608:19:1;192064:7:0;;192011:26;;11643:12:1;192112:32:0;;;-1:-1:-1;;192112:32:0;;;;;;;;;;-1:-1:-1;;;;;;192164:39:0;;192161:582;;192216:136;;-1:-1:-1;;;192216:136:0;;:4;;:20;;:136;;192237:21;;192260:11;;192273:12;;192287:15;;192304:18;;192324:12;;192338:13;;192216:136;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;192161:582;;;-1:-1:-1;;;;;192371:40:0;;192368:375;;192424:135;;-1:-1:-1;;;192424:135:0;;:4;;:20;;:135;;192445:20;;192467:11;;192480:12;;192494:15;;192511:18;;192531:12;;192545:13;;192424:135;;;:::i;192368:375::-;192586:147;;-1:-1:-1;;;192586:147:0;;:4;;:9;;:147;;192596:20;;192618:21;;192641:11;;192654:12;;192668:15;;192685:18;;192705:12;;192719:13;;192586:147;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;191787:963;;;;;;;;;:::o;154211:716::-;154635:23;154661:69;154689:4;154661:69;;;;;;;;;;;;;;;;;154669:5;-1:-1:-1;;;;;154661:27:0;;;:69;;;;;:::i;:::-;154745:17;;154635:95;;-1:-1:-1;154745:21:0;154741:179;;154842:10;154831:30;;;;;;;;;;;;:::i;:::-;154823:85;;;;-1:-1:-1;;;154823:85:0;;33646:2:1;154823:85:0;;;33628:21:1;33685:2;33665:18;;;33658:30;33724:34;33704:18;;;33697:62;-1:-1:-1;;;33775:18:1;;;33768:40;33825:19;;154823:85:0;33618:232:1;159899:523:0;160015:7;160049:11;160034;:26;160031:386;;;-1:-1:-1;160078:12:0;160071:19;;160031:386;160113:19;160169:11;160136:31;160156:11;155380:4;160136:31;:::i;:::-;160135:45;;;;:::i;:::-;160113:67;-1:-1:-1;155575:26:0;155380:4;155595:6;155575:26;:::i;:::-;160192:11;:44;160189:221;;155380:4;160287:12;155575:26;155380:4;155595:6;155575:26;:::i;:::-;160257:42;;;;:::i;:::-;160256:64;;;;:::i;:::-;160249:71;;;;;160189:221;155380:4;160355:24;160367:12;160355:11;:24;:::i;184629:1208::-;184799:4;;;;179932:3;184896:7;184901:2;184896;:7;:::i;:::-;:31;;;;:::i;:::-;184882:45;-1:-1:-1;184936:13:0;184952:26;184966:8;184972:2;184882:45;184966:8;:::i;:::-;184976:1;184952:13;:26::i;:::-;184936:42;-1:-1:-1;184991:9:0;;184987:94;;185066:5;185033:29;185059:3;179882:4;185033:29;:::i;:::-;185032:39;;;;:::i;:::-;185013:58;;;;:::i;:::-;;;184987:94;185091:11;179932:3;185105:7;185110:2;185105;:7;:::i;:::-;:31;;;;:::i;:::-;185091:45;-1:-1:-1;185145:13:0;185161:26;185175:8;185181:2;185091:45;185175:8;:::i;:::-;185185:1;185161:13;:26::i;:::-;185145:42;-1:-1:-1;185200:9:0;;185196:94;;185275:5;185242:29;185268:3;179882:4;185242:29;:::i;:::-;185241:39;;;;:::i;:::-;185222:58;;;;:::i;:::-;;;185196:94;184629:1208;;;;185312:14;179932:3;185341;185336:2;:8;;;;:::i;:::-;185330:15;;:2;:15;:::i;:::-;185329:41;;;;:::i;:::-;185312:58;-1:-1:-1;185379:16:0;185398:29;185412:11;185421:2;185312:58;185412:11;:::i;185398:29::-;185379:48;-1:-1:-1;185440:12:0;;185436:102;;185520:8;185484:32;185510:6;179882:4;185484:32;:::i;:::-;185483:45;;;;:::i;:::-;185465:63;;;;:::i;:::-;;;185436:102;185548:15;179932:3;185572:9;185577:4;185572:2;:9;:::i;:::-;185566:16;;:2;:16;:::i;:::-;:40;;;;:::i;:::-;185548:58;-1:-1:-1;185615:17:0;185635:30;185649:12;185659:2;185548:58;185649:12;:::i;185635:30::-;185615:50;-1:-1:-1;185678:13:0;;185674:105;;185760:9;185723:33;185749:7;179882:4;185723:33;:::i;:::-;185722:47;;;;:::i;:::-;185704:65;;;;:::i;:::-;;;185674:105;-1:-1:-1;;;;;;184629:1208:0;-1:-1:-1;;;;;;;;;;;184629:1208:0:o;165702:435::-;165880:7;156208:163;;;;;;12556:34:1;12544:47;;12621:34;12616:2;12607:12;;12600:56;12686:34;12681:2;12672:12;;12665:56;12751:34;12746:2;12737:12;;12730:56;-1:-1:-1;;;12811:3:1;12802:13;;12795:40;12860:3;12851:13;;12534:336;156208:163:0;;;;-1:-1:-1;;156208:163:0;;;;;;;;;156192:184;;156208:163;156192:184;;;;165913:217;;;20312:25:1;-1:-1:-1;;;;;20411:15:1;;;20391:18;;;20384:43;;;;20463:15;;;20443:18;;;20436:43;20495:18;;;20488:34;;;20538:19;;;20531:35;;;20582:19;;;20575:35;;;20647:15;;20626:19;;;20619:44;20284:19;;165913:217:0;;;;;;;;;;;;;165903:228;;;;;;165896:235;;165702:435;;;;;;;;:::o;119111:196::-;119241:57;;-1:-1:-1;;;119241:57:0;;;12203:27:1;12246:11;;;12239:27;;;12282:12;;;12275:28;;;119204:7:0;;12319:12:1;;119241:57:0;;;;;;;;;;;;119231:68;;;;;;119224:75;;119111:196;;;;:::o;151144:211::-;151288:58;;-1:-1:-1;;;;;16969:32:1;;151288:58:0;;;16951:51:1;17018:18;;;17011:34;;;151261:86:0;;151281:5;;-1:-1:-1;;;151311:23:0;16924:18:1;;151288:58:0;16906:145:1;166143:433:0;166297:7;166313:26;166369:14;;166352:32;;;;;;;;;:::i;:::-;;;;;;;;;;;;;166342:43;;;;;;166313:72;;156441:134;;;;;;13089:34:1;13077:47;;13154:34;13149:2;13140:12;;13133:56;13219:34;13214:2;13205:12;;13198:56;-1:-1:-1;;;13279:2:1;13270:12;;13263:42;13330:3;13321:13;;13067:273;156441:134:0;;;;-1:-1:-1;;156441:134:0;;;;;;;;;156425:155;;156441:134;156425:155;;;;166409:160;;;21629:25:1;-1:-1:-1;;;;;21690:32:1;;21670:18;;;21663:60;21739:18;;;21732:34;;;21782:18;;;21775:34;;;21825:19;;;21818:35;;;21869:19;;;21862:35;;;21601:19;;166409:160:0;;;;;;;;;;;;166399:171;;;;;;166392:178;;;166143:433;;;;;;;;:::o;146085:399::-;-1:-1:-1;;;;;146169:21:0;;146161:65;;;;-1:-1:-1;;;146161:65:0;;34823:2:1;146161:65:0;;;34805:21:1;34862:2;34842:18;;;34835:30;34901:33;34881:18;;;34874:61;34952:18;;146161:65:0;34795:181:1;146161:65:0;146317:6;146301:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;146334:18:0;;:9;:18;;;;;;;;;;:28;;146356:6;;146334:9;:28;;146356:6;;146334:28;:::i;:::-;;;;-1:-1:-1;;146378:37:0;;23051:25:1;;;-1:-1:-1;;;;;146378:37:0;;;146395:1;;146378:37;;23039:2:1;23024:18;146378:37:0;;;;;;;170030:144;;:::o;161432:564::-;161553:1;161545:5;:9;161537:98;;;;-1:-1:-1;;;161537:98:0;;24728:2:1;161537:98:0;;;24710:21:1;24767:2;24747:18;;;24740:30;24806:34;24786:18;;;24779:62;24877:34;24857:18;;;24850:62;-1:-1:-1;;;24928:19:1;;;24921:43;24981:19;;161537:98:0;24700:306:1;161537:98:0;-1:-1:-1;;;;;161650:27:0;;;;;;:15;:27;;;;;:43;;;:46;161642:113;;;;-1:-1:-1;;;161642:113:0;;32455:2:1;161642:113:0;;;32437:21:1;32494:2;32474:18;;;32467:30;32533:34;32513:18;;;32506:62;-1:-1:-1;;;32584:18:1;;;32577:52;32646:19;;161642:113:0;32427:244:1;161642:113:0;161764:24;161791:111;;;;;;;;161840:5;161848:6;161840:14;;;;:::i;:::-;161821:34;;:15;:34;:::i;:::-;161791:111;;;;;;;;;-1:-1:-1;;;;;161909:27:0;;-1:-1:-1;161909:27:0;;;:15;:27;;;;;:39;;;;;;;;;;;;;161764:138;-1:-1:-1;161955:35:0;161969:4;161881:13;161955:5;:35::i;166974:396::-;167156:7;156867:154;;;;;;14248:34:1;14236:47;;14313:34;14308:2;14299:12;;14292:56;14378:34;14373:2;14364:12;;14357:56;14443:34;14438:2;14429:12;;14422:56;-1:-1:-1;;;14503:3:1;14494:13;;14487:31;14543:3;14534:13;;14226:327;156867:154:0;;;;;;;-1:-1:-1;;156867:154:0;;;;;;156851:175;;156867:154;156851:175;;;;167189:174;;;22195:25:1;-1:-1:-1;;;;;22294:15:1;;;22274:18;;;22267:43;22326:18;;;22319:34;;;;22389:15;;;;22369:18;;;22362:43;-1:-1:-1;22421:19:1;;;22414:35;;;;22465:19;;;;22458:35;;;;167189:174:0;;;;;;;;;;22167:19:1;;;;167189:174:0;;167179:185;;;;;;166974:396::o;166582:386::-;166748:7;156651:143;;;;;;13559:34:1;13547:47;;13624:34;13619:2;13610:12;;13603:56;13689:34;13684:2;13675:12;;13668:56;13754:29;13749:2;13740:12;;13733:51;13809:3;13800:13;;13537:282;156651:143:0;;;;-1:-1:-1;;156651:143:0;;;;;;;;;156635:164;;156651:143;156635:164;;;;166781:180;;;20989:25:1;-1:-1:-1;;;;;21088:15:1;;;21068:18;;;21061:43;;;;21140:15;;21120:18;;;21113:43;21172:18;;;21165:34;;;21215:19;;;21208:35;;;21259:19;;;21252:35;;;21303:19;;;21296:35;;;20961:19;;166781:180:0;20943:394:1;99740:120:0;99807:7;99834:3;:11;;99846:5;99834:18;;;;;;-1:-1:-1;;;99834:18:0;;;;;;;;;;;;;;;;;99827:25;;99740:120;;;;:::o;126944:229::-;127081:12;127113:52;127135:6;127143:4;127149:1;127152:12;127113:21;:52::i;:::-;127106:59;126944:229;-1:-1:-1;;;;126944:229:0:o;185843:312::-;185917:7;185937:10;185933:217;;-1:-1:-1;185965:1:0;185958:8;;185933:217;186064:78;179882:4;186084:22;186089:16;:5;:14;:16::i;:::-;186084:4;:22::i;:::-;186070:36;;186077:3;186070:36;:::i;:::-;186069:72;;;;:::i;:::-;186064:4;:78::i;:::-;186057:85;;;;128064:510;128234:12;128292:5;128267:21;:30;;128259:81;;;;-1:-1:-1;;;128259:81:0;;27496:2:1;128259:81:0;;;27478:21:1;27535:2;27515:18;;;27508:30;27574:34;27554:18;;;27547:62;-1:-1:-1;;;27625:18:1;;;27618:36;27671:19;;128259:81:0;27468:228:1;128259:81:0;-1:-1:-1;;;;;124494:19:0;;;128351:60;;;;-1:-1:-1;;;128351:60:0;;31745:2:1;128351:60:0;;;31727:21:1;31784:2;31764:18;;;31757:30;31823:31;31803:18;;;31796:59;31872:18;;128351:60:0;31717:179:1;128351:60:0;128425:12;128439:23;128466:6;-1:-1:-1;;;;;128466:11:0;128485:5;128492:4;128466:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128424:73;;;;128515:51;128532:7;128541:10;128553:12;128515:16;:51::i;94270:301::-;94326:6;-1:-1:-1;;;;;94453:5:0;:34;;94445:87;;;;-1:-1:-1;;;94445:87:0;;33237:2:1;94445:87:0;;;33219:21:1;33276:2;33256:18;;;33249:30;33315:34;33295:18;;;33288:62;-1:-1:-1;;;33366:18:1;;;33359:38;33414:19;;94445:87:0;33209:230:1;94445:87:0;-1:-1:-1;94557:5:0;94270:301::o;186263:82::-;186310:8;186331;:1;:6;:8::i;186161:96::-;186208:7;186231:20;:8;:1;:6;:8::i;:::-;:18;:20::i;130750:762::-;130900:12;130929:7;130925:580;;;-1:-1:-1;130960:10:0;130953:17;;130925:580;131074:17;;:21;131070:424;;131322:10;131316:17;131383:15;131370:10;131366:2;131362:19;131355:44;131270:148;131465:12;131458:20;;-1:-1:-1;;;131458:20:0;;;;;;;;:::i;49786:1935::-;49833:13;49868:1;49863;:6;49859:81;;49893:35;;-1:-1:-1;;;49893:35:0;;;;;23051:25:1;;;23024:18;;49893:35:0;23006:76:1;49859:81:0;50032:11;27771:4;50062:1;:10;50058:329;;-1:-1:-1;50100:1:0;50058:329;;;-1:-1:-1;;50142:9:0;;50351:1;50312:37;50308:45;50303:50;;50280:92;50526:9;50538:46;27771:4;50573:1;:9;50538:26;:46::i;:::-;27771:4;50819:17;;;;-1:-1:-1;50526:58:0;;-1:-1:-1;50904:6:0;;;;50986:10;;50982:71;;;-1:-1:-1;;51024:13:0;;49786:1935;-1:-1:-1;49786:1935:0:o;50982:71::-;26762:4;51247:427;51295:1;51287:5;:9;51247:427;;;27771:4;51335:5;;;51334:15;;-1:-1:-1;51437:9:0;51432:14;;51428:231;;51535:15;;;;51638:1;51632:7;;;;;51428:231;51308:1;51298:11;51247:427;;;-1:-1:-1;;;51688:14:0;;49786:1935;-1:-1:-1;49786:1935:0:o;34611:1100::-;34658:13;34739:1;34735;:5;34731:973;;;-1:-1:-1;;34869:1:0;:26;34865:75;;;-1:-1:-1;34923:1:0;;34611:1100;-1:-1:-1;34611:1100:0:o;34865:75::-;35098:8;35104:1;35103:2;;35098:4;:8::i;:::-;35091:4;:15;;;-1:-1:-1;;;35091:15:0;;;;;;;;;;;34611:1100;-1:-1:-1;;34611:1100:0:o;34731:973::-;35260:6;35255:1;:11;35251:93;;35294:34;;-1:-1:-1;;;35294:34:0;;;;;23051:25:1;;;23024:18;;35294:34:0;23006:76:1;35251:93:0;27771:4;35490:2;35476:16;;;35475:35;35655:21;35475:35;35655:12;:21::i;34731:973::-;34611:1100;;;:::o;75572:171::-;75628:7;75665:1;75656:5;:10;;75648:55;;;;-1:-1:-1;;;75648:55:0;;27903:2:1;75648:55:0;;;27885:21:1;;;27922:18;;;27915:30;27981:34;27961:18;;;27954:62;28033:18;;75648:55:0;27875:182:1;14097:777:0;14159:11;-1:-1:-1;;;14187:1:0;:11;14183:78;;14221:3;14215:9;;;;14239:10;;;;:::i;:::-;;;14183:78;14280:5;14275:1;:10;14271:75;;14308:2;14302:8;;;;14325:9;;;;:::i;:::-;;;14271:75;14365:5;14360:1;:10;14356:75;;14393:2;14387:8;;;;14410:9;;;;:::i;:::-;;;14356:75;14450:5;14445:1;:10;14441:75;;14478:2;14472:8;;;;14495:9;;;;:::i;:::-;;;14441:75;14535:4;14530:1;:9;14526:72;;14562:1;14556:7;;;;14578:8;;;;:::i;:::-;;;14526:72;14617:4;14612:1;:9;14608:72;;14644:1;14638:7;;;;14660:8;;;;:::i;:::-;;;14608:72;14699:4;14694:1;:9;14690:72;;14726:1;14720:7;;;;14742:8;;;;:::i;:::-;;;14690:72;14781:4;14776:1;:9;14772:95;;14847:8;14854:1;14847:8;;:::i;5019:8685::-;-1:-1:-1;;;5495:18:0;5491:22;;:26;5487:112;;5557:19;5548:28;5581:2;5547:36;5487:112;5621:18;5617:22;;:26;5613:112;;5683:19;5674:28;5707:2;5673:36;5613:112;5747:18;5743:22;;:26;5739:112;;5809:19;5800:28;5833:2;5799:36;5739:112;5873:18;5869:22;;:26;5865:112;;5935:19;5926:28;5959:2;5925:36;5865:112;5999:17;5995:21;;:25;5991:111;;6060:19;6051:28;6084:2;6050:36;5991:111;6124:17;6120:21;;:25;6116:111;;6185:19;6176:28;6209:2;6175:36;6116:111;6249:17;6245:21;;:25;6241:111;;6310:19;6301:28;6334:2;6300:36;6241:111;6374:17;6370:21;;:25;6366:111;;6435:19;6426:28;6459:2;6425:36;6366:111;6499:16;6495:20;;:24;6491:110;;6559:19;6550:28;6583:2;6549:36;6491:110;6623:16;6619:20;;:24;6615:110;;6683:19;6674:28;6707:2;6673:36;6615:110;6747:16;6743:20;;:24;6739:110;;6807:19;6798:28;6831:2;6797:36;6739:110;6871:16;6867:20;;:24;6863:110;;6931:19;6922:28;6955:2;6921:36;6863:110;6995:15;6991:19;;:23;6987:109;;7054:19;7045:28;7078:2;7044:36;6987:109;7118:15;7114:19;;:23;7110:109;;7177:19;7168:28;7201:2;7167:36;7110:109;7241:15;7237:19;;:23;7233:109;;7300:19;7291:28;7324:2;7290:36;7233:109;7364:15;7360:19;;:23;7356:109;;7423:19;7414:28;7447:2;7413:36;7356:109;7487:14;7483:18;;:22;7479:108;;7545:19;7536:28;7569:2;7535:36;7479:108;7609:14;7605:18;;:22;7601:108;;7667:19;7658:28;7691:2;7657:36;7601:108;7731:14;7727:18;;:22;7723:108;;7789:19;7780:28;7813:2;7779:36;7723:108;7853:14;7849:18;;:22;7845:108;;7911:19;7902:28;7935:2;7901:36;7845:108;7975:13;7971:17;;:21;7967:107;;8032:19;8023:28;8056:2;8022:36;7967:107;8096:13;8092:17;;:21;8088:107;;8153:19;8144:28;8177:2;8143:36;8088:107;8217:13;8213:17;;:21;8209:107;;8274:19;8265:28;8298:2;8264:36;8209:107;8338:13;8334:17;;:21;8330:107;;8395:19;8386:28;8419:2;8385:36;8330:107;8459:12;8455:16;;:20;8451:106;;8515:19;8506:28;8539:2;8505:36;8451:106;8579:12;8575:16;;:20;8571:106;;8635:19;8626:28;8659:2;8625:36;8571:106;8699:12;8695:16;;:20;8691:106;;8755:19;8746:28;8779:2;8745:36;8691:106;8819:12;8815:16;;:20;8811:106;;8875:19;8866:28;8899:2;8865:36;8811:106;8939:11;8935:15;;:19;8931:105;;8994:19;8985:28;9018:2;8984:36;8931:105;9058:11;9054:15;;:19;9050:105;;9113:19;9104:28;9137:2;9103:36;9050:105;9177:11;9173:15;;:19;9169:105;;9232:19;9223:28;9256:2;9222:36;9169:105;9296:11;9292:15;;:19;9288:105;;9351:19;9342:28;9375:2;9341:36;9288:105;9415:10;9411:14;;:18;9407:104;;9469:19;9460:28;9493:2;9459:36;9407:104;9533:10;9529:14;;:18;9525:104;;9587:19;9578:28;9611:2;9577:36;9525:104;9651:10;9647:14;;:18;9643:104;;9705:19;9696:28;9729:2;9695:36;9643:104;9769:10;9765:14;;:18;9761:104;;9823:19;9814:28;9847:2;9813:36;9761:104;9887:9;9883:13;;:17;9879:103;;9940:19;9931:28;9964:2;9930:36;9879:103;10004:9;10000:13;;:17;9996:103;;10057:19;10048:28;10081:2;10047:36;9996:103;10121:9;10117:13;;:17;10113:103;;10174:19;10165:28;10198:2;10164:36;10113:103;10238:9;10234:13;;:17;10230:103;;10291:19;10282:28;10315:2;10281:36;10230:103;10355:8;10351:12;;:16;10347:102;;10407:19;10398:28;10431:2;10397:36;10347:102;10471:8;10467:12;;:16;10463:102;;10523:19;10514:28;10547:2;10513:36;10463:102;10587:8;10583:12;;:16;10579:102;;10639:19;10630:28;10663:2;10629:36;10579:102;10703:8;10699:12;;:16;10695:102;;10755:19;10746:28;10779:2;10745:36;10695:102;10819:7;10815:11;;:15;10811:101;;10870:19;10861:28;10894:2;10860:36;10811:101;10934:7;10930:11;;:15;10926:101;;10985:19;10976:28;11009:2;10975:36;10926:101;11049:7;11045:11;;:15;11041:101;;11100:19;11091:28;11124:2;11090:36;11041:101;11164:7;11160:11;;:15;11156:101;;11215:19;11206:28;11239:2;11205:36;11156:101;11279:6;11275:10;;:14;11271:100;;11329:19;11320:28;11353:2;11319:36;11271:100;11393:6;11389:10;;:14;11385:100;;11443:19;11434:28;11467:2;11433:36;11385:100;11507:6;11503:10;;:14;11499:100;;11557:19;11548:28;11581:2;11547:36;11499:100;11621:6;11617:10;;:14;11613:100;;11671:19;11662:28;11695:2;11661:36;11613:100;11735:5;11731:9;;:13;11727:99;;11784:19;11775:28;11808:2;11774:36;11727:99;11848:5;11844:9;;:13;11840:99;;11897:19;11888:28;11921:2;11887:36;11840:99;11961:5;11957:9;;:13;11953:99;;12010:19;12001:28;12034:2;12000:36;11953:99;12074:5;12070:9;;:13;12066:99;;12123:19;12114:28;12147:2;12113:36;12066:99;12187:4;12183:8;;:12;12179:98;;12235:19;12226:28;12259:2;12225:36;12179:98;12299:4;12295:8;;:12;12291:98;;12347:19;12338:28;12371:2;12337:36;12291:98;12411:4;12407:8;;:12;12403:98;;12459:19;12450:28;12483:2;12449:36;12403:98;12523:4;12519:8;;:12;12515:98;;12571:19;12562:28;12595:2;12561:36;12515:98;12635:3;12631:7;;:11;12627:97;;12682:19;12673:28;12706:2;12672:36;12627:97;12746:3;12742:7;;:11;12738:97;;12793:19;12784:28;12817:2;12783:36;12738:97;12857:3;12853:7;;:11;12849:97;;12904:19;12895:28;12928:2;12894:36;12849:97;12968:3;12964:7;;:11;12960:97;;13015:19;13006:28;13039:2;13005:36;12960:97;4327:4;13627:15;13681:2;13676:7;;;;13669:3;:15;13657:28;;5019:8685::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;192:395;255:8;265:6;319:3;312:4;304:6;300:17;296:27;286:2;;344:8;334;327:26;286:2;-1:-1:-1;374:20:1;;417:18;406:30;;403:2;;;456:8;446;439:26;403:2;500:4;492:6;488:17;476:29;;560:3;553:4;543:6;540:1;536:14;528:6;524:27;520:38;517:47;514:2;;;577:1;574;567:12;514:2;276:311;;;;;:::o;592:375::-;643:8;653:6;707:3;700:4;692:6;688:17;684:27;674:2;;732:8;722;715:26;674:2;-1:-1:-1;762:20:1;;805:18;794:30;;791:2;;;844:8;834;827:26;791:2;888:4;880:6;876:17;864:29;;940:3;933:4;924:6;916;912:19;908:30;905:39;902:2;;;957:1;954;947:12;972:165;1034:5;1079:2;1070:6;1065:3;1061:16;1057:25;1054:2;;;1099:5;1092;1085:20;1054:2;-1:-1:-1;1125:6:1;1044:93;-1:-1:-1;1044:93:1:o;1142:196::-;1201:6;1254:2;1242:9;1233:7;1229:23;1225:32;1222:2;;;1275:6;1267;1260:22;1222:2;1303:29;1322:9;1303:29;:::i;1343:270::-;1411:6;1419;1472:2;1460:9;1451:7;1447:23;1443:32;1440:2;;;1493:6;1485;1478:22;1440:2;1521:29;1540:9;1521:29;:::i;:::-;1511:39;;1569:38;1603:2;1592:9;1588:18;1569:38;:::i;:::-;1559:48;;1430:183;;;;;:::o;1618:338::-;1695:6;1703;1711;1764:2;1752:9;1743:7;1739:23;1735:32;1732:2;;;1785:6;1777;1770:22;1732:2;1813:29;1832:9;1813:29;:::i;:::-;1803:39;;1861:38;1895:2;1884:9;1880:18;1861:38;:::i;:::-;1851:48;;1946:2;1935:9;1931:18;1918:32;1908:42;;1722:234;;;;;:::o;1961:990::-;2123:6;2131;2139;2147;2155;2163;2171;2179;2187;2240:3;2228:9;2219:7;2215:23;2211:33;2208:2;;;2262:6;2254;2247:22;2208:2;2290:29;2309:9;2290:29;:::i;:::-;2280:39;;2338:38;2372:2;2361:9;2357:18;2338:38;:::i;:::-;2328:48;;2423:2;2412:9;2408:18;2395:32;2385:42;;2474:2;2463:9;2459:18;2446:32;2436:42;;2525:3;2514:9;2510:19;2497:33;2487:43;;2549:39;2583:3;2572:9;2568:19;2549:39;:::i;:::-;2539:49;;2607:66;2665:7;2659:3;2648:9;2644:19;2607:66;:::i;:::-;2597:76;;2724:3;2713:9;2709:19;2696:33;2752:18;2744:6;2741:30;2738:2;;;2789:6;2781;2774:22;2738:2;2833:58;2883:7;2874:6;2863:9;2859:22;2833:58;:::i;:::-;2807:84;;2910:8;2900:18;;;2937:8;2927:18;;;2198:753;;;;;;;;;;;:::o;2956:676::-;3098:6;3106;3114;3122;3130;3138;3146;3199:3;3187:9;3178:7;3174:23;3170:33;3167:2;;;3221:6;3213;3206:22;3167:2;3249:29;3268:9;3249:29;:::i;:::-;3239:39;;3297:38;3331:2;3320:9;3316:18;3297:38;:::i;:::-;3287:48;;3382:2;3371:9;3367:18;3354:32;3344:42;;3433:2;3422:9;3418:18;3405:32;3395:42;;3484:3;3473:9;3469:19;3456:33;3446:43;;3536:3;3525:9;3521:19;3508:33;3498:43;;3560:66;3618:7;3612:3;3601:9;3597:19;3560:66;:::i;:::-;3550:76;;3157:475;;;;;;;;;;:::o;3637:868::-;3797:6;3805;3813;3821;3829;3837;3845;3898:3;3886:9;3877:7;3873:23;3869:33;3866:2;;;3920:6;3912;3905:22;3866:2;3948:29;3967:9;3948:29;:::i;:::-;3938:39;;4028:2;4017:9;4013:18;4000:32;4055:18;4047:6;4044:30;4041:2;;;4092:6;4084;4077:22;4041:2;4136:70;4198:7;4189:6;4178:9;4174:22;4136:70;:::i;:::-;4225:8;;-1:-1:-1;4110:96:1;-1:-1:-1;;4307:2:1;4292:18;;4279:32;;-1:-1:-1;4358:2:1;4343:18;;4330:32;;-1:-1:-1;4409:3:1;4394:19;;4381:33;;-1:-1:-1;4433:66:1;4491:7;4485:3;4470:19;;4433:66;:::i;4510:264::-;4578:6;4586;4639:2;4627:9;4618:7;4614:23;4610:32;4607:2;;;4660:6;4652;4645:22;4607:2;4688:29;4707:9;4688:29;:::i;:::-;4678:39;4764:2;4749:18;;;;4736:32;;-1:-1:-1;;;4597:177:1:o;4779:607::-;4912:6;4920;4928;4936;4944;4952;5005:3;4993:9;4984:7;4980:23;4976:33;4973:2;;;5027:6;5019;5012:22;4973:2;5055:29;5074:9;5055:29;:::i;:::-;5045:39;;5131:2;5120:9;5116:18;5103:32;5093:42;;5154:38;5188:2;5177:9;5173:18;5154:38;:::i;:::-;5144:48;;5239:2;5228:9;5224:18;5211:32;5201:42;;5290:3;5279:9;5275:19;5262:33;5252:43;;5314:66;5372:7;5366:3;5355:9;5351:19;5314:66;:::i;:::-;5304:76;;4963:423;;;;;;;;:::o;5391:915::-;5544:6;5552;5560;5568;5576;5584;5592;5600;5653:3;5641:9;5632:7;5628:23;5624:33;5621:2;;;5675:6;5667;5660:22;5621:2;5703:29;5722:9;5703:29;:::i;:::-;5693:39;;5779:2;5768:9;5764:18;5751:32;5741:42;;5830:2;5819:9;5815:18;5802:32;5792:42;;5881:2;5870:9;5866:18;5853:32;5843:42;;5904:39;5938:3;5927:9;5923:19;5904:39;:::i;:::-;5894:49;;5962:66;6020:7;6014:3;6003:9;5999:19;5962:66;:::i;:::-;5952:76;;6079:3;6068:9;6064:19;6051:33;6107:18;6099:6;6096:30;6093:2;;;6144:6;6136;6129:22;6093:2;6188:58;6238:7;6229:6;6218:9;6214:22;6188:58;:::i;:::-;5611:695;;;;-1:-1:-1;5611:695:1;;-1:-1:-1;5611:695:1;;;;;;6265:8;-1:-1:-1;;;5611:695:1:o;6311:601::-;6444:6;6452;6460;6468;6476;6484;6537:3;6525:9;6516:7;6512:23;6508:33;6505:2;;;6559:6;6551;6544:22;6505:2;6587:29;6606:9;6587:29;:::i;:::-;6577:39;;6663:2;6652:9;6648:18;6635:32;6625:42;;6714:2;6703:9;6699:18;6686:32;6676:42;;6765:2;6754:9;6750:18;6737:32;6727:42;;6816:3;6805:9;6801:19;6788:33;6778:43;;6840:66;6898:7;6892:3;6881:9;6877:19;6840:66;:::i;6917:793::-;7068:6;7076;7084;7092;7100;7108;7161:3;7149:9;7140:7;7136:23;7132:33;7129:2;;;7183:6;7175;7168:22;7129:2;7228:9;7215:23;7261:18;7253:6;7250:30;7247:2;;;7298:6;7290;7283:22;7247:2;7342:70;7404:7;7395:6;7384:9;7380:22;7342:70;:::i;:::-;7431:8;;-1:-1:-1;7316:96:1;-1:-1:-1;;7513:2:1;7498:18;;7485:32;;-1:-1:-1;7564:2:1;7549:18;;7536:32;;-1:-1:-1;7615:2:1;7600:18;;7587:32;;-1:-1:-1;7638:66:1;7696:7;7690:3;7675:19;;7638:66;:::i;7715:297::-;7782:6;7835:2;7823:9;7814:7;7810:23;7806:32;7803:2;;;7856:6;7848;7841:22;7803:2;7893:9;7887:16;7946:5;7939:13;7932:21;7925:5;7922:32;7912:2;;7973:6;7965;7958:22;8017:190;8076:6;8129:2;8117:9;8108:7;8104:23;8100:32;8097:2;;;8150:6;8142;8135:22;8097:2;-1:-1:-1;8178:23:1;;8087:120;-1:-1:-1;8087:120:1:o;8212:194::-;8282:6;8335:2;8323:9;8314:7;8310:23;8306:32;8303:2;;;8356:6;8348;8341:22;8303:2;-1:-1:-1;8384:16:1;;8293:113;-1:-1:-1;8293:113:1:o;8411:395::-;8497:6;8505;8513;8521;8574:3;8562:9;8553:7;8549:23;8545:33;8542:2;;;8596:6;8588;8581:22;8542:2;-1:-1:-1;;8624:23:1;;;8694:2;8679:18;;8666:32;;-1:-1:-1;8745:2:1;8730:18;;8717:32;;8796:2;8781:18;8768:32;;-1:-1:-1;8532:274:1;-1:-1:-1;8532:274:1:o;8811:533::-;8915:6;8923;8931;8939;8947;8955;9008:3;8996:9;8987:7;8983:23;8979:33;8976:2;;;9030:6;9022;9015:22;8976:2;-1:-1:-1;;9058:23:1;;;9128:2;9113:18;;9100:32;;-1:-1:-1;9179:2:1;9164:18;;9151:32;;9230:2;9215:18;;9202:32;;-1:-1:-1;9281:3:1;9266:19;;9253:33;;-1:-1:-1;9333:3:1;9318:19;9305:33;;-1:-1:-1;8966:378:1;-1:-1:-1;8966:378:1:o;9349:253::-;9406:6;9459:2;9447:9;9438:7;9434:23;9430:32;9427:2;;;9480:6;9472;9465:22;9427:2;9524:9;9511:23;9543:29;9566:5;9543:29;:::i;9607:257::-;9675:6;9728:2;9716:9;9707:7;9703:23;9699:32;9696:2;;;9749:6;9741;9734:22;9696:2;9786:9;9780:16;9805:29;9828:5;9805:29;:::i;9869:437::-;9922:3;9960:5;9954:12;9987:6;9982:3;9975:19;10013:4;10042:2;10037:3;10033:12;10026:19;;10079:2;10072:5;10068:14;10100:3;10112:169;10126:6;10123:1;10120:13;10112:169;;;10187:13;;10175:26;;10221:12;;;;10256:15;;;;10148:1;10141:9;10112:169;;;-1:-1:-1;10297:3:1;;9930:376;-1:-1:-1;;;;;9930:376:1:o;10311:268::-;10399:6;10394:3;10387:19;10451:6;10444:5;10437:4;10432:3;10428:14;10415:43;-1:-1:-1;10369:3:1;10478:16;;;10496:4;10474:27;;;10467:40;;;;10561:2;10540:15;;;-1:-1:-1;;10536:29:1;10527:39;;;10523:50;;10377:202::o;10584:257::-;10625:3;10663:5;10657:12;10690:6;10685:3;10678:19;10706:63;10762:6;10755:4;10750:3;10746:14;10739:4;10732:5;10728:16;10706:63;:::i;:::-;10823:2;10802:15;-1:-1:-1;;10798:29:1;10789:39;;;;10830:4;10785:50;;10633:208;-1:-1:-1;;10633:208:1:o;11068:406::-;11239:3;-1:-1:-1;;;;;11260:31:1;;11257:2;;;11306:3;11301;11294:16;11257:2;11342:6;11339:1;11335:14;11384:6;11376;11371:3;11358:33;11410:16;;;;11435:15;;;11410:16;11247:227;-1:-1:-1;;11247:227:1:o;11666:274::-;11795:3;11833:6;11827:13;11849:53;11895:6;11890:3;11883:4;11875:6;11871:17;11849:53;:::i;:::-;11918:16;;;;;11803:137;-1:-1:-1;;11803:137:1:o;15146:880::-;-1:-1:-1;;;;;15603:15:1;;;15585:34;;15655:15;;;15650:2;15635:18;;15628:43;15702:2;15687:18;;15680:34;;;15745:2;15730:18;;15723:34;;;15788:3;15773:19;;15766:35;;;15838:15;;15565:3;15817:19;;15810:44;15506:4;15535:3;15863:56;15914:3;15899:19;;15891:6;10925:12;;10939:4;10921:23;10909:36;;10994:4;10983:16;;;10977:23;10961:14;;;10954:47;11050:4;11039:16;;;11033:23;11017:14;;11010:47;10899:164;15863:56;15956:2;15950:3;15939:9;15935:19;15928:31;15976:44;16016:2;16005:9;16001:18;15993:6;15976:44;:::i;:::-;15968:52;15515:511;-1:-1:-1;;;;;;;;;;;15515:511:1:o;16031:741::-;-1:-1:-1;;;;;16426:32:1;;16408:51;;16396:3;16490:2;16475:18;;16468:30;;;16367:4;;16515:56;16552:18;;;16544:6;16515:56;:::i;:::-;16507:64;;;16607:6;16602:2;16591:9;16587:18;16580:34;16650:6;16645:2;16634:9;16630:18;16623:34;16694:6;16688:3;16677:9;16673:19;16666:35;16710:56;16761:3;16750:9;16746:19;16738:6;10925:12;;10939:4;10921:23;10909:36;;10994:4;10983:16;;;10977:23;10961:14;;;10954:47;11050:4;11039:16;;;11033:23;11017:14;;11010:47;10899:164;17056:1031;-1:-1:-1;;;;;17497:15:1;;;17479:34;;17544:2;17529:18;;17522:34;;;17587:2;17572:18;;17565:34;;;17630:2;17615:18;;17608:34;;;17679:15;;17673:3;17658:19;;17651:44;17400:4;17429:3;17717:20;;17746:29;17717:20;17746:29;:::i;:::-;17823:4;17812:16;17806:3;17791:19;;17784:45;17891:2;17879:15;;17866:29;17860:3;17845:19;;17838:58;17958:2;17946:15;;17933:29;17927:3;17912:19;;17905:58;17994:3;17979:19;;17972:31;;;18020:61;18062:18;;;18054:6;18046;18020:61;:::i;18092:799::-;-1:-1:-1;;;;;18521:15:1;;;18503:34;;18568:2;18553:18;;;18546:34;;;18611:2;18596:18;;;18589:34;;;18654:2;18639:18;;18632:34;;;18703:15;;;18697:3;18682:19;;18675:44;10925:12;;10939:4;10921:23;18483:3;18764:19;;10909:36;10983:16;;10977:23;10961:14;;;10954:47;11039:16;;11033:23;11017:14;;;11010:47;-1:-1:-1;18453:3:1;18821:2;18815:3;18804:9;18800:19;18793:31;18841:44;18881:2;18870:9;18866:18;18858:6;18841:44;:::i;:::-;18833:52;18433:458;-1:-1:-1;;;;;;;;;;18433:458:1:o;18896:904::-;19181:2;19170:9;19163:21;19144:4;19207:56;19259:2;19248:9;19244:18;19236:6;19207:56;:::i;:::-;19320:22;;;19282:2;19300:18;;;19293:50;;;;19392:13;;19414:22;;;19490:15;;;;19452;;;19523:4;19536:195;19550:6;19547:1;19544:13;19536:195;;;19615:13;;-1:-1:-1;;;;;19611:39:1;19599:52;;19706:15;;;;19671:12;;;;19647:1;19565:9;19536:195;;;19540:3;;19748;19740:11;;;;;19787:6;19782:2;19771:9;19767:18;19760:34;19153:647;;;;;;:::o;23087:219::-;23236:2;23225:9;23218:21;23199:4;23256:44;23296:2;23285:9;23281:18;23273:6;23256:44;:::i;33855:355::-;34057:2;34039:21;;;34096:2;34076:18;;;34069:30;34135:33;34130:2;34115:18;;34108:61;34201:2;34186:18;;34029:181::o;35416:386::-;35629:6;35618:9;35611:25;35672:6;35667:2;35656:9;35652:18;35645:34;35715:2;35710;35699:9;35695:18;35688:30;35592:4;35735:61;35792:2;35781:9;35777:18;35769:6;35761;35735:61;:::i;:::-;35727:69;35601:201;-1:-1:-1;;;;;;35601:201:1:o;36464:128::-;36504:3;36535:1;36531:6;36528:1;36525:13;36522:2;;;36541:18;;:::i;:::-;-1:-1:-1;36577:9:1;;36512:80::o;36597:204::-;36635:3;36671:4;36668:1;36664:12;36703:4;36700:1;36696:12;36738:3;36732:4;36728:14;36723:3;36720:23;36717:2;;;36746:18;;:::i;:::-;36782:13;;36643:158;-1:-1:-1;;;36643:158:1:o;36806:193::-;36845:1;36871;36861:2;;36876:18;;:::i;:::-;-1:-1:-1;;;36912:18:1;;-1:-1:-1;;36932:13:1;;36908:38;36905:2;;;36949:18;;:::i;:::-;-1:-1:-1;36983:10:1;;36851:148::o;37004:120::-;37044:1;37070;37060:2;;37075:18;;:::i;:::-;-1:-1:-1;37109:9:1;;37050:74::o;37129:422::-;37218:1;37261:5;37218:1;37275:270;37296:7;37286:8;37283:21;37275:270;;;37355:4;37351:1;37347:6;37343:17;37337:4;37334:27;37331:2;;;37364:18;;:::i;:::-;37414:7;37404:8;37400:22;37397:2;;;37434:16;;;;37397:2;37513:22;;;;37473:15;;;;37275:270;;;37279:3;37193:358;;;;;:::o;37556:140::-;37614:5;37643:47;37684:4;37674:8;37670:19;37664:4;37750:5;37780:8;37770:2;;-1:-1:-1;37821:1:1;37835:5;;37770:2;37869:4;37859:2;;-1:-1:-1;37906:1:1;37920:5;;37859:2;37951:4;37969:1;37964:59;;;;38037:1;38032:130;;;;37944:218;;37964:59;37994:1;37985:10;;38008:5;;;38032:130;38069:3;38059:8;38056:17;38053:2;;;38076:18;;:::i;:::-;-1:-1:-1;;38132:1:1;38118:16;;38147:5;;37944:218;;38246:2;38236:8;38233:16;38227:3;38221:4;38218:13;38214:36;38208:2;38198:8;38195:16;38190:2;38184:4;38181:12;38177:35;38174:77;38171:2;;;-1:-1:-1;38283:19:1;;;38315:5;;38171:2;38362:34;38387:8;38381:4;38362:34;:::i;:::-;38432:6;38428:1;38424:6;38420:19;38411:7;38408:32;38405:2;;;38443:18;;:::i;:::-;38481:20;;37760:747;-1:-1:-1;;;37760:747:1:o;38512:577::-;38551:7;-1:-1:-1;;;;;38621:15:1;;;38655;;;38686:11;;;38705:10;;;38699:17;;38682:35;38679:2;;;38720:18;;:::i;:::-;-1:-1:-1;;;38789:15:1;;;38820:11;;;38840;;;38833:19;;38816:37;38813:2;;;38856:18;;:::i;:::-;38902:7;38899:1;38895:15;38885:25;;38955:1;38951:2;38946:11;38943:1;38939:19;38934:2;38930;38926:11;38922:37;38919:2;;;38962:18;;:::i;:::-;39027:1;39023:2;39018:11;39015:1;39011:19;39006:2;39002;38998:11;38994:37;38991:2;;;39034:18;;:::i;:::-;-1:-1:-1;;;39074:9:1;;;;;38563:526;-1:-1:-1;;;38563:526:1:o;39094:168::-;39134:7;39200:1;39196;39192:6;39188:14;39185:1;39182:21;39177:1;39170:9;39163:17;39159:45;39156:2;;;39207:18;;:::i;:::-;-1:-1:-1;39247:9:1;;39146:116::o;39267:125::-;39307:4;39335:1;39332;39329:8;39326:2;;;39340:18;;:::i;:::-;-1:-1:-1;39377:9:1;;39316:76::o;39397:195::-;39435:4;39472;39469:1;39465:12;39504:4;39501:1;39497:12;39529:3;39524;39521:12;39518:2;;;39536:18;;:::i;:::-;39573:13;;;39444:148;-1:-1:-1;;;39444:148:1:o;39597:258::-;39669:1;39679:113;39693:6;39690:1;39687:13;39679:113;;;39769:11;;;39763:18;39750:11;;;39743:39;39715:2;39708:10;39679:113;;;39810:6;39807:1;39804:13;39801:2;;;-1:-1:-1;;39845:1:1;39827:16;;39820:27;39650:205::o;39860:380::-;39939:1;39935:12;;;;39982;;;40003:2;;40057:4;40049:6;40045:17;40035:27;;40003:2;40110;40102:6;40099:14;40079:18;40076:38;40073:2;;;40156:10;40151:3;40147:20;40144:1;40137:31;40191:4;40188:1;40181:15;40219:4;40216:1;40209:15;40245:135;40284:3;-1:-1:-1;;40305:17:1;;40302:2;;;40325:18;;:::i;:::-;-1:-1:-1;40372:1:1;40361:13;;40292:88::o;40385:127::-;40446:10;40441:3;40437:20;40434:1;40427:31;40477:4;40474:1;40467:15;40501:4;40498:1;40491:15;40517:127;40578:10;40573:3;40569:20;40566:1;40559:31;40609:4;40606:1;40599:15;40633:4;40630:1;40623:15;40649:114;40733:4;40726:5;40722:16;40715:5;40712:27;40702:2;;40753:1;40750;40743:12;40702:2;40692:71;:::o

Swarm Source

ipfs://b7c6a17716b0b195f1d2657f6cd0f179ee9947eec560bf6ca6a15e1bdccd1671
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.