{"matchId":"56682690","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-10-21T22:03:48Z","creationBytecode":{"onchainBytecode":"0x60a0604052348015600e575f80fd5b5060015f818155735f7bb59365ce557c26dbcaa4ee9d39a4b95b712760805281546001600160a01b03191673a43e6f75ee006411f79ac1c84120606c2330de829081179092556040517fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45908290a36080516125e36100be5f395f818161053c015281816107c301528181610e0a01528181610f0601528181610f900152818161124d01526113f801526125e35ff3fe6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000000000000000000000000000000000000000000000906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000000000000000000000000000000000000000000000925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","recompiledBytecode":"0x60a0604052348015600e575f80fd5b5060015f818155735f7bb59365ce557c26dbcaa4ee9d39a4b95b712760805281546001600160a01b03191673a43e6f75ee006411f79ac1c84120606c2330de829081179092556040517fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45908290a36080516125e36100be5f395f818161053c015281816107c301528181610e0a01528181610f0601528181610f900152818161124d01526113f801526125e35ff3fe6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000000000000000000000000000000000000000000000906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000000000000000000000000000000000000000000000925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","sourceMap":"2056:17195:12:-:0;;;7537:133;;;;;;;;;-1:-1:-1;1857:1:6;2061:7;:21;;;2591:42:12;7561:23;;7594:18;;-1:-1:-1;;;;;;7594:18:12;2439:42;7594:18;;;;;;7627:36;;;;2061:7:6;;7627:36:12;2056:17195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{},"cborAuxdata":{},"transformations":[],"transformationValues":{}},"runtimeBytecode":{"onchainBytecode":"0x6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b71276001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b71276001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b712716856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b7127906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b7127163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b7127925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","recompiledBytecode":"0x6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000000000000000000000000000000000000000000000906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000000000000000000000000000000000000000000000925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","sourceMap":"2056:17195:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13473:9;;-1:-1:-1;;;13473:9:12;;;;;;;;;;;2056:17195;;;;5766:32;;;;;;;;;;;;;;;;;;;160:25:14;;;148:2;133:18;5766:32:12;;;;;;;;2814:44;;;;;;;;;;;;2856:1;2814:44;;;;;-1:-1:-1;;;;;360:32:14;;;342:51;;330:2;315:18;2814:44:12;196:203:14;5222:16:12;;;;;;;;;;-1:-1:-1;5222:16:12;;;;-1:-1:-1;;;5222:16:12;;;;;;;;;569:14:14;;562:22;544:41;;532:2;517:18;5222:16:12;404:187:14;2555:78:12;;;;;;;;;;;;2591:42;2555:78;;2403;;;;;;;;;;;;2439:42;2403:78;;3652:36;;;;;;;;;;;;3687:1;3652:36;;;;;768:4:14;756:17;;;738:36;;726:2;711:18;3652:36:12;596:184:14;9986:619:12;;;;;;;;;;-1:-1:-1;9986:619:12;;;;;:::i;:::-;;:::i;:::-;;13642:144;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;14274:174::-;;;;;;;;;;-1:-1:-1;14274:174:12;;;;;:::i;:::-;;:::i;10810:367::-;;;;;;;;;;-1:-1:-1;10810:367:12;;;;;:::i;:::-;;:::i;14733:144::-;;;;;;;;;;;;;:::i;:::-;;;3833:18:14;3821:31;;;3803:50;;3791:2;3776:18;14733:144:12;3659:200:14;5126:21:12;;;;;;;;;;-1:-1:-1;5126:21:12;;;;-1:-1:-1;;;;;5126:21:12;;;3787:44;;;;;;;;;;;;3828:3;3787:44;;2959:58;;;;;;;;;;;;-1:-1:-1;;;2959:58:12;;3078:38;;;;;;;;;;;;3110:6;3078:38;;5439:27;;;;;;;;;;-1:-1:-1;5439:27:12;;;;-1:-1:-1;;;5439:27:12;;;;;;;;;4220:14:14;4208:27;;;4190:46;;4178:2;4163:18;5439:27:12;4046:196:14;13999:172:12;;;;;;;;;;-1:-1:-1;13999:172:12;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;13838:90::-;;;;;;;;;;-1:-1:-1;13911:10:12;;-1:-1:-1;;;13911:10:12;;;;13838:90;;5661:23;;;;;;;;;;;;;;;;13213:170;;;;;;;;;;-1:-1:-1;13213:170:12;;;;;:::i;:::-;;:::i;3216:40::-;;;;;;;;;;;;3249:7;3216:40;;5340:26;;;;;;;;;;-1:-1:-1;5340:26:12;;;;-1:-1:-1;;;5340:26:12;;;;;;14941:154;;;;;;;;;;;;;:::i;11377:372::-;;;;;;;;;;;;;:::i;6004:27::-;;;;;;;;;;;;;;;8102:1593;;;;;;;;;;;;;:::i;14518:146::-;;;;;;;;;;;;;:::i;12043:367::-;;;;;;;;;;-1:-1:-1;12043:367:12;;;;;:::i;:::-;;:::i;12600:214::-;;;;;;;;;;-1:-1:-1;12600:214:12;;;;;:::i;:::-;;:::i;3356:40::-;;;;;;;;;;;;3389:7;3356:40;;3600:46;;;;;;;;;;;;3639:7;3600:46;;9986:619;2500:21:6;:19;:21::i;:::-;10096:9:12::1;10108:18;10116:9;10108:7;:18::i;:::-;10137:23;10163:12:::0;;;:9:::1;:12;::::0;;;;;;10185::::1;::::0;::::1;:25:::0;;;10232:21;;10096:30;;-1:-1:-1;10163:12:12;10232:21:::1;::::0;10248:3;;;;10232:21:::1;:::i;:::-;;::::0;;;;::::1;::::0;;10220:9:::1;::::0;::::1;:33:::0;10263:13:::1;::::0;::::1;:39:::0;;-1:-1:-1;;;;;10263:39:12::1;-1:-1:-1::0;;;10286:15:12::1;10263:39;;;;::::0;;-1:-1:-1;10312:22:12;;-1:-1:-1;;;;;10344:17:12;-1:-1:-1;;;10312:22:12::1;::::0;::::1;;-1:-1:-1::0;;;;10344:17:12;;;;10394:14;-1:-1:-1;;;;;10394:14:12::1;::::0;10435:9;;10312:22;;10424:38:::1;::::0;::::1;::::0;10446:10;;10458:3;;;;10424:38:::1;:::i;:::-;;;;;;;;10477:27;10491:12;10477:13;:27::i;:::-;10473:125;;;10522:12;-1:-1:-1::0;;;;;10511:32:12::1;;3249:7;10511:32;;;;160:25:14::0;;148:2;133:18;;14:177;10511:32:12::1;;;;;;;;10473:125;;;10577:12;-1:-1:-1::0;;;;;10563:35:12::1;;3249:7;10563:35;;;;160:25:14::0;;148:2;133:18;;14:177;10563:35:12::1;;;;;;;;10473:125;10086:519;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;9986:619:12;;;;:::o;13642:144::-;13688:12;13719:60;13733:10;;;;;;;;;;;13725:19;;13747:1;13725:23;;;;:::i;:::-;13750:28;;-1:-1:-1;;;13750:28:12;;13772:4;13750:28;;;342:51:14;13750:3:12;-1:-1:-1;;;;;13750:13:12;;;;315:18:14;;13750:28:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13719:5;:60::i;:::-;13712:67;;13642:144;:::o;14274:174::-;14329:4;14349:6;;;:24;;-1:-1:-1;14363:10:12;;-1:-1:-1;;;14363:10:12;;;;14359:14;;14349:24;14345:53;;;14382:16;;-1:-1:-1;;;14382:16:12;;;;;160:25:14;;;133:18;;14382:16:12;;;;;;;;14345:53;14428:12;;;;:9;:12;;;;;14415:26;;:12;:26::i;:::-;14408:33;14274:174;-1:-1:-1;;14274:174:12:o;10810:367::-;2500:21:6;:19;:21::i;:::-;11075:18:12::1;11083:9;11075:7;:18::i;:::-;;11103:19;11115:6;11103:11;:19::i;:::-;11137:33;::::0;;7598:4:14;7586:17;;7568:36;;7635:2;7620:18;;7613:34;;;11144:9:12;;11137:33:::1;::::0;7541:18:14;11137:33:12::1;;;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;10810:367:12;;;;;;;:::o;14733:144::-;14805:4;;14780:6;;-1:-1:-1;;;14805:4:12;;;;:65;;-1:-1:-1;14869:1:12;;13642:144::o;14805:65::-;14819:9;:34;14837:10;;;;;;;;;;;14829:19;;14851:1;14829:23;;;;:::i;:::-;14819:34;;;;;;;;;;;-1:-1:-1;14819:34:12;:46;;;-1:-1:-1;;;14819:46:12;;;;;14733:144;-1:-1:-1;14733:144:12:o;13999:172::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14086:6:12;;;:24;;-1:-1:-1;14100:10:12;;-1:-1:-1;;;14100:10:12;;;;14096:14;;14086:24;14082:53;;;14119:16;;-1:-1:-1;;;14119:16:12;;;;;160:25:14;;;133:18;;14119:16:12;14:177:14;14082:53:12;14152:12;;;;:9;:12;;;;;;;;;14145:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14145:19:12;;;;;;;-1:-1:-1;;;14145:19:12;;;;;;;;-1:-1:-1;;;14145:19:12;;;;;;;;;;;;;;;14152:12;14145:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13999:172;;;:::o;13213:170::-;13269:10;:21;13265:46;;13299:12;;-1:-1:-1;;;13299:12:12;;;;;;;;;;;13265:46;13340:6;;13326:27;;-1:-1:-1;;;;;13326:27:12;;;;13340:6;;13326:27;;13340:6;;13326:27;13363:6;:13;;-1:-1:-1;;;;;;13363:13:12;-1:-1:-1;;;;;13363:13:12;;;;;;;;;;13213:170::o;14941:154::-;15021:4;;14995:7;;-1:-1:-1;;;15021:4:12;;;;:67;;-1:-1:-1;15086:1:12;;13642:144::o;15021:67::-;15028:9;:34;15046:10;;;;;;;;;;;15038:19;;15060:1;15038:23;;;;:::i;:::-;15028:34;;;;;;;;;;;-1:-1:-1;15028:34:12;:47;;;-1:-1:-1;;;;;15028:47:12;15014:74;;14941:154;:::o;11377:372::-;2500:21:6;:19;:21::i;:::-;11431:4:12::1;::::0;-1:-1:-1;;;11431:4:12;::::1;;;11426:27;;11444:9;;-1:-1:-1::0;;;11444:9:12::1;;;;;;;;;;;11426:27;11507:10;::::0;;11463:23:::1;::::0;11489:9:::1;::::0;11463:23;;11499::::1;::::0;-1:-1:-1;;;11507:10:12;::::1;;;::::0;11499:23:::1;:::i;:::-;11489:34:::0;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;11489:34:12;;;11560:13:::1;::::0;::::1;::::0;11489:34;;-1:-1:-1;11552:32:12::1;::::0;3389:7:::1;::::0;-1:-1:-1;;;11560:13:12;::::1;;;11552:32;:::i;:::-;11533:51;;11617:8;11598:15;:27;11594:58;;11634:18;::::0;-1:-1:-1;;;11634:18:12;;::::1;::::0;::::1;160:25:14::0;;;133:18;;11634::12::1;14:177:14::0;11594:58:12::1;11662:4;:12:::0;;-1:-1:-1;;;;11662:12:12::1;::::0;;11684:22:::1;-1:-1:-1::0;;;11684:11:12::1;:22::i;:::-;11730:11:::0;;11721:21:::1;::::0;::::1;::::0;11730:11:::1;::::0;11721:21:::1;11416:333;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;11377:372:12:o;8102:1593::-;8155:17;2500:21:6;:19;:21::i;:::-;8202:6:12::1;::::0;-1:-1:-1;;;;;8202:6:12::1;8417:10;:21:::0;;;8413:58:::1;;8447:24;;-1:-1:-1::0;;;8447:24:12::1;;;;;;;;;;;8413:58;8485:4;::::0;-1:-1:-1;;;8485:4:12;::::1;;;8481:23;;;8498:6;;-1:-1:-1::0;;;8498:6:12::1;;;;;;;;;;;8481:23;8536:13;::::0;-1:-1:-1;;;8536:13:12;::::1;;;8518:15;:31;8514:70;;;8570:13;::::0;8558:26:::1;::::0;-1:-1:-1;;;;;;8558:26:12;;-1:-1:-1;;;8570:13:12;;::::1;;;8558:26;::::0;::::1;4190:46:14::0;4163:18;;8558:26:12::1;4046:196:14::0;8514:70:12::1;8615:10;::::0;;8595:9:::1;::::0;8607:23:::1;::::0;-1:-1:-1;;;8615:10:12;::::1;;;::::0;8607:23:::1;:::i;:::-;8595:35;;8648:1;8644;:5;:40;;;;-1:-1:-1::0;8654:30:12::1;8667:9;:16;8677:5;8681:1;8677::::0;:5:::1;:::i;:::-;8667:16;;;;;;;;;;;8654:12;:30::i;:::-;8653:31;8644:40;8640:80;;;8714:5;8718:1;8714::::0;:5:::1;:::i;:::-;8693:27;;-1:-1:-1::0;;;8693:27:12::1;;;;;;160:25:14::0;;148:2;133:18;;14:177;8640:80:12::1;8749:28;::::0;-1:-1:-1;;;8749:28:12;;8771:4:::1;8749:28;::::0;::::1;342:51:14::0;8731:15:12::1;::::0;8749:3:::1;-1:-1:-1::0;;;;;8749:13:12::1;::::0;::::1;::::0;315:18:14;;8749:28:12::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8731:46:::0;-1:-1:-1;8801:14:12::1;3249:7;3110:6;8801:14;:::i;:::-;8791:7;:24;8787:81;;;8844:7:::0;8853:14:::1;3249:7;3110:6;8853:14;:::i;:::-;8824:44;::::0;-1:-1:-1;;;8824:44:12;;::::1;::::0;::::1;8552:25:14::0;;;;8593:18;;;8586:34;8525:18;;8824:44:12::1;8378:248:14::0;8787:81:12::1;8879:17;8899;8905:1;8908:7;8899:5;:17::i;:::-;8933:4;8926:11:::0;;-1:-1:-1;;;;8926:11:12::1;-1:-1:-1::0;;;8926:11:12::1;::::0;;8879:37;-1:-1:-1;8948:32:12::1;-1:-1:-1::0;;;;;8948:3:12::1;:16;8965:7:::0;3110:6:::1;8948:16;:32::i;:::-;9125:77;::::0;;;;::::1;::::0;;9161:4:::1;9125:77:::0;;-1:-1:-1;;;9125:77:12::1;::::0;::::1;::::0;9002:308;;-1:-1:-1;;;9002:308:12;;-1:-1:-1;;;;;9002:50:12;::::1;::::0;::::1;::::0;:308:::1;::::0;-1:-1:-1;;;9070:15:12;9103:4;;9125:77;-1:-1:-1;;;9220:23:12;9269:3:::1;::::0;3110:6:::1;::::0;9002:308:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8990:320:::0;-1:-1:-1;8990:320:12;9411:51:::1;;9447:15;;-1:-1:-1::0;;;9447:15:12::1;;;;;;;;;;;9411:51;9472:23;9498:12:::0;;;:9:::1;:12;::::0;;;;;;9520:23;;;9553:14:::1;::::0;::::1;:27:::0;;-1:-1:-1;;;;;;9590:39:12;9570:10:::1;-1:-1:-1::0;;;;9590:39:12;;;;;;-1:-1:-1;;;9613:15:12::1;9590:39;;;;::::0;;;9644:44;;9498:12;;9570:10;9520:23;;9498:12;;9644:44:::1;::::0;::::1;::::0;9683:4;;9644:44:::1;:::i;:::-;;;;;;;;8174:1521;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;8102:1593:12;:::o;14518:146::-;14593:4;;14567:7;;-1:-1:-1;;;14593:4:12;;;;:64;;-1:-1:-1;14655:1:12;;13642:144::o;14593:64::-;14600:9;:34;14618:10;;;;;;;;;;;14610:19;;14632:1;14610:23;;;;:::i;:::-;14600:34;;;;;;;;;;;:44;;;14586:71;;14518:146;:::o;12043:367::-;12116:6;;;:24;;-1:-1:-1;12130:10:12;;-1:-1:-1;;;12130:10:12;;;;12126:14;;12116:24;12112:53;;;12149:16;;-1:-1:-1;;;12149:16:12;;;;;160:25:14;;;133:18;;12149:16:12;14:177:14;12112:53:12;12175:23;12201:12;;;:9;:12;;;;;;;;12233:5;;;12227:19;;;;;:::i;:::-;:24;;-1:-1:-1;12223:56:12;;12260:19;;-1:-1:-1;;;12260:19:12;;;;;160:25:14;;;133:18;;12260:19:12;14:177:14;12223:56:12;12318:1;:9;;;12309:3;;12293:21;;;;;;;:::i;:::-;;;;;;;;:34;12289:61;;12336:14;;-1:-1:-1;;;12336:14:12;;;;;160:25:14;;;133:18;;12336:14:12;14:177:14;12289:61:12;12360:5;;;:11;12368:3;;12360:5;:11;:::i;:::-;;12396:1;12386:17;12399:3;;12386:17;;;;;;;:::i;:::-;;;;;;;;12102:308;12043:367;;;:::o;12600:214::-;2500:21:6;:19;:21::i;:::-;12668:6:12::1;12678:1;12668:11:::0;12664:36:::1;;12688:12;;-1:-1:-1::0;;;12688:12:12::1;;;;;;;;;;;12664:36;12710:55;-1:-1:-1::0;;;;;12710:3:12::1;:20;12731:10;12751:4;12758:6:::0;12710:20:::1;:55::i;:::-;12780:27;::::0;160:25:14;;;12788:10:12::1;::::0;12780:27:::1;::::0;148:2:14;133:18;12780:27:12::1;;;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;12600:214:12;:::o;2575:307:6:-;1899:1;2702:7;;:18;2698:86;;2743:30;;-1:-1:-1;;;2743:30:6;;;;;;;;;;;2698:86;1899:1;2858:7;:17;2575:307::o;15279:331:12:-;15371:6;;15332:9;;-1:-1:-1;;;;;15371:6:12;15357:10;:20;15353:44;;15386:11;;-1:-1:-1;;;15386:11:12;;;;;;;;;;;15353:44;15412:4;;-1:-1:-1;;;15412:4:12;;;;15407:27;;15425:9;;-1:-1:-1;;;15425:9:12;;;;;;;;;;;15407:27;15456:10;;;15448:23;;-1:-1:-1;;;15456:10:12;;;;;;15448:23;:::i;:::-;15444:27;-1:-1:-1;15485:23:12;;;:62;;-1:-1:-1;15525:12:12;;;;:9;:12;;;;;:22;15512:35;;;15485:62;15481:100;;;15556:25;;-1:-1:-1;;;15556:25:12;;;;;160::14;;;133:18;;15556:25:12;14:177:14;15481:100:12;15591:4;:12;;-1:-1:-1;;;;15591:12:12;;;15279:331;;-1:-1:-1;15279:331:12:o;16217:491::-;16308:45;;-1:-1:-1;;;;;12223:32:14;;16308:45:12;;;12205:51:14;3249:7:12;12272:18:14;;;12265:34;16269:7:12;;;;12178:18:14;;16308:45:12;;;-1:-1:-1;;16308:45:12;;;;;;;;;;;;;;;-1:-1:-1;;;;;16308:45:12;-1:-1:-1;;;16308:45:12;;;16535:11;;16308:45;;-1:-1:-1;16387:3:12;;-1:-1:-1;;;;16308:45:12;;-1:-1:-1;;;16387:3:12;16496:10;16491:65;16485:71;;16577:16;16569:24;;16621:1;16615:8;16606:17;;16647:2;:54;;;;-1:-1:-1;16654:9:12;;:46;;16690:5;16699:1;16690:10;16654:46;;;16686:1;16666:5;-1:-1:-1;;;;;16666:17:12;;:21;16654:46;16642:59;16217:491;-1:-1:-1;;;;;;16217:491:12:o;17079:1055::-;17144:12;17168:18;17260:12;:1;:10;:12::i;:::-;17435:27;17443:4;17435:25;:27::i;:::-;17503:18;:7;:16;:18::i;:::-;17189:421;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;17189:421:12;;;;;;;;;;-1:-1:-1;17620:18:12;17668;17669:5;17673:1;17669;:5;:::i;:::-;17668:16;:18::i;:::-;17745:12;17755:1;17745:9;:12::i;:::-;17641:437;;;;;;;;;:::i;:::-;;;;;;;;;;;;;17620:458;;18115:4;18121;18101:25;;;;;;;;;:::i;:::-;;;;;;;;;;;;;18088:39;;;;17079:1055;;;;:::o;16714:150::-;16783:4;16812:1;:5;;16806:19;;;;;:::i;:::-;:24;;;-1:-1:-1;16806:24:12;:51;;-1:-1:-1;;16834:9:12;;;4093:13;16834:23;;16714:150::o;15703:319::-;15770:1;15758:8;;:13;;;;;;;:::i;:::-;;;;-1:-1:-1;;15781:17:12;:26;;;15832:13;;15817:12;;3687:1;-1:-1:-1;;;15832:13:12;;;:26;:13;:26;:59;;3687:1;15832:59;;;15861:13;;;;;;;;;;;15877:1;15861:17;;;;:::i;:::-;15901:13;:22;;-1:-1:-1;;;;15901:22:12;-1:-1:-1;;;15901:22:12;;;;;;;;;-1:-1:-1;16002:10:12;;15901:22;16002:10;:::i;:::-;15956:58;;3639:7;15975:38;;;;;15956:15;:58;:::i;:::-;15933:13;;:82;;;;;;;;;;;;;;;;;;15748:274;15703:319;:::o;5084:380:4:-;5199:47;;;-1:-1:-1;;;;;12223:32:14;;5199:47:4;;;12205:51:14;12272:18;;;;12265:34;;;5199:47:4;;;;;;;;;;12178:18:14;;;;5199:47:4;;;;;;;;-1:-1:-1;;;;;5199:47:4;-1:-1:-1;;;5199:47:4;;;5262:44;5214:13;5199:47;5262:23;:44::i;:::-;5257:201;;5349:43;;-1:-1:-1;;;;;12223:32:14;;;5349:43:4;;;12205:51:14;5389:1:4;12272:18:14;;;12265:34;5322:71:4;;5342:5;;5364:13;;;;;12178:18:14;;5349:43:4;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5349:43:4;;;;;;;;;;;5322:19;:71::i;:::-;5407:40;5427:5;5434:12;5407:19;:40::i;1618:188::-;1745:53;;-1:-1:-1;;;;;16313:32:14;;;1745:53:4;;;16295:51:14;16382:32;;;16362:18;;;16355:60;16431:18;;;16424:34;;;1718:81:4;;1738:5;;1760:18;;;;;16268::14;;1745:53:4;16093:371:14;1308:634:7;1364:13;1413:14;1430:17;1441:5;1430:10;:17::i;:::-;1450:1;1430:21;1413:38;;1465:20;1499:6;1488:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1488:18:7;-1:-1:-1;1465:41:7;-1:-1:-1;1595:30:7;;;1611:4;1595:30;1652:247;-1:-1:-1;;1683:5:7;-1:-1:-1;;;1782:2:7;1771:14;;1766:32;1683:5;1753:46;1843:2;1834:11;;;-1:-1:-1;1863:21:7;1652:247;1863:21;-1:-1:-1;1919:6:7;1308:634;-1:-1:-1;;;1308:634:7:o;3296:148::-;3354:13;3386:51;-1:-1:-1;;;;;3398:22:7;;448:2;3386:11;:51::i;18216:635:12:-;18268:13;18297:1;18302;18297:6;18293:25;;-1:-1:-1;;18305:13:12;;;;;;;;;;;;-1:-1:-1;;;18305:13:12;;;;;18216:635::o;18293:25::-;18328:23;18354:9;18328:23;18364:5;18368:1;18364;:5;:::i;:::-;18354:16;;;;;;;;;;;18328:42;;18380:17;18400:1;:5;;18380:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18425:3;18419:17;18440:1;18419:22;18415:74;;18443:46;;;;;;;;;;;;;;;;;;18216:635;-1:-1:-1;;;;18216:635:12:o;18415:74::-;18504:21;18520:3;18504:9;:21::i;:::-;18499:157;;18610:12;;;;18602:37;;18636:2;18602:33;:37::i;:::-;18548:97;;;;;;;;:::i;:::-;;;;;;;;;;;;;18541:104;;;;18216:635;;;:::o;18499:157::-;18760:3;18765:1;18754:13;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;;18754:13:12;-1:-1:-1;;;18754:20:12;18750:74;;18820:3;18783:41;;;;;;;;:::i;18750:74::-;18841:3;18216:635;-1:-1:-1;;;18216:635:12:o;9592:480:4:-;9675:4;9691:12;9713:18;9741:19;9875:4;9872:1;9865:4;9859:11;9852:4;9846;9842:15;9839:1;9832:5;9825;9820:60;9809:71;;9907:16;9893:30;;9957:1;9951:8;9936:23;;9985:7;:80;;;;-1:-1:-1;9997:15:4;;:67;;10048:11;10063:1;10048:16;9997:67;;;-1:-1:-1;;;;;;;;;;10015:26:4;;:30;;;9592:480::o;8370:720::-;8450:18;8478:19;8616:4;8613:1;8606:4;8600:11;8593:4;8587;8583:15;8580:1;8573:5;8566;8561:60;8673:7;8663:176;;8717:4;8711:11;8762:16;8759:1;8754:3;8739:40;8808:16;8803:3;8796:29;8663:176;-1:-1:-1;;8916:1:4;8910:8;8866:16;;-1:-1:-1;8942:15:4;;:68;;8994:11;9009:1;8994:16;;8942:68;;;-1:-1:-1;;;;;8960:26:4;;;:31;8942:68;8938:146;;;9033:40;;-1:-1:-1;;;9033:40:4;;-1:-1:-1;;;;;360:32:14;;9033:40:4;;;342:51:14;315:18;;9033:40:4;196:203:14;29154:916:9;29207:7;;-1:-1:-1;;;29282:17:9;;29278:103;;-1:-1:-1;;;29319:17:9;;;-1:-1:-1;29364:2:9;29354:12;29278:103;29407:8;29398:5;:17;29394:103;;29444:8;29435:17;;;-1:-1:-1;29480:2:9;29470:12;29394:103;29523:8;29514:5;:17;29510:103;;29560:8;29551:17;;;-1:-1:-1;29596:2:9;29586:12;29510:103;29639:7;29630:5;:16;29626:100;;29675:7;29666:16;;;-1:-1:-1;29710:1:9;29700:11;29626:100;29752:7;29743:5;:16;29739:100;;29788:7;29779:16;;;-1:-1:-1;29823:1:9;29813:11;29739:100;29865:7;29856:5;:16;29852:100;;29901:7;29892:16;;;-1:-1:-1;29936:1:9;29926:11;29852:100;29978:7;29969:5;:16;29965:66;;30015:1;30005:11;30057:6;29154:916;-1:-1:-1;;29154:916:9:o;2612:525:7:-;2687:13;2733:5;2712:18;2780:10;2784:6;2780:1;:10;:::i;:::-;:14;;2793:1;2780:14;:::i;:::-;2770:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2770:25:7;;2748:47;;-1:-1:-1;;;2805:6:7;2812:1;2805:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;2805:15:7;;;;;;;;;-1:-1:-1;;;2830:6:7;2837:1;2830:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;2830:15:7;;;;;;;;-1:-1:-1;2860:9:7;2872:10;2876:6;2872:1;:10;:::i;:::-;:14;;2885:1;2872:14;:::i;:::-;2860:26;;2855:140;2892:1;2888;:5;2855:140;;;-1:-1:-1;;;2937:10:7;2950:3;2937:16;2926:28;;;;;;;:::i;:::-;;;;2914:6;2921:1;2914:9;;;;;;;;:::i;:::-;;;;:40;-1:-1:-1;;;;;2914:40:7;;;;;;;;-1:-1:-1;2983:1:7;2968:16;;;;;2895:3;;;:::i;:::-;;;2855:140;;;-1:-1:-1;3008:15:7;;3004:96;;3046:43;;-1:-1:-1;;;3046:43:7;;;;;8552:25:14;;;8593:18;;;8586:34;;;8525:18;;3046:43:7;8378:248:14;3004:96:7;3123:6;2612:525;-1:-1:-1;;;;2612:525:7:o;18944:305:12:-;19001:4;3828:3;19021:1;:8;:25;19017:43;;;-1:-1:-1;19055:5:12;;18944:305;-1:-1:-1;18944:305:12:o;19017:43::-;19075:9;19070:152;19090:1;:8;19086:1;:12;19070:152;;;19119:8;19130:1;19132;19130:4;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;;19130:4:12;;-1:-1:-1;;;;19152:8:12;;;:20;;-1:-1:-1;;;;;;;;;;19164:8:12;;;19152:20;:32;;;-1:-1:-1;;;;;;;;;;19176:8:12;;;19152:32;:45;;;-1:-1:-1;;;;;;;;;;19188:9:12;;;19152:45;19148:63;;;-1:-1:-1;19206:5:12;;18944:305;-1:-1:-1;;;18944:305:12:o;19148:63::-;-1:-1:-1;19100:3:12;;19070:152;;;-1:-1:-1;19238:4:12;;18944:305;-1:-1:-1;;18944:305:12:o;785:348:14:-;837:8;847:6;901:3;894:4;886:6;882:17;878:27;868:55;;919:1;916;909:12;868:55;-1:-1:-1;942:20:14;;985:18;974:30;;971:50;;;1017:1;1014;1007:12;971:50;1054:4;1046:6;1042:17;1030:29;;1106:3;1099:4;1090:6;1082;1078:19;1074:30;1071:39;1068:59;;;1123:1;1120;1113:12;1068:59;785:348;;;;;:::o;1138:645::-;1227:6;1235;1243;1251;1304:2;1292:9;1283:7;1279:23;1275:32;1272:52;;;1320:1;1317;1310:12;1272:52;1365:23;;;-1:-1:-1;1485:2:14;1470:18;;1457:32;;-1:-1:-1;1566:2:14;1551:18;;1538:32;1593:18;1582:30;;1579:50;;;1625:1;1622;1615:12;1579:50;1664:59;1715:7;1706:6;1695:9;1691:22;1664:59;:::i;:::-;1138:645;;;;-1:-1:-1;1742:8:14;-1:-1:-1;;;;1138:645:14:o;1788:288::-;1829:3;1867:5;1861:12;1894:6;1889:3;1882:19;1950:6;1943:4;1936:5;1932:16;1925:4;1920:3;1916:14;1910:47;2002:1;1995:4;1986:6;1981:3;1977:16;1973:27;1966:38;2065:4;2058:2;2054:7;2049:2;2041:6;2037:15;2033:29;2028:3;2024:39;2020:50;2013:57;;;1788:288;;;;:::o;2081:217::-;2228:2;2217:9;2210:21;2191:4;2248:44;2288:2;2277:9;2273:18;2265:6;2248:44;:::i;2303:226::-;2362:6;2415:2;2403:9;2394:7;2390:23;2386:32;2383:52;;;2431:1;2428;2421:12;2383:52;-1:-1:-1;2476:23:14;;2303:226;-1:-1:-1;2303:226:14:o;2534:159::-;2601:20;;2661:6;2650:18;;2640:29;;2630:57;;2683:1;2680;2673:12;2630:57;2534:159;;;:::o;2698:956::-;2809:6;2817;2825;2833;2841;2849;2857;2910:3;2898:9;2889:7;2885:23;2881:33;2878:53;;;2927:1;2924;2917:12;2878:53;2972:23;;;-1:-1:-1;3071:2:14;3056:18;;3043:32;3119:4;3106:18;;3094:31;;3084:59;;3139:1;3136;3129:12;3084:59;3162:7;-1:-1:-1;3242:2:14;3227:18;;3214:32;;-1:-1:-1;3291:37:14;3324:2;3309:18;;3291:37;:::i;:::-;3281:47;;3347:38;3380:3;3369:9;3365:19;3347:38;:::i;:::-;3337:48;;3436:3;3425:9;3421:19;3408:33;3464:18;3456:6;3453:30;3450:50;;;3496:1;3493;3486:12;3450:50;3535:59;3586:7;3577:6;3566:9;3562:22;3535:59;:::i;:::-;2698:956;;;;-1:-1:-1;2698:956:14;;-1:-1:-1;2698:956:14;;;;3509:85;;-1:-1:-1;;;2698:956:14:o;4247:781::-;4438:2;4427:9;4420:21;4483:6;4477:13;4472:2;4461:9;4457:18;4450:41;4545:2;4537:6;4533:15;4527:22;4522:2;4511:9;4507:18;4500:50;4604:2;4596:6;4592:15;4586:22;4581:2;4570:9;4566:18;4559:50;4691:1;4687;4682:3;4678:11;4674:19;4668:2;4660:6;4656:15;4650:22;4646:48;4640:3;4629:9;4625:19;4618:77;4761:14;4754:3;4746:6;4742:16;4736:23;4732:44;4726:3;4715:9;4711:19;4704:73;4843:14;4836:3;4828:6;4824:16;4818:23;4814:44;4808:3;4797:9;4793:19;4786:73;4401:4;4906:3;4898:6;4894:16;4888:23;4949:4;4942;4931:9;4927:20;4920:34;4971:51;5017:3;5006:9;5002:19;4988:12;4971:51;:::i;5033:286::-;5092:6;5145:2;5133:9;5124:7;5120:23;5116:32;5113:52;;;5161:1;5158;5151:12;5113:52;5187:23;;-1:-1:-1;;;;;5239:31:14;;5229:42;;5219:70;;5285:1;5282;5275:12;5546:525;5626:6;5634;5642;5695:2;5683:9;5674:7;5670:23;5666:32;5663:52;;;5711:1;5708;5701:12;5663:52;5756:23;;;-1:-1:-1;5854:2:14;5839:18;;5826:32;5881:18;5870:30;;5867:50;;;5913:1;5910;5903:12;5867:50;5952:59;6003:7;5994:6;5983:9;5979:22;5952:59;:::i;:::-;5546:525;;6030:8;;-1:-1:-1;5926:85:14;;-1:-1:-1;;;;5546:525:14:o;6076:271::-;6259:6;6251;6246:3;6233:33;6215:3;6285:16;;6310:13;;;6285:16;6076:271;-1:-1:-1;6076:271:14:o;6352:267::-;6441:6;6436:3;6429:19;6493:6;6486:5;6479:4;6474:3;6470:14;6457:43;-1:-1:-1;6545:1:14;6520:16;;;6538:4;6516:27;;;6509:38;;;;6601:2;6580:15;;;-1:-1:-1;;6576:29:14;6567:39;;;6563:50;;6352:267::o;6624:318::-;6811:6;6800:9;6793:25;6854:2;6849;6838:9;6834:18;6827:30;6774:4;6874:62;6932:2;6921:9;6917:18;6909:6;6901;6874:62;:::i;:::-;6866:70;6624:318;-1:-1:-1;;;;;6624:318:14:o;6947:127::-;7008:10;7003:3;6999:20;6996:1;6989:31;7039:4;7036:1;7029:15;7063:4;7060:1;7053:15;7079:125;7144:9;;;7165:10;;;7162:36;;;7178:18;;:::i;7209:184::-;7279:6;7332:2;7320:9;7311:7;7307:23;7303:32;7300:52;;;7348:1;7345;7338:12;7300:52;-1:-1:-1;7371:16:14;;7209:184;-1:-1:-1;7209:184:14:o;7658:380::-;7737:1;7733:12;;;;7780;;;7801:61;;7855:4;7847:6;7843:17;7833:27;;7801:61;7908:2;7900:6;7897:14;7877:18;7874:38;7871:161;;7954:10;7949:3;7945:20;7942:1;7935:31;7989:4;7986:1;7979:15;8017:4;8014:1;8007:15;7871:161;;7658:380;;;:::o;8245:128::-;8312:9;;;8333:11;;;8330:37;;;8347:18;;:::i;8631:799::-;8968:6;8957:9;8950:25;9011:3;9006:2;8995:9;8991:18;8984:31;8931:4;9032:45;9072:3;9061:9;9057:19;9049:6;9032:45;:::i;:::-;9117:13;;-1:-1:-1;;;;;9113:39:14;;;9108:2;9093:18;;9086:67;9211:2;9199:15;;;9193:22;-1:-1:-1;;;;;;9189:49:14;;;9184:2;9169:18;;9162:77;9276:33;;;;9270:3;9255:19;;9248:62;-1:-1:-1;9347:32:14;;;;9140:3;9326:19;;9319:61;9411:3;9396:19;9389:35;;;;9024:53;8631:799;-1:-1:-1;;8631:799:14:o;9624:127::-;9685:10;9680:3;9676:20;9673:1;9666:31;9716:4;9713:1;9706:15;9740:4;9737:1;9730:15;9882:518;9984:2;9979:3;9976:11;9973:421;;;10020:5;10017:1;10010:16;10064:4;10061:1;10051:18;10134:2;10122:10;10118:19;10115:1;10111:27;10105:4;10101:38;10170:4;10158:10;10155:20;10152:47;;;-1:-1:-1;10193:4:14;10152:47;10248:2;10243:3;10239:12;10236:1;10232:20;10226:4;10222:31;10212:41;;10303:81;10321:2;10314:5;10311:13;10303:81;;;10380:1;10366:16;;10347:1;10336:13;10303:81;;;10307:3;;9973:421;9882:518;;;:::o;10576:1198::-;10700:18;10695:3;10692:27;10689:53;;;10722:18;;:::i;:::-;10751:94;10841:3;10801:38;10833:4;10827:11;10801:38;:::i;:::-;10795:4;10751:94;:::i;:::-;10871:1;10896:2;10891:3;10888:11;10913:1;10908:608;;;;11560:1;11577:3;11574:93;;;-1:-1:-1;11633:19:14;;;11620:33;11574:93;-1:-1:-1;;10533:1:14;10529:11;;;10525:24;10521:29;10511:40;10557:1;10553:11;;;10508:57;11680:78;;10881:887;;10908:608;9829:1;9822:14;;;9866:4;9853:18;;-1:-1:-1;;10944:17:14;;;11059:229;11073:7;11070:1;11067:14;11059:229;;;11162:19;;;11149:33;11134:49;;11269:4;11254:20;;;;11222:1;11210:14;;;;11089:12;11059:229;;;11063:3;11316;11307:7;11304:16;11301:159;;;11440:1;11436:6;11430:3;11424;11421:1;11417:11;11413:21;11409:34;11405:39;11392:9;11387:3;11383:19;11370:33;11366:79;11358:6;11351:95;11301:159;;;11503:1;11497:3;11494:1;11490:11;11486:19;11480:4;11473:33;10881:887;;10576:1198;;;:::o;11779:247::-;11938:2;11927:9;11920:21;11901:4;11958:62;12016:2;12005:9;12001:18;11993:6;11985;11958:62;:::i;12310:212::-;12352:3;12390:5;12384:12;12434:6;12427:4;12420:5;12416:16;12411:3;12405:36;12496:1;12460:16;;12485:13;;;-1:-1:-1;12460:16:14;;12310:212;-1:-1:-1;12310:212:14:o;12527:1360::-;13168:66;13163:3;13156:79;13138:3;13254:39;13289:2;13284:3;13280:12;13272:6;13254:39;:::i;:::-;13313:34;13309:2;13302:46;13377:34;13372:2;13368;13364:11;13357:55;13441:34;13436:2;13432;13428:11;13421:55;13505:34;13500:2;13496;13492:11;13485:55;-1:-1:-1;;;13564:3:14;13560:2;13556:12;13549:29;13600:39;13634:3;13630:2;13626:12;13618:6;13600:39;:::i;:::-;13587:52;;-1:-1:-1;;;13655:5:14;13648:28;13695:41;13732:2;13725:5;13721:14;13713:6;13695:41;:::i;:::-;13756:34;13745:46;;13820:33;13815:2;13807:11;;13800:54;13878:2;13870:11;;12527:1360;-1:-1:-1;;;;;;12527:1360:14:o;13892:1328::-;14364:3;14395:30;14421:3;14413:6;14395:30;:::i;:::-;14448:31;14441:5;14434:46;14499:41;14536:2;14529:5;14525:14;14517:6;14499:41;:::i;:::-;14560:34;14549:46;;14624:34;14619:2;14611:11;;14604:55;14688:34;14683:2;14675:11;;14668:55;14752:34;14747:2;14739:11;;14732:55;14817:34;14811:3;14803:12;;14796:56;14882:34;14876:3;14868:12;;14861:56;14947:34;14941:3;14933:12;;14926:56;-1:-1:-1;;;15006:3:14;14998:12;;14991:39;15060:66;15054:3;15046:12;;15039:88;-1:-1:-1;;;15151:3:14;15143:12;;15136:50;15210:3;15202:12;;13892:1328;-1:-1:-1;;;;;13892:1328:14:o;15225:267::-;15404:3;15429:57;15455:30;15481:3;15473:6;15455:30;:::i;:::-;15447:6;15429:57;:::i;15497:148::-;15585:4;15564:12;;;15578;;;15560:31;;15603:13;;15600:39;;;15619:18;;:::i;15650:151::-;15740:4;15733:12;;;15719;;;15715:31;;15758:14;;15755:40;;;15775:18;;:::i;16601:547::-;16953:34;16948:3;16941:47;-1:-1:-1;;;17013:2:14;17008:3;17004:12;16997:28;16923:3;17047:39;17082:2;17077:3;17073:12;17065:6;17047:39;:::i;:::-;-1:-1:-1;;;17095:18:14;;17140:1;17129:13;;16601:547;-1:-1:-1;;;16601:547:14:o;17153:127::-;17214:10;17209:3;17205:20;17202:1;17195:31;17245:4;17242:1;17235:15;17269:4;17266:1;17259:15;17285:335;-1:-1:-1;;;17532:3:14;17525:34;17507:3;17575:39;17610:2;17605:3;17601:12;17593:6;17575:39;:::i;17625:168::-;17698:9;;;17729;;17746:15;;;17740:22;;17726:37;17716:71;;17767:18;;:::i;17798:136::-;17837:3;17865:5;17855:39;;17874:18;;:::i;:::-;-1:-1:-1;;;17910:18:14;;17798:136::o","linkReferences":{},"cborAuxdata":{},"immutableReferences":{"5823":[{"start":1340,"length":32},{"start":1987,"length":32},{"start":3594,"length":32},{"start":3846,"length":32},{"start":3984,"length":32},{"start":4685,"length":32},{"start":5112,"length":32}]},"transformations":[{"id":"5823","type":"replace","offset":1340,"reason":"immutable"},{"id":"5823","type":"replace","offset":1987,"reason":"immutable"},{"id":"5823","type":"replace","offset":3594,"reason":"immutable"},{"id":"5823","type":"replace","offset":3846,"reason":"immutable"},{"id":"5823","type":"replace","offset":3984,"reason":"immutable"},{"id":"5823","type":"replace","offset":4685,"reason":"immutable"},{"id":"5823","type":"replace","offset":5112,"reason":"immutable"}],"transformationValues":{"immutables":{"5823":"0x0000000000000000000000005f7bb59365ce557c26dbcaa4ee9d39a4b95b7127"}}},"deployment":{"transactionHash":"0x43a78419b0ec1aef6284cfdc8e0e2e51ed00a89ceecb4dd418dfda8a1a8cef6f","blockNumber":"94495874","transactionIndex":"3","deployer":"0xcECc29B037f5064fCdF45a5C318F132ef76aA551"},"sources":{"src/OuroborosPress.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {Strings} from \"@openzeppelin/contracts/utils/Strings.sol\";\nimport {IIntakeV2, IIntakeReceiver} from \"./interfaces/IIntakeV2.sol\";\n\n/// @title  Ouroboros Press\n/// @notice A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.\n///         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its\n///         own balance for one `research-report` job: \"write chapter N of the book this contract is\n///         writing about itself\". The swarm delivers the chapter by callback, and the contract records\n///         the result hash on chain and emits `Chapter`. The book is the product, and the contract is\n///         the author's only employer.\n///\n///         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this\n///         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the\n///         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.\n///\n/// @dev    Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable\n///         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).\n///\n///         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`\n///         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri\n///         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and\n///         anyone can copy it into storage later with `inscribe`, which checks it against the stored\n///         hash. The draft record (request id, commissioner, time) is written by `commission`, which\n///         is not gas-limited.\ncontract OuroborosPress is IIntakeReceiver, ReentrancyGuard {\n    using SafeERC20 for IERC20;\n    using Strings for uint256;\n    using Strings for address;\n\n    // ------------------------------------------------------------------ constants\n\n    /// @notice IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \"Intake v2\").\n    address public constant INTAKE_V2 = 0xa43e6F75ee006411F79Ac1C84120606C2330DE82;\n    /// @notice IMD on Robinhood Chain (18 decimals, symbol \"IMD\").\n    address public constant IMD_TOKEN = 0x5F7Bb59365ce557C26dbcAa4EE9d39A4b95B7127;\n    /// @notice The only address allowed to re-point `intake`. It is address(0), so nobody can do it.\n    ///         See THREAT-MODEL.md, \"Why the intake cannot be changed\".\n    address public constant STEWARD = address(0);\n\n    /// @notice \"job.open@job-1\", right-padded to 32 bytes (== `cast format-bytes32-string`).\n    bytes32 public constant ACTION_JOB_OPEN = \"job.open@job-1\";\n    /// @notice Intake v2's price per action: 0.5 IMD.\n    uint256 public constant PRICE = 0.5e18;\n    /// @notice Paid from this contract's balance to the commissioner of a delivered chapter.\n    uint256 public constant BOUNTY = 0.02e18;\n    /// @notice After this long without a callback anyone may `reset()` a pending commission.\n    uint64 public constant TIMEOUT = 6 hours;\n    /// @notice Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles\n    ///         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours).\n    uint64 public constant BASE_COOLDOWN = 1 hours;\n    uint8 public constant MAX_STREAK = 8;\n    /// @notice A previous-chapter uri longer than this is not quoted in the next objective.\n    uint256 public constant MAX_QUOTED_URI = 256;\n\n    /// @dev Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback.\n    uint256 private constant BOUNTY_GAS = 80_000;\n    /// @dev keccak256(\"\") (an empty delivered uri counts as inscribed).\n    bytes32 private constant EMPTY_HASH = keccak256(\"\");\n\n    // ------------------------------------------------------------------ types\n\n    /// @notice One chapter. `requestId`, `commissioner` and `requestedAt` are written by\n    ///         `commission`; `resultHash`, `uriHash` and `deliveredAt` by `onResult`; `uri` by `inscribe`.\n    struct ChapterRecord {\n        bytes32 requestId; //    the Intake's request id\n        bytes32 resultHash; //   keccak-256 of the bytes at `uri` (result.json), as the Intake's writer reported\n        bytes32 uriHash; //      keccak-256 of `uri`\n        address commissioner; // who called commission(); receives the bounty\n        uint48 requestedAt; //   block.timestamp of commission()\n        uint48 deliveredAt; //   block.timestamp of onResult()\n        string uri; //           ipfs://CID/result.json (or the plane's /intake-results/:id), once inscribed\n    }\n\n    // ------------------------------------------------------------------ storage\n\n    /// @notice The Intake this contract buys from and accepts callbacks from.\n    address public intake;\n    /// @notice True while a commission is waiting for its callback.\n    bool public busy;\n    /// @notice Consecutive refusals, no-results and timeouts since the last delivered chapter.\n    uint8 public failureStreak;\n    /// @notice No commission before this time (set after a miss).\n    uint48 public cooldownUntil;\n    /// @dev Published chapters; chapter numbers start at 1.\n    uint32 private _published;\n\n    /// @notice Every paid request that produced no chapter: refusals, no-results and timeouts.\n    uint256 public failures;\n    /// @notice The reason code of the last miss (\"timeout\" for a reset()).\n    bytes32 public lastFailureReason;\n\n    /// @dev 1-based. Index `_published + 1` holds the draft of the chapter being written.\n    mapping(uint256 => ChapterRecord) private _chapters;\n\n    /// @notice The token the contract pays with.\n    IERC20 public immutable imd;\n\n    // ------------------------------------------------------------------ events\n\n    event Commissioned(uint256 indexed chapter, bytes32 indexed requestId, address indexed commissioner, bytes body);\n    event Chapter(uint256 indexed chapter, bytes32 indexed requestId, bytes32 resultHash, string uri);\n    event Inscribed(uint256 indexed chapter, string uri);\n    event Failed(bytes32 indexed requestId, uint8 status, bytes32 reason);\n    event TimedOut(bytes32 indexed requestId);\n    event Donated(address indexed from, uint256 amount);\n    event BountyPaid(address indexed to, uint256 amount);\n    event BountySkipped(address indexed to, uint256 amount);\n    event IntakeChanged(address indexed previous, address indexed next);\n\n    // ------------------------------------------------------------------ errors\n\n    error Busy();\n    error NotBusy();\n    error CoolingDown(uint256 until);\n    error InsufficientBalance(uint256 have, uint256 need);\n    error PreviousNotInscribed(uint256 chapter);\n    error IntakeCannotCommission();\n    error ZeroRequestId();\n    error NotIntake();\n    error UnknownRequest(bytes32 requestId);\n    error TooEarly(uint256 at);\n    error NoSuchChapter(uint256 chapter);\n    error AlreadyInscribed(uint256 chapter);\n    error UriMismatch(uint256 chapter);\n    error ZeroAmount();\n    error NotSteward();\n    error NoEther();\n\n    // ------------------------------------------------------------------ constructor\n\n    /// @dev Static, nonpayable, no external calls.\n    constructor() {\n        imd = IERC20(IMD_TOKEN);\n        intake = INTAKE_V2;\n        emit IntakeChanged(address(0), INTAKE_V2);\n    }\n\n    // ------------------------------------------------------------------ the press\n\n    /// @notice Order the next chapter. Anyone may call this when no chapter is pending, the cool-down\n    ///         has passed, the previous chapter is inscribed, and the contract holds at least\n    ///         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`.\n    /// @return requestId The Intake's request id.\n    function commission() external nonReentrant returns (bytes32 requestId) {\n        address intake_ = intake;\n        // Anyone can pay for their own job and name this contract and any selector as its callback.\n        // This stops such a callback from ordering chapters with the intake as commissioner.\n        if (msg.sender == intake_) revert IntakeCannotCommission();\n        if (busy) revert Busy();\n        if (block.timestamp < cooldownUntil) revert CoolingDown(cooldownUntil);\n\n        uint256 n = uint256(_published) + 1;\n        if (n > 1 && !_isInscribed(_chapters[n - 1])) revert PreviousNotInscribed(n - 1);\n\n        uint256 balance = imd.balanceOf(address(this));\n        if (balance < PRICE + BOUNTY) revert InsufficientBalance(balance, PRICE + BOUNTY);\n\n        bytes memory body = _body(n, balance);\n        busy = true;\n\n        imd.forceApprove(intake_, PRICE);\n        requestId = IIntakeV2(intake_)\n            .requestWithFailure(\n                ACTION_JOB_OPEN,\n                body,\n                IIntakeV2.Callback({target: address(this), selector: this.onResult.selector}),\n                this.onFailure.selector,\n                address(imd),\n                PRICE\n            );\n\n        // After the call: only checks on the return value, storage writes and the event.\n        if (requestId == bytes32(0)) revert ZeroRequestId();\n        ChapterRecord storage c = _chapters[n];\n        c.requestId = requestId;\n        c.commissioner = msg.sender;\n        c.requestedAt = uint48(block.timestamp);\n        emit Commissioned(n, requestId, msg.sender, body);\n    }\n\n    /// @notice Status 0 callback from the Intake. Records the chapter and pays the bounty.\n    ///         Callable only by `intake`, only for the pending request, only once.\n    /// @dev    Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops.\n    function onResult(bytes32 requestId, bytes32 resultHash, string calldata uri) external nonReentrant {\n        uint256 n = _settle(requestId);\n\n        ChapterRecord storage c = _chapters[n];\n        c.resultHash = resultHash;\n        c.uriHash = keccak256(bytes(uri));\n        c.deliveredAt = uint48(block.timestamp);\n        _published = uint32(n);\n        failureStreak = 0;\n        address commissioner = c.commissioner;\n\n        emit Chapter(n, requestId, resultHash, uri);\n\n        if (_tryPayBounty(commissioner)) emit BountyPaid(commissioner, BOUNTY);\n        else emit BountySkipped(commissioner, BOUNTY);\n    }\n\n    /// @notice Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending\n    ///         commission and counts the miss. Moves no value: a failure is unsigned (see the docs).\n    function onFailure(\n        bytes32 requestId,\n        uint8 status,\n        bytes32 reason,\n        uint16, /* agreed */\n        uint16, /* answered */\n        bytes calldata /* signature: empty for now */\n    )\n        external\n        nonReentrant\n    {\n        _settle(requestId);\n        _recordMiss(reason);\n        emit Failed(requestId, status, reason);\n    }\n\n    /// @notice Anyone may clear a commission that has had no callback for longer than TIMEOUT.\n    ///         This is the way out of every stuck state. A late callback for it is then refused.\n    function reset() external nonReentrant {\n        if (!busy) revert NotBusy();\n        ChapterRecord storage c = _chapters[uint256(_published) + 1];\n        uint256 deadline = uint256(c.requestedAt) + TIMEOUT;\n        if (block.timestamp <= deadline) revert TooEarly(deadline);\n        busy = false;\n        _recordMiss(\"timeout\");\n        emit TimedOut(c.requestId);\n    }\n\n    /// @notice Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash\n    ///         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on\n    ///         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri).\n    function inscribe(uint256 n, string calldata uri) external {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        ChapterRecord storage c = _chapters[n];\n        if (bytes(c.uri).length != 0) revert AlreadyInscribed(n);\n        if (keccak256(bytes(uri)) != c.uriHash) revert UriMismatch(n);\n        c.uri = uri;\n        emit Inscribed(n, uri);\n    }\n\n    /// @notice Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain\n    ///         `IMD.transfer(press, amount)` funds the press too, without the event.\n    function donate(uint256 amount) external nonReentrant {\n        if (amount == 0) revert ZeroAmount();\n        imd.safeTransferFrom(msg.sender, address(this), amount);\n        emit Donated(msg.sender, amount);\n    }\n\n    /// @notice Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so\n    ///         nobody can. It is kept so the setting the docs ask for is visibly present and visibly\n    ///         locked. If the gate were \"only the current intake\", anyone who pays for a job naming\n    ///         this contract and this selector as the callback could make the Intake call it.\n    function setIntake(address next) external {\n        if (msg.sender != STEWARD) revert NotSteward();\n        emit IntakeChanged(intake, next);\n        intake = next;\n    }\n\n    /// @notice The press takes no ETH.\n    receive() external payable {\n        revert NoEther();\n    }\n\n    // ------------------------------------------------------------------ views\n\n    /// @notice The exact job body `commission()` would send now.\n    function previewBody() external view returns (bytes memory) {\n        return _body(uint256(_published) + 1, imd.balanceOf(address(this)));\n    }\n\n    /// @notice Number of delivered chapters.\n    function chapterCount() external view returns (uint256) {\n        return _published;\n    }\n\n    /// @notice Delivered chapter `n`, 1 <= n <= chapterCount().\n    function chapter(uint256 n) external view returns (ChapterRecord memory) {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        return _chapters[n];\n    }\n\n    /// @notice Whether chapter `n` has its uri in storage (or was delivered with an empty uri).\n    function isInscribed(uint256 n) external view returns (bool) {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        return _isInscribed(_chapters[n]);\n    }\n\n    /// @notice The Intake request id being waited on, or zero.\n    function pendingRequest() external view returns (bytes32) {\n        return busy ? _chapters[uint256(_published) + 1].requestId : bytes32(0);\n    }\n\n    /// @notice When the pending commission was made, or zero.\n    function pendingSince() external view returns (uint64) {\n        return busy ? uint64(_chapters[uint256(_published) + 1].requestedAt) : 0;\n    }\n\n    /// @notice Who made the pending commission, or zero.\n    function pendingCommissioner() external view returns (address) {\n        return busy ? _chapters[uint256(_published) + 1].commissioner : address(0);\n    }\n\n    // ------------------------------------------------------------------ internals\n\n    /// @dev Only the intake, only while busy, only for the pending request id. Clears busy.\n    function _settle(bytes32 requestId) private returns (uint256 n) {\n        if (msg.sender != intake) revert NotIntake();\n        if (!busy) revert NotBusy();\n        n = uint256(_published) + 1;\n        if (requestId == bytes32(0) || requestId != _chapters[n].requestId) revert UnknownRequest(requestId);\n        busy = false;\n    }\n\n    /// @dev A paid request that produced no chapter. Starts or doubles the cool-down.\n    function _recordMiss(bytes32 reason) private {\n        failures += 1;\n        lastFailureReason = reason;\n        uint8 streak = failureStreak < MAX_STREAK ? failureStreak + 1 : MAX_STREAK;\n        failureStreak = streak;\n        cooldownUntil = uint48(block.timestamp + (uint256(BASE_COOLDOWN) << (streak - 1)));\n    }\n\n    /// @dev Transfers BOUNTY to `to` with at most BOUNTY_GAS and never reverts. Reads at most 32\n    ///      bytes of return data (the same acceptance rule as SafeERC20.trySafeTransfer).\n    function _tryPayBounty(address to) private returns (bool ok) {\n        bytes memory data = abi.encodeCall(IERC20.transfer, (to, BOUNTY));\n        address token = address(imd);\n        uint256 size;\n        uint256 value;\n        assembly (\"memory-safe\") {\n            ok := call(BOUNTY_GAS, token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            size := returndatasize()\n            value := mload(0)\n        }\n        ok = ok && (size == 0 ? token.code.length > 0 : value == 1);\n    }\n\n    function _isInscribed(ChapterRecord storage c) private view returns (bool) {\n        return bytes(c.uri).length != 0 || c.uriHash == EMPTY_HASH;\n    }\n\n    /// @dev Compact JSON: {\"objective\":\"...\",\"skill\":\"research-report\",\"ipfs\":true}. Every interpolated\n    ///      value is digits, lowercase hex, or a uri that passed `_quotable`, so it needs no escaping.\n    function _body(uint256 n, uint256 balance) private view returns (bytes memory) {\n        string memory head = string.concat(\n            '{\"objective\":\"Write chapter ',\n            n.toString(),\n            \" of The Ouroboros Press, a book that a smart contract on Robinhood Chain (chain id 4663) is writing about itself. The contract is at \",\n            address(this).toHexString(),\n            \". It holds \",\n            balance.toString(),\n            \" IMD in wei (18 decimals). Chapters published before this one: \"\n        );\n        string memory tail = string.concat(\n            (n - 1).toString(),\n            \". The previous chapter is at \",\n            _previous(n),\n            \". Describe what this contract is, what it has done so far, what a reader should know about a machine that pays agents to document itself, and end with one question the next chapter should answer. 300 to 600 words, plain prose, no headings.\",\n            '\",\"skill\":\"research-report\",\"ipfs\":true}'\n        );\n        return bytes(string.concat(head, tail));\n    }\n\n    /// @dev Where the previous chapter is, as safe text for the objective.\n    function _previous(uint256 n) private view returns (string memory) {\n        if (n == 1) return \"none\";\n        ChapterRecord storage p = _chapters[n - 1];\n        string memory uri = p.uri;\n        if (bytes(uri).length == 0) return \"none (it was delivered without a uri)\";\n        if (!_quotable(bytes(uri))) {\n            return string.concat(\"unquotable here (its result hash is \", uint256(p.resultHash).toHexString(32), \")\");\n        }\n        // The plane's fallback is the relative path /intake-results/:id on its API.\n        if (bytes(uri)[0] == \"/\") return string.concat(\"https://api.imd.fun\", uri);\n        return uri;\n    }\n\n    /// @dev Printable ASCII without quote or backslash, at most MAX_QUOTED_URI bytes.\n    function _quotable(bytes memory s) private pure returns (bool) {\n        if (s.length > MAX_QUOTED_URI) return false;\n        for (uint256 i; i < s.length; ++i) {\n            bytes1 b = s[i];\n            if (b < 0x20 || b > 0x7e || b == '\"' || b == \"\\\\\") return false;\n        }\n        return true;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    uint256 private _status;\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        _status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == ENTERED;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"src/interfaces/IIntakeV2.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @title IIntakeV2\n/// @notice The part of IMD's Intake v2 a buyer calls, as published at https://imd.fun/docs/\n///         (\"Intake v2\", \"From a contract\"). Same address on every chain:\n///         0xa43e6f75ee006411f79ac1c84120606c2330de82.\n/// @dev    Selectors (verified against the live Robinhood Chain bytecode):\n///         request            0x380c2cda  request(bytes32,bytes,(address,bytes4),address,uint256)\n///         requestWithFailure 0x9a78c321  requestWithFailure(bytes32,bytes,(address,bytes4),bytes4,address,uint256)\ninterface IIntakeV2 {\n    /// @notice The contract and function a result is handed to; (address(0), 0x00000000) for none.\n    struct Callback {\n        address target;\n        bytes4 selector;\n    }\n\n    /// @notice Pays `amount` of `asset` (the chain's IMD, at least 0.5e18) and asks for `action`.\n    /// @param action   The action id right-padded to 32 bytes, e.g. \"job.open@job-1\".\n    /// @param body     The action's body as compact UTF-8 JSON, 1 byte to 16 KiB.\n    function request(bytes32 action, bytes calldata body, Callback calldata callback, address asset, uint256 amount)\n        external\n        returns (bytes32 requestId);\n\n    /// @notice As `request`, plus `onFailure`, a second function on the callback target called on\n    ///         status 1 (refused) or 2 (no result).\n    function requestWithFailure(\n        bytes32 action,\n        bytes calldata body,\n        Callback calldata callback,\n        bytes4 onFailure,\n        address asset,\n        uint256 amount\n    ) external returns (bytes32 requestId);\n}\n\n/// @title IIntakeReceiver\n/// @notice The callback shapes Intake v2 calls on a job/launch/workflow result. The names are the\n///         receiver's; the parameter types are fixed by the protocol.\ninterface IIntakeReceiver {\n    /// @notice Status 0 for a job: `uri` is ipfs://CID/result.json (or the plane's /intake-results/:id),\n    ///         `resultHash` the keccak-256 of the bytes at `uri`. Selector 0x4374622e.\n    function onResult(bytes32 requestId, bytes32 resultHash, string calldata uri) external;\n\n    /// @notice Status 1 (refused) or 2 (no result). `signature` is empty for now. Selector 0x5a0df71e.\n    function onFailure(\n        bytes32 requestId,\n        uint8 status,\n        bytes32 reason,\n        uint16 agreed,\n        uint16 answered,\n        bytes calldata signature\n    ) external;\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.26+commit.8a97fa7a","compilerSettings":{"viaIR":false,"metadata":{"appendCBOR":false,"bytecodeHash":"none","useLiteralContent":false},"libraries":{},"optimizer":{"runs":200,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"]},"name":"OuroborosPress","fullyQualifiedName":"src/OuroborosPress.sol:OuroborosPress"},"abi":[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"name":"AlreadyInscribed","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"Busy","type":"error","inputs":[]},{"name":"CoolingDown","type":"error","inputs":[{"name":"until","type":"uint256","internalType":"uint256"}]},{"name":"InsufficientBalance","type":"error","inputs":[{"name":"have","type":"uint256","internalType":"uint256"},{"name":"need","type":"uint256","internalType":"uint256"}]},{"name":"IntakeCannotCommission","type":"error","inputs":[]},{"name":"NoEther","type":"error","inputs":[]},{"name":"NoSuchChapter","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"NotBusy","type":"error","inputs":[]},{"name":"NotIntake","type":"error","inputs":[]},{"name":"NotSteward","type":"error","inputs":[]},{"name":"PreviousNotInscribed","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"ReentrancyGuardReentrantCall","type":"error","inputs":[]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"StringsInsufficientHexLength","type":"error","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]},{"name":"TooEarly","type":"error","inputs":[{"name":"at","type":"uint256","internalType":"uint256"}]},{"name":"UnknownRequest","type":"error","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"}]},{"name":"UriMismatch","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"ZeroAmount","type":"error","inputs":[]},{"name":"ZeroRequestId","type":"error","inputs":[]},{"name":"BountyPaid","type":"event","inputs":[{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"BountySkipped","type":"event","inputs":[{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Chapter","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"resultHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"uri","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"Commissioned","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"commissioner","type":"address","indexed":true,"internalType":"address"},{"name":"body","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"name":"Donated","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Failed","type":"event","inputs":[{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"status","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"reason","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"name":"Inscribed","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"uri","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"IntakeChanged","type":"event","inputs":[{"name":"previous","type":"address","indexed":true,"internalType":"address"},{"name":"next","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"TimedOut","type":"event","inputs":[{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"name":"ACTION_JOB_OPEN","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"BASE_COOLDOWN","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"BOUNTY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"IMD_TOKEN","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"INTAKE_V2","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"MAX_QUOTED_URI","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_STREAK","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"PRICE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"STEWARD","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"TIMEOUT","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"busy","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"chapter","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"resultHash","type":"bytes32","internalType":"bytes32"},{"name":"uriHash","type":"bytes32","internalType":"bytes32"},{"name":"commissioner","type":"address","internalType":"address"},{"name":"requestedAt","type":"uint48","internalType":"uint48"},{"name":"deliveredAt","type":"uint48","internalType":"uint48"},{"name":"uri","type":"string","internalType":"string"}],"internalType":"struct OuroborosPress.ChapterRecord"}],"stateMutability":"view"},{"name":"chapterCount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"commission","type":"function","inputs":[],"outputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"name":"cooldownUntil","type":"function","inputs":[],"outputs":[{"name":"","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"name":"donate","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"failureStreak","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"failures","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"imd","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"name":"inscribe","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"},{"name":"uri","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"intake","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"isInscribed","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"lastFailureReason","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"onFailure","type":"function","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"status","type":"uint8","internalType":"uint8"},{"name":"reason","type":"bytes32","internalType":"bytes32"},{"name":"","type":"uint16","internalType":"uint16"},{"name":"","type":"uint16","internalType":"uint16"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"onResult","type":"function","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"resultHash","type":"bytes32","internalType":"bytes32"},{"name":"uri","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"pendingCommissioner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pendingRequest","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"pendingSince","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"previewBody","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"name":"reset","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"setIntake","type":"function","inputs":[{"name":"next","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"}],"metadata":{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"chapter","type":"uint256"}],"name":"AlreadyInscribed","type":"error"},{"inputs":[],"name":"Busy","type":"error"},{"inputs":[{"internalType":"uint256","name":"until","type":"uint256"}],"name":"CoolingDown","type":"error"},{"inputs":[{"internalType":"uint256","name":"have","type":"uint256"},{"internalType":"uint256","name":"need","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"IntakeCannotCommission","type":"error"},{"inputs":[],"name":"NoEther","type":"error"},{"inputs":[{"internalType":"uint256","name":"chapter","type":"uint256"}],"name":"NoSuchChapter","type":"error"},{"inputs":[],"name":"NotBusy","type":"error"},{"inputs":[],"name":"NotIntake","type":"error"},{"inputs":[],"name":"NotSteward","type":"error"},{"inputs":[{"internalType":"uint256","name":"chapter","type":"uint256"}],"name":"PreviousNotInscribed","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","type":"error"},{"inputs":[{"internalType":"uint256","name":"at","type":"uint256"}],"name":"TooEarly","type":"error"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"UnknownRequest","type":"error"},{"inputs":[{"internalType":"uint256","name":"chapter","type":"uint256"}],"name":"UriMismatch","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroRequestId","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BountyPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BountySkipped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chapter","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"resultHash","type":"bytes32"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"Chapter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chapter","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"commissioner","type":"address"},{"indexed":false,"internalType":"bytes","name":"body","type":"bytes"}],"name":"Commissioned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Donated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"},{"indexed":false,"internalType":"uint8","name":"status","type":"uint8"},{"indexed":false,"internalType":"bytes32","name":"reason","type":"bytes32"}],"name":"Failed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chapter","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"Inscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previous","type":"address"},{"indexed":true,"internalType":"address","name":"next","type":"address"}],"name":"IntakeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"requestId","type":"bytes32"}],"name":"TimedOut","type":"event"},{"inputs":[],"name":"ACTION_JOB_OPEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_COOLDOWN","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IMD_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTAKE_V2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_QUOTED_URI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_STREAK","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STEWARD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIMEOUT","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"busy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"chapter","outputs":[{"components":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes32","name":"resultHash","type":"bytes32"},{"internalType":"bytes32","name":"uriHash","type":"bytes32"},{"internalType":"address","name":"commissioner","type":"address"},{"internalType":"uint48","name":"requestedAt","type":"uint48"},{"internalType":"uint48","name":"deliveredAt","type":"uint48"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct OuroborosPress.ChapterRecord","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chapterCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commission","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cooldownUntil","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"donate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"failureStreak","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"failures","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"imd","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"inscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"intake","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"n","type":"uint256"}],"name":"isInscribed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastFailureReason","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint8","name":"status","type":"uint8"},{"internalType":"bytes32","name":"reason","type":"bytes32"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onFailure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes32","name":"resultHash","type":"bytes32"},{"internalType":"string","name":"uri","type":"string"}],"name":"onResult","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pendingCommissioner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingRequest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingSince","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previewBody","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"next","type":"address"}],"name":"setIntake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"details":"Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and         anyone can copy it into storage later with `inscribe`, which checks it against the stored         hash. The draft record (request id, commissioner, time) is written by `commission`, which         is not gas-limited.","errors":{"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"StringsInsufficientHexLength(uint256,uint256)":[{"details":"The `value` string doesn't fit in the specified `length`."}]},"kind":"dev","methods":{"commission()":{"returns":{"requestId":"The Intake's request id."}},"constructor":{"details":"Static, nonpayable, no external calls."},"onResult(bytes32,bytes32,string)":{"details":"Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops."}},"stateVariables":{"BOUNTY_GAS":{"details":"Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback."},"EMPTY_HASH":{"details":"keccak256(\"\") (an empty delivered uri counts as inscribed)."},"_chapters":{"details":"1-based. Index `_published + 1` holds the draft of the chapter being written."},"_published":{"details":"Published chapters; chapter numbers start at 1."}},"title":"Ouroboros Press","version":1},"userdoc":{"kind":"user","methods":{"ACTION_JOB_OPEN()":{"notice":"\"job.open@job-1\", right-padded to 32 bytes (== `cast format-bytes32-string`)."},"BASE_COOLDOWN()":{"notice":"Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours)."},"BOUNTY()":{"notice":"Paid from this contract's balance to the commissioner of a delivered chapter."},"IMD_TOKEN()":{"notice":"IMD on Robinhood Chain (18 decimals, symbol \"IMD\")."},"INTAKE_V2()":{"notice":"IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \"Intake v2\")."},"MAX_QUOTED_URI()":{"notice":"A previous-chapter uri longer than this is not quoted in the next objective."},"PRICE()":{"notice":"Intake v2's price per action: 0.5 IMD."},"STEWARD()":{"notice":"The only address allowed to re-point `intake`. It is address(0), so nobody can do it.         See THREAT-MODEL.md, \"Why the intake cannot be changed\"."},"TIMEOUT()":{"notice":"After this long without a callback anyone may `reset()` a pending commission."},"busy()":{"notice":"True while a commission is waiting for its callback."},"chapter(uint256)":{"notice":"Delivered chapter `n`, 1 <= n <= chapterCount()."},"chapterCount()":{"notice":"Number of delivered chapters."},"commission()":{"notice":"Order the next chapter. Anyone may call this when no chapter is pending, the cool-down         has passed, the previous chapter is inscribed, and the contract holds at least         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`."},"cooldownUntil()":{"notice":"No commission before this time (set after a miss)."},"donate(uint256)":{"notice":"Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain         `IMD.transfer(press, amount)` funds the press too, without the event."},"failureStreak()":{"notice":"Consecutive refusals, no-results and timeouts since the last delivered chapter."},"failures()":{"notice":"Every paid request that produced no chapter: refusals, no-results and timeouts."},"imd()":{"notice":"The token the contract pays with."},"inscribe(uint256,string)":{"notice":"Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri)."},"intake()":{"notice":"The Intake this contract buys from and accepts callbacks from."},"isInscribed(uint256)":{"notice":"Whether chapter `n` has its uri in storage (or was delivered with an empty uri)."},"lastFailureReason()":{"notice":"The reason code of the last miss (\"timeout\" for a reset())."},"onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)":{"notice":"Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending         commission and counts the miss. Moves no value: a failure is unsigned (see the docs)."},"onResult(bytes32,bytes32,string)":{"notice":"Status 0 callback from the Intake. Records the chapter and pays the bounty.         Callable only by `intake`, only for the pending request, only once."},"pendingCommissioner()":{"notice":"Who made the pending commission, or zero."},"pendingRequest()":{"notice":"The Intake request id being waited on, or zero."},"pendingSince()":{"notice":"When the pending commission was made, or zero."},"previewBody()":{"notice":"The exact job body `commission()` would send now."},"reset()":{"notice":"Anyone may clear a commission that has had no callback for longer than TIMEOUT.         This is the way out of every stuck state. A late callback for it is then refused."},"setIntake(address)":{"notice":"Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so         nobody can. It is kept so the setting the docs ask for is visibly present and visibly         locked. If the gate were \"only the current intake\", anyone who pays for a job naming         this contract and this selector as the callback could make the Intake call it."}},"notice":"A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its         own balance for one `research-report` job: \"write chapter N of the book this contract is         writing about itself\". The swarm delivers the chapter by callback, and the contract records         the result hash on chain and emits `Chapter`. The book is the product, and the contract is         the author's only employer.         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.","version":1}},"settings":{"compilationTarget":{"src/OuroborosPress.sol":"OuroborosPress"},"evmVersion":"cancun","libraries":{},"metadata":{"appendCBOR":false,"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":200},"remappings":[":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":forge-std/=lib/forge-std/src/",":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"]},"sources":{"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"keccak256":"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d","license":"MIT","urls":["bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100","dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"keccak256":"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc","license":"MIT","urls":["bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037","dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ"]},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"keccak256":"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44","license":"MIT","urls":["bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d","dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF"]},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2","license":"MIT","urls":["bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303","dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV"]},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5","license":"MIT","urls":["bzz-raw://8150ceb4ac947e8a442b2a9c017e01e880b2be2dd958f1fa9bc405f4c5a86508","dweb:/ipfs/QmbcBmFX66AY6Kbhnd5gx7zpkgqnUafo43XnmayAM7zVdB"]},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"keccak256":"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a","license":"MIT","urls":["bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a","dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG"]},"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol":{"keccak256":"0x11a5a79827df29e915a12740caf62fe21ebe27c08c9ae3e09abe9ee3ba3866d3","license":"MIT","urls":["bzz-raw://3cf0c69ab827e3251db9ee6a50647d62c90ba580a4d7bbff21f2bea39e7b2f4a","dweb:/ipfs/QmZiKwtKU1SBX4RGfQtY7PZfiapbbu6SZ9vizGQD9UHjRA"]},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"keccak256":"0xad148d59f05165f9217d0a9e1ac8f772abb02ea6aaad8a756315c532bf79f9f4","license":"MIT","urls":["bzz-raw://15e3599867c2182f5831e9268b274b2ef2047825837df6b4d81c9e89254b093e","dweb:/ipfs/QmZbL7XAYr5RmaNaooPgZRmcDXaudfsYQfYD9y5iAECvpS"]},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c","license":"MIT","urls":["bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617","dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u"]},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"keccak256":"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6","license":"MIT","urls":["bzz-raw://6c5fab4970634f9ab9a620983dc1c8a30153981a0b1a521666e269d0a11399d3","dweb:/ipfs/QmVRnBC575MESGkEHndjujtR7qub2FzU9RWy9eKLp4hPZB"]},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"keccak256":"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54","license":"MIT","urls":["bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8","dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy"]},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"keccak256":"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3","license":"MIT","urls":["bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03","dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ"]},"src/OuroborosPress.sol":{"keccak256":"0x07a5b249ec07de2ae350d7b7582c8d971f8c0c23330e5a9290d1f7cb81ea2d8d","license":"MIT","urls":["bzz-raw://82c2d5457818262eba180a91fe629d90ee5a659577eef949ccaedd7747efc76d","dweb:/ipfs/QmXQW5f81rGtQVfcr5PwsHaoLBsx5rcUTDzYNey9ytaz4X"]},"src/interfaces/IIntakeV2.sol":{"keccak256":"0xe83385f148655907c16854a6c5d1391f32f1993d1ae5eb35b0750067710045bf","license":"MIT","urls":["bzz-raw://121b76f973c8f9346b47218b0ffd9a085b046d227ac195a7c700dd0798e79af1","dweb:/ipfs/QmTukoA6MwgcAbX8Eg6vYHGPCPCajiXezayynfDvokeefu"]}},"version":1},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_uint32":{"label":"uint32","encoding":"inplace","numberOfBytes":"4"},"t_uint48":{"label":"uint48","encoding":"inplace","numberOfBytes":"6"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_bytes32":{"label":"bytes32","encoding":"inplace","numberOfBytes":"32"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_struct(ChapterRecord)5792_storage":{"label":"struct OuroborosPress.ChapterRecord","members":[{"slot":"0","type":"t_bytes32","astId":5779,"label":"requestId","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_bytes32","astId":5781,"label":"resultHash","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"2","type":"t_bytes32","astId":5783,"label":"uriHash","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_address","astId":5785,"label":"commissioner","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_uint48","astId":5787,"label":"requestedAt","offset":20,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_uint48","astId":5789,"label":"deliveredAt","offset":26,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"4","type":"t_string_storage","astId":5791,"label":"uri","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"}],"encoding":"inplace","numberOfBytes":"160"},"t_mapping(t_uint256,t_struct(ChapterRecord)5792_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct OuroborosPress.ChapterRecord)","value":"t_struct(ChapterRecord)5792_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_uint256","astId":694,"label":"_status","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_address","astId":5795,"label":"intake","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_bool","astId":5798,"label":"busy","offset":20,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint8","astId":5801,"label":"failureStreak","offset":21,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint48","astId":5804,"label":"cooldownUntil","offset":22,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint32","astId":5807,"label":"_published","offset":28,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"2","type":"t_uint256","astId":5810,"label":"failures","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_bytes32","astId":5813,"label":"lastFailureReason","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"4","type":"t_mapping(t_uint256,t_struct(ChapterRecord)5792_storage)","astId":5819,"label":"_chapters","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"}]},"transientStorageLayout":null,"userdoc":{"kind":"user","notice":"A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its         own balance for one `research-report` job: \"write chapter N of the book this contract is         writing about itself\". The swarm delivers the chapter by callback, and the contract records         the result hash on chain and emits `Chapter`. The book is the product, and the contract is         the author's only employer.         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.","methods":{"imd()":{"notice":"The token the contract pays with."},"busy()":{"notice":"True while a commission is waiting for its callback."},"PRICE()":{"notice":"Intake v2's price per action: 0.5 IMD."},"reset()":{"notice":"Anyone may clear a commission that has had no callback for longer than TIMEOUT.         This is the way out of every stuck state. A late callback for it is then refused."},"BOUNTY()":{"notice":"Paid from this contract's balance to the commissioner of a delivered chapter."},"intake()":{"notice":"The Intake this contract buys from and accepts callbacks from."},"STEWARD()":{"notice":"The only address allowed to re-point `intake`. It is address(0), so nobody can do it.         See THREAT-MODEL.md, \"Why the intake cannot be changed\"."},"TIMEOUT()":{"notice":"After this long without a callback anyone may `reset()` a pending commission."},"failures()":{"notice":"Every paid request that produced no chapter: refusals, no-results and timeouts."},"IMD_TOKEN()":{"notice":"IMD on Robinhood Chain (18 decimals, symbol \"IMD\")."},"INTAKE_V2()":{"notice":"IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \"Intake v2\")."},"commission()":{"notice":"Order the next chapter. Anyone may call this when no chapter is pending, the cool-down         has passed, the previous chapter is inscribed, and the contract holds at least         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`."},"previewBody()":{"notice":"The exact job body `commission()` would send now."},"chapterCount()":{"notice":"Number of delivered chapters."},"pendingSince()":{"notice":"When the pending commission was made, or zero."},"BASE_COOLDOWN()":{"notice":"Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours)."},"cooldownUntil()":{"notice":"No commission before this time (set after a miss)."},"donate(uint256)":{"notice":"Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain         `IMD.transfer(press, amount)` funds the press too, without the event."},"failureStreak()":{"notice":"Consecutive refusals, no-results and timeouts since the last delivered chapter."},"MAX_QUOTED_URI()":{"notice":"A previous-chapter uri longer than this is not quoted in the next objective."},"chapter(uint256)":{"notice":"Delivered chapter `n`, 1 <= n <= chapterCount()."},"pendingRequest()":{"notice":"The Intake request id being waited on, or zero."},"ACTION_JOB_OPEN()":{"notice":"\"job.open@job-1\", right-padded to 32 bytes (== `cast format-bytes32-string`)."},"setIntake(address)":{"notice":"Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so         nobody can. It is kept so the setting the docs ask for is visibly present and visibly         locked. If the gate were \"only the current intake\", anyone who pays for a job naming         this contract and this selector as the callback could make the Intake call it."},"lastFailureReason()":{"notice":"The reason code of the last miss (\"timeout\" for a reset())."},"isInscribed(uint256)":{"notice":"Whether chapter `n` has its uri in storage (or was delivered with an empty uri)."},"pendingCommissioner()":{"notice":"Who made the pending commission, or zero."},"inscribe(uint256,string)":{"notice":"Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri)."},"onResult(bytes32,bytes32,string)":{"notice":"Status 0 callback from the Intake. Records the chapter and pays the bounty.         Callable only by `intake`, only for the pending request, only once."},"onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)":{"notice":"Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending         commission and counts the miss. Moves no value: a failure is unsigned (see the docs)."}},"version":1},"devdoc":{"kind":"dev","title":"Ouroboros Press","errors":{"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"StringsInsufficientHexLength(uint256,uint256)":[{"details":"The `value` string doesn't fit in the specified `length`."}]},"details":"Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and         anyone can copy it into storage later with `inscribe`, which checks it against the stored         hash. The draft record (request id, commissioner, time) is written by `commission`, which         is not gas-limited.","methods":{"constructor":{"details":"Static, nonpayable, no external calls."},"commission()":{"returns":{"requestId":"The Intake's request id."}},"onResult(bytes32,bytes32,string)":{"details":"Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops."}},"version":1,"stateVariables":{"_chapters":{"details":"1-based. Index `_published + 1` holds the draft of the chapter being written."},"BOUNTY_GAS":{"details":"Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback."},"EMPTY_HASH":{"details":"keccak256(\"\") (an empty delivered uri counts as inscribed)."},"_published":{"details":"Published chapters; chapter numbers start at 1."}}},"sourceIds":{"src/OuroborosPress.sol":{"id":12},"src/interfaces/IIntakeV2.sol":{"id":13},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":5},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"id":7},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":9},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":2},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":1},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":3},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":0},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":10},"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol":{"id":6},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"id":11},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":4},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":8}},"additionalInput":null,"stdJsonInput":{"sources":{"src/OuroborosPress.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport {Strings} from \"@openzeppelin/contracts/utils/Strings.sol\";\nimport {IIntakeV2, IIntakeReceiver} from \"./interfaces/IIntakeV2.sol\";\n\n/// @title  Ouroboros Press\n/// @notice A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.\n///         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its\n///         own balance for one `research-report` job: \"write chapter N of the book this contract is\n///         writing about itself\". The swarm delivers the chapter by callback, and the contract records\n///         the result hash on chain and emits `Chapter`. The book is the product, and the contract is\n///         the author's only employer.\n///\n///         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this\n///         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the\n///         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.\n///\n/// @dev    Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable\n///         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).\n///\n///         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`\n///         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri\n///         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and\n///         anyone can copy it into storage later with `inscribe`, which checks it against the stored\n///         hash. The draft record (request id, commissioner, time) is written by `commission`, which\n///         is not gas-limited.\ncontract OuroborosPress is IIntakeReceiver, ReentrancyGuard {\n    using SafeERC20 for IERC20;\n    using Strings for uint256;\n    using Strings for address;\n\n    // ------------------------------------------------------------------ constants\n\n    /// @notice IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \"Intake v2\").\n    address public constant INTAKE_V2 = 0xa43e6F75ee006411F79Ac1C84120606C2330DE82;\n    /// @notice IMD on Robinhood Chain (18 decimals, symbol \"IMD\").\n    address public constant IMD_TOKEN = 0x5F7Bb59365ce557C26dbcAa4EE9d39A4b95B7127;\n    /// @notice The only address allowed to re-point `intake`. It is address(0), so nobody can do it.\n    ///         See THREAT-MODEL.md, \"Why the intake cannot be changed\".\n    address public constant STEWARD = address(0);\n\n    /// @notice \"job.open@job-1\", right-padded to 32 bytes (== `cast format-bytes32-string`).\n    bytes32 public constant ACTION_JOB_OPEN = \"job.open@job-1\";\n    /// @notice Intake v2's price per action: 0.5 IMD.\n    uint256 public constant PRICE = 0.5e18;\n    /// @notice Paid from this contract's balance to the commissioner of a delivered chapter.\n    uint256 public constant BOUNTY = 0.02e18;\n    /// @notice After this long without a callback anyone may `reset()` a pending commission.\n    uint64 public constant TIMEOUT = 6 hours;\n    /// @notice Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles\n    ///         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours).\n    uint64 public constant BASE_COOLDOWN = 1 hours;\n    uint8 public constant MAX_STREAK = 8;\n    /// @notice A previous-chapter uri longer than this is not quoted in the next objective.\n    uint256 public constant MAX_QUOTED_URI = 256;\n\n    /// @dev Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback.\n    uint256 private constant BOUNTY_GAS = 80_000;\n    /// @dev keccak256(\"\") (an empty delivered uri counts as inscribed).\n    bytes32 private constant EMPTY_HASH = keccak256(\"\");\n\n    // ------------------------------------------------------------------ types\n\n    /// @notice One chapter. `requestId`, `commissioner` and `requestedAt` are written by\n    ///         `commission`; `resultHash`, `uriHash` and `deliveredAt` by `onResult`; `uri` by `inscribe`.\n    struct ChapterRecord {\n        bytes32 requestId; //    the Intake's request id\n        bytes32 resultHash; //   keccak-256 of the bytes at `uri` (result.json), as the Intake's writer reported\n        bytes32 uriHash; //      keccak-256 of `uri`\n        address commissioner; // who called commission(); receives the bounty\n        uint48 requestedAt; //   block.timestamp of commission()\n        uint48 deliveredAt; //   block.timestamp of onResult()\n        string uri; //           ipfs://CID/result.json (or the plane's /intake-results/:id), once inscribed\n    }\n\n    // ------------------------------------------------------------------ storage\n\n    /// @notice The Intake this contract buys from and accepts callbacks from.\n    address public intake;\n    /// @notice True while a commission is waiting for its callback.\n    bool public busy;\n    /// @notice Consecutive refusals, no-results and timeouts since the last delivered chapter.\n    uint8 public failureStreak;\n    /// @notice No commission before this time (set after a miss).\n    uint48 public cooldownUntil;\n    /// @dev Published chapters; chapter numbers start at 1.\n    uint32 private _published;\n\n    /// @notice Every paid request that produced no chapter: refusals, no-results and timeouts.\n    uint256 public failures;\n    /// @notice The reason code of the last miss (\"timeout\" for a reset()).\n    bytes32 public lastFailureReason;\n\n    /// @dev 1-based. Index `_published + 1` holds the draft of the chapter being written.\n    mapping(uint256 => ChapterRecord) private _chapters;\n\n    /// @notice The token the contract pays with.\n    IERC20 public immutable imd;\n\n    // ------------------------------------------------------------------ events\n\n    event Commissioned(uint256 indexed chapter, bytes32 indexed requestId, address indexed commissioner, bytes body);\n    event Chapter(uint256 indexed chapter, bytes32 indexed requestId, bytes32 resultHash, string uri);\n    event Inscribed(uint256 indexed chapter, string uri);\n    event Failed(bytes32 indexed requestId, uint8 status, bytes32 reason);\n    event TimedOut(bytes32 indexed requestId);\n    event Donated(address indexed from, uint256 amount);\n    event BountyPaid(address indexed to, uint256 amount);\n    event BountySkipped(address indexed to, uint256 amount);\n    event IntakeChanged(address indexed previous, address indexed next);\n\n    // ------------------------------------------------------------------ errors\n\n    error Busy();\n    error NotBusy();\n    error CoolingDown(uint256 until);\n    error InsufficientBalance(uint256 have, uint256 need);\n    error PreviousNotInscribed(uint256 chapter);\n    error IntakeCannotCommission();\n    error ZeroRequestId();\n    error NotIntake();\n    error UnknownRequest(bytes32 requestId);\n    error TooEarly(uint256 at);\n    error NoSuchChapter(uint256 chapter);\n    error AlreadyInscribed(uint256 chapter);\n    error UriMismatch(uint256 chapter);\n    error ZeroAmount();\n    error NotSteward();\n    error NoEther();\n\n    // ------------------------------------------------------------------ constructor\n\n    /// @dev Static, nonpayable, no external calls.\n    constructor() {\n        imd = IERC20(IMD_TOKEN);\n        intake = INTAKE_V2;\n        emit IntakeChanged(address(0), INTAKE_V2);\n    }\n\n    // ------------------------------------------------------------------ the press\n\n    /// @notice Order the next chapter. Anyone may call this when no chapter is pending, the cool-down\n    ///         has passed, the previous chapter is inscribed, and the contract holds at least\n    ///         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`.\n    /// @return requestId The Intake's request id.\n    function commission() external nonReentrant returns (bytes32 requestId) {\n        address intake_ = intake;\n        // Anyone can pay for their own job and name this contract and any selector as its callback.\n        // This stops such a callback from ordering chapters with the intake as commissioner.\n        if (msg.sender == intake_) revert IntakeCannotCommission();\n        if (busy) revert Busy();\n        if (block.timestamp < cooldownUntil) revert CoolingDown(cooldownUntil);\n\n        uint256 n = uint256(_published) + 1;\n        if (n > 1 && !_isInscribed(_chapters[n - 1])) revert PreviousNotInscribed(n - 1);\n\n        uint256 balance = imd.balanceOf(address(this));\n        if (balance < PRICE + BOUNTY) revert InsufficientBalance(balance, PRICE + BOUNTY);\n\n        bytes memory body = _body(n, balance);\n        busy = true;\n\n        imd.forceApprove(intake_, PRICE);\n        requestId = IIntakeV2(intake_)\n            .requestWithFailure(\n                ACTION_JOB_OPEN,\n                body,\n                IIntakeV2.Callback({target: address(this), selector: this.onResult.selector}),\n                this.onFailure.selector,\n                address(imd),\n                PRICE\n            );\n\n        // After the call: only checks on the return value, storage writes and the event.\n        if (requestId == bytes32(0)) revert ZeroRequestId();\n        ChapterRecord storage c = _chapters[n];\n        c.requestId = requestId;\n        c.commissioner = msg.sender;\n        c.requestedAt = uint48(block.timestamp);\n        emit Commissioned(n, requestId, msg.sender, body);\n    }\n\n    /// @notice Status 0 callback from the Intake. Records the chapter and pays the bounty.\n    ///         Callable only by `intake`, only for the pending request, only once.\n    /// @dev    Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops.\n    function onResult(bytes32 requestId, bytes32 resultHash, string calldata uri) external nonReentrant {\n        uint256 n = _settle(requestId);\n\n        ChapterRecord storage c = _chapters[n];\n        c.resultHash = resultHash;\n        c.uriHash = keccak256(bytes(uri));\n        c.deliveredAt = uint48(block.timestamp);\n        _published = uint32(n);\n        failureStreak = 0;\n        address commissioner = c.commissioner;\n\n        emit Chapter(n, requestId, resultHash, uri);\n\n        if (_tryPayBounty(commissioner)) emit BountyPaid(commissioner, BOUNTY);\n        else emit BountySkipped(commissioner, BOUNTY);\n    }\n\n    /// @notice Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending\n    ///         commission and counts the miss. Moves no value: a failure is unsigned (see the docs).\n    function onFailure(\n        bytes32 requestId,\n        uint8 status,\n        bytes32 reason,\n        uint16, /* agreed */\n        uint16, /* answered */\n        bytes calldata /* signature: empty for now */\n    )\n        external\n        nonReentrant\n    {\n        _settle(requestId);\n        _recordMiss(reason);\n        emit Failed(requestId, status, reason);\n    }\n\n    /// @notice Anyone may clear a commission that has had no callback for longer than TIMEOUT.\n    ///         This is the way out of every stuck state. A late callback for it is then refused.\n    function reset() external nonReentrant {\n        if (!busy) revert NotBusy();\n        ChapterRecord storage c = _chapters[uint256(_published) + 1];\n        uint256 deadline = uint256(c.requestedAt) + TIMEOUT;\n        if (block.timestamp <= deadline) revert TooEarly(deadline);\n        busy = false;\n        _recordMiss(\"timeout\");\n        emit TimedOut(c.requestId);\n    }\n\n    /// @notice Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash\n    ///         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on\n    ///         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri).\n    function inscribe(uint256 n, string calldata uri) external {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        ChapterRecord storage c = _chapters[n];\n        if (bytes(c.uri).length != 0) revert AlreadyInscribed(n);\n        if (keccak256(bytes(uri)) != c.uriHash) revert UriMismatch(n);\n        c.uri = uri;\n        emit Inscribed(n, uri);\n    }\n\n    /// @notice Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain\n    ///         `IMD.transfer(press, amount)` funds the press too, without the event.\n    function donate(uint256 amount) external nonReentrant {\n        if (amount == 0) revert ZeroAmount();\n        imd.safeTransferFrom(msg.sender, address(this), amount);\n        emit Donated(msg.sender, amount);\n    }\n\n    /// @notice Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so\n    ///         nobody can. It is kept so the setting the docs ask for is visibly present and visibly\n    ///         locked. If the gate were \"only the current intake\", anyone who pays for a job naming\n    ///         this contract and this selector as the callback could make the Intake call it.\n    function setIntake(address next) external {\n        if (msg.sender != STEWARD) revert NotSteward();\n        emit IntakeChanged(intake, next);\n        intake = next;\n    }\n\n    /// @notice The press takes no ETH.\n    receive() external payable {\n        revert NoEther();\n    }\n\n    // ------------------------------------------------------------------ views\n\n    /// @notice The exact job body `commission()` would send now.\n    function previewBody() external view returns (bytes memory) {\n        return _body(uint256(_published) + 1, imd.balanceOf(address(this)));\n    }\n\n    /// @notice Number of delivered chapters.\n    function chapterCount() external view returns (uint256) {\n        return _published;\n    }\n\n    /// @notice Delivered chapter `n`, 1 <= n <= chapterCount().\n    function chapter(uint256 n) external view returns (ChapterRecord memory) {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        return _chapters[n];\n    }\n\n    /// @notice Whether chapter `n` has its uri in storage (or was delivered with an empty uri).\n    function isInscribed(uint256 n) external view returns (bool) {\n        if (n == 0 || n > _published) revert NoSuchChapter(n);\n        return _isInscribed(_chapters[n]);\n    }\n\n    /// @notice The Intake request id being waited on, or zero.\n    function pendingRequest() external view returns (bytes32) {\n        return busy ? _chapters[uint256(_published) + 1].requestId : bytes32(0);\n    }\n\n    /// @notice When the pending commission was made, or zero.\n    function pendingSince() external view returns (uint64) {\n        return busy ? uint64(_chapters[uint256(_published) + 1].requestedAt) : 0;\n    }\n\n    /// @notice Who made the pending commission, or zero.\n    function pendingCommissioner() external view returns (address) {\n        return busy ? _chapters[uint256(_published) + 1].commissioner : address(0);\n    }\n\n    // ------------------------------------------------------------------ internals\n\n    /// @dev Only the intake, only while busy, only for the pending request id. Clears busy.\n    function _settle(bytes32 requestId) private returns (uint256 n) {\n        if (msg.sender != intake) revert NotIntake();\n        if (!busy) revert NotBusy();\n        n = uint256(_published) + 1;\n        if (requestId == bytes32(0) || requestId != _chapters[n].requestId) revert UnknownRequest(requestId);\n        busy = false;\n    }\n\n    /// @dev A paid request that produced no chapter. Starts or doubles the cool-down.\n    function _recordMiss(bytes32 reason) private {\n        failures += 1;\n        lastFailureReason = reason;\n        uint8 streak = failureStreak < MAX_STREAK ? failureStreak + 1 : MAX_STREAK;\n        failureStreak = streak;\n        cooldownUntil = uint48(block.timestamp + (uint256(BASE_COOLDOWN) << (streak - 1)));\n    }\n\n    /// @dev Transfers BOUNTY to `to` with at most BOUNTY_GAS and never reverts. Reads at most 32\n    ///      bytes of return data (the same acceptance rule as SafeERC20.trySafeTransfer).\n    function _tryPayBounty(address to) private returns (bool ok) {\n        bytes memory data = abi.encodeCall(IERC20.transfer, (to, BOUNTY));\n        address token = address(imd);\n        uint256 size;\n        uint256 value;\n        assembly (\"memory-safe\") {\n            ok := call(BOUNTY_GAS, token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            size := returndatasize()\n            value := mload(0)\n        }\n        ok = ok && (size == 0 ? token.code.length > 0 : value == 1);\n    }\n\n    function _isInscribed(ChapterRecord storage c) private view returns (bool) {\n        return bytes(c.uri).length != 0 || c.uriHash == EMPTY_HASH;\n    }\n\n    /// @dev Compact JSON: {\"objective\":\"...\",\"skill\":\"research-report\",\"ipfs\":true}. Every interpolated\n    ///      value is digits, lowercase hex, or a uri that passed `_quotable`, so it needs no escaping.\n    function _body(uint256 n, uint256 balance) private view returns (bytes memory) {\n        string memory head = string.concat(\n            '{\"objective\":\"Write chapter ',\n            n.toString(),\n            \" of The Ouroboros Press, a book that a smart contract on Robinhood Chain (chain id 4663) is writing about itself. The contract is at \",\n            address(this).toHexString(),\n            \". It holds \",\n            balance.toString(),\n            \" IMD in wei (18 decimals). Chapters published before this one: \"\n        );\n        string memory tail = string.concat(\n            (n - 1).toString(),\n            \". The previous chapter is at \",\n            _previous(n),\n            \". Describe what this contract is, what it has done so far, what a reader should know about a machine that pays agents to document itself, and end with one question the next chapter should answer. 300 to 600 words, plain prose, no headings.\",\n            '\",\"skill\":\"research-report\",\"ipfs\":true}'\n        );\n        return bytes(string.concat(head, tail));\n    }\n\n    /// @dev Where the previous chapter is, as safe text for the objective.\n    function _previous(uint256 n) private view returns (string memory) {\n        if (n == 1) return \"none\";\n        ChapterRecord storage p = _chapters[n - 1];\n        string memory uri = p.uri;\n        if (bytes(uri).length == 0) return \"none (it was delivered without a uri)\";\n        if (!_quotable(bytes(uri))) {\n            return string.concat(\"unquotable here (its result hash is \", uint256(p.resultHash).toHexString(32), \")\");\n        }\n        // The plane's fallback is the relative path /intake-results/:id on its API.\n        if (bytes(uri)[0] == \"/\") return string.concat(\"https://api.imd.fun\", uri);\n        return uri;\n    }\n\n    /// @dev Printable ASCII without quote or backslash, at most MAX_QUOTED_URI bytes.\n    function _quotable(bytes memory s) private pure returns (bool) {\n        if (s.length > MAX_QUOTED_URI) return false;\n        for (uint256 i; i < s.length; ++i) {\n            bytes1 b = s[i];\n            if (b < 0x20 || b > 0x7e || b == '\"' || b == \"\\\\\") return false;\n        }\n        return true;\n    }\n}\n"},"src/interfaces/IIntakeV2.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @title IIntakeV2\n/// @notice The part of IMD's Intake v2 a buyer calls, as published at https://imd.fun/docs/\n///         (\"Intake v2\", \"From a contract\"). Same address on every chain:\n///         0xa43e6f75ee006411f79ac1c84120606c2330de82.\n/// @dev    Selectors (verified against the live Robinhood Chain bytecode):\n///         request            0x380c2cda  request(bytes32,bytes,(address,bytes4),address,uint256)\n///         requestWithFailure 0x9a78c321  requestWithFailure(bytes32,bytes,(address,bytes4),bytes4,address,uint256)\ninterface IIntakeV2 {\n    /// @notice The contract and function a result is handed to; (address(0), 0x00000000) for none.\n    struct Callback {\n        address target;\n        bytes4 selector;\n    }\n\n    /// @notice Pays `amount` of `asset` (the chain's IMD, at least 0.5e18) and asks for `action`.\n    /// @param action   The action id right-padded to 32 bytes, e.g. \"job.open@job-1\".\n    /// @param body     The action's body as compact UTF-8 JSON, 1 byte to 16 KiB.\n    function request(bytes32 action, bytes calldata body, Callback calldata callback, address asset, uint256 amount)\n        external\n        returns (bytes32 requestId);\n\n    /// @notice As `request`, plus `onFailure`, a second function on the callback target called on\n    ///         status 1 (refused) or 2 (no result).\n    function requestWithFailure(\n        bytes32 action,\n        bytes calldata body,\n        Callback calldata callback,\n        bytes4 onFailure,\n        address asset,\n        uint256 amount\n    ) external returns (bytes32 requestId);\n}\n\n/// @title IIntakeReceiver\n/// @notice The callback shapes Intake v2 calls on a job/launch/workflow result. The names are the\n///         receiver's; the parameter types are fixed by the protocol.\ninterface IIntakeReceiver {\n    /// @notice Status 0 for a job: `uri` is ipfs://CID/result.json (or the plane's /intake-results/:id),\n    ///         `resultHash` the keccak-256 of the bytes at `uri`. Selector 0x4374622e.\n    function onResult(bytes32 requestId, bytes32 resultHash, string calldata uri) external;\n\n    /// @notice Status 1 (refused) or 2 (no result). `signature` is empty for now. Selector 0x5a0df71e.\n    function onFailure(\n        bytes32 requestId,\n        uint8 status,\n        bytes32 reason,\n        uint16 agreed,\n        uint16 answered,\n        bytes calldata signature\n    ) external;\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        (1 << 0x08) | // backspace\n            (1 << 0x09) | // tab\n            (1 << 0x0a) | // newline\n            (1 << 0x0c) | // form feed\n            (1 << 0x0d) | // carriage return\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes all unicode characters, and not just the ones in ranges defined in section 2.5 of\n     * RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). ECMAScript's `JSON.parse` does recover escaped unicode\n     * characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n        bytes memory output = new bytes(2 * buffer.length); // worst case scenario\n        uint256 outputLength = 0;\n\n        for (uint256 i; i < buffer.length; ++i) {\n            bytes1 char = bytes1(_unsafeReadBytesOffset(buffer, i));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << uint8(char))) != 0)) {\n                output[outputLength++] = \"\\\\\";\n                if (char == 0x08) output[outputLength++] = \"b\";\n                else if (char == 0x09) output[outputLength++] = \"t\";\n                else if (char == 0x0a) output[outputLength++] = \"n\";\n                else if (char == 0x0c) output[outputLength++] = \"f\";\n                else if (char == 0x0d) output[outputLength++] = \"r\";\n                else if (char == 0x5c) output[outputLength++] = \"\\\\\";\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    output[outputLength++] = '\"';\n                }\n            } else {\n                output[outputLength++] = char;\n            }\n        }\n        // write the actual length and deallocate unused memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, shl(5, shr(5, add(outputLength, 63)))))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC20} from \"../token/ERC20/IERC20.sol\";\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)\n\npragma solidity >=0.4.16;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @title IERC1363\n * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].\n *\n * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract\n * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.\n */\ninterface IERC1363 is IERC20, IERC165 {\n    /*\n     * Note: the ERC-165 identifier for this interface is 0xb0202a11.\n     * 0xb0202a11 ===\n     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^\n     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^\n     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))\n     */\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism\n     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.\n     * @param from The address which you want to send tokens from.\n     * @param to The address which you want to transfer to.\n     * @param value The amount of tokens to be transferred.\n     * @param data Additional data with no specified format, sent in call to `to`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.\n     * @param spender The address which will spend the funds.\n     * @param value The amount of tokens to be spent.\n     * @param data Additional data with no specified format, sent in call to `spender`.\n     * @return A boolean value indicating whether the operation succeeded unless throwing.\n     */\n    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    uint256 private _status;\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        _status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == ENTERED;\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC1363} from \"../../../interfaces/IERC1363.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC-20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n    /**\n     * @dev An operation with an ERC-20 token failed.\n     */\n    error SafeERC20FailedOperation(address token);\n\n    /**\n     * @dev Indicates a failed `decreaseAllowance` request.\n     */\n    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n    /**\n     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     */\n    function safeTransfer(IERC20 token, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n     */\n    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {\n        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));\n    }\n\n    /**\n     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.\n     */\n    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {\n        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }\n\n    /**\n     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n        uint256 oldAllowance = token.allowance(address(this), spender);\n        forceApprove(token, spender, oldAllowance + value);\n    }\n\n    /**\n     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n     * value, non-reverting calls are assumed to be successful.\n     *\n     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the \"client\"\n     * smart contract uses ERC-7674 to set temporary allowances, then the \"client\" smart contract should avoid using\n     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract\n     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.\n     */\n    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n        unchecked {\n            uint256 currentAllowance = token.allowance(address(this), spender);\n            if (currentAllowance < requestedDecrease) {\n                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n            }\n            forceApprove(token, spender, currentAllowance - requestedDecrease);\n        }\n    }\n\n    /**\n     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n     * to be set to zero before setting it to a non-zero value, such as USDT.\n     *\n     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function\n     * only sets the \"standard\" allowance. Any temporary allowance will remain active, in addition to the value being\n     * set here.\n     */\n    function forceApprove(IERC20 token, address spender, uint256 value) internal {\n        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n        if (!_callOptionalReturnBool(token, approvalCall)) {\n            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n            _callOptionalReturn(token, approvalCall);\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            safeTransfer(token, to, value);\n        } else if (!token.transferAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target\n     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function transferFromAndCallRelaxed(\n        IERC1363 token,\n        address from,\n        address to,\n        uint256 value,\n        bytes memory data\n    ) internal {\n        if (to.code.length == 0) {\n            safeTransferFrom(token, from, to, value);\n        } else if (!token.transferFromAndCall(from, to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no\n     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when\n     * targeting contracts.\n     *\n     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.\n     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}\n     * once without retrying, and relies on the returned value to be true.\n     *\n     * Reverts if the returned value is other than `true`.\n     */\n    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {\n        if (to.code.length == 0) {\n            forceApprove(token, to, value);\n        } else if (!token.approveAndCall(to, value, data)) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.\n     */\n    function _callOptionalReturn(IERC20 token, bytes memory data) private {\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            // bubble errors\n            if iszero(success) {\n                let ptr := mload(0x40)\n                returndatacopy(ptr, 0, returndatasize())\n                revert(ptr, returndatasize())\n            }\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n\n        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {\n            revert SafeERC20FailedOperation(address(token));\n        }\n    }\n\n    /**\n     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n     * on the return value: the return value is optional (but if data is returned, it must not be false).\n     * @param token The token targeted by the call.\n     * @param data The call data (encoded using abi.encode or one of its variants).\n     *\n     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.\n     */\n    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n        bool success;\n        uint256 returnSize;\n        uint256 returnValue;\n        assembly (\"memory-safe\") {\n            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)\n            returnSize := returndatasize()\n            returnValue := mload(0)\n        }\n        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);\n    }\n}\n"},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"}},"language":"Solidity","settings":{"viaIR":false,"metadata":{"appendCBOR":false,"bytecodeHash":"none","useLiteralContent":false},"libraries":{},"optimizer":{"runs":200,"enabled":true},"evmVersion":"cancun","remappings":["forge-std/=lib/forge-std/src/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"]}},"stdJsonOutput":{"sources":{"src/OuroborosPress.sol":{"id":12},"src/interfaces/IIntakeV2.sol":{"id":13},"lib/openzeppelin-contracts/contracts/utils/Panic.sol":{"id":5},"lib/openzeppelin-contracts/contracts/utils/Strings.sol":{"id":7},"lib/openzeppelin-contracts/contracts/utils/math/Math.sol":{"id":9},"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol":{"id":2},"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol":{"id":1},"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol":{"id":3},"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol":{"id":0},"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol":{"id":10},"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol":{"id":6},"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol":{"id":11},"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol":{"id":4},"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol":{"id":8}},"contracts":{"src/OuroborosPress.sol":{"OuroborosPress":{"abi":[{"type":"constructor","inputs":[],"stateMutability":"nonpayable"},{"name":"AlreadyInscribed","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"Busy","type":"error","inputs":[]},{"name":"CoolingDown","type":"error","inputs":[{"name":"until","type":"uint256","internalType":"uint256"}]},{"name":"InsufficientBalance","type":"error","inputs":[{"name":"have","type":"uint256","internalType":"uint256"},{"name":"need","type":"uint256","internalType":"uint256"}]},{"name":"IntakeCannotCommission","type":"error","inputs":[]},{"name":"NoEther","type":"error","inputs":[]},{"name":"NoSuchChapter","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"NotBusy","type":"error","inputs":[]},{"name":"NotIntake","type":"error","inputs":[]},{"name":"NotSteward","type":"error","inputs":[]},{"name":"PreviousNotInscribed","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"ReentrancyGuardReentrantCall","type":"error","inputs":[]},{"name":"SafeERC20FailedOperation","type":"error","inputs":[{"name":"token","type":"address","internalType":"address"}]},{"name":"StringsInsufficientHexLength","type":"error","inputs":[{"name":"value","type":"uint256","internalType":"uint256"},{"name":"length","type":"uint256","internalType":"uint256"}]},{"name":"TooEarly","type":"error","inputs":[{"name":"at","type":"uint256","internalType":"uint256"}]},{"name":"UnknownRequest","type":"error","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"}]},{"name":"UriMismatch","type":"error","inputs":[{"name":"chapter","type":"uint256","internalType":"uint256"}]},{"name":"ZeroAmount","type":"error","inputs":[]},{"name":"ZeroRequestId","type":"error","inputs":[]},{"name":"BountyPaid","type":"event","inputs":[{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"BountySkipped","type":"event","inputs":[{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Chapter","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"resultHash","type":"bytes32","indexed":false,"internalType":"bytes32"},{"name":"uri","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"Commissioned","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"commissioner","type":"address","indexed":true,"internalType":"address"},{"name":"body","type":"bytes","indexed":false,"internalType":"bytes"}],"anonymous":false},{"name":"Donated","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Failed","type":"event","inputs":[{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"status","type":"uint8","indexed":false,"internalType":"uint8"},{"name":"reason","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"name":"Inscribed","type":"event","inputs":[{"name":"chapter","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"uri","type":"string","indexed":false,"internalType":"string"}],"anonymous":false},{"name":"IntakeChanged","type":"event","inputs":[{"name":"previous","type":"address","indexed":true,"internalType":"address"},{"name":"next","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"TimedOut","type":"event","inputs":[{"name":"requestId","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"name":"ACTION_JOB_OPEN","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"BASE_COOLDOWN","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"BOUNTY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"IMD_TOKEN","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"INTAKE_V2","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"MAX_QUOTED_URI","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_STREAK","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"PRICE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"STEWARD","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"TIMEOUT","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"busy","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"chapter","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"resultHash","type":"bytes32","internalType":"bytes32"},{"name":"uriHash","type":"bytes32","internalType":"bytes32"},{"name":"commissioner","type":"address","internalType":"address"},{"name":"requestedAt","type":"uint48","internalType":"uint48"},{"name":"deliveredAt","type":"uint48","internalType":"uint48"},{"name":"uri","type":"string","internalType":"string"}],"internalType":"struct OuroborosPress.ChapterRecord"}],"stateMutability":"view"},{"name":"chapterCount","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"commission","type":"function","inputs":[],"outputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"}],"stateMutability":"nonpayable"},{"name":"cooldownUntil","type":"function","inputs":[],"outputs":[{"name":"","type":"uint48","internalType":"uint48"}],"stateMutability":"view"},{"name":"donate","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"failureStreak","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"failures","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"imd","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IERC20"}],"stateMutability":"view"},{"name":"inscribe","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"},{"name":"uri","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"intake","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"isInscribed","type":"function","inputs":[{"name":"n","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"lastFailureReason","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"onFailure","type":"function","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"status","type":"uint8","internalType":"uint8"},{"name":"reason","type":"bytes32","internalType":"bytes32"},{"name":"","type":"uint16","internalType":"uint16"},{"name":"","type":"uint16","internalType":"uint16"},{"name":"","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"onResult","type":"function","inputs":[{"name":"requestId","type":"bytes32","internalType":"bytes32"},{"name":"resultHash","type":"bytes32","internalType":"bytes32"},{"name":"uri","type":"string","internalType":"string"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"pendingCommissioner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"pendingRequest","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"pendingSince","type":"function","inputs":[],"outputs":[{"name":"","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"previewBody","type":"function","inputs":[],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"name":"reset","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"setIntake","type":"function","inputs":[{"name":"next","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"}],"metadata":"{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"}],\"name\":\"AlreadyInscribed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Busy\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"until\",\"type\":\"uint256\"}],\"name\":\"CoolingDown\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"have\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"need\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IntakeCannotCommission\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoEther\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"}],\"name\":\"NoSuchChapter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotBusy\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotIntake\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSteward\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"}],\"name\":\"PreviousNotInscribed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"StringsInsufficientHexLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"at\",\"type\":\"uint256\"}],\"name\":\"TooEarly\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"UnknownRequest\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"}],\"name\":\"UriMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroRequestId\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BountyPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BountySkipped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"Chapter\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"commissioner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"body\",\"type\":\"bytes\"}],\"name\":\"Commissioned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Donated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"reason\",\"type\":\"bytes32\"}],\"name\":\"Failed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chapter\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"Inscribed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previous\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"next\",\"type\":\"address\"}],\"name\":\"IntakeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"TimedOut\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACTION_JOB_OPEN\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BASE_COOLDOWN\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"BOUNTY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IMD_TOKEN\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"INTAKE_V2\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_QUOTED_URI\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_STREAK\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STEWARD\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TIMEOUT\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"busy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"chapter\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"uriHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"commissioner\",\"type\":\"address\"},{\"internalType\":\"uint48\",\"name\":\"requestedAt\",\"type\":\"uint48\"},{\"internalType\":\"uint48\",\"name\":\"deliveredAt\",\"type\":\"uint48\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"internalType\":\"struct OuroborosPress.ChapterRecord\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chapterCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commission\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cooldownUntil\",\"outputs\":[{\"internalType\":\"uint48\",\"name\":\"\",\"type\":\"uint48\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"donate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"failureStreak\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"failures\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"imd\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"inscribe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"intake\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"isInscribed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFailureReason\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"reason\",\"type\":\"bytes32\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onFailure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"requestId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"resultHash\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"onResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingCommissioner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingRequest\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingSince\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewBody\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"next\",\"type\":\"address\"}],\"name\":\"setIntake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and         anyone can copy it into storage later with `inscribe`, which checks it against the stored         hash. The draft record (request id, commissioner, time) is written by `commission`, which         is not gas-limited.\",\"errors\":{\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC-20 token failed.\"}],\"StringsInsufficientHexLength(uint256,uint256)\":[{\"details\":\"The `value` string doesn't fit in the specified `length`.\"}]},\"kind\":\"dev\",\"methods\":{\"commission()\":{\"returns\":{\"requestId\":\"The Intake's request id.\"}},\"constructor\":{\"details\":\"Static, nonpayable, no external calls.\"},\"onResult(bytes32,bytes32,string)\":{\"details\":\"Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops.\"}},\"stateVariables\":{\"BOUNTY_GAS\":{\"details\":\"Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback.\"},\"EMPTY_HASH\":{\"details\":\"keccak256(\\\"\\\") (an empty delivered uri counts as inscribed).\"},\"_chapters\":{\"details\":\"1-based. Index `_published + 1` holds the draft of the chapter being written.\"},\"_published\":{\"details\":\"Published chapters; chapter numbers start at 1.\"}},\"title\":\"Ouroboros Press\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"ACTION_JOB_OPEN()\":{\"notice\":\"\\\"job.open@job-1\\\", right-padded to 32 bytes (== `cast format-bytes32-string`).\"},\"BASE_COOLDOWN()\":{\"notice\":\"Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours).\"},\"BOUNTY()\":{\"notice\":\"Paid from this contract's balance to the commissioner of a delivered chapter.\"},\"IMD_TOKEN()\":{\"notice\":\"IMD on Robinhood Chain (18 decimals, symbol \\\"IMD\\\").\"},\"INTAKE_V2()\":{\"notice\":\"IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \\\"Intake v2\\\").\"},\"MAX_QUOTED_URI()\":{\"notice\":\"A previous-chapter uri longer than this is not quoted in the next objective.\"},\"PRICE()\":{\"notice\":\"Intake v2's price per action: 0.5 IMD.\"},\"STEWARD()\":{\"notice\":\"The only address allowed to re-point `intake`. It is address(0), so nobody can do it.         See THREAT-MODEL.md, \\\"Why the intake cannot be changed\\\".\"},\"TIMEOUT()\":{\"notice\":\"After this long without a callback anyone may `reset()` a pending commission.\"},\"busy()\":{\"notice\":\"True while a commission is waiting for its callback.\"},\"chapter(uint256)\":{\"notice\":\"Delivered chapter `n`, 1 <= n <= chapterCount().\"},\"chapterCount()\":{\"notice\":\"Number of delivered chapters.\"},\"commission()\":{\"notice\":\"Order the next chapter. Anyone may call this when no chapter is pending, the cool-down         has passed, the previous chapter is inscribed, and the contract holds at least         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`.\"},\"cooldownUntil()\":{\"notice\":\"No commission before this time (set after a miss).\"},\"donate(uint256)\":{\"notice\":\"Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain         `IMD.transfer(press, amount)` funds the press too, without the event.\"},\"failureStreak()\":{\"notice\":\"Consecutive refusals, no-results and timeouts since the last delivered chapter.\"},\"failures()\":{\"notice\":\"Every paid request that produced no chapter: refusals, no-results and timeouts.\"},\"imd()\":{\"notice\":\"The token the contract pays with.\"},\"inscribe(uint256,string)\":{\"notice\":\"Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri).\"},\"intake()\":{\"notice\":\"The Intake this contract buys from and accepts callbacks from.\"},\"isInscribed(uint256)\":{\"notice\":\"Whether chapter `n` has its uri in storage (or was delivered with an empty uri).\"},\"lastFailureReason()\":{\"notice\":\"The reason code of the last miss (\\\"timeout\\\" for a reset()).\"},\"onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)\":{\"notice\":\"Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending         commission and counts the miss. Moves no value: a failure is unsigned (see the docs).\"},\"onResult(bytes32,bytes32,string)\":{\"notice\":\"Status 0 callback from the Intake. Records the chapter and pays the bounty.         Callable only by `intake`, only for the pending request, only once.\"},\"pendingCommissioner()\":{\"notice\":\"Who made the pending commission, or zero.\"},\"pendingRequest()\":{\"notice\":\"The Intake request id being waited on, or zero.\"},\"pendingSince()\":{\"notice\":\"When the pending commission was made, or zero.\"},\"previewBody()\":{\"notice\":\"The exact job body `commission()` would send now.\"},\"reset()\":{\"notice\":\"Anyone may clear a commission that has had no callback for longer than TIMEOUT.         This is the way out of every stuck state. A late callback for it is then refused.\"},\"setIntake(address)\":{\"notice\":\"Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so         nobody can. It is kept so the setting the docs ask for is visibly present and visibly         locked. If the gate were \\\"only the current intake\\\", anyone who pays for a job naming         this contract and this selector as the callback could make the Intake call it.\"}},\"notice\":\"A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its         own balance for one `research-report` job: \\\"write chapter N of the book this contract is         writing about itself\\\". The swarm delivers the chapter by callback, and the contract records         the result hash on chain and emits `Chapter`. The book is the product, and the contract is         the author's only employer.         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/OuroborosPress.sol\":\"OuroborosPress\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"appendCBOR\":false,\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol\":{\"keccak256\":\"0xd5ea07362ab630a6a3dee4285a74cf2377044ca2e4be472755ad64d7c5d4b69d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://da5e832b40fc5c3145d3781e2e5fa60ac2052c9d08af7e300dc8ab80c4343100\",\"dweb:/ipfs/QmTzf7N5ZUdh5raqtzbM11yexiUoLC9z3Ws632MCuycq1d\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol\":{\"keccak256\":\"0x0afcb7e740d1537b252cb2676f600465ce6938398569f09ba1b9ca240dde2dfc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1c299900ac4ec268d4570ecef0d697a3013cd11a6eb74e295ee3fbc945056037\",\"dweb:/ipfs/Qmab9owJoxcA7vJT5XNayCMaUR1qxqj1NDzzisduwaJMcZ\"]},\"lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol\":{\"keccak256\":\"0x1a6221315ce0307746c2c4827c125d821ee796c74a676787762f4778671d4f44\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1bb2332a7ee26dd0b0de9b7fe266749f54820c99ab6a3bcb6f7e6b751d47ee2d\",\"dweb:/ipfs/QmcRWpaBeCYkhy68PR3B4AgD7asuQk7PwkWxrvJbZcikLF\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x74ed01eb66b923d0d0cfe3be84604ac04b76482a55f9dd655e1ef4d367f95bc2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5282825a626cfe924e504274b864a652b0023591fa66f06a067b25b51ba9b303\",\"dweb:/ipfs/QmeCfPykghhMc81VJTrHTC7sF6CRvaA1FXVq2pJhwYp1dV\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x982c5cb790ab941d1e04f807120a71709d4c313ba0bfc16006447ffbd27fbbd5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8150ceb4ac947e8a442b2a9c017e01e880b2be2dd958f1fa9bc405f4c5a86508\",\"dweb:/ipfs/QmbcBmFX66AY6Kbhnd5gx7zpkgqnUafo43XnmayAM7zVdB\"]},\"lib/openzeppelin-contracts/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"lib/openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0x11a5a79827df29e915a12740caf62fe21ebe27c08c9ae3e09abe9ee3ba3866d3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3cf0c69ab827e3251db9ee6a50647d62c90ba580a4d7bbff21f2bea39e7b2f4a\",\"dweb:/ipfs/QmZiKwtKU1SBX4RGfQtY7PZfiapbbu6SZ9vizGQD9UHjRA\"]},\"lib/openzeppelin-contracts/contracts/utils/Strings.sol\":{\"keccak256\":\"0xad148d59f05165f9217d0a9e1ac8f772abb02ea6aaad8a756315c532bf79f9f4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://15e3599867c2182f5831e9268b274b2ef2047825837df6b4d81c9e89254b093e\",\"dweb:/ipfs/QmZbL7XAYr5RmaNaooPgZRmcDXaudfsYQfYD9y5iAECvpS\"]},\"lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol\":{\"keccak256\":\"0x8891738ffe910f0cf2da09566928589bf5d63f4524dd734fd9cedbac3274dd5c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://971f954442df5c2ef5b5ebf1eb245d7105d9fbacc7386ee5c796df1d45b21617\",\"dweb:/ipfs/QmadRjHbkicwqwwh61raUEapaVEtaLMcYbQZWs9gUkgj3u\"]},\"lib/openzeppelin-contracts/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c5fab4970634f9ab9a620983dc1c8a30153981a0b1a521666e269d0a11399d3\",\"dweb:/ipfs/QmVRnBC575MESGkEHndjujtR7qub2FzU9RWy9eKLp4hPZB\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8\",\"dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy\"]},\"lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]},\"src/OuroborosPress.sol\":{\"keccak256\":\"0x07a5b249ec07de2ae350d7b7582c8d971f8c0c23330e5a9290d1f7cb81ea2d8d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://82c2d5457818262eba180a91fe629d90ee5a659577eef949ccaedd7747efc76d\",\"dweb:/ipfs/QmXQW5f81rGtQVfcr5PwsHaoLBsx5rcUTDzYNey9ytaz4X\"]},\"src/interfaces/IIntakeV2.sol\":{\"keccak256\":\"0xe83385f148655907c16854a6c5d1391f32f1993d1ae5eb35b0750067710045bf\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://121b76f973c8f9346b47218b0ffd9a085b046d227ac195a7c700dd0798e79af1\",\"dweb:/ipfs/QmTukoA6MwgcAbX8Eg6vYHGPCPCajiXezayynfDvokeefu\"]}},\"version\":1}","userdoc":{"kind":"user","notice":"A contract on Robinhood Chain that pays IMD's agent swarm to write a book about itself.         Anyone may call `commission()`. The contract then pays IMD's Intake v2 0.5 IMD from its         own balance for one `research-report` job: \"write chapter N of the book this contract is         writing about itself\". The swarm delivers the chapter by callback, and the contract records         the result hash on chain and emits `Chapter`. The book is the product, and the contract is         the author's only employer.         No owner, admin, upgrade, pause, withdraw or selfdestruct exists. IMD that reaches this         contract can leave only as the 0.5 IMD price of a chapter (pulled by the Intake) or as the         0.02 IMD bounty paid to whoever commissioned a chapter that was delivered.","methods":{"imd()":{"notice":"The token the contract pays with."},"busy()":{"notice":"True while a commission is waiting for its callback."},"PRICE()":{"notice":"Intake v2's price per action: 0.5 IMD."},"reset()":{"notice":"Anyone may clear a commission that has had no callback for longer than TIMEOUT.         This is the way out of every stuck state. A late callback for it is then refused."},"BOUNTY()":{"notice":"Paid from this contract's balance to the commissioner of a delivered chapter."},"intake()":{"notice":"The Intake this contract buys from and accepts callbacks from."},"STEWARD()":{"notice":"The only address allowed to re-point `intake`. It is address(0), so nobody can do it.         See THREAT-MODEL.md, \"Why the intake cannot be changed\"."},"TIMEOUT()":{"notice":"After this long without a callback anyone may `reset()` a pending commission."},"failures()":{"notice":"Every paid request that produced no chapter: refusals, no-results and timeouts."},"IMD_TOKEN()":{"notice":"IMD on Robinhood Chain (18 decimals, symbol \"IMD\")."},"INTAKE_V2()":{"notice":"IMD Intake v2, the same address on every chain (https://imd.fun/docs/, \"Intake v2\")."},"commission()":{"notice":"Order the next chapter. Anyone may call this when no chapter is pending, the cool-down         has passed, the previous chapter is inscribed, and the contract holds at least         PRICE + BOUNTY. Pays the Intake exactly PRICE. The body is `previewBody()`."},"previewBody()":{"notice":"The exact job body `commission()` would send now."},"chapterCount()":{"notice":"Number of delivered chapters."},"pendingSince()":{"notice":"When the pending commission was made, or zero."},"BASE_COOLDOWN()":{"notice":"Cool-down after the first consecutive miss (refusal, no result or timeout). It doubles         with each further miss, up to `BASE_COOLDOWN << (MAX_STREAK - 1)` (128 hours)."},"cooldownUntil()":{"notice":"No commission before this time (set after a miss)."},"donate(uint256)":{"notice":"Fund future chapters. Pulls `amount` IMD from the caller (approve first). A plain         `IMD.transfer(press, amount)` funds the press too, without the event."},"failureStreak()":{"notice":"Consecutive refusals, no-results and timeouts since the last delivered chapter."},"MAX_QUOTED_URI()":{"notice":"A previous-chapter uri longer than this is not quoted in the next objective."},"chapter(uint256)":{"notice":"Delivered chapter `n`, 1 <= n <= chapterCount()."},"pendingRequest()":{"notice":"The Intake request id being waited on, or zero."},"ACTION_JOB_OPEN()":{"notice":"\"job.open@job-1\", right-padded to 32 bytes (== `cast format-bytes32-string`)."},"setIntake(address)":{"notice":"Re-point the Intake. Only STEWARD may call this, and STEWARD is address(0), so         nobody can. It is kept so the setting the docs ask for is visibly present and visibly         locked. If the gate were \"only the current intake\", anyone who pays for a job naming         this contract and this selector as the callback could make the Intake call it."},"lastFailureReason()":{"notice":"The reason code of the last miss (\"timeout\" for a reset())."},"isInscribed(uint256)":{"notice":"Whether chapter `n` has its uri in storage (or was delivered with an empty uri)."},"pendingCommissioner()":{"notice":"Who made the pending commission, or zero."},"inscribe(uint256,string)":{"notice":"Copy a delivered chapter's uri into storage. Anyone may call this. The uri must hash         to the `uriHash` the Intake delivered. The uri is in the `Chapter` event and on         GET https://api.imd.fun/intake/4663/<commission tx hash> (completion.uri)."},"onResult(bytes32,bytes32,string)":{"notice":"Status 0 callback from the Intake. Records the chapter and pays the bounty.         Callable only by `intake`, only for the pending request, only once."},"onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)":{"notice":"Status 1 (refused) or 2 (no result) callback from the Intake. Clears the pending         commission and counts the miss. Moves no value: a failure is unsigned (see the docs)."}},"version":1},"devdoc":{"kind":"dev","title":"Ouroboros Press","errors":{"ReentrancyGuardReentrantCall()":[{"details":"Unauthorized reentrant call."}],"SafeERC20FailedOperation(address)":[{"details":"An operation with an ERC-20 token failed."}],"StringsInsufficientHexLength(uint256,uint256)":[{"details":"The `value` string doesn't fit in the specified `length`."}]},"details":"Launch constraints (IMD imported-repo `evm_contracts`): zero-argument, nonpayable         constructor with no external calls; chain constants are hardcoded for Robinhood Chain (4663).         Callback gas: the Intake calls back once, with 200,000 gas, inside a try. So `onResult`         writes only fixed-size words (result hash, uri hash, timestamp). It does not store the uri         string, which is ~22k gas per 32 bytes. The uri goes out in full in the `Chapter` event, and         anyone can copy it into storage later with `inscribe`, which checks it against the stored         hash. The draft record (request id, commissioner, time) is written by `commission`, which         is not gas-limited.","methods":{"constructor":{"details":"Static, nonpayable, no external calls."},"commission()":{"returns":{"requestId":"The Intake's request id."}},"onResult(bytes32,bytes32,string)":{"details":"Runs under the Intake's 200,000 gas: fixed-size writes, one capped token transfer, no loops."}},"version":1,"stateVariables":{"_chapters":{"details":"1-based. Index `_published + 1` holds the draft of the chapter being written."},"BOUNTY_GAS":{"details":"Gas forwarded to the IMD transfer that pays the bounty inside the 200k callback."},"EMPTY_HASH":{"details":"keccak256(\"\") (an empty delivered uri counts as inscribed)."},"_published":{"details":"Published chapters; chapter numbers start at 1."}}},"storageLayout":{"types":{"t_bool":{"label":"bool","encoding":"inplace","numberOfBytes":"1"},"t_uint8":{"label":"uint8","encoding":"inplace","numberOfBytes":"1"},"t_uint32":{"label":"uint32","encoding":"inplace","numberOfBytes":"4"},"t_uint48":{"label":"uint48","encoding":"inplace","numberOfBytes":"6"},"t_address":{"label":"address","encoding":"inplace","numberOfBytes":"20"},"t_bytes32":{"label":"bytes32","encoding":"inplace","numberOfBytes":"32"},"t_uint256":{"label":"uint256","encoding":"inplace","numberOfBytes":"32"},"t_string_storage":{"label":"string","encoding":"bytes","numberOfBytes":"32"},"t_struct(ChapterRecord)5792_storage":{"label":"struct OuroborosPress.ChapterRecord","members":[{"slot":"0","type":"t_bytes32","astId":5779,"label":"requestId","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_bytes32","astId":5781,"label":"resultHash","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"2","type":"t_bytes32","astId":5783,"label":"uriHash","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_address","astId":5785,"label":"commissioner","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_uint48","astId":5787,"label":"requestedAt","offset":20,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_uint48","astId":5789,"label":"deliveredAt","offset":26,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"4","type":"t_string_storage","astId":5791,"label":"uri","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"}],"encoding":"inplace","numberOfBytes":"160"},"t_mapping(t_uint256,t_struct(ChapterRecord)5792_storage)":{"key":"t_uint256","label":"mapping(uint256 => struct OuroborosPress.ChapterRecord)","value":"t_struct(ChapterRecord)5792_storage","encoding":"mapping","numberOfBytes":"32"}},"storage":[{"slot":"0","type":"t_uint256","astId":694,"label":"_status","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_address","astId":5795,"label":"intake","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_bool","astId":5798,"label":"busy","offset":20,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint8","astId":5801,"label":"failureStreak","offset":21,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint48","astId":5804,"label":"cooldownUntil","offset":22,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"1","type":"t_uint32","astId":5807,"label":"_published","offset":28,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"2","type":"t_uint256","astId":5810,"label":"failures","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"3","type":"t_bytes32","astId":5813,"label":"lastFailureReason","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"},{"slot":"4","type":"t_mapping(t_uint256,t_struct(ChapterRecord)5792_storage)","astId":5819,"label":"_chapters","offset":0,"contract":"src/OuroborosPress.sol:OuroborosPress"}]},"transientStorageLayout":null,"evm":{"bytecode":{"object":"60a0604052348015600e575f80fd5b5060015f818155735f7bb59365ce557c26dbcaa4ee9d39a4b95b712760805281546001600160a01b03191673a43e6f75ee006411f79ac1c84120606c2330de829081179092556040517fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45908290a36080516125e36100be5f395f818161053c015281816107c301528181610e0a01528181610f0601528181610f900152818161124d01526113f801526125e35ff3fe6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000000000000000000000000000000000000000000000906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000000000000000000000000000000000000000000000925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","sourceMap":"2056:17195:12:-:0;;;7537:133;;;;;;;;;-1:-1:-1;1857:1:6;2061:7;:21;;;2591:42:12;7561:23;;7594:18;;-1:-1:-1;;;;;;7594:18:12;2439:42;7594:18;;;;;;7627:36;;;;2061:7:6;;7627:36:12;2056:17195;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"6080604052600436106101d3575f3560e01c8063995b9675116100fd578063d826f88f11610092578063ed619c2011610062578063ed619c2014610586578063f14faf6f146105a5578063f56f48f2146105c4578063f7185cfb146105d9575f80fd5b8063d826f88f14610517578063dd02e1541461052b578063e14891911461055e578063e2b0a15d14610572575f80fd5b8063ca86ad48116100cd578063ca86ad48146104aa578063d081f2b8146104c9578063d70e92f9146104e3578063d7ec3c3114610503575f80fd5b8063995b96751461040c578063a3ef204114610448578063a9d1225c14610474578063afb67c7514610495575f80fd5b8063482e27e31161017357806386d1508f1161014357806386d1508f146103995780638ba2b0bc146103b85780638d314401146103cd5780638d859f3e146103f1575f80fd5b8063482e27e31461030d5780634d91aaaa1461032e5780635a0df71e1461034d5780637d979a4f1461036c575f80fd5b80633465e045116101ae5780633465e04514610278578063355932fc1461029f5780633ea2b220146102c65780634374622e146102ec575f80fd5b806309584243146101f55780631b8f11901461021d57806330641b5a14610248575f80fd5b366101f15760405163a4675adf60e01b815260040160405180910390fd5b5f80fd5b348015610200575f80fd5b5061020a60035481565b6040519081526020015b60405180910390f35b348015610228575f80fd5b506102305f81565b6040516001600160a01b039091168152602001610214565b348015610253575f80fd5b5060015461026890600160a01b900460ff1681565b6040519015158152602001610214565b348015610283575f80fd5b50610230735f7bb59365ce557c26dbcaa4ee9d39a4b95b712781565b3480156102aa575f80fd5b5061023073a43e6f75ee006411f79ac1c84120606c2330de8281565b3480156102d1575f80fd5b506102da600881565b60405160ff9091168152602001610214565b3480156102f7575f80fd5b5061030b610306366004611d21565b6105ee565b005b348015610318575f80fd5b50610321610784565b6040516102149190611d9e565b348015610339575f80fd5b50610268610348366004611db0565b61083e565b348015610358575f80fd5b5061030b610367366004611ddd565b61089c565b348015610377575f80fd5b50610380610907565b60405167ffffffffffffffff9091168152602001610214565b3480156103a4575f80fd5b50600154610230906001600160a01b031681565b3480156103c3575f80fd5b5061020a61010081565b3480156103d8575f80fd5b5061020a6d6a6f622e6f70656e406a6f622d3160901b81565b3480156103fc575f80fd5b5061020a6706f05b59d3b2000081565b348015610417575f80fd5b5060015461043190600160b01b900465ffffffffffff1681565b60405165ffffffffffff9091168152602001610214565b348015610453575f80fd5b50610467610462366004611db0565b61096e565b6040516102149190611e67565b34801561047f575f80fd5b50600154600160e01b900463ffffffff1661020a565b3480156104a0575f80fd5b5061020a60025481565b3480156104b5575f80fd5b5061030b6104c4366004611ed6565b610aee565b3480156104d4575f80fd5b5061020a66470de4df82000081565b3480156104ee575f80fd5b506001546102da90600160a81b900460ff1681565b34801561050e575f80fd5b50610230610b68565b348015610522575f80fd5b5061030b610bc9565b348015610536575f80fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b348015610569575f80fd5b5061020a610cce565b34801561057d575f80fd5b5061020a6110b8565b348015610591575f80fd5b5061030b6105a0366004611efc565b61110d565b3480156105b0575f80fd5b5061030b6105bf366004611db0565b611218565b3480156105cf575f80fd5b5061038061546081565b3480156105e4575f80fd5b50610380610e1081565b6105f66112b6565b5f610600856112de565b5f8181526004602052604090819020600181018790559051919250906106299085908590611f44565b60405190819003812060028301556003820180546001600160d01b0316600160d01b4265ffffffffffff160217815560018054600166ffffffffffff0160a81b0316600160e01b63ffffffff87160260ff60a81b1916179055546001600160a01b031690879084907f311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2906106c2908a908a908a90611f7b565b60405180910390a36106d3816113a0565b1561072757806001600160a01b03167f31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda3566470de4df82000060405161071a91815260200190565b60405180910390a2610772565b806001600160a01b03167fa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf9766470de4df82000060405161076991815260200190565b60405180910390a25b50505061077e60015f55565b50505050565b60606108396001601c9054906101000a900463ffffffff1663ffffffff1660016107ae9190611fb1565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610810573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108349190611fc4565b61145f565b905090565b5f81158061085a5750600154600160e01b900463ffffffff1682115b156108805760405163dd92269760e01b8152600481018390526024015b60405180910390fd5b5f8281526004602052604090206108969061150c565b92915050565b6108a46112b6565b6108ad876112de565b506108b785611550565b6040805160ff881681526020810187905288917fdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb910160405180910390a26108fe60015f55565b50505050505050565b6001545f90600160a01b900460ff1661091f57505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016109479190611fb1565b815260208101919091526040015f2060030154600160a01b900465ffffffffffff16919050565b6040805160e0810182525f8082526020820181905291810182905260608082018390526080820183905260a082019290925260c08101919091528115806109c35750600154600160e01b900463ffffffff1682115b156109e45760405163dd92269760e01b815260048101839052602401610877565b5f82815260046020818152604092839020835160e0810185528154815260018201549281019290925260028101549382019390935260038301546001600160a01b038116606083015265ffffffffffff600160a01b820481166080840152600160d01b9091041660a0820152908201805491929160c084019190610a6790611fdb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a9390611fdb565b8015610ade5780601f10610ab557610100808354040283529160200191610ade565b820191905f5260205f20905b815481529060010190602001808311610ac157829003601f168201915b5050505050815250509050919050565b3315610b0d576040516307e802d760e41b815260040160405180910390fd5b6001546040516001600160a01b038084169216907fc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45905f90a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001545f90600160a01b900460ff16610b8057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff166001610ba89190611fb1565b815260208101919091526040015f20600301546001600160a01b0316905090565b610bd16112b6565b600154600160a01b900460ff16610bfb57604051637b78df9360e01b815260040160405180910390fd5b600180545f916004918391610c1d91600160e01b900463ffffffff1690611fb1565b815260208101919091526040015f9081206003810154909250610c529061546090600160a01b900465ffffffffffff16611fb1565b9050804211610c7757604051630a8d68c960e21b815260048101829052602401610877565b6001805460ff60a01b19169055610c97661d1a5b595bdd5d60ca1b611550565b81546040517f49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2905f90a25050610ccc60015f55565b565b5f610cd76112b6565b6001546001600160a01b031633819003610d0457604051632d2c3fe360e11b815260040160405180910390fd5b600154600160a01b900460ff1615610d2f57604051633ef3337560e01b815260040160405180910390fd5b600154600160b01b900465ffffffffffff16421015610d7857600154604051600162525fa360e01b03198152600160b01b90910465ffffffffffff166004820152602401610877565b600180545f91610d9591600160e01b900463ffffffff1690611fb1565b9050600181118015610dc75750610dc560045f610db3600185612013565b81526020019081526020015f2061150c565b155b15610df357610dd7600182612013565b604051635cf8f80160e01b815260040161087791815260200190565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610e57573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e7b9190611fc4565b9050610e9666470de4df8200006706f05b59d3b20000611fb1565b811015610ed95780610eb766470de4df8200006706f05b59d3b20000611fb1565b60405163cf47918160e01b815260048101929092526024820152604401610877565b5f610ee4838361145f565b6001805460ff60a01b1916600160a01b1790559050610f356001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016856706f05b59d3b20000611606565b6040805180820182523081526321ba311760e11b60208201529051639a78c32160e01b81526001600160a01b03861691639a78c32191610fc2916d6a6f622e6f70656e406a6f622d3160901b91869190632d06fb8f60e11b907f0000000000000000000000000000000000000000000000000000000000000000906706f05b59d3b2000090600401612026565b6020604051808303815f875af1158015610fde573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110029190611fc4565b9450846110225760405163386ff4db60e21b815260040160405180910390fd5b5f83815260046020526040908190208681556003810180546001600160d01b0319163365ffffffffffff60a01b19811691909117600160a01b4265ffffffffffff1602179091559151909190879086907f4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e8739061109f908790611d9e565b60405180910390a450505050506110b560015f55565b90565b6001545f90600160a01b900460ff166110d057505f90565b60045f6001601c9054906101000a900463ffffffff1663ffffffff1660016110f89190611fb1565b81526020019081526020015f205f0154905090565b8215806111285750600154600160e01b900463ffffffff1683115b156111495760405163dd92269760e01b815260048101849052602401610877565b5f838152600460208190526040909120908101805461116790611fdb565b15905061118a5760405163c900ea5f60e01b815260048101859052602401610877565b8060020154838360405161119f929190611f44565b6040518091039020146111c857604051634219cf9f60e01b815260048101859052602401610877565b600481016111d78385836120e7565b50837f38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac848460405161120a9291906121a1565b60405180910390a250505050565b6112206112b6565b805f0361124057604051631f2a200560e01b815260040160405180910390fd5b6112756001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846116c3565b60405181815233907f2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e5439060200160405180910390a26112b360015f55565b50565b60025f54036112d857604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6001545f906001600160a01b0316331461130b576040516381e1f66360e01b815260040160405180910390fd5b600154600160a01b900460ff1661133557604051637b78df9360e01b815260040160405180910390fd5b6001805461135191600160e01b90910463ffffffff1690611fb1565b905081158061136d57505f818152600460205260409020548214155b1561138e57604051637bbe34c960e01b815260048101839052602401610877565b6001805460ff60a01b19169055919050565b6040516001600160a01b038216602482015266470de4df82000060448201525f90819060640160408051601f19818403018152919052602080820180516001600160e01b031663a9059cbb60e01b17815282519293507f0000000000000000000000000000000000000000000000000000000000000000925f92839290918391828762013880f194503d91505f519050848015611455575081156114475780600114611455565b5f836001600160a01b03163b115b9695505050505050565b60605f61146b846116fc565b6114743061178c565b61147d856116fc565b60405160200161148f939291906121cb565b60408051601f1981840301815291905290505f6114b56114b0600187612013565b6116fc565b6114be866117a2565b6040516020016114cf929190612322565b604051602081830303815290604052905081816040516020016114f39291906124c1565b6040516020818303038152906040529250505092915050565b5f81600401805461151c90611fdb565b1515905080610896575050600201547fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600160025f8282546115629190611fb1565b909155505060038190556001545f906008600160a81b90910460ff161061158a5760086115a6565b600160159054906101000a900460ff1660016115a691906124d5565b6001805460ff60a81b1916600160a81b60ff8416021781559091506115cb90826124ee565b6115de90610e1060ff9091161b42611fb1565b600160166101000a81548165ffffffffffff021916908365ffffffffffff1602179055505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526116578482611929565b61077e576040516001600160a01b0384811660248301525f60448301526116b991869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061196e565b61077e848261196e565b6040516001600160a01b03848116602483015283811660448301526064820183905261077e9186918216906323b872dd90608401611687565b60605f611708836119da565b60010190505f8167ffffffffffffffff81111561172757611727612087565b6040519080825280601f01601f191660200182016040528015611751576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461175b57509392505050565b60606108966001600160a01b0383166014611ab1565b6060816001036117cc5750506040805180820190915260048152636e6f6e6560e01b602082015290565b5f6004816117db600186612013565b81526020019081526020015f2090505f8160040180546117fa90611fdb565b80601f016020809104026020016040519081016040528092919081815260200182805461182690611fdb565b80156118715780601f1061184857610100808354040283529160200191611871565b820191905f5260205f20905b81548152906001019060200180831161185457829003601f168201915b5050505050905080515f036118a1576040518060600160405280602581526020016125be60259139949350505050565b6118aa81611c2b565b6118e65760018201546118be906020611ab1565b6040516020016118ce9190612507565b60405160208183030381529060405292505050919050565b805f815181106118f8576118f8612556565b01602001516001600160f81b031916602f60f81b0361192257806040516020016118ce919061256a565b9392505050565b5f805f8060205f8651602088015f8a5af192503d91505f5190508280156114555750811561195a5780600114611455565b50505050506001600160a01b03163b151590565b5f8060205f8451602086015f885af18061198d576040513d5f823e3d81fd5b50505f513d915081156119a45780600114156119b1565b6001600160a01b0384163b155b1561077e57604051635274afe760e01b81526001600160a01b0385166004820152602401610877565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310611a185772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611a44576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310611a6257662386f26fc10000830492506010015b6305f5e1008310611a7a576305f5e100830492506008015b6127108310611a8e57612710830492506004015b60648310611aa0576064830492506002015b600a83106108965760010192915050565b6060825f611ac0846002612591565b611acb906002611fb1565b67ffffffffffffffff811115611ae357611ae3612087565b6040519080825280601f01601f191660200182016040528015611b0d576020820181803683370190505b509050600360fc1b815f81518110611b2757611b27612556565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110611b5557611b55612556565b60200101906001600160f81b03191690815f1a9053505f611b77856002612591565b611b82906001611fb1565b90505b6001811115611bf9576f181899199a1a9b1b9c1cb0b131b232b360811b83600f1660108110611bb657611bb6612556565b1a60f81b828281518110611bcc57611bcc612556565b60200101906001600160f81b03191690815f1a90535060049290921c91611bf2816125a8565b9050611b85565b508115611c235760405163e22e27eb60e01b81526004810186905260248101859052604401610877565b949350505050565b5f61010082511115611c3e57505f919050565b5f5b8251811015611cd3575f838281518110611c5c57611c5c612556565b01602001516001600160f81b0319169050600160fd1b811080611c8c5750603f60f91b6001600160f81b03198216115b80611ca45750601160f91b6001600160f81b03198216145b80611cbc5750601760fa1b6001600160f81b03198216145b15611cca57505f9392505050565b50600101611c40565b50600192915050565b5f8083601f840112611cec575f80fd5b50813567ffffffffffffffff811115611d03575f80fd5b602083019150836020828501011115611d1a575f80fd5b9250929050565b5f805f8060608587031215611d34575f80fd5b8435935060208501359250604085013567ffffffffffffffff811115611d58575f80fd5b611d6487828801611cdc565b95989497509550505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6119226020830184611d70565b5f60208284031215611dc0575f80fd5b5035919050565b803561ffff81168114611dd8575f80fd5b919050565b5f805f805f805f60c0888a031215611df3575f80fd5b87359650602088013560ff81168114611e0a575f80fd5b955060408801359450611e1f60608901611dc7565b9350611e2d60808901611dc7565b925060a088013567ffffffffffffffff811115611e48575f80fd5b611e548a828b01611cdc565b989b979a50959850939692959293505050565b6020815281516020820152602082015160408201526040820151606082015260018060a01b03606083015116608082015265ffffffffffff60808301511660a082015265ffffffffffff60a08301511660c08201525f60c083015160e080840152611c23610100840182611d70565b5f60208284031215611ee6575f80fd5b81356001600160a01b0381168114611922575f80fd5b5f805f60408486031215611f0e575f80fd5b83359250602084013567ffffffffffffffff811115611f2b575f80fd5b611f3786828701611cdc565b9497909650939450505050565b818382375f9101908152919050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b838152604060208201525f611f94604083018486611f53565b95945050505050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561089657610896611f9d565b5f60208284031215611fd4575f80fd5b5051919050565b600181811c90821680611fef57607f821691505b60208210810361200d57634e487b7160e01b5f52602260045260245ffd5b50919050565b8181038181111561089657610896611f9d565b86815260e060208201525f61203e60e0830188611d70565b86516001600160a01b0390811660408501526020909701516001600160e01b03199081166060850152959095166080830152509190931660a082015260c0019190915292915050565b634e487b7160e01b5f52604160045260245ffd5b601f8211156120e257805f5260205f20601f840160051c810160208510156120c05750805b601f840160051c820191505b818110156120df575f81556001016120cc565b50505b505050565b67ffffffffffffffff8311156120ff576120ff612087565b6121138361210d8354611fdb565b8361209b565b5f601f841160018114612144575f851561212d5750838201355b5f19600387901b1c1916600186901b1783556120df565b5f83815260208120601f198716915b828110156121735786850135825560209485019460019092019101612153565b508682101561218f575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081525f611c23602083018486611f53565b5f81518060208401855e5f93019283525090919050565b7f7b226f626a656374697665223a2257726974652063686170746572200000000081525f6121fc601c8301866121b4565b7f206f6620546865204f75726f626f726f732050726573732c206120626f6f6b2081527f74686174206120736d61727420636f6e7472616374206f6e20526f62696e686f60208201527f6f6420436861696e2028636861696e206964203436363329206973207772697460408201527f696e672061626f757420697473656c662e2054686520636f6e747261637420696060820152640399030ba160dd1b60808201526122ac60858201866121b4565b90506a0171024ba103437b63239960ad1b81526122cc600b8201856121b4565b7f20494d4420696e207765692028313820646563696d616c73292e20436861707481527f657273207075626c6973686564206265666f72652074686973206f6e653a20006020820152603f019695505050505050565b5f61232d82856121b4565b7f2e205468652070726576696f7573206368617074657220697320617420000000815261235d601d8201856121b4565b7f2e2044657363726962652077686174207468697320636f6e747261637420697381527f2c20776861742069742068617320646f6e6520736f206661722c20776861742060208201527f61207265616465722073686f756c64206b6e6f772061626f75742061206d616360408201527f68696e6520746861742070617973206167656e747320746f20646f63756d656e60608201527f7420697473656c662c20616e6420656e642077697468206f6e6520717565737460808201527f696f6e20746865206e65787420636861707465722073686f756c6420616e737760a08201527f65722e2033303020746f2036303020776f7264732c20706c61696e2070726f7360c08201526e3296103737903432b0b234b733b99760891b60e08201527f222c22736b696c6c223a2272657365617263682d7265706f7274222c2269706660ef8201526773223a747275657d60c01b61010f8201526101170195945050505050565b5f611c236124cf83866121b4565b846121b4565b60ff818116838216019081111561089657610896611f9d565b60ff828116828216039081111561089657610896611f9d565b7f756e71756f7461626c652068657265202869747320726573756c74206861736881526301034b9960e51b60208201525f61254560248301846121b4565b602960f81b81526001019392505050565b634e487b7160e01b5f52603260045260245ffd5b72343a3a38399d1797b0b8349734b6b217333ab760691b81525f61192260138301846121b4565b808202811582820484141761089657610896611f9d565b5f816125b6576125b6611f9d565b505f19019056fe6e6f6e6520286974207761732064656c69766572656420776974686f757420612075726929","sourceMap":"2056:17195:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13473:9;;-1:-1:-1;;;13473:9:12;;;;;;;;;;;2056:17195;;;;5766:32;;;;;;;;;;;;;;;;;;;160:25:14;;;148:2;133:18;5766:32:12;;;;;;;;2814:44;;;;;;;;;;;;2856:1;2814:44;;;;;-1:-1:-1;;;;;360:32:14;;;342:51;;330:2;315:18;2814:44:12;196:203:14;5222:16:12;;;;;;;;;;-1:-1:-1;5222:16:12;;;;-1:-1:-1;;;5222:16:12;;;;;;;;;569:14:14;;562:22;544:41;;532:2;517:18;5222:16:12;404:187:14;2555:78:12;;;;;;;;;;;;2591:42;2555:78;;2403;;;;;;;;;;;;2439:42;2403:78;;3652:36;;;;;;;;;;;;3687:1;3652:36;;;;;768:4:14;756:17;;;738:36;;726:2;711:18;3652:36:12;596:184:14;9986:619:12;;;;;;;;;;-1:-1:-1;9986:619:12;;;;;:::i;:::-;;:::i;:::-;;13642:144;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;14274:174::-;;;;;;;;;;-1:-1:-1;14274:174:12;;;;;:::i;:::-;;:::i;10810:367::-;;;;;;;;;;-1:-1:-1;10810:367:12;;;;;:::i;:::-;;:::i;14733:144::-;;;;;;;;;;;;;:::i;:::-;;;3833:18:14;3821:31;;;3803:50;;3791:2;3776:18;14733:144:12;3659:200:14;5126:21:12;;;;;;;;;;-1:-1:-1;5126:21:12;;;;-1:-1:-1;;;;;5126:21:12;;;3787:44;;;;;;;;;;;;3828:3;3787:44;;2959:58;;;;;;;;;;;;-1:-1:-1;;;2959:58:12;;3078:38;;;;;;;;;;;;3110:6;3078:38;;5439:27;;;;;;;;;;-1:-1:-1;5439:27:12;;;;-1:-1:-1;;;5439:27:12;;;;;;;;;4220:14:14;4208:27;;;4190:46;;4178:2;4163:18;5439:27:12;4046:196:14;13999:172:12;;;;;;;;;;-1:-1:-1;13999:172:12;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;13838:90::-;;;;;;;;;;-1:-1:-1;13911:10:12;;-1:-1:-1;;;13911:10:12;;;;13838:90;;5661:23;;;;;;;;;;;;;;;;13213:170;;;;;;;;;;-1:-1:-1;13213:170:12;;;;;:::i;:::-;;:::i;3216:40::-;;;;;;;;;;;;3249:7;3216:40;;5340:26;;;;;;;;;;-1:-1:-1;5340:26:12;;;;-1:-1:-1;;;5340:26:12;;;;;;14941:154;;;;;;;;;;;;;:::i;11377:372::-;;;;;;;;;;;;;:::i;6004:27::-;;;;;;;;;;;;;;;8102:1593;;;;;;;;;;;;;:::i;14518:146::-;;;;;;;;;;;;;:::i;12043:367::-;;;;;;;;;;-1:-1:-1;12043:367:12;;;;;:::i;:::-;;:::i;12600:214::-;;;;;;;;;;-1:-1:-1;12600:214:12;;;;;:::i;:::-;;:::i;3356:40::-;;;;;;;;;;;;3389:7;3356:40;;3600:46;;;;;;;;;;;;3639:7;3600:46;;9986:619;2500:21:6;:19;:21::i;:::-;10096:9:12::1;10108:18;10116:9;10108:7;:18::i;:::-;10137:23;10163:12:::0;;;:9:::1;:12;::::0;;;;;;10185::::1;::::0;::::1;:25:::0;;;10232:21;;10096:30;;-1:-1:-1;10163:12:12;10232:21:::1;::::0;10248:3;;;;10232:21:::1;:::i;:::-;;::::0;;;;::::1;::::0;;10220:9:::1;::::0;::::1;:33:::0;10263:13:::1;::::0;::::1;:39:::0;;-1:-1:-1;;;;;10263:39:12::1;-1:-1:-1::0;;;10286:15:12::1;10263:39;;;;::::0;;-1:-1:-1;10312:22:12;;-1:-1:-1;;;;;10344:17:12;-1:-1:-1;;;10312:22:12::1;::::0;::::1;;-1:-1:-1::0;;;;10344:17:12;;;;10394:14;-1:-1:-1;;;;;10394:14:12::1;::::0;10435:9;;10312:22;;10424:38:::1;::::0;::::1;::::0;10446:10;;10458:3;;;;10424:38:::1;:::i;:::-;;;;;;;;10477:27;10491:12;10477:13;:27::i;:::-;10473:125;;;10522:12;-1:-1:-1::0;;;;;10511:32:12::1;;3249:7;10511:32;;;;160:25:14::0;;148:2;133:18;;14:177;10511:32:12::1;;;;;;;;10473:125;;;10577:12;-1:-1:-1::0;;;;;10563:35:12::1;;3249:7;10563:35;;;;160:25:14::0;;148:2;133:18;;14:177;10563:35:12::1;;;;;;;;10473:125;10086:519;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;9986:619:12;;;;:::o;13642:144::-;13688:12;13719:60;13733:10;;;;;;;;;;;13725:19;;13747:1;13725:23;;;;:::i;:::-;13750:28;;-1:-1:-1;;;13750:28:12;;13772:4;13750:28;;;342:51:14;13750:3:12;-1:-1:-1;;;;;13750:13:12;;;;315:18:14;;13750:28:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13719:5;:60::i;:::-;13712:67;;13642:144;:::o;14274:174::-;14329:4;14349:6;;;:24;;-1:-1:-1;14363:10:12;;-1:-1:-1;;;14363:10:12;;;;14359:14;;14349:24;14345:53;;;14382:16;;-1:-1:-1;;;14382:16:12;;;;;160:25:14;;;133:18;;14382:16:12;;;;;;;;14345:53;14428:12;;;;:9;:12;;;;;14415:26;;:12;:26::i;:::-;14408:33;14274:174;-1:-1:-1;;14274:174:12:o;10810:367::-;2500:21:6;:19;:21::i;:::-;11075:18:12::1;11083:9;11075:7;:18::i;:::-;;11103:19;11115:6;11103:11;:19::i;:::-;11137:33;::::0;;7598:4:14;7586:17;;7568:36;;7635:2;7620:18;;7613:34;;;11144:9:12;;11137:33:::1;::::0;7541:18:14;11137:33:12::1;;;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;10810:367:12;;;;;;;:::o;14733:144::-;14805:4;;14780:6;;-1:-1:-1;;;14805:4:12;;;;:65;;-1:-1:-1;14869:1:12;;13642:144::o;14805:65::-;14819:9;:34;14837:10;;;;;;;;;;;14829:19;;14851:1;14829:23;;;;:::i;:::-;14819:34;;;;;;;;;;;-1:-1:-1;14819:34:12;:46;;;-1:-1:-1;;;14819:46:12;;;;;14733:144;-1:-1:-1;14733:144:12:o;13999:172::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14086:6:12;;;:24;;-1:-1:-1;14100:10:12;;-1:-1:-1;;;14100:10:12;;;;14096:14;;14086:24;14082:53;;;14119:16;;-1:-1:-1;;;14119:16:12;;;;;160:25:14;;;133:18;;14119:16:12;14:177:14;14082:53:12;14152:12;;;;:9;:12;;;;;;;;;14145:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;14145:19:12;;;;;;;-1:-1:-1;;;14145:19:12;;;;;;;;-1:-1:-1;;;14145:19:12;;;;;;;;;;;;;;;14152:12;14145:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13999:172;;;:::o;13213:170::-;13269:10;:21;13265:46;;13299:12;;-1:-1:-1;;;13299:12:12;;;;;;;;;;;13265:46;13340:6;;13326:27;;-1:-1:-1;;;;;13326:27:12;;;;13340:6;;13326:27;;13340:6;;13326:27;13363:6;:13;;-1:-1:-1;;;;;;13363:13:12;-1:-1:-1;;;;;13363:13:12;;;;;;;;;;13213:170::o;14941:154::-;15021:4;;14995:7;;-1:-1:-1;;;15021:4:12;;;;:67;;-1:-1:-1;15086:1:12;;13642:144::o;15021:67::-;15028:9;:34;15046:10;;;;;;;;;;;15038:19;;15060:1;15038:23;;;;:::i;:::-;15028:34;;;;;;;;;;;-1:-1:-1;15028:34:12;:47;;;-1:-1:-1;;;;;15028:47:12;15014:74;;14941:154;:::o;11377:372::-;2500:21:6;:19;:21::i;:::-;11431:4:12::1;::::0;-1:-1:-1;;;11431:4:12;::::1;;;11426:27;;11444:9;;-1:-1:-1::0;;;11444:9:12::1;;;;;;;;;;;11426:27;11507:10;::::0;;11463:23:::1;::::0;11489:9:::1;::::0;11463:23;;11499::::1;::::0;-1:-1:-1;;;11507:10:12;::::1;;;::::0;11499:23:::1;:::i;:::-;11489:34:::0;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;11489:34:12;;;11560:13:::1;::::0;::::1;::::0;11489:34;;-1:-1:-1;11552:32:12::1;::::0;3389:7:::1;::::0;-1:-1:-1;;;11560:13:12;::::1;;;11552:32;:::i;:::-;11533:51;;11617:8;11598:15;:27;11594:58;;11634:18;::::0;-1:-1:-1;;;11634:18:12;;::::1;::::0;::::1;160:25:14::0;;;133:18;;11634::12::1;14:177:14::0;11594:58:12::1;11662:4;:12:::0;;-1:-1:-1;;;;11662:12:12::1;::::0;;11684:22:::1;-1:-1:-1::0;;;11684:11:12::1;:22::i;:::-;11730:11:::0;;11721:21:::1;::::0;::::1;::::0;11730:11:::1;::::0;11721:21:::1;11416:333;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;11377:372:12:o;8102:1593::-;8155:17;2500:21:6;:19;:21::i;:::-;8202:6:12::1;::::0;-1:-1:-1;;;;;8202:6:12::1;8417:10;:21:::0;;;8413:58:::1;;8447:24;;-1:-1:-1::0;;;8447:24:12::1;;;;;;;;;;;8413:58;8485:4;::::0;-1:-1:-1;;;8485:4:12;::::1;;;8481:23;;;8498:6;;-1:-1:-1::0;;;8498:6:12::1;;;;;;;;;;;8481:23;8536:13;::::0;-1:-1:-1;;;8536:13:12;::::1;;;8518:15;:31;8514:70;;;8570:13;::::0;8558:26:::1;::::0;-1:-1:-1;;;;;;8558:26:12;;-1:-1:-1;;;8570:13:12;;::::1;;;8558:26;::::0;::::1;4190:46:14::0;4163:18;;8558:26:12::1;4046:196:14::0;8514:70:12::1;8615:10;::::0;;8595:9:::1;::::0;8607:23:::1;::::0;-1:-1:-1;;;8615:10:12;::::1;;;::::0;8607:23:::1;:::i;:::-;8595:35;;8648:1;8644;:5;:40;;;;-1:-1:-1::0;8654:30:12::1;8667:9;:16;8677:5;8681:1;8677::::0;:5:::1;:::i;:::-;8667:16;;;;;;;;;;;8654:12;:30::i;:::-;8653:31;8644:40;8640:80;;;8714:5;8718:1;8714::::0;:5:::1;:::i;:::-;8693:27;;-1:-1:-1::0;;;8693:27:12::1;;;;;;160:25:14::0;;148:2;133:18;;14:177;8640:80:12::1;8749:28;::::0;-1:-1:-1;;;8749:28:12;;8771:4:::1;8749:28;::::0;::::1;342:51:14::0;8731:15:12::1;::::0;8749:3:::1;-1:-1:-1::0;;;;;8749:13:12::1;::::0;::::1;::::0;315:18:14;;8749:28:12::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8731:46:::0;-1:-1:-1;8801:14:12::1;3249:7;3110:6;8801:14;:::i;:::-;8791:7;:24;8787:81;;;8844:7:::0;8853:14:::1;3249:7;3110:6;8853:14;:::i;:::-;8824:44;::::0;-1:-1:-1;;;8824:44:12;;::::1;::::0;::::1;8552:25:14::0;;;;8593:18;;;8586:34;8525:18;;8824:44:12::1;8378:248:14::0;8787:81:12::1;8879:17;8899;8905:1;8908:7;8899:5;:17::i;:::-;8933:4;8926:11:::0;;-1:-1:-1;;;;8926:11:12::1;-1:-1:-1::0;;;8926:11:12::1;::::0;;8879:37;-1:-1:-1;8948:32:12::1;-1:-1:-1::0;;;;;8948:3:12::1;:16;8965:7:::0;3110:6:::1;8948:16;:32::i;:::-;9125:77;::::0;;;;::::1;::::0;;9161:4:::1;9125:77:::0;;-1:-1:-1;;;9125:77:12::1;::::0;::::1;::::0;9002:308;;-1:-1:-1;;;9002:308:12;;-1:-1:-1;;;;;9002:50:12;::::1;::::0;::::1;::::0;:308:::1;::::0;-1:-1:-1;;;9070:15:12;9103:4;;9125:77;-1:-1:-1;;;9220:23:12;9269:3:::1;::::0;3110:6:::1;::::0;9002:308:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8990:320:::0;-1:-1:-1;8990:320:12;9411:51:::1;;9447:15;;-1:-1:-1::0;;;9447:15:12::1;;;;;;;;;;;9411:51;9472:23;9498:12:::0;;;:9:::1;:12;::::0;;;;;;9520:23;;;9553:14:::1;::::0;::::1;:27:::0;;-1:-1:-1;;;;;;9590:39:12;9570:10:::1;-1:-1:-1::0;;;;9590:39:12;;;;;;-1:-1:-1;;;9613:15:12::1;9590:39;;;;::::0;;;9644:44;;9498:12;;9570:10;9520:23;;9498:12;;9644:44:::1;::::0;::::1;::::0;9683:4;;9644:44:::1;:::i;:::-;;;;;;;;8174:1521;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;8102:1593:12;:::o;14518:146::-;14593:4;;14567:7;;-1:-1:-1;;;14593:4:12;;;;:64;;-1:-1:-1;14655:1:12;;13642:144::o;14593:64::-;14600:9;:34;14618:10;;;;;;;;;;;14610:19;;14632:1;14610:23;;;;:::i;:::-;14600:34;;;;;;;;;;;:44;;;14586:71;;14518:146;:::o;12043:367::-;12116:6;;;:24;;-1:-1:-1;12130:10:12;;-1:-1:-1;;;12130:10:12;;;;12126:14;;12116:24;12112:53;;;12149:16;;-1:-1:-1;;;12149:16:12;;;;;160:25:14;;;133:18;;12149:16:12;14:177:14;12112:53:12;12175:23;12201:12;;;:9;:12;;;;;;;;12233:5;;;12227:19;;;;;:::i;:::-;:24;;-1:-1:-1;12223:56:12;;12260:19;;-1:-1:-1;;;12260:19:12;;;;;160:25:14;;;133:18;;12260:19:12;14:177:14;12223:56:12;12318:1;:9;;;12309:3;;12293:21;;;;;;;:::i;:::-;;;;;;;;:34;12289:61;;12336:14;;-1:-1:-1;;;12336:14:12;;;;;160:25:14;;;133:18;;12336:14:12;14:177:14;12289:61:12;12360:5;;;:11;12368:3;;12360:5;:11;:::i;:::-;;12396:1;12386:17;12399:3;;12386:17;;;;;;;:::i;:::-;;;;;;;;12102:308;12043:367;;;:::o;12600:214::-;2500:21:6;:19;:21::i;:::-;12668:6:12::1;12678:1;12668:11:::0;12664:36:::1;;12688:12;;-1:-1:-1::0;;;12688:12:12::1;;;;;;;;;;;12664:36;12710:55;-1:-1:-1::0;;;;;12710:3:12::1;:20;12731:10;12751:4;12758:6:::0;12710:20:::1;:55::i;:::-;12780:27;::::0;160:25:14;;;12788:10:12::1;::::0;12780:27:::1;::::0;148:2:14;133:18;12780:27:12::1;;;;;;;2542:20:6::0;1857:1;3068:7;:21;2888:208;2542:20;12600:214:12;:::o;2575:307:6:-;1899:1;2702:7;;:18;2698:86;;2743:30;;-1:-1:-1;;;2743:30:6;;;;;;;;;;;2698:86;1899:1;2858:7;:17;2575:307::o;15279:331:12:-;15371:6;;15332:9;;-1:-1:-1;;;;;15371:6:12;15357:10;:20;15353:44;;15386:11;;-1:-1:-1;;;15386:11:12;;;;;;;;;;;15353:44;15412:4;;-1:-1:-1;;;15412:4:12;;;;15407:27;;15425:9;;-1:-1:-1;;;15425:9:12;;;;;;;;;;;15407:27;15456:10;;;15448:23;;-1:-1:-1;;;15456:10:12;;;;;;15448:23;:::i;:::-;15444:27;-1:-1:-1;15485:23:12;;;:62;;-1:-1:-1;15525:12:12;;;;:9;:12;;;;;:22;15512:35;;;15485:62;15481:100;;;15556:25;;-1:-1:-1;;;15556:25:12;;;;;160::14;;;133:18;;15556:25:12;14:177:14;15481:100:12;15591:4;:12;;-1:-1:-1;;;;15591:12:12;;;15279:331;;-1:-1:-1;15279:331:12:o;16217:491::-;16308:45;;-1:-1:-1;;;;;12223:32:14;;16308:45:12;;;12205:51:14;3249:7:12;12272:18:14;;;12265:34;16269:7:12;;;;12178:18:14;;16308:45:12;;;-1:-1:-1;;16308:45:12;;;;;;;;;;;;;;;-1:-1:-1;;;;;16308:45:12;-1:-1:-1;;;16308:45:12;;;16535:11;;16308:45;;-1:-1:-1;16387:3:12;;-1:-1:-1;;;;16308:45:12;;-1:-1:-1;;;16387:3:12;16496:10;16491:65;16485:71;;16577:16;16569:24;;16621:1;16615:8;16606:17;;16647:2;:54;;;;-1:-1:-1;16654:9:12;;:46;;16690:5;16699:1;16690:10;16654:46;;;16686:1;16666:5;-1:-1:-1;;;;;16666:17:12;;:21;16654:46;16642:59;16217:491;-1:-1:-1;;;;;;16217:491:12:o;17079:1055::-;17144:12;17168:18;17260:12;:1;:10;:12::i;:::-;17435:27;17443:4;17435:25;:27::i;:::-;17503:18;:7;:16;:18::i;:::-;17189:421;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;17189:421:12;;;;;;;;;;-1:-1:-1;17620:18:12;17668;17669:5;17673:1;17669;:5;:::i;:::-;17668:16;:18::i;:::-;17745:12;17755:1;17745:9;:12::i;:::-;17641:437;;;;;;;;;:::i;:::-;;;;;;;;;;;;;17620:458;;18115:4;18121;18101:25;;;;;;;;;:::i;:::-;;;;;;;;;;;;;18088:39;;;;17079:1055;;;;:::o;16714:150::-;16783:4;16812:1;:5;;16806:19;;;;;:::i;:::-;:24;;;-1:-1:-1;16806:24:12;:51;;-1:-1:-1;;16834:9:12;;;4093:13;16834:23;;16714:150::o;15703:319::-;15770:1;15758:8;;:13;;;;;;;:::i;:::-;;;;-1:-1:-1;;15781:17:12;:26;;;15832:13;;15817:12;;3687:1;-1:-1:-1;;;15832:13:12;;;:26;:13;:26;:59;;3687:1;15832:59;;;15861:13;;;;;;;;;;;15877:1;15861:17;;;;:::i;:::-;15901:13;:22;;-1:-1:-1;;;;15901:22:12;-1:-1:-1;;;15901:22:12;;;;;;;;;-1:-1:-1;16002:10:12;;15901:22;16002:10;:::i;:::-;15956:58;;3639:7;15975:38;;;;;15956:15;:58;:::i;:::-;15933:13;;:82;;;;;;;;;;;;;;;;;;15748:274;15703:319;:::o;5084:380:4:-;5199:47;;;-1:-1:-1;;;;;12223:32:14;;5199:47:4;;;12205:51:14;12272:18;;;;12265:34;;;5199:47:4;;;;;;;;;;12178:18:14;;;;5199:47:4;;;;;;;;-1:-1:-1;;;;;5199:47:4;-1:-1:-1;;;5199:47:4;;;5262:44;5214:13;5199:47;5262:23;:44::i;:::-;5257:201;;5349:43;;-1:-1:-1;;;;;12223:32:14;;;5349:43:4;;;12205:51:14;5389:1:4;12272:18:14;;;12265:34;5322:71:4;;5342:5;;5364:13;;;;;12178:18:14;;5349:43:4;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5349:43:4;;;;;;;;;;;5322:19;:71::i;:::-;5407:40;5427:5;5434:12;5407:19;:40::i;1618:188::-;1745:53;;-1:-1:-1;;;;;16313:32:14;;;1745:53:4;;;16295:51:14;16382:32;;;16362:18;;;16355:60;16431:18;;;16424:34;;;1718:81:4;;1738:5;;1760:18;;;;;16268::14;;1745:53:4;16093:371:14;1308:634:7;1364:13;1413:14;1430:17;1441:5;1430:10;:17::i;:::-;1450:1;1430:21;1413:38;;1465:20;1499:6;1488:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1488:18:7;-1:-1:-1;1465:41:7;-1:-1:-1;1595:30:7;;;1611:4;1595:30;1652:247;-1:-1:-1;;1683:5:7;-1:-1:-1;;;1782:2:7;1771:14;;1766:32;1683:5;1753:46;1843:2;1834:11;;;-1:-1:-1;1863:21:7;1652:247;1863:21;-1:-1:-1;1919:6:7;1308:634;-1:-1:-1;;;1308:634:7:o;3296:148::-;3354:13;3386:51;-1:-1:-1;;;;;3398:22:7;;448:2;3386:11;:51::i;18216:635:12:-;18268:13;18297:1;18302;18297:6;18293:25;;-1:-1:-1;;18305:13:12;;;;;;;;;;;;-1:-1:-1;;;18305:13:12;;;;;18216:635::o;18293:25::-;18328:23;18354:9;18328:23;18364:5;18368:1;18364;:5;:::i;:::-;18354:16;;;;;;;;;;;18328:42;;18380:17;18400:1;:5;;18380:25;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18425:3;18419:17;18440:1;18419:22;18415:74;;18443:46;;;;;;;;;;;;;;;;;;18216:635;-1:-1:-1;;;;18216:635:12:o;18415:74::-;18504:21;18520:3;18504:9;:21::i;:::-;18499:157;;18610:12;;;;18602:37;;18636:2;18602:33;:37::i;:::-;18548:97;;;;;;;;:::i;:::-;;;;;;;;;;;;;18541:104;;;;18216:635;;;:::o;18499:157::-;18760:3;18765:1;18754:13;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;;18754:13:12;-1:-1:-1;;;18754:20:12;18750:74;;18820:3;18783:41;;;;;;;;:::i;18750:74::-;18841:3;18216:635;-1:-1:-1;;;18216:635:12:o;9592:480:4:-;9675:4;9691:12;9713:18;9741:19;9875:4;9872:1;9865:4;9859:11;9852:4;9846;9842:15;9839:1;9832:5;9825;9820:60;9809:71;;9907:16;9893:30;;9957:1;9951:8;9936:23;;9985:7;:80;;;;-1:-1:-1;9997:15:4;;:67;;10048:11;10063:1;10048:16;9997:67;;;-1:-1:-1;;;;;;;;;;10015:26:4;;:30;;;9592:480::o;8370:720::-;8450:18;8478:19;8616:4;8613:1;8606:4;8600:11;8593:4;8587;8583:15;8580:1;8573:5;8566;8561:60;8673:7;8663:176;;8717:4;8711:11;8762:16;8759:1;8754:3;8739:40;8808:16;8803:3;8796:29;8663:176;-1:-1:-1;;8916:1:4;8910:8;8866:16;;-1:-1:-1;8942:15:4;;:68;;8994:11;9009:1;8994:16;;8942:68;;;-1:-1:-1;;;;;8960:26:4;;;:31;8942:68;8938:146;;;9033:40;;-1:-1:-1;;;9033:40:4;;-1:-1:-1;;;;;360:32:14;;9033:40:4;;;342:51:14;315:18;;9033:40:4;196:203:14;29154:916:9;29207:7;;-1:-1:-1;;;29282:17:9;;29278:103;;-1:-1:-1;;;29319:17:9;;;-1:-1:-1;29364:2:9;29354:12;29278:103;29407:8;29398:5;:17;29394:103;;29444:8;29435:17;;;-1:-1:-1;29480:2:9;29470:12;29394:103;29523:8;29514:5;:17;29510:103;;29560:8;29551:17;;;-1:-1:-1;29596:2:9;29586:12;29510:103;29639:7;29630:5;:16;29626:100;;29675:7;29666:16;;;-1:-1:-1;29710:1:9;29700:11;29626:100;29752:7;29743:5;:16;29739:100;;29788:7;29779:16;;;-1:-1:-1;29823:1:9;29813:11;29739:100;29865:7;29856:5;:16;29852:100;;29901:7;29892:16;;;-1:-1:-1;29936:1:9;29926:11;29852:100;29978:7;29969:5;:16;29965:66;;30015:1;30005:11;30057:6;29154:916;-1:-1:-1;;29154:916:9:o;2612:525:7:-;2687:13;2733:5;2712:18;2780:10;2784:6;2780:1;:10;:::i;:::-;:14;;2793:1;2780:14;:::i;:::-;2770:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2770:25:7;;2748:47;;-1:-1:-1;;;2805:6:7;2812:1;2805:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;2805:15:7;;;;;;;;;-1:-1:-1;;;2830:6:7;2837:1;2830:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;2830:15:7;;;;;;;;-1:-1:-1;2860:9:7;2872:10;2876:6;2872:1;:10;:::i;:::-;:14;;2885:1;2872:14;:::i;:::-;2860:26;;2855:140;2892:1;2888;:5;2855:140;;;-1:-1:-1;;;2937:10:7;2950:3;2937:16;2926:28;;;;;;;:::i;:::-;;;;2914:6;2921:1;2914:9;;;;;;;;:::i;:::-;;;;:40;-1:-1:-1;;;;;2914:40:7;;;;;;;;-1:-1:-1;2983:1:7;2968:16;;;;;2895:3;;;:::i;:::-;;;2855:140;;;-1:-1:-1;3008:15:7;;3004:96;;3046:43;;-1:-1:-1;;;3046:43:7;;;;;8552:25:14;;;8593:18;;;8586:34;;;8525:18;;3046:43:7;8378:248:14;3004:96:7;3123:6;2612:525;-1:-1:-1;;;;2612:525:7:o;18944:305:12:-;19001:4;3828:3;19021:1;:8;:25;19017:43;;;-1:-1:-1;19055:5:12;;18944:305;-1:-1:-1;18944:305:12:o;19017:43::-;19075:9;19070:152;19090:1;:8;19086:1;:12;19070:152;;;19119:8;19130:1;19132;19130:4;;;;;;;;:::i;:::-;;;;;-1:-1:-1;;;;;;19130:4:12;;-1:-1:-1;;;;19152:8:12;;;:20;;-1:-1:-1;;;;;;;;;;19164:8:12;;;19152:20;:32;;;-1:-1:-1;;;;;;;;;;19176:8:12;;;19152:32;:45;;;-1:-1:-1;;;;;;;;;;19188:9:12;;;19152:45;19148:63;;;-1:-1:-1;19206:5:12;;18944:305;-1:-1:-1;;;18944:305:12:o;19148:63::-;-1:-1:-1;19100:3:12;;19070:152;;;-1:-1:-1;19238:4:12;;18944:305;-1:-1:-1;;18944:305:12:o;785:348:14:-;837:8;847:6;901:3;894:4;886:6;882:17;878:27;868:55;;919:1;916;909:12;868:55;-1:-1:-1;942:20:14;;985:18;974:30;;971:50;;;1017:1;1014;1007:12;971:50;1054:4;1046:6;1042:17;1030:29;;1106:3;1099:4;1090:6;1082;1078:19;1074:30;1071:39;1068:59;;;1123:1;1120;1113:12;1068:59;785:348;;;;;:::o;1138:645::-;1227:6;1235;1243;1251;1304:2;1292:9;1283:7;1279:23;1275:32;1272:52;;;1320:1;1317;1310:12;1272:52;1365:23;;;-1:-1:-1;1485:2:14;1470:18;;1457:32;;-1:-1:-1;1566:2:14;1551:18;;1538:32;1593:18;1582:30;;1579:50;;;1625:1;1622;1615:12;1579:50;1664:59;1715:7;1706:6;1695:9;1691:22;1664:59;:::i;:::-;1138:645;;;;-1:-1:-1;1742:8:14;-1:-1:-1;;;;1138:645:14:o;1788:288::-;1829:3;1867:5;1861:12;1894:6;1889:3;1882:19;1950:6;1943:4;1936:5;1932:16;1925:4;1920:3;1916:14;1910:47;2002:1;1995:4;1986:6;1981:3;1977:16;1973:27;1966:38;2065:4;2058:2;2054:7;2049:2;2041:6;2037:15;2033:29;2028:3;2024:39;2020:50;2013:57;;;1788:288;;;;:::o;2081:217::-;2228:2;2217:9;2210:21;2191:4;2248:44;2288:2;2277:9;2273:18;2265:6;2248:44;:::i;2303:226::-;2362:6;2415:2;2403:9;2394:7;2390:23;2386:32;2383:52;;;2431:1;2428;2421:12;2383:52;-1:-1:-1;2476:23:14;;2303:226;-1:-1:-1;2303:226:14:o;2534:159::-;2601:20;;2661:6;2650:18;;2640:29;;2630:57;;2683:1;2680;2673:12;2630:57;2534:159;;;:::o;2698:956::-;2809:6;2817;2825;2833;2841;2849;2857;2910:3;2898:9;2889:7;2885:23;2881:33;2878:53;;;2927:1;2924;2917:12;2878:53;2972:23;;;-1:-1:-1;3071:2:14;3056:18;;3043:32;3119:4;3106:18;;3094:31;;3084:59;;3139:1;3136;3129:12;3084:59;3162:7;-1:-1:-1;3242:2:14;3227:18;;3214:32;;-1:-1:-1;3291:37:14;3324:2;3309:18;;3291:37;:::i;:::-;3281:47;;3347:38;3380:3;3369:9;3365:19;3347:38;:::i;:::-;3337:48;;3436:3;3425:9;3421:19;3408:33;3464:18;3456:6;3453:30;3450:50;;;3496:1;3493;3486:12;3450:50;3535:59;3586:7;3577:6;3566:9;3562:22;3535:59;:::i;:::-;2698:956;;;;-1:-1:-1;2698:956:14;;-1:-1:-1;2698:956:14;;;;3509:85;;-1:-1:-1;;;2698:956:14:o;4247:781::-;4438:2;4427:9;4420:21;4483:6;4477:13;4472:2;4461:9;4457:18;4450:41;4545:2;4537:6;4533:15;4527:22;4522:2;4511:9;4507:18;4500:50;4604:2;4596:6;4592:15;4586:22;4581:2;4570:9;4566:18;4559:50;4691:1;4687;4682:3;4678:11;4674:19;4668:2;4660:6;4656:15;4650:22;4646:48;4640:3;4629:9;4625:19;4618:77;4761:14;4754:3;4746:6;4742:16;4736:23;4732:44;4726:3;4715:9;4711:19;4704:73;4843:14;4836:3;4828:6;4824:16;4818:23;4814:44;4808:3;4797:9;4793:19;4786:73;4401:4;4906:3;4898:6;4894:16;4888:23;4949:4;4942;4931:9;4927:20;4920:34;4971:51;5017:3;5006:9;5002:19;4988:12;4971:51;:::i;5033:286::-;5092:6;5145:2;5133:9;5124:7;5120:23;5116:32;5113:52;;;5161:1;5158;5151:12;5113:52;5187:23;;-1:-1:-1;;;;;5239:31:14;;5229:42;;5219:70;;5285:1;5282;5275:12;5546:525;5626:6;5634;5642;5695:2;5683:9;5674:7;5670:23;5666:32;5663:52;;;5711:1;5708;5701:12;5663:52;5756:23;;;-1:-1:-1;5854:2:14;5839:18;;5826:32;5881:18;5870:30;;5867:50;;;5913:1;5910;5903:12;5867:50;5952:59;6003:7;5994:6;5983:9;5979:22;5952:59;:::i;:::-;5546:525;;6030:8;;-1:-1:-1;5926:85:14;;-1:-1:-1;;;;5546:525:14:o;6076:271::-;6259:6;6251;6246:3;6233:33;6215:3;6285:16;;6310:13;;;6285:16;6076:271;-1:-1:-1;6076:271:14:o;6352:267::-;6441:6;6436:3;6429:19;6493:6;6486:5;6479:4;6474:3;6470:14;6457:43;-1:-1:-1;6545:1:14;6520:16;;;6538:4;6516:27;;;6509:38;;;;6601:2;6580:15;;;-1:-1:-1;;6576:29:14;6567:39;;;6563:50;;6352:267::o;6624:318::-;6811:6;6800:9;6793:25;6854:2;6849;6838:9;6834:18;6827:30;6774:4;6874:62;6932:2;6921:9;6917:18;6909:6;6901;6874:62;:::i;:::-;6866:70;6624:318;-1:-1:-1;;;;;6624:318:14:o;6947:127::-;7008:10;7003:3;6999:20;6996:1;6989:31;7039:4;7036:1;7029:15;7063:4;7060:1;7053:15;7079:125;7144:9;;;7165:10;;;7162:36;;;7178:18;;:::i;7209:184::-;7279:6;7332:2;7320:9;7311:7;7307:23;7303:32;7300:52;;;7348:1;7345;7338:12;7300:52;-1:-1:-1;7371:16:14;;7209:184;-1:-1:-1;7209:184:14:o;7658:380::-;7737:1;7733:12;;;;7780;;;7801:61;;7855:4;7847:6;7843:17;7833:27;;7801:61;7908:2;7900:6;7897:14;7877:18;7874:38;7871:161;;7954:10;7949:3;7945:20;7942:1;7935:31;7989:4;7986:1;7979:15;8017:4;8014:1;8007:15;7871:161;;7658:380;;;:::o;8245:128::-;8312:9;;;8333:11;;;8330:37;;;8347:18;;:::i;8631:799::-;8968:6;8957:9;8950:25;9011:3;9006:2;8995:9;8991:18;8984:31;8931:4;9032:45;9072:3;9061:9;9057:19;9049:6;9032:45;:::i;:::-;9117:13;;-1:-1:-1;;;;;9113:39:14;;;9108:2;9093:18;;9086:67;9211:2;9199:15;;;9193:22;-1:-1:-1;;;;;;9189:49:14;;;9184:2;9169:18;;9162:77;9276:33;;;;9270:3;9255:19;;9248:62;-1:-1:-1;9347:32:14;;;;9140:3;9326:19;;9319:61;9411:3;9396:19;9389:35;;;;9024:53;8631:799;-1:-1:-1;;8631:799:14:o;9624:127::-;9685:10;9680:3;9676:20;9673:1;9666:31;9716:4;9713:1;9706:15;9740:4;9737:1;9730:15;9882:518;9984:2;9979:3;9976:11;9973:421;;;10020:5;10017:1;10010:16;10064:4;10061:1;10051:18;10134:2;10122:10;10118:19;10115:1;10111:27;10105:4;10101:38;10170:4;10158:10;10155:20;10152:47;;;-1:-1:-1;10193:4:14;10152:47;10248:2;10243:3;10239:12;10236:1;10232:20;10226:4;10222:31;10212:41;;10303:81;10321:2;10314:5;10311:13;10303:81;;;10380:1;10366:16;;10347:1;10336:13;10303:81;;;10307:3;;9973:421;9882:518;;;:::o;10576:1198::-;10700:18;10695:3;10692:27;10689:53;;;10722:18;;:::i;:::-;10751:94;10841:3;10801:38;10833:4;10827:11;10801:38;:::i;:::-;10795:4;10751:94;:::i;:::-;10871:1;10896:2;10891:3;10888:11;10913:1;10908:608;;;;11560:1;11577:3;11574:93;;;-1:-1:-1;11633:19:14;;;11620:33;11574:93;-1:-1:-1;;10533:1:14;10529:11;;;10525:24;10521:29;10511:40;10557:1;10553:11;;;10508:57;11680:78;;10881:887;;10908:608;9829:1;9822:14;;;9866:4;9853:18;;-1:-1:-1;;10944:17:14;;;11059:229;11073:7;11070:1;11067:14;11059:229;;;11162:19;;;11149:33;11134:49;;11269:4;11254:20;;;;11222:1;11210:14;;;;11089:12;11059:229;;;11063:3;11316;11307:7;11304:16;11301:159;;;11440:1;11436:6;11430:3;11424;11421:1;11417:11;11413:21;11409:34;11405:39;11392:9;11387:3;11383:19;11370:33;11366:79;11358:6;11351:95;11301:159;;;11503:1;11497:3;11494:1;11490:11;11486:19;11480:4;11473:33;10881:887;;10576:1198;;;:::o;11779:247::-;11938:2;11927:9;11920:21;11901:4;11958:62;12016:2;12005:9;12001:18;11993:6;11985;11958:62;:::i;12310:212::-;12352:3;12390:5;12384:12;12434:6;12427:4;12420:5;12416:16;12411:3;12405:36;12496:1;12460:16;;12485:13;;;-1:-1:-1;12460:16:14;;12310:212;-1:-1:-1;12310:212:14:o;12527:1360::-;13168:66;13163:3;13156:79;13138:3;13254:39;13289:2;13284:3;13280:12;13272:6;13254:39;:::i;:::-;13313:34;13309:2;13302:46;13377:34;13372:2;13368;13364:11;13357:55;13441:34;13436:2;13432;13428:11;13421:55;13505:34;13500:2;13496;13492:11;13485:55;-1:-1:-1;;;13564:3:14;13560:2;13556:12;13549:29;13600:39;13634:3;13630:2;13626:12;13618:6;13600:39;:::i;:::-;13587:52;;-1:-1:-1;;;13655:5:14;13648:28;13695:41;13732:2;13725:5;13721:14;13713:6;13695:41;:::i;:::-;13756:34;13745:46;;13820:33;13815:2;13807:11;;13800:54;13878:2;13870:11;;12527:1360;-1:-1:-1;;;;;;12527:1360:14:o;13892:1328::-;14364:3;14395:30;14421:3;14413:6;14395:30;:::i;:::-;14448:31;14441:5;14434:46;14499:41;14536:2;14529:5;14525:14;14517:6;14499:41;:::i;:::-;14560:34;14549:46;;14624:34;14619:2;14611:11;;14604:55;14688:34;14683:2;14675:11;;14668:55;14752:34;14747:2;14739:11;;14732:55;14817:34;14811:3;14803:12;;14796:56;14882:34;14876:3;14868:12;;14861:56;14947:34;14941:3;14933:12;;14926:56;-1:-1:-1;;;15006:3:14;14998:12;;14991:39;15060:66;15054:3;15046:12;;15039:88;-1:-1:-1;;;15151:3:14;15143:12;;15136:50;15210:3;15202:12;;13892:1328;-1:-1:-1;;;;;13892:1328:14:o;15225:267::-;15404:3;15429:57;15455:30;15481:3;15473:6;15455:30;:::i;:::-;15447:6;15429:57;:::i;15497:148::-;15585:4;15564:12;;;15578;;;15560:31;;15603:13;;15600:39;;;15619:18;;:::i;15650:151::-;15740:4;15733:12;;;15719;;;15715:31;;15758:14;;15755:40;;;15775:18;;:::i;16601:547::-;16953:34;16948:3;16941:47;-1:-1:-1;;;17013:2:14;17008:3;17004:12;16997:28;16923:3;17047:39;17082:2;17077:3;17073:12;17065:6;17047:39;:::i;:::-;-1:-1:-1;;;17095:18:14;;17140:1;17129:13;;16601:547;-1:-1:-1;;;16601:547:14:o;17153:127::-;17214:10;17209:3;17205:20;17202:1;17195:31;17245:4;17242:1;17235:15;17269:4;17266:1;17259:15;17285:335;-1:-1:-1;;;17532:3:14;17525:34;17507:3;17575:39;17610:2;17605:3;17601:12;17593:6;17575:39;:::i;17625:168::-;17698:9;;;17729;;17746:15;;;17740:22;;17726:37;17716:71;;17767:18;;:::i;17798:136::-;17837:3;17865:5;17855:39;;17874:18;;:::i;:::-;-1:-1:-1;;;17910:18:14;;17798:136::o","linkReferences":{},"immutableReferences":{"5823":[{"start":1340,"length":32},{"start":1987,"length":32},{"start":3594,"length":32},{"start":3846,"length":32},{"start":3984,"length":32},{"start":4685,"length":32},{"start":5112,"length":32}]}}}}}}},"signatures":{"function":[{"signature":"ACTION_JOB_OPEN()","signatureHash4":"0x8d314401","signatureHash32":"0x8d314401cda658a5ee93dc6e75ca478420e8260c500fff49835927533aee84db"},{"signature":"BASE_COOLDOWN()","signatureHash4":"0xf7185cfb","signatureHash32":"0xf7185cfb59e8e68d22ac24a83b90bff22416d61b40595ebabf526bb652e1a179"},{"signature":"BOUNTY()","signatureHash4":"0xd081f2b8","signatureHash32":"0xd081f2b8df23c0fc19e9d0d69c6b21a74f041c9a199d2bc28ea9cfdb0dbd93d6"},{"signature":"busy()","signatureHash4":"0x30641b5a","signatureHash32":"0x30641b5a1bedd8bbe4637f99080bf8da30e1fac604f9fc46eb9045aa192ef71c"},{"signature":"chapterCount()","signatureHash4":"0xa9d1225c","signatureHash32":"0xa9d1225cfc977d080f5d69729fe586e82605ccaf71bb7a165c64b1009dfbab2f"},{"signature":"chapter(uint256)","signatureHash4":"0xa3ef2041","signatureHash32":"0xa3ef2041b12a848f4fb7ba92d78d10087b685f2c27124341c6400197f344bcdb"},{"signature":"commission()","signatureHash4":"0xe1489191","signatureHash32":"0xe1489191b748af172b43608295c61c983f48ab15bc2d911f712425b4b4401261"},{"signature":"cooldownUntil()","signatureHash4":"0x995b9675","signatureHash32":"0x995b9675521bf3420993eebcabdc1f704557403f92dabe1ede7ae5255f719d6f"},{"signature":"donate(uint256)","signatureHash4":"0xf14faf6f","signatureHash32":"0xf14faf6fa9eddb92dc5c4dbd17341d997df8e8859a372c361ea43a6dc664f6ea"},{"signature":"failures()","signatureHash4":"0xafb67c75","signatureHash32":"0xafb67c75319043a9f50c2b2be3996078130f7346fd0292b9b3e9fb4fc2f02845"},{"signature":"failureStreak()","signatureHash4":"0xd70e92f9","signatureHash32":"0xd70e92f970a2ec0a5ac6ba09593a450a31db5b696ab7e286b868e66188d9718c"},{"signature":"imd()","signatureHash4":"0xdd02e154","signatureHash32":"0xdd02e1548631ab48f34bfaf59e12aa5a6f95c4dfd2405bad2fe8ac0cfe5382e2"},{"signature":"IMD_TOKEN()","signatureHash4":"0x3465e045","signatureHash32":"0x3465e045fbe485c3a2903d82f2b19b6c58a9fd3b6d009c2863973e149fd5a4db"},{"signature":"inscribe(uint256,string)","signatureHash4":"0xed619c20","signatureHash32":"0xed619c207a4bf31bf7833e509bae715f472aa332288152c8e18a613087e1fa3c"},{"signature":"intake()","signatureHash4":"0x86d1508f","signatureHash32":"0x86d1508f859c9512efb8b41bf3dca1386d7899f9aa40bf2ff9587aef720a11d4"},{"signature":"INTAKE_V2()","signatureHash4":"0x355932fc","signatureHash32":"0x355932fc3ec1840ea7a02e8e4daee7e8631cedc8914a6027288afd93ce9e0ced"},{"signature":"isInscribed(uint256)","signatureHash4":"0x4d91aaaa","signatureHash32":"0x4d91aaaa83e60412f1ee4c660ef46d30663c1f98ea5320640903e55b5f34db3d"},{"signature":"lastFailureReason()","signatureHash4":"0x09584243","signatureHash32":"0x095842433295d4840853afe1a6c1ae22f59275c92ab996608b2db01f6bd680ae"},{"signature":"MAX_QUOTED_URI()","signatureHash4":"0x8ba2b0bc","signatureHash32":"0x8ba2b0bc552f45f139c1d75c98607fbe23a0129a91b1c54758f55bd0664de8bf"},{"signature":"MAX_STREAK()","signatureHash4":"0x3ea2b220","signatureHash32":"0x3ea2b22038e22402152acd7095a89c7888045fa86b45430833ae99e41c86e4d3"},{"signature":"onFailure(bytes32,uint8,bytes32,uint16,uint16,bytes)","signatureHash4":"0x5a0df71e","signatureHash32":"0x5a0df71e5fa2be7cdd3217675ba1a31b623fcb1e0968e686f3930621479f6c26"},{"signature":"onResult(bytes32,bytes32,string)","signatureHash4":"0x4374622e","signatureHash32":"0x4374622edaa810061c96b4451a13d19c080b773a608e6c01dd7a9fb7feda5658"},{"signature":"pendingCommissioner()","signatureHash4":"0xd7ec3c31","signatureHash32":"0xd7ec3c319c1bc22a55274f2edc01f7a48cd9d26f89e6ce385c24598905894f69"},{"signature":"pendingRequest()","signatureHash4":"0xe2b0a15d","signatureHash32":"0xe2b0a15daeaa69ce3d6dca31a4820b967f7b79260fda4a7af259a3e4227772a7"},{"signature":"pendingSince()","signatureHash4":"0x7d979a4f","signatureHash32":"0x7d979a4f31e8f8dc78d8d5c9177eecc555926100bbc1e56dc14090190c567f34"},{"signature":"previewBody()","signatureHash4":"0x482e27e3","signatureHash32":"0x482e27e3d09cbd7d973517d475d8d5f90bdc83bd6668c427eb2ae3141ccb000e"},{"signature":"PRICE()","signatureHash4":"0x8d859f3e","signatureHash32":"0x8d859f3ea28e013bc9a0daf96db5a16c9149b32c0d3b00329fc65af1e1843d7c"},{"signature":"reset()","signatureHash4":"0xd826f88f","signatureHash32":"0xd826f88fd8cb118d1c8236201324934dcee485e96d5700dfe9523972bd3337bb"},{"signature":"setIntake(address)","signatureHash4":"0xca86ad48","signatureHash32":"0xca86ad4835a6a00f9bd0c089027cb0085e309c28f04700eaea33b47ef737c4bb"},{"signature":"STEWARD()","signatureHash4":"0x1b8f1190","signatureHash32":"0x1b8f1190b9ad921ee751ab3cea70e9826aa9133ce8958fe962df29e72323ac68"},{"signature":"TIMEOUT()","signatureHash4":"0xf56f48f2","signatureHash32":"0xf56f48f26466ef09bbf5118c14b08f508e8ab6a671061e5f7cff352f311c3344"}],"event":[{"signature":"BountyPaid(address,uint256)","signatureHash4":"0x31dd4c1b","signatureHash32":"0x31dd4c1bc893bd53887b59c36c1a1b9f60960fa64c231ad0cd3603a1914bda35"},{"signature":"BountySkipped(address,uint256)","signatureHash4":"0xa2a7d42a","signatureHash32":"0xa2a7d42ae3d2cec65fb075065941a3514dc66bdb3dc6e6ed5b9bc735af70bf97"},{"signature":"Chapter(uint256,bytes32,bytes32,string)","signatureHash4":"0x311eb052","signatureHash32":"0x311eb05261d8fd951da54356051732653a57b998169c2aa52b4b642568e770d2"},{"signature":"Commissioned(uint256,bytes32,address,bytes)","signatureHash4":"0x4a2e2133","signatureHash32":"0x4a2e213323138d54e7e3eb4ec4ea80921d4f73fa934809c448015d6c5831e873"},{"signature":"Donated(address,uint256)","signatureHash4":"0x2a01595c","signatureHash32":"0x2a01595cddf097c90216094025db714da3f4e5bd8877b56ba86a24ecead8e543"},{"signature":"Failed(bytes32,uint8,bytes32)","signatureHash4":"0xdca44487","signatureHash32":"0xdca444875e25e6b10b66fe4caae1df445befe46ea6caa999cde36134ae5f0bdb"},{"signature":"Inscribed(uint256,string)","signatureHash4":"0x38133f0f","signatureHash32":"0x38133f0ff34565f1f897b1d746b8a3fff3c4a2621d25fda901e0d5393e153eac"},{"signature":"IntakeChanged(address,address)","signatureHash4":"0xc367a521","signatureHash32":"0xc367a521275454bbd514655e752711d7c9edb63d09354ba7e0cdd231c47cdc45"},{"signature":"TimedOut(bytes32)","signatureHash4":"0x49aeaa48","signatureHash32":"0x49aeaa48f2cccf7596e2541f2abcdfa8c4aaa4f12da088ee9d0bd6c14adfedb2"}],"error":[{"signature":"AlreadyInscribed(uint256)","signatureHash4":"0xc900ea5f","signatureHash32":"0xc900ea5f33d0b5d488f1e9566aaea63131cd99e24faf26dfe3f361593b032a7b"},{"signature":"Busy()","signatureHash4":"0x3ef33375","signatureHash32":"0x3ef33375ea0bd63025aca7ce3899d142c262ce79a5cd38d8059bfb5e4994d832"},{"signature":"CoolingDown(uint256)","signatureHash4":"0xffada05d","signatureHash32":"0xffada05d513d9155930c777650d7aa0f7d3e69360bb2dfd2188dda372ee00515"},{"signature":"InsufficientBalance(uint256,uint256)","signatureHash4":"0xcf479181","signatureHash32":"0xcf4791818fba6e019216eb4864093b4947f674afada5d305e57d598b641dad1d"},{"signature":"IntakeCannotCommission()","signatureHash4":"0x5a587fc6","signatureHash32":"0x5a587fc624b9b9267e0b79c3c3adbfa801561eae018ac1c91c191e414b04a493"},{"signature":"NoEther()","signatureHash4":"0xa4675adf","signatureHash32":"0xa4675adfeb1976301a674b1affc003fa5c1b93354c821ea20f53938387158682"},{"signature":"NoSuchChapter(uint256)","signatureHash4":"0xdd922697","signatureHash32":"0xdd922697f02ed47550d93008242d9169754f0906d5737060b22afacf85a816eb"},{"signature":"NotBusy()","signatureHash4":"0x7b78df93","signatureHash32":"0x7b78df937fb9ba0c3a26dfae5936c9d243d289612f5da29b4d5ba8686fbef0da"},{"signature":"NotIntake()","signatureHash4":"0x81e1f663","signatureHash32":"0x81e1f663fbb1420973979f931eedd019e10dd300965cb935cd13e393f4ddd21f"},{"signature":"NotSteward()","signatureHash4":"0x7e802d70","signatureHash32":"0x7e802d70465bdee0e4006e55e9591248f59b9de170199fd36c0fd187ca35eda6"},{"signature":"PreviousNotInscribed(uint256)","signatureHash4":"0x5cf8f801","signatureHash32":"0x5cf8f801f61114433678b83b2142ab82dc18deb91ccf2ae55f5b4fd4af889941"},{"signature":"ReentrancyGuardReentrantCall()","signatureHash4":"0x3ee5aeb5","signatureHash32":"0x3ee5aeb571de7fc460830b4d0017439a1ca56fb0bc39062227ade4fe4a24c1ca"},{"signature":"SafeERC20FailedOperation(address)","signatureHash4":"0x5274afe7","signatureHash32":"0x5274afe73c98b4749fc91ffae6b7b574e7842cb2144a159e9377a5f20b32edf9"},{"signature":"StringsInsufficientHexLength(uint256,uint256)","signatureHash4":"0xe22e27eb","signatureHash32":"0xe22e27eb9593f9947dc34771120a3349dd201c662753f0b60502fc1d8e422233"},{"signature":"TooEarly(uint256)","signatureHash4":"0x2a35a324","signatureHash32":"0x2a35a3246d5070e2b118858c24c2c4d23eaebe645b92ab746b92dd600c35a9d7"},{"signature":"UnknownRequest(bytes32)","signatureHash4":"0x7bbe34c9","signatureHash32":"0x7bbe34c9053d934edfcee0212dafa8d890e3f195bd69a9d5952188773cb7ad36"},{"signature":"UriMismatch(uint256)","signatureHash4":"0x4219cf9f","signatureHash32":"0x4219cf9f8bbaabbec26d0652ea7cba7c833e25e516476b16eb74be68f74588db"},{"signature":"ZeroAmount()","signatureHash4":"0x1f2a2005","signatureHash32":"0x1f2a2005cb66a8e145327e8814e243a0996aec9bfe1e15a495778b1236dbd485"},{"signature":"ZeroRequestId()","signatureHash4":"0xe1bfd36c","signatureHash32":"0xe1bfd36c59896061439fe854641ec2bf156bffa6a9efa021147d586d407ba222"}]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"match","chainId":"4663","address":"0xfc65446d2c8A7eE6B173D62dB710B76BD8BC978A"}