// File: contracts/Renderer2.sol



//SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.4;

interface NFT {
    function balanceOf(address _owner) external view returns (uint256);
}

contract Renderer2 {
    NFT public nft;
    address public sudopool;

    constructor(NFT _nft) {
        nft = _nft;
    }

    function setSudoPool(address _pool) external {
        require(sudopool == address(0x0));
        sudopool = _pool;
    }

    function render(uint256 _id) external view returns (string memory) {
        uint256 leftToMint = 3000 - (3000 - nft.balanceOf(sudopool));

        return
            string(
                abi.encodePacked(
                    uint2str(leftToMint),
                    '/3000                 </text></g><g id="g28"><text x="0" textLength="24" class="color6">&#129311; </text><text x="24" textLength="720" class="foreground"> Metadata &amp; mechanics will be revealed when the pool is emptied &#128073; ',
                    uint2str(leftToMint),
                    '/3000                 </text></g><g id="g29"><text x="0" textLength="24" class="color6">&#128406; </text><text x="24" textLength="720" class="foreground"> Metadata &amp; mechanics will be revealed when the pool is emptied &#128073; ',
                    uint2str(leftToMint),
                    '/3000                 </text></g><g id="g30"><text x="0" textLength="24" class="color6">&#9995; </text><text x="24" textLength="720" class="foreground"> Metadata &amp; mechanics will be revealed when the pool is emptied &#128073; ',
                    uint2str(leftToMint),
                    '/3000                 </text></g><g id="g31"><text x="0" textLength="24" class="color6">&#129306; </text><text x="24" textLength="720" class="foreground"> Metadata &amp; mechanics will be revealed when the pool is emptied &#128073; ',
                    uint2str(leftToMint),
                    '/3000                 </text></g><g id="g32"><text x="0" textLength="24" class="color6">&#128070; </text><text x="24" textLength="720" class="foreground"> Metadata &amp; mechanics will be revealed when the pool is emptied &#128073; ',
                    uint2str(leftToMint),
                    '/3000                 </text></g></defs><g id="screen_view"><g><use xlink:href="#g1" y="0"/><rect x="0" y="17" width="8" height="17" class="foreground"/><use xlink:href="#g2" y="17"/></g><g><use xlink:href="#g1" y="850"/><rect x="0" y="867" width="8" height="17" class="foreground"/><use xlink:href="#g2" y="867"/></g><g><use xlink:href="#g1" y="1700"/><rect x="0" y="1717" width="8" height="17" class="foreground"/><use xlink:href="#g3" y="1717"/></g><g><use xlink:href="#g1" y="2550"/><rect x="0" y="2567" width="8" height="17" class="foreground"/><use xlink:href="#g3" y="2567"/></g><g><use xlink:href="#g1" y="3400"/><rect x="104" y="3417" width="8" height="17" class="foreground"/><use xlink:href="#g4" y="3417"/></g><g><use xlink:href="#g1" y="4250"/><rect x="112" y="4267" width="8" height="17" class="foreground"/><use xlink:href="#g5" y="4267"/></g><g><use xlink:href="#g1" y="5100"/><rect x="120" y="5117" width="8" height="17" class="foreground"/><use xlink:href="#g6" y="5117"/></g><g><use xlink:href="#g1" y="5950"/><rect x="128" y="5967" width="8" height="17" class="foreground"/><use xlink:href="#g7" y="5967"/></g><g><use xlink:href="#g1" y="6800"/><rect x="136" y="6817" width="8" height="17" class="foreground"/><use xlink:href="#g8" y="6817"/></g><g><use xlink:href="#g1" y="7650"/><rect x="144" y="7667" width="8" height="17" class="foreground"/><use xlink:href="#g9" y="7667"/></g><g><use xlink:href="#g1" y="8500"/><rect x="152" y="8517" width="8" height="17" class="foreground"/><use xlink:href="#g10" y="8517"/></g><g><use xlink:href="#g1" y="9350"/><rect x="160" y="9367" width="8" height="17" class="foreground"/><use xlink:href="#g11" y="9367"/></g><g><use xlink:href="#g1" y="10200"/><rect x="168" y="10217" width="8" height="17" class="foreground"/><use xlink:href="#g12" y="10217"/></g><g><use xlink:href="#g1" y="11050"/><rect x="176" y="11067" width="8" height="17" class="foreground"/><use xlink:href="#g13" y="11067"/></g><g><use xlink:href="#g1" y="11900"/><rect x="216" y="11917" width="8" height="17" class="foreground"/><use xlink:href="#g14" y="11917"/></g><g><use xlink:href="#g1" y="12750"/><rect x="208" y="12767" width="8" height="17" class="foreground"/><use xlink:href="#g15" y="12767"/></g><g><use xlink:href="#g1" y="13600"/><use xlink:href="#g16" y="13617"/><rect x="0" y="13634" width="8" height="17" class="foreground"/><use xlink:href="#g2" y="13634"/></g><g><use xlink:href="#g1" y="14450"/><use xlink:href="#g16" y="14467"/><use xlink:href="#g17" y="14484"/></g><g><use xlink:href="#g1" y="15300"/><use xlink:href="#g16" y="15317"/><use xlink:href="#g18" y="15334"/></g><g><use xlink:href="#g1" y="16150"/><use xlink:href="#g16" y="16167"/><use xlink:href="#g18" y="16184"/></g><g><use xlink:href="#g1" y="17000"/><use xlink:href="#g16" y="17017"/><use xlink:href="#g19" y="17034"/></g><g><use xlink:href="#g1" y="17850"/><use xlink:href="#g16" y="17867"/><use xlink:href="#g19" y="17884"/></g><g><use xlink:href="#g1" y="18700"/><use xlink:href="#g16" y="18717"/><use xlink:href="#g20" y="18734"/></g><g><use xlink:href="#g1" y="19550"/><use xlink:href="#g16" y="19567"/><use xlink:href="#g20" y="19584"/></g><g><use xlink:href="#g1" y="20400"/><use xlink:href="#g16" y="20417"/><use xlink:href="#g21" y="20434"/></g><g><use xlink:href="#g1" y="21250"/><use xlink:href="#g16" y="21267"/><use xlink:href="#g21" y="21284"/></g><g><use xlink:href="#g1" y="22100"/><use xlink:href="#g16" y="22117"/><use xlink:href="#g22" y="22134"/></g><g><use xlink:href="#g1" y="22950"/><use xlink:href="#g16" y="22967"/><use xlink:href="#g22" y="22984"/></g><g><use xlink:href="#g1" y="23800"/><use xlink:href="#g16" y="23817"/><use xlink:href="#g23" y="23834"/></g><g><use xlink:href="#g1" y="24650"/><use xlink:href="#g16" y="24667"/><use xlink:href="#g23" y="24684"/></g><g><use xlink:href="#g1" y="25500"/><use xlink:href="#g16" y="25517"/><use xlink:href="#g24" y="25534"/></g><g><use xlink:href="#g1" y="26350"/><use xlink:href="#g16" y="26367"/><use xlink:href="#g25" y="26384"/></g><g><use xlink:href="#g1" y="27200"/><use xlink:href="#g16" y="27217"/><use xlink:href="#g26" y="27234"/></g><g><use xlink:href="#g1" y="28050"/><use xlink:href="#g16" y="28067"/><use xlink:href="#g26" y="28084"/></g><g><use xlink:href="#g1" y="28900"/><use xlink:href="#g16" y="28917"/><use xlink:href="#g18" y="28934"/></g><g><use xlink:href="#g1" y="29750"/><use xlink:href="#g16" y="29767"/><use xlink:href="#g18" y="29784"/></g><g><use xlink:href="#g1" y="30600"/><use xlink:href="#g16" y="30617"/><use xlink:href="#g19" y="30634"/></g><g><use xlink:href="#g1" y="31450"/><use xlink:href="#g16" y="31467"/><use xlink:href="#g19" y="31484"/></g><g><use xlink:href="#g1" y="32300"/><use xlink:href="#g16" y="32317"/><use xlink:href="#g20" y="32334"/></g><g><use xlink:href="#g1" y="33150"/><use xlink:href="#g16" y="33167"/><use xlink:href="#g25" y="33184"/></g><g><use xlink:href="#g1" y="34000"/><use xlink:href="#g16" y="34017"/><use xlink:href="#g21" y="34034"/></g><g><use xlink:href="#g1" y="34850"/><use xlink:href="#g16" y="34867"/><use xlink:href="#g25" y="34884"/></g><g><use xlink:href="#g1" y="35700"/><use xlink:href="#g16" y="35717"/><use xlink:href="#g22" y="35734"/></g><g><use xlink:href="#g1" y="36550"/><use xlink:href="#g16" y="36567"/><use xlink:href="#g25" y="36584"/></g><g><use xlink:href="#g1" y="37400"/><use xlink:href="#g16" y="37417"/><use xlink:href="#g23" y="37434"/></g><g><use xlink:href="#g1" y="38250"/><use xlink:href="#g16" y="38267"/><use xlink:href="#g25" y="38284"/></g><g><use xlink:href="#g1" y="39100"/><use xlink:href="#g16" y="39117"/><use xlink:href="#g24" y="39134"/></g><g><use xlink:href="#g1" y="39950"/><use xlink:href="#g16" y="39967"/><use xlink:href="#g25" y="39984"/></g><g><use xlink:href="#g1" y="40800"/><use xlink:href="#g16" y="40817"/><use xlink:href="#g26" y="40834"/></g><g><use xlink:href="#g1" y="41650"/><use xlink:href="#g16" y="41667"/><use xlink:href="#g26" y="41684"/></g><g><use xlink:href="#g1" y="42500"/><use xlink:href="#g16" y="42517"/><use xlink:href="#g18" y="42534"/></g><g><use xlink:href="#g1" y="43350"/><use xlink:href="#g16" y="43367"/><use xlink:href="#g25" y="43384"/></g><g><use xlink:href="#g1" y="44200"/><use xlink:href="#g16" y="44217"/><use xlink:href="#g19" y="44234"/></g><g><use xlink:href="#g1" y="45050"/><use xlink:href="#g16" y="45067"/><use xlink:href="#g25" y="45084"/></g><g><use xlink:href="#g1" y="45900"/><use xlink:href="#g16" y="45917"/><use xlink:href="#g20" y="45934"/></g><g><use xlink:href="#g1" y="46750"/><use xlink:href="#g16" y="46767"/><use xlink:href="#g25" y="46784"/></g><g><use xlink:href="#g1" y="47600"/><use xlink:href="#g16" y="47617"/><use xlink:href="#g21" y="47634"/></g><g><use xlink:href="#g1" y="48450"/><use xlink:href="#g16" y="48467"/><use xlink:href="#g25" y="48484"/></g><g><use xlink:href="#g1" y="49300"/><use xlink:href="#g16" y="49317"/><use xlink:href="#g22" y="49334"/></g><g><use xlink:href="#g1" y="50150"/><use xlink:href="#g16" y="50167"/><use xlink:href="#g25" y="50184"/></g><g><use xlink:href="#g1" y="51000"/><use xlink:href="#g16" y="51017"/><use xlink:href="#g23" y="51034"/></g><g><use xlink:href="#g1" y="51850"/><use xlink:href="#g16" y="51867"/><use xlink:href="#g25" y="51884"/></g><g><use xlink:href="#g1" y="52700"/><use xlink:href="#g16" y="52717"/><use xlink:href="#g24" y="52734"/></g><g><use xlink:href="#g1" y="53550"/><use xlink:href="#g16" y="53567"/><use xlink:href="#g25" y="53584"/></g><g><use xlink:href="#g1" y="54400"/><use xlink:href="#g16" y="54417"/><use xlink:href="#g26" y="54434"/></g><g><use xlink:href="#g1" y="55250"/><use xlink:href="#g16" y="55267"/><use xlink:href="#g25" y="55284"/></g><g><use xlink:href="#g1" y="56100"/><use xlink:href="#g16" y="56117"/><use xlink:href="#g18" y="56134"/></g><g><use xlink:href="#g1" y="56950"/><use xlink:href="#g16" y="56967"/><use xlink:href="#g25" y="56984"/></g><g><use xlink:href="#g1" y="57800"/><use xlink:href="#g16" y="57817"/><use xlink:href="#g19" y="57834"/></g><g><use xlink:href="#g1" y="58650"/><use xlink:href="#g16" y="58667"/><use xlink:href="#g25" y="58684"/></g><g><use xlink:href="#g1" y="59500"/><use xlink:href="#g16" y="59517"/><use xlink:href="#g20" y="59534"/></g><g><use xlink:href="#g1" y="60350"/><use xlink:href="#g16" y="60367"/><use xlink:href="#g25" y="60384"/></g><g><use xlink:href="#g1" y="61200"/><use xlink:href="#g16" y="61217"/><use xlink:href="#g21" y="61234"/></g><g><use xlink:href="#g1" y="62050"/><use xlink:href="#g16" y="62067"/><use xlink:href="#g21" y="62084"/></g><g><use xlink:href="#g1" y="62900"/><use xlink:href="#g16" y="62917"/><use xlink:href="#g22" y="62934"/></g><g><use xlink:href="#g1" y="63750"/><use xlink:href="#g16" y="63767"/><use xlink:href="#g23" y="63784"/></g><g><use xlink:href="#g1" y="64600"/><use xlink:href="#g16" y="64617"/><use xlink:href="#g25" y="64634"/></g><g><use xlink:href="#g1" y="65450"/><use xlink:href="#g16" y="65467"/><use xlink:href="#g24" y="65484"/></g><g><use xlink:href="#g1" y="66300"/><use xlink:href="#g16" y="66317"/><use xlink:href="#g25" y="66334"/></g><g><use xlink:href="#g1" y="67150"/><use xlink:href="#g16" y="67167"/><use xlink:href="#g26" y="67184"/></g><g><use xlink:href="#g1" y="68000"/><use xlink:href="#g16" y="68017"/><use xlink:href="#g25" y="68034"/></g><g><use xlink:href="#g1" y="68850"/><use xlink:href="#g16" y="68867"/><use xlink:href="#g18" y="68884"/></g><g><use xlink:href="#g1" y="69700"/><use xlink:href="#g16" y="69717"/><use xlink:href="#g25" y="69734"/></g><g><use xlink:href="#g1" y="70550"/><use xlink:href="#g16" y="70567"/><use xlink:href="#g19" y="70584"/></g><g><use xlink:href="#g1" y="71400"/><use xlink:href="#g16" y="71417"/><use xlink:href="#g25" y="71434"/></g><g><use xlink:href="#g1" y="72250"/><use xlink:href="#g16" y="72267"/><use xlink:href="#g20" y="72284"/></g><g><use xlink:href="#g1" y="73100"/><use xlink:href="#g16" y="73117"/><use xlink:href="#g25" y="73134"/></g><g><use xlink:href="#g1" y="73950"/><use xlink:href="#g16" y="73967"/><use xlink:href="#g21" y="73984"/></g><g><use xlink:href="#g1" y="74800"/><use xlink:href="#g16" y="74817"/><use xlink:href="#g25" y="74834"/></g><g><use xlink:href="#g1" y="75650"/><use xlink:href="#g16" y="75667"/><use xlink:href="#g22" y="75684"/></g><g><use xlink:href="#g1" y="76500"/><use xlink:href="#g16" y="76517"/><use xlink:href="#g22" y="76534"/></g><g><use xlink:href="#g1" y="77350"/><use xlink:href="#g16" y="77367"/><use xlink:href="#g23" y="77384"/></g><g><use xlink:href="#g1" y="78200"/><use xlink:href="#g16" y="78217"/><use xlink:href="#g25" y="78234"/></g><g><use xlink:href="#g1" y="79050"/><use xlink:href="#g16" y="79067"/><use xlink:href="#g24" y="79084"/></g><g><use xlink:href="#g1" y="79900"/><use xlink:href="#g16" y="79917"/><use xlink:href="#g25" y="79934"/></g><g><use xlink:href="#g1" y="80750"/><use xlink:href="#g16" y="80767"/><use xlink:href="#g26" y="80784"/></g><g><use xlink:href="#g1" y="81600"/><use xlink:href="#g16" y="81617"/><use xlink:href="#g25" y="81634"/></g><g><use xlink:href="#g1" y="82450"/><use xlink:href="#g16" y="82467"/><use xlink:href="#g18" y="82484"/></g><g><use xlink:href="#g1" y="83300"/><use xlink:href="#g16" y="83317"/><use xlink:href="#g18" y="83334"/></g><g><use xlink:href="#g1" y="84150"/><use xlink:href="#g16" y="84167"/><use xlink:href="#g19" y="84184"/></g><g><use xlink:href="#g1" y="85000"/><use xlink:href="#g16" y="85017"/><use xlink:href="#g25" y="85034"/></g><g><use xlink:href="#g1" y="85850"/><use xlink:href="#g16" y="85867"/><use xlink:href="#g20" y="85884"/></g><g><use xlink:href="#g1" y="86700"/><use xlink:href="#g16" y="86717"/><use xlink:href="#g25" y="86734"/></g><g><use xlink:href="#g1" y="87550"/><use xlink:href="#g16" y="87567"/><use xlink:href="#g21" y="87584"/></g><g><use xlink:href="#g1" y="88400"/><use xlink:href="#g16" y="88417"/><use xlink:href="#g21" y="88434"/></g><g><use xlink:href="#g1" y="89250"/><use xlink:href="#g16" y="89267"/><use xlink:href="#g22" y="89284"/></g><g><use xlink:href="#g1" y="90100"/><use xlink:href="#g16" y="90117"/><use xlink:href="#g25" y="90134"/></g><g><use xlink:href="#g1" y="90950"/><use xlink:href="#g16" y="90967"/><use xlink:href="#g23" y="90984"/></g><g><use xlink:href="#g1" y="91800"/><use xlink:href="#g16" y="91817"/><use xlink:href="#g25" y="91834"/></g><g><use xlink:href="#g1" y="92650"/><use xlink:href="#g16" y="92667"/><use xlink:href="#g24" y="92684"/></g><g><use xlink:href="#g1" y="93500"/><use xlink:href="#g16" y="93517"/><use xlink:href="#g25" y="93534"/></g><g><use xlink:href="#g1" y="94350"/><use xlink:href="#g16" y="94367"/><use xlink:href="#g26" y="94384"/></g><g><use xlink:href="#g1" y="95200"/><use xlink:href="#g16" y="95217"/><use xlink:href="#g25" y="95234"/></g><g><use xlink:href="#g1" y="96050"/><use xlink:href="#g16" y="96067"/><use xlink:href="#g18" y="96084"/></g><g><use xlink:href="#g1" y="96900"/><use xlink:href="#g16" y="96917"/><use xlink:href="#g25" y="96934"/></g><g><use xlink:href="#g1" y="97750"/><use xlink:href="#g16" y="97767"/><use xlink:href="#g19" y="97784"/></g><g><use xlink:href="#g1" y="98600"/><use xlink:href="#g16" y="98617"/><use xlink:href="#g25" y="98634"/></g><g><use xlink:href="#g1" y="99450"/><use xlink:href="#g16" y="99467"/><use xlink:href="#g20" y="99484"/></g><g><use xlink:href="#g1" y="100300"/><use xlink:href="#g16" y="100317"/><use xlink:href="#g25" y="100334"/></g><g><use xlink:href="#g1" y="101150"/><use xlink:href="#g16" y="101167"/><use xlink:href="#g21" y="101184"/></g><g><use xlink:href="#g1" y="102000"/><use xlink:href="#g16" y="102017"/><use xlink:href="#g25" y="102034"/></g><g><use xlink:href="#g1" y="102850"/><use xlink:href="#g16" y="102867"/><use xlink:href="#g22" y="102884"/></g><g><use xlink:href="#g1" y="103700"/><use xlink:href="#g16" y="103717"/><use xlink:href="#g25" y="103734"/></g><g><use xlink:href="#g1" y="104550"/><use xlink:href="#g16" y="104567"/><use xlink:href="#g23" y="104584"/></g><g><use xlink:href="#g1" y="105400"/><use xlink:href="#g16" y="105417"/><use xlink:href="#g25" y="105434"/></g><g><use xlink:href="#g1" y="106250"/><use xlink:href="#g16" y="106267"/><use xlink:href="#g24" y="106284"/></g><g><use xlink:href="#g1" y="107100"/><use xlink:href="#g16" y="107117"/><use xlink:href="#g25" y="107134"/></g><g><use xlink:href="#g1" y="107950"/><use xlink:href="#g16" y="107967"/><use xlink:href="#g26" y="107984"/></g><g><use xlink:href="#g1" y="108800"/><use xlink:href="#g16" y="108817"/><use xlink:href="#g25" y="108834"/></g><g><use xlink:href="#g1" y="109650"/><use xlink:href="#g16" y="109667"/><use xlink:href="#g18" y="109684"/></g><g><use xlink:href="#g1" y="110500"/><use xlink:href="#g16" y="110517"/><use xlink:href="#g18" y="110534"/></g><g><use xlink:href="#g1" y="111350"/><use xlink:href="#g16" y="111367"/><use xlink:href="#g19" y="111384"/></g><g><use xlink:href="#g1" y="112200"/><use xlink:href="#g16" y="112217"/><use xlink:href="#g25" y="112234"/></g><g><use xlink:href="#g1" y="113050"/><use xlink:href="#g16" y="113067"/><use xlink:href="#g20" y="113084"/></g><g><use xlink:href="#g1" y="113900"/><use xlink:href="#g16" y="113917"/><use xlink:href="#g25" y="113934"/></g><g><use xlink:href="#g1" y="114750"/><use xlink:href="#g16" y="114767"/><use xlink:href="#g21" y="114784"/></g><g><use xlink:href="#g1" y="115600"/><use xlink:href="#g16" y="115617"/><use xlink:href="#g25" y="115634"/></g><g><use xlink:href="#g1" y="116450"/><use xlink:href="#g16" y="116467"/><use xlink:href="#g22" y="116484"/></g><g><use xlink:href="#g1" y="117300"/><use xlink:href="#g16" y="117317"/><use xlink:href="#g25" y="117334"/></g><g><use xlink:href="#g1" y="118150"/><use xlink:href="#g16" y="118167"/><use xlink:href="#g27" y="118184"/></g><g><use xlink:href="#g1" y="119000"/><use xlink:href="#g16" y="119017"/><use xlink:href="#g25" y="119034"/></g><g><use xlink:href="#g1" y="119850"/><use xlink:href="#g16" y="119867"/><use xlink:href="#g28" y="119884"/></g><g><use xlink:href="#g1" y="120700"/>'
                )
            );
    }

    function uint2str(uint256 _i)
        public
        pure
        returns (string memory _uintAsString)
    {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len;
        while (_i != 0) {
            k = k - 1;
            uint8 temp = (48 + uint8(_i - (_i / 10) * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }
}