require=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;sd;d++)h.push(o(r.slice(0,c))),r=r.slice(c);s.push(h)}else a("string")(u.outputs[t].type)?(p=p.slice(c),s.push(o(r.slice(0,c))),r=r.slice(c)):(s.push(o(r.slice(0,c))),r=r.slice(c))}),s}},E=function(e){var t=e.indexOf("(");return-1!==t?e.substr(0,t):e},F=function(e){var t=e.indexOf("(");return-1!==t?e.substr(t+1,e.length-1-(t+1)):""},M=function(e){var t={};return e.forEach(function(r){var n=E(r.name),i=F(r.name),o=function(){var t=Array.prototype.slice.call(arguments);return m(e,r.name,t)};void 0===t[n]&&(t[n]=o),t[n][i]=o}),t},T=function(e){var t={};return e.forEach(function(r){var n=E(r.name),i=F(r.name),o=function(t){return q(e,r.name,t)};void 0===t[n]&&(t[n]=o),t[n][i]=o}),t},D=function(e,t){return r.sha3(r.fromAscii(t))};t.exports={inputParser:M,outputParser:T,methodSignature:D,methodDisplayName:E,methodTypeName:F}},{"./web3":9}],2:[function(e,t){var r=e("./web3"),n=function(e){if(!r.haveProvider()){if(this.sendQueue=[],this.onmessageQueue=[],navigator.qt)return void(this.provider=new r.providers.QtProvider);e=e||{};var t={httprpc:e.httprpc||"http://localhost:8080",websockets:e.websockets||"ws://localhost:40404/eth"},n=this,i=function(e){o.close(),e?n.provider=new r.providers.WebSocketProvider(t.websockets):(n.provider=new r.providers.HttpRpcProvider(t.httprpc),n.poll=n.provider.poll.bind(n.provider)),n.sendQueue.forEach(function(e){n.provider.send(e)}),n.onmessageQueue.forEach(function(e){n.provider.onmessage=e})},o=new WebSocket(t.websockets);o.onopen=function(){i(!0)},o.onerror=function(){i(!1)}}};n.prototype.send=function(e){return this.provider?void this.provider.send(e):void this.sendQueue.push(e)},Object.defineProperty(n.prototype,"onmessage",{set:function(e){return this.provider?void(this.provider.onmessage=e):void this.onmessageQueue.push(e)}}),t.exports=n},{"./web3":9}],3:[function(e,t){var r=e("./web3"),n=e("./abi"),i=4,o=function(e,t){var o=n.inputParser(t),s=n.outputParser(t),a={};return t.forEach(function(u){var f=n.methodDisplayName(u.name),c=n.methodTypeName(u.name),l=function(){var a=Array.prototype.slice.call(arguments),l=o[f][c].apply(null,a),p=function(e){return s[f][c](e)};return{call:function(o){return o=o||{},o.to=e,n.methodSignature(t,u.name).then(function(e){return o.data=e.slice(0,2+2*i)+l,r.eth.call(o).then(p)})},transact:function(o){return o=o||{},o.to=e,n.methodSignature(t,u.name).then(function(n){return o.data=n.slice(0,2+2*i)+l,r._currentContractAbi=t,r._currentContractAddress=e,r.eth.transact(o).then(p)})}}};void 0===a[f]&&(a[f]=l),a[f][c]=l}),a};t.exports=o},{"./abi":1,"./web3":9}],4:[function(e,t){var r=e("./web3"),n=function(e,t){this.impl=t,this.callbacks=[];var n=this;this.promise=t.newFilter(e),this.promise.then(function(e){n.id=e,r.on(t.changed,e,n.trigger.bind(n)),r.provider.startPolling({call:t.changed,args:[e]},e)})};n.prototype.arrived=function(e){this.changed(e)},n.prototype.changed=function(e){var t=this;this.promise.then(function(){t.callbacks.push(e)})},n.prototype.trigger=function(e){for(var t=0;tr;r+=2){var i=parseInt(e.substr(r,2),16);if(0===i)break;t+=String.fromCharCode(i)}return t},fromAscii:function(e,t){t=void 0===t?0:t;for(var r=this.toHex(e);r.length<2*t;)r+="00";return"0x"+r},toDecimal:function(e){return p(e.substring(2))},fromDecimal:function(e){return"0x"+h(e)},toEth:function(e){for(var t="string"==typeof e?0===e.indexOf("0x")?parseInt(e.substr(2),16):parseInt(e):e,r=0,n=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];t>3e3&&r