0x608060405234801561001057600080fd5b5061295a806100206000396000f3fe60806040526004361061014f5760003560e01c80639570bf7e116100b6578063c4d66de81161006f578063c4d66de81461037d578063c9dc160c1461039d578063dd677db4146103dd578063f2fde38b146103fd578063f3dced3c1461041d578063f4c635661461043d57600080fd5b80639570bf7e146102c6578063978bbdb9146102d9578063aad0ae5b146102fd578063affca9321461031d578063b3ab15fb1461033d578063b3f006741461035d57600080fd5b8063570ca73511610108578063570ca7351461022d5780636ffb26b21461024d578063715018a6146102605780637c08b9641461027557806387820b70146102955780638da5cb5b146102a857600080fd5b8063016cba5f1461015b578063123119cd1461017057806318fbae63146101ad5780633fc8cef3146101cd57806341259ad0146101ed57806352efef201461020d57600080fd5b3661015657005b600080fd5b61016e61016936600461232c565b61046d565b005b34801561017c57600080fd5b50609e54610190906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101b957600080fd5b5061016e6101c8366004612225565b610568565b3480156101d957600080fd5b50609754610190906001600160a01b031681565b3480156101f957600080fd5b5061016e610208366004612276565b61063c565b34801561021957600080fd5b5061016e610228366004612276565b61073d565b34801561023957600080fd5b50609a54610190906001600160a01b031681565b61016e61025b366004612395565b610837565b34801561026c57600080fd5b5061016e61084c565b34801561028157600080fd5b5061016e610290366004612208565b610860565b61016e6102a336600461242a565b6108ff565b3480156102b457600080fd5b506033546001600160a01b0316610190565b61016e6102d436600461248e565b610ae2565b3480156102e557600080fd5b506102ef60985481565b6040519081526020016101a4565b34801561030957600080fd5b5061016e610318366004612208565b610afc565b34801561032957600080fd5b5061016e610338366004612519565b610b94565b34801561034957600080fd5b5061016e610358366004612208565b610c0d565b34801561036957600080fd5b50609954610190906001600160a01b031681565b34801561038957600080fd5b5061016e610398366004612208565b610ca5565b3480156103a957600080fd5b506103cd6103b8366004612208565b609b6020526000908152604090205460ff1681565b60405190151581526020016101a4565b3480156103e957600080fd5b5061016e6103f83660046122cd565b610dda565b34801561040957600080fd5b5061016e610418366004612208565b610e42565b34801561042957600080fd5b50609d54610190906001600160a01b031681565b34801561044957600080fd5b506103cd610458366004612208565b609c6020526000908152604090205460ff1681565b600260655414156104c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002606555609e80546001600160a01b031916331790556104ee6104e98480612762565b610ebb565b60006105056105006020860186612718565b610f52565b609d5490915061052190849084906001600160a01b0316611052565b6105376105316020860186612718565b8361116b565b5050609e80546001600160a01b03191673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee17905550506001606555565b610570611233565b6001600160a01b03841661058e5761058983838361128d565b6105f9565b6040516341f4a95960e01b81526001600160a01b0384811660048301528381166024830152604482018390528516906341f4a95990606401600060405180830381600087803b1580156105e057600080fd5b505af11580156105f4573d6000803e3d6000fd5b505050505b7fa2c4ea0e129ee25f4b264de795cda1e8ba85b74318ca117aba1347290dd7f3f98484848460405161062e9493929190612670565b60405180910390a150505050565b609a546001600160a01b031633148061065f57506033546001600160a01b031633145b604051806040016040528060028152602001614f4f60f01b815250906106985760405162461bcd60e51b81526004016104bc919061269a565b506000805b83811015610736578484828181106106b7576106b76128d5565b90506020020160208101906106cc9190612208565b6001600160a01b0381166000818152609b6020908152604091829020805460ff19168815159081179091558251938452908301529193507faf0f0bdd91c0ec878665125ca824ce572f879aae8e41de64b16213beb3264553910160405180910390a160010161069d565b5050505050565b609a546001600160a01b031633148061076057506033546001600160a01b031633145b604051806040016040528060028152602001614f4f60f01b815250906107995760405162461bcd60e51b81526004016104bc919061269a565b506000805b83811015610736578484828181106107b8576107b86128d5565b90506020020160208101906107cd9190612208565b6001600160a01b0381166000818152609c6020908152604091829020805460ff19168815159081179091558251938452908301529193507fe5f9aa8bea76498598643cfee7b6c88eb7974d3fb12300538699c2fd57d323b6910160405180910390a160010161079e565b6108418282611350565b61073685858561046d565b610854611233565b61085e60006113cf565b565b610868611233565b60408051808201909152600381526216905160ea1b60208201526001600160a01b0382166108a95760405162461bcd60e51b81526004016104bc919061269a565b50609980546001600160a01b0319166001600160a01b0383169081179091556040519081527fffb40bfdfd246e95f543d08d9713c339f1d90fa9265e39b4f562f9011d7c919f906020015b60405180910390a150565b600260655414156109525760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104bc565b60026065556109646104e98380612762565b60006109766105006020850185612718565b9050609c60006109896020850185612208565b6001600160a01b0316815260208101919091526040016000205460ff1680156109d25750609d546001600160a01b03166109c66020840184612208565b6001600160a01b031614155b604051806040016040528060038152602001624f464160e81b81525090610a0c5760405162461bcd60e51b81526004016104bc919061269a565b506000610a1c6020840184612208565b6001600160a01b0316610a3260208501856127ab565b604051610a4092919061256f565b6000604051808303816000865af19150503d8060008114610a7d576040519150601f19603f3d011682016040523d82523d6000602084013e610a82565b606091505b50509050806040518060400160405280600281526020016121a360f11b81525090610ac05760405162461bcd60e51b81526004016104bc919061269a565b50610ad7610ad16020860186612718565b8461116b565b505060016065555050565b610aec8282611350565b610af684846108ff565b50505050565b610b04611233565b60408051808201909152600381526216905160ea1b60208201526001600160a01b038216610b455760405162461bcd60e51b81526004016104bc919061269a565b50609d80546001600160a01b0319166001600160a01b0383169081179091556040519081527f73791a45bc7d6f87a2551ecdfe537bc9bda9ed8590c522e04891787818f75db4906020016108f4565b610b9c611233565b60408051808201909152600281526113d360f21b60208201526064821115610bd75760405162461bcd60e51b81526004016104bc919061269a565b5060988190556040518181527f6717373928cccf59cc9912055cfa8db86e7085b95c94c15862b121114aa333be906020016108f4565b610c15611233565b60408051808201909152600381526216905160ea1b60208201526001600160a01b038216610c565760405162461bcd60e51b81526004016104bc919061269a565b50609a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fdbebfba65bd6398fb722063efc10c99f624f9cd8ba657201056af918a676d5ee906020016108f4565b600054610100900460ff1615808015610cc55750600054600160ff909116105b80610cdf5750303b158015610cdf575060005460ff166001145b610d425760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104bc565b6000805460ff191660011790558015610d65576000805461ff0019166101001790555b610d6d611421565b610d75611450565b609780546001600160a01b0319166001600160a01b0384161790558015610dd6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b336000908152609c602090815260409182902054825180840190935260038352624f464160e81b9183019190915260ff16610e285760405162461bcd60e51b81526004016104bc919061269a565b50609d54610dd690839083906001600160a01b0316611052565b610e4a611233565b6001600160a01b038116610eaf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bc565b610eb8816113cf565b50565b6098546099548291906001600160a01b03166000805b84811015610f0f57610efb878783818110610eee57610eee6128d5565b905060600201858561147f565b610f059083612808565b9150600101610ed1565b50604080518082019091526002815261514d60f01b6020820152348214610f495760405162461bcd60e51b81526004016104bc919061269a565b50505050505050565b6060818067ffffffffffffffff811115610f6e57610f6e6128eb565b604051908082528060200260200182016040528015610fb357816020015b6040805180820190915260008082526020820152815260200190600190039081610f8c5790505b5091506000805b8281101561104957858582818110610fd457610fd46128d5565b610fea9260206040909202019081019150612208565b915081848281518110610fff57610fff6128d5565b60209081029190910101516001600160a01b03909116905261102182336117d0565b848281518110611033576110336128d5565b6020908102919091018101510152600101610fba565b50505092915050565b813660006060815b8481101561116157878782818110611074576110746128d5565b905060200281019061108691906127f2565b935061109e6110986020860186612208565b87611873565b6110ab6020850185612208565b6001600160a01b03166110c160208601866127ab565b6040516110cf92919061256f565b6000604051808303816000865af19150503d806000811461110c576040519150601f19603f3d011682016040523d82523d6000602084013e611111565b606091505b5090935091508261115957611140826040518060400160405280600281526020016121a360f11b8152506118e6565b60405162461bcd60e51b81526004016104bc919061269a565b60010161105a565b5050505050505050565b6000805b8381101561073657828181518110611189576111896128d5565b6020026020010151602001516111c68686848181106111aa576111aa6128d5565b6111c09260206040909202019081019150612208565b336117d0565b6111d09190612861565b91508484828181106111e4576111e46128d5565b90506040020160200135821015604051806040016040528060028152602001614e4560f01b8152509061122a5760405162461bcd60e51b81526004016104bc919061269a565b5060010161116f565b6033546001600160a01b0316331461085e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104bc565b801561134b576001600160a01b038316611337576000826001600160a01b03168261138890604051600060405180830381858888f193505050503d80600081146112f3576040519150601f19603f3d011682016040523d82523d6000602084013e6112f8565b606091505b5050905080604051806040016040528060038152602001622a272360e91b815250906107365760405162461bcd60e51b81526004016104bc919061269a565b61134b6001600160a01b0384168383611a49565b505050565b60005b8181101561134b576113c7838383818110611370576113706128d5565b905060200281019061138291906127f2565b611390906020810190612208565b8484848181106113a2576113a26128d5565b90506020028101906113b491906127f2565b6113c29060208101906127ab565b611a9b565b600101611353565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166114485760405162461bcd60e51b81526004016104bc906126cd565b61085e611bc1565b600054610100900460ff166114775760405162461bcd60e51b81526004016104bc906126cd565b61085e611bf1565b60008061148f6020860186612208565b9050602085013560006114a86060880160408901612208565b905060008211604051806040016040528060038152602001625a414d60e81b815250906114e85760405162461bcd60e51b81526004016104bc919061269a565b50604080513381526001600160a01b03851660208201529081018390527fd0ed88a3f042c6bbb1e3ea406079b5f2b4b198afccaa535d837f4c63abbc4de69060600160405180910390a16001600160a01b038316611562578193506115506000838888611c1f565b915061155d83828461128d565b6117c6565b6001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561161b578193506115976000838888611c1f565b9150609760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156115e957600080fd5b505af11580156115fd573d6000803e3d6000fd5b505060975461155d93506001600160a01b031691508390508461128d565b6001600160a01b0383166001141561173957609754611645906001600160a01b0316838888611c1f565b609d5460975460405163052f523360e11b81529294506001600160a01b0391821692630a5ea466926116959216903390739bee797cab369eaa28fc4943471b40dd1062ce5a908890600401612670565b600060405180830381600087803b1580156116af57600080fd5b505af11580156116c3573d6000803e3d6000fd5b50506040516351cff8d960e01b81526001600160a01b0384166004820152739bee797cab369eaa28fc4943471b40dd1062ce5a92506351cff8d99150602401600060405180830381600087803b15801561171c57600080fd5b505af1158015611730573d6000803e3d6000fd5b505050506117c6565b6000198214156117505761174d83336117d0565b91505b61175c83838888611c1f565b609d5460405163052f523360e11b81529193506001600160a01b031690630a5ea46690611793908690339086908890600401612670565b600060405180830381600087803b1580156117ad57600080fd5b505af11580156117c1573d6000803e3d6000fd5b505050505b5050509392505050565b60006001600160a01b0383166117f157506001600160a01b0381163161186d565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a082319060240160206040518083038186803b15801561183257600080fd5b505afa158015611846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061186a9190612532565b90505b92915050565b6001600160a01b0382166000908152609b602052604090205460ff1680156118ad5750806001600160a01b0316826001600160a01b031614155b604051806040016040528060028152602001614f4160f01b8152509061134b5760405162461bcd60e51b81526004016104bc919061269a565b60606004835110611a175760208301516001600160e01b0319811662461bcd60e51b14801561191757506044845110155b156119b757602484810151808601820180519192909190611939908490612808565b6119439190612808565b8651101561198b5760405162461bcd60e51b815260206004820152601560248201527424b73b30b634b2103932bb32b93a103932b0b9b7b760591b60448201526064016104bc565b848160405160200161199e92919061263b565b604051602081830303815290604052935050505061186d565b6001600160e01b03198116634e487b7160e01b1480156119d8575083516024145b15611a15576024840151836119ec82611d3f565b6040516020016119fd92919061259b565b6040516020818303038152906040529250505061186d565b505b81611a2184611d67565b604051602001611a329291906125ea565b604051602081830303815290604052905092915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261134b908490611f4f565b6000606060e0831415611b36576040516001600160a01b03861690611acf9063d505accf60e01b908790879060200161254b565b60408051601f1981840301815290829052611ae99161257f565b6000604051808303816000865af19150503d8060008114611b26576040519150601f19603f3d011682016040523d82523d6000602084013e611b2b565b606091505b509092509050611b98565b610100831415611b67576040516001600160a01b03861690611acf906323f2ebc360e21b908790879060200161254b565b6040805180820182526003815262504c5760e81b6020820152905162461bcd60e51b81526104bc919060040161269a565b8161073657611140816040518060400160405280600281526020016121a360f11b8152506118e6565b600054610100900460ff16611be85760405162461bcd60e51b81526004016104bc906126cd565b61085e336113cf565b600054610100900460ff16611c185760405162461bcd60e51b81526004016104bc906126cd565b6001606555565b826001600160a01b03821615801590611c385750600083115b15611d37576000612710611c4c8587612842565b611c569190612820565b90508015611d35576001600160a01b038616611c7c57611c7786848361128d565b611ce5565b609d5460405163052f523360e11b81526001600160a01b0390911690630a5ea46690611cb2908990339088908790600401612670565b600060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050505b611cef8183612861565b604080516001600160a01b0389168152602081018490529193507f5f7785fb411bec0c00abeca20685087c084e076aaf5e6be245efa7124cf79fe0910160405180910390a15b505b949350505050565b606061186d82604051602001611d5791815260200190565b6040516020818303038152906040525b80516060906f181899199a1a9b1b9c1cb0b131b232b360811b90600090611d8f906002612842565b611d9a906002612808565b67ffffffffffffffff811115611db257611db26128eb565b6040519080825280601f01601f191660200182016040528015611ddc576020820181803683370190505b509050600360fc1b81600081518110611df757611df76128d5565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e2657611e266128d5565b60200101906001600160f81b031916908160001a90535060005b8451811015611f4757826004868381518110611e5e57611e5e6128d5565b01602001516001600160f81b031916901c60f81c60108110611e8257611e826128d5565b1a60f81b82611e92836002612842565b611e9d906002612808565b81518110611ead57611ead6128d5565b60200101906001600160f81b031916908160001a90535082858281518110611ed757611ed76128d5565b60209101015160f81c600f1660108110611ef357611ef36128d5565b1a60f81b82611f03836002612842565b611f0e906003612808565b81518110611f1e57611f1e6128d5565b60200101906001600160f81b031916908160001a90535080611f3f816128a4565b915050611e40565b509392505050565b6000611fa4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166120219092919063ffffffff16565b80519091501561134b5780806020019051810190611fc2919061230f565b61134b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104bc565b6060612030848460008561203a565b90505b9392505050565b60608247101561209b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104bc565b6001600160a01b0385163b6120f25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104bc565b600080866001600160a01b0316858760405161210e919061257f565b60006040518083038185875af1925050503d806000811461214b576040519150601f19603f3d011682016040523d82523d6000602084013e612150565b606091505b509150915061216082828661216b565b979650505050505050565b6060831561217a575081612033565b82511561218a5782518084602001fd5b8160405162461bcd60e51b81526004016104bc919061269a565b60008083601f8401126121b657600080fd5b50813567ffffffffffffffff8111156121ce57600080fd5b6020830191508360208260051b85010111156121e957600080fd5b9250929050565b60006040828403121561220257600080fd5b50919050565b60006020828403121561221a57600080fd5b813561203381612901565b6000806000806080858703121561223b57600080fd5b843561224681612901565b9350602085013561225681612901565b9250604085013561226681612901565b9396929550929360600135925050565b60008060006040848603121561228b57600080fd5b833567ffffffffffffffff8111156122a257600080fd5b6122ae868287016121a4565b90945092505060208401356122c281612916565b809150509250925092565b600080602083850312156122e057600080fd5b823567ffffffffffffffff8111156122f757600080fd5b612303858286016121a4565b90969095509350505050565b60006020828403121561232157600080fd5b815161203381612916565b60008060006040848603121561234157600080fd5b833567ffffffffffffffff8082111561235957600080fd5b612365878388016121f0565b9450602086013591508082111561237b57600080fd5b50612388868287016121a4565b9497909650939450505050565b6000806000806000606086880312156123ad57600080fd5b853567ffffffffffffffff808211156123c557600080fd5b6123d189838a016121f0565b965060208801359150808211156123e757600080fd5b6123f389838a016121a4565b9096509450604088013591508082111561240c57600080fd5b50612419888289016121a4565b969995985093965092949392505050565b6000806040838503121561243d57600080fd5b823567ffffffffffffffff8082111561245557600080fd5b612461868387016121f0565b9350602085013591508082111561247757600080fd5b50612484858286016121f0565b9150509250929050565b600080600080606085870312156124a457600080fd5b843567ffffffffffffffff808211156124bc57600080fd5b6124c8888389016121f0565b955060208701359150808211156124de57600080fd5b6124ea888389016121f0565b9450604087013591508082111561250057600080fd5b5061250d878288016121a4565b95989497509550505050565b60006020828403121561252b57600080fd5b5035919050565b60006020828403121561254457600080fd5b5051919050565b6001600160e01b031984168152818360048301376000910160040190815292915050565b8183823760009101908152919050565b60008251612591818460208701612878565b9190910192915050565b600083516125ad818460208801612878565b650a0c2dcd2c6560d31b90830190815283516125d0816006840160208801612878565b602960f81b60069290910191820152600701949350505050565b600083516125fc818460208801612878565b670aadcd6dcdeeedc560c31b9083019081528351612621816008840160208801612878565b602960f81b60089290910191820152600901949350505050565b6000835161264d818460208801612878565b6508ae4e4dee4560d31b90830190815283516125d0816006840160208801612878565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b60208152600082518060208401526126b9816040850160208701612878565b601f01601f19169190910160400192915050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000808335601e1984360301811261272f57600080fd5b83018035915067ffffffffffffffff82111561274a57600080fd5b6020019150600681901b36038213156121e957600080fd5b6000808335601e1984360301811261277957600080fd5b83018035915067ffffffffffffffff82111561279457600080fd5b60200191506060810236038213156121e957600080fd5b6000808335601e198436030181126127c257600080fd5b83018035915067ffffffffffffffff8211156127dd57600080fd5b6020019150368190038213156121e957600080fd5b60008235603e1983360301811261259157600080fd5b6000821982111561281b5761281b6128bf565b500190565b60008261283d57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561285c5761285c6128bf565b500290565b600082821015612873576128736128bf565b500390565b60005b8381101561289357818101518382015260200161287b565b83811115610af65750506000910152565b60006000198214156128b8576128b86128bf565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610eb857600080fd5b8015158114610eb857600080fdfea2646970667358221220515db2d3de63aba09a836522544854ca7856fbbc40e31c1adf80e90b67c8fdc764736f6c63430008060033