text: (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+F/3":function(e,t,n){var r=n("FNdZ");"undefined"!=typeof window&&window.XMLHttpRequest?XMLHttpRequest=window.XMLHttpRequest:XMLHttpRequest=n("pIU5").XMLHttpRequest;var i=n("qvd7"),o=function(e,t){this.host=e||"http://localhost:8545",this.timeout=t||0};o.prototype.prepareRequest=function(e){var t;return e?(t=new i).timeout=this.timeout:t=new XMLHttpRequest,t.open("POST",this.host,e),t.setRequestHeader("Content-Type","application/json"),t},o.prototype.send=function(e){var t=this.prepareRequest(!1);try{t.send(JSON.stringify(e))}catch(e){throw r.InvalidConnection(this.host)}var n=t.responseText;try{n=JSON.parse(n)}catch(e){throw r.InvalidResponse(t.responseText)}return n},o.prototype.sendAsync=function(e,t){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var e=n.responseText,i=null;try{e=JSON.parse(e)}catch(e){i=r.InvalidResponse(n.responseText)}t(i,e)}},n.ontimeout=function(){t(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(e))}catch(e){t(r.InvalidConnection(this.host))}},o.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(e){return!1}},e.exports=o},"/0UZ":function(e,t,n){var r=n("Xkrw"),i=n("d35v"),o=n("4m0o"),s=n("zjql"),a=n("t/cl"),u=n("lBWu"),l=function(e,t,n){this._requestManager=e,this._params=t.inputs,this._name=r.transformToFullName(t),this._address=n,this._anonymous=t.anonymous};l.prototype.types=function(e){return this._params.filter(function(t){return t.indexed===e}).map(function(e){return e.type})},l.prototype.displayName=function(){return r.extractDisplayName(this._name)},l.prototype.typeName=function(){return r.extractTypeName(this._name)},l.prototype.signature=function(){return s(this._name)},l.prototype.encode=function(e,t){e=e||{},t=t||{};var n={};["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(e){n[e]=o.inputBlockNumberFormatter(t[e])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var s=this._params.filter(function(e){return!0===e.indexed}).map(function(t){var n=e[t.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(e){return"0x"+i.encodeParam(t.type,e)}):"0x"+i.encodeParam(t.type,n)});return n.topics=n.topics.concat(s),n},l.prototype.decode=function(e){e.data=e.data||"",e.topics=e.topics||[];var t=(this._anonymous?e.topics:e.topics.slice(1)).map(function(e){return e.slice(2)}).join(""),n=i.decodeParams(this.types(!0),t),r=e.data.slice(2),s=i.decodeParams(this.types(!1),r),a=o.outputLogFormatter(e);return a.event=this.displayName(),a.address=e.address,a.args=this._params.reduce(function(e,t){return e[t.name]=t.indexed?n.shift():s.shift(),e},{}),delete a.data,delete a.topics,a},l.prototype.execute=function(e,t,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(t=null),1===arguments.length&&(t=null,e={}));var i=this.encode(e,t),o=this.decode.bind(this);return new a(i,"eth",this._requestManager,u.eth(),o,n)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this),n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=this.execute.bind(this,e)},e.exports=l},"/8HT":function(e,t,n){var r=n("ioaB"),i=n("q4b3"),o=n("fDiS"),s=n("J1WT");e.exports=function(e){var t=function(t){var n;t.property?(e[t.property]||(e[t.property]={}),n=e[t.property]):n=e,t.methods&&t.methods.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)}),t.properties&&t.properties.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)})};return t.formatters=r,t.utils=i,t.Method=o,t.Property=s,t}},"/bC+":function(e,t,n){var r=n("aIKs"),i=n("rVqu"),o=function(e){this._inputFormatter=e.inputFormatter,this._outputFormatter=e.outputFormatter};o.prototype.isType=function(e){throw"this method should be overrwritten for type "+e},o.prototype.staticPartLength=function(e){return(this.nestedTypes(e)||["[1]"]).map(function(e){return parseInt(e.slice(1,-1),10)||1}).reduce(function(e,t){return e*t},32)},o.prototype.isDynamicArray=function(e){var t=this.nestedTypes(e);return!!t&&!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(e){var t=this.nestedTypes(e);return!!t&&!!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(e){var t=this.nestedTypes(e);return t?parseInt(t[t.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(e){var t=this.nestedTypes(e);return t?e.substr(0,e.length-t[t.length-1].length):e},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(e){return e.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(e,t){var n,i,o,s=this;return this.isDynamicArray(t)?(n=e.length,i=s.nestedName(t),(o=[]).push(r.formatInputInt(n).encode()),e.forEach(function(e){o.push(s.encode(e,i))}),o):this.isStaticArray(t)?function(){for(var n=s.staticArrayLength(t),r=s.nestedName(t),i=[],o=0;o<n;o++)i.push(s.encode(e[o],r));return i}():this._inputFormatter(e,t).encode()},o.prototype.decode=function(e,t,n){var r=this;if(this.isDynamicArray(n))return function(){for(var i=parseInt("0x"+e.substr(2*t,64)),o=parseInt("0x"+e.substr(2*i,64)),s=i+32,a=r.nestedName(n),u=r.staticPartLength(a),l=32*Math.floor((u+31)/32),c=[],f=0;f<o*l;f+=l)c.push(r.decode(e,s+f,a));return c}();if(this.isStaticArray(n))return function(){for(var i=r.staticArrayLength(n),o=t,s=r.nestedName(n),a=r.staticPartLength(s),u=32*Math.floor((a+31)/32),l=[],c=0;c<i*u;c+=u)l.push(r.decode(e,o+c,s));return l}();if(this.isDynamicType(n))return function(){var o=parseInt("0x"+e.substr(2*t,64)),s=parseInt("0x"+e.substr(2*o,64)),a=Math.floor((s+31)/32),u=new i(e.substr(2*o,64*(1+a)),0);return r._outputFormatter(u,n)}();var o=this.staticPartLength(n),s=new i(e.substr(2*t,2*o));return this._outputFormatter(s,n)},e.exports=o},"/bug":function(e,t,n){"use strict";var r=n("DapH"),i=n("9Z5i");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"blockNetworkRead",call:"bzz_blockNetworkRead",params:1,inputFormatter:[null]}),new r({name:"syncEnabled",call:"bzz_syncEnabled",params:1,inputFormatter:[null]}),new r({name:"swapEnabled",call:"bzz_swapEnabled",params:1,inputFormatter:[null]}),new r({name:"download",call:"bzz_download",params:2,inputFormatter:[null,null]}),new r({name:"upload",call:"bzz_upload",params:2,inputFormatter:[null,null]}),new r({name:"retrieve",call:"bzz_retrieve",params:1,inputFormatter:[null]}),new r({name:"store",call:"bzz_store",params:2,inputFormatter:[null,null]}),new r({name:"get",call:"bzz_get",params:1,inputFormatter:[null]}),new r({name:"put",call:"bzz_put",params:2,inputFormatter:[null,null]}),new r({name:"modify",call:"bzz_modify",params:4,inputFormatter:[null,null,null,null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),[new i({name:"hive",getter:"bzz_hive"}),new i({name:"info",getter:"bzz_info"})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})}},"03o9":function(e,t,n){var r=n("zjql"),i=n("/0UZ"),o=n("4m0o"),s=n("Xkrw"),a=n("t/cl"),u=n("lBWu"),l=function(e,t,n){this._requestManager=e,this._json=t,this._address=n};l.prototype.encode=function(e){e=e||{};var t={};return["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(n){t[n]=o.inputBlockNumberFormatter(e[n])}),t.address=this._address,t},l.prototype.decode=function(e){e.data=e.data||"";var t=s.isArray(e.topics)&&s.isString(e.topics[0])?e.topics[0].slice(2):"",n=this._json.filter(function(e){return t===r(s.transformToFullName(e))})[0];return n?new i(this._requestManager,n,this._address).decode(e):o.outputLogFormatter(e)},l.prototype.execute=function(e,t){s.isFunction(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],1===arguments.length&&(e=null));var n=this.encode(e),r=this.decode.bind(this);return new a(n,"eth",this._requestManager,u.eth(),r,t)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this);e.allEvents=t},e.exports=l},"0ko0":function(e,t,n){var r=n("aIKs"),i=n("JuGP"),o=n("hnyh"),s=n("Fqqx"),a=n("Swo3"),u=n("E+Tg"),l=n("r/P+"),c=n("VmE1"),f=n("0twv"),p=n("CqOI"),d=function(e,t){return e.isDynamicType(t)||e.isDynamicArray(t)},h=function(e){this._types=e};h.prototype._requireType=function(e){var t=this._types.filter(function(t){return t.isType(e)})[0];if(!t)throw Error("invalid solidity type!: "+e);return t},h.prototype.encodeParam=function(e,t){return this.encodeParams([e],[t])},h.prototype.encodeParams=function(e,t){var n=this.getSolidityTypes(e),r=n.map(function(n,r){return n.encode(t[r],e[r])}),i=n.reduce(function(t,r,i){var o=r.staticPartLength(e[i]),s=32*Math.floor((o+31)/32);return t+(d(n[i],e[i])?32:s)},0);return this.encodeMultiWithOffset(e,n,r,i)},h.prototype.encodeMultiWithOffset=function(e,t,n,i){var o="",s=this;return e.forEach(function(a,u){if(d(t[u],e[u])){o+=r.formatInputInt(i).encode();var l=s.encodeWithOffset(e[u],t[u],n[u],i);i+=l.length/2}else o+=s.encodeWithOffset(e[u],t[u],n[u],i)}),e.forEach(function(r,a){if(d(t[a],e[a])){var u=s.encodeWithOffset(e[a],t[a],n[a],i);i+=u.length/2,o+=u}}),o},h.prototype.encodeWithOffset=function(e,t,n,i){var o=t.isDynamicArray(e)?1:t.isStaticArray(e)?2:3;if(3!==o){var s=t.nestedName(e),a=t.staticPartLength(s),u=1===o?n[0]:"";if(t.isDynamicArray(s))for(var l=1===o?2:0,c=0;c<n.length;c++)1===o?l+=+n[c-1][0]||0:2===o&&(l+=+(n[c-1]||[])[0]||0),u+=r.formatInputInt(i+c*a+32*l).encode();for(var f=1===o?n.length-1:n.length,p=0;p<f;p++){var d=u/2;1===o?u+=this.encodeWithOffset(s,t,n[p+1],i+d):2===o&&(u+=this.encodeWithOffset(s,t,n[p],i+d))}return u}return n},h.prototype.decodeParam=function(e,t){return this.decodeParams([e],t)[0]},h.prototype.decodeParams=function(e,t){var n=this.getSolidityTypes(e),r=this.getOffsets(e,n);return n.map(function(n,i){return n.decode(t,r[i],e[i],i)})},h.prototype.getOffsets=function(e,t){for(var n=t.map(function(t,n){return t.staticPartLength(e[n])}),r=1;r<n.length;r++)n[r]+=n[r-1];return n.map(function(n,r){return n-t[r].staticPartLength(e[r])})},h.prototype.getSolidityTypes=function(e){var t=this;return e.map(function(e){return t._requireType(e)})};var y=new h([new i,new o,new s,new a,new u,new p,new l,new c,new f]);e.exports=y},"0mTE":function(e){e.exports=[{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"value",type:"uint256"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"indirectId",type:"bytes32"},{name:"value",type:"uint256"}],name:"icapTransfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"to",type:"bytes32"}],name:"deposit",outputs:[],payable:!0,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"AnonymousDeposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"indirectId",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"IcapTransfer",type:"event"}]},"0twv":function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputUReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},"1uat":function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("MlIO"),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,s=e.algo;function a(){return i.create.apply(i,arguments)}var u=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=a()}();var c=s.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],c=n[5],f=n[6],p=n[7],d=r.high,h=r.low,y=i.high,m=i.low,g=o.high,v=o.low,b=s.high,_=s.low,w=a.high,T=a.low,x=c.high,S=c.low,I=f.high,D=f.low,C=p.high,k=p.low,E=d,M=h,A=y,P=m,V=g,N=v,O=b,R=_,L=w,F=T,B=x,q=S,j=I,$=D,U=C,H=k,z=0;z<80;z++){var G=l[z];if(z<16)var W=G.high=0|e[t+2*z],Z=G.low=0|e[t+2*z+1];else{var K=l[z-15],J=K.high,X=K.low,Y=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),Q=l[z-2],ee=Q.high,te=Q.low,ne=(te>>>19|ee<<13)^(te<<3|ee>>>29)^(te>>>6|ee<<26),re=l[z-7],ie=l[z-16],oe=ie.low;G.high=W=(W=(W=((J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7)+re.high+((Z=Y+re.low)>>>0<Y>>>0?1:0))+((ee>>>19|te<<13)^(ee<<3|te>>>29)^ee>>>6)+((Z+=ne)>>>0<ne>>>0?1:0))+ie.high+((Z+=oe)>>>0<oe>>>0?1:0),G.low=Z}var se,ae=L&B^~L&j,ue=F&q^~F&$,le=E&A^E&V^A&V,ce=(M>>>28|E<<4)^(M<<30|E>>>2)^(M<<25|E>>>7),fe=u[z],pe=fe.low,de=U+((L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9))+((se=H+((F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9)))>>>0<H>>>0?1:0),he=ce+(M&P^M&N^P&N);U=j,H=$,j=B,$=q,B=L,q=F,L=O+(de=(de=(de=de+ae+((se+=ue)>>>0<ue>>>0?1:0))+fe.high+((se+=pe)>>>0<pe>>>0?1:0))+W+((se+=Z)>>>0<Z>>>0?1:0))+((F=R+se|0)>>>0<R>>>0?1:0)|0,O=V,R=N,V=A,N=P,A=E,P=M,E=de+(((E>>>28|M<<4)^(E<<30|M>>>2)^(E<<25|M>>>7))+le+(he>>>0<ce>>>0?1:0))+((M=se+he|0)>>>0<se>>>0?1:0)|0}h=r.low=h+M,r.high=d+E+(h>>>0<M>>>0?1:0),m=i.low=m+P,i.high=y+A+(m>>>0<P>>>0?1:0),v=o.low=v+N,o.high=g+V+(v>>>0<N>>>0?1:0),_=s.low=_+R,s.high=b+O+(_>>>0<R>>>0?1:0),T=a.low=T+F,a.high=w+L+(T>>>0<F>>>0?1:0),S=c.low=S+q,c.high=x+B+(S>>>0<q>>>0?1:0),D=f.low=D+$,f.high=I+j+(D>>>0<$>>>0?1:0),k=p.low=k+H,p.high=C+U+(k>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(c),e.HmacSHA512=t._createHmacHelper(c)}(),r.SHA512)},"2M1J":function(e,t,n){var r=n("LRpe"),i=function(e,t){for(var n=e;n.length<2*t;)n="0"+n;return n},o=function(e){var t="A".charCodeAt(0),n="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map(function(e){var r=e.charCodeAt(0);return r>=t&&r<=n?r-t+10:e}).join("")},s=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},a=function(e){this._iban=e};a.fromAddress=function(e){var t=new r(e,16).toString(36),n=i(t,15);return a.fromBban(n.toUpperCase())},a.fromBban=function(e){var t=("0"+(98-s(o("XE00"+e)))).slice(-2);return new a("XE"+t+e)},a.createIndirect=function(e){return a.fromBban("ETH"+e.institution+e.identifier)},a.isValid=function(e){return new a(e).isValid()},a.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(o(this._iban))},a.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},a.prototype.isIndirect=function(){return 20===this._iban.length},a.prototype.checksum=function(){return this._iban.substr(2,2)},a.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},a.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},a.prototype.address=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i(t.toString(16),20)}return""},a.prototype.toString=function(){return this._iban},e.exports=a},"2Twh":function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},"2l4O":function(e,t){e.exports={InvalidNumberOfSolidityArgs:function(){return new Error("Invalid number of arguments to Solidity function")},InvalidNumberOfRPCParams:function(){return new Error("Invalid number of input parameters to RPC method")},InvalidConnection:function(e){return new Error("CONNECTION ERROR: Couldn't connect to node "+e+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")}}},"2pl3":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"2wT1":function(e){e.exports=[{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_refund",type:"address"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"}],name:"setAddr",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"}]},"3QZ1":function(e,t,n){var r=n("LRpe"),i=n("4rvP"),o=n("8d11"),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},a=function(e,t,n){return new Array(t-e.length+1).join(n||"0")+e},u=function(e,t){e=o.encode(e);for(var n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);if(0===i){if(!t)break;n+="00"}else{var s=i.toString(16);n+=s.length<2?"0"+s:s}}return"0x"+n},l=function(e){var t=p(e),n=t.toString(16);return t.lessThan(0)?"-0x"+n.substr(1):"0x"+n},c=function(e){if(g(e))return l(+e);if(y(e))return l(e);if("object"==typeof e)return u(JSON.stringify(e));if(m(e)){if(0===e.indexOf("-0x"))return l(e);if(0===e.indexOf("0x"))return e;if(!isFinite(e))return u(e,1)}return l(e)},f=function(e){e=e?e.toLowerCase():"ether";var t=s[e];if(void 0===t)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(s,null,2));return new r(t,10)},p=function(e){return y(e=e||0)?e:!m(e)||0!==e.indexOf("0x")&&0!==e.indexOf("-0x")?new r(e.toString(10),10):new r(e.replace("0x",""),16)},d=function(e){return/^0x[0-9a-f]{40}$/i.test(e)},h=function(e){e=e.replace("0x","");for(var t=i(e.toLowerCase()),n=0;n<40;n++)if(parseInt(t[n],16)>7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},y=function(e){return e instanceof r||e&&e.constructor&&"BigNumber"===e.constructor.name},m=function(e){return"string"==typeof e||e&&e.constructor&&"String"===e.constructor.name},g=function(e){return"boolean"==typeof e};e.exports={padLeft:a,padRight:function(e,t,n){return e+new Array(t-e.length+1).join(n||"0")},toHex:c,toDecimal:function(e){return p(e).toNumber()},fromDecimal:l,toUtf8:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);if(0===i)break;t+=String.fromCharCode(i)}return o.decode(t)},toAscii:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},fromUtf8:u,fromAscii:function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},transformToFullName:function(e){if(-1!==e.name.indexOf("("))return e.name;var t=e.inputs.map(function(e){return e.type}).join();return e.name+"("+t+")"},extractDisplayName:function(e){var t=e.indexOf("("),n=e.indexOf(")");return-1!==t&&-1!==n?e.substr(0,t):e},extractTypeName:function(e){var t=e.indexOf("("),n=e.indexOf(")");return-1!==t&&-1!==n?e.substr(t+1,n-t-1).replace(" ",""):""},toWei:function(e,t){var n=p(e).times(f(t));return y(e)?n:n.toString(10)},fromWei:function(e,t){var n=p(e).dividedBy(f(t));return y(e)?n:n.toString(10)},toBigNumber:p,toTwosComplement:function(e){var t=p(e).round();return t.lessThan(0)?new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1):t},toAddress:function(e){return d(e)?e:/^[0-9a-f]{40}$/.test(e)?"0x"+e:"0x"+a(c(e).substr(2),40)},isBigNumber:y,isStrictAddress:d,isAddress:function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||h(e))},isChecksumAddress:h,toChecksumAddress:function(e){if(void 0===e)return"";e=e.toLowerCase().replace("0x","");for(var t=i(e),n="0x",r=0;r<e.length;r++)parseInt(t[r],16)>7?n+=e[r].toUpperCase():n+=e[r];return n},isFunction:function(e){return"function"==typeof e},isString:m,isObject:function(e){return null!==e&&!Array.isArray(e)&&"object"==typeof e},isBoolean:g,isArray:function(e){return Array.isArray(e)},isJson:function(e){try{return!!JSON.parse(e)}catch(e){return!1}},isBloom:function(e){return!(!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))},isTopic:function(e){return!(!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}}},"3S5P":function(e,t,n){var r=n("ewyi"),i=n("3QZ1"),o=1,s=function(e,t){var n;return this.requestManager=e,this.pollId="syncPoll_"+o++,this.callbacks=[],this.addCallback(t),this.lastSyncState=!1,(n=this).requestManager.startPolling({method:"eth_syncing",params:[]},n.pollId,function(e,t){if(e)return n.callbacks.forEach(function(t){t(e)});i.isObject(t)&&t.startingBlock&&(t=r.outputSyncingFormatter(t)),n.callbacks.forEach(function(e){n.lastSyncState!==t&&(!n.lastSyncState&&i.isObject(t)&&e(null,!0),setTimeout(function(){e(null,t)},0),n.lastSyncState=t)})},n.stopWatching.bind(n)),this};s.prototype.addCallback=function(e){return e&&this.callbacks.push(e),this},s.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},e.exports=s},"3U0i":function(e,t,n){"use strict";n.r(t),n.d(t,"TimeoutError",function(){return i});var r=n(null),i=function(e){function t(){var n=e.call(this,"Timeout has occurred")||this;return Object.setPrototypeOf(n,t.prototype),n}return r.c(t,e),t}(Error)},"3y9D":function(e,t,n){var r,i,o,s,a,u,l;e.exports=(r=n("Ib8C"),s=(o=(i=r).lib).WordArray,u=[],l=i.algo.SHA1=(a=o.Hasher).extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=0;l<80;l++){if(l<16)u[l]=0|e[t+l];else{var c=u[l-3]^u[l-8]^u[l-14]^u[l-16];u[l]=c<<1|c>>>31}var f=(r<<5|r>>>27)+a+u[l];f+=l<20?1518500249+(i&o|~i&s):l<40?1859775393+(i^o^s):l<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=a._createHelper(l),i.HmacSHA1=a._createHmacHelper(l),r.SHA1)},4:function(e,t,n){e.exports=n("zUnb")},"4/gT":function(e){e.exports={contractName:"Voting",abi:[{constant:!0,inputs:[{name:"",type:"bytes32"}],name:"candidates",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"candidatesIndex",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalTokens",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenPrice",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"voters",outputs:[{name:"voterAddress",type:"address"},{name:"tokens",type:"uint256"},{name:"voted",type:"bool"},{name:"vote",type:"bytes32"},{name:"delegate",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{inputs:[{name:"tokens",type:"uint256"},{name:"_tokenPrice",type:"uint256"},{name:"_candidates",type:"bytes32[]"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"total",type:"uint256"},{indexed:!1,name:"available",type:"uint256"},{indexed:!1,name:"price",type:"uint256"}],name:"TokensInfo",type:"event"},{constant:!0,inputs:[{name:"candidate",type:"bytes32"}],name:"totalVotesFor",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"to",type:"address"},{name:"tokens",type:"uint256"}],name:"delegate",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"candidate",type:"bytes32"},{name:"votesInTokens",type:"uint256"}],name:"vote",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"candidate",type:"bytes32"}],name:"indexOfCandidate",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTokensInfo",outputs:[{name:"",type:"uint256"},{name:"",type:"uint256"},{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"buy",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"user",type:"address"}],name:"voterDetails",outputs:[{name:"",type:"uint256"},{name:"",type:"bytes32"},{name:"",type:"bool"},{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokensSold",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"balanceTokens",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"account",type:"address"}],name:"transferTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"allCandidates",outputs:[{name:"",type:"bytes32[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTokens",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getTokenPrice",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"winningProposal",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"}],bytecode:"0x608060405234801561001057600080fd5b506040516112cb3803806112cb83398101806040528101908080519060200190929190805190602001909291908051820192919050505060008090505b81518110156100e457600060016000848481518110151561006a57fe5b9060200190602002015160001916600019168152602001908152602001600020819055506002828281518110151561009e57fe5b906020019060200201519080600181540180825580915050906001820390600052602060002001600090919290919091509060001916905550808060010191505061004d565b836003819055508360048190555082600581905550505050506111bf8061010c6000396000f300608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063026e402b1461010c5780631a0478d5146101595780632a63b6351461019e5780632f265cf7146101d7578063316642ae1461021c5780634b94f50e14610265578063518ab2a8146102905780635938750d146102bb578063609ff1bd1461035f5780637e1c0c09146103925780637ff9b596146103bd57806381c40715146103e85780639ef1204c14610454578063a03fa7e31461048f578063a3ec138d146104d2578063a6f2ae3a146105a9578063aa6ca808146105b3578063e4494a0f146105de578063ecd098b014610609575b600080fd5b34801561011857600080fd5b50610157600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061064e565b005b34801561016557600080fd5b5061018860048036038101908080356000191690602001909291905050506109bd565b6040518082815260200191505060405180910390f35b3480156101aa57600080fd5b506101b36109d5565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101e357600080fd5b5061020660048036038101908080356000191690602001909291905050506109ee565b6040518082815260200191505060405180910390f35b34801561022857600080fd5b5061024760048036038101908080359060200190929190505050610a13565b60405180826000191660001916815260200191505060405180910390f35b34801561027157600080fd5b5061027a610a36565b6040518082815260200191505060405180910390f35b34801561029c57600080fd5b506102a5610a40565b6040518082815260200191505060405180910390f35b3480156102c757600080fd5b506102fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a4e565b604051808581526020018460001916600019168152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b34801561036b57600080fd5b50610374610b98565b60405180826000191660001916815260200191505060405180910390f35b34801561039e57600080fd5b506103a7610cac565b6040518082815260200191505060405180910390f35b3480156103c957600080fd5b506103d2610cb2565b6040518082815260200191505060405180910390f35b3480156103f457600080fd5b506103fd610cb8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610440578082015181840152602081019050610425565b505050509050019250505060405180910390f35b34801561046057600080fd5b5061048d600480360381019080803560001916906020019092919080359060200190929190505050610d14565b005b34801561049b57600080fd5b506104d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f19565b005b3480156104de57600080fd5b50610513600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7a565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018415151515815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b6105b1610ffd565b005b3480156105bf57600080fd5b506105c8611102565b6040518082815260200191505060405180910390f35b3480156105ea57600080fd5b506105f361110c565b6040518082815260200191505060405180910390f35b34801561061557600080fd5b506106386004803603810190808035600019169060200190929190505050611116565b6040518082815260200191505060405180910390f35b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff161515156106a957600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156107725750600073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561077d57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254039250508190555060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff0219169083151502179055506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16156109695780600160008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015460001916600019168152602001908152602001600020600082825401925050819055506109b9565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055505b5050565b60016020528060005260406000206000915090505481565b6000806000600354600454600554925092509250909192565b6000600160008360001916600019168152602001908152602001600020549050919050565b600281815481101515610a2257fe5b906000526020600020016000915090505481565b6000600554905090565b600060045460035403905090565b6000806000806000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693509350935093509193509193565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff925060009150600090505b600280549050811015610c5b578160016000600284815481101515610beb57fe5b906000526020600020015460001916600019168152602001908152602001600020541115610c4e5760016000600283815481101515610c2657fe5b9060005260206000200154600019166000191681526020019081526020016000205491508092505b8080600101915050610bca565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314151515610c8a57600080fd5b600283815481101515610c9957fe5b9060005260206000200154935050505090565b60035481565b60055481565b60606002805480602002602001604051908101604052809291908181526020018280548015610d0a57602002820191906000526020600020905b81546000191681526020019060010190808311610cf2575b5050505050905090565b6000610d1f83611116565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114158015610d925750816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410155b1515610d9d57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16151515610df857600080fd5b8160016000856000191660001916815260200190815260200160002060008282540192505081905550816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540392505081905550826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301816000191690555060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050565b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610f76573d6000803e3d6000fd5b5050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900460ff16908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905085565b60006005543481151561100c57fe5b049050600454811115151561102057600080fd5b336000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060046000828254039250508190555050565b6000600354905090565b6000600454905090565b600080600090505b60028054905081101561116957826000191660028281548110151561113f57fe5b906000526020600020015460001916141561115c5780915061118d565b808060010191505061111e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91505b509190505600a165627a7a723058208e4435854c524b5857a0a5d2ac61a577c07f919b716dc46f21c2e005333d64610029",deployedBytecode:"0x608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063026e402b1461010c5780631a0478d5146101595780632a63b6351461019e5780632f265cf7146101d7578063316642ae1461021c5780634b94f50e14610265578063518ab2a8146102905780635938750d146102bb578063609ff1bd1461035f5780637e1c0c09146103925780637ff9b596146103bd57806381c40715146103e85780639ef1204c14610454578063a03fa7e31461048f578063a3ec138d146104d2578063a6f2ae3a146105a9578063aa6ca808146105b3578063e4494a0f146105de578063ecd098b014610609575b600080fd5b34801561011857600080fd5b50610157600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061064e565b005b34801561016557600080fd5b5061018860048036038101908080356000191690602001909291905050506109bd565b6040518082815260200191505060405180910390f35b3480156101aa57600080fd5b506101b36109d5565b60405180848152602001838152602001828152602001935050505060405180910390f35b3480156101e357600080fd5b5061020660048036038101908080356000191690602001909291905050506109ee565b6040518082815260200191505060405180910390f35b34801561022857600080fd5b5061024760048036038101908080359060200190929190505050610a13565b60405180826000191660001916815260200191505060405180910390f35b34801561027157600080fd5b5061027a610a36565b6040518082815260200191505060405180910390f35b34801561029c57600080fd5b506102a5610a40565b6040518082815260200191505060405180910390f35b3480156102c757600080fd5b506102fc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a4e565b604051808581526020018460001916600019168152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b34801561036b57600080fd5b50610374610b98565b60405180826000191660001916815260200191505060405180910390f35b34801561039e57600080fd5b506103a7610cac565b6040518082815260200191505060405180910390f35b3480156103c957600080fd5b506103d2610cb2565b6040518082815260200191505060405180910390f35b3480156103f457600080fd5b506103fd610cb8565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610440578082015181840152602081019050610425565b505050509050019250505060405180910390f35b34801561046057600080fd5b5061048d600480360381019080803560001916906020019092919080359060200190929190505050610d14565b005b34801561049b57600080fd5b506104d0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f19565b005b3480156104de57600080fd5b50610513600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7a565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018415151515815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060405180910390f35b6105b1610ffd565b005b3480156105bf57600080fd5b506105c8611102565b6040518082815260200191505060405180910390f35b3480156105ea57600080fd5b506105f361110c565b6040518082815260200191505060405180910390f35b34801561061557600080fd5b506106386004803603810190808035600019169060200190929190505050611116565b6040518082815260200191505060405180910390f35b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff161515156106a957600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156107725750600073ffffffffffffffffffffffffffffffffffffffff166000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561077d57600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254039250508190555060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff0219169083151502179055506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16156109695780600160008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015460001916600019168152602001908152602001600020600082825401925050819055506109b9565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055505b5050565b60016020528060005260406000206000915090505481565b6000806000600354600454600554925092509250909192565b6000600160008360001916600019168152602001908152602001600020549050919050565b600281815481101515610a2257fe5b906000526020600020016000915090505481565b6000600554905090565b600060045460035403905090565b6000806000806000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff166000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693509350935093509193509193565b6000806000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff925060009150600090505b600280549050811015610c5b578160016000600284815481101515610beb57fe5b906000526020600020015460001916600019168152602001908152602001600020541115610c4e5760016000600283815481101515610c2657fe5b9060005260206000200154600019166000191681526020019081526020016000205491508092505b8080600101915050610bca565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314151515610c8a57600080fd5b600283815481101515610c9957fe5b9060005260206000200154935050505090565b60035481565b60055481565b60606002805480602002602001604051908101604052809291908181526020018280548015610d0a57602002820191906000526020600020905b81546000191681526020019060010190808311610cf2575b5050505050905090565b6000610d1f83611116565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114158015610d925750816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410155b1515610d9d57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16151515610df857600080fd5b8160016000856000191660001916815260200190815260200160002060008282540192505081905550816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540392505081905550826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301816000191690555060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050565b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610f76573d6000803e3d6000fd5b5050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900460ff16908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905085565b60006005543481151561100c57fe5b049050600454811115151561102057600080fd5b336000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508060046000828254039250508190555050565b6000600354905090565b6000600454905090565b600080600090505b60028054905081101561116957826000191660028281548110151561113f57fe5b906000526020600020015460001916141561115c5780915061118d565b808060010191505061111e565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91505b509190505600a165627a7a723058208e4435854c524b5857a0a5d2ac61a577c07f919b716dc46f21c2e005333d64610029",sourceMap:"97:5189:1:-;;;1163:308;8:9:-1;5:2;;;30:1;27;20:12;5:2;1163:308:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1246:6;1255:1;1246:10;;1242:140;1262:11;:18;1258:1;:22;1242:140;;;1329:1;1295:10;:26;1306:11;1318:1;1306:14;;;;;;;;;;;;;;;;;;1295:26;;;;;;;;;;;;;;;;;:36;;;;1339:15;1360:11;1372:1;1360:14;;;;;;;;;;;;;;;;;;1339:36;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1339:36:1;;;;;;;;;;;;;;;;;;;;;;;;;;;1282:3;;;;;;;1242:140;;;1402:6;1388:11;:20;;;;1430:6;1414:13;:22;;;;1455:11;1442:10;:24;;;;1163:308;;;;97:5189;;;;;;",deployedSourceMap:"97:5189:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1586:748;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1586:748:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;713:42;;8:9:-1;5:2;;;30:1;27;20:12;5:2;713:42:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3376:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3376:121:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1475:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1475:107:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;759:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;759:32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4836:80;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4836:80:1;;;;;;;;;;;;;;;;;;;;;;;4379:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4379:94:1;;;;;;;;;;;;;;;;;;;;;;;3763:205;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3763:205:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4920:364;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4920:364:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;796:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;796:23:1;;;;;;;;;;;;;;;;;;;;;;;961:22;;8:9:-1;5:2;;;30:1;27;20:12;5:2;961:22:1;;;;;;;;;;;;;;;;;;;;;;;4662:89;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4662:89:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4662:89:1;;;;;;;;;;;;;;;;;2487:574;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2487:574:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4564:94;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4564:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;467:39;;8:9:-1;5:2;;;30:1;27;20:12;5:2;467:39:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3501:258;;;;;;4755:77;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4755:77:1;;;;;;;;;;;;;;;;;;;;;;;4477:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4477:83:1;;;;;;;;;;;;;;;;;;;;;;;3065:230;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3065:230:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1586:748;1656:6;:18;1663:10;1656:18;;;;;;;;;;;;;;;:24;;;;;;;;;;;;1655:25;1647:34;;;;;;;;1741:10;1735:16;;:2;:16;;;;:53;;;;;1786:1;1755:33;;:6;:10;1762:2;1755:10;;;;;;;;;;;;;;;:19;;;;;;;;;;;;:33;;;1735:53;1727:62;;;;;;;;1947:2;1917:6;:18;1924:10;1917:18;;;;;;;;;;;;;;;:27;;;:32;;;;;;;;;;;;;;;;;;1985:6;1956;:18;1963:10;1956:18;;;;;;;;;;;;;;;:25;;;:35;;;;;;;;;;;2025:4;1998:6;:18;2005:10;1998:18;;;;;;;;;;;;;;;:24;;;:31;;;;;;;;;;;;;;;;;;2040:6;:10;2047:2;2040:10;;;;;;;;;;;;;;;:16;;;;;;;;;;;;2036:294;;;2188:6;2157:10;:27;2168:6;:10;2175:2;2168:10;;;;;;;;;;;;;;;:15;;;2157:27;;;;;;;;;;;;;;;;;;:37;;;;;;;;;;;2036:294;;;2317:6;2296;:10;2303:2;2296:10;;;;;;;;;;;;;;;:17;;;:27;;;;;;;;;;;2036:294;1586:748;;:::o;713:42::-;;;;;;;;;;;;;;;;;:::o;3376:121::-;3421:4;3427;3433;3453:11;;3466:13;;3481:10;;3445:47;;;;;;3376:121;;;:::o;1475:107::-;1537:4;1556:10;:21;1567:9;1556:21;;;;;;;;;;;;;;;;;;1549:28;;1475:107;;;:::o;759:32::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4836:80::-;4882:4;4901:10;;4894:17;;4836:80;:::o;4379:94::-;4422:4;4455:13;;4441:11;;:27;4434:34;;4379:94;:::o;3763:205::-;3819:4;3825:7;3834:4;3840:7;3863:6;:12;3870:4;3863:12;;;;;;;;;;;;;;;:19;;;3890:6;:12;3897:4;3890:12;;;;;;;;;;;;;;;:17;;;3915:6;:12;3922:4;3915:12;;;;;;;;;;;;;;;:18;;;;;;;;;;;;3941:6;:12;3948:4;3941:12;;;;;;;;;;;;;;;:21;;;;;;;;;;;;3855:108;;;;;;;;3763:205;;;;;:::o;4920:364::-;4968:7;4983:9;5003:10;5028:6;4995:2;4983:14;;5016:1;5003:14;;5037:1;5028:10;;5024:187;5044:15;:22;;;;5040:1;:26;5024:187;;;5117:5;5084:10;:30;5095:15;5111:1;5095:18;;;;;;;;;;;;;;;;;;5084:30;;;;;;;;;;;;;;;;;;:38;5081:124;;;5142:10;:30;5153:15;5169:1;5153:18;;;;;;;;;;;;;;;;;;5142:30;;;;;;;;;;;;;;;;;;5134:38;;5194:1;5182:14;;5081:124;5068:3;;;;;;;5024:187;;;5234:2;5225:5;:11;;5217:20;;;;;;;;5251:15;5272:5;5251:28;;;;;;;;;;;;;;;;;;5244:35;;4920:364;;;;:::o;796:23::-;;;;:::o;961:22::-;;;;:::o;4662:89::-;4707:9;4731:15;4724:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4662:89;:::o;2487:574::-;2553:10;2566:27;2583:9;2566:16;:27::i;:::-;2553:40;;2686:2;2672:5;:17;;:63;;;;;2722:13;2693:6;:18;2700:10;2693:18;;;;;;;;;;;;;;;:25;;;:42;;2672:63;2664:72;;;;;;;;2799:6;:18;2806:10;2799:18;;;;;;;;;;;;;;;:24;;;;;;;;;;;;2798:25;2790:34;;;;;;;;2856:13;2831:10;:21;2842:9;2831:21;;;;;;;;;;;;;;;;;;:38;;;;;;;;;;;2963:13;2934:6;:18;2941:10;2934:18;;;;;;;;;;;;;;;:25;;;:42;;;;;;;;;;;3009:9;2983:6;:18;2990:10;2983:18;;;;;;;;;;;;;;;:23;;:35;;;;;;;3051:4;3024:6;:18;3031:10;3024:18;;;;;;;;;;;;;;;:24;;;:31;;;;;;;;;;;;;;;;;;2487:574;;;:::o;4564:94::-;4614:7;:16;;:39;4639:4;4631:21;;;4614:39;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;4614:39:1;4564:94;:::o;467:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3501:258::-;3537:16;3568:10;;3556:9;:22;;;;;;;;3537:41;;3608:13;;3593:11;:28;;3585:37;;;;;;;;3663:10;3629:6;:18;3636:10;3629:18;;;;;;;;;;;;;;;:31;;;:44;;;;;;;;;;;;;;;;;;3708:11;3679:6;:18;3686:10;3679:18;;;;;;;;;;;;;;;:25;;;:40;;;;;;;;;;;3743:11;3726:13;;:28;;;;;;;;;;;3501:258;:::o;4755:77::-;4797:4;4816:11;;4809:18;;4755:77;:::o;4477:83::-;4523:4;4542:13;;4535:20;;4477:83;:::o;3065:230::-;3131:4;3147:6;3156:1;3147:10;;3143:127;3163:15;:22;;;;3159:1;:26;3143:127;;;3226:9;3204:31;;;:15;3220:1;3204:18;;;;;;;;;;;;;;;;;;:31;;;;3200:64;;;3254:1;3247:8;;;;3200:64;3187:3;;;;;;;3143:127;;;3287:2;3275:15;;3065:230;;;;;:::o",source:"pragma solidity ^0.4.22; // We have to specify what version of the compiler this code will use.\n\ncontract Voting {\n\n  /* Voter Information */\n  struct Voter {\n    address voterAddress; // the address of the voter\n    uint tokens;          // the total number of tokens this voter owns.\n    bool voted;           // bool to indicate that voter has casted the vote.\n    bytes32 vote;         // indicate to which candidate he casted the vote.\n    address delegate;\n  } mapping(address => Voter) public voters;\n  \n\n  /* mapping is assiciative array or hash.\n  The key of the mapping is the candidates name stored as type bytes32 and value \n  is the type unsigned integer which is used to storethe vote count.\n  */\n  mapping(bytes32 => uint) public candidates;\n  bytes32[] public candidatesIndex;\n\n  uint public totalTokens;    // total no. of available tokens for this election.\n  uint public balanceTokens;  // total no. of tokens still available for purchase.\n  uint public tokenPrice;     // price per token.\n\n\n  /* When the contract is deployed on the blockchain, we'll initialize the total number\n  of tokens for sale, cost per token and all candidates\n  */\n\n  constructor(uint tokens, uint _tokenPrice, bytes32[] _candidates) public {\n    for(uint i = 0; i < _candidates.length; i++) {\n      candidates[_candidates[i]] = uint(0);\n      candidatesIndex.push(_candidates[i]);\n    }\n\n    totalTokens = tokens;\n    balanceTokens = tokens;\n    tokenPrice = _tokenPrice;\n  }\n\n  function totalVotesFor(bytes32 candidate) view public returns(uint) {\n    return candidates[candidate];\n  }\n\n  function delegate(address to, uint tokens) public {\n    \n    require(!voters[msg.sender].voted);\n\n    // Self-delegation is not allowed.\n    require(to != msg.sender && voters[to].delegate == address(0));\n\n    // Forward the delegation as long as\n    // Since `sender` is a reference, this modifies `voters[msg.sender].voted`\n\n    voters[msg.sender].delegate = to;\n\n    voters[msg.sender].tokens -= tokens;\n\n    voters[msg.sender].voted = true;\n\n    if (voters[to].voted) {\n        // If the delegate already voted,\n        // directly add to the number of votes\n        candidates[voters[to].vote] += tokens;\n\n    } else {\n        // If the delegate did not vote yet, transfer tokens to 'to' account.\n        voters[to].tokens += tokens;\n    }\n  }\n\n  /* instead of just taking the candidate name as an argument, we also require the no. \n  of tokens this voter wants to vote for the candidate.\n  */\n  function vote(bytes32 candidate, uint votesInTokens) public {\n    uint index = indexOfCandidate(candidate);\n\n    // Make sure this voter has enough tokens to cast the vote.\n    require(index != uint(-1) && voters[msg.sender].tokens >= votesInTokens);\n\n    // Make sure this voter has not yet voted.\n    require(!voters[msg.sender].voted);\n\n    candidates[candidate] += votesInTokens;\n\n    // store how many tokens were used for this candidate\n    voters[msg.sender].tokens -= votesInTokens;\n\n    voters[msg.sender].vote = candidate;\n    voters[msg.sender].voted = true;\n\n  }\n\n  function indexOfCandidate(bytes32 candidate) view public returns (uint) {\n    for(uint i = 0; i < candidatesIndex.length; i++) {\n      if (candidatesIndex[i] == candidate) {\n        return i;\n      }\n    }\n    return uint(-1);\n  }\n\n  event TokensInfo(\n    uint total,\n    uint available,\n    uint price\n  );\n\n  function getTokensInfo() view public returns(uint, uint, uint) {\n    return (totalTokens, balanceTokens, tokenPrice);\n  }\n\n  function buy() payable public {\n    uint tokensToBuy = msg.value / tokenPrice;\n\n    require(tokensToBuy <= balanceTokens);\n\n    voters[msg.sender].voterAddress = msg.sender;\n    voters[msg.sender].tokens += tokensToBuy;\n\n    balanceTokens -= tokensToBuy;\n  }\n\n  function voterDetails(address user) view public returns(uint, bytes32, bool, address) {\n    return (voters[user].tokens,\n      voters[user].vote,\n      voters[user].voted,\n      voters[user].delegate);\n  }\n\n  /* All the ether sent by voters who purchased. the tokens is in this contracts's account.\n  This method will. be used to transfer. out all those ethers in to another account.\n  ****. the way this function is written currently, anyone can call this method and transfer \n  the balance in to their account. In reality, you should add check to make sure only the owner\n  of this contract. can cash out.\n  */\n\n  function tokensSold() view public returns (uint) {\n    return totalTokens - balanceTokens;\n  }\n\n  function balanceTokens() view public returns (uint) {\n    return balanceTokens;\n  }\n\n  function transferTo(address account) public {\n    account.transfer(address(this).balance);\n  }\n\n  function allCandidates() view public returns(bytes32[]) {\n    return candidatesIndex;\n  }\n\n  function getTokens() view public returns (uint) {\n    return totalTokens;\n  }\n\n  function getTokenPrice() view public returns (uint) {\n    return tokenPrice;\n  }\n\n  function winningProposal() public view returns (bytes32) {\n    int index = -1;\n    uint count = 0;\n\n    for(uint i = 0; i < candidatesIndex.length; i++) {\n      if(candidates[candidatesIndex[i]] > count) {\n        count = candidates[candidatesIndex[i]];\n        index = int(i);\n      }\n    }\n\n    require(index != -1);\n\n    return candidatesIndex[uint(index)];\n  }\n}\n",sourcePath:"/Users/khizaralimanzoor/Work/Projects/octane-sunu/contracts/Voting.sol",ast:{absolutePath:"/Users/khizaralimanzoor/Work/Projects/octane-sunu/contracts/Voting.sol",exportedSymbols:{Voting:[553]},id:554,nodeType:"SourceUnit",nodes:[{id:58,literals:["solidity","^","0.4",".22"],nodeType:"PragmaDirective",src:"0:24:1"},{baseContracts:[],contractDependencies:[],contractKind:"contract",documentation:null,fullyImplemented:!0,id:553,linearizedBaseContracts:[553],name:"Voting",nodeType:"ContractDefinition",nodes:[{canonicalName:"Voting.Voter",id:69,members:[{constant:!1,id:60,name:"voterAddress",nodeType:"VariableDeclaration",scope:69,src:"163:20:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:59,name:"address",nodeType:"ElementaryTypeName",src:"163:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"},{constant:!1,id:62,name:"tokens",nodeType:"VariableDeclaration",scope:69,src:"217:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:61,name:"uint",nodeType:"ElementaryTypeName",src:"217:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:64,name:"voted",nodeType:"VariableDeclaration",scope:69,src:"290:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},typeName:{id:63,name:"bool",nodeType:"ElementaryTypeName",src:"290:4:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},value:null,visibility:"internal"},{constant:!1,id:66,name:"vote",nodeType:"VariableDeclaration",scope:69,src:"368:12:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:65,name:"bytes32",nodeType:"ElementaryTypeName",src:"368:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:68,name:"delegate",nodeType:"VariableDeclaration",scope:69,src:"445:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:67,name:"address",nodeType:"ElementaryTypeName",src:"445:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],name:"Voter",nodeType:"StructDefinition",scope:553,src:"144:322:1",visibility:"public"},{constant:!1,id:73,name:"voters",nodeType:"VariableDeclaration",scope:553,src:"467:39:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter)"},typeName:{id:72,keyType:{id:70,name:"address",nodeType:"ElementaryTypeName",src:"475:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Mapping",src:"467:25:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter)"},valueType:{contractScope:null,id:71,name:"Voter",nodeType:"UserDefinedTypeName",referencedDeclaration:69,src:"486:5:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage_ptr",typeString:"struct Voting.Voter"}}},value:null,visibility:"public"},{constant:!1,id:77,name:"candidates",nodeType:"VariableDeclaration",scope:553,src:"713:42:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"},typeName:{id:76,keyType:{id:74,name:"bytes32",nodeType:"ElementaryTypeName",src:"721:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"Mapping",src:"713:24:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"},valueType:{id:75,name:"uint",nodeType:"ElementaryTypeName",src:"732:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}},value:null,visibility:"public"},{constant:!1,id:80,name:"candidatesIndex",nodeType:"VariableDeclaration",scope:553,src:"759:32:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[]"},typeName:{baseType:{id:78,name:"bytes32",nodeType:"ElementaryTypeName",src:"759:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:79,length:null,nodeType:"ArrayTypeName",src:"759:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"public"},{constant:!1,id:82,name:"totalTokens",nodeType:"VariableDeclaration",scope:553,src:"796:23:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:81,name:"uint",nodeType:"ElementaryTypeName",src:"796:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{constant:!1,id:84,name:"balanceTokens",nodeType:"VariableDeclaration",scope:553,src:"878:25:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:83,name:"uint",nodeType:"ElementaryTypeName",src:"878:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{constant:!1,id:86,name:"tokenPrice",nodeType:"VariableDeclaration",scope:553,src:"961:22:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:85,name:"uint",nodeType:"ElementaryTypeName",src:"961:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{body:{id:139,nodeType:"Block",src:"1236:235:1",statements:[{body:{id:125,nodeType:"Block",src:"1287:95:1",statements:[{expression:{argumentTypes:null,id:115,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:107,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"1295:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:111,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:108,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1306:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:110,indexExpression:{argumentTypes:null,id:109,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1318:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1306:14:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"1295:26:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,arguments:[{argumentTypes:null,hexValue:"30",id:113,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1329:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"}],expression:{argumentTypes:[{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"}],id:112,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"1324:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:114,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1324:7:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1295:36:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:116,nodeType:"ExpressionStatement",src:"1295:36:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,baseExpression:{argumentTypes:null,id:120,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1360:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:122,indexExpression:{argumentTypes:null,id:121,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1372:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1360:14:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}}],expression:{argumentTypes:[{typeIdentifier:"t_bytes32",typeString:"bytes32"}],expression:{argumentTypes:null,id:117,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"1339:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:119,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"push",nodeType:"MemberAccess",referencedDeclaration:null,src:"1339:20:1",typeDescriptions:{typeIdentifier:"t_function_arraypush_nonpayable$_t_bytes32_$returns$_t_uint256_$",typeString:"function (bytes32) returns (uint256)"}},id:123,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1339:36:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:124,nodeType:"ExpressionStatement",src:"1339:36:1"}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:103,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:100,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1258:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:101,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1262:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:102,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"1262:18:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1258:22:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:126,initializationExpression:{assignments:[97],declarations:[{constant:!1,id:97,name:"i",nodeType:"VariableDeclaration",scope:140,src:"1246:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:96,name:"uint",nodeType:"ElementaryTypeName",src:"1246:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:99,initialValue:{argumentTypes:null,hexValue:"30",id:98,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1255:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"1246:10:1"},loopExpression:{expression:{argumentTypes:null,id:105,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"1282:3:1",subExpression:{argumentTypes:null,id:104,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1282:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:106,nodeType:"ExpressionStatement",src:"1282:3:1"},nodeType:"ForStatement",src:"1242:140:1"},{expression:{argumentTypes:null,id:129,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:127,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"1388:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:128,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:88,src:"1402:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1388:20:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:130,nodeType:"ExpressionStatement",src:"1388:20:1"},{expression:{argumentTypes:null,id:133,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:131,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"1414:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:132,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:88,src:"1430:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1414:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:134,nodeType:"ExpressionStatement",src:"1414:22:1"},{expression:{argumentTypes:null,id:137,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:135,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"1442:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:136,name:"_tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:90,src:"1455:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1442:24:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:138,nodeType:"ExpressionStatement",src:"1442:24:1"}]},documentation:null,id:140,implemented:!0,isConstructor:!0,isDeclaredConst:!1,modifiers:[],name:"",nodeType:"FunctionDefinition",parameters:{id:94,nodeType:"ParameterList",parameters:[{constant:!1,id:88,name:"tokens",nodeType:"VariableDeclaration",scope:140,src:"1175:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:87,name:"uint",nodeType:"ElementaryTypeName",src:"1175:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:90,name:"_tokenPrice",nodeType:"VariableDeclaration",scope:140,src:"1188:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:89,name:"uint",nodeType:"ElementaryTypeName",src:"1188:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:93,name:"_candidates",nodeType:"VariableDeclaration",scope:140,src:"1206:21:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[]"},typeName:{baseType:{id:91,name:"bytes32",nodeType:"ElementaryTypeName",src:"1206:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:92,length:null,nodeType:"ArrayTypeName",src:"1206:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"internal"}],src:"1174:54:1"},payable:!1,returnParameters:{id:95,nodeType:"ParameterList",parameters:[],src:"1236:0:1"},scope:553,src:"1163:308:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:151,nodeType:"Block",src:"1543:39:1",statements:[{expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:147,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"1556:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:149,indexExpression:{argumentTypes:null,id:148,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:142,src:"1567:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1556:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:146,id:150,nodeType:"Return",src:"1549:28:1"}]},documentation:null,id:152,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"totalVotesFor",nodeType:"FunctionDefinition",parameters:{id:143,nodeType:"ParameterList",parameters:[{constant:!1,id:142,name:"candidate",nodeType:"VariableDeclaration",scope:152,src:"1498:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:141,name:"bytes32",nodeType:"ElementaryTypeName",src:"1498:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"1497:19:1"},payable:!1,returnParameters:{id:146,nodeType:"ParameterList",parameters:[{constant:!1,id:145,name:"",nodeType:"VariableDeclaration",scope:152,src:"1537:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:144,name:"uint",nodeType:"ElementaryTypeName",src:"1537:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"1536:6:1"},scope:553,src:"1475:107:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:231,nodeType:"Block",src:"1636:698:1",statements:[{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:165,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"!",prefix:!0,src:"1655:25:1",subExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:160,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1656:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:163,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:161,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1663:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:162,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1663:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1656:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:164,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"1656:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:159,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"1647:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:166,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1647:34:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:167,nodeType:"ExpressionStatement",src:"1647:34:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_bool",typeString:"bool"},id:181,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_address",typeString:"address"},id:172,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:169,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1735:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:170,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1741:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:171,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1741:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1735:16:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"BinaryOperation",operator:"&&",rightExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_address",typeString:"address"},id:180,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:173,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1755:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:175,indexExpression:{argumentTypes:null,id:174,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1762:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1755:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:176,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"1755:19:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"BinaryOperation",operator:"==",rightExpression:{argumentTypes:null,arguments:[{argumentTypes:null,hexValue:"30",id:178,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1786:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"}],expression:{argumentTypes:[{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"}],id:177,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"1778:7:1",typeDescriptions:{typeIdentifier:"t_type$_t_address_$",typeString:"type(address)"},typeName:"address"},id:179,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1778:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1755:33:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},src:"1735:53:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:168,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"1727:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:182,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1727:62:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:183,nodeType:"ExpressionStatement",src:"1727:62:1"},{expression:{argumentTypes:null,id:190,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:184,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1917:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:187,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:185,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1924:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:186,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1924:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1917:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:188,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"1917:27:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:189,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1947:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1917:32:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:191,nodeType:"ExpressionStatement",src:"1917:32:1"},{expression:{argumentTypes:null,id:198,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:192,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1956:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:195,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:193,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1963:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:194,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1963:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1956:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:196,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"1956:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:197,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"1985:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1956:35:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:199,nodeType:"ExpressionStatement",src:"1956:35:1"},{expression:{argumentTypes:null,id:206,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:200,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1998:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:203,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:201,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2005:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:202,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2005:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1998:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:204,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"1998:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,hexValue:"74727565",id:205,isConstant:!1,isLValue:!1,isPure:!0,kind:"bool",lValueRequested:!1,nodeType:"Literal",src:"2025:4:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},value:"true"},src:"1998:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:207,nodeType:"ExpressionStatement",src:"1998:31:1"},{condition:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:208,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2040:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:210,indexExpression:{argumentTypes:null,id:209,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2047:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2040:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:211,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"2040:16:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:{id:229,nodeType:"Block",src:"2208:122:1",statements:[{expression:{argumentTypes:null,id:227,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:222,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2296:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:224,indexExpression:{argumentTypes:null,id:223,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2303:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2296:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:225,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2296:17:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:226,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"2317:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2296:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:228,nodeType:"ExpressionStatement",src:"2296:27:1"}]},id:230,nodeType:"IfStatement",src:"2036:294:1",trueBody:{id:221,nodeType:"Block",src:"2058:144:1",statements:[{expression:{argumentTypes:null,id:219,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:212,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"2157:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:217,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:213,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2168:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:215,indexExpression:{argumentTypes:null,id:214,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2175:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2168:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:216,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"2168:15:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"2157:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:218,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"2188:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2157:37:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:220,nodeType:"ExpressionStatement",src:"2157:37:1"}]}}]},documentation:null,id:232,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"delegate",nodeType:"FunctionDefinition",parameters:{id:157,nodeType:"ParameterList",parameters:[{constant:!1,id:154,name:"to",nodeType:"VariableDeclaration",scope:232,src:"1604:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:153,name:"address",nodeType:"ElementaryTypeName",src:"1604:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"},{constant:!1,id:156,name:"tokens",nodeType:"VariableDeclaration",scope:232,src:"1616:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:155,name:"uint",nodeType:"ElementaryTypeName",src:"1616:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"1603:25:1"},payable:!1,returnParameters:{id:158,nodeType:"ParameterList",parameters:[],src:"1636:0:1"},scope:553,src:"1586:748:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:301,nodeType:"Block",src:"2547:514:1",statements:[{assignments:[240],declarations:[{constant:!1,id:240,name:"index",nodeType:"VariableDeclaration",scope:302,src:"2553:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:239,name:"uint",nodeType:"ElementaryTypeName",src:"2553:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:244,initialValue:{argumentTypes:null,arguments:[{argumentTypes:null,id:242,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"2583:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}}],expression:{argumentTypes:[{typeIdentifier:"t_bytes32",typeString:"bytes32"}],id:241,name:"indexOfCandidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:337,src:"2566:16:1",typeDescriptions:{typeIdentifier:"t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",typeString:"function (bytes32) view returns (uint256)"}},id:243,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2566:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"VariableDeclarationStatement",src:"2553:40:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_bool",typeString:"bool"},id:259,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:251,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:246,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:240,src:"2672:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,arguments:[{argumentTypes:null,id:249,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"2686:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:248,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"2687:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}}],expression:{argumentTypes:[{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}],id:247,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"2681:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:250,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2681:8:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2672:17:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"BinaryOperation",operator:"&&",rightExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:258,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:252,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2693:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:255,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:253,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2700:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:254,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2700:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2693:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:256,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2693:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:">=",rightExpression:{argumentTypes:null,id:257,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2722:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2693:42:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},src:"2672:63:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:245,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"2664:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:260,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2664:72:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:261,nodeType:"ExpressionStatement",src:"2664:72:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:268,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"!",prefix:!0,src:"2798:25:1",subExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:263,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2799:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:266,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:264,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2806:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:265,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2806:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2799:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:267,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"2799:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:262,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"2790:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:269,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2790:34:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:270,nodeType:"ExpressionStatement",src:"2790:34:1"},{expression:{argumentTypes:null,id:275,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:271,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"2831:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:273,indexExpression:{argumentTypes:null,id:272,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"2842:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"2831:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:274,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2856:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2831:38:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:276,nodeType:"ExpressionStatement",src:"2831:38:1"},{expression:{argumentTypes:null,id:283,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:277,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2934:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:280,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:278,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2941:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:279,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2941:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2934:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:281,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2934:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:282,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2963:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2934:42:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:284,nodeType:"ExpressionStatement",src:"2934:42:1"},{expression:{argumentTypes:null,id:291,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:285,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2983:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:288,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:286,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2990:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:287,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2990:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2983:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:289,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"2983:23:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:290,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"3009:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},src:"2983:35:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:292,nodeType:"ExpressionStatement",src:"2983:35:1"},{expression:{argumentTypes:null,id:299,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:293,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3024:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:296,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:294,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3031:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:295,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3031:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3024:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:297,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"3024:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,hexValue:"74727565",id:298,isConstant:!1,isLValue:!1,isPure:!0,kind:"bool",lValueRequested:!1,nodeType:"Literal",src:"3051:4:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},value:"true"},src:"3024:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:300,nodeType:"ExpressionStatement",src:"3024:31:1"}]},documentation:null,id:302,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"vote",nodeType:"FunctionDefinition",parameters:{id:237,nodeType:"ParameterList",parameters:[{constant:!1,id:234,name:"candidate",nodeType:"VariableDeclaration",scope:302,src:"2501:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:233,name:"bytes32",nodeType:"ElementaryTypeName",src:"2501:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:236,name:"votesInTokens",nodeType:"VariableDeclaration",scope:302,src:"2520:18:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:235,name:"uint",nodeType:"ElementaryTypeName",src:"2520:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"2500:39:1"},payable:!1,returnParameters:{id:238,nodeType:"ParameterList",parameters:[],src:"2547:0:1"},scope:553,src:"2487:574:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:336,nodeType:"Block",src:"3137:158:1",statements:[{body:{id:329,nodeType:"Block",src:"3192:78:1",statements:[{condition:{argumentTypes:null,commonType:{typeIdentifier:"t_bytes32",typeString:"bytes32"},id:324,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:320,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"3204:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:322,indexExpression:{argumentTypes:null,id:321,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3220:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3204:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"BinaryOperation",operator:"==",rightExpression:{argumentTypes:null,id:323,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:304,src:"3226:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},src:"3204:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:null,id:328,nodeType:"IfStatement",src:"3200:64:1",trueBody:{id:327,nodeType:"Block",src:"3237:27:1",statements:[{expression:{argumentTypes:null,id:325,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3254:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:308,id:326,nodeType:"Return",src:"3247:8:1"}]}}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:316,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:313,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3159:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:314,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"3163:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:315,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"3163:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3159:26:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:330,initializationExpression:{assignments:[310],declarations:[{constant:!1,id:310,name:"i",nodeType:"VariableDeclaration",scope:337,src:"3147:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:309,name:"uint",nodeType:"ElementaryTypeName",src:"3147:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:312,initialValue:{argumentTypes:null,hexValue:"30",id:311,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"3156:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"3147:10:1"},loopExpression:{expression:{argumentTypes:null,id:318,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"3187:3:1",subExpression:{argumentTypes:null,id:317,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3187:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:319,nodeType:"ExpressionStatement",src:"3187:3:1"},nodeType:"ForStatement",src:"3143:127:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:333,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"3287:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:332,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"3288:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}}],expression:{argumentTypes:[{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}],id:331,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"3282:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:334,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"3282:8:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:308,id:335,nodeType:"Return",src:"3275:15:1"}]},documentation:null,id:337,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"indexOfCandidate",nodeType:"FunctionDefinition",parameters:{id:305,nodeType:"ParameterList",parameters:[{constant:!1,id:304,name:"candidate",nodeType:"VariableDeclaration",scope:337,src:"3091:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:303,name:"bytes32",nodeType:"ElementaryTypeName",src:"3091:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"3090:19:1"},payable:!1,returnParameters:{id:308,nodeType:"ParameterList",parameters:[{constant:!1,id:307,name:"",nodeType:"VariableDeclaration",scope:337,src:"3131:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:306,name:"uint",nodeType:"ElementaryTypeName",src:"3131:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3130:6:1"},scope:553,src:"3065:230:1",stateMutability:"view",superFunction:null,visibility:"public"},{anonymous:!1,documentation:null,id:345,name:"TokensInfo",nodeType:"EventDefinition",parameters:{id:344,nodeType:"ParameterList",parameters:[{constant:!1,id:339,indexed:!1,name:"total",nodeType:"VariableDeclaration",scope:345,src:"3321:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:338,name:"uint",nodeType:"ElementaryTypeName",src:"3321:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:341,indexed:!1,name:"available",nodeType:"VariableDeclaration",scope:345,src:"3337:14:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:340,name:"uint",nodeType:"ElementaryTypeName",src:"3337:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:343,indexed:!1,name:"price",nodeType:"VariableDeclaration",scope:345,src:"3357:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:342,name:"uint",nodeType:"ElementaryTypeName",src:"3357:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3315:56:1"},src:"3299:73:1"},{body:{id:359,nodeType:"Block",src:"3439:58:1",statements:[{expression:{argumentTypes:null,components:[{argumentTypes:null,id:354,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"3453:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,id:355,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3466:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,id:356,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"3481:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],id:357,isConstant:!1,isInlineArray:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"TupleExpression",src:"3452:40:1",typeDescriptions:{typeIdentifier:"t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",typeString:"tuple(uint256,uint256,uint256)"}},functionReturnParameters:353,id:358,nodeType:"Return",src:"3445:47:1"}]},documentation:null,id:360,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokensInfo",nodeType:"FunctionDefinition",parameters:{id:346,nodeType:"ParameterList",parameters:[],src:"3398:2:1"},payable:!1,returnParameters:{id:353,nodeType:"ParameterList",parameters:[{constant:!1,id:348,name:"",nodeType:"VariableDeclaration",scope:360,src:"3421:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:347,name:"uint",nodeType:"ElementaryTypeName",src:"3421:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:350,name:"",nodeType:"VariableDeclaration",scope:360,src:"3427:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:349,name:"uint",nodeType:"ElementaryTypeName",src:"3427:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:352,name:"",nodeType:"VariableDeclaration",scope:360,src:"3433:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:351,name:"uint",nodeType:"ElementaryTypeName",src:"3433:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3420:18:1"},scope:553,src:"3376:121:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:397,nodeType:"Block",src:"3531:228:1",statements:[{assignments:[364],declarations:[{constant:!1,id:364,name:"tokensToBuy",nodeType:"VariableDeclaration",scope:398,src:"3537:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:363,name:"uint",nodeType:"ElementaryTypeName",src:"3537:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:369,initialValue:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:368,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,id:365,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3556:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:366,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"value",nodeType:"MemberAccess",referencedDeclaration:null,src:"3556:9:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"/",rightExpression:{argumentTypes:null,id:367,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"3568:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3556:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"VariableDeclarationStatement",src:"3537:41:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:373,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:371,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3593:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<=",rightExpression:{argumentTypes:null,id:372,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3608:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3593:28:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:370,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"3585:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:374,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"3585:37:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:375,nodeType:"ExpressionStatement",src:"3585:37:1"},{expression:{argumentTypes:null,id:383,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:376,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3629:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:379,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:377,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3636:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:378,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3636:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3629:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:380,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voterAddress",nodeType:"MemberAccess",referencedDeclaration:60,src:"3629:31:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,expression:{argumentTypes:null,id:381,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3663:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:382,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3663:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"3629:44:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:384,nodeType:"ExpressionStatement",src:"3629:44:1"},{expression:{argumentTypes:null,id:391,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:385,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3679:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:388,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:386,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3686:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:387,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3686:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3679:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:389,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"3679:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:390,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3708:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3679:40:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:392,nodeType:"ExpressionStatement",src:"3679:40:1"},{expression:{argumentTypes:null,id:395,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:393,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3726:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:394,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3743:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3726:28:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:396,nodeType:"ExpressionStatement",src:"3726:28:1"}]},documentation:null,id:398,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"buy",nodeType:"FunctionDefinition",parameters:{id:361,nodeType:"ParameterList",parameters:[],src:"3513:2:1"},payable:!0,returnParameters:{id:362,nodeType:"ParameterList",parameters:[],src:"3531:0:1"},scope:553,src:"3501:258:1",stateMutability:"payable",superFunction:null,visibility:"public"},{body:{id:429,nodeType:"Block",src:"3849:119:1",statements:[{expression:{argumentTypes:null,components:[{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:411,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3863:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:413,indexExpression:{argumentTypes:null,id:412,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3870:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3863:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:414,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"3863:19:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:415,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3890:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:417,indexExpression:{argumentTypes:null,id:416,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3897:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3890:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:418,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"3890:17:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:419,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3915:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:421,indexExpression:{argumentTypes:null,id:420,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3922:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3915:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:422,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"3915:18:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:423,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3941:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:425,indexExpression:{argumentTypes:null,id:424,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3948:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3941:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:426,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"3941:21:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}}],id:427,isConstant:!1,isInlineArray:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"TupleExpression",src:"3862:101:1",typeDescriptions:{typeIdentifier:"t_tuple$_t_uint256_$_t_bytes32_$_t_bool_$_t_address_$",typeString:"tuple(uint256,bytes32,bool,address)"}},functionReturnParameters:410,id:428,nodeType:"Return",src:"3855:108:1"}]},documentation:null,id:430,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"voterDetails",nodeType:"FunctionDefinition",parameters:{id:401,nodeType:"ParameterList",parameters:[{constant:!1,id:400,name:"user",nodeType:"VariableDeclaration",scope:430,src:"3785:12:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:399,name:"address",nodeType:"ElementaryTypeName",src:"3785:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"3784:14:1"},payable:!1,returnParameters:{id:410,nodeType:"ParameterList",parameters:[{constant:!1,id:403,name:"",nodeType:"VariableDeclaration",scope:430,src:"3819:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:402,name:"uint",nodeType:"ElementaryTypeName",src:"3819:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:405,name:"",nodeType:"VariableDeclaration",scope:430,src:"3825:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:404,name:"bytes32",nodeType:"ElementaryTypeName",src:"3825:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:407,name:"",nodeType:"VariableDeclaration",scope:430,src:"3834:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},typeName:{id:406,name:"bool",nodeType:"ElementaryTypeName",src:"3834:4:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},value:null,visibility:"internal"},{constant:!1,id:409,name:"",nodeType:"VariableDeclaration",scope:430,src:"3840:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:408,name:"address",nodeType:"ElementaryTypeName",src:"3840:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"3818:30:1"},scope:553,src:"3763:205:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:439,nodeType:"Block",src:"4428:45:1",statements:[{expression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:437,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:435,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"4441:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"-",rightExpression:{argumentTypes:null,id:436,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"4455:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"4441:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:434,id:438,nodeType:"Return",src:"4434:34:1"}]},documentation:null,id:440,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"tokensSold",nodeType:"FunctionDefinition",parameters:{id:431,nodeType:"ParameterList",parameters:[],src:"4398:2:1"},payable:!1,returnParameters:{id:434,nodeType:"ParameterList",parameters:[{constant:!1,id:433,name:"",nodeType:"VariableDeclaration",scope:440,src:"4422:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:432,name:"uint",nodeType:"ElementaryTypeName",src:"4422:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4421:6:1"},scope:553,src:"4379:94:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:447,nodeType:"Block",src:"4529:31:1",statements:[{expression:{argumentTypes:null,id:445,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"4542:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:444,id:446,nodeType:"Return",src:"4535:20:1"}]},documentation:null,id:448,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"balanceTokens",nodeType:"FunctionDefinition",parameters:{id:441,nodeType:"ParameterList",parameters:[],src:"4499:2:1"},payable:!1,returnParameters:{id:444,nodeType:"ParameterList",parameters:[{constant:!1,id:443,name:"",nodeType:"VariableDeclaration",scope:448,src:"4523:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:442,name:"uint",nodeType:"ElementaryTypeName",src:"4523:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4522:6:1"},scope:553,src:"4477:83:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:462,nodeType:"Block",src:"4608:50:1",statements:[{expression:{argumentTypes:null,arguments:[{argumentTypes:null,expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:457,name:"this",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:583,src:"4639:4:1",typeDescriptions:{typeIdentifier:"t_contract$_Voting_$553",typeString:"contract Voting"}}],expression:{argumentTypes:[{typeIdentifier:"t_contract$_Voting_$553",typeString:"contract Voting"}],id:456,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"4631:7:1",typeDescriptions:{typeIdentifier:"t_type$_t_address_$",typeString:"type(address)"},typeName:"address"},id:458,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"4631:13:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:459,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"balance",nodeType:"MemberAccess",referencedDeclaration:null,src:"4631:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],expression:{argumentTypes:[{typeIdentifier:"t_uint256",typeString:"uint256"}],expression:{argumentTypes:null,id:453,name:"account",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:450,src:"4614:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:455,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"transfer",nodeType:"MemberAccess",referencedDeclaration:null,src:"4614:16:1",typeDescriptions:{typeIdentifier:"t_function_transfer_nonpayable$_t_uint256_$returns$__$",typeString:"function (uint256)"}},id:460,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"4614:39:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:461,nodeType:"ExpressionStatement",src:"4614:39:1"}]},documentation:null,id:463,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"transferTo",nodeType:"FunctionDefinition",parameters:{id:451,nodeType:"ParameterList",parameters:[{constant:!1,id:450,name:"account",nodeType:"VariableDeclaration",scope:463,src:"4584:15:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:449,name:"address",nodeType:"ElementaryTypeName",src:"4584:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"4583:17:1"},payable:!1,returnParameters:{id:452,nodeType:"ParameterList",parameters:[],src:"4608:0:1"},scope:553,src:"4564:94:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:471,nodeType:"Block",src:"4718:33:1",statements:[{expression:{argumentTypes:null,id:469,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"4731:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},functionReturnParameters:468,id:470,nodeType:"Return",src:"4724:22:1"}]},documentation:null,id:472,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"allCandidates",nodeType:"FunctionDefinition",parameters:{id:464,nodeType:"ParameterList",parameters:[],src:"4684:2:1"},payable:!1,returnParameters:{id:468,nodeType:"ParameterList",parameters:[{constant:!1,id:467,name:"",nodeType:"VariableDeclaration",scope:472,src:"4707:9:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[]"},typeName:{baseType:{id:465,name:"bytes32",nodeType:"ElementaryTypeName",src:"4707:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:466,length:null,nodeType:"ArrayTypeName",src:"4707:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"internal"}],src:"4706:11:1"},scope:553,src:"4662:89:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:479,nodeType:"Block",src:"4803:29:1",statements:[{expression:{argumentTypes:null,id:477,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"4816:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:476,id:478,nodeType:"Return",src:"4809:18:1"}]},documentation:null,id:480,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokens",nodeType:"FunctionDefinition",parameters:{id:473,nodeType:"ParameterList",parameters:[],src:"4773:2:1"},payable:!1,returnParameters:{id:476,nodeType:"ParameterList",parameters:[{constant:!1,id:475,name:"",nodeType:"VariableDeclaration",scope:480,src:"4797:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:474,name:"uint",nodeType:"ElementaryTypeName",src:"4797:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4796:6:1"},scope:553,src:"4755:77:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:487,nodeType:"Block",src:"4888:28:1",statements:[{expression:{argumentTypes:null,id:485,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"4901:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:484,id:486,nodeType:"Return",src:"4894:17:1"}]},documentation:null,id:488,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokenPrice",nodeType:"FunctionDefinition",parameters:{id:481,nodeType:"ParameterList",parameters:[],src:"4858:2:1"},payable:!1,returnParameters:{id:484,nodeType:"ParameterList",parameters:[{constant:!1,id:483,name:"",nodeType:"VariableDeclaration",scope:488,src:"4882:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:482,name:"uint",nodeType:"ElementaryTypeName",src:"4882:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4881:6:1"},scope:553,src:"4836:80:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:551,nodeType:"Block",src:"4977:307:1",statements:[{assignments:[494],declarations:[{constant:!1,id:494,name:"index",nodeType:"VariableDeclaration",scope:552,src:"4983:9:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"},typeName:{id:493,name:"int",nodeType:"ElementaryTypeName",src:"4983:3:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},value:null,visibility:"internal"}],id:497,initialValue:{argumentTypes:null,id:496,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"4995:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:495,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"4996:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}},nodeType:"VariableDeclarationStatement",src:"4983:14:1"},{assignments:[499],declarations:[{constant:!1,id:499,name:"count",nodeType:"VariableDeclaration",scope:552,src:"5003:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:498,name:"uint",nodeType:"ElementaryTypeName",src:"5003:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:501,initialValue:{argumentTypes:null,hexValue:"30",id:500,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5016:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"5003:14:1"},{body:{id:536,nodeType:"Block",src:"5073:138:1",statements:[{condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:519,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:513,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"5084:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:517,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:514,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5095:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:516,indexExpression:{argumentTypes:null,id:515,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5111:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5095:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5084:30:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:">",rightExpression:{argumentTypes:null,id:518,name:"count",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:499,src:"5117:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5084:38:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:null,id:535,nodeType:"IfStatement",src:"5081:124:1",trueBody:{id:534,nodeType:"Block",src:"5124:81:1",statements:[{expression:{argumentTypes:null,id:526,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:520,name:"count",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:499,src:"5134:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:521,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"5142:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:525,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:522,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5153:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:524,indexExpression:{argumentTypes:null,id:523,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5169:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5153:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5142:30:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5134:38:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:527,nodeType:"ExpressionStatement",src:"5134:38:1"},{expression:{argumentTypes:null,id:532,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:528,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5182:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,arguments:[{argumentTypes:null,id:530,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5194:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],expression:{argumentTypes:[{typeIdentifier:"t_uint256",typeString:"uint256"}],id:529,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"5190:3:1",typeDescriptions:{typeIdentifier:"t_type$_t_int256_$",typeString:"type(int256)"},typeName:"int"},id:531,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5190:6:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},src:"5182:14:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},id:533,nodeType:"ExpressionStatement",src:"5182:14:1"}]}}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:509,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:506,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5040:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:507,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5044:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:508,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"5044:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5040:26:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:537,initializationExpression:{assignments:[503],declarations:[{constant:!1,id:503,name:"i",nodeType:"VariableDeclaration",scope:552,src:"5028:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:502,name:"uint",nodeType:"ElementaryTypeName",src:"5028:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:505,initialValue:{argumentTypes:null,hexValue:"30",id:504,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5037:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"5028:10:1"},loopExpression:{expression:{argumentTypes:null,id:511,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"5068:3:1",subExpression:{argumentTypes:null,id:510,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5068:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:512,nodeType:"ExpressionStatement",src:"5068:3:1"},nodeType:"ForStatement",src:"5024:187:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_int256",typeString:"int256"},id:542,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:539,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5225:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,id:541,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"5234:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:540,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5235:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}},src:"5225:11:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:538,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"5217:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:543,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5217:20:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:544,nodeType:"ExpressionStatement",src:"5217:20:1"},{expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:545,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5251:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:549,indexExpression:{argumentTypes:null,arguments:[{argumentTypes:null,id:547,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5272:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}}],expression:{argumentTypes:[{typeIdentifier:"t_int256",typeString:"int256"}],id:546,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"5267:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:548,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5267:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5251:28:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},functionReturnParameters:492,id:550,nodeType:"Return",src:"5244:35:1"}]},documentation:null,id:552,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"winningProposal",nodeType:"FunctionDefinition",parameters:{id:489,nodeType:"ParameterList",parameters:[],src:"4944:2:1"},payable:!1,returnParameters:{id:492,nodeType:"ParameterList",parameters:[{constant:!1,id:491,name:"",nodeType:"VariableDeclaration",scope:552,src:"4968:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:490,name:"bytes32",nodeType:"ElementaryTypeName",src:"4968:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"4967:9:1"},scope:553,src:"4920:364:1",stateMutability:"view",superFunction:null,visibility:"public"}],scope:554,src:"97:5189:1"}],src:"0:5287:1"},legacyAST:{absolutePath:"/Users/khizaralimanzoor/Work/Projects/octane-sunu/contracts/Voting.sol",exportedSymbols:{Voting:[553]},id:554,nodeType:"SourceUnit",nodes:[{id:58,literals:["solidity","^","0.4",".22"],nodeType:"PragmaDirective",src:"0:24:1"},{baseContracts:[],contractDependencies:[],contractKind:"contract",documentation:null,fullyImplemented:!0,id:553,linearizedBaseContracts:[553],name:"Voting",nodeType:"ContractDefinition",nodes:[{canonicalName:"Voting.Voter",id:69,members:[{constant:!1,id:60,name:"voterAddress",nodeType:"VariableDeclaration",scope:69,src:"163:20:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:59,name:"address",nodeType:"ElementaryTypeName",src:"163:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"},{constant:!1,id:62,name:"tokens",nodeType:"VariableDeclaration",scope:69,src:"217:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:61,name:"uint",nodeType:"ElementaryTypeName",src:"217:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:64,name:"voted",nodeType:"VariableDeclaration",scope:69,src:"290:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},typeName:{id:63,name:"bool",nodeType:"ElementaryTypeName",src:"290:4:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},value:null,visibility:"internal"},{constant:!1,id:66,name:"vote",nodeType:"VariableDeclaration",scope:69,src:"368:12:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:65,name:"bytes32",nodeType:"ElementaryTypeName",src:"368:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:68,name:"delegate",nodeType:"VariableDeclaration",scope:69,src:"445:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:67,name:"address",nodeType:"ElementaryTypeName",src:"445:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],name:"Voter",nodeType:"StructDefinition",scope:553,src:"144:322:1",visibility:"public"},{constant:!1,id:73,name:"voters",nodeType:"VariableDeclaration",scope:553,src:"467:39:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter)"},typeName:{id:72,keyType:{id:70,name:"address",nodeType:"ElementaryTypeName",src:"475:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Mapping",src:"467:25:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter)"},valueType:{contractScope:null,id:71,name:"Voter",nodeType:"UserDefinedTypeName",referencedDeclaration:69,src:"486:5:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage_ptr",typeString:"struct Voting.Voter"}}},value:null,visibility:"public"},{constant:!1,id:77,name:"candidates",nodeType:"VariableDeclaration",scope:553,src:"713:42:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"},typeName:{id:76,keyType:{id:74,name:"bytes32",nodeType:"ElementaryTypeName",src:"721:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"Mapping",src:"713:24:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"},valueType:{id:75,name:"uint",nodeType:"ElementaryTypeName",src:"732:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}},value:null,visibility:"public"},{constant:!1,id:80,name:"candidatesIndex",nodeType:"VariableDeclaration",scope:553,src:"759:32:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[]"},typeName:{baseType:{id:78,name:"bytes32",nodeType:"ElementaryTypeName",src:"759:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:79,length:null,nodeType:"ArrayTypeName",src:"759:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"public"},{constant:!1,id:82,name:"totalTokens",nodeType:"VariableDeclaration",scope:553,src:"796:23:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:81,name:"uint",nodeType:"ElementaryTypeName",src:"796:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{constant:!1,id:84,name:"balanceTokens",nodeType:"VariableDeclaration",scope:553,src:"878:25:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:83,name:"uint",nodeType:"ElementaryTypeName",src:"878:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{constant:!1,id:86,name:"tokenPrice",nodeType:"VariableDeclaration",scope:553,src:"961:22:1",stateVariable:!0,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:85,name:"uint",nodeType:"ElementaryTypeName",src:"961:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"public"},{body:{id:139,nodeType:"Block",src:"1236:235:1",statements:[{body:{id:125,nodeType:"Block",src:"1287:95:1",statements:[{expression:{argumentTypes:null,id:115,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:107,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"1295:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:111,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:108,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1306:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:110,indexExpression:{argumentTypes:null,id:109,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1318:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1306:14:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"1295:26:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,arguments:[{argumentTypes:null,hexValue:"30",id:113,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1329:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"}],expression:{argumentTypes:[{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"}],id:112,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"1324:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:114,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1324:7:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1295:36:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:116,nodeType:"ExpressionStatement",src:"1295:36:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,baseExpression:{argumentTypes:null,id:120,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1360:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:122,indexExpression:{argumentTypes:null,id:121,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1372:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1360:14:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}}],expression:{argumentTypes:[{typeIdentifier:"t_bytes32",typeString:"bytes32"}],expression:{argumentTypes:null,id:117,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"1339:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:119,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"push",nodeType:"MemberAccess",referencedDeclaration:null,src:"1339:20:1",typeDescriptions:{typeIdentifier:"t_function_arraypush_nonpayable$_t_bytes32_$returns$_t_uint256_$",typeString:"function (bytes32) returns (uint256)"}},id:123,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1339:36:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:124,nodeType:"ExpressionStatement",src:"1339:36:1"}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:103,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:100,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1258:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:101,name:"_candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:93,src:"1262:11:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[] memory"}},id:102,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"1262:18:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1258:22:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:126,initializationExpression:{assignments:[97],declarations:[{constant:!1,id:97,name:"i",nodeType:"VariableDeclaration",scope:140,src:"1246:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:96,name:"uint",nodeType:"ElementaryTypeName",src:"1246:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:99,initialValue:{argumentTypes:null,hexValue:"30",id:98,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1255:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"1246:10:1"},loopExpression:{expression:{argumentTypes:null,id:105,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"1282:3:1",subExpression:{argumentTypes:null,id:104,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:97,src:"1282:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:106,nodeType:"ExpressionStatement",src:"1282:3:1"},nodeType:"ForStatement",src:"1242:140:1"},{expression:{argumentTypes:null,id:129,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:127,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"1388:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:128,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:88,src:"1402:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1388:20:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:130,nodeType:"ExpressionStatement",src:"1388:20:1"},{expression:{argumentTypes:null,id:133,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:131,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"1414:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:132,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:88,src:"1430:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1414:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:134,nodeType:"ExpressionStatement",src:"1414:22:1"},{expression:{argumentTypes:null,id:137,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:135,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"1442:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:136,name:"_tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:90,src:"1455:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1442:24:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:138,nodeType:"ExpressionStatement",src:"1442:24:1"}]},documentation:null,id:140,implemented:!0,isConstructor:!0,isDeclaredConst:!1,modifiers:[],name:"",nodeType:"FunctionDefinition",parameters:{id:94,nodeType:"ParameterList",parameters:[{constant:!1,id:88,name:"tokens",nodeType:"VariableDeclaration",scope:140,src:"1175:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:87,name:"uint",nodeType:"ElementaryTypeName",src:"1175:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:90,name:"_tokenPrice",nodeType:"VariableDeclaration",scope:140,src:"1188:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:89,name:"uint",nodeType:"ElementaryTypeName",src:"1188:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:93,name:"_candidates",nodeType:"VariableDeclaration",scope:140,src:"1206:21:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[]"},typeName:{baseType:{id:91,name:"bytes32",nodeType:"ElementaryTypeName",src:"1206:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:92,length:null,nodeType:"ArrayTypeName",src:"1206:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"internal"}],src:"1174:54:1"},payable:!1,returnParameters:{id:95,nodeType:"ParameterList",parameters:[],src:"1236:0:1"},scope:553,src:"1163:308:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:151,nodeType:"Block",src:"1543:39:1",statements:[{expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:147,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"1556:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:149,indexExpression:{argumentTypes:null,id:148,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:142,src:"1567:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1556:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:146,id:150,nodeType:"Return",src:"1549:28:1"}]},documentation:null,id:152,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"totalVotesFor",nodeType:"FunctionDefinition",parameters:{id:143,nodeType:"ParameterList",parameters:[{constant:!1,id:142,name:"candidate",nodeType:"VariableDeclaration",scope:152,src:"1498:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:141,name:"bytes32",nodeType:"ElementaryTypeName",src:"1498:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"1497:19:1"},payable:!1,returnParameters:{id:146,nodeType:"ParameterList",parameters:[{constant:!1,id:145,name:"",nodeType:"VariableDeclaration",scope:152,src:"1537:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:144,name:"uint",nodeType:"ElementaryTypeName",src:"1537:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"1536:6:1"},scope:553,src:"1475:107:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:231,nodeType:"Block",src:"1636:698:1",statements:[{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:165,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"!",prefix:!0,src:"1655:25:1",subExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:160,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1656:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:163,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:161,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1663:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:162,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1663:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1656:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:164,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"1656:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:159,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"1647:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:166,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1647:34:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:167,nodeType:"ExpressionStatement",src:"1647:34:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_bool",typeString:"bool"},id:181,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_address",typeString:"address"},id:172,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:169,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1735:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:170,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1741:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:171,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1741:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1735:16:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"BinaryOperation",operator:"&&",rightExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_address",typeString:"address"},id:180,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:173,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1755:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:175,indexExpression:{argumentTypes:null,id:174,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1762:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1755:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:176,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"1755:19:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"BinaryOperation",operator:"==",rightExpression:{argumentTypes:null,arguments:[{argumentTypes:null,hexValue:"30",id:178,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"1786:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"}],expression:{argumentTypes:[{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"}],id:177,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"1778:7:1",typeDescriptions:{typeIdentifier:"t_type$_t_address_$",typeString:"type(address)"},typeName:"address"},id:179,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1778:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1755:33:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},src:"1735:53:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:168,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"1727:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:182,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"1727:62:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:183,nodeType:"ExpressionStatement",src:"1727:62:1"},{expression:{argumentTypes:null,id:190,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:184,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1917:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:187,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:185,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1924:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:186,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1924:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1917:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:188,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"1917:27:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:189,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"1947:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"1917:32:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:191,nodeType:"ExpressionStatement",src:"1917:32:1"},{expression:{argumentTypes:null,id:198,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:192,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1956:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:195,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:193,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"1963:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:194,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"1963:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1956:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:196,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"1956:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:197,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"1985:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"1956:35:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:199,nodeType:"ExpressionStatement",src:"1956:35:1"},{expression:{argumentTypes:null,id:206,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:200,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"1998:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:203,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:201,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2005:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:202,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2005:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"1998:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:204,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"1998:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,hexValue:"74727565",id:205,isConstant:!1,isLValue:!1,isPure:!0,kind:"bool",lValueRequested:!1,nodeType:"Literal",src:"2025:4:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},value:"true"},src:"1998:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:207,nodeType:"ExpressionStatement",src:"1998:31:1"},{condition:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:208,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2040:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:210,indexExpression:{argumentTypes:null,id:209,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2047:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2040:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:211,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"2040:16:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:{id:229,nodeType:"Block",src:"2208:122:1",statements:[{expression:{argumentTypes:null,id:227,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:222,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2296:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:224,indexExpression:{argumentTypes:null,id:223,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2303:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2296:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:225,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2296:17:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:226,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"2317:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2296:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:228,nodeType:"ExpressionStatement",src:"2296:27:1"}]},id:230,nodeType:"IfStatement",src:"2036:294:1",trueBody:{id:221,nodeType:"Block",src:"2058:144:1",statements:[{expression:{argumentTypes:null,id:219,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:212,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"2157:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:217,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:213,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2168:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:215,indexExpression:{argumentTypes:null,id:214,name:"to",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:154,src:"2175:2:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2168:10:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:216,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"2168:15:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"2157:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:218,name:"tokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:156,src:"2188:6:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2157:37:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:220,nodeType:"ExpressionStatement",src:"2157:37:1"}]}}]},documentation:null,id:232,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"delegate",nodeType:"FunctionDefinition",parameters:{id:157,nodeType:"ParameterList",parameters:[{constant:!1,id:154,name:"to",nodeType:"VariableDeclaration",scope:232,src:"1604:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:153,name:"address",nodeType:"ElementaryTypeName",src:"1604:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"},{constant:!1,id:156,name:"tokens",nodeType:"VariableDeclaration",scope:232,src:"1616:11:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:155,name:"uint",nodeType:"ElementaryTypeName",src:"1616:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"1603:25:1"},payable:!1,returnParameters:{id:158,nodeType:"ParameterList",parameters:[],src:"1636:0:1"},scope:553,src:"1586:748:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:301,nodeType:"Block",src:"2547:514:1",statements:[{assignments:[240],declarations:[{constant:!1,id:240,name:"index",nodeType:"VariableDeclaration",scope:302,src:"2553:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:239,name:"uint",nodeType:"ElementaryTypeName",src:"2553:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:244,initialValue:{argumentTypes:null,arguments:[{argumentTypes:null,id:242,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"2583:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}}],expression:{argumentTypes:[{typeIdentifier:"t_bytes32",typeString:"bytes32"}],id:241,name:"indexOfCandidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:337,src:"2566:16:1",typeDescriptions:{typeIdentifier:"t_function_internal_view$_t_bytes32_$returns$_t_uint256_$",typeString:"function (bytes32) view returns (uint256)"}},id:243,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2566:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"VariableDeclarationStatement",src:"2553:40:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_bool",typeString:"bool"},id:259,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:251,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:246,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:240,src:"2672:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,arguments:[{argumentTypes:null,id:249,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"2686:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:248,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"2687:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}}],expression:{argumentTypes:[{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}],id:247,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"2681:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:250,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2681:8:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2672:17:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"BinaryOperation",operator:"&&",rightExpression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:258,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:252,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2693:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:255,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:253,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2700:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:254,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2700:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2693:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:256,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2693:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:">=",rightExpression:{argumentTypes:null,id:257,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2722:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2693:42:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},src:"2672:63:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:245,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"2664:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:260,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2664:72:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:261,nodeType:"ExpressionStatement",src:"2664:72:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:268,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"!",prefix:!0,src:"2798:25:1",subExpression:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:263,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2799:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:266,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:264,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2806:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:265,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2806:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2799:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:267,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"2799:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:262,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"2790:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:269,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"2790:34:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:270,nodeType:"ExpressionStatement",src:"2790:34:1"},{expression:{argumentTypes:null,id:275,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:271,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"2831:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:273,indexExpression:{argumentTypes:null,id:272,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"2842:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,nodeType:"IndexAccess",src:"2831:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:274,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2856:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2831:38:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:276,nodeType:"ExpressionStatement",src:"2831:38:1"},{expression:{argumentTypes:null,id:283,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:277,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2934:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:280,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:278,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2941:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:279,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2941:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2934:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:281,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"2934:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:282,name:"votesInTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:236,src:"2963:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"2934:42:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:284,nodeType:"ExpressionStatement",src:"2934:42:1"},{expression:{argumentTypes:null,id:291,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:285,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"2983:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:288,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:286,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"2990:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:287,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"2990:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"2983:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:289,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"2983:23:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,id:290,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:234,src:"3009:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},src:"2983:35:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:292,nodeType:"ExpressionStatement",src:"2983:35:1"},{expression:{argumentTypes:null,id:299,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:293,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3024:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:296,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:294,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3031:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:295,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3031:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3024:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:297,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"3024:24:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,hexValue:"74727565",id:298,isConstant:!1,isLValue:!1,isPure:!0,kind:"bool",lValueRequested:!1,nodeType:"Literal",src:"3051:4:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},value:"true"},src:"3024:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:300,nodeType:"ExpressionStatement",src:"3024:31:1"}]},documentation:null,id:302,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"vote",nodeType:"FunctionDefinition",parameters:{id:237,nodeType:"ParameterList",parameters:[{constant:!1,id:234,name:"candidate",nodeType:"VariableDeclaration",scope:302,src:"2501:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:233,name:"bytes32",nodeType:"ElementaryTypeName",src:"2501:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:236,name:"votesInTokens",nodeType:"VariableDeclaration",scope:302,src:"2520:18:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:235,name:"uint",nodeType:"ElementaryTypeName",src:"2520:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"2500:39:1"},payable:!1,returnParameters:{id:238,nodeType:"ParameterList",parameters:[],src:"2547:0:1"},scope:553,src:"2487:574:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:336,nodeType:"Block",src:"3137:158:1",statements:[{body:{id:329,nodeType:"Block",src:"3192:78:1",statements:[{condition:{argumentTypes:null,commonType:{typeIdentifier:"t_bytes32",typeString:"bytes32"},id:324,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:320,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"3204:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:322,indexExpression:{argumentTypes:null,id:321,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3220:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3204:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},nodeType:"BinaryOperation",operator:"==",rightExpression:{argumentTypes:null,id:323,name:"candidate",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:304,src:"3226:9:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},src:"3204:31:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:null,id:328,nodeType:"IfStatement",src:"3200:64:1",trueBody:{id:327,nodeType:"Block",src:"3237:27:1",statements:[{expression:{argumentTypes:null,id:325,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3254:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:308,id:326,nodeType:"Return",src:"3247:8:1"}]}}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:316,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:313,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3159:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:314,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"3163:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:315,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"3163:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3159:26:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:330,initializationExpression:{assignments:[310],declarations:[{constant:!1,id:310,name:"i",nodeType:"VariableDeclaration",scope:337,src:"3147:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:309,name:"uint",nodeType:"ElementaryTypeName",src:"3147:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:312,initialValue:{argumentTypes:null,hexValue:"30",id:311,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"3156:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"3147:10:1"},loopExpression:{expression:{argumentTypes:null,id:318,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"3187:3:1",subExpression:{argumentTypes:null,id:317,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:310,src:"3187:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:319,nodeType:"ExpressionStatement",src:"3187:3:1"},nodeType:"ForStatement",src:"3143:127:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:333,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"3287:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:332,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"3288:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}}],expression:{argumentTypes:[{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}],id:331,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"3282:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:334,isConstant:!1,isLValue:!1,isPure:!0,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"3282:8:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:308,id:335,nodeType:"Return",src:"3275:15:1"}]},documentation:null,id:337,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"indexOfCandidate",nodeType:"FunctionDefinition",parameters:{id:305,nodeType:"ParameterList",parameters:[{constant:!1,id:304,name:"candidate",nodeType:"VariableDeclaration",scope:337,src:"3091:17:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:303,name:"bytes32",nodeType:"ElementaryTypeName",src:"3091:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"3090:19:1"},payable:!1,returnParameters:{id:308,nodeType:"ParameterList",parameters:[{constant:!1,id:307,name:"",nodeType:"VariableDeclaration",scope:337,src:"3131:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:306,name:"uint",nodeType:"ElementaryTypeName",src:"3131:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3130:6:1"},scope:553,src:"3065:230:1",stateMutability:"view",superFunction:null,visibility:"public"},{anonymous:!1,documentation:null,id:345,name:"TokensInfo",nodeType:"EventDefinition",parameters:{id:344,nodeType:"ParameterList",parameters:[{constant:!1,id:339,indexed:!1,name:"total",nodeType:"VariableDeclaration",scope:345,src:"3321:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:338,name:"uint",nodeType:"ElementaryTypeName",src:"3321:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:341,indexed:!1,name:"available",nodeType:"VariableDeclaration",scope:345,src:"3337:14:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:340,name:"uint",nodeType:"ElementaryTypeName",src:"3337:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:343,indexed:!1,name:"price",nodeType:"VariableDeclaration",scope:345,src:"3357:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:342,name:"uint",nodeType:"ElementaryTypeName",src:"3357:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3315:56:1"},src:"3299:73:1"},{body:{id:359,nodeType:"Block",src:"3439:58:1",statements:[{expression:{argumentTypes:null,components:[{argumentTypes:null,id:354,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"3453:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,id:355,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3466:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,id:356,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"3481:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],id:357,isConstant:!1,isInlineArray:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"TupleExpression",src:"3452:40:1",typeDescriptions:{typeIdentifier:"t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$",typeString:"tuple(uint256,uint256,uint256)"}},functionReturnParameters:353,id:358,nodeType:"Return",src:"3445:47:1"}]},documentation:null,id:360,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokensInfo",nodeType:"FunctionDefinition",parameters:{id:346,nodeType:"ParameterList",parameters:[],src:"3398:2:1"},payable:!1,returnParameters:{id:353,nodeType:"ParameterList",parameters:[{constant:!1,id:348,name:"",nodeType:"VariableDeclaration",scope:360,src:"3421:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:347,name:"uint",nodeType:"ElementaryTypeName",src:"3421:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:350,name:"",nodeType:"VariableDeclaration",scope:360,src:"3427:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:349,name:"uint",nodeType:"ElementaryTypeName",src:"3427:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:352,name:"",nodeType:"VariableDeclaration",scope:360,src:"3433:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:351,name:"uint",nodeType:"ElementaryTypeName",src:"3433:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"3420:18:1"},scope:553,src:"3376:121:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:397,nodeType:"Block",src:"3531:228:1",statements:[{assignments:[364],declarations:[{constant:!1,id:364,name:"tokensToBuy",nodeType:"VariableDeclaration",scope:398,src:"3537:16:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:363,name:"uint",nodeType:"ElementaryTypeName",src:"3537:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:369,initialValue:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:368,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,expression:{argumentTypes:null,id:365,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3556:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:366,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"value",nodeType:"MemberAccess",referencedDeclaration:null,src:"3556:9:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"/",rightExpression:{argumentTypes:null,id:367,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"3568:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3556:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"VariableDeclarationStatement",src:"3537:41:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:373,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:371,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3593:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<=",rightExpression:{argumentTypes:null,id:372,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3608:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3593:28:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:370,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"3585:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:374,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"3585:37:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:375,nodeType:"ExpressionStatement",src:"3585:37:1"},{expression:{argumentTypes:null,id:383,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:376,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3629:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:379,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:377,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3636:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:378,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3636:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3629:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:380,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"voterAddress",nodeType:"MemberAccess",referencedDeclaration:60,src:"3629:31:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,expression:{argumentTypes:null,id:381,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3663:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:382,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3663:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},src:"3629:44:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:384,nodeType:"ExpressionStatement",src:"3629:44:1"},{expression:{argumentTypes:null,id:391,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:385,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3679:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:388,indexExpression:{argumentTypes:null,expression:{argumentTypes:null,id:386,name:"msg",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:568,src:"3686:3:1",typeDescriptions:{typeIdentifier:"t_magic_message",typeString:"msg"}},id:387,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"sender",nodeType:"MemberAccess",referencedDeclaration:null,src:"3686:10:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3679:18:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:389,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!0,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"3679:25:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"+=",rightHandSide:{argumentTypes:null,id:390,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3708:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3679:40:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:392,nodeType:"ExpressionStatement",src:"3679:40:1"},{expression:{argumentTypes:null,id:395,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:393,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"3726:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"-=",rightHandSide:{argumentTypes:null,id:394,name:"tokensToBuy",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:364,src:"3743:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"3726:28:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:396,nodeType:"ExpressionStatement",src:"3726:28:1"}]},documentation:null,id:398,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"buy",nodeType:"FunctionDefinition",parameters:{id:361,nodeType:"ParameterList",parameters:[],src:"3513:2:1"},payable:!0,returnParameters:{id:362,nodeType:"ParameterList",parameters:[],src:"3531:0:1"},scope:553,src:"3501:258:1",stateMutability:"payable",superFunction:null,visibility:"public"},{body:{id:429,nodeType:"Block",src:"3849:119:1",statements:[{expression:{argumentTypes:null,components:[{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:411,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3863:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:413,indexExpression:{argumentTypes:null,id:412,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3870:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3863:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:414,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"tokens",nodeType:"MemberAccess",referencedDeclaration:62,src:"3863:19:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:415,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3890:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:417,indexExpression:{argumentTypes:null,id:416,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3897:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3890:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:418,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"vote",nodeType:"MemberAccess",referencedDeclaration:66,src:"3890:17:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:419,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3915:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:421,indexExpression:{argumentTypes:null,id:420,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3922:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3915:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:422,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"voted",nodeType:"MemberAccess",referencedDeclaration:64,src:"3915:18:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},{argumentTypes:null,expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:423,name:"voters",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:73,src:"3941:6:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_address_$_t_struct$_Voter_$69_storage_$",typeString:"mapping(address => struct Voting.Voter storage ref)"}},id:425,indexExpression:{argumentTypes:null,id:424,name:"user",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:400,src:"3948:4:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"3941:12:1",typeDescriptions:{typeIdentifier:"t_struct$_Voter_$69_storage",typeString:"struct Voting.Voter storage ref"}},id:426,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"delegate",nodeType:"MemberAccess",referencedDeclaration:68,src:"3941:21:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}}],id:427,isConstant:!1,isInlineArray:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"TupleExpression",src:"3862:101:1",typeDescriptions:{typeIdentifier:"t_tuple$_t_uint256_$_t_bytes32_$_t_bool_$_t_address_$",typeString:"tuple(uint256,bytes32,bool,address)"}},functionReturnParameters:410,id:428,nodeType:"Return",src:"3855:108:1"}]},documentation:null,id:430,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"voterDetails",nodeType:"FunctionDefinition",parameters:{id:401,nodeType:"ParameterList",parameters:[{constant:!1,id:400,name:"user",nodeType:"VariableDeclaration",scope:430,src:"3785:12:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:399,name:"address",nodeType:"ElementaryTypeName",src:"3785:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"3784:14:1"},payable:!1,returnParameters:{id:410,nodeType:"ParameterList",parameters:[{constant:!1,id:403,name:"",nodeType:"VariableDeclaration",scope:430,src:"3819:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:402,name:"uint",nodeType:"ElementaryTypeName",src:"3819:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"},{constant:!1,id:405,name:"",nodeType:"VariableDeclaration",scope:430,src:"3825:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:404,name:"bytes32",nodeType:"ElementaryTypeName",src:"3825:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"},{constant:!1,id:407,name:"",nodeType:"VariableDeclaration",scope:430,src:"3834:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"},typeName:{id:406,name:"bool",nodeType:"ElementaryTypeName",src:"3834:4:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},value:null,visibility:"internal"},{constant:!1,id:409,name:"",nodeType:"VariableDeclaration",scope:430,src:"3840:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:408,name:"address",nodeType:"ElementaryTypeName",src:"3840:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"3818:30:1"},scope:553,src:"3763:205:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:439,nodeType:"Block",src:"4428:45:1",statements:[{expression:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:437,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:435,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"4441:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"-",rightExpression:{argumentTypes:null,id:436,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"4455:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"4441:27:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:434,id:438,nodeType:"Return",src:"4434:34:1"}]},documentation:null,id:440,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"tokensSold",nodeType:"FunctionDefinition",parameters:{id:431,nodeType:"ParameterList",parameters:[],src:"4398:2:1"},payable:!1,returnParameters:{id:434,nodeType:"ParameterList",parameters:[{constant:!1,id:433,name:"",nodeType:"VariableDeclaration",scope:440,src:"4422:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:432,name:"uint",nodeType:"ElementaryTypeName",src:"4422:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4421:6:1"},scope:553,src:"4379:94:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:447,nodeType:"Block",src:"4529:31:1",statements:[{expression:{argumentTypes:null,id:445,name:"balanceTokens",nodeType:"Identifier",overloadedDeclarations:[84],referencedDeclaration:84,src:"4542:13:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:444,id:446,nodeType:"Return",src:"4535:20:1"}]},documentation:null,id:448,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"balanceTokens",nodeType:"FunctionDefinition",parameters:{id:441,nodeType:"ParameterList",parameters:[],src:"4499:2:1"},payable:!1,returnParameters:{id:444,nodeType:"ParameterList",parameters:[{constant:!1,id:443,name:"",nodeType:"VariableDeclaration",scope:448,src:"4523:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:442,name:"uint",nodeType:"ElementaryTypeName",src:"4523:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4522:6:1"},scope:553,src:"4477:83:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:462,nodeType:"Block",src:"4608:50:1",statements:[{expression:{argumentTypes:null,arguments:[{argumentTypes:null,expression:{argumentTypes:null,arguments:[{argumentTypes:null,id:457,name:"this",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:583,src:"4639:4:1",typeDescriptions:{typeIdentifier:"t_contract$_Voting_$553",typeString:"contract Voting"}}],expression:{argumentTypes:[{typeIdentifier:"t_contract$_Voting_$553",typeString:"contract Voting"}],id:456,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"4631:7:1",typeDescriptions:{typeIdentifier:"t_type$_t_address_$",typeString:"type(address)"},typeName:"address"},id:458,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"4631:13:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:459,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"balance",nodeType:"MemberAccess",referencedDeclaration:null,src:"4631:21:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],expression:{argumentTypes:[{typeIdentifier:"t_uint256",typeString:"uint256"}],expression:{argumentTypes:null,id:453,name:"account",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:450,src:"4614:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},id:455,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,memberName:"transfer",nodeType:"MemberAccess",referencedDeclaration:null,src:"4614:16:1",typeDescriptions:{typeIdentifier:"t_function_transfer_nonpayable$_t_uint256_$returns$__$",typeString:"function (uint256)"}},id:460,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"4614:39:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:461,nodeType:"ExpressionStatement",src:"4614:39:1"}]},documentation:null,id:463,implemented:!0,isConstructor:!1,isDeclaredConst:!1,modifiers:[],name:"transferTo",nodeType:"FunctionDefinition",parameters:{id:451,nodeType:"ParameterList",parameters:[{constant:!1,id:450,name:"account",nodeType:"VariableDeclaration",scope:463,src:"4584:15:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"},typeName:{id:449,name:"address",nodeType:"ElementaryTypeName",src:"4584:7:1",typeDescriptions:{typeIdentifier:"t_address",typeString:"address"}},value:null,visibility:"internal"}],src:"4583:17:1"},payable:!1,returnParameters:{id:452,nodeType:"ParameterList",parameters:[],src:"4608:0:1"},scope:553,src:"4564:94:1",stateMutability:"nonpayable",superFunction:null,visibility:"public"},{body:{id:471,nodeType:"Block",src:"4718:33:1",statements:[{expression:{argumentTypes:null,id:469,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"4731:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},functionReturnParameters:468,id:470,nodeType:"Return",src:"4724:22:1"}]},documentation:null,id:472,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"allCandidates",nodeType:"FunctionDefinition",parameters:{id:464,nodeType:"ParameterList",parameters:[],src:"4684:2:1"},payable:!1,returnParameters:{id:468,nodeType:"ParameterList",parameters:[{constant:!1,id:467,name:"",nodeType:"VariableDeclaration",scope:472,src:"4707:9:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_memory_ptr",typeString:"bytes32[]"},typeName:{baseType:{id:465,name:"bytes32",nodeType:"ElementaryTypeName",src:"4707:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},id:466,length:null,nodeType:"ArrayTypeName",src:"4707:9:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage_ptr",typeString:"bytes32[]"}},value:null,visibility:"internal"}],src:"4706:11:1"},scope:553,src:"4662:89:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:479,nodeType:"Block",src:"4803:29:1",statements:[{expression:{argumentTypes:null,id:477,name:"totalTokens",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:82,src:"4816:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:476,id:478,nodeType:"Return",src:"4809:18:1"}]},documentation:null,id:480,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokens",nodeType:"FunctionDefinition",parameters:{id:473,nodeType:"ParameterList",parameters:[],src:"4773:2:1"},payable:!1,returnParameters:{id:476,nodeType:"ParameterList",parameters:[{constant:!1,id:475,name:"",nodeType:"VariableDeclaration",scope:480,src:"4797:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:474,name:"uint",nodeType:"ElementaryTypeName",src:"4797:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4796:6:1"},scope:553,src:"4755:77:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:487,nodeType:"Block",src:"4888:28:1",statements:[{expression:{argumentTypes:null,id:485,name:"tokenPrice",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:86,src:"4901:10:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},functionReturnParameters:484,id:486,nodeType:"Return",src:"4894:17:1"}]},documentation:null,id:488,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"getTokenPrice",nodeType:"FunctionDefinition",parameters:{id:481,nodeType:"ParameterList",parameters:[],src:"4858:2:1"},payable:!1,returnParameters:{id:484,nodeType:"ParameterList",parameters:[{constant:!1,id:483,name:"",nodeType:"VariableDeclaration",scope:488,src:"4882:4:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:482,name:"uint",nodeType:"ElementaryTypeName",src:"4882:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],src:"4881:6:1"},scope:553,src:"4836:80:1",stateMutability:"view",superFunction:null,visibility:"public"},{body:{id:551,nodeType:"Block",src:"4977:307:1",statements:[{assignments:[494],declarations:[{constant:!1,id:494,name:"index",nodeType:"VariableDeclaration",scope:552,src:"4983:9:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"},typeName:{id:493,name:"int",nodeType:"ElementaryTypeName",src:"4983:3:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},value:null,visibility:"internal"}],id:497,initialValue:{argumentTypes:null,id:496,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"4995:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:495,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"4996:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}},nodeType:"VariableDeclarationStatement",src:"4983:14:1"},{assignments:[499],declarations:[{constant:!1,id:499,name:"count",nodeType:"VariableDeclaration",scope:552,src:"5003:10:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:498,name:"uint",nodeType:"ElementaryTypeName",src:"5003:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:501,initialValue:{argumentTypes:null,hexValue:"30",id:500,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5016:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"5003:14:1"},{body:{id:536,nodeType:"Block",src:"5073:138:1",statements:[{condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:519,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:513,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"5084:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:517,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:514,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5095:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:516,indexExpression:{argumentTypes:null,id:515,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5111:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5095:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5084:30:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:">",rightExpression:{argumentTypes:null,id:518,name:"count",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:499,src:"5117:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5084:38:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},falseBody:null,id:535,nodeType:"IfStatement",src:"5081:124:1",trueBody:{id:534,nodeType:"Block",src:"5124:81:1",statements:[{expression:{argumentTypes:null,id:526,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:520,name:"count",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:499,src:"5134:5:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,baseExpression:{argumentTypes:null,id:521,name:"candidates",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:77,src:"5142:10:1",typeDescriptions:{typeIdentifier:"t_mapping$_t_bytes32_$_t_uint256_$",typeString:"mapping(bytes32 => uint256)"}},id:525,indexExpression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:522,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5153:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:524,indexExpression:{argumentTypes:null,id:523,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5169:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5153:18:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5142:30:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5134:38:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:527,nodeType:"ExpressionStatement",src:"5134:38:1"},{expression:{argumentTypes:null,id:532,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftHandSide:{argumentTypes:null,id:528,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5182:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},nodeType:"Assignment",operator:"=",rightHandSide:{argumentTypes:null,arguments:[{argumentTypes:null,id:530,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5194:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}}],expression:{argumentTypes:[{typeIdentifier:"t_uint256",typeString:"uint256"}],id:529,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"5190:3:1",typeDescriptions:{typeIdentifier:"t_type$_t_int256_$",typeString:"type(int256)"},typeName:"int"},id:531,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5190:6:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},src:"5182:14:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},id:533,nodeType:"ExpressionStatement",src:"5182:14:1"}]}}]},condition:{argumentTypes:null,commonType:{typeIdentifier:"t_uint256",typeString:"uint256"},id:509,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:506,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5040:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},nodeType:"BinaryOperation",operator:"<",rightExpression:{argumentTypes:null,expression:{argumentTypes:null,id:507,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5044:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:508,isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,memberName:"length",nodeType:"MemberAccess",referencedDeclaration:null,src:"5044:22:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},src:"5040:26:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}},id:537,initializationExpression:{assignments:[503],declarations:[{constant:!1,id:503,name:"i",nodeType:"VariableDeclaration",scope:552,src:"5028:6:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"},typeName:{id:502,name:"uint",nodeType:"ElementaryTypeName",src:"5028:4:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},value:null,visibility:"internal"}],id:505,initialValue:{argumentTypes:null,hexValue:"30",id:504,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5037:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_0_by_1",typeString:"int_const 0"},value:"0"},nodeType:"VariableDeclarationStatement",src:"5028:10:1"},loopExpression:{expression:{argumentTypes:null,id:511,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,nodeType:"UnaryOperation",operator:"++",prefix:!1,src:"5068:3:1",subExpression:{argumentTypes:null,id:510,name:"i",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:503,src:"5068:1:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},id:512,nodeType:"ExpressionStatement",src:"5068:3:1"},nodeType:"ForStatement",src:"5024:187:1"},{expression:{argumentTypes:null,arguments:[{argumentTypes:null,commonType:{typeIdentifier:"t_int256",typeString:"int256"},id:542,isConstant:!1,isLValue:!1,isPure:!1,lValueRequested:!1,leftExpression:{argumentTypes:null,id:539,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5225:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}},nodeType:"BinaryOperation",operator:"!=",rightExpression:{argumentTypes:null,id:541,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"UnaryOperation",operator:"-",prefix:!0,src:"5234:2:1",subExpression:{argumentTypes:null,hexValue:"31",id:540,isConstant:!1,isLValue:!1,isPure:!0,kind:"number",lValueRequested:!1,nodeType:"Literal",src:"5235:1:1",subdenomination:null,typeDescriptions:{typeIdentifier:"t_rational_1_by_1",typeString:"int_const 1"},value:"1"},typeDescriptions:{typeIdentifier:"t_rational_-1_by_1",typeString:"int_const -1"}},src:"5225:11:1",typeDescriptions:{typeIdentifier:"t_bool",typeString:"bool"}}],expression:{argumentTypes:[{typeIdentifier:"t_bool",typeString:"bool"}],id:538,name:"require",nodeType:"Identifier",overloadedDeclarations:[571,572],referencedDeclaration:571,src:"5217:7:1",typeDescriptions:{typeIdentifier:"t_function_require_pure$_t_bool_$returns$__$",typeString:"function (bool) pure"}},id:543,isConstant:!1,isLValue:!1,isPure:!1,kind:"functionCall",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5217:20:1",typeDescriptions:{typeIdentifier:"t_tuple$__$",typeString:"tuple()"}},id:544,nodeType:"ExpressionStatement",src:"5217:20:1"},{expression:{argumentTypes:null,baseExpression:{argumentTypes:null,id:545,name:"candidatesIndex",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:80,src:"5251:15:1",typeDescriptions:{typeIdentifier:"t_array$_t_bytes32_$dyn_storage",typeString:"bytes32[] storage ref"}},id:549,indexExpression:{argumentTypes:null,arguments:[{argumentTypes:null,id:547,name:"index",nodeType:"Identifier",overloadedDeclarations:[],referencedDeclaration:494,src:"5272:5:1",typeDescriptions:{typeIdentifier:"t_int256",typeString:"int256"}}],expression:{argumentTypes:[{typeIdentifier:"t_int256",typeString:"int256"}],id:546,isConstant:!1,isLValue:!1,isPure:!0,lValueRequested:!1,nodeType:"ElementaryTypeNameExpression",src:"5267:4:1",typeDescriptions:{typeIdentifier:"t_type$_t_uint256_$",typeString:"type(uint256)"},typeName:"uint"},id:548,isConstant:!1,isLValue:!1,isPure:!1,kind:"typeConversion",lValueRequested:!1,names:[],nodeType:"FunctionCall",src:"5267:11:1",typeDescriptions:{typeIdentifier:"t_uint256",typeString:"uint256"}},isConstant:!1,isLValue:!0,isPure:!1,lValueRequested:!1,nodeType:"IndexAccess",src:"5251:28:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},functionReturnParameters:492,id:550,nodeType:"Return",src:"5244:35:1"}]},documentation:null,id:552,implemented:!0,isConstructor:!1,isDeclaredConst:!0,modifiers:[],name:"winningProposal",nodeType:"FunctionDefinition",parameters:{id:489,nodeType:"ParameterList",parameters:[],src:"4944:2:1"},payable:!1,returnParameters:{id:492,nodeType:"ParameterList",parameters:[{constant:!1,id:491,name:"",nodeType:"VariableDeclaration",scope:552,src:"4968:7:1",stateVariable:!1,storageLocation:"default",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"},typeName:{id:490,name:"bytes32",nodeType:"ElementaryTypeName",src:"4968:7:1",typeDescriptions:{typeIdentifier:"t_bytes32",typeString:"bytes32"}},value:null,visibility:"internal"}],src:"4967:9:1"},scope:553,src:"4920:364:1",stateMutability:"view",superFunction:null,visibility:"public"}],scope:554,src:"97:5189:1"}],src:"0:5287:1"},compiler:{name:"solc",version:"0.4.23+commit.124ca40d.Emscripten.clang"},networks:{4:{events:{},links:{},address:"0x090d756d35432cbc2f6342a734889cbb913105d7",transactionHash:"0x699731151e94aa3b8471c443c7340e0ba0decbdbb47519b703d7c2c5e1a16ced"},1526208746720:{events:{},links:{},address:"0x35646f657e3c039cbfadd53ca0ce29bf5846e39f",transactionHash:"0x9cbc5fc8594a493a57e8fbc1f3209cf3ff7c5faae592ad6be0e3c7109ee5c409"},1526290058803:{events:{},links:{},address:"0x47a1e6f38f88f20d971995923842171c7c678dc3",transactionHash:"0xef192f3823b7b0d577934f9896a4fdda6982ecbf37c08a7b5ff80487a8c07082"},1526290613878:{events:{},links:{},address:"0xca060f56b749855cee56502228a778adc3bf3a8e",transactionHash:"0xef192f3823b7b0d577934f9896a4fdda6982ecbf37c08a7b5ff80487a8c07082"},1526371660281:{events:{},links:{},address:"0x1c168fd29e50d1bea4c399bdc69e87883c275941",transactionHash:"0xffade77569c4016e086248a3a1524e157828e8e1b8f7e52f4d62a65c890f331b"},1526938434838:{events:{},links:{},address:"0xcb29c33734a9383403dfce8dd5d84c733d846e45",transactionHash:"0xef192f3823b7b0d577934f9896a4fdda6982ecbf37c08a7b5ff80487a8c07082"}},schemaVersion:"2.0.0",updatedAt:"2018-05-22T00:09:37.101Z"}},"49sm":function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"4Zld":function(e,t,n){var r=n("ZMb4"),i=n("Xkrw"),o=n("6ChA"),s=n("GqWc"),a=function(e){r.config(o.ETH_BIGNUMBER_ROUNDING_MODE);var t=i.padLeft(i.toTwosComplement(e).toString(16),64);return new s(t)},u=function(e){var t=e.staticPart()||"0";return function(e){return"1"===new r(e.substr(0,1),16).toString(2).substr(0,1)}(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},l=function(e){var t=e.staticPart()||"0";return new r(t,16)};e.exports={formatInputInt:a,formatInputBytes:function(e){var t=i.toHex(e).substr(2),n=Math.floor((t.length+63)/64);return t=i.padRight(t,64*n),new s(t)},formatInputDynamicBytes:function(e){var t=i.toHex(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputString:function(e){var t=i.fromUtf8(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputBool:function(e){return new s("000000000000000000000000000000000000000000000000000000000000000"+(e?"1":"0"))},formatInputReal:function(e){return a(new r(e).times(new r(2).pow(128)))},formatOutputInt:u,formatOutputUInt:l,formatOutputReal:function(e){return u(e).dividedBy(new r(2).pow(128))},formatOutputUReal:function(e){return l(e).dividedBy(new r(2).pow(128))},formatOutputBool:function(e){return"0000000000000000000000000000000000000000000000000000000000000001"===e.staticPart()},formatOutputBytes:function(e,t){var n=t.match(/^bytes([0-9]*)/),r=parseInt(n[1]);return"0x"+e.staticPart().slice(0,2*r)},formatOutputDynamicBytes:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return"0x"+e.dynamicPart().substr(64,t)},formatOutputString:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return i.toUtf8(e.dynamicPart().substr(64,t))},formatOutputAddress:function(e){var t=e.staticPart();return"0x"+t.slice(t.length-40,t.length)}}},"4m0o":function(e,t,n){"use strict";var r=n("Xkrw"),i=n("6ChA"),o=n("zb58"),s=function(e){if(void 0!==e)return function(e){return"latest"===e||"pending"===e||"earliest"===e}(e)?e:r.toHex(e)},a=function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.nonce=r.toDecimal(e.nonce),e.gas=r.toDecimal(e.gas),e.gasPrice=r.toBigNumber(e.gasPrice),e.value=r.toBigNumber(e.value),e},u=function(e){return e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.logIndex&&(e.logIndex=r.toDecimal(e.logIndex)),e},l=function(e){var t=new o(e);if(t.isValid()&&t.isDirect())return"0x"+t.address();if(r.isStrictAddress(e))return e;if(r.isAddress(e))return"0x"+e;throw new Error("invalid address")};e.exports={inputDefaultBlockNumberFormatter:function(e){return void 0===e?i.defaultBlock:s(e)},inputBlockNumberFormatter:s,inputCallFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from&&(e.from=l(e.from)),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputTransactionFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from=l(e.from),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputAddressFormatter:l,inputPostFormatter:function(e){return e.ttl=r.fromDecimal(e.ttl),e.workToProve=r.fromDecimal(e.workToProve),e.priority=r.fromDecimal(e.priority),r.isArray(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map(function(e){return 0===e.indexOf("0x")?e:r.fromUtf8(e)}),e},outputBigNumberFormatter:function(e){return r.toBigNumber(e)},outputTransactionFormatter:a,outputTransactionReceiptFormatter:function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.cumulativeGasUsed=r.toDecimal(e.cumulativeGasUsed),e.gasUsed=r.toDecimal(e.gasUsed),r.isArray(e.logs)&&(e.logs=e.logs.map(function(e){return u(e)})),e},outputBlockFormatter:function(e){return e.gasLimit=r.toDecimal(e.gasLimit),e.gasUsed=r.toDecimal(e.gasUsed),e.size=r.toDecimal(e.size),e.timestamp=r.toDecimal(e.timestamp),null!==e.number&&(e.number=r.toDecimal(e.number)),e.difficulty=r.toBigNumber(e.difficulty),e.totalDifficulty=r.toBigNumber(e.totalDifficulty),r.isArray(e.transactions)&&e.transactions.forEach(function(e){if(!r.isString(e))return a(e)}),e},outputLogFormatter:u,outputPostFormatter:function(e){return e.expiry=r.toDecimal(e.expiry),e.sent=r.toDecimal(e.sent),e.ttl=r.toDecimal(e.ttl),e.workProved=r.toDecimal(e.workProved),e.topics||(e.topics=[]),e.topics=e.topics.map(function(e){return r.toAscii(e)}),e},outputSyncingFormatter:function(e){return e?(e.startingBlock=r.toDecimal(e.startingBlock),e.currentBlock=r.toDecimal(e.currentBlock),e.highestBlock=r.toDecimal(e.highestBlock),e.knownStates&&(e.knownStates=r.toDecimal(e.knownStates),e.pulledStates=r.toDecimal(e.pulledStates)),e):e}}},"4rvP":function(e,t,n){var r=n("NFKh"),i=n("5hvy");e.exports=function(e,t){return t&&"hex"===t.encoding&&(e.length>2&&"0x"===e.substr(0,2)&&(e=e.substr(2)),e=r.enc.Hex.parse(e)),i(e,{outputLength:256}).toString()}},"5hAZ":function(e,t,n){"use strict";t.XMLHttpRequest="undefined"==typeof XMLHttpRequest?{}:XMLHttpRequest},"5hvy":function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("MlIO"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.x64.Word,a=t.algo,u=[],l=[],c=[];!function(){for(var e=1,t=0,n=0;n<24;n++){u[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,f=0,p=0;p<7;p++){if(1&i){var d=(1<<p)-1;d<32?f^=1<<d:a^=1<<d-32}128&i?i=i<<1^113:i<<=1}c[o]=s.create(a,f)}}();var f=[];!function(){for(var e=0;e<25;e++)f[e]=s.create()}();var p=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],s=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(A=n[i]).high^=s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),A.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var d=0,h=0,y=0;y<5;y++)d^=(A=n[p+5*y]).high,h^=A.low;var m=f[p];m.high=d,m.low=h}for(p=0;p<5;p++){var g=f[(p+4)%5],v=f[(p+1)%5],b=v.high,_=v.low;for(d=g.high^(b<<1|_>>>31),h=g.low^(_<<1|b>>>31),y=0;y<5;y++)(A=n[p+5*y]).high^=d,A.low^=h}for(var w=1;w<25;w++){var T=(A=n[w]).high,x=A.low,S=u[w];S<32?(d=T<<S|x>>>32-S,h=x<<S|T>>>32-S):(d=x<<S-32|T>>>64-S,h=T<<S-32|x>>>64-S);var I=f[l[w]];I.high=d,I.low=h}var D=f[0],C=n[0];for(D.high=C.high,D.low=C.low,p=0;p<5;p++)for(y=0;y<5;y++){var k=f[w=p+5*y],E=f[(p+1)%5+5*y],M=f[(p+2)%5+5*y];(A=n[w]).high=k.high^~E.high&M.high,A.low=k.low^~E.low&M.low}var A,P=c[a];(A=n[0]).high^=P.high,A.low^=P.low}},_doFinalize:function(){var t=this._data,n=t.words,r=8*t.sigBytes,o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,l=[],c=0;c<u;c++){var f=s[c],p=f.high,d=f.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),l.push(d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)),l.push(p)}return new i.init(l,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),r.SHA3)},"60iU":function(e,t,n){"use strict";n.r(t),n.d(t,"Notification",function(){return s});var r=n(null),i=n(null),o=n("XlPw"),s=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}},e.prototype.do=function(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}},e.prototype.accept=function(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){switch(this.kind){case"N":return Object(i.a)(this.value);case"E":return Object(o.throwError)(this.error);case"C":return Object(r.a)()}throw new Error("unexpected notification kind value")},e.createNext=function(t){return void 0!==t?new e("N",t):e.undefinedValueNotification},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e}()},"6ChA":function(e,t,n){var r=n("ZMb4");e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"],ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},"6Er7":function(e){e.exports=[{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"value",type:"uint256"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"indirectId",type:"bytes32"},{name:"value",type:"uint256"}],name:"icapTransfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"to",type:"bytes32"}],name:"deposit",outputs:[],payable:!0,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"AnonymousDeposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"indirectId",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"IcapTransfer",type:"event"}]},"6UMM":function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=n("tjlA").Buffer}catch(e){}function a(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)this.words[o]|=(s=e[i]|e[i-1]<<8|e[i-2]<<16)<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)this.words[o]|=(s=e[i]|e[i+1]<<8|e[i+2]<<16)<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=a(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=a(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;i=i/t|0;for(var o=e.length-n,s=o%--r,a=Math.min(o,o-s)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var f=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=s/67108864|0;n.words[0]=67108863&s;for(var u=1;u<r;u++){for(var l=a>>>26,c=67108863&a,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++)l+=(s=(i=0|e.words[u-p|0])*(o=0|t.words[p])+c)/67108864|0,c=67108863&s;n.words[u]=0|c,a=0|l}return 0!==a?n.words[u]=0|a:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(e=e||10,t=0|t||1,16===e||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var p=c[e],d=f[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modn(d).toString(e);n=(h=h.idivn(d)).isZero()?y+n:l[p-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},o.prototype._countBits=Math.clz32?function(e){return 32-Math.clz32(e)}:function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)this.words[o]=67108863&(t=(0|n.words[o])+(0|r.words[o])+i),i=t>>>26;for(;0!==i&&o<n.length;o++)this.words[o]=67108863&(t=(0|n.words[o])+i),i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,n){var r,i,o,s=e.words,a=t.words,u=n.words,l=0,c=0|s[0],f=8191&c,p=c>>>13,d=0|s[1],h=8191&d,y=d>>>13,m=0|s[2],g=8191&m,v=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,T=0|s[4],x=8191&T,S=T>>>13,I=0|s[5],D=8191&I,C=I>>>13,k=0|s[6],E=8191&k,M=k>>>13,A=0|s[7],P=8191&A,V=A>>>13,N=0|s[8],O=8191&N,R=N>>>13,L=0|s[9],F=8191&L,B=L>>>13,q=0|a[0],j=8191&q,$=q>>>13,U=0|a[1],H=8191&U,z=U>>>13,G=0|a[2],W=8191&G,Z=G>>>13,K=0|a[3],J=8191&K,X=K>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],fe=8191&ce,pe=ce>>>13,de=0|a[9],he=8191&de,ye=de>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(f,j))|0)+((8191&(i=(i=Math.imul(f,$))+Math.imul(p,j)|0))<<13)|0;l=((o=Math.imul(p,$))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(h,j),i=(i=Math.imul(h,$))+Math.imul(y,j)|0,o=Math.imul(y,$);var ge=(l+(r=r+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(p,H)|0))<<13)|0;l=((o=o+Math.imul(p,z)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,j),i=(i=Math.imul(g,$))+Math.imul(v,j)|0,o=Math.imul(v,$),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,z)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,z)|0;var ve=(l+(r=r+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(p,W)|0))<<13)|0;l=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,j),i=(i=Math.imul(_,$))+Math.imul(w,j)|0,o=Math.imul(w,$),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,z)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,z)|0,r=r+Math.imul(h,W)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Z)|0;var be=(l+(r=r+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(p,J)|0))<<13)|0;l=((o=o+Math.imul(p,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,j),i=(i=Math.imul(x,$))+Math.imul(S,j)|0,o=Math.imul(S,$),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,z)|0,r=r+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,X)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,X)|0;var _e=(l+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(p,Q)|0))<<13)|0;l=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(D,j),i=(i=Math.imul(D,$))+Math.imul(C,j)|0,o=Math.imul(C,$),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,z)|0,r=r+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0;var we=(l+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(p,ne)|0))<<13)|0;l=((o=o+Math.imul(p,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,j),i=(i=Math.imul(E,$))+Math.imul(M,j)|0,o=Math.imul(M,$),r=r+Math.imul(D,H)|0,i=(i=i+Math.imul(D,z)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,z)|0,r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0;var Te=(l+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(p,oe)|0))<<13)|0;l=((o=o+Math.imul(p,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(P,j),i=(i=Math.imul(P,$))+Math.imul(V,j)|0,o=Math.imul(V,$),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,z)|0,r=r+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,X)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0,r=r+Math.imul(h,oe)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0;var xe=(l+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(p,ue)|0))<<13)|0;l=((o=o+Math.imul(p,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,j),i=(i=Math.imul(O,$))+Math.imul(R,j)|0,o=Math.imul(R,$),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,z)|0)+Math.imul(V,H)|0,o=o+Math.imul(V,z)|0,r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,r=r+Math.imul(h,ue)|0,i=(i=i+Math.imul(h,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,pe)|0)+Math.imul(p,fe)|0))<<13)|0;l=((o=o+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,j),i=(i=Math.imul(F,$))+Math.imul(B,j)|0,o=Math.imul(B,$),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,z)|0,r=r+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(V,W)|0,o=o+Math.imul(V,Z)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,r=r+Math.imul(h,fe)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,pe)|0;var Ie=(l+(r=r+Math.imul(f,he)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(p,he)|0))<<13)|0;l=((o=o+Math.imul(p,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,z))+Math.imul(B,H)|0,o=Math.imul(B,z),r=r+Math.imul(O,W)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(V,J)|0,o=o+Math.imul(V,X)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,r=r+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,le)|0,r=r+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,pe)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,pe)|0;var De=(l+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(y,he)|0))<<13)|0;l=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(F,W),i=(i=Math.imul(F,Z))+Math.imul(B,W)|0,o=Math.imul(B,Z),r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(V,Q)|0,o=o+Math.imul(V,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,le)|0,r=r+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,pe)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,pe)|0;var Ce=(l+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(v,he)|0))<<13)|0;l=((o=o+Math.imul(v,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,J),i=(i=Math.imul(F,X))+Math.imul(B,J)|0,o=Math.imul(B,X),r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(V,ne)|0,o=o+Math.imul(V,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,r=r+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,pe)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,pe)|0;var ke=(l+(r=r+Math.imul(_,he)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(w,he)|0))<<13)|0;l=((o=o+Math.imul(w,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(V,oe)|0,o=o+Math.imul(V,se)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,le)|0,r=r+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,pe)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,pe)|0;var Ee=(l+(r=r+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,ye)|0)+Math.imul(S,he)|0))<<13)|0;l=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,ne),i=(i=Math.imul(F,re))+Math.imul(B,ne)|0,o=Math.imul(B,re),r=r+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(V,ue)|0,o=o+Math.imul(V,le)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,pe)|0;var Me=(l+(r=r+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(C,he)|0))<<13)|0;l=((o=o+Math.imul(C,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,oe),i=(i=Math.imul(F,se))+Math.imul(B,oe)|0,o=Math.imul(B,se),r=r+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,pe)|0)+Math.imul(V,fe)|0,o=o+Math.imul(V,pe)|0;var Ae=(l+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(M,he)|0))<<13)|0;l=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(F,ue),i=(i=Math.imul(F,le))+Math.imul(B,ue)|0,o=Math.imul(B,le),r=r+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,pe)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,pe)|0;var Pe=(l+(r=r+Math.imul(P,he)|0)|0)+((8191&(i=(i=i+Math.imul(P,ye)|0)+Math.imul(V,he)|0))<<13)|0;l=((o=o+Math.imul(V,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,fe),i=(i=Math.imul(F,pe))+Math.imul(B,fe)|0,o=Math.imul(B,pe);var Ve=(l+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(R,he)|0))<<13)|0;l=((o=o+Math.imul(R,ye)|0)+(i>>>13)|0)+(Ve>>>26)|0,Ve&=67108863;var Ne=(l+(r=Math.imul(F,he))|0)+((8191&(i=(i=Math.imul(F,ye))+Math.imul(B,he)|0))<<13)|0;return l=((o=Math.imul(B,ye))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=me,u[1]=ge,u[2]=ve,u[3]=be,u[4]=_e,u[5]=we,u[6]=Te,u[7]=xe,u[8]=Se,u[9]=Ie,u[10]=De,u[11]=Ce,u[12]=ke,u[13]=Ee,u[14]=Me,u[15]=Ae,u[16]=Pe,u[17]=Ve,u[18]=Ne,0!==l&&(u[19]=l,n.length++),n};function h(e,t,n){return(new y).mulp(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(d=p),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=(0|e.words[o-l])*(0|t.words[l]),f=67108863&c;a=67108863&(f=f+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):h(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},y.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var f=u,p=l,d=0;d<s;d++){var h=n[c+d],y=r[c+d],m=n[c+d+s],g=r[c+d+s],v=f*m-p*g;g=f*g+p*m,n[c+d]=h+(m=v),r[c+d]=y+g,n[c+d+s]=h-m,r[c+d+s]=y-g,d!==a&&(v=u*f-l*p,p=u*p+l*f,f=v)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)n[2*s]=8191&(o+=0|e[s]),n[2*s+1]=8191&(o>>>=13),o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),f=new Array(r),p=n.words;p.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,o,a,u,r,i),this.transform(l,o,c,f,r,i);for(var d=0;d<r;d++){var h=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=h}return this.conjugate(a,u,r),this.transform(a,u,p,o,r,i),this.conjugate(p,o,r),this.normalize13b(p,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),h(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n%26;t[n]=(e.words[n/26|0]&1<<r)>>>r}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o;this.words[t]=(0|this.words[t])-a<<n|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;return!(this.length<=n||!(this.words[n]&1<<t))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;return r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n?this:(0!==t&&n++,this.length=Math.min(n,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this.strip())},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o;this._expand(e.length+n);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var a=(0|e.words[i])*t;s=((o-=67108863&a)>>26)-(a/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n,r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var p=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(p=Math.min(p/s|0,67108863),r._ishlnsubmul(i,p,f);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);a&&(a.words[f]=p)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),f=t.clone();!t.isZero();){for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var h=0,y=1;0==(n.words[0]&y)&&h<26;++h,y<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(u)):(n.isub(t),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,p=1;0==(n.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(n.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,this.words[s]=a&=67108863}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new T(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(v,g),v.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}e.words[r-10]=i>>>=22,e.length-=0===i&&e.length>10?10:9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];e.words[n]=67108863&(t+=977*r),t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(b,g),i(_,g),i(w,g),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),p=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),h=s;0!==d.cmp(a);){for(var y=d,m=0;0!==y.cmp(a);m++)y=y.redSqr();r(m<h);var g=this.pow(f,new o(1).iushln(h-m-1));p=p.redMul(g),f=g.redSqr(),d=d.redMul(f),h=m}return p},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new o(1);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var f=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,T),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,n("2pl3")(e))},"6xm7":function(e,t,n){"use strict";var r=n("lXRz"),i=n("DxpT"),o=n("ewyi");e.exports=function(e){this._requestManager=e._requestManager;var t,n,s,a,u=this;(t=new r({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null]}),n=new r({name:"importRawKey",call:"personal_importRawKey",params:2}),s=new r({name:"sign",call:"personal_sign",params:3,inputFormatter:[null,o.inputAddressFormatter,null]}),a=new r({name:"ecRecover",call:"personal_ecRecover",params:2}),[t,n,new r({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[o.inputAddressFormatter,null,null]}),a,s,new r({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[o.inputTransactionFormatter,null]}),new r({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[o.inputAddressFormatter]})]).forEach(function(e){e.attachToObject(u),e.setRequestManager(u._requestManager)}),[new i({name:"listAccounts",getter:"personal_listAccounts"})].forEach(function(e){e.attachToObject(u),e.setRequestManager(u._requestManager)})}},"7B3l":function(e,t,n){var r=n("2l4O");"undefined"!=typeof window&&window.XMLHttpRequest?XMLHttpRequest=window.XMLHttpRequest:XMLHttpRequest=n("5hAZ").XMLHttpRequest;var i=n("qvd7"),o=function(e,t,n,r,i){this.host=e||"http://localhost:8545",this.timeout=t||0,this.user=n,this.password=r,this.headers=i};o.prototype.prepareRequest=function(e){var t;if(e?(t=new i).timeout=this.timeout:t=new XMLHttpRequest,t.open("POST",this.host,e),this.user&&this.password){var n="Basic "+new Buffer(this.user+":"+this.password).toString("base64");t.setRequestHeader("Authorization",n)}return t.setRequestHeader("Content-Type","application/json"),this.headers&&this.headers.forEach(function(e){t.setRequestHeader(e.name,e.value)}),t},o.prototype.send=function(e){var t=this.prepareRequest(!1);try{t.send(JSON.stringify(e))}catch(e){throw r.InvalidConnection(this.host)}var n=t.responseText;try{n=JSON.parse(n)}catch(e){throw r.InvalidResponse(t.responseText)}return n},o.prototype.sendAsync=function(e,t){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var e=n.responseText,i=null;try{e=JSON.parse(e)}catch(e){i=r.InvalidResponse(n.responseText)}t(i,e)}},n.ontimeout=function(){t(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(e))}catch(e){t(r.InvalidConnection(this.host))}},o.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(e){return!1}},e.exports=o},"7Qw6":function(e,t,n){"use strict";n.r(t),n.d(t,"using",function(){return s});var r=n(null),i=n(null),o=n(null);function s(e,t){return new r.a(function(n){var r,s;try{r=e()}catch(e){return void n.error(e)}try{s=t(r)}catch(e){return void n.error(e)}var a=(s?Object(i.a)(s):o.b).subscribe(n);return function(){a.unsubscribe(),r&&r.unsubscribe()}})}},"7ZAm":function(e,t,n){var r=n("E7RP"),i=n("M53H");e.exports={global:{abi:r,address:"0xc6d9d2cd449a754c494264e1809c50e34d64562b"},icap:{abi:i,address:"0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00"}}},"7xhL":function(e,t,n){var r=n("zb58"),i=n("0mTE"),o=function(e,t,n,r,o,s){return e.contract(i).at(n).deposit(o,{from:t,value:r},s)};e.exports=function(e,t,n,i,s){var a=new r(n);if(!a.isValid())throw new Error("invalid iban address");if(a.isDirect())return function(e,t,n,r,i){return e.sendTransaction({address:n,from:t,value:r},i)}(e,t,a.address(),i,s);if(!s){var u=e.icapNamereg().addr(a.institution());return o(e,t,u,i,a.client())}e.icapNamereg().addr(a.institution(),function(n,r){return o(e,t,r,i,a.client(),s)})}},"81Hv":function(e,t,n){var r=n("ioaB"),i=n("q4b3"),o=1,s=function(e,t){var n;return this.requestManager=e,this.pollId="syncPoll_"+o++,this.callbacks=[],this.addCallback(t),this.lastSyncState=!1,(n=this).requestManager.startPolling({method:"eth_syncing",params:[]},n.pollId,function(e,t){if(e)return n.callbacks.forEach(function(t){t(e)});i.isObject(t)&&t.startingBlock&&(t=r.outputSyncingFormatter(t)),n.callbacks.forEach(function(e){n.lastSyncState!==t&&(!n.lastSyncState&&i.isObject(t)&&e(null,!0),setTimeout(function(){e(null,t)},0),n.lastSyncState=t)})},n.stopWatching.bind(n)),this};s.prototype.addCallback=function(e){return e&&this.callbacks.push(e),this},s.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},e.exports=s},"84jk":function(e,t,n){var r=n("ewyi"),i=n("3QZ1"),o=function(e){return null===e||void 0===e?null:0===(e=String(e)).indexOf("0x")?e:i.fromUtf8(e)},s=function(e,t){i.isString(e.options)||e.get(function(e,n){e&&t(e),i.isArray(n)&&n.forEach(function(e){t(null,e)})})},a=function(e){e.requestManager.startPolling({method:e.implementation.poll.call,params:[e.filterId]},e.filterId,function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isArray(n)&&n.forEach(function(t){t=e.formatter?e.formatter(t):t,e.callbacks.forEach(function(e){e(null,t)})})},e.stopWatching.bind(e))},u=function(e,t,n,u,l,c,f){var p=this,d={};return u.forEach(function(e){e.setRequestManager(n),e.attachToObject(d)}),this.requestManager=n,this.options=function(e,t){if(i.isString(e))return e;switch(e=e||{},t){case"eth":return e.topics=e.topics||[],e.topics=e.topics.map(function(e){return i.isArray(e)?e.map(o):o(e)}),{topics:e.topics,from:e.from,to:e.to,address:e.address,fromBlock:r.inputBlockNumberFormatter(e.fromBlock),toBlock:r.inputBlockNumberFormatter(e.toBlock)};case"shh":return e}}(e,t),this.implementation=d,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=l,this.implementation.newFilter(this.options,function(e,t){if(e)p.callbacks.forEach(function(t){t(e)}),"function"==typeof f&&f(e);else if(p.filterId=t,p.getLogsCallbacks.forEach(function(e){p.get(e)}),p.getLogsCallbacks=[],p.callbacks.forEach(function(e){s(p,e)}),p.callbacks.length>0&&a(p),"function"==typeof c)return p.watch(c)}),this};u.prototype.watch=function(e){return this.callbacks.push(e),this.filterId&&(s(this,e),a(this)),this},u.prototype.stopWatching=function(e){if(this.requestManager.stopPolling(this.filterId),this.callbacks=[],!e)return this.implementation.uninstallFilter(this.filterId);this.implementation.uninstallFilter(this.filterId,e)},u.prototype.get=function(e){var t=this;if(!i.isFunction(e)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");return this.implementation.getLogs(this.filterId).map(function(e){return t.formatter?t.formatter(e):e})}return null===this.filterId?this.getLogsCallbacks.push(e):this.implementation.getLogs(this.filterId,function(n,r){n?e(n):e(null,r.map(function(e){return t.formatter?t.formatter(e):e}))}),this},e.exports=u},"8JLD":function(e,t){var n={messageId:0,toPayload:function(e,t){return e||console.error("jsonrpc method should be specified!"),n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!!e&&!e.error&&"2.0"===e.jsonrpc&&"number"==typeof e.id&&void 0!==e.result}},toBatchPayload:function(e){return e.map(function(e){return n.toPayload(e.method,e.params)})}};e.exports=n},"8d11":function(e,t,n){(function(e){var r;!function(i){"object"==typeof global&&global;var o,s,a,u=String.fromCharCode;function l(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function c(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function f(e,t){return u(e>>t&63|128)}function p(e){if(0==(4294967168&e))return u(e);var t="";return 0==(4294965248&e)?t=u(e>>6&31|192):0==(4294901760&e)?(c(e),t=u(e>>12&15|224),t+=f(e,6)):0==(4292870144&e)&&(t=u(e>>18&7|240),t+=f(e,12),t+=f(e,6)),t+u(63&e|128)}function d(){if(a>=s)throw Error("Invalid byte index");var e=255&o[a];if(a++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function h(){var e,t;if(a>s)throw Error("Invalid byte index");if(a==s)return!1;if(e=255&o[a],a++,0==(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|d())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|d()<<6|d())>=2048)return c(t),t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(7&e)<<18|d()<<12|d()<<6|d())>=65536&&t<=1114111)return t;throw Error("Invalid UTF-8 detected")}var y={version:"2.1.2",encode:function(e){for(var t=l(e),n=t.length,r=-1,i="";++r<n;)i+=p(t[r]);return i},decode:function(e){o=l(e),s=o.length,a=0;for(var t,n=[];!1!==(t=h());)n.push(t);return function(e){for(var t,n=e.length,r=-1,i="";++r<n;)(t=e[r])>65535&&(i+=u((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=u(t);return i}(n)}};void 0===(r=(function(){return y}).call(t,n,t,e))||(e.exports=r)}()}).call(this,n("2pl3")(e))},"909l":function(e,t,n){"use strict";n.r(t),n.d(t,"zip",function(){return c}),n.d(t,"ZipOperator",function(){return f}),n.d(t,"ZipSubscriber",function(){return p});var r=n(null),i=n(null),o=n(null),s=n(null),a=n(null),u=n(null),l=n(null);function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[e.length-1];return"function"==typeof n&&e.pop(),Object(i.a)(e,void 0).lift(new f(n))}var f=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}(),p=function(e){function t(t,n,r){void 0===r&&(r=Object.create(null));var i=e.call(this,t)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}return r.c(t,e),t.prototype._next=function(e){var t=this.iterators;Object(o.a)(e)?t.push(new h(e)):t.push("function"==typeof e[l.a]?new d(e[l.a]()):new y(this.destination,this,e))},t.prototype._complete=function(){var e=this.iterators,t=e.length;if(0!==t){this.active=t;for(var n=0;n<t;n++){var r=e[n];r.stillUnsubscribed?this.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},t.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},t.prototype.checkIterators=function(){for(var e=this.iterators,t=e.length,n=this.destination,r=0;r<t;r++)if("function"==typeof(s=e[r]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(r=0;r<t;r++){var s,a=(s=e[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},t.prototype._tryresultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(s.a),d=function(){function e(e){this.iterator=e,this.nextResult=e.next()}return e.prototype.hasValue=function(){return!0},e.prototype.next=function(){var e=this.nextResult;return this.nextResult=this.iterator.next(),e},e.prototype.hasCompleted=function(){var e=this.nextResult;return e&&e.done},e}(),h=function(){function e(e){this.array=e,this.index=0,this.length=0,this.length=e.length}return e.prototype[l.a]=function(){return this},e.prototype.next=function(e){var t=this.index++;return t<this.length?{value:this.array[t],done:!1}:{value:null,done:!0}},e.prototype.hasValue=function(){return this.array.length>this.index},e.prototype.hasCompleted=function(){return this.array.length===this.index},e}(),y=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.c(t,e),t.prototype[l.a]=function(){return this},t.prototype.next=function(){var e=this.buffer;return 0===e.length&&this.isComplete?{value:null,done:!0}:{value:e.shift(),done:!1}},t.prototype.hasValue=function(){return this.buffer.length>0},t.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},t.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){this.buffer.push(t),this.parent.checkIterators()},t.prototype.subscribe=function(e,t){return Object(u.a)(this,this.observable,this,t)},t}(a.a)},"9NBj":function(e,t,n){var r=n("DILS"),i=n("d9AN"),o=n("ioaB"),s=n("q4b3"),a=n("FPO/"),u=n("L7+l"),l=function(e,t,n){this._requestManager=e,this._json=t,this._address=n};l.prototype.encode=function(e){e=e||{};var t={};return["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(n){t[n]=o.inputBlockNumberFormatter(e[n])}),t.address=this._address,t},l.prototype.decode=function(e){e.data=e.data||"",e.topics=e.topics||[];var t=e.topics[0].slice(2),n=this._json.filter(function(e){return t===r(s.transformToFullName(e))})[0];return n?new i(this._requestManager,n,this._address).decode(e):(console.warn("cannot find event for log"),e)},l.prototype.execute=function(e,t){s.isFunction(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],1===arguments.length&&(e=null));var n=this.encode(e),r=this.decode.bind(this);return new a(this._requestManager,n,u.eth(),r,t)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this);e.allEvents=t},e.exports=l},"9OqN":function(e,t,n){var r,i,o;e.exports=(r=n("Ib8C"),n("OLod"),r.mode.CTR=(o=(i=r.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var s=o.slice(0);n.encryptBlock(s,0),o[r-1]=o[r-1]+1|0;for(var a=0;a<r;a++)e[t+a]^=s[a]}}),i.Decryptor=o,i),r.mode.CTR)},"9Z5i":function(e,t,n){var r=n("Xkrw"),i=function(e){this.name=e.name,this.getter=e.getter,this.setter=e.setter,this.outputFormatter=e.outputFormatter,this.inputFormatter=e.inputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter(e):e},i.prototype.formatOutput=function(e){return this.outputFormatter&&null!==e&&void 0!==e?this.outputFormatter(e):e},i.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype.attachToObject=function(e){var t={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(e[n[0]]=e[n[0]]||{},e=e[n[0]],r=n[1]),Object.defineProperty(e,r,t),e[o(r)]=this.buildAsyncGet()};var o=function(e){return"get"+e.charAt(0).toUpperCase()+e.slice(1)};i.prototype.buildGet=function(){var e=this;return function(){return e.formatOutput(e.requestManager.send({method:e.getter}))}},i.prototype.buildAsyncGet=function(){var e=this,t=function(t){e.requestManager.sendAsync({method:e.getter},function(n,r){t(n,e.formatOutput(r))})};return t.request=this.request.bind(this),t},i.prototype.request=function(){var e={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return e.format=this.formatOutput.bind(this),e},e.exports=i},"9hYf":function(e,t,n){var r=n("FUjy"),i=n("UDwF"),o=function(e){e=r.normalizeOptions(e);var t=r.generateBinary(e,{},{dirty:!1});return i.clone(t)};o.fromSolJS=function(e,t){null==t&&(t=!1);var n=null,r=0,i={};return Object.keys(e.all_networks).forEach(function(o){if("default"==o){if(1==t)return;throw new Error(e.contract_name+" has legacy 'default' network artifacts stored within it. Generally these artifacts were a result of running Truffle on a development environment -- in order to store contracts with truffle-contract, all networks must have an identified id. If you're sure this default network represents your development environment, you can ignore processing of the default network by passing `true` as the second argument to this function. However, if you think this network represents artifacts you'd like to keep (i.e., addresses deployed to the main network), you'll need to edit your .sol.js file yourself and change the default network id to be the id of your desired network. For most people, ignoring the default network is the correct option.")}e.all_networks[o].updated_at>r&&(n=o,r=e.all_networks[o].updated_at),i[o]={},["address","events","links","updated_at"].forEach(function(t){i[o][t]=e.all_networks[o][t]})}),o({contract_name:e.contract_name,unlinked_binary:(n=e.all_networks[n]||{}).unlinked_binary,abi:n.abi,networks:i,updated_at:0==r?void 0:r})},e.exports=o,"undefined"!=typeof window&&(window.TruffleContract=o)},ALsQ:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i=this._iv;if(i){var o=i.slice(0);this._iv=void 0}else o=this._prevBlock;r.encryptBlock(o,0);for(var s=0;s<n;s++)e[t+s]^=o[s]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=o}}),e}(),r.mode.CFB)},AhHK:function(e,t,n){var r=n("YdsQ"),i=n("2M1J"),o=n("rOim"),s=n("U8N/"),a=n("NG6W"),u=n("XTDb"),l=n("6xm7"),c=n("BQJx"),f=n("LPSB"),p=n("cH3F"),d=n("3QZ1"),h=n("4rvP"),y=n("Spqy"),m=n("q6iK"),g=n("DxpT"),v=n("O0eG"),b=n("LdkH"),_=n("LRpe");function w(e){this._requestManager=new r(e),this.currentProvider=e,this.eth=new o(this),this.db=new s(this),this.shh=new a(this),this.net=new u(this),this.personal=new l(this),this.bzz=new c(this),this.settings=new f,this.version={api:p.version},this.providers={HttpProvider:v,IpcProvider:b},this._extend=y(this),this._extend({properties:T()})}w.providers={HttpProvider:v,IpcProvider:b},w.prototype.setProvider=function(e){this._requestManager.setProvider(e),this.currentProvider=e},w.prototype.reset=function(e){this._requestManager.reset(e),this.settings=new f},w.prototype.BigNumber=_,w.prototype.toHex=d.toHex,w.prototype.toAscii=d.toAscii,w.prototype.toUtf8=d.toUtf8,w.prototype.fromAscii=d.fromAscii,w.prototype.fromUtf8=d.fromUtf8,w.prototype.toDecimal=d.toDecimal,w.prototype.fromDecimal=d.fromDecimal,w.prototype.toBigNumber=d.toBigNumber,w.prototype.toWei=d.toWei,w.prototype.fromWei=d.fromWei,w.prototype.isAddress=d.isAddress,w.prototype.isChecksumAddress=d.isChecksumAddress,w.prototype.toChecksumAddress=d.toChecksumAddress,w.prototype.isIBAN=d.isIBAN,w.prototype.padLeft=d.padLeft,w.prototype.padRight=d.padRight,w.prototype.sha3=function(e,t){return"0x"+h(e,t)},w.prototype.fromICAP=function(e){return new i(e).address()};var T=function(){return[new g({name:"version.node",getter:"web3_clientVersion"}),new g({name:"version.network",getter:"net_version",inputFormatter:d.toDecimal}),new g({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:d.toDecimal}),new g({name:"version.whisper",getter:"shh_version",inputFormatter:d.toDecimal})]};w.prototype.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},w.prototype.createBatch=function(){return new m(this)},e.exports=w},BQJx:function(e,t,n){"use strict";var r=n("lXRz"),i=n("DxpT");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"blockNetworkRead",call:"bzz_blockNetworkRead",params:1,inputFormatter:[null]}),new r({name:"syncEnabled",call:"bzz_syncEnabled",params:1,inputFormatter:[null]}),new r({name:"swapEnabled",call:"bzz_swapEnabled",params:1,inputFormatter:[null]}),new r({name:"download",call:"bzz_download",params:2,inputFormatter:[null,null]}),new r({name:"upload",call:"bzz_upload",params:2,inputFormatter:[null,null]}),new r({name:"retrieve",call:"bzz_retrieve",params:1,inputFormatter:[null]}),new r({name:"store",call:"bzz_store",params:2,inputFormatter:[null,null]}),new r({name:"get",call:"bzz_get",params:1,inputFormatter:[null]}),new r({name:"put",call:"bzz_put",params:2,inputFormatter:[null,null]}),new r({name:"modify",call:"bzz_modify",params:4,inputFormatter:[null,null,null,null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),[new i({name:"hive",getter:"bzz_hive"}),new i({name:"info",getter:"bzz_info"})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})}},"CY6+":function(e,t,n){var r,i,o,s,a;e.exports=(r=n("ec5m"),o=(i=r.lib).Base,s=i.WordArray,(a=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return s.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),r)},CqOI:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},e.exports=o},D0Zz:function(e){e.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_winner",type:"address"}],name:"AuctionEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_bidder",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"NewBid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}]},DILS:function(e,t,n){var r=n("NFKh"),i=n("5hvy");e.exports=function(e,t){return t&&"hex"===t.encoding&&(e.length>2&&"0x"===e.substr(0,2)&&(e=e.substr(2)),e=r.enc.Hex.parse(e)),i(e,{outputLength:256}).toString()}},DapH:function(e,t,n){var r=n("Xkrw"),i=n("2l4O"),o=function(e){this.name=e.name,this.call=e.call,this.params=e.params||0,this.inputFormatter=e.inputFormatter,this.outputFormatter=e.outputFormatter,this.requestManager=null};o.prototype.setRequestManager=function(e){this.requestManager=e},o.prototype.getCall=function(e){return r.isFunction(this.call)?this.call(e):this.call},o.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},o.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfRPCParams()},o.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter.map(function(t,n){return t?t(e[n]):e[n]}):e},o.prototype.formatOutput=function(e){return this.outputFormatter&&e?this.outputFormatter(e):e},o.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),r=this.formatInput(e);return this.validateArgs(r),{method:t,params:r,callback:n}},o.prototype.attachToObject=function(e){var t=this.buildCall();t.call=this.call;var n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},o.prototype.buildCall=function(){var e=this,t=function(){var t=e.toPayload(Array.prototype.slice.call(arguments));return t.callback?e.requestManager.sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))}):e.formatOutput(e.requestManager.send(t))};return t.request=this.request.bind(this),t},o.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},e.exports=o},DxpT:function(e,t,n){var r=n("3QZ1"),i=function(e){this.name=e.name,this.getter=e.getter,this.setter=e.setter,this.outputFormatter=e.outputFormatter,this.inputFormatter=e.inputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter(e):e},i.prototype.formatOutput=function(e){return this.outputFormatter&&null!==e&&void 0!==e?this.outputFormatter(e):e},i.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype.attachToObject=function(e){var t={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(e[n[0]]=e[n[0]]||{},e=e[n[0]],r=n[1]),Object.defineProperty(e,r,t),e[o(r)]=this.buildAsyncGet()};var o=function(e){return"get"+e.charAt(0).toUpperCase()+e.slice(1)};i.prototype.buildGet=function(){var e=this;return function(){return e.formatOutput(e.requestManager.send({method:e.getter}))}},i.prototype.buildAsyncGet=function(){var e=this,t=function(t){e.requestManager.sendAsync({method:e.getter},function(n,r){t(n,e.formatOutput(r))})};return t.request=this.request.bind(this),t},i.prototype.request=function(){var e={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return e.format=this.formatOutput.bind(this),e},e.exports=i},"E+Tg":function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},E4JC:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("ETIr"),n("cv67"),n("K3mO"),n("OLod"),function(){var e=r,t=e.lib.StreamCipher,n=[],i=[],o=[],s=e.algo.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)a.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,s=o[0],u=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),f=l>>>16|4294901760&c,p=c<<16|65535&l;for(i[0]^=l,i[1]^=f,i[2]^=c,i[3]^=p,i[4]^=l,i[5]^=f,i[6]^=c,i[7]^=p,n=0;n<4;n++)a.call(this)}},_doProcessBlock:function(e,t){var r=this._X;a.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function a(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],s=65535&r,a=r>>>16;o[n]=((s*s>>>17)+s*a>>>15)+a*a^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},E4eN:function(e,t,n){var r=n("OzUK"),i=n("eeZN"),o=n("Od6n"),s=n("w3oT"),a=n("XBxC"),u=n("LIg4"),l=n("tf/z"),c=n("Ucks"),f=n("cLXH"),p=n("LSTr"),d=function(e,t){return e.isDynamicType(t)||e.isDynamicArray(t)},h=function(e){this._types=e};h.prototype._requireType=function(e){var t=this._types.filter(function(t){return t.isType(e)})[0];if(!t)throw Error("invalid solidity type!: "+e);return t},h.prototype.encodeParam=function(e,t){return this.encodeParams([e],[t])},h.prototype.encodeParams=function(e,t){var n=this.getSolidityTypes(e),r=n.map(function(n,r){return n.encode(t[r],e[r])}),i=n.reduce(function(t,r,i){var o=r.staticPartLength(e[i]),s=32*Math.floor((o+31)/32);return t+(d(n[i],e[i])?32:s)},0);return this.encodeMultiWithOffset(e,n,r,i)},h.prototype.encodeMultiWithOffset=function(e,t,n,i){var o="",s=this;return e.forEach(function(a,u){if(d(t[u],e[u])){o+=r.formatInputInt(i).encode();var l=s.encodeWithOffset(e[u],t[u],n[u],i);i+=l.length/2}else o+=s.encodeWithOffset(e[u],t[u],n[u],i)}),e.forEach(function(r,a){if(d(t[a],e[a])){var u=s.encodeWithOffset(e[a],t[a],n[a],i);i+=u.length/2,o+=u}}),o},h.prototype.encodeWithOffset=function(e,t,n,i){var o,s,a,u=this;return t.isDynamicArray(e)?(o=t.nestedName(e),s=t.staticPartLength(o),a=n[0],function(){var e=2;if(t.isDynamicArray(o))for(var u=1;u<n.length;u++)a+=r.formatInputInt(i+u*s+32*(e+=+n[u-1][0]||0)).encode()}(),function(){for(var e=0;e<n.length-1;e++)a+=u.encodeWithOffset(o,t,n[e+1],i+a/2)}(),a):t.isStaticArray(e)?function(){var o=t.nestedName(e),s=t.staticPartLength(o),a="";return t.isDynamicArray(o)&&function(){for(var e=0,t=0;t<n.length;t++)a+=r.formatInputInt(i+t*s+32*(e+=+(n[t-1]||[])[0]||0)).encode()}(),function(){for(var e=0;e<n.length;e++)a+=u.encodeWithOffset(o,t,n[e],i+a/2)}(),a}():n},h.prototype.decodeParam=function(e,t){return this.decodeParams([e],t)[0]},h.prototype.decodeParams=function(e,t){var n=this.getSolidityTypes(e),r=this.getOffsets(e,n);return n.map(function(n,i){return n.decode(t,r[i],e[i],i)})},h.prototype.getOffsets=function(e,t){for(var n=t.map(function(t,n){return t.staticPartLength(e[n])}),r=1;r<n.length;r++)n[r]+=n[r-1];return n.map(function(n,r){return n-t[r].staticPartLength(e[r])})},h.prototype.getSolidityTypes=function(e){var t=this;return e.map(function(e){return t._requireType(e)})};var y=new h([new i,new o,new s,new a,new u,new p,new l,new c,new f]);e.exports=y},E7RP:function(e){e.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_winner",type:"address"}],name:"AuctionEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_bidder",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"NewBid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}]},EBx5:function(e,t,n){var r=n("fDiS"),i=n("ioaB"),o=n("FPO/"),s=n("L7+l"),a=function(e){this._requestManager=e._requestManager;var t=this;u().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};a.prototype.filter=function(e,t){return new o(this._requestManager,e,s.shh(),i.outputPostFormatter,t)};var u=function(){return[new r({name:"post",call:"shh_post",params:1,inputFormatter:[i.inputPostFormatter]}),new r({name:"newIdentity",call:"shh_newIdentity",params:0}),new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),new r({name:"newGroup",call:"shh_newGroup",params:0}),new r({name:"addToGroup",call:"shh_addToGroup",params:0})]};e.exports=a},ELcG:function(e,t,n){var r;e.exports=(r=n("Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=i.create([0,1518500249,1859775393,2400959708,2840853838]),p=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,d,_,w,T,x,S,I,D,C,k=this._hash.words,E=f.words,M=p.words,A=a.words,P=u.words,V=l.words,N=c.words;for(T=o=k[0],x=s=k[1],S=d=k[2],I=_=k[3],D=w=k[4],n=0;n<80;n+=1)C=o+e[t+A[n]]|0,C+=n<16?h(s,d,_)+E[0]:n<32?y(s,d,_)+E[1]:n<48?m(s,d,_)+E[2]:n<64?g(s,d,_)+E[3]:v(s,d,_)+E[4],C=(C=b(C|=0,V[n]))+w|0,o=w,w=_,_=b(d,10),d=s,s=C,C=T+e[t+P[n]]|0,C+=n<16?v(x,S,I)+M[0]:n<32?g(x,S,I)+M[1]:n<48?m(x,S,I)+M[2]:n<64?y(x,S,I)+M[3]:h(x,S,I)+M[4],C=(C=b(C|=0,N[n]))+D|0,T=D,D=I,I=b(S,10),S=x,x=C;C=k[1]+d+I|0,k[1]=k[2]+_+D|0,k[2]=k[3]+w+T|0,k[3]=k[4]+o+x|0,k[4]=k[0]+s+S|0,k[0]=C},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,n){return e^t^n}function y(e,t,n){return e&t|~e&n}function m(e,t,n){return(e|~t)^n}function g(e,t,n){return e&n|t&~n}function v(e,t,n){return e^(t|~n)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(d),t.HmacRIPEMD160=o._createHmacHelper(d)}(Math),r.RIPEMD160)},ELzr:function(e,t,n){"use strict";n.r(t),n.d(t,"onErrorResumeNext",function(){return a});var r=n(null),i=n(null),o=n(null),s=n(null);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return s.b;var n=e[0],u=e.slice(1);return 1===e.length&&Object(o.a)(n)?a.apply(void 0,n):new r.a(function(e){var t=function(){return e.add(a.apply(void 0,u).subscribe(e))};return Object(i.a)(n).subscribe({next:function(t){e.next(t)},error:t,complete:t})})}},ERup:function(e,t,n){var r=n("8JLD"),i=n("q4b3"),o=n("UVUN"),s=n("FNdZ"),a=function(e){this.provider=e,this.polls={},this.timeout=null};a.prototype.send=function(e){if(!this.provider)return console.error(s.InvalidProvider()),null;var t=r.toPayload(e.method,e.params),n=this.provider.send(t);if(!r.isValidResponse(n))throw s.InvalidResponse(n);return n.result},a.prototype.sendAsync=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toPayload(e.method,e.params);this.provider.sendAsync(n,function(e,n){return e?t(e):r.isValidResponse(n)?void t(null,n.result):t(s.InvalidResponse(n))})},a.prototype.sendBatch=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toBatchPayload(e);this.provider.sendAsync(n,function(e,n){return e?t(e):i.isArray(n)?void t(e,n):t(s.InvalidResponse(n))})},a.prototype.setProvider=function(e){this.provider=e},a.prototype.startPolling=function(e,t,n,r){this.polls[t]={data:e,id:t,callback:n,uninstall:r},this.timeout||this.poll()},a.prototype.stopPolling=function(e){delete this.polls[e],0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.reset=function(e){for(var t in this.polls)e&&-1!==t.indexOf("syncPoll_")||(this.polls[t].uninstall(),delete this.polls[t]);0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),o.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length)if(this.provider){var e=[],t=[];for(var n in this.polls)e.push(this.polls[n].data),t.push(n);if(0!==e.length){var a=r.toBatchPayload(e),u={};a.forEach(function(e,n){u[e.id]=t[n]});var l=this;this.provider.sendAsync(a,function(e,t){if(!e){if(!i.isArray(t))throw s.InvalidResponse(t);t.map(function(e){var t=u[e.id];return!!l.polls[t]&&(e.callback=l.polls[t].callback,e)}).filter(function(e){return!!e}).filter(function(e){var t=r.isValidResponse(e);return t||e.callback(s.InvalidResponse(e)),t}).forEach(function(e){e.callback(null,e.result)})}})}}else console.error(s.InvalidProvider())},e.exports=a},ETIr:function(e,t,n){var r,i;e.exports=(r=n("Ib8C"),i=r.lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return function(e,t,n){for(var r=[],o=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2,u=n[e.charCodeAt(s)]>>>6-s%4*2;r[o>>>2]|=(a|u)<<24-o%4*8,o++}return i.create(r,o)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},EWOM:function(e,t,n){"use strict";n.r(t),n.d(t,"pairs",function(){return o}),n.d(t,"dispatch",function(){return s});var r=n(null),i=n(null);function o(e,t){return new r.a(t?function(n){var r=Object.keys(e),o=new i.a;return o.add(t.schedule(s,0,{keys:r,index:0,subscriber:n,subscription:o,obj:e})),o}:function(t){for(var n=Object.keys(e),r=0;r<n.length&&!t.closed;r++){var i=n[r];e.hasOwnProperty(i)&&t.next([i,e[i]])}t.complete()})}function s(e){var t=e.keys,n=e.index,r=e.subscriber,i=e.subscription,o=e.obj;if(!r.closed)if(n<t.length){var s=t[n];r.next([s,o[s]]),i.add(this.schedule({keys:t,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}},Ecc2:function(e,t,n){var r=n("ERup"),i=n("JaDV"),o=n("t3Jy"),s=n("PfUy"),a=n("EBx5"),u=n("yOGc"),l=n("vtD2"),c=n("fNWR"),f=n("p4MM"),p=n("h7Rs"),d=n("q4b3"),h=n("DILS"),y=n("/8HT"),m=n("wtYL"),g=n("J1WT"),v=n("+F/3"),b=n("r0s3"),_=n("kB5k");function w(e){this._requestManager=new r(e),this.currentProvider=e,this.eth=new o(this),this.db=new s(this),this.shh=new a(this),this.net=new u(this),this.personal=new l(this),this.bzz=new c(this),this.settings=new f,this.version={api:p.version},this.providers={HttpProvider:v,IpcProvider:b},this._extend=y(this),this._extend({properties:T()})}w.providers={HttpProvider:v,IpcProvider:b},w.prototype.setProvider=function(e){this._requestManager.setProvider(e),this.currentProvider=e},w.prototype.reset=function(e){this._requestManager.reset(e),this.settings=new f},w.prototype.BigNumber=_,w.prototype.toHex=d.toHex,w.prototype.toAscii=d.toAscii,w.prototype.toUtf8=d.toUtf8,w.prototype.fromAscii=d.fromAscii,w.prototype.fromUtf8=d.fromUtf8,w.prototype.toDecimal=d.toDecimal,w.prototype.fromDecimal=d.fromDecimal,w.prototype.toBigNumber=d.toBigNumber,w.prototype.toWei=d.toWei,w.prototype.fromWei=d.fromWei,w.prototype.isAddress=d.isAddress,w.prototype.isChecksumAddress=d.isChecksumAddress,w.prototype.toChecksumAddress=d.toChecksumAddress,w.prototype.isIBAN=d.isIBAN,w.prototype.sha3=function(e,t){return"0x"+h(e,t)},w.prototype.fromICAP=function(e){return new i(e).address()};var T=function(){return[new g({name:"version.node",getter:"web3_clientVersion"}),new g({name:"version.network",getter:"net_version",inputFormatter:d.toDecimal}),new g({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:d.toDecimal}),new g({name:"version.whisper",getter:"shh_version",inputFormatter:d.toDecimal})]};w.prototype.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},w.prototype.createBatch=function(){return new m(this)},e.exports=w},"F+F2":function(e,t,n){var r;e.exports=(r=n("Ib8C"),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},FNdZ:function(e,t){e.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(e){return new Error("CONNECTION ERROR: Couldn't connect to node "+e+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")}}},"FPO/":function(e,t,n){var r=n("ioaB"),i=n("q4b3"),o=function(e){return null===e||void 0===e?null:0===(e=String(e)).indexOf("0x")?e:i.fromUtf8(e)},s=function(e,t){i.isString(e.options)||e.get(function(e,n){e&&t(e),i.isArray(n)&&n.forEach(function(e){t(null,e)})})},a=function(e){e.requestManager.startPolling({method:e.implementation.poll.call,params:[e.filterId]},e.filterId,function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isArray(n)&&n.forEach(function(t){t=e.formatter?e.formatter(t):t,e.callbacks.forEach(function(e){e(null,t)})})},e.stopWatching.bind(e))},u=function(e,t,n,u,l,c){var f=this,p={};return n.forEach(function(t){t.setRequestManager(e),t.attachToObject(p)}),this.requestManager=e,this.options=function(e){return i.isString(e)?e:((e=e||{}).topics=e.topics||[],e.topics=e.topics.map(function(e){return i.isArray(e)?e.map(o):o(e)}),{topics:e.topics,from:e.from,to:e.to,address:e.address,fromBlock:r.inputBlockNumberFormatter(e.fromBlock),toBlock:r.inputBlockNumberFormatter(e.toBlock)})}(t),this.implementation=p,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=u,this.implementation.newFilter(this.options,function(e,t){if(e)f.callbacks.forEach(function(t){t(e)}),c(e);else if(f.filterId=t,f.getLogsCallbacks.forEach(function(e){f.get(e)}),f.getLogsCallbacks=[],f.callbacks.forEach(function(e){s(f,e)}),f.callbacks.length>0&&a(f),"function"==typeof l)return f.watch(l)}),this};u.prototype.watch=function(e){return this.callbacks.push(e),this.filterId&&(s(this,e),a(this)),this},u.prototype.stopWatching=function(e){if(this.requestManager.stopPolling(this.filterId),this.callbacks=[],!e)return this.implementation.uninstallFilter(this.filterId);this.implementation.uninstallFilter(this.filterId,e)},u.prototype.get=function(e){var t=this;if(!i.isFunction(e)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");return this.implementation.getLogs(this.filterId).map(function(e){return t.formatter?t.formatter(e):e})}return null===this.filterId?this.getLogsCallbacks.push(e):this.implementation.getLogs(this.filterId,function(n,r){n?e(n):e(null,r.map(function(e){return t.formatter?t.formatter(e):e}))}),this},e.exports=u},FUjy:function(e,t,n){var r=n("HPK0"),i=n("bI+6").version;e.exports={normalizeOptions:function(e,t){t=t||{};var n={};return["contract_name","abi","binary","unlinked_binary","address","networks","links","events","network_id","default_network","updated_at"].forEach(function(r){var i;try{void 0!=(i=e[r])&&(n[r]=i)}catch(e){}try{void 0!=(i=t[r])&&(n[r]=i)}catch(e){}}),null!=e.interface&&(n.abi=JSON.parse(e.interface)),null!=e.bytecode&&(n.unlinked_binary=e.bytecode),null==n.unlinked_binary&&n.binary&&(n.unlinked_binary=n.binary),delete n.binary,this.copyCustomOptions(e,n),n},generateBinary:function(e,t,n){n=n||{},t=t||{},1==e.overwrite&&(t={}),t.contract_name=e.contract_name||t.contract_name||"Contract",t.default_network=e.default_network||t.default_network,t.abi=e.abi||t.abi,t.unlinked_binary=e.unlinked_binary||t.unlinked_binary,t.unlinked_binary&&t.unlinked_binary.indexOf("0x")<0&&(t.unlinked_binary="0x"+t.unlinked_binary),t.networks=t.networks||{},e.networks=e.networks||{},Object.keys(e.networks).forEach(function(n){t.networks[n]=e.networks[n]});var o=(new Date).getTime();if(e.network_id){t.networks[e.network_id]=t.networks[e.network_id]||{};var s=t.networks[e.network_id];s.address=e.address||s.address,s.links=e.links,s.events=s.events||{},e.events=e.events||{},Object.keys(e.events).forEach(function(t){e.events[t]=e.events[t]}),t.abi.forEach(function(e){if("event"==e.type){var t=e.name+"("+e.inputs.map(function(e){return e.type}).join(",")+")";s.events["0x"+r(t,{outputLength:256})]=e}}),!1!==n.dirty&&(s.updated_at=o)}else if(e.address)throw new Error("Cannot set address without network id");return Object.keys(t.networks).forEach(function(e){var n=t.networks[e];n.links=n.links||{}}),t.schema_version=i,t.updated_at=!1!==n.dirty?o:e.updated_at||t.updated_at||o,this.copyCustomOptions(e,t),t},copyCustomOptions:function(e,t){Object.keys(e).forEach(function(n){if(0==n.indexOf("x-"))try{value=e[n],void 0!=value&&(t[n]=value)}catch(e){}})}}},FpcX:function(e,t,n){"use strict";var r=n("G+6R"),i=n("prZD"),o=n("HFX+").keccak_256;function s(e){for(var t=e,n=t[0];t.length>0&&"0"===n.toString();)n=(t=t.slice(1))[0];return t}function a(e){var t=e.toString(16);return t.length%2&&(t="0"+t),s(new Buffer(t,"hex"))}function u(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}function l(e,t){var n=e;if(!Buffer.isBuffer(n)){if(!u(n)){var r=new Error(t?"[ethjs-abi] invalid "+t:"[ethjs-abi] invalid hex or buffer, must be a prefixed alphanumeric even length hex string");throw r.reason="[ethjs-abi] invalid hex string, hex must be prefixed and alphanumeric (e.g. 0x023..)",r.value=n,r}(n=n.substring(2)).length%2&&(n="0"+n),n=new Buffer(n,"hex")}return n}function c(e,t){return{encode:function(n){var r=n;return"object"==typeof r&&r.toString&&(r.toTwos||r.dividedToIntegerBy)&&(r=r.toString(10).split(".")[0]),"string"!=typeof r&&"number"!=typeof r||(r=String(r).split(".")[0]),r=(r=i(r)).toTwos(8*e).maskn(8*e),t&&(r=r.fromTwos(8*e).toTwos(256)),r.toArrayLike(Buffer,"be",32)},decode:function(n,i){var o=new r(n.slice(i+(32-e),i+32));return o=t?o.fromTwos(8*e):o.maskn(8*e),{consumed:32,value:new r(o.toString(10))}}}}var f=c(32,!1),p={encode:function(e){return f.encode(e?1:0)},decode:function(e,t){var n=f.decode(e,t);return{consumed:n.consumed,value:!n.value.isZero()}}};function d(e){return{encode:function(e){var t=e;if(32===(t=l(t)).length)return t;var n=new Buffer(32);return n.fill(0),t.copy(n),n},decode:function(t,n){if(t.length<n+32)throw new Error("[ethjs-abi] while decoding fixed bytes, invalid bytes data length: "+e);return{consumed:32,value:"0x"+t.slice(n,n+e).toString("hex")}}}}var h={encode:function(e){var t=e,n=new Buffer(32);if(!u(t,20))throw new Error("[ethjs-abi] while encoding address, invalid address value, not alphanumeric 20 byte hex string");return t=l(t),n.fill(0),t.copy(n,12),n},decode:function(e,t){if(0===e.length)return{consumed:32,value:"0x"};if(e.length<t+32)throw new Error("[ethjs-abi] while decoding address data, invalid address data, invalid byte length "+e.length);return{consumed:32,value:"0x"+e.slice(t+12,t+32).toString("hex")}}};function y(e){var t=parseInt(32*Math.ceil(e.length/32)),n=new Buffer(t-e.length);return n.fill(0),Buffer.concat([f.encode(e.length),e,n])}function m(e,t){if(e.length<t+32)throw new Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+e.length+" should be less than "+(t+32));var n=f.decode(e,t).value;if(n=n.toNumber(),e.length<t+32+n)throw new Error("[ethjs-abi] while decoding dynamic bytes data, invalid bytes length: "+e.length+" should be less than "+(t+32+n));return{consumed:parseInt(32+32*Math.ceil(n/32),10),value:e.slice(t+32,t+32+n)}}var g={encode:function(e){return y(l(e))},decode:function(e,t){var n=m(e,t);return n.value="0x"+n.value.toString("hex"),n},dynamic:!0},v={encode:function(e){return y(new Buffer(e,"utf8"))},decode:function(e,t){var n=m(e,t);return n.value=n.value.toString("utf8"),n},dynamic:!0};function b(e,t){return{encode:function(n){var r=new Buffer(0),i=t;if(!Array.isArray(n))throw new Error("[ethjs-abi] while encoding array, invalid array data, not type Object (Array)");if(-1===i&&(r=f.encode(i=n.length)),i!==n.length)throw new Error("[ethjs-abi] while encoding array, size mismatch array length "+i+" does not equal "+n.length);return n.forEach(function(t){r=Buffer.concat([r,e.encode(t)])}),r},decode:function(n,r){var i,o=t,s=r,a=0;-1===o&&(o=(i=f.decode(n,s)).value.toNumber(),a+=i.consumed,s+=i.consumed);for(var u=[],l=0;l<o;l++){var c=e.decode(n,s);a+=c.consumed,s+=c.consumed,u.push(c.value)}return{consumed:a,value:u}},dynamic:-1===t}}var _=new RegExp(/^((u?int|bytes)([0-9]*)|(address|bool|string)|(\[([0-9]*)\]))/);e.exports={BN:r,bnToBuffer:a,isHexString:u,hexOrBuffer:l,hexlify:function(e){return"number"==typeof e?"0x"+a(new r(e)).toString("hex"):e.mod||e.modulo?"0x"+a(e).toString("hex"):"0x"+l(e).toString("hex")},stripZeros:s,keccak256:o,getKeys:function(e,t,n){var r=[];if(!Array.isArray(e))throw new Error("[ethjs-abi] while getting keys, invalid params value "+JSON.stringify(e));for(var i=0;i<e.length;i++){var o=e[i][t];if(n&&!o)o="";else if("string"!=typeof o)throw new Error("[ethjs-abi] while getKeys found invalid ABI data structure, type value not string");r.push(o)}return r},numberToBN:i,coderNumber:c,uint256Coder:f,coderBoolean:p,coderFixedBytes:d,coderAddress:h,coderDynamicBytes:g,coderString:v,coderArray:b,paramTypePart:_,getParamCoder:function(e){for(var t=e,n=null,r="[ethjs-abi] while getting param coder (getParamCoder) type value "+JSON.stringify(t)+" is either invalid or unsupported by ethjs-abi.";t;){var i=t.match(_);if(!i)throw new Error(r);t=t.substring(i[0].length);var o=i[2]||i[4]||i[5];switch(o){case"int":case"uint":if(n)throw new Error(r);var s=parseInt(i[3]||256);if(0===s||s>256||s%8!=0)throw new Error("[ethjs-abi] while getting param coder for type "+t+", invalid "+o+"<N> width: "+t);n=c(s/8,"int"===o);break;case"bool":if(n)throw new Error(r);n=p;break;case"string":if(n)throw new Error(r);n=v;break;case"bytes":if(n)throw new Error(r);if(i[3]){var a=parseInt(i[3]);if(0===a||a>32)throw new Error("[ethjs-abi] while getting param coder for prefix bytes, invalid type "+t+", size "+a+" should be 0 or greater than 32");n=d(a)}else n=g;break;case"address":if(n)throw new Error(r);n=h;break;case"[]":if(!n||n.dynamic)throw new Error(r);n=b(n,-1);break;default:if(!n||n.dynamic)throw new Error(r);n=b(n,parseInt(i[6]))}}if(!n)throw new Error(r);return n}}},Fqqx:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},"G+6R":function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s=n("tjlA").Buffer}catch(e){}function a(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var s=e.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)this.words[o]|=(s=e[i]|e[i-1]<<8|e[i-2]<<16)<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)this.words[o]|=(s=e[i]|e[i+1]<<8|e[i+2]<<16)<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=a(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=a(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;i=i/t|0;for(var o=e.length-n,s=o%--r,a=Math.min(o,o-s)+n,l=0,c=n;c<a;c+=r)l=u(e,c,c+r,t),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==s){var f=1;for(l=u(e,c,e.length,t),c=0;c<s;c++)f*=t;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=s/67108864|0;n.words[0]=67108863&s;for(var u=1;u<r;u++){for(var l=a>>>26,c=67108863&a,f=Math.min(u,t.length-1),p=Math.max(0,u-e.length+1);p<=f;p++)l+=(s=(i=0|e.words[u-p|0])*(o=0|t.words[p])+c)/67108864|0,c=67108863&s;n.words[u]=0|c,a=0|l}return 0!==a?n.words[u]=0|a:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(e=e||10,t=0|t||1,16===e||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var p=c[e],d=f[e];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modn(d).toString(e);n=(h=h.idivn(d)).isZero()?y+n:l[p-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,l=new e(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[a]=s;for(;a<o;a++)l[a]=0}else{for(a=0;a<o-i;a++)l[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),l[o-a-1]=s}return l},o.prototype._countBits=Math.clz32?function(e){return 32-Math.clz32(e)}:function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)this.words[o]=67108863&(t=(0|n.words[o])+(0|r.words[o])+i),i=t>>>26;for(;0!==i&&o<n.length;o++)this.words[o]=67108863&(t=(0|n.words[o])+i),i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,n){var r,i,o,s=e.words,a=t.words,u=n.words,l=0,c=0|s[0],f=8191&c,p=c>>>13,d=0|s[1],h=8191&d,y=d>>>13,m=0|s[2],g=8191&m,v=m>>>13,b=0|s[3],_=8191&b,w=b>>>13,T=0|s[4],x=8191&T,S=T>>>13,I=0|s[5],D=8191&I,C=I>>>13,k=0|s[6],E=8191&k,M=k>>>13,A=0|s[7],P=8191&A,V=A>>>13,N=0|s[8],O=8191&N,R=N>>>13,L=0|s[9],F=8191&L,B=L>>>13,q=0|a[0],j=8191&q,$=q>>>13,U=0|a[1],H=8191&U,z=U>>>13,G=0|a[2],W=8191&G,Z=G>>>13,K=0|a[3],J=8191&K,X=K>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,le=ae>>>13,ce=0|a[8],fe=8191&ce,pe=ce>>>13,de=0|a[9],he=8191&de,ye=de>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(l+(r=Math.imul(f,j))|0)+((8191&(i=(i=Math.imul(f,$))+Math.imul(p,j)|0))<<13)|0;l=((o=Math.imul(p,$))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(h,j),i=(i=Math.imul(h,$))+Math.imul(y,j)|0,o=Math.imul(y,$);var ge=(l+(r=r+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(p,H)|0))<<13)|0;l=((o=o+Math.imul(p,z)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,j),i=(i=Math.imul(g,$))+Math.imul(v,j)|0,o=Math.imul(v,$),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,z)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,z)|0;var ve=(l+(r=r+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(p,W)|0))<<13)|0;l=((o=o+Math.imul(p,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(_,j),i=(i=Math.imul(_,$))+Math.imul(w,j)|0,o=Math.imul(w,$),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,z)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,z)|0,r=r+Math.imul(h,W)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Z)|0;var be=(l+(r=r+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(p,J)|0))<<13)|0;l=((o=o+Math.imul(p,X)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(x,j),i=(i=Math.imul(x,$))+Math.imul(S,j)|0,o=Math.imul(S,$),r=r+Math.imul(_,H)|0,i=(i=i+Math.imul(_,z)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,z)|0,r=r+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Z)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,X)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,X)|0;var _e=(l+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(p,Q)|0))<<13)|0;l=((o=o+Math.imul(p,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(D,j),i=(i=Math.imul(D,$))+Math.imul(C,j)|0,o=Math.imul(C,$),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,z)|0,r=r+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,X)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0;var we=(l+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(p,ne)|0))<<13)|0;l=((o=o+Math.imul(p,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(E,j),i=(i=Math.imul(E,$))+Math.imul(M,j)|0,o=Math.imul(M,$),r=r+Math.imul(D,H)|0,i=(i=i+Math.imul(D,z)|0)+Math.imul(C,H)|0,o=o+Math.imul(C,z)|0,r=r+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0;var Te=(l+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(p,oe)|0))<<13)|0;l=((o=o+Math.imul(p,se)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(P,j),i=(i=Math.imul(P,$))+Math.imul(V,j)|0,o=Math.imul(V,$),r=r+Math.imul(E,H)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,z)|0,r=r+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,X)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(v,ne)|0,o=o+Math.imul(v,re)|0,r=r+Math.imul(h,oe)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0;var xe=(l+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(p,ue)|0))<<13)|0;l=((o=o+Math.imul(p,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,j),i=(i=Math.imul(O,$))+Math.imul(R,j)|0,o=Math.imul(R,$),r=r+Math.imul(P,H)|0,i=(i=i+Math.imul(P,z)|0)+Math.imul(V,H)|0,o=o+Math.imul(V,z)|0,r=r+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(D,J)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,se)|0,r=r+Math.imul(h,ue)|0,i=(i=i+Math.imul(h,le)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,le)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,pe)|0)+Math.imul(p,fe)|0))<<13)|0;l=((o=o+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,j),i=(i=Math.imul(F,$))+Math.imul(B,j)|0,o=Math.imul(B,$),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,z)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,z)|0,r=r+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(V,W)|0,o=o+Math.imul(V,Z)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,r=r+Math.imul(h,fe)|0,i=(i=i+Math.imul(h,pe)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,pe)|0;var Ie=(l+(r=r+Math.imul(f,he)|0)|0)+((8191&(i=(i=i+Math.imul(f,ye)|0)+Math.imul(p,he)|0))<<13)|0;l=((o=o+Math.imul(p,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,z))+Math.imul(B,H)|0,o=Math.imul(B,z),r=r+Math.imul(O,W)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(P,J)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(V,J)|0,o=o+Math.imul(V,X)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(D,ne)|0,i=(i=i+Math.imul(D,re)|0)+Math.imul(C,ne)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,r=r+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,le)|0,r=r+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,pe)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,pe)|0;var De=(l+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,ye)|0)+Math.imul(y,he)|0))<<13)|0;l=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(F,W),i=(i=Math.imul(F,Z))+Math.imul(B,W)|0,o=Math.imul(B,Z),r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,X)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(V,Q)|0,o=o+Math.imul(V,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,le)|0,r=r+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,pe)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,pe)|0;var Ce=(l+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(v,he)|0))<<13)|0;l=((o=o+Math.imul(v,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,J),i=(i=Math.imul(F,X))+Math.imul(B,J)|0,o=Math.imul(B,X),r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(V,ne)|0,o=o+Math.imul(V,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,le)|0,r=r+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,pe)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,pe)|0;var ke=(l+(r=r+Math.imul(_,he)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(w,he)|0))<<13)|0;l=((o=o+Math.imul(w,ye)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(B,Q)|0,o=Math.imul(B,ee),r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(V,oe)|0,o=o+Math.imul(V,se)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,le)|0,r=r+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,pe)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,pe)|0;var Ee=(l+(r=r+Math.imul(x,he)|0)|0)+((8191&(i=(i=i+Math.imul(x,ye)|0)+Math.imul(S,he)|0))<<13)|0;l=((o=o+Math.imul(S,ye)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,ne),i=(i=Math.imul(F,re))+Math.imul(B,ne)|0,o=Math.imul(B,re),r=r+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(V,ue)|0,o=o+Math.imul(V,le)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,pe)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,pe)|0;var Me=(l+(r=r+Math.imul(D,he)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(C,he)|0))<<13)|0;l=((o=o+Math.imul(C,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,oe),i=(i=Math.imul(F,se))+Math.imul(B,oe)|0,o=Math.imul(B,se),r=r+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,le)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,pe)|0)+Math.imul(V,fe)|0,o=o+Math.imul(V,pe)|0;var Ae=(l+(r=r+Math.imul(E,he)|0)|0)+((8191&(i=(i=i+Math.imul(E,ye)|0)+Math.imul(M,he)|0))<<13)|0;l=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(F,ue),i=(i=Math.imul(F,le))+Math.imul(B,ue)|0,o=Math.imul(B,le),r=r+Math.imul(O,fe)|0,i=(i=i+Math.imul(O,pe)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,pe)|0;var Pe=(l+(r=r+Math.imul(P,he)|0)|0)+((8191&(i=(i=i+Math.imul(P,ye)|0)+Math.imul(V,he)|0))<<13)|0;l=((o=o+Math.imul(V,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,fe),i=(i=Math.imul(F,pe))+Math.imul(B,fe)|0,o=Math.imul(B,pe);var Ve=(l+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(R,he)|0))<<13)|0;l=((o=o+Math.imul(R,ye)|0)+(i>>>13)|0)+(Ve>>>26)|0,Ve&=67108863;var Ne=(l+(r=Math.imul(F,he))|0)+((8191&(i=(i=Math.imul(F,ye))+Math.imul(B,he)|0))<<13)|0;return l=((o=Math.imul(B,ye))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=me,u[1]=ge,u[2]=ve,u[3]=be,u[4]=_e,u[5]=we,u[6]=Te,u[7]=xe,u[8]=Se,u[9]=Ie,u[10]=De,u[11]=Ce,u[12]=ke,u[13]=Ee,u[14]=Me,u[15]=Ae,u[16]=Pe,u[17]=Ve,u[18]=Ne,0!==l&&(u[19]=l,n.length++),n};function h(e,t,n){return(new y).mulp(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(d=p),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=u;l++){var c=(0|e.words[o-l])*(0|t.words[l]),f=67108863&c;a=67108863&(f=f+a|0),i+=(s=(s=s+(c/67108864|0)|0)+(f>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):h(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},y.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var f=u,p=l,d=0;d<s;d++){var h=n[c+d],y=r[c+d],m=n[c+d+s],g=r[c+d+s],v=f*m-p*g;g=f*g+p*m,n[c+d]=h+(m=v),r[c+d]=y+g,n[c+d+s]=h-m,r[c+d+s]=y-g,d!==a&&(v=u*f-l*p,p=u*p+l*f,f=v)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)n[2*s]=8191&(o+=0|e[s]),n[2*s+1]=8191&(o>>>=13),o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),f=new Array(r),p=n.words;p.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,o,a,u,r,i),this.transform(l,o,c,f,r,i);for(var d=0;d<r;d++){var h=a[d]*c[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*c[d],a[d]=h}return this.conjugate(a,u,r),this.transform(a,u,p,o,r,i),this.conjugate(p,o,r),this.normalize13b(p,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),h(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n%26;t[n]=(e.words[n/26|0]&1<<r)>>>r}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o;this.words[t]=(0|this.words[t])-a<<n|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var l=0;l<s;l++)u.words[l]=this.words[l];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;return!(this.length<=n||!(this.words[n]&1<<t))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;return r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n?this:(0!==t&&n++,this.length=Math.min(n,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this.strip())},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o;this._expand(e.length+n);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var a=(0|e.words[i])*t;s=((o-=67108863&a)>>26)-(a/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n,r=this.clone(),i=e,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var p=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(p=Math.min(p/s|0,67108863),r._ishlnsubmul(i,p,f);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);a&&(a.words[f]=p)}return a&&a.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),f=t.clone();!t.isZero();){for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var h=0,y=1;0==(n.words[0]&y)&&h<26;++h,y<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(u)):(n.isub(t),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,p=1;0==(n.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(n.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,this.words[s]=a&=67108863}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new T(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(v,g),v.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}e.words[r-10]=i>>>=22,e.length-=0===i&&e.length>10?10:9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];e.words[n]=67108863&(t+=977*r),t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(b,g),i(_,g),i(w,g),w.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},T.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},T.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),p=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),h=s;0!==d.cmp(a);){for(var y=d,m=0;0!==y.cmp(a);m++)y=y.redSqr();r(m<h);var g=this.pow(f,new o(1).iushln(h-m-1));p=p.redMul(g),f=g.redSqr(),d=d.redMul(f),h=m}return p},T.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},T.prototype.pow=function(e,t){if(t.isZero())return new o(1);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var f=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,T),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,n("2pl3")(e))},GDxn:function(e,t,n){"use strict";n.r(t),n.d(t,"NEVER",function(){return o}),n.d(t,"never",function(){return s});var r=n(null),i=n(null),o=new r.a(i.a);function s(){return o}},GFlT:function(e,t,n){"use strict";n.r(t),n.d(t,"generate",function(){return s});var r=n(null),i=n(null),o=n(null);function s(e,t,n,s,u){var l,c;return 1==arguments.length?(c=e.initialState,t=e.condition,n=e.iterate,l=e.resultSelector||i.a,u=e.scheduler):void 0===s||Object(o.a)(s)?(c=e,l=i.a,u=s):(c=e,l=s),new r.a(function(e){var r=c;if(u)return u.schedule(a,0,{subscriber:e,iterate:n,condition:t,resultSelector:l,state:r});for(;;){if(t){var i=void 0;try{i=t(r)}catch(t){return void e.error(t)}if(!i){e.complete();break}}var o=void 0;try{o=l(r)}catch(t){return void e.error(t)}if(e.next(o),e.closed)break;try{r=n(r)}catch(t){return void e.error(t)}}})}function a(e){var t=e.subscriber,n=e.condition;if(!t.closed){if(e.needIterate)try{e.state=e.iterate(e.state)}catch(e){return void t.error(e)}else e.needIterate=!0;if(n){var r=void 0;try{r=n(e.state)}catch(e){return void t.error(e)}if(!r)return void t.complete();if(t.closed)return}var i;try{i=e.resultSelector(e.state)}catch(e){return void t.error(e)}if(!t.closed&&(t.next(i),!t.closed))return this.schedule(e)}}},GRuw:function(e,t,n){var r,i,o,s,a,u;e.exports=(r=n("Ib8C"),n("lPiR"),o=(i=r).lib.WordArray,u=(s=i.algo).SHA224=(a=s.SHA256).extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),i.SHA224=a._createHelper(u),i.HmacSHA224=a._createHmacHelper(u),r.SHA224)},Gcqv:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},GqWc:function(e,t,n){var r=n("Xkrw"),i=function(e,t){this.value=e||"",this.offset=t};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(e){return new i(this.value,e)},i.prototype.combine=function(e){return new i(this.value+e.value)},i.prototype.isDynamic=function(){return void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?r.padLeft(r.toTwosComplement(this.offset).toString(16),64):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(e){var t=32*e.length,n=e.map(function(e){if(!e.isDynamic())return e;var n=t;return t+=e.dynamicPartLength(),e.withOffset(n)});return n.reduce(function(e,t){return e+t.dynamicPart()},n.reduce(function(e,t){return e+t.staticPart()},""))},e.exports=i},"H/fx":function(e,t,n){var r=n("JaDV"),i=n("6Er7"),o=function(e,t,n,r,o,s){return e.contract(i).at(n).deposit(o,{from:t,value:r},s)};e.exports=function(e,t,n,i,s){var a=new r(n);if(!a.isValid())throw new Error("invalid iban address");if(a.isDirect())return function(e,t,n,r,i){return e.sendTransaction({address:n,from:t,value:r},i)}(e,t,a.address(),i,s);if(!s){var u=e.icapNamereg().addr(a.institution());return o(e,t,u,i,a.client())}e.icapNamereg().addr(a.institution(),function(n,r){return o(e,t,r,i,a.client(),s)})}},H7XF:function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[1];return 3*(t[0]+n)/4-n},t.toByteArray=function(e){for(var t,n=l(e),r=n[0],s=n[1],a=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,s)),u=0,c=s>0?r-4:r,f=0;f<c;f+=4)t=i[e.charCodeAt(f)]<<18|i[e.charCodeAt(f+1)]<<12|i[e.charCodeAt(f+2)]<<6|i[e.charCodeAt(f+3)],a[u++]=t>>16&255,a[u++]=t>>8&255,a[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,a[u++]=255&t),1===s&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t),a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(c(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o=[],s=t;s<n;s+=3)o.push(r[(i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"HFX+":function(e,t){!function(t){"use strict";"object"==typeof process&&process.versions&&process.versions.node&&(t=global);for(var n=!t.JS_SHA3_TEST&&"object"==typeof e&&e.exports,r="0123456789abcdef".split(""),i=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=[224,256,384,512],a=["hex","buffer","arrayBuffer","array"],u=function(e,t,n){return function(r){return new g(e,t,e).update(r)[n]()}},l=function(e,t,n){return function(r,i){return new g(e,t,i).update(r)[n]()}},c=function(e,t){var n=u(e,t,"hex");n.create=function(){return new g(e,t,e)},n.update=function(e){return n.create().update(e)};for(var r=0;r<a.length;++r){var i=a[r];n[i]=u(e,t,i)}return n},f=[{name:"keccak",padding:[1,256,65536,16777216],bits:s,createMethod:c},{name:"sha3",padding:[6,1536,393216,100663296],bits:s,createMethod:c},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var n=l(e,t,"hex");n.create=function(n){return new g(e,t,n)},n.update=function(e,t){return n.create(t).update(e)};for(var r=0;r<a.length;++r){var i=a[r];n[i]=l(e,t,i)}return n}}],p={},d=0;d<f.length;++d)for(var h=f[d],y=h.bits,m=0;m<y.length;++m)p[h.name+"_"+y[m]]=h.createMethod(y[m],h.padding);function g(e,t,n){this.blocks=[],this.s=[],this.padding=t,this.outputBits=n,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}g.prototype.update=function(e){var n="string"!=typeof e;n&&e.constructor==t.ArrayBuffer&&(e=new Uint8Array(e));for(var r,o,s=e.length,a=this.blocks,u=this.byteCount,l=this.blockCount,c=0,f=this.s;c<s;){if(this.reset)for(this.reset=!1,a[0]=this.block,r=1;r<l+1;++r)a[r]=0;if(n)for(r=this.start;c<s&&r<u;++c)a[r>>2]|=e[c]<<i[3&r++];else for(r=this.start;c<s&&r<u;++c)(o=e.charCodeAt(c))<128?a[r>>2]|=o<<i[3&r++]:o<2048?(a[r>>2]|=(192|o>>6)<<i[3&r++],a[r>>2]|=(128|63&o)<<i[3&r++]):o<55296||o>=57344?(a[r>>2]|=(224|o>>12)<<i[3&r++],a[r>>2]|=(128|o>>6&63)<<i[3&r++],a[r>>2]|=(128|63&o)<<i[3&r++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++c)),a[r>>2]|=(240|o>>18)<<i[3&r++],a[r>>2]|=(128|o>>12&63)<<i[3&r++],a[r>>2]|=(128|o>>6&63)<<i[3&r++],a[r>>2]|=(128|63&o)<<i[3&r++]);if(this.lastByteIndex=r,r>=u){for(this.start=r-u,this.block=a[l],r=0;r<l;++r)f[r]^=a[r];v(f),this.reset=!0}else this.start=r}return this},g.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,n=this.blockCount,r=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex==this.byteCount)for(e[0]=e[n],t=1;t<n+1;++t)e[t]=0;for(e[n-1]|=2147483648,t=0;t<n;++t)r[t]^=e[t];v(r)},g.prototype.toString=g.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,u="";a<i;){for(s=0;s<t&&a<i;++s,++a)u+=r[(e=n[s])>>4&15]+r[15&e]+r[e>>12&15]+r[e>>8&15]+r[e>>20&15]+r[e>>16&15]+r[e>>28&15]+r[e>>24&15];a%t==0&&(v(n),s=0)}return o&&(e=n[s],o>0&&(u+=r[e>>4&15]+r[15&e]),o>1&&(u+=r[e>>12&15]+r[e>>8&15]),o>2&&(u+=r[e>>20&15]+r[e>>16&15])),u},g.prototype.buffer=g.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(e);s<r;){for(o=0;o<t&&s<r;++o,++s)u[s]=n[o];s%t==0&&v(n)}return i&&(u[o]=n[o],e=e.slice(0,a)),e},g.prototype.digest=g.prototype.array=function(){this.finalize();for(var e,t,n=this.blockCount,r=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,u=[];a<i;){for(s=0;s<n&&a<i;++s,++a)u[e=a<<2]=255&(t=r[s]),u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%n==0&&v(r)}return o&&(e=a<<2,t=r[s],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var v=function(e){var t,n,r,i,s,a,u,l,c,f,p,d,h,y,m,g,v,b,_,w,T,x,S,I,D,C,k,E,M,A,P,V,N,O,R,L,F,B,q,j,$,U,H,z,G,W,Z,K,J,X,Y,Q,ee,te,ne,re,ie,oe,se,ae,ue,le,ce;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^((u=e[3]^e[13]^e[23]^e[33]^e[43])<<1|(a=e[2]^e[12]^e[22]^e[32]^e[42])>>>31),e[0]^=t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|u>>>31),e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,n=s^(c<<1|l>>>31),e[2]^=t=i^(l<<1|c>>>31),e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,n=u^(p<<1|f>>>31),e[4]^=t=a^(f<<1|p>>>31),e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,n=c^(h<<1|d>>>31),e[6]^=t=l^(d<<1|h>>>31),e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,n=p^(s<<1|i>>>31),e[8]^=t=f^(i<<1|s>>>31),e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[1],W=e[11]<<4|e[10]>>>28,Z=e[10]<<4|e[11]>>>28,E=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,U=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,O=e[2]<<1|e[3]>>>31,R=e[3]<<1|e[2]>>>31,v=e[12]<<12|e[13]>>>20,K=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,A=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,_=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,Y=e[35]<<15|e[34]>>>17,V=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,D=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,B=e[26]<<25|e[27]>>>7,q=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,T=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,C=e[18]<<20|e[19]>>>12,k=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,j=e[38]<<8|e[39]>>>24,$=e[39]<<8|e[38]>>>24,x=e[48]<<14|e[49]>>>18,S=e[49]<<14|e[48]>>>18,e[0]=(y=e[0])^~(g=e[13]<<12|e[12]>>>20)&(b=e[25]<<11|e[24]>>>21),e[1]=m^~v&_,e[10]=I^~C&E,e[11]=D^~k&M,e[20]=O^~L&B,e[21]=R^~F&q,e[30]=z^~W&K,e[31]=G^~Z&J,e[40]=te^~re&oe,e[41]=ne^~ie&se,e[2]=g^~b&w,e[3]=v^~_&T,e[12]=C^~E&A,e[13]=k^~M&P,e[22]=L^~B&j,e[23]=F^~q&$,e[32]=W^~K&X,e[33]=Z^~J&Y,e[42]=re^~oe&ae,e[43]=ie^~se&ue,e[4]=b^~w&x,e[5]=_^~T&S,e[14]=E^~A&V,e[15]=M^~P&N,e[24]=B^~j&U,e[25]=q^~$&H,e[34]=K^~X&Q,e[35]=J^~Y&ee,e[44]=oe^~ae&le,e[45]=se^~ue&ce,e[6]=w^~x&y,e[7]=T^~S&m,e[16]=A^~V&I,e[17]=P^~N&D,e[26]=j^~U&O,e[27]=$^~H&R,e[36]=X^~Q&z,e[37]=Y^~ee&G,e[46]=ae^~le&te,e[47]=ue^~ce&ne,e[8]=x^~y&g,e[9]=S^~m&v,e[18]=V^~I&C,e[19]=N^~D&k,e[28]=U^~O&L,e[29]=H^~R&F,e[38]=Q^~z&W,e[39]=ee^~G&Z,e[48]=le^~te&re,e[49]=ce^~ne&ie,e[0]^=o[r],e[1]^=o[r+1]};if(n)e.exports=p;else if(t)for(var b in p)t[b]=p[b]}(this)},HKOv:function(e,t,n){var r=n("dOJ8");e.exports={parse:function(e){var t={};if(0!=e.indexOf("blockchain://"))return t;var n=(e=e.replace("blockchain://","")).split("/block/");return t.genesis_hash="0x"+n[0],t.block_hash="0x"+n[1],t},asURI:function(e,t){var n=new r(e);n.eth.getBlock(0,function(e,r){if(e)return t(e);n.eth.getBlock("latest",function(e,n){if(e)return t(e);var i="blockchain://"+r.hash.replace("0x","")+"/block/"+n.hash.replace("0x","");t(null,i)})})},matches:function(e,t,n){var i=(e=this.parse(e)).genesis_hash,o=e.block_hash,s=new r(t);s.eth.getBlock(0,function(e,t){return e?n(e):t.hash!=i?n(null,!1):void s.eth.getBlock(o,function(e,t){if(e||null==t)return n(null,!1);n(null,!0)})})}}},HPK0:function(e,t,n){var r;e.exports=(r=n("ec5m"),n("CY6+"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.x64.Word,a=t.algo,u=[],l=[],c=[];!function(){for(var e=1,t=0,n=0;n<24;n++){u[e+5*t]=(n+1)*(n+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,f=0,p=0;p<7;p++){if(1&i){var d=(1<<p)-1;d<32?f^=1<<d:a^=1<<d-32}128&i?i=i<<1^113:i<<=1}c[o]=s.create(a,f)}}();var f=[];!function(){for(var e=0;e<25;e++)f[e]=s.create()}();var p=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],s=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(A=n[i]).high^=s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),A.low^=o}for(var a=0;a<24;a++){for(var p=0;p<5;p++){for(var d=0,h=0,y=0;y<5;y++)d^=(A=n[p+5*y]).high,h^=A.low;var m=f[p];m.high=d,m.low=h}for(p=0;p<5;p++){var g=f[(p+4)%5],v=f[(p+1)%5],b=v.high,_=v.low;for(d=g.high^(b<<1|_>>>31),h=g.low^(_<<1|b>>>31),y=0;y<5;y++)(A=n[p+5*y]).high^=d,A.low^=h}for(var w=1;w<25;w++){var T=(A=n[w]).high,x=A.low,S=u[w];S<32?(d=T<<S|x>>>32-S,h=x<<S|T>>>32-S):(d=x<<S-32|T>>>64-S,h=T<<S-32|x>>>64-S);var I=f[l[w]];I.high=d,I.low=h}var D=f[0],C=n[0];for(D.high=C.high,D.low=C.low,p=0;p<5;p++)for(y=0;y<5;y++){var k=f[w=p+5*y],E=f[(p+1)%5+5*y],M=f[(p+2)%5+5*y];(A=n[w]).high=k.high^~E.high&M.high,A.low=k.low^~E.low&M.low}var A,P=c[a];(A=n[0]).high^=P.high,A.low^=P.low}},_doFinalize:function(){var t=this._data,n=t.words,r=8*t.sigBytes,o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,l=[],c=0;c<u;c++){var f=s[c],p=f.high,d=f.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),l.push(d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)),l.push(p)}return new i.init(l,a)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(p),t.HmacSHA3=o._createHmacHelper(p)}(Math),r.SHA3)},Ib8C:function(e,t,n){var r;e.exports=r=r||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++)t[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++)r.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},c=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,l=e.min(4*u,i);if(u){for(var c=0;c<u;c+=o)this._doProcessBlock(r,c);var f=r.splice(0,u);n.sigBytes-=l}return new s.init(f,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math)},IxPp:function(e,t,n){"use strict";n.r(t),n.d(t,"groupBy",function(){return u}),n.d(t,"GroupedObservable",function(){return p});var r=n(null),i=n(null),o=n(null),s=n(null),a=n(null);function u(e,t,n,r){return function(i){return i.lift(new l(e,t,n,r))}}var l=function(){function e(e,t,n,r){this.keySelector=e,this.elementSelector=t,this.durationSelector=n,this.subjectSelector=r}return e.prototype.call=function(e,t){return t.subscribe(new c(e,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},e}(),c=function(e){function t(t,n,r,i,o){var s=e.call(this,t)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.c(t,e),t.prototype._next=function(e){var t;try{t=this.keySelector(e)}catch(e){return void this.error(e)}this._group(e,t)},t.prototype._group=function(e,t){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(t);if(this.elementSelector)try{r=this.elementSelector(e)}catch(e){this.error(e)}else r=e;if(!i){i=this.subjectSelector?this.subjectSelector():new a.a,n.set(t,i);var o=new p(t,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new p(t,i))}catch(e){return void this.error(e)}this.add(s.subscribe(new f(t,i,this)))}}i.closed||i.next(r)},t.prototype._error=function(e){var t=this.groups;t&&(t.forEach(function(t,n){t.error(e)}),t.clear()),this.destination.error(e)},t.prototype._complete=function(){var e=this.groups;e&&(e.forEach(function(e,t){e.complete()}),e.clear()),this.destination.complete()},t.prototype.removeGroup=function(e){this.groups.delete(e)},t.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&e.prototype.unsubscribe.call(this))},t}(i.a),f=function(e){function t(t,n,r){var i=e.call(this,n)||this;return i.key=t,i.group=n,i.parent=r,i}return r.c(t,e),t.prototype._next=function(e){this.complete()},t.prototype._unsubscribe=function(){var e=this.parent,t=this.key;this.key=this.parent=null,e&&e.removeGroup(t)},t}(i.a),p=function(e){function t(t,n,r){var i=e.call(this)||this;return i.key=t,i.groupSubject=n,i.refCountSubscription=r,i}return r.c(t,e),t.prototype._subscribe=function(e){var t=new o.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&t.add(new d(n)),t.add(r.subscribe(e)),t},t}(s.a),d=function(e){function t(t){var n=e.call(this)||this;return n.parent=t,t.count++,n}return r.c(t,e),t.prototype.unsubscribe=function(){var t=this.parent;t.closed||this.closed||(e.prototype.unsubscribe.call(this),t.count-=1,0===t.count&&t.attemptedToUnsubscribe&&t.unsubscribe())},t}(o.a)},J1WT:function(e,t,n){var r=n("q4b3"),i=function(e){this.name=e.name,this.getter=e.getter,this.setter=e.setter,this.outputFormatter=e.outputFormatter,this.inputFormatter=e.inputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter(e):e},i.prototype.formatOutput=function(e){return this.outputFormatter&&null!==e&&void 0!==e?this.outputFormatter(e):e},i.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype.attachToObject=function(e){var t={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(e[n[0]]=e[n[0]]||{},e=e[n[0]],r=n[1]),Object.defineProperty(e,r,t),e[o(r)]=this.buildAsyncGet()};var o=function(e){return"get"+e.charAt(0).toUpperCase()+e.slice(1)};i.prototype.buildGet=function(){var e=this;return function(){return e.formatOutput(e.requestManager.send({method:e.getter}))}},i.prototype.buildAsyncGet=function(){var e=this,t=function(t){e.requestManager.sendAsync({method:e.getter},function(n,r){t(n,e.formatOutput(r))})};return t.request=this.request.bind(this),t},i.prototype.request=function(){var e={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return e.format=this.formatOutput.bind(this),e},e.exports=i},JVwb:function(e,t,n){var r=n("K+P3"),i=n("x7SH");e.exports={global:{abi:r,address:"0xc6d9d2cd449a754c494264e1809c50e34d64562b"},icap:{abi:i,address:"0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00"}}},JXl6:function(e,t,n){var r=n("Xkrw"),i=n("d35v"),o=n("/0UZ"),s=n("eB/I"),a=n("03o9"),u=function(e,t){return e.filter(function(e){return"constructor"===e.type&&e.inputs.length===t.length}).map(function(e){return e.inputs.map(function(e){return e.type})}).map(function(e){return i.encodeParams(e,t)})[0]||""},l=function(e){e.abi.filter(function(e){return"function"===e.type}).map(function(t){return new s(e._eth,t,e.address)}).forEach(function(t){t.attachToContract(e)})},c=function(e){var t=e.abi.filter(function(e){return"event"===e.type});new a(e._eth._requestManager,t,e.address).attachToContract(e),t.map(function(t){return new o(e._eth._requestManager,t,e.address)}).forEach(function(t){t.attachToContract(e)})},f=function(e,t){var n=0,r=!1,i=e._eth.filter("latest",function(o){if(!o&&!r)if(++n>50){if(i.stopWatching(function(){}),r=!0,!t)throw new Error("Contract transaction couldn't be found after 50 blocks");t(new Error("Contract transaction couldn't be found after 50 blocks"))}else e._eth.getTransactionReceipt(e.transactionHash,function(n,o){o&&o.blockHash&&!r&&e._eth.getCode(o.contractAddress,function(n,s){if(!r&&s)if(i.stopWatching(function(){}),r=!0,s.length>3)e.address=o.contractAddress,l(e),c(e),t&&t(null,e);else{if(!t)throw new Error("The contract code couldn't be stored, please check your gas amount.");t(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},p=function(e,t){this.eth=e,this.abi=t,this.new=function(){var e,n=new d(this.eth,this.abi),i={},o=Array.prototype.slice.call(arguments);r.isFunction(o[o.length-1])&&(e=o.pop());var s=o[o.length-1];if(r.isObject(s)&&!r.isArray(s)&&(i=o.pop()),i.value>0&&!(t.filter(function(e){return"constructor"===e.type&&e.inputs.length===o.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");var a=u(this.abi,o);if(i.data+=a,e)this.eth.sendTransaction(i,function(t,r){t?e(t):(n.transactionHash=r,e(null,n),f(n,e))});else{var l=this.eth.sendTransaction(i);n.transactionHash=l,f(n)}return n},this.new.getData=this.getData.bind(this)};p.prototype.at=function(e,t){var n=new d(this.eth,this.abi,e);return l(n),c(n),t&&t(null,n),n},p.prototype.getData=function(){var e={},t=Array.prototype.slice.call(arguments),n=t[t.length-1];r.isObject(n)&&!r.isArray(n)&&(e=t.pop());var i=u(this.abi,t);return e.data+=i,e.data};var d=function(e,t,n){this._eth=e,this.transactionHash=null,this.address=n,this.abi=t};e.exports=p},JaDV:function(e,t,n){var r=n("kB5k"),i=function(e,t){for(var n=e;n.length<2*t;)n="0"+n;return n},o=function(e){var t="A".charCodeAt(0),n="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map(function(e){var r=e.charCodeAt(0);return r>=t&&r<=n?r-t+10:e}).join("")},s=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},a=function(e){this._iban=e};a.fromAddress=function(e){var t=new r(e,16).toString(36),n=i(t,15);return a.fromBban(n.toUpperCase())},a.fromBban=function(e){var t=("0"+(98-s(o("XE00"+e)))).slice(-2);return new a("XE"+t+e)},a.createIndirect=function(e){return a.fromBban("ETH"+e.institution+e.identifier)},a.isValid=function(e){return new a(e).isValid()},a.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(o(this._iban))},a.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},a.prototype.isIndirect=function(){return 20===this._iban.length},a.prototype.checksum=function(){return this._iban.substr(2,2)},a.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},a.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},a.prototype.address=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i(t.toString(16),20)}return""},a.prototype.toString=function(){return this._iban},e.exports=a},JuGP:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/address(\[([0-9]*)\])?/)},e.exports=o},"K+P3":function(e){e.exports=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_winner",type:"address"}],name:"AuctionEnded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"_name",type:"bytes32"},{indexed:!1,name:"_bidder",type:"address"},{indexed:!1,name:"_value",type:"uint256"}],name:"NewBid",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}]},K3mO:function(e,t,n){var r,i,o,s,a,u,l;e.exports=(r=n("Ib8C"),n("3y9D"),n("WYAk"),a=(o=(i=r).lib).WordArray,l=(u=i.algo).EvpKDF=(s=o.Base).extend({cfg:s.extend({keySize:4,hasher:u.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),i=a.create(),o=i.words,s=n.keySize,u=n.iterations;o.length<s;){l&&r.update(l);var l=r.update(e).finalize(t);r.reset();for(var c=1;c<u;c++)l=r.finalize(l),r.reset();i.concat(l)}return i.sigBytes=4*s,i}}),i.EvpKDF=function(e,t,n){return l.create(n).compute(e,t)},r.EvpKDF)},KQya:function(e,t,n){"use strict";var r=n(null),i=1,o={},s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.c(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=(s=t.flush.bind(t,null),a=i++,o[a]=s,Promise.resolve().then(function(){return function(e){var t=o[e];t&&t()}(a)}),a)));var s,a},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(delete o[n],t.scheduled=void 0)},t}(function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.c(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.c(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(null).a))),a=n("siIJ"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.c(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(function(e){function t(n,r){void 0===r&&(r=a.Scheduler.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.c(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(a.Scheduler));n.d(t,"asap",function(){return l});var l=new u(s)},Kfwp:function(e,t){var n={messageId:0,toPayload:function(e,t){return e||console.error("jsonrpc method should be specified!"),n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!!e&&!e.error&&"2.0"===e.jsonrpc&&"number"==typeof e.id&&void 0!==e.result}},toBatchPayload:function(e){return e.map(function(e){return n.toPayload(e.method,e.params)})}};e.exports=n},KmYQ:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1;!(t[n>>>2]>>>24-n%4*8&255);)n--;e.sigBytes=n+1}},r.pad.ZeroPadding)},Kyjx:function(e,t,n){var r=n("E4eN"),i=n("q4b3"),o=n("ioaB"),s=n("DILS"),a=function(e,t,n){this._eth=e,this._inputTypes=t.inputs.map(function(e){return e.type}),this._outputTypes=t.outputs.map(function(e){return e.type}),this._constant=t.constant,this._payable=t.payable,this._name=i.transformToFullName(t),this._address=n};a.prototype.extractCallback=function(e){if(i.isFunction(e[e.length-1]))return e.pop()},a.prototype.extractDefaultBlock=function(e){if(e.length>this._inputTypes.length&&!i.isObject(e[e.length-1]))return o.inputDefaultBlockNumberFormatter(e.pop())},a.prototype.toPayload=function(e){var t={};return e.length>this._inputTypes.length&&i.isObject(e[e.length-1])&&(t=e[e.length-1]),t.to=this._address,t.data="0x"+this.signature()+r.encodeParams(this._inputTypes,e),t},a.prototype.signature=function(){return s(this._name).slice(0,8)},a.prototype.unpackOutput=function(e){if(e){e=e.length>=2?e.slice(2):e;var t=r.decodeParams(this._outputTypes,e);return 1===t.length?t[0]:t}},a.prototype.call=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.extractDefaultBlock(e),r=this.toPayload(e);if(!t){var i=this._eth.call(r,n);return this.unpackOutput(i)}var o=this;this._eth.call(r,n,function(e,n){if(e)return t(e,null);var r=null;try{r=o.unpackOutput(n)}catch(t){e=t}t(e,r)})},a.prototype.sendTransaction=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.toPayload(e);if(n.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!t)return this._eth.sendTransaction(n);this._eth.sendTransaction(n,t)},a.prototype.estimateGas=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e);if(!t)return this._eth.estimateGas(n);this._eth.estimateGas(n,t)},a.prototype.getData=function(){var e=Array.prototype.slice.call(arguments);return this.toPayload(e).data},a.prototype.displayName=function(){return i.extractDisplayName(this._name)},a.prototype.typeName=function(){return i.extractTypeName(this._name)},a.prototype.request=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:t,params:[n],format:r}},a.prototype.execute=function(){return this._constant?this.call.apply(this,Array.prototype.slice.call(arguments)):this.sendTransaction.apply(this,Array.prototype.slice.call(arguments))},a.prototype.attachToContract=function(e){var t=this.execute.bind(this);t.request=this.request.bind(this),t.call=this.call.bind(this),t.sendTransaction=this.sendTransaction.bind(this),t.estimateGas=this.estimateGas.bind(this),t.getData=this.getData.bind(this);var n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=t},e.exports=a},"L7+l":function(e,t,n){var r=n("fDiS");e.exports={eth:function(){return[new r({name:"newFilter",call:function(e){switch(e[0]){case"latest":return e.shift(),this.params=0,"eth_newBlockFilter";case"pending":return e.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},params:1}),new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),new r({name:"poll",call:"eth_getFilterChanges",params:1})]},shh:function(){return[new r({name:"newFilter",call:"shh_newFilter",params:1}),new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),new r({name:"getLogs",call:"shh_getMessages",params:1}),new r({name:"poll",call:"shh_getFilterChanges",params:1})]}}},LIg4:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},LPSB:function(e,t){e.exports=function(){this.defaultBlock="latest",this.defaultAccount=void 0}},LRpe:function(e,t,n){var r;!function(i){"use strict";var o,s,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u=Math.ceil,l=Math.floor,c=" not a boolean or binary digit",f="rounding mode",p="number type has more than 15 significant digits",d="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",h=1e14,y=14,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7;function v(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=y-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function w(e,t,n){return(e=D(e))>=t&&e<=n}function T(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;o[i]*=t);for(o[r=0]+=d.indexOf(e.charAt(s++));r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function I(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(++t>(n=e.length)){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function D(e){return(e=parseFloat(e))<0?u(e):l(e)}o=function e(t){var n,r,i,o,C,k,E,M=0,A=z.prototype,P=new z(1),V=20,N=4,O=-7,R=21,L=-1e7,F=1e7,B=!0,q=K,j=!1,$=1,U=100,H={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"\xa0",fractionGroupSize:0};function z(e,t){var n,r,i,o,u,l,c=this;if(!(c instanceof z))return B&&X(26,"constructor call without new",e),new z(e,t);if(null!=t&&q(t,2,64,M,"base")){if(l=e+"",10==(t|=0))return Y(c=new z(e instanceof z?e:l),V+c.e+1,N);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+d.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(l))return s(c,l,o,t);o?(c.s=1/e<0?(l=l.slice(1),-1):1,B&&l.replace(/^0\.0*|\./,"").length>15&&X(M,p,e),o=!1):c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=G(l,10,t,c.s)}else{if(e instanceof z)return c.s=e.s,c.e=e.e,c.c=(e=e.c)?e.slice():e,void(M=0);if((o="number"==typeof e)&&0*e==0){if(c.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return c.e=r,c.c=[e],void(M=0)}l=e+""}else{if(!a.test(l=e+""))return s(c,l,o);c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((r=l.indexOf("."))>-1&&(l=l.replace(".","")),(i=l.search(/e/i))>0?(r<0&&(r=i),r+=+l.slice(i+1),l=l.substring(0,i)):r<0&&(r=l.length),i=0;48===l.charCodeAt(i);i++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(i,u+1))if(u=l.length,o&&B&&u>15&&X(M,p,c.s*e),(r=r-i-1)>F)c.c=c.e=null;else if(r<L)c.c=[c.e=0];else{if(c.e=r,c.c=[],i=(r+1)%y,r<0&&(i+=y),i<u){for(i&&c.c.push(+l.slice(0,i)),u-=y;i<u;)c.c.push(+l.slice(i,i+=y));l=l.slice(i),i=y-l.length}else i-=u;for(;i--;l+="0");c.c.push(+l)}else c.c=[c.e=0];M=0}function G(e,t,r,i){var o,s,a,u,l,c,f,p=e.indexOf("."),h=V,y=N;for(r<37&&(e=e.toLowerCase()),p>=0&&(a=U,U=0,e=e.replace(".",""),l=(f=new z(r)).pow(e.length-p),U=a,f.c=x(I(b(l.c),l.e),10,t),f.e=f.c.length),s=a=(c=x(e,r,t)).length;0==c[--a];c.pop());if(!c[0])return"0";if(p<0?--s:(l.c=c,l.e=s,l.s=i,c=(l=n(l,f,h,y,t)).c,u=l.r,s=l.e),p=c[o=s+h+1],a=t/2,u=u||o<0||null!=c[o+1],u=y<4?(null!=p||u)&&(0==y||y==(l.s<0?3:2)):p>a||p==a&&(4==y||u||6==y&&1&c[o-1]||y==(l.s<0?8:7)),o<1||!c[0])e=u?I("1",-h):"0";else{if(c.length=o,u)for(--t;++c[--o]>t;)c[o]=0,o||(++s,c.unshift(1));for(a=c.length;!c[--a];);for(p=0,e="";p<=a;e+=d.charAt(c[p++]));e=I(e,s)}return e}function W(e,t,n,r){var i,o,s,a,u;if(n=null!=n&&q(n,0,8,r,f)?0|n:N,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=b(e.c),u=19==r||24==r&&s<=O?S(u,s):I(u,s);else if(o=(e=Y(new z(e),t,n)).e,a=(u=b(e.c)).length,19==r||24==r&&(t<=o||o<=O)){for(;a<t;u+="0",a++);u=S(u,o)}else if(t-=s,u=I(u,o),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function Z(e,t){var n,r,i=0;for(T(e[0])&&(e=e[0]),n=new z(e[0]);++i<e.length;){if(!(r=new z(e[i])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function K(e,t,n,r,i){return(e<t||e>n||e!=D(e))&&X(r,(i||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*y-1)>F?e.c=e.e=null:n<L?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",M=0,r}function Y(e,t,n,r){var i,o,s,a,c,f,p,d=e.c,g=m;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=y,p=(c=d[f=0])/g[i-(s=t)-1]%10|0;else if((f=u((o+1)/y))>=d.length){if(!r)break e;for(;d.length<=f;d.push(0));c=p=0,i=1,s=(o%=y)-y+1}else{for(c=a=d[f],i=1;a>=10;a/=10,i++);p=(s=(o%=y)-y+i)<0?0:c/g[i-s-1]%10|0}if(r=r||t<0||null!=d[f+1]||(s<0?c:c%g[i-s-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?s>0?c/g[i-s]:0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(d[0]=g[(t-=e.e+1)%y],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=g[y-o],d[f]=s>0?l(c/g[i-s]%g[s])*a:0),r)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==h&&(d[0]=1));break}if(d[f]+=a,d[f]!=h)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>F?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}return z.another=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=function(){var e,t,n=0,r={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){if(o.hasOwnProperty(t))return null!=(e=o[t])}:function(){if(i.length>n)return null!=(e=i[n++])};return s(t="DECIMAL_PLACES")&&q(e,0,1e9,2,t)&&(V=0|e),r[t]=V,s(t="ROUNDING_MODE")&&q(e,0,8,2,t)&&(N=0|e),r[t]=N,s(t="EXPONENTIAL_AT")&&(T(e)?q(e[0],-1e9,0,2,t)&&q(e[1],0,1e9,2,t)&&(O=0|e[0],R=0|e[1]):q(e,-1e9,1e9,2,t)&&(O=-(R=0|(e<0?-e:e)))),r[t]=[O,R],s(t="RANGE")&&(T(e)?q(e[0],-1e9,-1,2,t)&&q(e[1],1,1e9,2,t)&&(L=0|e[0],F=0|e[1]):q(e,-1e9,1e9,2,t)&&(0|e?L=-(F=0|(e<0?-e:e)):B&&X(2,t+" cannot be zero",e))),r[t]=[L,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(M=0,q=(B=!!e)?K:w):B&&X(2,t+c,e)),r[t]=B,s(t="CRYPTO")&&(e===!!e||1===e||0===e?(j=!1,e&&!j&&B&&X(2,"crypto unavailable",void 0)):B&&X(2,t+c,e)),r[t]=j,s(t="MODULO_MODE")&&q(e,0,9,2,t)&&($=0|e),r[t]=$,s(t="POW_PRECISION")&&q(e,0,1e9,2,t)&&(U=0|e),r[t]=U,s(t="FORMAT")&&("object"==typeof e?H=e:B&&X(2,t+" not an object",e)),r[t]=H,r},z.max=function(){return Z(arguments,A.lt)},z.min=function(){return Z(arguments,A.gt)},z.random=(r=9007199254740992*Math.random()&2097151?function(){return l(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,i,o=0,s=[],a=new z(P);if(e=null!=e&&q(e,0,1e9,14)?0|e:V,n=u(e/y),j&&B&&X(14,"crypto unavailable",void 0),!o)for(;o<n;)(i=r())<9e15&&(s[o++]=i%1e14);for(n=s[--o],e%=y,n&&e&&(s[o]=l(n/(i=m[y-e]))*i);0===s[o];s.pop(),o--);if(o<0)s=[t=0];else{for(t=-1;0===s[0];s.shift(),t-=y);for(o=1,i=s[0];i>=10;i/=10,o++);o<y&&(t-=y-o)}return a.e=t,a.c=s,a}),n=function(){function e(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%g,c=t/g|0;for(e=e.slice();u--;)a=((i=l*(o=e[u]%g)+(r=c*o+(s=e[u]/g|0)*l)%g*g+a)/n|0)+(r/g|0)+c*s,e[u]=i%n;return a&&e.unshift(a),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,e[n]=(i=e[n]<t[n]?1:0)*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.shift());}return function(r,i,o,s,a){var u,c,f,p,d,m,g,b,_,w,T,x,S,I,D,C,k,E=r.s==i.s?1:-1,M=r.c,A=i.c;if(!(M&&M[0]&&A&&A[0]))return new z(r.s&&i.s&&(M?!A||M[0]!=A[0]:A)?M&&0==M[0]||!A?0*E:E/0:NaN);for(_=(b=new z(E)).c=[],E=o+(c=r.e-i.e)+1,a||(a=h,c=v(r.e/y)-v(i.e/y),E=E/y|0),f=0;A[f]==(M[f]||0);f++);if(A[f]>(M[f]||0)&&c--,E<0)_.push(1),p=!0;else{for(I=M.length,C=A.length,f=0,E+=2,(d=l(a/(A[0]+1)))>1&&(A=e(A,d,a),M=e(M,d,a),C=A.length,I=M.length),S=C,T=(w=M.slice(0,C)).length;T<C;w[T++]=0);(k=A.slice()).unshift(0),D=A[0],A[1]>=a/2&&D++;do{if(d=0,(u=t(A,w,C,T))<0){if(x=w[0],C!=T&&(x=x*a+(w[1]||0)),(d=l(x/D))>1)for(d>=a&&(d=a-1),g=(m=e(A,d,a)).length,T=w.length;1==t(m,w,g,T);)d--,n(m,C<g?k:A,g,a),g=m.length,u=1;else 0==d&&(u=d=1),g=(m=A.slice()).length;if(g<T&&m.unshift(0),n(w,m,T,a),T=w.length,-1==u)for(;t(A,w,C,T)<1;)d++,n(w,C<T?k:A,T,a),T=w.length}else 0===u&&(d++,w=[0]);_[f++]=d,w[0]?w[T++]=M[S]||0:(w=[M[S]],T=1)}while((S++<I||null!=w[0])&&E--);p=null!=w[0],_[0]||_.shift()}if(a==h){for(f=1,E=_[0];E>=10;E/=10,f++);Y(b,o+(b.e=f+c*y-1)+1,s,p)}else b.e=c,b.r=+p;return b}}(),i=/^(-?)0([xbo])/i,o=/^([^.]+)\.$/,C=/^\.([^.]+)$/,k=/^-?(Infinity|NaN)$/,E=/^\s*\+|^\s+|\s+$/g,s=function(e,t,n,r){var s,a=n?t:t.replace(E,"");if(k.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(i,function(e,t,n){return s="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=s?e:t}),r&&(s=r,a=a.replace(o,"$1").replace(C,"0.$1")),t!=a))return new z(a,s);B&&X(M,"not a"+(r?" base "+r:"")+" number",t),e.s=null}e.c=e.e=null,M=0},A.absoluteValue=A.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},A.ceil=function(){return Y(new z(this),this.e+1,2)},A.comparedTo=A.cmp=function(e,t){return M=1,_(this,new z(e,t))},A.decimalPlaces=A.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-v(this.e/y))*y,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},A.dividedBy=A.div=function(e,t){return M=3,n(this,new z(e,t),V,N)},A.dividedToIntegerBy=A.divToInt=function(e,t){return M=4,n(this,new z(e,t),0,1)},A.equals=A.eq=function(e,t){return M=5,0===_(this,new z(e,t))},A.floor=function(){return Y(new z(this),this.e+1,3)},A.greaterThan=A.gt=function(e,t){return M=6,_(this,new z(e,t))>0},A.greaterThanOrEqualTo=A.gte=function(e,t){return M=7,1===(t=_(this,new z(e,t)))||0===t},A.isFinite=function(){return!!this.c},A.isInteger=A.isInt=function(){return!!this.c&&v(this.e/y)>this.c.length-2},A.isNaN=function(){return!this.s},A.isNegative=A.isNeg=function(){return this.s<0},A.isZero=function(){return!!this.c&&0==this.c[0]},A.lessThan=A.lt=function(e,t){return M=8,_(this,new z(e,t))<0},A.lessThanOrEqualTo=A.lte=function(e,t){return M=9,-1===(t=_(this,new z(e,t)))||0===t},A.minus=A.sub=function(e,t){var n,r,i,o,s=this,a=s.s;if(M=10,t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/y,l=e.e/y,c=s.c,f=e.c;if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new z(f?s:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new z(c[0]?s:3==N?-0:0)}if(u=v(u),l=v(l),c=c.slice(),a=u-l){for((o=a<0)?(a=-a,i=c):(l=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=f.length))?a:t,a=t=0;t<r;t++)if(c[t]!=f[t]){o=c[t]<f[t];break}if(o&&(i=c,c=f,f=i,e.s=-e.s),(t=(r=f.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=h-1;r>a;){if(c[--r]<f[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=h}c[r]-=f[r]}for(;0==c[0];c.shift(),--l);return c[0]?J(e,c,l):(e.s=3==N?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,o=this;return M=11,e=new z(e,t),!o.c||!e.s||e.c&&!e.c[0]?new z(NaN):!e.c||o.c&&!o.c[0]?new z(o):(9==$?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,$),o.minus(r.times(e)))},A.negated=A.neg=function(){var e=new z(this);return e.s=-e.s||null,e},A.plus=A.add=function(e,t){var n,r=this,i=r.s;if(M=12,t=(e=new z(e,t)).s,!i||!t)return new z(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/y,s=e.e/y,a=r.c,u=e.c;if(!o||!s){if(!a||!u)return new z(i/0);if(!a[0]||!u[0])return u[0]?e:new z(a[0]?r:0*i)}if(o=v(o),s=v(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]%=h;return i&&(a.unshift(i),++s),J(e,a,s)},A.precision=A.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(B&&X(13,"argument"+c,e),e!=!!e&&(e=null)),!i)return null;if(t=(n=i.length-1)*y+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},A.round=function(e,t){var n=new z(this);return(null==e||q(e,0,1e9,15))&&Y(n,~~e+this.e+1,null!=t&&q(t,0,8,15,f)?0|t:N),n},A.shift=function(e){var t=this;return q(e,-9007199254740991,9007199254740991,16,"argument")?t.times("1e"+D(e)):new z(t.c&&t.c[0]&&(e<-9007199254740991||e>9007199254740991)?t.s*(e<0?0:1/0):t)},A.squareRoot=A.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,u=s.s,l=s.e,c=V+4,f=new z("0.5");if(1!==u||!a||!a[0])return new z(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=b(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),r=new z(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new z(u+""),r.c[0])for((u=(l=r.e)+c)<3&&(u=0);;)if(r=f.times((o=r).plus(n(s,o,c,1))),b(o.c).slice(0,u)===(t=b(r.c)).slice(0,u)){if(r.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+V+2,1),e=!r.times(r).eq(s));break}if(!i&&(Y(o,o.e+V+2,0),o.times(o).eq(s))){r=o;break}c+=4,u+=4,i=1}return Y(r,r.e+V+1,N,e)},A.times=A.mul=function(e,t){var n,r,i,o,s,a,u,l,c,f,p,d,m,b,_,w=this,T=w.c,x=(M=17,e=new z(e,t)).c;if(!(T&&x&&T[0]&&x[0]))return!w.s||!e.s||T&&!T[0]&&!x||x&&!x[0]&&!T?e.c=e.e=e.s=null:(e.s*=w.s,T&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(w.e/y)+v(e.e/y),e.s*=w.s,(u=T.length)<(f=x.length)&&(m=T,T=x,x=m,i=u,u=f,f=i),i=u+f,m=[];i--;m.push(0));for(b=h,_=g,i=f;--i>=0;){for(n=0,p=x[i]%_,d=x[i]/_|0,o=i+(s=u);o>i;)n=((l=p*(l=T[--s]%_)+(a=d*l+(c=T[s]/_|0)*p)%_*_+m[o]+n)/b|0)+(a/_|0)+d*c,m[o--]=l%b;m[o]=n}return n?++r:m.shift(),J(e,m,r)},A.toDigits=function(e,t){var n=new z(this);return e=null!=e&&q(e,1,1e9,18,"precision")?0|e:null,t=null!=t&&q(t,0,8,18,f)?0|t:N,e?Y(n,e,t):n},A.toExponential=function(e,t){return W(this,null!=e&&q(e,0,1e9,19)?1+~~e:null,t,19)},A.toFixed=function(e,t){return W(this,null!=e&&q(e,0,1e9,20)?~~e+this.e+1:null,t,20)},A.toFormat=function(e,t){var n=W(this,null!=e&&q(e,0,1e9,21)?~~e+this.e+1:null,t,21);if(this.c){var r,i=n.split("."),o=+H.groupSize,s=+H.secondaryGroupSize,a=H.groupSeparator,u=i[0],l=i[1],c=this.s<0,f=c?u.slice(1):u,p=f.length;if(s&&(r=o,o=s,s=r,p-=r),o>0&&p>0){for(u=f.substr(0,r=p%o||o);r<p;r+=o)u+=a+f.substr(r,o);s>0&&(u+=a+f.slice(r)),c&&(u="-"+u)}n=l?u+H.decimalSeparator+((s=+H.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+H.fractionGroupSeparator):l):u}return n},A.toFraction=function(e){var t,r,i,o,s,a,u,l,c,f=B,p=this,d=p.c,h=new z(P),g=r=new z(P),v=u=new z(P);if(null!=e&&(B=!1,a=new z(e),B=f,(f=a.isInt())&&!a.lt(P)||(B&&X(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&a.c&&Y(a,a.e+1,1).gte(P)?a:null)),!d)return p.toString();for(c=b(d),o=h.e=c.length-p.e-1,h.c[0]=m[(s=o%y)<0?y+s:s],e=!e||a.cmp(h)>0?o>0?h:g:a,s=F,F=1/0,a=new z(c),u.c[0]=0;l=n(a,h,0,1),1!=(i=r.plus(l.times(v))).cmp(e);)r=v,v=i,g=u.plus(l.times(i=g)),u=i,h=a.minus(l.times(i=h)),a=i;return i=n(e.minus(r),v,0,1),u=u.plus(i.times(g)),r=r.plus(i.times(v)),u.s=g.s=p.s,t=n(g,v,o*=2,N).minus(p).abs().cmp(n(u,r,o,N).minus(p).abs())<1?[g.toString(),v.toString()]:[u.toString(),r.toString()],F=s,t},A.toNumber=function(){var e=this;return+e||(e.s?0*e.s:NaN)},A.toPower=A.pow=function(e){var t,n,r=l(e<0?-e:+e),i=this;if(!q(e,-9007199254740991,9007199254740991,23,"exponent")&&(!isFinite(e)||r>9007199254740991&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new z(Math.pow(+i,e));for(t=U?u(U/y+2):0,n=new z(P);;){if(r%2){if(!(n=n.times(i)).c)break;t&&n.c.length>t&&(n.c.length=t)}if(!(r=l(r/2)))break;i=i.times(i),t&&i.c&&i.c.length>t&&(i.c.length=t)}return e<0&&(n=P.div(n)),t?Y(n,U,N):n},A.toPrecision=function(e,t){return W(this,null!=e&&q(e,1,1e9,24,"precision")?0|e:null,t,24)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=b(n.c),t=null!=e&&q(e,2,64,25,"base")?G(I(t,i),0|e,10,r):i<=O||i>=R?S(t,i):I(t,i),r<0&&n.c[0]&&(t="-"+t)),t},A.truncated=A.trunc=function(){return Y(new z(this),this.e+1,1)},A.valueOf=A.toJSON=function(){return this.toString()},null!=t&&z.config(t),z}(),void 0===(r=(function(){return o}).call(t,n,t,e))||(e.exports=r)}()},LSTr:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},e.exports=o},LdkH:function(e,t,n){"use strict";var r=n("3QZ1"),i=n("NiEJ"),o=function(e,t){var n=this;this.responseCallbacks={},this.path=e,this.connection=t.connect({path:this.path}),this.connection.on("error",function(e){console.error("IPC Connection Error",e),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(e){n._parseResponse(e.toString()).forEach(function(e){var t=null;r.isArray(e)?e.forEach(function(e){n.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,n.responseCallbacks[t]&&(n.responseCallbacks[t](null,e),delete n.responseCallbacks[t])})})};o.prototype._parseResponse=function(e){var t=this,n=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var r=null;try{r=JSON.parse(e)}catch(n){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,r&&n.push(r)}),n},o.prototype._addResponseCallback=function(e,t){var n=e.id||e[0].id,r=e.method||e[0].method;this.responseCallbacks[n]=t,this.responseCallbacks[n].method=r},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.isConnected=function(){return this.connection.writable||this.connection.connect({path:this.path}),!!this.connection.writable},o.prototype.send=function(e){if(this.connection.writeSync){var t;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(e));try{t=JSON.parse(n)}catch(e){throw i.InvalidResponse(n)}return t}throw new Error('You tried to send "'+e.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},o.prototype.sendAsync=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},e.exports=o},M53H:function(e){e.exports=[{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_refund",type:"address"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"}],name:"setAddr",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"}]},MlIO:function(e,t,n){var r,i,o,s,a;e.exports=(r=n("Ib8C"),o=(i=r.lib).Base,s=i.WordArray,(a=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var i=e[r];n.push(i.high),n.push(i.low)}return s.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),r)},MxNA:function(e,t,n){var r=n("4Zld"),i=n("GqWc"),o=function(e){this._inputFormatter=e.inputFormatter,this._outputFormatter=e.outputFormatter};o.prototype.isType=function(e){throw"this method should be overrwritten for type "+e},o.prototype.staticPartLength=function(e){return(this.nestedTypes(e)||["[1]"]).map(function(e){return parseInt(e.slice(1,-1),10)||1}).reduce(function(e,t){return e*t},32)},o.prototype.isDynamicArray=function(e){var t=this.nestedTypes(e);return!!t&&!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(e){var t=this.nestedTypes(e);return!!t&&!!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(e){var t=this.nestedTypes(e);return t?parseInt(t[t.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(e){var t=this.nestedTypes(e);return t?e.substr(0,e.length-t[t.length-1].length):e},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(e){return e.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(e,t){var n,i,o,s=this;return this.isDynamicArray(t)?(n=e.length,i=s.nestedName(t),(o=[]).push(r.formatInputInt(n).encode()),e.forEach(function(e){o.push(s.encode(e,i))}),o):this.isStaticArray(t)?function(){for(var n=s.staticArrayLength(t),r=s.nestedName(t),i=[],o=0;o<n;o++)i.push(s.encode(e[o],r));return i}():this._inputFormatter(e,t).encode()},o.prototype.decode=function(e,t,n){var r=this;if(this.isDynamicArray(n))return function(){for(var i=parseInt("0x"+e.substr(2*t,64)),o=parseInt("0x"+e.substr(2*i,64)),s=i+32,a=r.nestedName(n),u=r.staticPartLength(a),l=32*Math.floor((u+31)/32),c=[],f=0;f<o*l;f+=l)c.push(r.decode(e,s+f,a));return c}();if(this.isStaticArray(n))return function(){for(var i=r.staticArrayLength(n),o=t,s=r.nestedName(n),a=r.staticPartLength(s),u=32*Math.floor((a+31)/32),l=[],c=0;c<i*u;c+=u)l.push(r.decode(e,o+c,s));return l}();if(this.isDynamicType(n))return function(){var o=parseInt("0x"+e.substr(2*t,64)),s=parseInt("0x"+e.substr(2*o,64)),a=Math.floor((s+31)/32),u=new i(e.substr(2*o,64*(1+a)),0);return r._outputFormatter(u,n)}();var o=this.staticPartLength(n),s=new i(e.substr(2*t,2*o));return this._outputFormatter(s,n)},e.exports=o},NFKh:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("MlIO"),n("F+F2"),n("qM6L"),n("ETIr"),n("cv67"),n("3y9D"),n("lPiR"),n("GRuw"),n("1uat"),n("uGsb"),n("5hvy"),n("ELcG"),n("WYAk"),n("e7zE"),n("K3mO"),n("OLod"),n("ALsQ"),n("9OqN"),n("qu8F"),n("S6kV"),n("gb/T"),n("qBft"),n("oRuE"),n("jO9C"),n("KmYQ"),n("uGxW"),n("bQjk"),n("wZgz"),n("pA7S"),n("w7YG"),n("E4JC"),n("PVpz"),r)},NG6W:function(e,t,n){var r=n("lXRz"),i=n("84jk"),o=n("U75c"),s=function(e){this._requestManager=e._requestManager;var t=this;a().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};s.prototype.newMessageFilter=function(e,t,n){return new i(e,"shh",this._requestManager,o.shh(),null,t,n)};var a=function(){return[new r({name:"version",call:"shh_version",params:0}),new r({name:"info",call:"shh_info",params:0}),new r({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new r({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new r({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new r({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new r({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new r({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new r({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new r({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new r({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new r({name:"newSymKey",call:"shh_newSymKey",params:0}),new r({name:"addSymKey",call:"shh_addSymKey",params:1}),new r({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new r({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new r({name:"getSymKey",call:"shh_getSymKey",params:1}),new r({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new r({name:"post",call:"shh_post",params:1,inputFormatter:[null]})]};e.exports=s},NiEJ:function(e,t){e.exports={InvalidNumberOfSolidityArgs:function(){return new Error("Invalid number of arguments to Solidity function")},InvalidNumberOfRPCParams:function(){return new Error("Invalid number of input parameters to RPC method")},InvalidConnection:function(e){return new Error("CONNECTION ERROR: Couldn't connect to node "+e+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)},ConnectionTimeout:function(e){return new Error("CONNECTION TIMEOUT: timeout of "+e+" ms achived")}}},O0eG:function(e,t,n){var r=n("NiEJ");"undefined"!=typeof window&&window.XMLHttpRequest?XMLHttpRequest=window.XMLHttpRequest:XMLHttpRequest=n("SUym").XMLHttpRequest;var i=n("qvd7"),o=function(e,t,n,r,i){this.host=e||"http://localhost:8545",this.timeout=t||0,this.user=n,this.password=r,this.headers=i};o.prototype.prepareRequest=function(e){var t;if(e?(t=new i).timeout=this.timeout:t=new XMLHttpRequest,t.open("POST",this.host,e),this.user&&this.password){var n="Basic "+new Buffer(this.user+":"+this.password).toString("base64");t.setRequestHeader("Authorization",n)}return t.setRequestHeader("Content-Type","application/json"),this.headers&&this.headers.forEach(function(e){t.setRequestHeader(e.name,e.value)}),t},o.prototype.send=function(e){var t=this.prepareRequest(!1);try{t.send(JSON.stringify(e))}catch(e){throw r.InvalidConnection(this.host)}var n=t.responseText;try{n=JSON.parse(n)}catch(e){throw r.InvalidResponse(t.responseText)}return n},o.prototype.sendAsync=function(e,t){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var e=n.responseText,i=null;try{e=JSON.parse(e)}catch(e){i=r.InvalidResponse(n.responseText)}t(i,e)}},n.ontimeout=function(){t(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(e))}catch(e){t(r.InvalidConnection(this.host))}},o.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(e){return!1}},e.exports=o},OLod:function(e,t,n){var r;e.exports=void((r=n("Ib8C")).lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,s=n.BufferedBlockAlgorithm,a=t.enc.Base64,u=t.algo.EvpKDF,l=n.Cipher=s.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?v:m}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),c=(n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),f=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=c.CBC=function(){var t=f.extend();function n(t,n,r){var i=this._iv;if(i){var o=i;this._iv=e}else o=this._prevBlock;for(var s=0;s<r;s++)t[n+s]^=o[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=o}}),t}(),d=(t.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,i=r<<24|r<<16|r<<8|r,s=[],a=0;a<r;a+=4)s.push(i);var u=o.create(s,r);e.concat(u)},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},h=(n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode=r.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=o.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(a)},parse:function(e){var t=a.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=o.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return h.create({ciphertext:t,salt:r})}},m=n.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),s=i.cfg;return h.create({ciphertext:o,key:n,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=u.create({keySize:t+n}).compute(e,r),s=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,h.create({key:i,iv:s,salt:r})}},v=n.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:g}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=m.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,m.decrypt.call(this,e,t,i.key,r)}})}())},Od6n:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bool(\[([0-9]*)\])*$/)},e.exports=o},OzUK:function(e,t,n){var r=n("kB5k"),i=n("q4b3"),o=n("UVUN"),s=n("YHIM"),a=function(e){r.config(o.ETH_BIGNUMBER_ROUNDING_MODE);var t=i.padLeft(i.toTwosComplement(e).toString(16),64);return new s(t)},u=function(e){var t=e.staticPart()||"0";return function(e){return"1"===new r(e.substr(0,1),16).toString(2).substr(0,1)}(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},l=function(e){var t=e.staticPart()||"0";return new r(t,16)};e.exports={formatInputInt:a,formatInputBytes:function(e){var t=i.toHex(e).substr(2),n=Math.floor((t.length+63)/64);return t=i.padRight(t,64*n),new s(t)},formatInputDynamicBytes:function(e){var t=i.toHex(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputString:function(e){var t=i.fromUtf8(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputBool:function(e){return new s("000000000000000000000000000000000000000000000000000000000000000"+(e?"1":"0"))},formatInputReal:function(e){return a(new r(e).times(new r(2).pow(128)))},formatOutputInt:u,formatOutputUInt:l,formatOutputReal:function(e){return u(e).dividedBy(new r(2).pow(128))},formatOutputUReal:function(e){return l(e).dividedBy(new r(2).pow(128))},formatOutputBool:function(e){return"0000000000000000000000000000000000000000000000000000000000000001"===e.staticPart()},formatOutputBytes:function(e,t){var n=t.match(/^bytes([0-9]*)/),r=parseInt(n[1]);return"0x"+e.staticPart().slice(0,2*r)},formatOutputDynamicBytes:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return"0x"+e.dynamicPart().substr(64,t)},formatOutputString:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return i.toUtf8(e.dynamicPart().substr(64,t))},formatOutputAddress:function(e){var t=e.staticPart();return"0x"+t.slice(t.length-40,t.length)}}},PVpz:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("ETIr"),n("cv67"),n("K3mO"),n("OLod"),function(){var e=r,t=e.lib.StreamCipher,n=[],i=[],o=[],s=e.algo.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)a.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,s=o[0],u=o[1],l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),f=l>>>16|4294901760&c,p=c<<16|65535&l;for(r[0]^=l,r[1]^=f,r[2]^=c,r[3]^=p,r[4]^=l,r[5]^=f,r[6]^=c,r[7]^=p,i=0;i<4;i++)a.call(this)}},_doProcessBlock:function(e,t){var r=this._X;a.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function a(){for(var e=this._X,t=this._C,n=0;n<8;n++)i[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<i[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<i[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<i[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<i[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<i[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<i[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<i[6]>>>0?1:0)|0,this._b=t[7]>>>0<i[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],s=65535&r,a=r>>>16;o[n]=((s*s>>>17)+s*a>>>15)+a*a^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},PZgv:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputDynamicBytes,this._outputFormatter=r.formatOutputDynamicBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},PfUy:function(e,t,n){var r=n("fDiS");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"putString",call:"db_putString",params:3}),new r({name:"getString",call:"db_getString",params:2}),new r({name:"putHex",call:"db_putHex",params:3}),new r({name:"getHex",call:"db_getHex",params:2})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},Qiyv:function(e,t,n){var r=n("3QZ1"),i=n("0ko0"),o=n("ewyi"),s=n("4rvP"),a=n("84jk"),u=n("U75c"),l=function(e,t,n){this._requestManager=e,this._params=t.inputs,this._name=r.transformToFullName(t),this._address=n,this._anonymous=t.anonymous};l.prototype.types=function(e){return this._params.filter(function(t){return t.indexed===e}).map(function(e){return e.type})},l.prototype.displayName=function(){return r.extractDisplayName(this._name)},l.prototype.typeName=function(){return r.extractTypeName(this._name)},l.prototype.signature=function(){return s(this._name)},l.prototype.encode=function(e,t){e=e||{},t=t||{};var n={};["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(e){n[e]=o.inputBlockNumberFormatter(t[e])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var s=this._params.filter(function(e){return!0===e.indexed}).map(function(t){var n=e[t.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(e){return"0x"+i.encodeParam(t.type,e)}):"0x"+i.encodeParam(t.type,n)});return n.topics=n.topics.concat(s),n},l.prototype.decode=function(e){e.data=e.data||"",e.topics=e.topics||[];var t=(this._anonymous?e.topics:e.topics.slice(1)).map(function(e){return e.slice(2)}).join(""),n=i.decodeParams(this.types(!0),t),r=e.data.slice(2),s=i.decodeParams(this.types(!1),r),a=o.outputLogFormatter(e);return a.event=this.displayName(),a.address=e.address,a.args=this._params.reduce(function(e,t){return e[t.name]=t.indexed?n.shift():s.shift(),e},{}),delete a.data,delete a.topics,a},l.prototype.execute=function(e,t,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(t=null),1===arguments.length&&(t=null,e={}));var i=this.encode(e,t),o=this.decode.bind(this);return new a(i,"eth",this._requestManager,u.eth(),o,n)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this),n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=this.execute.bind(this,e)},e.exports=l},S5bw:function(e,t,n){"use strict";var r=n(null),i=n(null),o=n("zo3G"),s=n(null),a=n(null),u=n("60iU"),l=function(e){function t(t,n,r){void 0===r&&(r=0);var i=e.call(this,t)||this;return i.scheduler=n,i.delay=r,i}return r.c(t,e),t.dispatch=function(e){e.notification.observe(e.destination),this.unsubscribe()},t.prototype.scheduleMessage=function(e){this.add(this.scheduler.schedule(t.dispatch,this.delay,new c(e,this.destination)))},t.prototype._next=function(e){this.scheduleMessage(u.Notification.createNext(e))},t.prototype._error=function(e){this.scheduleMessage(u.Notification.createError(e))},t.prototype._complete=function(){this.scheduleMessage(u.Notification.createComplete())},t}(a.a),c=function(e,t){this.notification=e,this.destination=t},f=n(null),p=n(null);n.d(t,"ReplaySubject",function(){return d});var d=function(e){function t(t,n,r){void 0===t&&(t=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=e.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=t<1?1:t,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.c(t,e),t.prototype.nextInfiniteTimeWindow=function(t){var n=this._events;n.push(t),n.length>this._bufferSize&&n.shift(),e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this._events.push(new h(this._getNow(),t)),this._trimBufferThenGetEvents(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new f.a;if(this.isStopped||this.hasError?t=s.a.EMPTY:(this.observers.push(e),t=new p.a(this,e)),i&&e.add(e=new l(e,i)),n)for(var a=0;a<o&&!e.closed;a++)e.next(r[a]);else for(a=0;a<o&&!e.closed;a++)e.next(r[a].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),t},t.prototype._getNow=function(){return(this.scheduler||o.queue).now()},t.prototype._trimBufferThenGetEvents=function(){for(var e=this._getNow(),t=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(e-r[o].time<n);)o++;return i>t&&(o=Math.max(o,i-t)),o>0&&r.splice(0,o),r},t}(i.a),h=function(e,t){this.time=e,this.value=t}},S6kV:function(e,t,n){var r,i,o;e.exports=(r=n("Ib8C"),n("OLod"),r.mode.OFB=(o=(i=r.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var s=0;s<r;s++)e[t+s]^=o[s]}}),i.Decryptor=o,i),r.mode.OFB)},SMTJ:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputUReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},SUym:function(e,t,n){"use strict";t.XMLHttpRequest="undefined"==typeof XMLHttpRequest?{}:XMLHttpRequest},SVfY:function(e,t,n){"use strict";var r=n("DapH"),i=n("9Z5i"),o=n("4m0o");e.exports=function(e){this._requestManager=e._requestManager;var t,n,s,a,u=this;(t=new r({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null]}),n=new r({name:"importRawKey",call:"personal_importRawKey",params:2}),s=new r({name:"sign",call:"personal_sign",params:3,inputFormatter:[null,o.inputAddressFormatter,null]}),a=new r({name:"ecRecover",call:"personal_ecRecover",params:2}),[t,n,new r({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[o.inputAddressFormatter,null,null]}),a,s,new r({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[o.inputTransactionFormatter,null]}),new r({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[o.inputAddressFormatter]})]).forEach(function(e){e.attachToObject(u),e.setRequestManager(u._requestManager)}),[new i({name:"listAccounts",getter:"personal_listAccounts"})].forEach(function(e){e.attachToObject(u),e.setRequestManager(u._requestManager)})}},Spqy:function(e,t,n){var r=n("ewyi"),i=n("3QZ1"),o=n("lXRz"),s=n("DxpT");e.exports=function(e){var t=function(t){var n;t.property?(e[t.property]||(e[t.property]={}),n=e[t.property]):n=e,t.methods&&t.methods.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)}),t.properties&&t.properties.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)})};return t.formatters=r,t.utils=i,t.Method=o,t.Property=s,t}},Swo3:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},T1DM:function(e,t,n){"use strict";var r=n(null),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.c(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.c(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(null).a)),o=n("siIJ"),s=function(e){function t(n,r){void 0===r&&(r=o.Scheduler.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.c(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(o.Scheduler);n.d(t,"async",function(){return a});var a=new s(i)},U75c:function(e,t,n){var r=n("lXRz");e.exports={eth:function(){return[new r({name:"newFilter",call:function(e){switch(e[0]){case"latest":return e.shift(),this.params=0,"eth_newBlockFilter";case"pending":return e.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},params:1}),new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),new r({name:"poll",call:"eth_getFilterChanges",params:1})]},shh:function(){return[new r({name:"newFilter",call:"shh_newMessageFilter",params:1}),new r({name:"uninstallFilter",call:"shh_deleteMessageFilter",params:1}),new r({name:"getLogs",call:"shh_getFilterMessages",params:1}),new r({name:"poll",call:"shh_getFilterMessages",params:1})]}}},"U8N/":function(e,t,n){var r=n("lXRz");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"putString",call:"db_putString",params:3}),new r({name:"getString",call:"db_getString",params:2}),new r({name:"putHex",call:"db_putHex",params:3}),new r({name:"getHex",call:"db_getHex",params:2})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},UDwF:function(e,t,n){(function(e){var t=n("kwJ2"),r=n("HKOv"),i=n("jqwy");"object"==typeof i&&0==Object.keys(i).length&&(i=global.Web3),function(e){function n(e){this.provider=e}n.prototype.send=function(){return this.provider.send.apply(this.provider,arguments)},n.prototype.sendAsync=function(){return this.provider.sendAsync.apply(this.provider,arguments)};var o=(new i).toBigNumber(0).constructor,s={is_object:function(e){return"object"==typeof e&&!Array.isArray(e)},is_big_number:function(e){if("object"!=typeof e)return!1;try{return new o(e),!0}catch(e){return!1}},decodeLogs:function(e,n,r){return r.map(function(n){var r=e.events[n.topics[0]];if(null==r)return null;var i=s.merge({},n);function o(e,t){return{inputs:e.inputs.filter(function(e){return e.indexed===t}),name:e.name,type:e.type,anonymous:e.anonymous}}var a="0x"+(r.anonymous?i.topics:i.topics.slice(1)).map(function(e){return e.slice(2)}).join(""),u=t.decodeEvent(o(r,!0),a),l=i.data,c=t.decodeEvent(o(r,!1),l);return i.event=r.name,i.args=r.inputs.reduce(function(e,t){var n=u[t.name];return void 0===n&&(n=c[t.name]),e[t.name]=n,e},{}),Object.keys(i.args).forEach(function(t){var n=i.args[t];n.constructor.isBN&&(i.args[t]=e.web3.toBigNumber("0x"+n.toString(16)))}),delete i.data,delete i.topics,i}).filter(function(e){return null!=e})},promisifyFunction:function(e,t){return function(){var n=this,r=Array.prototype.slice.call(arguments),i={},o=r[r.length-1];return s.is_object(o)&&!s.is_big_number(o)&&(i=r.pop()),i=s.merge(t.class_defaults,i),t.detectNetwork().then(function(){return new Promise(function(t,o){r.push(i,function(e,n){null!=e?o(e):t(n)}),e.apply(n.contract,r)})})}},synchronizeFunction:function(e,t,n){var r=this;return function(){var i=Array.prototype.slice.call(arguments),o={},a=i[i.length-1];return s.is_object(a)&&!s.is_big_number(a)&&(o=i.pop()),o=s.merge(n.class_defaults,o),n.detectNetwork().then(function(){return new Promise(function(a,u){i.push(o,function(e,r){if(null==e){var i=n.synchronization_timeout||24e4,o=(new Date).getTime(),l=function(){n.web3.eth.getTransactionReceipt(r,function(e,c){return e?u(e):null!=c?a({tx:r,receipt:c,logs:s.decodeLogs(n,t,c.logs)}):i>0&&(new Date).getTime()-o>i?u(new Error("Transaction "+r+" wasn't processed in "+i/1e3+" seconds!")):void setTimeout(l,1e3)})};l()}else u(e)}),e.apply(r,i)})})}},merge:function(){for(var e={},t=Array.prototype.slice.call(arguments),n=0;n<t.length;n++)for(var r=t[n],i=Object.keys(r),o=0;o<i.length;o++){var s=i[o];e[s]=r[s]}return e},parallel:function(e,t){if(t=t||function(){},!e.length)return t(null,[]);var n=0,r=new Array(e.length);e.forEach(function(i,o){i(function(i,s){i?(t(i),t=function(){}):(n++,r[o]=s,n>=e.length&&t(null,r))})})},bootstrap:function(e){return Object.keys(e._static_methods).forEach(function(t){e[t]=e._static_methods[t].bind(e)}),Object.keys(e._properties).forEach(function(t){e.addProp(t,e._properties[t])}),e}};function a(e){var t=this,n=this.constructor;if(this.abi=n.abi,"string"==typeof e){var r=e;e=n.web3.eth.contract(this.abi).at(r)}this.contract=e;for(var i=0;i<this.abi.length;i++){var o=this.abi[i];"function"==o.type&&(this[o.name]=1==o.constant?s.promisifyFunction(e[o.name],n):s.synchronizeFunction(e[o.name],this,n),this[o.name].call=s.promisifyFunction(e[o.name].call,n),this[o.name].sendTransaction=s.promisifyFunction(e[o.name].sendTransaction,n),this[o.name].request=e[o.name].request,this[o.name].estimateGas=s.promisifyFunction(e[o.name].estimateGas,n)),"event"==o.type&&(this[o.name]=e[o.name])}this.sendTransaction=s.synchronizeFunction(function(e,r){"function"==typeof e&&(r=e,e={}),e.to=t.address,n.web3.eth.sendTransaction.apply(n.web3.eth,[e,r])},this,n),this.send=function(e){return t.sendTransaction({value:e})},this.allEvents=e.allEvents,this.address=e.address,this.transactionHash=e.transactionHash}a._static_methods={setProvider:function(e){if(!e)throw new Error("Invalid provider passed to setProvider(); provider is "+e);var t=new n(e);this.web3.setProvider(t),this.currentProvider=e},new:function(){var e=this;if(null==this.currentProvider)throw new Error(this.contract_name+" error: Please call setProvider() first before calling new().");var t=Array.prototype.slice.call(arguments);if(!this.unlinked_binary)throw new Error(this._json.contract_name+" error: contract binary not set. Can't deploy new instance.");return e.detectNetwork().then(function(t){var n=e.binary.match(/__[^_]+_+/g);if(null!=n)throw n=n.map(function(e){return e.replace(/_/g,"")}).sort().filter(function(e,t,n){return t+1>=n.length||e!=n[t+1]}).join(", "),new Error(e.contract_name+" contains unresolved libraries. You must deploy and link the following libraries before you can deploy a new version of "+e._json.contract_name+": "+n)}).then(function(){return new Promise(function(n,r){var i=e.web3.eth.contract(e.abi),o={},a=t[t.length-1];s.is_object(a)&&!s.is_big_number(a)&&(o=t.pop()),null==(o=s.merge(e.class_defaults,o)).data&&(o.data=e.binary),t.push(o,function(t,i){null==t?null==t&&null!=i&&null!=i.address&&n(new e(i)):r(t)}),i.new.apply(i,t)})})},at:function(e){var t=this;if(null==e||"string"!=typeof e||42!=e.length)throw new Error("Invalid address passed to "+this._json.contract_name+".at(): "+e);var n=new this(e);return n.then=function(n){return t.detectNetwork().then(function(n){var r=new t(e);return new Promise(function(n,i){t.web3.eth.getCode(e,function(o,s){return o?i(o):s&&""!==s.replace("0x","").replace(/0/g,"")?void n(r):i(new Error("Cannot create instance of "+t.contract_name+"; no code at address "+e))})})}).then(n)},n},deployed:function(){var e=this;return e.detectNetwork().then(function(){if(null==e._json.networks[e.network_id])throw new Error(e.contract_name+" has not been deployed to detected network (network/artifact mismatch)");if(!e.isDeployed())throw new Error(e.contract_name+" has not been deployed to detected network ("+e.network_id+")");return new e(e.address)})},defaults:function(e){null==this.class_defaults&&(this.class_defaults={}),null==e&&(e={});var t=this;return Object.keys(e).forEach(function(n){t.class_defaults[n]=e[n]}),this.class_defaults},hasNetwork:function(e){return null!=this._json.networks[e+""]},isDeployed:function(){return null!=this.network_id&&null!=this._json.networks[this.network_id]&&!!this.network.address},detectNetwork:function(){var e=this;return new Promise(function(t,n){if(e.network_id&&null!=e.networks[e.network_id])return t(e.network_id);e.web3.version.getNetwork(function(i,o){if(i)return n(i);var a=o.toString();if(e.hasNetwork(a))return e.setNetwork(a),t();var u=Object.keys(e._json.networks).filter(function(e){return 0==e.indexOf("blockchain://")}),l=u.map(function(t){return r.matches.bind(r,t,e.web3.currentProvider)});s.parallel(l,function(r,i){if(r)return n(r);for(var o=0;o<i.length;o++)if(i[o])return e.setNetwork(u[o]),t();e.setNetwork(a),t()})})})},setNetwork:function(e){e&&(this.network_id=e+"")},resetAddress:function(){delete this.network.address},link:function(e,t){var n=this;if("function"==typeof e){var r=e;if(0==r.isDeployed())throw new Error("Cannot link contract without an address.");return this.link(r.contract_name,r.address),void Object.keys(r.events).forEach(function(e){n.network.events[e]=r.events[e]})}if("object"!=typeof e)null==this._json.networks[this.network_id]&&(this._json.networks[this.network_id]={events:{},links:{}}),this.network.links[e]=t;else{var i=e;Object.keys(i).forEach(function(e){n.link(e,i[e])})}},clone:function(e){var t,n=function(){return this.constructor=n,a.apply(this,arguments)},r=e;return"object"!=typeof e&&(r=this._json,t=e,e={}),n.prototype=Object.create(this.prototype),n._static_methods=this._static_methods,n._properties=this._properties,n._property_values={},n._json=r||{},s.bootstrap(n),n.web3=new i,n.class_defaults=n.prototype.defaults||{},t&&n.setNetwork(t),Object.keys(e).forEach(function(t){0==t.indexOf("x-")&&(n[t]=e[t])}),n},addProp:function(e,t){var n=this;Object.defineProperty(this,e,{enumerable:!1,configurable:!1,get:function(){return null!=t.get?t.get.call(n):n._property_values[e]||t.call(n)},set:function(r){if(null==t.set)throw new Error(e+" property is immutable");t.set.call(n,r)}})},toJSON:function(){return this._json}},a._properties={contract_name:{get:function(){return this._json.contract_name},set:function(e){this._json.contract_name=e}},abi:{get:function(){return this._json.abi},set:function(e){this._json.abi=e}},network:function(){var e=this.network_id;if(null==e)throw new Error(this.contract_name+" has no network id set, cannot lookup artifact data. Either set the network manually using "+this.contract_name+".setNetwork(), run "+this.contract_name+".detectNetwork(), or use new(), at() or deployed() as a thenable which will detect the network automatically.");if(null==this._json.networks[e])throw new Error(this.contract_name+" has no network configuration for its current network id ("+e+").");return this._json.networks[e]},networks:function(){return this._json.networks},address:{get:function(){var e=this.network.address;if(null==e)throw new Error("Cannot find deployed address: "+this.contract_name+" not deployed or address not set.");return e},set:function(e){if(null==e)throw new Error("Cannot set deployed address; malformed value: "+e);var t=this.network_id;if(null==t)throw new Error(this.contract_name+" has no network id set, cannot lookup artifact data. Either set the network manually using "+this.contract_name+".setNetwork(), run "+this.contract_name+".detectNetwork(), or use new(), at() or deployed() as a thenable which will detect the network automatically.");null==this._json.networks[t]&&(this._json.networks[t]={events:{},links:{}}),this.network.address=e}},links:function(){return null==this._json.networks[this.network_id]?{}:this.network.links||{}},events:function(){var e,t=new i;return e=null==this._json.networks[this.network_id]?{}:this.network.events||{},this.abi.forEach(function(n){if("event"==n.type){var r=n.name+"(";n.inputs.forEach(function(e,t){r+=e.type,t<n.inputs.length-1&&(r+=",")});var i=t.sha3(r+=")");e[i]=n}}),e},binary:function(){var e=this,t=this.unlinked_binary;return Object.keys(this.links).forEach(function(n){var r=e.links[n],i=new RegExp("__"+n+"_+","g");t=t.replace(i,r.replace("0x",""))}),t},unlinked_binary:{get:function(){return this._json.unlinked_binary},set:function(e){this._json.unlinked_binary=e}},schema_version:function(){return this._json.schema_version},updated_at:function(){try{return this.network.updated_at||this._json.updated_at}catch(e){return this._json.updated_at}}},s.bootstrap(a),e.exports=a}(e||{})}).call(this,n("2pl3")(e))},UIxf:function(e,t){var n={messageId:0,toPayload:function(e,t){return e||console.error("jsonrpc method should be specified!"),n.messageId++,{jsonrpc:"2.0",id:n.messageId,method:e,params:t||[]}},isValidResponse:function(e){return Array.isArray(e)?e.every(t):t(e);function t(e){return!!e&&!e.error&&"2.0"===e.jsonrpc&&"number"==typeof e.id&&void 0!==e.result}},toBatchPayload:function(e){return e.map(function(e){return n.toPayload(e.method,e.params)})}};e.exports=n},UR0p:function(e,t,n){"use strict";var r=n(null),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.c(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.c(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(null).a)),o=n("siIJ"),s=function(e){function t(n,r){void 0===r&&(r=o.Scheduler.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.c(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(o.Scheduler);n.d(t,"VirtualTimeScheduler",function(){return a}),n.d(t,"VirtualAction",function(){return u});var a=function(e){function t(t,n){void 0===t&&(t=u),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return r.c(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n.shift())&&(this.frame=t.delay)<=r&&!(e=t.execute(t.state,t.delay)););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(s),u=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return r.c(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(i)},UVUN:function(e,t,n){var r=n("kB5k");e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"],ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},UWJ2:function(e,t){e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},Ucks:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/real([0-9]*)?(\[([0-9]*)\])?/)},e.exports=o},VmE1:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/real([0-9]*)?(\[([0-9]*)\])?/)},e.exports=o},W0Ae:function(e,t,n){"use strict";n.r(t),n.d(t,"race",function(){return u}),n.d(t,"RaceOperator",function(){return l}),n.d(t,"RaceSubscriber",function(){return c});var r=n(null),i=n(null),o=n(null),s=n(null),a=n(null);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1===e.length){if(!Object(i.a)(e[0]))return e[0];e=e[0]}return Object(o.a)(e,void 0).lift(new l)}var l=function(){function e(){}return e.prototype.call=function(e,t){return t.subscribe(new c(e))},e}(),c=function(e){function t(t){var n=e.call(this,t)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.c(t,e),t.prototype._next=function(e){this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(var n=0;n<t&&!this.hasFirst;n++){var r=e[n],i=Object(a.a)(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},t.prototype.notifyNext=function(e,t,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(t)},t}(s.a)},WYAk:function(e,t,n){var r,i,o;e.exports=(r=n("Ib8C"),o=(i=r).enc.Utf8,void(i.algo.HMAC=i.lib.Base.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),s=this._iKey=t.clone(),a=i.words,u=s.words,l=0;l<n;l++)a[l]^=1549556828,u[l]^=909522486;i.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},XBxC:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},XTDb:function(e,t,n){var r=n("3QZ1"),i=n("DxpT");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},XXd1:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputBytes,this._outputFormatter=r.formatOutputBytes};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bytes([0-9]{1,})(\[([0-9]*)\])*$/)},e.exports=o},Xkrw:function(e,t,n){var r=n("ZMb4"),i=n("zjql"),o=n("8d11"),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},a=function(e,t,n){return new Array(t-e.length+1).join(n||"0")+e},u=function(e,t){e=o.encode(e);for(var n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);if(0===i){if(!t)break;n+="00"}else{var s=i.toString(16);n+=s.length<2?"0"+s:s}}return"0x"+n},l=function(e){var t=p(e),n=t.toString(16);return t.lessThan(0)?"-0x"+n.substr(1):"0x"+n},c=function(e){if(g(e))return l(+e);if(y(e))return l(e);if("object"==typeof e)return u(JSON.stringify(e));if(m(e)){if(0===e.indexOf("-0x"))return l(e);if(0===e.indexOf("0x"))return e;if(!isFinite(e))return u(e,1)}return l(e)},f=function(e){e=e?e.toLowerCase():"ether";var t=s[e];if(void 0===t)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(s,null,2));return new r(t,10)},p=function(e){return y(e=e||0)?e:!m(e)||0!==e.indexOf("0x")&&0!==e.indexOf("-0x")?new r(e.toString(10),10):new r(e.replace("0x",""),16)},d=function(e){return/^0x[0-9a-f]{40}$/i.test(e)},h=function(e){e=e.replace("0x","");for(var t=i(e.toLowerCase()),n=0;n<40;n++)if(parseInt(t[n],16)>7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},y=function(e){return e instanceof r||e&&e.constructor&&"BigNumber"===e.constructor.name},m=function(e){return"string"==typeof e||e&&e.constructor&&"String"===e.constructor.name},g=function(e){return"boolean"==typeof e};e.exports={padLeft:a,padRight:function(e,t,n){return e+new Array(t-e.length+1).join(n||"0")},toHex:c,toDecimal:function(e){return p(e).toNumber()},fromDecimal:l,toUtf8:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);if(0===i)break;t+=String.fromCharCode(i)}return o.decode(t)},toAscii:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},fromUtf8:u,fromAscii:function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},transformToFullName:function(e){if(-1!==e.name.indexOf("("))return e.name;var t=e.inputs.map(function(e){return e.type}).join();return e.name+"("+t+")"},extractDisplayName:function(e){var t=e.indexOf("("),n=e.indexOf(")");return-1!==t&&-1!==n?e.substr(0,t):e},extractTypeName:function(e){var t=e.indexOf("("),n=e.indexOf(")");return-1!==t&&-1!==n?e.substr(t+1,n-t-1).replace(" ",""):""},toWei:function(e,t){var n=p(e).times(f(t));return y(e)?n:n.toString(10)},fromWei:function(e,t){var n=p(e).dividedBy(f(t));return y(e)?n:n.toString(10)},toBigNumber:p,toTwosComplement:function(e){var t=p(e).round();return t.lessThan(0)?new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1):t},toAddress:function(e){return d(e)?e:/^[0-9a-f]{40}$/.test(e)?"0x"+e:"0x"+a(c(e).substr(2),40)},isBigNumber:y,isStrictAddress:d,isAddress:function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||h(e))},isChecksumAddress:h,toChecksumAddress:function(e){if(void 0===e)return"";e=e.toLowerCase().replace("0x","");for(var t=i(e),n="0x",r=0;r<e.length;r++)parseInt(t[r],16)>7?n+=e[r].toUpperCase():n+=e[r];return n},isFunction:function(e){return"function"==typeof e},isString:m,isObject:function(e){return null!==e&&!Array.isArray(e)&&"object"==typeof e},isBoolean:g,isArray:function(e){return Array.isArray(e)},isJson:function(e){try{return!!JSON.parse(e)}catch(e){return!1}},isBloom:function(e){return!(!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))},isTopic:function(e){return!(!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}}},XlPw:function(e,t,n){"use strict";n.r(t),n.d(t,"throwError",function(){return i});var r=n(null);function i(e,t){return new r.a(t?function(n){return t.schedule(o,0,{error:e,subscriber:n})}:function(t){return t.error(e)})}function o(e){e.subscriber.error(e.error)}},YHIM:function(e,t,n){var r=n("q4b3"),i=function(e,t){this.value=e||"",this.offset=t};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(e){return new i(this.value,e)},i.prototype.combine=function(e){return new i(this.value+e.value)},i.prototype.isDynamic=function(){return void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?r.padLeft(r.toTwosComplement(this.offset).toString(16),64):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(e){var t=32*e.length,n=e.map(function(e){if(!e.isDynamic())return e;var n=t;return t+=e.dynamicPartLength(),e.withOffset(n)});return n.reduce(function(e,t){return e+t.dynamicPart()},n.reduce(function(e,t){return e+t.staticPart()},""))},e.exports=i},YalA:function(e,t,n){var r=n("DapH");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"putString",call:"db_putString",params:3}),new r({name:"getString",call:"db_getString",params:2}),new r({name:"putHex",call:"db_putHex",params:3}),new r({name:"getHex",call:"db_getHex",params:2})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},YdsQ:function(e,t,n){var r=n("Kfwp"),i=n("3QZ1"),o=n("zo/c"),s=n("NiEJ"),a=function(e){this.provider=e,this.polls={},this.timeout=null};a.prototype.send=function(e){if(!this.provider)return console.error(s.InvalidProvider()),null;var t=r.toPayload(e.method,e.params),n=this.provider.send(t);if(!r.isValidResponse(n))throw s.InvalidResponse(n);return n.result},a.prototype.sendAsync=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toPayload(e.method,e.params);this.provider.sendAsync(n,function(e,n){return e?t(e):r.isValidResponse(n)?void t(null,n.result):t(s.InvalidResponse(n))})},a.prototype.sendBatch=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toBatchPayload(e);this.provider.sendAsync(n,function(e,n){return e?t(e):i.isArray(n)?void t(e,n):t(s.InvalidResponse(n))})},a.prototype.setProvider=function(e){this.provider=e},a.prototype.startPolling=function(e,t,n,r){this.polls[t]={data:e,id:t,callback:n,uninstall:r},this.timeout||this.poll()},a.prototype.stopPolling=function(e){delete this.polls[e],0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.reset=function(e){for(var t in this.polls)e&&-1!==t.indexOf("syncPoll_")||(this.polls[t].uninstall(),delete this.polls[t]);0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),o.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length)if(this.provider){var e=[],t=[];for(var n in this.polls)e.push(this.polls[n].data),t.push(n);if(0!==e.length){var a=r.toBatchPayload(e),u={};a.forEach(function(e,n){u[e.id]=t[n]});var l=this;this.provider.sendAsync(a,function(e,t){if(!e){if(!i.isArray(t))throw s.InvalidResponse(t);t.map(function(e){var t=u[e.id];return!!l.polls[t]&&(e.callback=l.polls[t].callback,e)}).filter(function(e){return!!e}).filter(function(e){var t=r.isValidResponse(e);return t||e.callback(s.InvalidResponse(e)),t}).forEach(function(e){e.callback(null,e.result)})}})}}else console.error(s.InvalidProvider())},e.exports=a},ZMb4:function(e,t,n){var r;!function(i){"use strict";var o,s,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u=Math.ceil,l=Math.floor,c=" not a boolean or binary digit",f="rounding mode",p="number type has more than 15 significant digits",d="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",h=1e14,y=14,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7;function v(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=y-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function w(e,t,n){return(e=D(e))>=t&&e<=n}function T(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;o[i]*=t);for(o[r=0]+=d.indexOf(e.charAt(s++));r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function I(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(++t>(n=e.length)){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function D(e){return(e=parseFloat(e))<0?u(e):l(e)}o=function e(t){var n,r,i,o,C,k,E,M=0,A=z.prototype,P=new z(1),V=20,N=4,O=-7,R=21,L=-1e7,F=1e7,B=!0,q=K,j=!1,$=1,U=100,H={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"\xa0",fractionGroupSize:0};function z(e,t){var n,r,i,o,u,l,c=this;if(!(c instanceof z))return B&&X(26,"constructor call without new",e),new z(e,t);if(null!=t&&q(t,2,64,M,"base")){if(l=e+"",10==(t|=0))return Y(c=new z(e instanceof z?e:l),V+c.e+1,N);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+d.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(l))return s(c,l,o,t);o?(c.s=1/e<0?(l=l.slice(1),-1):1,B&&l.replace(/^0\.0*|\./,"").length>15&&X(M,p,e),o=!1):c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=G(l,10,t,c.s)}else{if(e instanceof z)return c.s=e.s,c.e=e.e,c.c=(e=e.c)?e.slice():e,void(M=0);if((o="number"==typeof e)&&0*e==0){if(c.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return c.e=r,c.c=[e],void(M=0)}l=e+""}else{if(!a.test(l=e+""))return s(c,l,o);c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((r=l.indexOf("."))>-1&&(l=l.replace(".","")),(i=l.search(/e/i))>0?(r<0&&(r=i),r+=+l.slice(i+1),l=l.substring(0,i)):r<0&&(r=l.length),i=0;48===l.charCodeAt(i);i++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(i,u+1))if(u=l.length,o&&B&&u>15&&X(M,p,c.s*e),(r=r-i-1)>F)c.c=c.e=null;else if(r<L)c.c=[c.e=0];else{if(c.e=r,c.c=[],i=(r+1)%y,r<0&&(i+=y),i<u){for(i&&c.c.push(+l.slice(0,i)),u-=y;i<u;)c.c.push(+l.slice(i,i+=y));l=l.slice(i),i=y-l.length}else i-=u;for(;i--;l+="0");c.c.push(+l)}else c.c=[c.e=0];M=0}function G(e,t,r,i){var o,s,a,u,l,c,f,p=e.indexOf("."),h=V,y=N;for(r<37&&(e=e.toLowerCase()),p>=0&&(a=U,U=0,e=e.replace(".",""),l=(f=new z(r)).pow(e.length-p),U=a,f.c=x(I(b(l.c),l.e),10,t),f.e=f.c.length),s=a=(c=x(e,r,t)).length;0==c[--a];c.pop());if(!c[0])return"0";if(p<0?--s:(l.c=c,l.e=s,l.s=i,c=(l=n(l,f,h,y,t)).c,u=l.r,s=l.e),p=c[o=s+h+1],a=t/2,u=u||o<0||null!=c[o+1],u=y<4?(null!=p||u)&&(0==y||y==(l.s<0?3:2)):p>a||p==a&&(4==y||u||6==y&&1&c[o-1]||y==(l.s<0?8:7)),o<1||!c[0])e=u?I("1",-h):"0";else{if(c.length=o,u)for(--t;++c[--o]>t;)c[o]=0,o||(++s,c.unshift(1));for(a=c.length;!c[--a];);for(p=0,e="";p<=a;e+=d.charAt(c[p++]));e=I(e,s)}return e}function W(e,t,n,r){var i,o,s,a,u;if(n=null!=n&&q(n,0,8,r,f)?0|n:N,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=b(e.c),u=19==r||24==r&&s<=O?S(u,s):I(u,s);else if(o=(e=Y(new z(e),t,n)).e,a=(u=b(e.c)).length,19==r||24==r&&(t<=o||o<=O)){for(;a<t;u+="0",a++);u=S(u,o)}else if(t-=s,u=I(u,o),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function Z(e,t){var n,r,i=0;for(T(e[0])&&(e=e[0]),n=new z(e[0]);++i<e.length;){if(!(r=new z(e[i])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function K(e,t,n,r,i){return(e<t||e>n||e!=D(e))&&X(r,(i||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*y-1)>F?e.c=e.e=null:n<L?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",M=0,r}function Y(e,t,n,r){var i,o,s,a,c,f,p,d=e.c,g=m;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=y,p=(c=d[f=0])/g[i-(s=t)-1]%10|0;else if((f=u((o+1)/y))>=d.length){if(!r)break e;for(;d.length<=f;d.push(0));c=p=0,i=1,s=(o%=y)-y+1}else{for(c=a=d[f],i=1;a>=10;a/=10,i++);p=(s=(o%=y)-y+i)<0?0:c/g[i-s-1]%10|0}if(r=r||t<0||null!=d[f+1]||(s<0?c:c%g[i-s-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?s>0?c/g[i-s]:0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(d[0]=g[(t-=e.e+1)%y],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=g[y-o],d[f]=s>0?l(c/g[i-s]%g[s])*a:0),r)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==h&&(d[0]=1));break}if(d[f]+=a,d[f]!=h)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>F?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}return z.another=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=function(){var e,t,n=0,r={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){if(o.hasOwnProperty(t))return null!=(e=o[t])}:function(){if(i.length>n)return null!=(e=i[n++])};return s(t="DECIMAL_PLACES")&&q(e,0,1e9,2,t)&&(V=0|e),r[t]=V,s(t="ROUNDING_MODE")&&q(e,0,8,2,t)&&(N=0|e),r[t]=N,s(t="EXPONENTIAL_AT")&&(T(e)?q(e[0],-1e9,0,2,t)&&q(e[1],0,1e9,2,t)&&(O=0|e[0],R=0|e[1]):q(e,-1e9,1e9,2,t)&&(O=-(R=0|(e<0?-e:e)))),r[t]=[O,R],s(t="RANGE")&&(T(e)?q(e[0],-1e9,-1,2,t)&&q(e[1],1,1e9,2,t)&&(L=0|e[0],F=0|e[1]):q(e,-1e9,1e9,2,t)&&(0|e?L=-(F=0|(e<0?-e:e)):B&&X(2,t+" cannot be zero",e))),r[t]=[L,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(M=0,q=(B=!!e)?K:w):B&&X(2,t+c,e)),r[t]=B,s(t="CRYPTO")&&(e===!!e||1===e||0===e?(j=!1,e&&!j&&B&&X(2,"crypto unavailable",void 0)):B&&X(2,t+c,e)),r[t]=j,s(t="MODULO_MODE")&&q(e,0,9,2,t)&&($=0|e),r[t]=$,s(t="POW_PRECISION")&&q(e,0,1e9,2,t)&&(U=0|e),r[t]=U,s(t="FORMAT")&&("object"==typeof e?H=e:B&&X(2,t+" not an object",e)),r[t]=H,r},z.max=function(){return Z(arguments,A.lt)},z.min=function(){return Z(arguments,A.gt)},z.random=(r=9007199254740992*Math.random()&2097151?function(){return l(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,i,o=0,s=[],a=new z(P);if(e=null!=e&&q(e,0,1e9,14)?0|e:V,n=u(e/y),j&&B&&X(14,"crypto unavailable",void 0),!o)for(;o<n;)(i=r())<9e15&&(s[o++]=i%1e14);for(n=s[--o],e%=y,n&&e&&(s[o]=l(n/(i=m[y-e]))*i);0===s[o];s.pop(),o--);if(o<0)s=[t=0];else{for(t=-1;0===s[0];s.shift(),t-=y);for(o=1,i=s[0];i>=10;i/=10,o++);o<y&&(t-=y-o)}return a.e=t,a.c=s,a}),n=function(){function e(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%g,c=t/g|0;for(e=e.slice();u--;)a=((i=l*(o=e[u]%g)+(r=c*o+(s=e[u]/g|0)*l)%g*g+a)/n|0)+(r/g|0)+c*s,e[u]=i%n;return a&&e.unshift(a),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,e[n]=(i=e[n]<t[n]?1:0)*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.shift());}return function(r,i,o,s,a){var u,c,f,p,d,m,g,b,_,w,T,x,S,I,D,C,k,E=r.s==i.s?1:-1,M=r.c,A=i.c;if(!(M&&M[0]&&A&&A[0]))return new z(r.s&&i.s&&(M?!A||M[0]!=A[0]:A)?M&&0==M[0]||!A?0*E:E/0:NaN);for(_=(b=new z(E)).c=[],E=o+(c=r.e-i.e)+1,a||(a=h,c=v(r.e/y)-v(i.e/y),E=E/y|0),f=0;A[f]==(M[f]||0);f++);if(A[f]>(M[f]||0)&&c--,E<0)_.push(1),p=!0;else{for(I=M.length,C=A.length,f=0,E+=2,(d=l(a/(A[0]+1)))>1&&(A=e(A,d,a),M=e(M,d,a),C=A.length,I=M.length),S=C,T=(w=M.slice(0,C)).length;T<C;w[T++]=0);(k=A.slice()).unshift(0),D=A[0],A[1]>=a/2&&D++;do{if(d=0,(u=t(A,w,C,T))<0){if(x=w[0],C!=T&&(x=x*a+(w[1]||0)),(d=l(x/D))>1)for(d>=a&&(d=a-1),g=(m=e(A,d,a)).length,T=w.length;1==t(m,w,g,T);)d--,n(m,C<g?k:A,g,a),g=m.length,u=1;else 0==d&&(u=d=1),g=(m=A.slice()).length;if(g<T&&m.unshift(0),n(w,m,T,a),T=w.length,-1==u)for(;t(A,w,C,T)<1;)d++,n(w,C<T?k:A,T,a),T=w.length}else 0===u&&(d++,w=[0]);_[f++]=d,w[0]?w[T++]=M[S]||0:(w=[M[S]],T=1)}while((S++<I||null!=w[0])&&E--);p=null!=w[0],_[0]||_.shift()}if(a==h){for(f=1,E=_[0];E>=10;E/=10,f++);Y(b,o+(b.e=f+c*y-1)+1,s,p)}else b.e=c,b.r=+p;return b}}(),i=/^(-?)0([xbo])/i,o=/^([^.]+)\.$/,C=/^\.([^.]+)$/,k=/^-?(Infinity|NaN)$/,E=/^\s*\+|^\s+|\s+$/g,s=function(e,t,n,r){var s,a=n?t:t.replace(E,"");if(k.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(i,function(e,t,n){return s="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=s?e:t}),r&&(s=r,a=a.replace(o,"$1").replace(C,"0.$1")),t!=a))return new z(a,s);B&&X(M,"not a"+(r?" base "+r:"")+" number",t),e.s=null}e.c=e.e=null,M=0},A.absoluteValue=A.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},A.ceil=function(){return Y(new z(this),this.e+1,2)},A.comparedTo=A.cmp=function(e,t){return M=1,_(this,new z(e,t))},A.decimalPlaces=A.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-v(this.e/y))*y,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},A.dividedBy=A.div=function(e,t){return M=3,n(this,new z(e,t),V,N)},A.dividedToIntegerBy=A.divToInt=function(e,t){return M=4,n(this,new z(e,t),0,1)},A.equals=A.eq=function(e,t){return M=5,0===_(this,new z(e,t))},A.floor=function(){return Y(new z(this),this.e+1,3)},A.greaterThan=A.gt=function(e,t){return M=6,_(this,new z(e,t))>0},A.greaterThanOrEqualTo=A.gte=function(e,t){return M=7,1===(t=_(this,new z(e,t)))||0===t},A.isFinite=function(){return!!this.c},A.isInteger=A.isInt=function(){return!!this.c&&v(this.e/y)>this.c.length-2},A.isNaN=function(){return!this.s},A.isNegative=A.isNeg=function(){return this.s<0},A.isZero=function(){return!!this.c&&0==this.c[0]},A.lessThan=A.lt=function(e,t){return M=8,_(this,new z(e,t))<0},A.lessThanOrEqualTo=A.lte=function(e,t){return M=9,-1===(t=_(this,new z(e,t)))||0===t},A.minus=A.sub=function(e,t){var n,r,i,o,s=this,a=s.s;if(M=10,t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/y,l=e.e/y,c=s.c,f=e.c;if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new z(f?s:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new z(c[0]?s:3==N?-0:0)}if(u=v(u),l=v(l),c=c.slice(),a=u-l){for((o=a<0)?(a=-a,i=c):(l=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=f.length))?a:t,a=t=0;t<r;t++)if(c[t]!=f[t]){o=c[t]<f[t];break}if(o&&(i=c,c=f,f=i,e.s=-e.s),(t=(r=f.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=h-1;r>a;){if(c[--r]<f[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=h}c[r]-=f[r]}for(;0==c[0];c.shift(),--l);return c[0]?J(e,c,l):(e.s=3==N?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,o=this;return M=11,e=new z(e,t),!o.c||!e.s||e.c&&!e.c[0]?new z(NaN):!e.c||o.c&&!o.c[0]?new z(o):(9==$?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,$),o.minus(r.times(e)))},A.negated=A.neg=function(){var e=new z(this);return e.s=-e.s||null,e},A.plus=A.add=function(e,t){var n,r=this,i=r.s;if(M=12,t=(e=new z(e,t)).s,!i||!t)return new z(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/y,s=e.e/y,a=r.c,u=e.c;if(!o||!s){if(!a||!u)return new z(i/0);if(!a[0]||!u[0])return u[0]?e:new z(a[0]?r:0*i)}if(o=v(o),s=v(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]%=h;return i&&(a.unshift(i),++s),J(e,a,s)},A.precision=A.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(B&&X(13,"argument"+c,e),e!=!!e&&(e=null)),!i)return null;if(t=(n=i.length-1)*y+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},A.round=function(e,t){var n=new z(this);return(null==e||q(e,0,1e9,15))&&Y(n,~~e+this.e+1,null!=t&&q(t,0,8,15,f)?0|t:N),n},A.shift=function(e){var t=this;return q(e,-9007199254740991,9007199254740991,16,"argument")?t.times("1e"+D(e)):new z(t.c&&t.c[0]&&(e<-9007199254740991||e>9007199254740991)?t.s*(e<0?0:1/0):t)},A.squareRoot=A.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,u=s.s,l=s.e,c=V+4,f=new z("0.5");if(1!==u||!a||!a[0])return new z(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=b(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),r=new z(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new z(u+""),r.c[0])for((u=(l=r.e)+c)<3&&(u=0);;)if(r=f.times((o=r).plus(n(s,o,c,1))),b(o.c).slice(0,u)===(t=b(r.c)).slice(0,u)){if(r.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+V+2,1),e=!r.times(r).eq(s));break}if(!i&&(Y(o,o.e+V+2,0),o.times(o).eq(s))){r=o;break}c+=4,u+=4,i=1}return Y(r,r.e+V+1,N,e)},A.times=A.mul=function(e,t){var n,r,i,o,s,a,u,l,c,f,p,d,m,b,_,w=this,T=w.c,x=(M=17,e=new z(e,t)).c;if(!(T&&x&&T[0]&&x[0]))return!w.s||!e.s||T&&!T[0]&&!x||x&&!x[0]&&!T?e.c=e.e=e.s=null:(e.s*=w.s,T&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(w.e/y)+v(e.e/y),e.s*=w.s,(u=T.length)<(f=x.length)&&(m=T,T=x,x=m,i=u,u=f,f=i),i=u+f,m=[];i--;m.push(0));for(b=h,_=g,i=f;--i>=0;){for(n=0,p=x[i]%_,d=x[i]/_|0,o=i+(s=u);o>i;)n=((l=p*(l=T[--s]%_)+(a=d*l+(c=T[s]/_|0)*p)%_*_+m[o]+n)/b|0)+(a/_|0)+d*c,m[o--]=l%b;m[o]=n}return n?++r:m.shift(),J(e,m,r)},A.toDigits=function(e,t){var n=new z(this);return e=null!=e&&q(e,1,1e9,18,"precision")?0|e:null,t=null!=t&&q(t,0,8,18,f)?0|t:N,e?Y(n,e,t):n},A.toExponential=function(e,t){return W(this,null!=e&&q(e,0,1e9,19)?1+~~e:null,t,19)},A.toFixed=function(e,t){return W(this,null!=e&&q(e,0,1e9,20)?~~e+this.e+1:null,t,20)},A.toFormat=function(e,t){var n=W(this,null!=e&&q(e,0,1e9,21)?~~e+this.e+1:null,t,21);if(this.c){var r,i=n.split("."),o=+H.groupSize,s=+H.secondaryGroupSize,a=H.groupSeparator,u=i[0],l=i[1],c=this.s<0,f=c?u.slice(1):u,p=f.length;if(s&&(r=o,o=s,s=r,p-=r),o>0&&p>0){for(u=f.substr(0,r=p%o||o);r<p;r+=o)u+=a+f.substr(r,o);s>0&&(u+=a+f.slice(r)),c&&(u="-"+u)}n=l?u+H.decimalSeparator+((s=+H.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+H.fractionGroupSeparator):l):u}return n},A.toFraction=function(e){var t,r,i,o,s,a,u,l,c,f=B,p=this,d=p.c,h=new z(P),g=r=new z(P),v=u=new z(P);if(null!=e&&(B=!1,a=new z(e),B=f,(f=a.isInt())&&!a.lt(P)||(B&&X(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&a.c&&Y(a,a.e+1,1).gte(P)?a:null)),!d)return p.toString();for(c=b(d),o=h.e=c.length-p.e-1,h.c[0]=m[(s=o%y)<0?y+s:s],e=!e||a.cmp(h)>0?o>0?h:g:a,s=F,F=1/0,a=new z(c),u.c[0]=0;l=n(a,h,0,1),1!=(i=r.plus(l.times(v))).cmp(e);)r=v,v=i,g=u.plus(l.times(i=g)),u=i,h=a.minus(l.times(i=h)),a=i;return i=n(e.minus(r),v,0,1),u=u.plus(i.times(g)),r=r.plus(i.times(v)),u.s=g.s=p.s,t=n(g,v,o*=2,N).minus(p).abs().cmp(n(u,r,o,N).minus(p).abs())<1?[g.toString(),v.toString()]:[u.toString(),r.toString()],F=s,t},A.toNumber=function(){var e=this;return+e||(e.s?0*e.s:NaN)},A.toPower=A.pow=function(e){var t,n,r=l(e<0?-e:+e),i=this;if(!q(e,-9007199254740991,9007199254740991,23,"exponent")&&(!isFinite(e)||r>9007199254740991&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new z(Math.pow(+i,e));for(t=U?u(U/y+2):0,n=new z(P);;){if(r%2){if(!(n=n.times(i)).c)break;t&&n.c.length>t&&(n.c.length=t)}if(!(r=l(r/2)))break;i=i.times(i),t&&i.c&&i.c.length>t&&(i.c.length=t)}return e<0&&(n=P.div(n)),t?Y(n,U,N):n},A.toPrecision=function(e,t){return W(this,null!=e&&q(e,1,1e9,24,"precision")?0|e:null,t,24)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=b(n.c),t=null!=e&&q(e,2,64,25,"base")?G(I(t,i),0|e,10,r):i<=O||i>=R?S(t,i):I(t,i),r<0&&n.c[0]&&(t="-"+t)),t},A.truncated=A.trunc=function(){return Y(new z(this),this.e+1,1)},A.valueOf=A.toJSON=function(){return this.toString()},null!=t&&z.config(t),z}(),void 0===(r=(function(){return o}).call(t,n,t,e))||(e.exports=r)}()},aIKs:function(e,t,n){var r=n("LRpe"),i=n("3QZ1"),o=n("zo/c"),s=n("rVqu"),a=function(e){r.config(o.ETH_BIGNUMBER_ROUNDING_MODE);var t=i.padLeft(i.toTwosComplement(e).toString(16),64);return new s(t)},u=function(e){var t=e.staticPart()||"0";return function(e){return"1"===new r(e.substr(0,1),16).toString(2).substr(0,1)}(t)?new r(t,16).minus(new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new r(t,16)},l=function(e){var t=e.staticPart()||"0";return new r(t,16)};e.exports={formatInputInt:a,formatInputBytes:function(e){var t=i.toHex(e).substr(2),n=Math.floor((t.length+63)/64);return t=i.padRight(t,64*n),new s(t)},formatInputDynamicBytes:function(e){var t=i.toHex(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputString:function(e){var t=i.fromUtf8(e).substr(2),n=t.length/2,r=Math.floor((t.length+63)/64);return t=i.padRight(t,64*r),new s(a(n).value+t)},formatInputBool:function(e){return new s("000000000000000000000000000000000000000000000000000000000000000"+(e?"1":"0"))},formatInputReal:function(e){return a(new r(e).times(new r(2).pow(128)))},formatOutputInt:u,formatOutputUInt:l,formatOutputReal:function(e){return u(e).dividedBy(new r(2).pow(128))},formatOutputUReal:function(e){return l(e).dividedBy(new r(2).pow(128))},formatOutputBool:function(e){return"0000000000000000000000000000000000000000000000000000000000000001"===e.staticPart()},formatOutputBytes:function(e,t){var n=t.match(/^bytes([0-9]*)/),r=parseInt(n[1]);return"0x"+e.staticPart().slice(0,2*r)},formatOutputDynamicBytes:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return"0x"+e.dynamicPart().substr(64,t)},formatOutputString:function(e){var t=2*new r(e.dynamicPart().slice(0,64),16).toNumber();return i.toUtf8(e.dynamicPart().substr(64,t))},formatOutputAddress:function(e){var t=e.staticPart();return"0x"+t.slice(t.length-40,t.length)}}},"bI+6":function(e){e.exports={_args:[["truffle-contract-schema@0.0.5","/Users/khizaralimanzoor/Work/Projects/octane-sunu"]],_development:!0,_from:"truffle-contract-schema@0.0.5",_id:"truffle-contract-schema@0.0.5",_inBundle:!1,_integrity:"sha1-Xp0gvQvyon/pQxB0gknUhO7kmWE=",_location:"/truffle-contract-schema",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"truffle-contract-schema@0.0.5",name:"truffle-contract-schema",escapedName:"truffle-contract-schema",rawSpec:"0.0.5",saveSpec:null,fetchSpec:"0.0.5"},_requiredBy:["/truffle-contract"],_resolved:"https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-0.0.5.tgz",_spec:"0.0.5",_where:"/Users/khizaralimanzoor/Work/Projects/octane-sunu",author:{name:"Tim Coulter",email:"tim.coulter@consensys.net"},bugs:{url:"https://github.com/trufflesuite/truffle-schema/issues"},dependencies:{"crypto-js":"^3.1.9-1"},description:"JSON schema for contract artifacts",devDependencies:{mocha:"^3.2.0"},homepage:"https://github.com/trufflesuite/truffle-schema#readme",keywords:["ethereum","json","schema","contract","artifacts"],license:"MIT",main:"index.js",name:"truffle-contract-schema",repository:{type:"git",url:"git+https://github.com/trufflesuite/truffle-schema.git"},scripts:{test:"mocha"},version:"0.0.5"}},bQjk:function(e,t,n){var r,i,o;e.exports=(r=n("Ib8C"),n("OLod"),i=r.lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},r.format.Hex)},bne5:function(e,t,n){"use strict";n.r(t),n.d(t,"fromEvent",function(){return a});var r=n(null),i=n(null),o=n(null),s=n(null);function a(e,t,n,u){return Object(o.a)(n)&&(u=n,n=void 0),u?a(e,t,n).pipe(Object(s.a)(function(e){return Object(i.a)(e)?u.apply(void 0,e):u(e)})):new r.a(function(r){!function e(t,n,r,i,o){var s;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){var a=t;t.addEventListener(n,r,o),s=function(){return a.removeEventListener(n,r,o)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){var u=t;t.on(n,r),s=function(){return u.off(n,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){var l=t;t.addListener(n,r),s=function(){return l.removeListener(n,r)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,f=t.length;c<f;c++)e(t[c],n,r,i,o)}i.add(s)}(e,t,function(e){r.next(arguments.length>1?Array.prototype.slice.call(arguments):e)},r,n)})}Object},cH3F:function(e){e.exports={version:"0.20.6"}},cLXH:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputUReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},cSwG:function(e){e.exports=[{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"value",type:"uint256"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"from",type:"bytes32"},{name:"to",type:"address"},{name:"indirectId",type:"bytes32"},{name:"value",type:"uint256"}],name:"icapTransfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"to",type:"bytes32"}],name:"deposit",outputs:[],payable:!0,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"AnonymousDeposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"bytes32"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"indirectId",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"}],name:"IcapTransfer",type:"event"}]},cUeh:function(e,t,n){var r=n("0ko0"),i=n("3QZ1"),o=n("NiEJ"),s=n("ewyi"),a=n("4rvP"),u=function(e,t,n){this._eth=e,this._inputTypes=t.inputs.map(function(e){return e.type}),this._outputTypes=t.outputs.map(function(e){return e.type}),this._constant=t.constant,this._payable=t.payable,this._name=i.transformToFullName(t),this._address=n};u.prototype.extractCallback=function(e){if(i.isFunction(e[e.length-1]))return e.pop()},u.prototype.extractDefaultBlock=function(e){if(e.length>this._inputTypes.length&&!i.isObject(e[e.length-1]))return s.inputDefaultBlockNumberFormatter(e.pop())},u.prototype.validateArgs=function(e){if(e.filter(function(e){return!(!0===i.isObject(e)&&!1===i.isArray(e)&&!1===i.isBigNumber(e))}).length!==this._inputTypes.length)throw o.InvalidNumberOfSolidityArgs()},u.prototype.toPayload=function(e){var t={};return e.length>this._inputTypes.length&&i.isObject(e[e.length-1])&&(t=e[e.length-1]),this.validateArgs(e),t.to=this._address,t.data="0x"+this.signature()+r.encodeParams(this._inputTypes,e),t},u.prototype.signature=function(){return a(this._name).slice(0,8)},u.prototype.unpackOutput=function(e){if(e){e=e.length>=2?e.slice(2):e;var t=r.decodeParams(this._outputTypes,e);return 1===t.length?t[0]:t}},u.prototype.call=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.extractDefaultBlock(e),r=this.toPayload(e);if(!t){var i=this._eth.call(r,n);return this.unpackOutput(i)}var o=this;this._eth.call(r,n,function(e,n){if(e)return t(e,null);var r=null;try{r=o.unpackOutput(n)}catch(t){e=t}t(e,r)})},u.prototype.sendTransaction=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.toPayload(e);if(n.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!t)return this._eth.sendTransaction(n);this._eth.sendTransaction(n,t)},u.prototype.estimateGas=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e);if(!t)return this._eth.estimateGas(n);this._eth.estimateGas(n,t)},u.prototype.getData=function(){var e=Array.prototype.slice.call(arguments);return this.toPayload(e).data},u.prototype.displayName=function(){return i.extractDisplayName(this._name)},u.prototype.typeName=function(){return i.extractTypeName(this._name)},u.prototype.request=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:t,params:[n],format:r}},u.prototype.execute=function(){return this._constant?this.call.apply(this,Array.prototype.slice.call(arguments)):this.sendTransaction.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(e){var t=this.execute.bind(this);t.request=this.request.bind(this),t.call=this.call.bind(this),t.sendTransaction=this.sendTransaction.bind(this),t.estimateGas=this.estimateGas.bind(this),t.getData=this.getData.bind(this);var n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=t},e.exports=u},crnd:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error('Cannot find module "'+e+'".');throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="crnd"},ctYp:function(e,t,n){var r=n("DapH"),i=n("t/cl"),o=n("lBWu"),s=function(e){this._requestManager=e._requestManager;var t=this;a().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})};s.prototype.newMessageFilter=function(e,t,n){return new i(e,"shh",this._requestManager,o.shh(),null,t,n)};var a=function(){return[new r({name:"version",call:"shh_version",params:0}),new r({name:"info",call:"shh_info",params:0}),new r({name:"setMaxMessageSize",call:"shh_setMaxMessageSize",params:1}),new r({name:"setMinPoW",call:"shh_setMinPoW",params:1}),new r({name:"markTrustedPeer",call:"shh_markTrustedPeer",params:1}),new r({name:"newKeyPair",call:"shh_newKeyPair",params:0}),new r({name:"addPrivateKey",call:"shh_addPrivateKey",params:1}),new r({name:"deleteKeyPair",call:"shh_deleteKeyPair",params:1}),new r({name:"hasKeyPair",call:"shh_hasKeyPair",params:1}),new r({name:"getPublicKey",call:"shh_getPublicKey",params:1}),new r({name:"getPrivateKey",call:"shh_getPrivateKey",params:1}),new r({name:"newSymKey",call:"shh_newSymKey",params:0}),new r({name:"addSymKey",call:"shh_addSymKey",params:1}),new r({name:"generateSymKeyFromPassword",call:"shh_generateSymKeyFromPassword",params:1}),new r({name:"hasSymKey",call:"shh_hasSymKey",params:1}),new r({name:"getSymKey",call:"shh_getSymKey",params:1}),new r({name:"deleteSymKey",call:"shh_deleteSymKey",params:1}),new r({name:"post",call:"shh_post",params:1,inputFormatter:[null]})]};e.exports=s},cv67:function(e,t,n){var r;e.exports=(r=n("Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],d=e[t+2],h=e[t+3],y=e[t+4],m=e[t+5],g=e[t+6],v=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],T=e[t+11],x=e[t+12],S=e[t+13],I=e[t+14],D=e[t+15],C=o[0],k=o[1],E=o[2],M=o[3];k=p(k=p(k=p(k=p(k=f(k=f(k=f(k=f(k=c(k=c(k=c(k=c(k=l(k=l(k=l(k=l(k,E=l(E,M=l(M,C=l(C,k,E,M,s,7,a[0]),k,E,u,12,a[1]),C,k,d,17,a[2]),M,C,h,22,a[3]),E=l(E,M=l(M,C=l(C,k,E,M,y,7,a[4]),k,E,m,12,a[5]),C,k,g,17,a[6]),M,C,v,22,a[7]),E=l(E,M=l(M,C=l(C,k,E,M,b,7,a[8]),k,E,_,12,a[9]),C,k,w,17,a[10]),M,C,T,22,a[11]),E=l(E,M=l(M,C=l(C,k,E,M,x,7,a[12]),k,E,S,12,a[13]),C,k,I,17,a[14]),M,C,D,22,a[15]),E=c(E,M=c(M,C=c(C,k,E,M,u,5,a[16]),k,E,g,9,a[17]),C,k,T,14,a[18]),M,C,s,20,a[19]),E=c(E,M=c(M,C=c(C,k,E,M,m,5,a[20]),k,E,w,9,a[21]),C,k,D,14,a[22]),M,C,y,20,a[23]),E=c(E,M=c(M,C=c(C,k,E,M,_,5,a[24]),k,E,I,9,a[25]),C,k,h,14,a[26]),M,C,b,20,a[27]),E=c(E,M=c(M,C=c(C,k,E,M,S,5,a[28]),k,E,d,9,a[29]),C,k,v,14,a[30]),M,C,x,20,a[31]),E=f(E,M=f(M,C=f(C,k,E,M,m,4,a[32]),k,E,b,11,a[33]),C,k,T,16,a[34]),M,C,I,23,a[35]),E=f(E,M=f(M,C=f(C,k,E,M,u,4,a[36]),k,E,y,11,a[37]),C,k,v,16,a[38]),M,C,w,23,a[39]),E=f(E,M=f(M,C=f(C,k,E,M,S,4,a[40]),k,E,s,11,a[41]),C,k,h,16,a[42]),M,C,g,23,a[43]),E=f(E,M=f(M,C=f(C,k,E,M,_,4,a[44]),k,E,x,11,a[45]),C,k,D,16,a[46]),M,C,d,23,a[47]),E=p(E,M=p(M,C=p(C,k,E,M,s,6,a[48]),k,E,v,10,a[49]),C,k,I,15,a[50]),M,C,m,21,a[51]),E=p(E,M=p(M,C=p(C,k,E,M,x,6,a[52]),k,E,h,10,a[53]),C,k,w,15,a[54]),M,C,u,21,a[55]),E=p(E,M=p(M,C=p(C,k,E,M,b,6,a[56]),k,E,D,10,a[57]),C,k,g,15,a[58]),M,C,S,21,a[59]),E=p(E,M=p(M,C=p(C,k,E,M,y,6,a[60]),k,E,T,10,a[61]),C,k,d,15,a[62]),M,C,_,21,a[63]),o[0]=o[0]+C|0,o[1]=o[1]+k|0,o[2]=o[2]+E|0,o[3]=o[3]+M|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,l=0;l<4;l++){var c=u[l];u[l]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function c(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function p(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}t.MD5=o._createHelper(u),t.HmacMD5=o._createHmacHelper(u)}(Math),r.MD5)},d35v:function(e,t,n){var r=n("4Zld"),i=n("mwus"),o=n("oI8W"),s=n("Gcqv"),a=n("kOF9"),u=n("PZgv"),l=n("2Twh"),c=n("gd3A"),f=n("SMTJ"),p=n("XXd1"),d=function(e,t){return e.isDynamicType(t)||e.isDynamicArray(t)},h=function(e){this._types=e};h.prototype._requireType=function(e){var t=this._types.filter(function(t){return t.isType(e)})[0];if(!t)throw Error("invalid solidity type!: "+e);return t},h.prototype.encodeParam=function(e,t){return this.encodeParams([e],[t])},h.prototype.encodeParams=function(e,t){var n=this.getSolidityTypes(e),r=n.map(function(n,r){return n.encode(t[r],e[r])}),i=n.reduce(function(t,r,i){var o=r.staticPartLength(e[i]),s=32*Math.floor((o+31)/32);return t+(d(n[i],e[i])?32:s)},0);return this.encodeMultiWithOffset(e,n,r,i)},h.prototype.encodeMultiWithOffset=function(e,t,n,i){var o="",s=this;return e.forEach(function(a,u){if(d(t[u],e[u])){o+=r.formatInputInt(i).encode();var l=s.encodeWithOffset(e[u],t[u],n[u],i);i+=l.length/2}else o+=s.encodeWithOffset(e[u],t[u],n[u],i)}),e.forEach(function(r,a){if(d(t[a],e[a])){var u=s.encodeWithOffset(e[a],t[a],n[a],i);i+=u.length/2,o+=u}}),o},h.prototype.encodeWithOffset=function(e,t,n,i){var o=t.isDynamicArray(e)?1:t.isStaticArray(e)?2:3;if(3!==o){var s=t.nestedName(e),a=t.staticPartLength(s),u=1===o?n[0]:"";if(t.isDynamicArray(s))for(var l=1===o?2:0,c=0;c<n.length;c++)1===o?l+=+n[c-1][0]||0:2===o&&(l+=+(n[c-1]||[])[0]||0),u+=r.formatInputInt(i+c*a+32*l).encode();for(var f=1===o?n.length-1:n.length,p=0;p<f;p++){var d=u/2;1===o?u+=this.encodeWithOffset(s,t,n[p+1],i+d):2===o&&(u+=this.encodeWithOffset(s,t,n[p],i+d))}return u}return n},h.prototype.decodeParam=function(e,t){return this.decodeParams([e],t)[0]},h.prototype.decodeParams=function(e,t){var n=this.getSolidityTypes(e),r=this.getOffsets(e,n);return n.map(function(n,i){return n.decode(t,r[i],e[i],i)})},h.prototype.getOffsets=function(e,t){for(var n=t.map(function(t,n){return t.staticPartLength(e[n])}),r=1;r<n.length;r++)n[r]+=n[r-1];return n.map(function(n,r){return n-t[r].staticPartLength(e[r])})},h.prototype.getSolidityTypes=function(e){var t=this;return e.map(function(e){return t._requireType(e)})};var y=new h([new i,new o,new s,new a,new u,new p,new l,new c,new f]);e.exports=y},d9AN:function(e,t,n){var r=n("q4b3"),i=n("E4eN"),o=n("ioaB"),s=n("DILS"),a=n("FPO/"),u=n("L7+l"),l=function(e,t,n){this._requestManager=e,this._params=t.inputs,this._name=r.transformToFullName(t),this._address=n,this._anonymous=t.anonymous};l.prototype.types=function(e){return this._params.filter(function(t){return t.indexed===e}).map(function(e){return e.type})},l.prototype.displayName=function(){return r.extractDisplayName(this._name)},l.prototype.typeName=function(){return r.extractTypeName(this._name)},l.prototype.signature=function(){return s(this._name)},l.prototype.encode=function(e,t){e=e||{},t=t||{};var n={};["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(e){n[e]=o.inputBlockNumberFormatter(t[e])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var s=this._params.filter(function(e){return!0===e.indexed}).map(function(t){var n=e[t.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(e){return"0x"+i.encodeParam(t.type,e)}):"0x"+i.encodeParam(t.type,n)});return n.topics=n.topics.concat(s),n},l.prototype.decode=function(e){e.data=e.data||"",e.topics=e.topics||[];var t=(this._anonymous?e.topics:e.topics.slice(1)).map(function(e){return e.slice(2)}).join(""),n=i.decodeParams(this.types(!0),t),r=e.data.slice(2),s=i.decodeParams(this.types(!1),r),a=o.outputLogFormatter(e);return a.event=this.displayName(),a.address=e.address,a.args=this._params.reduce(function(e,t){return e[t.name]=t.indexed?n.shift():s.shift(),e},{}),delete a.data,delete a.topics,a},l.prototype.execute=function(e,t,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(t=null),1===arguments.length&&(t=null,e={}));var i=this.encode(e,t),o=this.decode.bind(this);return new a(this._requestManager,i,u.eth(),o,n)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this),n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=this.execute.bind(this,e)},e.exports=l},dEwP:function(e,t,n){"use strict";n.r(t),n.d(t,"concat",function(){return a});var r=n(null),i=n(null),o=n(null),s=n(null);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length||2===e.length&&Object(r.a)(e[1])?Object(o.a)(e[0]):Object(s.a)()(i.a.apply(void 0,e))}},dOJ8:function(e,t,n){var r=n("AhHK");"undefined"!=typeof window&&void 0===window.Web3&&(window.Web3=r),e.exports=r},dzgT:function(e,t,n){"use strict";n.r(t),n.d(t,"combineLatest",function(){return c}),n.d(t,"CombineLatestOperator",function(){return f}),n.d(t,"CombineLatestSubscriber",function(){return p});var r=n(null),i=n(null),o=n(null),s=n(null),a=n(null),u=n(null),l={};function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=null,r=null;return Object(i.a)(e[e.length-1])&&(r=e.pop()),"function"==typeof e[e.length-1]&&(n=e.pop()),1===e.length&&Object(o.a)(e[0])&&(e=e[0]),Object(u.a)(e,r).lift(new f(n))}var f=function(){function e(e){this.resultSelector=e}return e.prototype.call=function(e,t){return t.subscribe(new p(e,this.resultSelector))},e}(),p=function(e){function t(t,n){var r=e.call(this,t)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.c(t,e),t.prototype._next=function(e){this.values.push(l),this.observables.push(e)},t.prototype._complete=function(){var e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(var n=0;n<t;n++){var r=e[n];this.add(Object(a.a)(this,r,r,n))}}},t.prototype.notifyComplete=function(e){0==(this.active-=1)&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){var o=this.values,s=this.toRespond?o[n]===l?--this.toRespond:this.toRespond:0;o[n]=t,0===s&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},t.prototype._tryResultSelector=function(e){var t;try{t=this.resultSelector.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(s.a)},e7zE:function(e,t,n){var r,i,o,s,a,u,l,c;e.exports=(r=n("Ib8C"),n("3y9D"),n("WYAk"),a=(o=(i=r).lib).WordArray,l=(u=i.algo).HMAC,c=u.PBKDF2=(s=o.Base).extend({cfg:s.extend({keySize:4,hasher:u.SHA1,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=l.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,u=o.words,c=n.keySize,f=n.iterations;s.length<c;){var p=r.update(t).finalize(o);r.reset();for(var d=p.words,h=d.length,y=p,m=1;m<f;m++){y=r.finalize(y),r.reset();for(var g=y.words,v=0;v<h;v++)d[v]^=g[v]}i.concat(p),u[0]++}return i.sigBytes=4*c,i}}),i.PBKDF2=function(e,t,n){return c.create(n).compute(e,t)},r.PBKDF2)},"eB/I":function(e,t,n){var r=n("d35v"),i=n("Xkrw"),o=n("2l4O"),s=n("4m0o"),a=n("zjql"),u=function(e,t,n){this._eth=e,this._inputTypes=t.inputs.map(function(e){return e.type}),this._outputTypes=t.outputs.map(function(e){return e.type}),this._constant=t.constant,this._payable=t.payable,this._name=i.transformToFullName(t),this._address=n};u.prototype.extractCallback=function(e){if(i.isFunction(e[e.length-1]))return e.pop()},u.prototype.extractDefaultBlock=function(e){if(e.length>this._inputTypes.length&&!i.isObject(e[e.length-1]))return s.inputDefaultBlockNumberFormatter(e.pop())},u.prototype.validateArgs=function(e){if(e.filter(function(e){return!(!0===i.isObject(e)&&!1===i.isArray(e)&&!1===i.isBigNumber(e))}).length!==this._inputTypes.length)throw o.InvalidNumberOfSolidityArgs()},u.prototype.toPayload=function(e){var t={};return e.length>this._inputTypes.length&&i.isObject(e[e.length-1])&&(t=e[e.length-1]),this.validateArgs(e),t.to=this._address,t.data="0x"+this.signature()+r.encodeParams(this._inputTypes,e),t},u.prototype.signature=function(){return a(this._name).slice(0,8)},u.prototype.unpackOutput=function(e){if(e){e=e.length>=2?e.slice(2):e;var t=r.decodeParams(this._outputTypes,e);return 1===t.length?t[0]:t}},u.prototype.call=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.extractDefaultBlock(e),r=this.toPayload(e);if(!t){var i=this._eth.call(r,n);return this.unpackOutput(i)}var o=this;this._eth.call(r,n,function(e,n){if(e)return t(e,null);var r=null;try{r=o.unpackOutput(n)}catch(t){e=t}t(e,r)})},u.prototype.sendTransaction=function(){var e=Array.prototype.slice.call(arguments).filter(function(e){return void 0!==e}),t=this.extractCallback(e),n=this.toPayload(e);if(n.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!t)return this._eth.sendTransaction(n);this._eth.sendTransaction(n,t)},u.prototype.estimateGas=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e);if(!t)return this._eth.estimateGas(n);this._eth.estimateGas(n,t)},u.prototype.getData=function(){var e=Array.prototype.slice.call(arguments);return this.toPayload(e).data},u.prototype.displayName=function(){return i.extractDisplayName(this._name)},u.prototype.typeName=function(){return i.extractTypeName(this._name)},u.prototype.request=function(){var e=Array.prototype.slice.call(arguments),t=this.extractCallback(e),n=this.toPayload(e),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:t,params:[n],format:r}},u.prototype.execute=function(){return this._constant?this.call.apply(this,Array.prototype.slice.call(arguments)):this.sendTransaction.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(e){var t=this.execute.bind(this);t.request=this.request.bind(this),t.call=this.call.bind(this),t.sendTransaction=this.sendTransaction.bind(this),t.estimateGas=this.estimateGas.bind(this),t.getData=this.getData.bind(this);var n=this.displayName();e[n]||(e[n]=t),e[n][this.typeName()]=t},e.exports=u},ec5m:function(e,t,n){var r;e.exports=r=r||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++)t[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++)r.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},c=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,l=e.min(4*u,i);if(u){for(var c=0;c<u;c+=o)this._doProcessBlock(r,c);var f=r.splice(0,u);n.sigBytes-=l}return new s.init(f,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(i.Hasher=f.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math)},ed1O:function(e,t,n){var r=n("D0Zz"),i=n("2wT1");e.exports={global:{abi:r,address:"0xc6d9d2cd449a754c494264e1809c50e34d64562b"},icap:{abi:i,address:"0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00"}}},eeZN:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/address(\[([0-9]*)\])?/)},e.exports=o},emHa:function(e,t,n){"use strict";n.r(t),n.d(t,"bindNodeCallback",function(){return u});var r=n(null),i=n("svcd"),o=n(null),s=n(null),a=n(null);function u(e,t,n){if(t){if(!Object(s.a)(t))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return u(e,n).apply(void 0,r).pipe(Object(o.a)(function(e){return Object(a.a)(e)?t.apply(void 0,e):t(e)}))};n=t}return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var s={subject:void 0,args:t,callbackFunc:e,scheduler:n,context:this};return new r.a(function(r){var o=s.context,a=s.subject;if(n)return n.schedule(l,0,{params:s,subscriber:r,context:o});if(!a){a=s.subject=new i.AsyncSubject;try{e.apply(o,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.shift();n?a.error(n):(a.next(e.length<=1?e[0]:e),a.complete())}]))}catch(e){a.error(e)}}return a.subscribe(r)})}}function l(e){var t=this,n=e.params,r=e.subscriber,o=e.context,s=n.callbackFunc,a=n.args,u=n.scheduler,l=n.subject;if(!l){l=n.subject=new i.AsyncSubject;try{s.apply(o,a.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.shift();t.add(r?u.schedule(f,0,{err:r,subject:l}):u.schedule(c,0,{value:e.length<=1?e[0]:e,subject:l}))}]))}catch(e){this.add(u.schedule(f,0,{err:e,subject:l}))}}this.add(l.subscribe(r))}function c(e){var t=e.subject;t.next(e.value),t.complete()}function f(e){e.subject.error(e.err)}},ewyi:function(e,t,n){"use strict";var r=n("3QZ1"),i=n("zo/c"),o=n("2M1J"),s=function(e){if(void 0!==e)return function(e){return"latest"===e||"pending"===e||"earliest"===e}(e)?e:r.toHex(e)},a=function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.nonce=r.toDecimal(e.nonce),e.gas=r.toDecimal(e.gas),e.gasPrice=r.toBigNumber(e.gasPrice),e.value=r.toBigNumber(e.value),e},u=function(e){return e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.logIndex&&(e.logIndex=r.toDecimal(e.logIndex)),e},l=function(e){var t=new o(e);if(t.isValid()&&t.isDirect())return"0x"+t.address();if(r.isStrictAddress(e))return e;if(r.isAddress(e))return"0x"+e;throw new Error("invalid address")};e.exports={inputDefaultBlockNumberFormatter:function(e){return void 0===e?i.defaultBlock:s(e)},inputBlockNumberFormatter:s,inputCallFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from&&(e.from=l(e.from)),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputTransactionFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from=l(e.from),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputAddressFormatter:l,inputPostFormatter:function(e){return e.ttl=r.fromDecimal(e.ttl),e.workToProve=r.fromDecimal(e.workToProve),e.priority=r.fromDecimal(e.priority),r.isArray(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map(function(e){return 0===e.indexOf("0x")?e:r.fromUtf8(e)}),e},outputBigNumberFormatter:function(e){return r.toBigNumber(e)},outputTransactionFormatter:a,outputTransactionReceiptFormatter:function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.cumulativeGasUsed=r.toDecimal(e.cumulativeGasUsed),e.gasUsed=r.toDecimal(e.gasUsed),r.isArray(e.logs)&&(e.logs=e.logs.map(function(e){return u(e)})),e},outputBlockFormatter:function(e){return e.gasLimit=r.toDecimal(e.gasLimit),e.gasUsed=r.toDecimal(e.gasUsed),e.size=r.toDecimal(e.size),e.timestamp=r.toDecimal(e.timestamp),null!==e.number&&(e.number=r.toDecimal(e.number)),e.difficulty=r.toBigNumber(e.difficulty),e.totalDifficulty=r.toBigNumber(e.totalDifficulty),r.isArray(e.transactions)&&e.transactions.forEach(function(e){if(!r.isString(e))return a(e)}),e},outputLogFormatter:u,outputPostFormatter:function(e){return e.expiry=r.toDecimal(e.expiry),e.sent=r.toDecimal(e.sent),e.ttl=r.toDecimal(e.ttl),e.workProved=r.toDecimal(e.workProved),e.topics||(e.topics=[]),e.topics=e.topics.map(function(e){return r.toAscii(e)}),e},outputSyncingFormatter:function(e){return e?(e.startingBlock=r.toDecimal(e.startingBlock),e.currentBlock=r.toDecimal(e.currentBlock),e.highestBlock=r.toDecimal(e.highestBlock),e.knownStates&&(e.knownStates=r.toDecimal(e.knownStates),e.pulledStates=r.toDecimal(e.pulledStates)),e):e}}},f6MB:function(e,t,n){var r=n("kfCW"),i=n("zb58"),o=n("uQT6"),s=n("YalA"),a=n("ctYp"),u=n("x/km"),l=n("SVfY"),c=n("/bug"),f=n("s/KW"),p=n("hl6i"),d=n("Xkrw"),h=n("zjql"),y=n("iwZc"),m=n("k9H/"),g=n("9Z5i"),v=n("7B3l"),b=n("h60G"),_=n("ZMb4");function w(e){this._requestManager=new r(e),this.currentProvider=e,this.eth=new o(this),this.db=new s(this),this.shh=new a(this),this.net=new u(this),this.personal=new l(this),this.bzz=new c(this),this.settings=new f,this.version={api:p.version},this.providers={HttpProvider:v,IpcProvider:b},this._extend=y(this),this._extend({properties:T()})}w.providers={HttpProvider:v,IpcProvider:b},w.prototype.setProvider=function(e){this._requestManager.setProvider(e),this.currentProvider=e},w.prototype.reset=function(e){this._requestManager.reset(e),this.settings=new f},w.prototype.BigNumber=_,w.prototype.toHex=d.toHex,w.prototype.toAscii=d.toAscii,w.prototype.toUtf8=d.toUtf8,w.prototype.fromAscii=d.fromAscii,w.prototype.fromUtf8=d.fromUtf8,w.prototype.toDecimal=d.toDecimal,w.prototype.fromDecimal=d.fromDecimal,w.prototype.toBigNumber=d.toBigNumber,w.prototype.toWei=d.toWei,w.prototype.fromWei=d.fromWei,w.prototype.isAddress=d.isAddress,w.prototype.isChecksumAddress=d.isChecksumAddress,w.prototype.toChecksumAddress=d.toChecksumAddress,w.prototype.isIBAN=d.isIBAN,w.prototype.padLeft=d.padLeft,w.prototype.padRight=d.padRight,w.prototype.sha3=function(e,t){return"0x"+h(e,t)},w.prototype.fromICAP=function(e){return new i(e).address()};var T=function(){return[new g({name:"version.node",getter:"web3_clientVersion"}),new g({name:"version.network",getter:"net_version",inputFormatter:d.toDecimal}),new g({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:d.toDecimal}),new g({name:"version.whisper",getter:"shh_version",inputFormatter:d.toDecimal})]};w.prototype.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},w.prototype.createBatch=function(){return new m(this)},e.exports=w},fDiS:function(e,t,n){var r=n("q4b3"),i=n("FNdZ"),o=function(e){this.name=e.name,this.call=e.call,this.params=e.params||0,this.inputFormatter=e.inputFormatter,this.outputFormatter=e.outputFormatter,this.requestManager=null};o.prototype.setRequestManager=function(e){this.requestManager=e},o.prototype.getCall=function(e){return r.isFunction(this.call)?this.call(e):this.call},o.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},o.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfParams()},o.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter.map(function(t,n){return t?t(e[n]):e[n]}):e},o.prototype.formatOutput=function(e){return this.outputFormatter&&e?this.outputFormatter(e):e},o.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),r=this.formatInput(e);return this.validateArgs(r),{method:t,params:r,callback:n}},o.prototype.attachToObject=function(e){var t=this.buildCall();t.call=this.call;var n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},o.prototype.buildCall=function(){var e=this,t=function(){var t=e.toPayload(Array.prototype.slice.call(arguments));return t.callback?e.requestManager.sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))}):e.formatOutput(e.requestManager.send(t))};return t.request=this.request.bind(this),t},o.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},e.exports=o},fNWR:function(e,t,n){"use strict";var r=n("fDiS"),i=n("J1WT");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"blockNetworkRead",call:"bzz_blockNetworkRead",params:1,inputFormatter:[null]}),new r({name:"syncEnabled",call:"bzz_syncEnabled",params:1,inputFormatter:[null]}),new r({name:"swapEnabled",call:"bzz_swapEnabled",params:1,inputFormatter:[null]}),new r({name:"download",call:"bzz_download",params:2,inputFormatter:[null,null]}),new r({name:"upload",call:"bzz_upload",params:2,inputFormatter:[null,null]}),new r({name:"retrieve",call:"bzz_retrieve",params:1,inputFormatter:[null]}),new r({name:"store",call:"bzz_store",params:2,inputFormatter:[null,null]}),new r({name:"get",call:"bzz_get",params:1,inputFormatter:[null]}),new r({name:"put",call:"bzz_put",params:2,inputFormatter:[null,null]}),new r({name:"modify",call:"bzz_modify",params:4,inputFormatter:[null,null,null,null]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),[new i({name:"hive",getter:"bzz_hive"}),new i({name:"info",getter:"bzz_info"})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})}},gI3B:function(e,t,n){"use strict";var r=n(null),i=n("T1DM"),o=n(null);function s(e){return!Object(o.a)(e)&&e-parseFloat(e)+1>=0}var a=n(null);function u(e,t,n){void 0===e&&(e=0);var o=-1;return s(t)?o=Number(t)<1?1:Number(t):Object(a.a)(t)&&(n=t),Object(a.a)(n)||(n=i.async),new r.a(function(t){var r=s(e)?e:+e-n.now();return n.schedule(l,r,{index:0,period:o,subscriber:t})})}function l(e){var t=e.index,n=e.period,r=e.subscriber;if(r.next(t),!r.closed){if(-1===n)return r.complete();e.index=t+1,this.schedule(e,n)}}n.d(t,"timer",function(){return u})},"gb/T":function(e,t,n){var r,i;e.exports=(r=n("Ib8C"),n("OLod"),r.mode.ECB=((i=r.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),r.mode.ECB)},gd3A:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputReal,this._outputFormatter=r.formatOutputReal};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/real([0-9]*)?(\[([0-9]*)\])?/)},e.exports=o},h60G:function(e,t,n){"use strict";var r=n("Xkrw"),i=n("2l4O"),o=function(e,t){var n=this;this.responseCallbacks={},this.path=e,this.connection=t.connect({path:this.path}),this.connection.on("error",function(e){console.error("IPC Connection Error",e),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(e){n._parseResponse(e.toString()).forEach(function(e){var t=null;r.isArray(e)?e.forEach(function(e){n.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,n.responseCallbacks[t]&&(n.responseCallbacks[t](null,e),delete n.responseCallbacks[t])})})};o.prototype._parseResponse=function(e){var t=this,n=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var r=null;try{r=JSON.parse(e)}catch(n){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,r&&n.push(r)}),n},o.prototype._addResponseCallback=function(e,t){var n=e.id||e[0].id,r=e.method||e[0].method;this.responseCallbacks[n]=t,this.responseCallbacks[n].method=r},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.isConnected=function(){return this.connection.writable||this.connection.connect({path:this.path}),!!this.connection.writable},o.prototype.send=function(e){if(this.connection.writeSync){var t;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(e));try{t=JSON.parse(n)}catch(e){throw i.InvalidResponse(n)}return t}throw new Error('You tried to send "'+e.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},o.prototype.sendAsync=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},e.exports=o},h7Rs:function(e){e.exports={version:"0.18.4"}},hbHZ:function(e,t,n){var r=n("UWJ2");e.exports=function(e){return"string"!=typeof e?e:r(e)?e.slice(2):e}},hl6i:function(e){e.exports={version:"0.20.6"}},hnyh:function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bool(\[([0-9]*)\])*$/)},e.exports=o},ioaB:function(e,t,n){var r=n("q4b3"),i=n("UVUN"),o=n("JaDV"),s=function(e){if(void 0!==e)return function(e){return"latest"===e||"pending"===e||"earliest"===e}(e)?e:r.toHex(e)},a=function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.nonce=r.toDecimal(e.nonce),e.gas=r.toDecimal(e.gas),e.gasPrice=r.toBigNumber(e.gasPrice),e.value=r.toBigNumber(e.value),e},u=function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),null!==e.logIndex&&(e.logIndex=r.toDecimal(e.logIndex)),e},l=function(e){var t=new o(e);if(t.isValid()&&t.isDirect())return"0x"+t.address();if(r.isStrictAddress(e))return e;if(r.isAddress(e))return"0x"+e;throw new Error("invalid address")};e.exports={inputDefaultBlockNumberFormatter:function(e){return void 0===e?i.defaultBlock:s(e)},inputBlockNumberFormatter:s,inputCallFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from&&(e.from=l(e.from)),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputTransactionFormatter:function(e){return e.from=e.from||i.defaultAccount,e.from=l(e.from),e.to&&(e.to=l(e.to)),["gasPrice","gas","value","nonce"].filter(function(t){return void 0!==e[t]}).forEach(function(t){e[t]=r.fromDecimal(e[t])}),e},inputAddressFormatter:l,inputPostFormatter:function(e){return e.ttl=r.fromDecimal(e.ttl),e.workToProve=r.fromDecimal(e.workToProve),e.priority=r.fromDecimal(e.priority),r.isArray(e.topics)||(e.topics=e.topics?[e.topics]:[]),e.topics=e.topics.map(function(e){return 0===e.indexOf("0x")?e:r.fromUtf8(e)}),e},outputBigNumberFormatter:function(e){return r.toBigNumber(e)},outputTransactionFormatter:a,outputTransactionReceiptFormatter:function(e){return null!==e.blockNumber&&(e.blockNumber=r.toDecimal(e.blockNumber)),null!==e.transactionIndex&&(e.transactionIndex=r.toDecimal(e.transactionIndex)),e.cumulativeGasUsed=r.toDecimal(e.cumulativeGasUsed),e.gasUsed=r.toDecimal(e.gasUsed),r.isArray(e.logs)&&(e.logs=e.logs.map(function(e){return u(e)})),e},outputBlockFormatter:function(e){return e.gasLimit=r.toDecimal(e.gasLimit),e.gasUsed=r.toDecimal(e.gasUsed),e.size=r.toDecimal(e.size),e.timestamp=r.toDecimal(e.timestamp),null!==e.number&&(e.number=r.toDecimal(e.number)),e.difficulty=r.toBigNumber(e.difficulty),e.totalDifficulty=r.toBigNumber(e.totalDifficulty),r.isArray(e.transactions)&&e.transactions.forEach(function(e){if(!r.isString(e))return a(e)}),e},outputLogFormatter:u,outputPostFormatter:function(e){return e.expiry=r.toDecimal(e.expiry),e.sent=r.toDecimal(e.sent),e.ttl=r.toDecimal(e.ttl),e.workProved=r.toDecimal(e.workProved),e.topics||(e.topics=[]),e.topics=e.topics.map(function(e){return r.toAscii(e)}),e},outputSyncingFormatter:function(e){return e.startingBlock=r.toDecimal(e.startingBlock),e.currentBlock=r.toDecimal(e.currentBlock),e.highestBlock=r.toDecimal(e.highestBlock),e.knownStates&&(e.knownStates=r.toDecimal(e.knownStates),e.pulledStates=r.toDecimal(e.pulledStates)),e}}},iwZc:function(e,t,n){var r=n("4m0o"),i=n("Xkrw"),o=n("DapH"),s=n("9Z5i");e.exports=function(e){var t=function(t){var n;t.property?(e[t.property]||(e[t.property]={}),n=e[t.property]):n=e,t.methods&&t.methods.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)}),t.properties&&t.properties.forEach(function(t){t.attachToObject(n),t.setRequestManager(e._requestManager)})};return t.formatters=r,t.utils=i,t.Method=o,t.Property=s,t}},jO9C:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},jqwy:function(e,t,n){var r=n("f6MB");"undefined"!=typeof window&&void 0===window.Web3&&(window.Web3=r),e.exports=r},"k9H/":function(e,t,n){var r=n("UIxf"),i=n("2l4O"),o=function(e){this.requestManager=e._requestManager,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests;this.requestManager.sendBatch(e,function(t,n){n=n||[],e.map(function(e,t){return n[t]||{}}).forEach(function(t,n){if(e[n].callback){if(!r.isValidResponse(t))return e[n].callback(i.InvalidResponse(t));e[n].callback(null,e[n].format?e[n].format(t.result):t.result)}})})},e.exports=o},kB5k:function(e,t,n){var r;!function(i){"use strict";var o,s,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u=Math.ceil,l=Math.floor,c=" not a boolean or binary digit",f="rounding mode",p="number type has more than 15 significant digits",d="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",h=1e14,y=14,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7;function v(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(t=e[r++]+"",n=y-t.length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,l=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=u==l,!i||!o)return r?0:!i^n?1:-1;if(!r)return u>l^n?1:-1;for(a=(u=i.length)<(l=o.length)?u:l,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return u==l?0:u>l^n?1:-1}function w(e,t,n){return(e=D(e))>=t&&e<=n}function T(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;o[i]*=t);for(o[r=0]+=d.indexOf(e.charAt(s++));r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function I(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(++t>(n=e.length)){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function D(e){return(e=parseFloat(e))<0?u(e):l(e)}o=function e(t){var n,r,i,o,C,k,E,M=0,A=z.prototype,P=new z(1),V=20,N=4,O=-7,R=21,L=-1e7,F=1e7,B=!0,q=K,j=!1,$=1,U=100,H={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"\xa0",fractionGroupSize:0};function z(e,t){var n,r,i,o,u,l,c=this;if(!(c instanceof z))return B&&X(26,"constructor call without new",e),new z(e,t);if(null!=t&&q(t,2,64,M,"base")){if(l=e+"",10==(t|=0))return Y(c=new z(e instanceof z?e:l),V+c.e+1,N);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+d.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(l))return s(c,l,o,t);o?(c.s=1/e<0?(l=l.slice(1),-1):1,B&&l.replace(/^0\.0*|\./,"").length>15&&X(M,p,e),o=!1):c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=G(l,10,t,c.s)}else{if(e instanceof z)return c.s=e.s,c.e=e.e,c.c=(e=e.c)?e.slice():e,void(M=0);if((o="number"==typeof e)&&0*e==0){if(c.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return c.e=r,c.c=[e],void(M=0)}l=e+""}else{if(!a.test(l=e+""))return s(c,l,o);c.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((r=l.indexOf("."))>-1&&(l=l.replace(".","")),(i=l.search(/e/i))>0?(r<0&&(r=i),r+=+l.slice(i+1),l=l.substring(0,i)):r<0&&(r=l.length),i=0;48===l.charCodeAt(i);i++);for(u=l.length;48===l.charCodeAt(--u););if(l=l.slice(i,u+1))if(u=l.length,o&&B&&u>15&&X(M,p,c.s*e),(r=r-i-1)>F)c.c=c.e=null;else if(r<L)c.c=[c.e=0];else{if(c.e=r,c.c=[],i=(r+1)%y,r<0&&(i+=y),i<u){for(i&&c.c.push(+l.slice(0,i)),u-=y;i<u;)c.c.push(+l.slice(i,i+=y));l=l.slice(i),i=y-l.length}else i-=u;for(;i--;l+="0");c.c.push(+l)}else c.c=[c.e=0];M=0}function G(e,t,r,i){var o,s,a,u,l,c,f,p=e.indexOf("."),h=V,y=N;for(r<37&&(e=e.toLowerCase()),p>=0&&(a=U,U=0,e=e.replace(".",""),l=(f=new z(r)).pow(e.length-p),U=a,f.c=x(I(b(l.c),l.e),10,t),f.e=f.c.length),s=a=(c=x(e,r,t)).length;0==c[--a];c.pop());if(!c[0])return"0";if(p<0?--s:(l.c=c,l.e=s,l.s=i,c=(l=n(l,f,h,y,t)).c,u=l.r,s=l.e),p=c[o=s+h+1],a=t/2,u=u||o<0||null!=c[o+1],u=y<4?(null!=p||u)&&(0==y||y==(l.s<0?3:2)):p>a||p==a&&(4==y||u||6==y&&1&c[o-1]||y==(l.s<0?8:7)),o<1||!c[0])e=u?I("1",-h):"0";else{if(c.length=o,u)for(--t;++c[--o]>t;)c[o]=0,o||(++s,c.unshift(1));for(a=c.length;!c[--a];);for(p=0,e="";p<=a;e+=d.charAt(c[p++]));e=I(e,s)}return e}function W(e,t,n,r){var i,o,s,a,u;if(n=null!=n&&q(n,0,8,r,f)?0|n:N,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=b(e.c),u=19==r||24==r&&s<=O?S(u,s):I(u,s);else if(o=(e=Y(new z(e),t,n)).e,a=(u=b(e.c)).length,19==r||24==r&&(t<=o||o<=O)){for(;a<t;u+="0",a++);u=S(u,o)}else if(t-=s,u=I(u,o),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function Z(e,t){var n,r,i=0;for(T(e[0])&&(e=e[0]),n=new z(e[0]);++i<e.length;){if(!(r=new z(e[i])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function K(e,t,n,r,i){return(e<t||e>n||e!=D(e))&&X(r,(i||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*y-1)>F?e.c=e.e=null:n<L?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",M=0,r}function Y(e,t,n,r){var i,o,s,a,c,f,p,d=e.c,g=m;if(d){e:{for(i=1,a=d[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=y,p=(c=d[f=0])/g[i-(s=t)-1]%10|0;else if((f=u((o+1)/y))>=d.length){if(!r)break e;for(;d.length<=f;d.push(0));c=p=0,i=1,s=(o%=y)-y+1}else{for(c=a=d[f],i=1;a>=10;a/=10,i++);p=(s=(o%=y)-y+i)<0?0:c/g[i-s-1]%10|0}if(r=r||t<0||null!=d[f+1]||(s<0?c:c%g[i-s-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||r||6==n&&(o>0?s>0?c/g[i-s]:0:d[f-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(d[0]=g[(t-=e.e+1)%y],e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=f,a=1,f--):(d.length=f+1,a=g[y-o],d[f]=s>0?l(c/g[i-s]%g[s])*a:0),r)for(;;){if(0==f){for(o=1,s=d[0];s>=10;s/=10,o++);for(s=d[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,d[0]==h&&(d[0]=1));break}if(d[f]+=a,d[f]!=h)break;d[f--]=0,a=1}for(o=d.length;0===d[--o];d.pop());}e.e>F?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}return z.another=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=function(){var e,t,n=0,r={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){if(o.hasOwnProperty(t))return null!=(e=o[t])}:function(){if(i.length>n)return null!=(e=i[n++])};return s(t="DECIMAL_PLACES")&&q(e,0,1e9,2,t)&&(V=0|e),r[t]=V,s(t="ROUNDING_MODE")&&q(e,0,8,2,t)&&(N=0|e),r[t]=N,s(t="EXPONENTIAL_AT")&&(T(e)?q(e[0],-1e9,0,2,t)&&q(e[1],0,1e9,2,t)&&(O=0|e[0],R=0|e[1]):q(e,-1e9,1e9,2,t)&&(O=-(R=0|(e<0?-e:e)))),r[t]=[O,R],s(t="RANGE")&&(T(e)?q(e[0],-1e9,-1,2,t)&&q(e[1],1,1e9,2,t)&&(L=0|e[0],F=0|e[1]):q(e,-1e9,1e9,2,t)&&(0|e?L=-(F=0|(e<0?-e:e)):B&&X(2,t+" cannot be zero",e))),r[t]=[L,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(M=0,q=(B=!!e)?K:w):B&&X(2,t+c,e)),r[t]=B,s(t="CRYPTO")&&(e===!!e||1===e||0===e?(j=!1,e&&!j&&B&&X(2,"crypto unavailable",void 0)):B&&X(2,t+c,e)),r[t]=j,s(t="MODULO_MODE")&&q(e,0,9,2,t)&&($=0|e),r[t]=$,s(t="POW_PRECISION")&&q(e,0,1e9,2,t)&&(U=0|e),r[t]=U,s(t="FORMAT")&&("object"==typeof e?H=e:B&&X(2,t+" not an object",e)),r[t]=H,r},z.max=function(){return Z(arguments,A.lt)},z.min=function(){return Z(arguments,A.gt)},z.random=(r=9007199254740992*Math.random()&2097151?function(){return l(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,i,o=0,s=[],a=new z(P);if(e=null!=e&&q(e,0,1e9,14)?0|e:V,n=u(e/y),j&&B&&X(14,"crypto unavailable",void 0),!o)for(;o<n;)(i=r())<9e15&&(s[o++]=i%1e14);for(n=s[--o],e%=y,n&&e&&(s[o]=l(n/(i=m[y-e]))*i);0===s[o];s.pop(),o--);if(o<0)s=[t=0];else{for(t=-1;0===s[0];s.shift(),t-=y);for(o=1,i=s[0];i>=10;i/=10,o++);o<y&&(t-=y-o)}return a.e=t,a.c=s,a}),n=function(){function e(e,t,n){var r,i,o,s,a=0,u=e.length,l=t%g,c=t/g|0;for(e=e.slice();u--;)a=((i=l*(o=e[u]%g)+(r=c*o+(s=e[u]/g|0)*l)%g*g+a)/n|0)+(r/g|0)+c*s,e[u]=i%n;return a&&e.unshift(a),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,e[n]=(i=e[n]<t[n]?1:0)*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.shift());}return function(r,i,o,s,a){var u,c,f,p,d,m,g,b,_,w,T,x,S,I,D,C,k,E=r.s==i.s?1:-1,M=r.c,A=i.c;if(!(M&&M[0]&&A&&A[0]))return new z(r.s&&i.s&&(M?!A||M[0]!=A[0]:A)?M&&0==M[0]||!A?0*E:E/0:NaN);for(_=(b=new z(E)).c=[],E=o+(c=r.e-i.e)+1,a||(a=h,c=v(r.e/y)-v(i.e/y),E=E/y|0),f=0;A[f]==(M[f]||0);f++);if(A[f]>(M[f]||0)&&c--,E<0)_.push(1),p=!0;else{for(I=M.length,C=A.length,f=0,E+=2,(d=l(a/(A[0]+1)))>1&&(A=e(A,d,a),M=e(M,d,a),C=A.length,I=M.length),S=C,T=(w=M.slice(0,C)).length;T<C;w[T++]=0);(k=A.slice()).unshift(0),D=A[0],A[1]>=a/2&&D++;do{if(d=0,(u=t(A,w,C,T))<0){if(x=w[0],C!=T&&(x=x*a+(w[1]||0)),(d=l(x/D))>1)for(d>=a&&(d=a-1),g=(m=e(A,d,a)).length,T=w.length;1==t(m,w,g,T);)d--,n(m,C<g?k:A,g,a),g=m.length,u=1;else 0==d&&(u=d=1),g=(m=A.slice()).length;if(g<T&&m.unshift(0),n(w,m,T,a),T=w.length,-1==u)for(;t(A,w,C,T)<1;)d++,n(w,C<T?k:A,T,a),T=w.length}else 0===u&&(d++,w=[0]);_[f++]=d,w[0]?w[T++]=M[S]||0:(w=[M[S]],T=1)}while((S++<I||null!=w[0])&&E--);p=null!=w[0],_[0]||_.shift()}if(a==h){for(f=1,E=_[0];E>=10;E/=10,f++);Y(b,o+(b.e=f+c*y-1)+1,s,p)}else b.e=c,b.r=+p;return b}}(),i=/^(-?)0([xbo])/i,o=/^([^.]+)\.$/,C=/^\.([^.]+)$/,k=/^-?(Infinity|NaN)$/,E=/^\s*\+|^\s+|\s+$/g,s=function(e,t,n,r){var s,a=n?t:t.replace(E,"");if(k.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(i,function(e,t,n){return s="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=s?e:t}),r&&(s=r,a=a.replace(o,"$1").replace(C,"0.$1")),t!=a))return new z(a,s);B&&X(M,"not a"+(r?" base "+r:"")+" number",t),e.s=null}e.c=e.e=null,M=0},A.absoluteValue=A.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},A.ceil=function(){return Y(new z(this),this.e+1,2)},A.comparedTo=A.cmp=function(e,t){return M=1,_(this,new z(e,t))},A.decimalPlaces=A.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-v(this.e/y))*y,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},A.dividedBy=A.div=function(e,t){return M=3,n(this,new z(e,t),V,N)},A.dividedToIntegerBy=A.divToInt=function(e,t){return M=4,n(this,new z(e,t),0,1)},A.equals=A.eq=function(e,t){return M=5,0===_(this,new z(e,t))},A.floor=function(){return Y(new z(this),this.e+1,3)},A.greaterThan=A.gt=function(e,t){return M=6,_(this,new z(e,t))>0},A.greaterThanOrEqualTo=A.gte=function(e,t){return M=7,1===(t=_(this,new z(e,t)))||0===t},A.isFinite=function(){return!!this.c},A.isInteger=A.isInt=function(){return!!this.c&&v(this.e/y)>this.c.length-2},A.isNaN=function(){return!this.s},A.isNegative=A.isNeg=function(){return this.s<0},A.isZero=function(){return!!this.c&&0==this.c[0]},A.lessThan=A.lt=function(e,t){return M=8,_(this,new z(e,t))<0},A.lessThanOrEqualTo=A.lte=function(e,t){return M=9,-1===(t=_(this,new z(e,t)))||0===t},A.minus=A.sub=function(e,t){var n,r,i,o,s=this,a=s.s;if(M=10,t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/y,l=e.e/y,c=s.c,f=e.c;if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new z(f?s:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new z(c[0]?s:3==N?-0:0)}if(u=v(u),l=v(l),c=c.slice(),a=u-l){for((o=a<0)?(a=-a,i=c):(l=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=f.length))?a:t,a=t=0;t<r;t++)if(c[t]!=f[t]){o=c[t]<f[t];break}if(o&&(i=c,c=f,f=i,e.s=-e.s),(t=(r=f.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=h-1;r>a;){if(c[--r]<f[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=h}c[r]-=f[r]}for(;0==c[0];c.shift(),--l);return c[0]?J(e,c,l):(e.s=3==N?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,o=this;return M=11,e=new z(e,t),!o.c||!e.s||e.c&&!e.c[0]?new z(NaN):!e.c||o.c&&!o.c[0]?new z(o):(9==$?(i=e.s,e.s=1,r=n(o,e,0,3),e.s=i,r.s*=i):r=n(o,e,0,$),o.minus(r.times(e)))},A.negated=A.neg=function(){var e=new z(this);return e.s=-e.s||null,e},A.plus=A.add=function(e,t){var n,r=this,i=r.s;if(M=12,t=(e=new z(e,t)).s,!i||!t)return new z(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/y,s=e.e/y,a=r.c,u=e.c;if(!o||!s){if(!a||!u)return new z(i/0);if(!a[0]||!u[0])return u[0]?e:new z(a[0]?r:0*i)}if(o=v(o),s=v(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=u):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]%=h;return i&&(a.unshift(i),++s),J(e,a,s)},A.precision=A.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(B&&X(13,"argument"+c,e),e!=!!e&&(e=null)),!i)return null;if(t=(n=i.length-1)*y+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},A.round=function(e,t){var n=new z(this);return(null==e||q(e,0,1e9,15))&&Y(n,~~e+this.e+1,null!=t&&q(t,0,8,15,f)?0|t:N),n},A.shift=function(e){var t=this;return q(e,-9007199254740991,9007199254740991,16,"argument")?t.times("1e"+D(e)):new z(t.c&&t.c[0]&&(e<-9007199254740991||e>9007199254740991)?t.s*(e<0?0:1/0):t)},A.squareRoot=A.sqrt=function(){var e,t,r,i,o,s=this,a=s.c,u=s.s,l=s.e,c=V+4,f=new z("0.5");if(1!==u||!a||!a[0])return new z(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=b(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=v((l+1)/2)-(l<0||l%2),r=new z(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new z(u+""),r.c[0])for((u=(l=r.e)+c)<3&&(u=0);;)if(r=f.times((o=r).plus(n(s,o,c,1))),b(o.c).slice(0,u)===(t=b(r.c)).slice(0,u)){if(r.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Y(r,r.e+V+2,1),e=!r.times(r).eq(s));break}if(!i&&(Y(o,o.e+V+2,0),o.times(o).eq(s))){r=o;break}c+=4,u+=4,i=1}return Y(r,r.e+V+1,N,e)},A.times=A.mul=function(e,t){var n,r,i,o,s,a,u,l,c,f,p,d,m,b,_,w=this,T=w.c,x=(M=17,e=new z(e,t)).c;if(!(T&&x&&T[0]&&x[0]))return!w.s||!e.s||T&&!T[0]&&!x||x&&!x[0]&&!T?e.c=e.e=e.s=null:(e.s*=w.s,T&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=v(w.e/y)+v(e.e/y),e.s*=w.s,(u=T.length)<(f=x.length)&&(m=T,T=x,x=m,i=u,u=f,f=i),i=u+f,m=[];i--;m.push(0));for(b=h,_=g,i=f;--i>=0;){for(n=0,p=x[i]%_,d=x[i]/_|0,o=i+(s=u);o>i;)n=((l=p*(l=T[--s]%_)+(a=d*l+(c=T[s]/_|0)*p)%_*_+m[o]+n)/b|0)+(a/_|0)+d*c,m[o--]=l%b;m[o]=n}return n?++r:m.shift(),J(e,m,r)},A.toDigits=function(e,t){var n=new z(this);return e=null!=e&&q(e,1,1e9,18,"precision")?0|e:null,t=null!=t&&q(t,0,8,18,f)?0|t:N,e?Y(n,e,t):n},A.toExponential=function(e,t){return W(this,null!=e&&q(e,0,1e9,19)?1+~~e:null,t,19)},A.toFixed=function(e,t){return W(this,null!=e&&q(e,0,1e9,20)?~~e+this.e+1:null,t,20)},A.toFormat=function(e,t){var n=W(this,null!=e&&q(e,0,1e9,21)?~~e+this.e+1:null,t,21);if(this.c){var r,i=n.split("."),o=+H.groupSize,s=+H.secondaryGroupSize,a=H.groupSeparator,u=i[0],l=i[1],c=this.s<0,f=c?u.slice(1):u,p=f.length;if(s&&(r=o,o=s,s=r,p-=r),o>0&&p>0){for(u=f.substr(0,r=p%o||o);r<p;r+=o)u+=a+f.substr(r,o);s>0&&(u+=a+f.slice(r)),c&&(u="-"+u)}n=l?u+H.decimalSeparator+((s=+H.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+H.fractionGroupSeparator):l):u}return n},A.toFraction=function(e){var t,r,i,o,s,a,u,l,c,f=B,p=this,d=p.c,h=new z(P),g=r=new z(P),v=u=new z(P);if(null!=e&&(B=!1,a=new z(e),B=f,(f=a.isInt())&&!a.lt(P)||(B&&X(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&a.c&&Y(a,a.e+1,1).gte(P)?a:null)),!d)return p.toString();for(c=b(d),o=h.e=c.length-p.e-1,h.c[0]=m[(s=o%y)<0?y+s:s],e=!e||a.cmp(h)>0?o>0?h:g:a,s=F,F=1/0,a=new z(c),u.c[0]=0;l=n(a,h,0,1),1!=(i=r.plus(l.times(v))).cmp(e);)r=v,v=i,g=u.plus(l.times(i=g)),u=i,h=a.minus(l.times(i=h)),a=i;return i=n(e.minus(r),v,0,1),u=u.plus(i.times(g)),r=r.plus(i.times(v)),u.s=g.s=p.s,t=n(g,v,o*=2,N).minus(p).abs().cmp(n(u,r,o,N).minus(p).abs())<1?[g.toString(),v.toString()]:[u.toString(),r.toString()],F=s,t},A.toNumber=function(){var e=this;return+e||(e.s?0*e.s:NaN)},A.toPower=A.pow=function(e){var t,n,r=l(e<0?-e:+e),i=this;if(!q(e,-9007199254740991,9007199254740991,23,"exponent")&&(!isFinite(e)||r>9007199254740991&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new z(Math.pow(+i,e));for(t=U?u(U/y+2):0,n=new z(P);;){if(r%2){if(!(n=n.times(i)).c)break;t&&n.c.length>t&&(n.c.length=t)}if(!(r=l(r/2)))break;i=i.times(i),t&&i.c&&i.c.length>t&&(i.c.length=t)}return e<0&&(n=P.div(n)),t?Y(n,U,N):n},A.toPrecision=function(e,t){return W(this,null!=e&&q(e,1,1e9,24,"precision")?0|e:null,t,24)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=b(n.c),t=null!=e&&q(e,2,64,25,"base")?G(I(t,i),0|e,10,r):i<=O||i>=R?S(t,i):I(t,i),r<0&&n.c[0]&&(t="-"+t)),t},A.truncated=A.trunc=function(){return Y(new z(this),this.e+1,1)},A.valueOf=A.toJSON=function(){return this.toString()},null!=t&&z.config(t),z}(),void 0===(r=(function(){return o}).call(t,n,t,e))||(e.exports=r)}()},kERW:function(e,t,n){"use strict";n.r(t),n.d(t,"fromEventPattern",function(){return a});var r=n(null),i=n(null),o=n(null),s=n(null);function a(e,t,n){return n?a(e,t).pipe(Object(s.a)(function(e){return Object(i.a)(e)?n.apply(void 0,e):n(e)})):new r.a(function(n){var r,i=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.next(1===e.length?e[0]:e)};try{r=e(i)}catch(e){return void n.error(e)}if(Object(o.a)(t))return function(){return t(i,r)}})}},kIvQ:function(e,t,n){var r=n("4rvP"),i=n("Qiyv"),o=n("ewyi"),s=n("3QZ1"),a=n("84jk"),u=n("U75c"),l=function(e,t,n){this._requestManager=e,this._json=t,this._address=n};l.prototype.encode=function(e){e=e||{};var t={};return["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(n){t[n]=o.inputBlockNumberFormatter(e[n])}),t.address=this._address,t},l.prototype.decode=function(e){e.data=e.data||"";var t=s.isArray(e.topics)&&s.isString(e.topics[0])?e.topics[0].slice(2):"",n=this._json.filter(function(e){return t===r(s.transformToFullName(e))})[0];return n?new i(this._requestManager,n,this._address).decode(e):o.outputLogFormatter(e)},l.prototype.execute=function(e,t){s.isFunction(arguments[arguments.length-1])&&(t=arguments[arguments.length-1],1===arguments.length&&(e=null));var n=this.encode(e),r=this.decode.bind(this);return new a(n,"eth",this._requestManager,u.eth(),r,t)},l.prototype.attachToContract=function(e){var t=this.execute.bind(this);e.allEvents=t},e.exports=l},kOF9:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputUInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},"kVK+":function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?i-1:0,p=n?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=p,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+e[t+f],f+=p,c-=8);if(0===o)o=1-l;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=l}return(d?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+d]=255&s,d+=h,s/=256,l-=8);e[n+d-h]|=128*y}},kfCW:function(e,t,n){var r=n("UIxf"),i=n("Xkrw"),o=n("6ChA"),s=n("2l4O"),a=function(e){this.provider=e,this.polls={},this.timeout=null};a.prototype.send=function(e){if(!this.provider)return console.error(s.InvalidProvider()),null;var t=r.toPayload(e.method,e.params),n=this.provider.send(t);if(!r.isValidResponse(n))throw s.InvalidResponse(n);return n.result},a.prototype.sendAsync=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toPayload(e.method,e.params);this.provider.sendAsync(n,function(e,n){return e?t(e):r.isValidResponse(n)?void t(null,n.result):t(s.InvalidResponse(n))})},a.prototype.sendBatch=function(e,t){if(!this.provider)return t(s.InvalidProvider());var n=r.toBatchPayload(e);this.provider.sendAsync(n,function(e,n){return e?t(e):i.isArray(n)?void t(e,n):t(s.InvalidResponse(n))})},a.prototype.setProvider=function(e){this.provider=e},a.prototype.startPolling=function(e,t,n,r){this.polls[t]={data:e,id:t,callback:n,uninstall:r},this.timeout||this.poll()},a.prototype.stopPolling=function(e){delete this.polls[e],0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.reset=function(e){for(var t in this.polls)e&&-1!==t.indexOf("syncPoll_")||(this.polls[t].uninstall(),delete this.polls[t]);0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),o.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length)if(this.provider){var e=[],t=[];for(var n in this.polls)e.push(this.polls[n].data),t.push(n);if(0!==e.length){var a=r.toBatchPayload(e),u={};a.forEach(function(e,n){u[e.id]=t[n]});var l=this;this.provider.sendAsync(a,function(e,t){if(!e){if(!i.isArray(t))throw s.InvalidResponse(t);t.map(function(e){var t=u[e.id];return!!l.polls[t]&&(e.callback=l.polls[t].callback,e)}).filter(function(e){return!!e}).filter(function(e){var t=r.isValidResponse(e);return t||e.callback(s.InvalidResponse(e)),t}).forEach(function(e){e.callback(null,e.result)})}})}}else console.error(s.InvalidProvider())},e.exports=a},kwJ2:function(e,t,n){"use strict";var r=n("FpcX"),i=r.uint256Coder,o=r.getParamCoder;function s(e,t){if(e.length!==t.length)throw new Error("[ethjs-abi] while encoding params, types/values mismatch, types length "+e.length+" should be "+t.length);var n=[];function r(e){return parseInt(32*Math.ceil(e/32))}e.forEach(function(e,r){var i=o(e);n.push({dynamic:i.dynamic,value:i.encode(t[r])})});var s=0,a=0;n.forEach(function(e){e.dynamic?(s+=32,a+=r(e.value.length)):s+=r(e.value.length)});var u=0,l=s,c=new Buffer(s+a);return n.forEach(function(e,t){e.dynamic?(i.encode(l).copy(c,u),u+=32,e.value.copy(c,l),l+=r(e.value.length)):(e.value.copy(c,u),u+=r(e.value.length))}),"0x"+c.toString("hex")}function a(e,t,n){arguments.length<3&&(n=t,t=e,e=[]),n=r.hexOrBuffer(n);var s=new function(){},a=0;return t.forEach(function(t,r){var u=o(t);if(u.dynamic){var l=i.decode(n,a),c=u.decode(n,l.value.toNumber());a+=l.consumed}else c=u.decode(n,a),a+=c.consumed;s[r]=c.value,e[r]&&(s[e[r]]=c.value)}),s}function u(e,t){var n=e.name+"("+r.getKeys(e.inputs,"type").join(",")+")";return"0x"+new Buffer(r.keccak256(n),"hex").slice(0,4).toString("hex")+s(r.getKeys(e.inputs,"type"),t).substring(2)}e.exports={encodeParams:s,decodeParams:a,encodeMethod:u,decodeMethod:function(e,t){return a(r.getKeys(e.outputs,"name",!0),r.getKeys(e.outputs,"type"),r.hexOrBuffer(t))},encodeEvent:function(e,t){return u(e,t)},decodeEvent:function(e,t){return a(r.getKeys(e.inputs,"name",!0),r.getKeys(e.inputs,"type"),r.hexOrBuffer(t))}}},lBWu:function(e,t,n){var r=n("DapH");e.exports={eth:function(){return[new r({name:"newFilter",call:function(e){switch(e[0]){case"latest":return e.shift(),this.params=0,"eth_newBlockFilter";case"pending":return e.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},params:1}),new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),new r({name:"poll",call:"eth_getFilterChanges",params:1})]},shh:function(){return[new r({name:"newFilter",call:"shh_newMessageFilter",params:1}),new r({name:"uninstallFilter",call:"shh_deleteMessageFilter",params:1}),new r({name:"getLogs",call:"shh_getFilterMessages",params:1}),new r({name:"poll",call:"shh_getFilterMessages",params:1})]}}},lPiR:function(e,t,n){var r;e.exports=(r=n("Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(a[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++}();var l=[],c=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],c=n[5],f=n[6],p=n[7],d=0;d<64;d++){if(d<16)l[d]=0|e[t+d];else{var h=l[d-15],y=l[d-2];l[d]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+l[d-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+l[d-16]}var m=r&i^r&o^i&o,g=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&c^~a&f)+u[d]+l[d];p=f,f=c,c=a,a=s+g|0,s=o,o=i,i=r,r=g+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+p|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(c),t.HmacSHA256=o._createHmacHelper(c)}(Math),r.SHA256)},lXRz:function(e,t,n){var r=n("3QZ1"),i=n("NiEJ"),o=function(e){this.name=e.name,this.call=e.call,this.params=e.params||0,this.inputFormatter=e.inputFormatter,this.outputFormatter=e.outputFormatter,this.requestManager=null};o.prototype.setRequestManager=function(e){this.requestManager=e},o.prototype.getCall=function(e){return r.isFunction(this.call)?this.call(e):this.call},o.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},o.prototype.validateArgs=function(e){if(e.length!==this.params)throw i.InvalidNumberOfRPCParams()},o.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter.map(function(t,n){return t?t(e[n]):e[n]}):e},o.prototype.formatOutput=function(e){return this.outputFormatter&&e?this.outputFormatter(e):e},o.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),r=this.formatInput(e);return this.validateArgs(r),{method:t,params:r,callback:n}},o.prototype.attachToObject=function(e){var t=this.buildCall();t.call=this.call;var n=this.name.split(".");n.length>1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},o.prototype.buildCall=function(){var e=this,t=function(){var t=e.toPayload(Array.prototype.slice.call(arguments));return t.callback?e.requestManager.sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))}):e.formatOutput(e.requestManager.send(t))};return t.request=this.request.bind(this),t},o.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},e.exports=o},lYZG:function(e,t,n){"use strict";n.r(t),n.d(t,"defer",function(){return s});var r=n(null),i=n(null),o=n(null);function s(e){return new r.a(function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?Object(i.a)(n):Object(o.a)()).subscribe(t)})}},mEZQ:function(e,t,n){"use strict";n.r(t),n.d(t,"iif",function(){return o});var r=n("lYZG"),i=n(null);function o(e,t,n){return void 0===t&&(t=i.b),void 0===n&&(n=i.b),Object(r.defer)(function(){return e()?t:n})}},mwus:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputAddress};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/address(\[([0-9]*)\])?/)},e.exports=o},nelg:function(e,t,n){var r=n("q4b3"),i=n("E4eN"),o=n("d9AN"),s=n("Kyjx"),a=n("9NBj"),u=function(e,t){return e.filter(function(e){return"constructor"===e.type&&e.inputs.length===t.length}).map(function(e){return e.inputs.map(function(e){return e.type})}).map(function(e){return i.encodeParams(e,t)})[0]||""},l=function(e){e.abi.filter(function(e){return"function"===e.type}).map(function(t){return new s(e._eth,t,e.address)}).forEach(function(t){t.attachToContract(e)})},c=function(e){var t=e.abi.filter(function(e){return"event"===e.type});new a(e._eth._requestManager,t,e.address).attachToContract(e),t.map(function(t){return new o(e._eth._requestManager,t,e.address)}).forEach(function(t){t.attachToContract(e)})},f=function(e,t){var n=0,r=!1,i=e._eth.filter("latest",function(o){if(!o&&!r)if(++n>50){if(i.stopWatching(function(){}),r=!0,!t)throw new Error("Contract transaction couldn't be found after 50 blocks");t(new Error("Contract transaction couldn't be found after 50 blocks"))}else e._eth.getTransactionReceipt(e.transactionHash,function(n,o){o&&!r&&e._eth.getCode(o.contractAddress,function(n,s){if(!r&&s)if(i.stopWatching(function(){}),r=!0,s.length>3)e.address=o.contractAddress,l(e),c(e),t&&t(null,e);else{if(!t)throw new Error("The contract code couldn't be stored, please check your gas amount.");t(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},p=function(e,t){this.eth=e,this.abi=t,this.new=function(){var e,n=new d(this.eth,this.abi),i={},o=Array.prototype.slice.call(arguments);r.isFunction(o[o.length-1])&&(e=o.pop());var s=o[o.length-1];if(r.isObject(s)&&!r.isArray(s)&&(i=o.pop()),i.value>0&&!(t.filter(function(e){return"constructor"===e.type&&e.inputs.length===o.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");var a=u(this.abi,o);if(i.data+=a,e)this.eth.sendTransaction(i,function(t,r){t?e(t):(n.transactionHash=r,e(null,n),f(n,e))});else{var l=this.eth.sendTransaction(i);n.transactionHash=l,f(n)}return n},this.new.getData=this.getData.bind(this)};p.prototype.at=function(e,t){var n=new d(this.eth,this.abi,e);return l(n),c(n),t&&t(null,n),n},p.prototype.getData=function(){var e={},t=Array.prototype.slice.call(arguments),n=t[t.length-1];r.isObject(n)&&!r.isArray(n)&&(e=t.pop());var i=u(this.abi,t);return e.data+=i,e.data};var d=function(e,t,n){this._eth=e,this.transactionHash=null,this.address=n,this.abi=t};e.exports=p},oI8W:function(e,t,n){var r=n("4Zld"),i=n("MxNA"),o=function(){this._inputFormatter=r.formatInputBool,this._outputFormatter=r.formatOutputBool};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^bool(\[([0-9]*)\])*$/)},e.exports=o},oRuE:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.pad.Iso10126)},p4MM:function(e,t){e.exports=function(){this.defaultBlock="latest",this.defaultAccount=void 0}},pA7S:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("ETIr"),n("cv67"),n("K3mO"),n("OLod"),function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=s[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var l=i[o]=[],c=u[o];for(n=0;n<24;n++)l[n/6|0]|=t[(a[n]-1+c)%28]<<31-n%6,l[4+(n/6|0)]|=t[28+(a[n+24]-1+c)%28]<<31-n%6;for(l[0]=l[0]<<1|l[0]>>>31,n=1;n<7;n++)l[n]=l[n]>>>4*(n-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),p.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,s=this._rBlock,a=0,u=0;u<8;u++)a|=l[u][((s^i[u])&c[u])>>>0];this._lBlock=s,this._rBlock=o^a}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,p.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function d(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=i._createHelper(f);var h=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;this._des1=f.createEncryptor(n.create(e.slice(0,2))),this._des2=f.createEncryptor(n.create(e.slice(2,4))),this._des3=f.createEncryptor(n.create(e.slice(4,6)))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(h)}(),r.TripleDES)},pIU5:function(e,t,n){"use strict";t.XMLHttpRequest="undefined"==typeof XMLHttpRequest?{}:XMLHttpRequest},pbg4:function(e,t,n){"use strict";n.r(t),n.d(t,"bindCallback",function(){return u});var r=n(null),i=n("svcd"),o=n(null),s=n(null),a=n(null);function u(e,t,n){if(t){if(!Object(a.a)(t))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return u(e,n).apply(void 0,r).pipe(Object(o.a)(function(e){return Object(s.a)(e)?t.apply(void 0,e):t(e)}))};n=t}return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var s,a=this,u={context:a,subject:s,callbackFunc:e,scheduler:n};return new r.a(function(r){if(n)return n.schedule(l,0,{args:t,subscriber:r,params:u});if(!s){s=new i.AsyncSubject;try{e.apply(a,t.concat([function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];s.next(e.length<=1?e[0]:e),s.complete()}]))}catch(e){s.error(e)}}return s.subscribe(r)})}}function l(e){var t=this,n=e.args,r=e.subscriber,o=e.params,s=o.callbackFunc,a=o.context,u=o.scheduler,l=o.subject;if(!l){l=o.subject=new i.AsyncSubject;try{s.apply(a,n.concat([function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.add(u.schedule(c,0,{value:e.length<=1?e[0]:e,subject:l}))}]))}catch(e){l.error(e)}}this.add(l.subscribe(r))}function c(e){var t=e.subject;t.next(e.value),t.complete()}},prZD:function(e,t,n){var r=n("6UMM"),i=n("hbHZ");e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),o="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),s=i(n);if("-"===s.substr(0,1)&&(s=i(s.slice(1)),t=new r(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===o&&s.match(/^[0-9A-Fa-f]+$/))return new r(s,16).mul(t);if((s.match(/^-?[0-9]+$/)||""===s)&&!1===o)return new r(s,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},q4b3:function(e,t,n){var r=n("kB5k"),i=n("DILS"),o=n("8d11"),s={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},a=function(e,t,n){return new Array(t-e.length+1).join(n||"0")+e},u=function(e){e=o.encode(e);for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(0===r)break;var i=r.toString(16);t+=i.length<2?"0"+i:i}return"0x"+t},l=function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n).toString(16);t+=r.length<2?"0"+r:r}return"0x"+t},c=function(e){var t=d(e),n=t.toString(16);return t.lessThan(0)?"-0x"+n.substr(1):"0x"+n},f=function(e){if(b(e))return c(+e);if(m(e))return c(e);if(v(e))return u(JSON.stringify(e));if(g(e)){if(0===e.indexOf("-0x"))return c(e);if(0===e.indexOf("0x"))return e;if(!isFinite(e))return l(e)}return c(e)},p=function(e){e=e?e.toLowerCase():"ether";var t=s[e];if(void 0===t)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(s,null,2));return new r(t,10)},d=function(e){return m(e=e||0)?e:!g(e)||0!==e.indexOf("0x")&&0!==e.indexOf("-0x")?new r(e.toString(10),10):new r(e.replace("0x",""),16)},h=function(e){return/^0x[0-9a-f]{40}$/i.test(e)},y=function(e){e=e.replace("0x","");for(var t=i(e.toLowerCase()),n=0;n<40;n++)if(parseInt(t[n],16)>7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},m=function(e){return e instanceof r||e&&e.constructor&&"BigNumber"===e.constructor.name},g=function(e){return"string"==typeof e||e&&e.constructor&&"String"===e.constructor.name},v=function(e){return"object"==typeof e},b=function(e){return"boolean"==typeof e};e.exports={padLeft:a,padRight:function(e,t,n){return e+new Array(t-e.length+1).join(n||"0")},toHex:f,toDecimal:function(e){return d(e).toNumber()},fromDecimal:c,toUtf8:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);if(0===i)break;t+=String.fromCharCode(i)}return o.decode(t)},toAscii:function(e){var t="",n=0,r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){var i=parseInt(e.substr(n,2),16);t+=String.fromCharCode(i)}return t},fromUtf8:u,fromAscii:l,transformToFullName:function(e){if(-1!==e.name.indexOf("("))return e.name;var t=e.inputs.map(function(e){return e.type}).join();return e.name+"("+t+")"},extractDisplayName:function(e){var t=e.indexOf("(");return-1!==t?e.substr(0,t):e},extractTypeName:function(e){var t=e.indexOf("(");return-1!==t?e.substr(t+1,e.length-1-(t+1)).replace(" ",""):""},toWei:function(e,t){var n=d(e).times(p(t));return m(e)?n:n.toString(10)},fromWei:function(e,t){var n=d(e).dividedBy(p(t));return m(e)?n:n.toString(10)},toBigNumber:d,toTwosComplement:function(e){var t=d(e).round();return t.lessThan(0)?new r("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1):t},toAddress:function(e){return h(e)?e:/^[0-9a-f]{40}$/.test(e)?"0x"+e:"0x"+a(f(e).substr(2),40)},isBigNumber:m,isStrictAddress:h,isAddress:function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e))||y(e))},isChecksumAddress:y,toChecksumAddress:function(e){if(void 0===e)return"";e=e.toLowerCase().replace("0x","");for(var t=i(e),n="0x",r=0;r<e.length;r++)parseInt(t[r],16)>7?n+=e[r].toUpperCase():n+=e[r];return n},isFunction:function(e){return"function"==typeof e},isString:g,isObject:v,isBoolean:b,isArray:function(e){return e instanceof Array},isJson:function(e){try{return!!JSON.parse(e)}catch(e){return!1}},isBloom:function(e){return!(!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))},isTopic:function(e){return!(!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}}},q6iK:function(e,t,n){var r=n("Kfwp"),i=n("NiEJ"),o=function(e){this.requestManager=e._requestManager,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests;this.requestManager.sendBatch(e,function(t,n){n=n||[],e.map(function(e,t){return n[t]||{}}).forEach(function(t,n){if(e[n].callback){if(!r.isValidResponse(t))return e[n].callback(i.InvalidResponse(t));e[n].callback(null,e[n].format?e[n].format(t.result):t.result)}})})},e.exports=o},qBft:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,i=r-n%r,o=n+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){e.sigBytes-=255&e.words[e.sigBytes-1>>>2]}},r.pad.Ansix923)},qM6L:function(e,t,n){var r;e.exports=(r=n("Ib8C"),function(){var e=r.lib.WordArray,t=r.enc;function n(e){return e<<8&4278255360|e>>>8&16711935}t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2)r.push(String.fromCharCode(t[i>>>2]>>>16-i%4*8&65535));return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},t.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],o=0;o<r;o+=2){var s=n(t[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(s))}return i.join("")},parse:function(t){for(var r=t.length,i=[],o=0;o<r;o++)i[o>>>1]|=n(t.charCodeAt(o)<<16-o%2*16);return e.create(i,2*r)}}}(),r.enc.Utf16)},qu8F:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(s);var a=s.slice(0);r.encryptBlock(a,0);for(var u=0;u<i;u++)e[n+u]^=a[u]}});return e.Decryptor=n,e}(),r.mode.CTRGladman)},qvd7:function(e,t){e.exports=XMLHttpRequest},"r/P+":function(e,t,n){var r=n("aIKs"),i=n("/bC+"),o=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},r0s3:function(e,t,n){"use strict";var r=n("q4b3"),i=n("FNdZ"),o=function(e,t){var n=this;this.responseCallbacks={},this.path=e,this.connection=t.connect({path:this.path}),this.connection.on("error",function(e){console.error("IPC Connection Error",e),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(e){n._parseResponse(e.toString()).forEach(function(e){var t=null;r.isArray(e)?e.forEach(function(e){n.responseCallbacks[e.id]&&(t=e.id)}):t=e.id,n.responseCallbacks[t]&&(n.responseCallbacks[t](null,e),delete n.responseCallbacks[t])})})};o.prototype._parseResponse=function(e){var t=this,n=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(function(e){t.lastChunk&&(e=t.lastChunk+e);var r=null;try{r=JSON.parse(e)}catch(n){return t.lastChunk=e,clearTimeout(t.lastChunkTimeout),void(t.lastChunkTimeout=setTimeout(function(){throw t._timeout(),i.InvalidResponse(e)},15e3))}clearTimeout(t.lastChunkTimeout),t.lastChunk=null,r&&n.push(r)}),n},o.prototype._addResponseCallback=function(e,t){var n=e.id||e[0].id,r=e.method||e[0].method;this.responseCallbacks[n]=t,this.responseCallbacks[n].method=r},o.prototype._timeout=function(){for(var e in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(e)&&(this.responseCallbacks[e](i.InvalidConnection("on IPC")),delete this.responseCallbacks[e])},o.prototype.isConnected=function(){return this.connection.writable||this.connection.connect({path:this.path}),!!this.connection.writable},o.prototype.send=function(e){if(this.connection.writeSync){var t;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(e));try{t=JSON.parse(n)}catch(e){throw i.InvalidResponse(n)}return t}throw new Error('You tried to send "'+e.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},o.prototype.sendAsync=function(e,t){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(e)),this._addResponseCallback(e,t)},e.exports=o},rOim:function(e,t,n){"use strict";var r=n("ewyi"),i=n("3QZ1"),o=n("lXRz"),s=n("DxpT"),a=n("zo/c"),u=n("xX+g"),l=n("U75c"),c=n("84jk"),f=n("3S5P"),p=n("JVwb"),d=n("2M1J"),h=n("rs4P"),y=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},m=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},v=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},b=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};function _(e){this._requestManager=e._requestManager;var t=this;w().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),T().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),this.iban=d,this.sendIBANTransaction=h.bind(null,this)}Object.defineProperty(_.prototype,"defaultBlock",{get:function(){return a.defaultBlock},set:function(e){return a.defaultBlock=e,e}}),Object.defineProperty(_.prototype,"defaultAccount",{get:function(){return a.defaultAccount},set:function(e){return a.defaultAccount=e,e}});var w=function(){var e=new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),t=new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,r.inputDefaultBlockNumberFormatter]}),n=new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter]}),s=new o({name:"getBlock",call:y,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:r.outputBlockFormatter}),a=new o({name:"getUncle",call:g,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputBlockFormatter}),u=new o({name:"getCompilers",call:"eth_getCompilers",params:0}),l=new o({name:"getBlockTransactionCount",call:v,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),c=new o({name:"getBlockUncleCount",call:b,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),f=new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),p=new o({name:"getTransactionFromBlock",call:m,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputTransactionFormatter}),d=new o({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),h=new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),_=new o({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),w=new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),T=new o({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),x=new o({name:"sign",call:"eth_sign",params:2,inputFormatter:[r.inputAddressFormatter,null]});return[e,t,n,s,a,u,l,c,f,p,d,h,new o({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputCallFormatter,r.inputDefaultBlockNumberFormatter]}),new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputCallFormatter],outputFormatter:i.toDecimal}),_,T,w,x,new o({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new o({name:"compile.lll",call:"eth_compileLLL",params:1}),new o({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new o({name:"submitWork",call:"eth_submitWork",params:3}),new o({name:"getWork",call:"eth_getWork",params:0})]},T=function(){return[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"syncing",getter:"eth_syncing",outputFormatter:r.outputSyncingFormatter}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal}),new s({name:"protocolVersion",getter:"eth_protocolVersion"})]};_.prototype.contract=function(e){return new u(this,e)},_.prototype.filter=function(e,t,n){return new c(e,"eth",this._requestManager,l.eth(),r.outputLogFormatter,t,n)},_.prototype.namereg=function(){return this.contract(p.global.abi).at(p.global.address)},_.prototype.icapNamereg=function(){return this.contract(p.icap.abi).at(p.icap.address)},_.prototype.isSyncing=function(e){return new f(this._requestManager,e)},e.exports=_},rVqu:function(e,t,n){var r=n("3QZ1"),i=function(e,t){this.value=e||"",this.offset=t};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(e){return new i(this.value,e)},i.prototype.combine=function(e){return new i(this.value+e.value)},i.prototype.isDynamic=function(){return void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?r.padLeft(r.toTwosComplement(this.offset).toString(16),64):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(e){var t=32*e.length,n=e.map(function(e){if(!e.isDynamic())return e;var n=t;return t+=e.dynamicPartLength(),e.withOffset(n)});return n.reduce(function(e,t){return e+t.dynamicPart()},n.reduce(function(e,t){return e+t.staticPart()},""))},e.exports=i},rs4P:function(e,t,n){var r=n("2M1J"),i=n("cSwG"),o=function(e,t,n,r,o,s){return e.contract(i).at(n).deposit(o,{from:t,value:r},s)};e.exports=function(e,t,n,i,s){var a=new r(n);if(!a.isValid())throw new Error("invalid iban address");if(a.isDirect())return function(e,t,n,r,i){return e.sendTransaction({address:n,from:t,value:r},i)}(e,t,a.address(),i,s);if(!s){var u=e.icapNamereg().addr(a.institution());return o(e,t,u,i,a.client())}e.icapNamereg().addr(a.institution(),function(n,r){return o(e,t,r,i,a.client(),s)})}},"s/KW":function(e,t){e.exports=function(){this.defaultBlock="latest",this.defaultAccount=void 0}},siIJ:function(e,t,n){"use strict";n.r(t),n.d(t,"Scheduler",function(){return r});var r=function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=Date.now?Date.now:function(){return+new Date},e}()},svcd:function(e,t,n){"use strict";n.r(t),n.d(t,"AsyncSubject",function(){return s});var r=n(null),i=n(null),o=n(null),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.c(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),o.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),o.a.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(i.a)},"t/cl":function(e,t,n){var r=n("4m0o"),i=n("Xkrw"),o=function(e){return null===e||void 0===e?null:0===(e=String(e)).indexOf("0x")?e:i.fromUtf8(e)},s=function(e,t){i.isString(e.options)||e.get(function(e,n){e&&t(e),i.isArray(n)&&n.forEach(function(e){t(null,e)})})},a=function(e){e.requestManager.startPolling({method:e.implementation.poll.call,params:[e.filterId]},e.filterId,function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isArray(n)&&n.forEach(function(t){t=e.formatter?e.formatter(t):t,e.callbacks.forEach(function(e){e(null,t)})})},e.stopWatching.bind(e))},u=function(e,t,n,u,l,c,f){var p=this,d={};return u.forEach(function(e){e.setRequestManager(n),e.attachToObject(d)}),this.requestManager=n,this.options=function(e,t){if(i.isString(e))return e;switch(e=e||{},t){case"eth":return e.topics=e.topics||[],e.topics=e.topics.map(function(e){return i.isArray(e)?e.map(o):o(e)}),{topics:e.topics,from:e.from,to:e.to,address:e.address,fromBlock:r.inputBlockNumberFormatter(e.fromBlock),toBlock:r.inputBlockNumberFormatter(e.toBlock)};case"shh":return e}}(e,t),this.implementation=d,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=l,this.implementation.newFilter(this.options,function(e,t){if(e)p.callbacks.forEach(function(t){t(e)}),"function"==typeof f&&f(e);else if(p.filterId=t,p.getLogsCallbacks.forEach(function(e){p.get(e)}),p.getLogsCallbacks=[],p.callbacks.forEach(function(e){s(p,e)}),p.callbacks.length>0&&a(p),"function"==typeof c)return p.watch(c)}),this};u.prototype.watch=function(e){return this.callbacks.push(e),this.filterId&&(s(this,e),a(this)),this},u.prototype.stopWatching=function(e){if(this.requestManager.stopPolling(this.filterId),this.callbacks=[],!e)return this.implementation.uninstallFilter(this.filterId);this.implementation.uninstallFilter(this.filterId,e)},u.prototype.get=function(e){var t=this;if(!i.isFunction(e)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");return this.implementation.getLogs(this.filterId).map(function(e){return t.formatter?t.formatter(e):e})}return null===this.filterId?this.getLogsCallbacks.push(e):this.implementation.getLogs(this.filterId,function(n,r){n?e(n):e(null,r.map(function(e){return t.formatter?t.formatter(e):e}))}),this},e.exports=u},t3Jy:function(e,t,n){"use strict";var r=n("ioaB"),i=n("q4b3"),o=n("fDiS"),s=n("J1WT"),a=n("UVUN"),u=n("nelg"),l=n("L7+l"),c=n("FPO/"),f=n("81Hv"),p=n("ed1O"),d=n("JaDV"),h=n("H/fx"),y=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},m=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},v=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},b=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};function _(e){this._requestManager=e._requestManager;var t=this;w().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),T().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),this.iban=d,this.sendIBANTransaction=h.bind(null,this)}Object.defineProperty(_.prototype,"defaultBlock",{get:function(){return a.defaultBlock},set:function(e){return a.defaultBlock=e,e}}),Object.defineProperty(_.prototype,"defaultAccount",{get:function(){return a.defaultAccount},set:function(e){return a.defaultAccount=e,e}});var w=function(){var e=new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),t=new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,r.inputDefaultBlockNumberFormatter]}),n=new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter]}),s=new o({name:"getBlock",call:y,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:r.outputBlockFormatter}),a=new o({name:"getUncle",call:g,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputBlockFormatter}),u=new o({name:"getCompilers",call:"eth_getCompilers",params:0}),l=new o({name:"getBlockTransactionCount",call:v,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),c=new o({name:"getBlockUncleCount",call:b,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),f=new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),p=new o({name:"getTransactionFromBlock",call:m,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputTransactionFormatter}),d=new o({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),h=new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),_=new o({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),w=new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),T=new o({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),x=new o({name:"sign",call:"eth_sign",params:2,inputFormatter:[r.inputAddressFormatter,null]});return[e,t,n,s,a,u,l,c,f,p,d,h,new o({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputCallFormatter,r.inputDefaultBlockNumberFormatter]}),new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputCallFormatter],outputFormatter:i.toDecimal}),_,T,w,x,new o({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new o({name:"compile.lll",call:"eth_compileLLL",params:1}),new o({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new o({name:"submitWork",call:"eth_submitWork",params:3}),new o({name:"getWork",call:"eth_getWork",params:0})]},T=function(){return[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"syncing",getter:"eth_syncing",outputFormatter:r.outputSyncingFormatter}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal}),new s({name:"protocolVersion",getter:"eth_protocolVersion"})]};_.prototype.contract=function(e){return new u(this,e)},_.prototype.filter=function(e,t){return new c(this._requestManager,e,l.eth(),r.outputLogFormatter,t)},_.prototype.namereg=function(){return this.contract(p.global.abi).at(p.global.address)},_.prototype.icapNamereg=function(){return this.contract(p.icap.abi).at(p.icap.address)},_.prototype.isSyncing=function(e){return new f(this._requestManager,e)},e.exports=_},tHPV:function(e,t,n){"use strict";var r=n(null),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.c(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(function(){return t.flush(null)})))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(cancelAnimationFrame(n),t.scheduled=void 0)},t}(function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.c(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.c(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(null).a))),o=n("siIJ"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.c(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,n=this.actions,r=-1,i=n.length;e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while(++r<i&&(e=n.shift()));if(this.active=!1,t){for(;++r<i&&(e=n.shift());)e.unsubscribe();throw t}},t}(function(e){function t(n,r){void 0===r&&(r=o.Scheduler.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.c(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(o.Scheduler));n.d(t,"animationFrame",function(){return a});var a=new s(i)},"tf/z":function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputString,this._outputFormatter=r.formatOutputString};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^string(\[([0-9]*)\])*$/)},o.prototype.isDynamicType=function(){return!0},e.exports=o},tjlA:function(e,t,n){"use strict";var r=n("H7XF"),i=n("kVK+"),o=n("49sm");function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=p(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),i=(e=a(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):p(e,t);if("Buffer"===t.type&&o(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=a(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(l(e,o+p)!==l(t,p)){f=!1;break}if(f)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function b(e,t,n,r){return j(B(t,e.length-n),e,n,r)}function _(e,t,n,r){return j(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function T(e,t,n,r){return j(q(t),e,n,r)}function x(e,t,n,r){return j(function(e,t){for(var n,r,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return r.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:s=e[i+2],128==(192&(o=e[i+1]))&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:s=e[i+2],a=e[i+3],128==(192&(o=e[i+1]))&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(r.push((c-=65536)>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=D));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?a(null,t):void 0!==n?"string"==typeof r?a(null,t).fill(n,r):a(null,t).fill(n):a(null,t)}(0,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):(function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}).apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,a=Math.min(o,s),l=this.slice(r,i),c=e.slice(t,n),f=0;f<a;++f)if(l[f]!==c[f]){o=l[f],s=c[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function E(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",s=t;s<n;++s)o+=(r=e[s])<16?"0"+r.toString(16):r.toString(16);return o}function M(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function V(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function O(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return o||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):V(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):V(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:B(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}},uGsb:function(e,t,n){var r,i,o,s,a,u,l,c;e.exports=(r=n("Ib8C"),n("MlIO"),n("1uat"),s=(o=(i=r).x64).Word,a=o.WordArray,c=(u=i.algo).SHA384=(l=u.SHA512).extend({_doReset:function(){this._hash=new a.init([new s.init(3418070365,3238371032),new s.init(1654270250,914150663),new s.init(2438529370,812702999),new s.init(355462360,4144912697),new s.init(1731405415,4290775857),new s.init(2394180231,1750603025),new s.init(3675008525,1694076839),new s.init(1203062813,3204075428)])},_doFinalize:function(){var e=l._doFinalize.call(this);return e.sigBytes-=16,e}}),i.SHA384=l._createHelper(c),i.HmacSHA384=l._createHmacHelper(c),r.SHA384)},uGxW:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("OLod"),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},uQT6:function(e,t,n){"use strict";var r=n("4m0o"),i=n("Xkrw"),o=n("DapH"),s=n("9Z5i"),a=n("6ChA"),u=n("JXl6"),l=n("lBWu"),c=n("t/cl"),f=n("y429"),p=n("7ZAm"),d=n("zb58"),h=n("7xhL"),y=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},m=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},v=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},b=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};function _(e){this._requestManager=e._requestManager;var t=this;w().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),T().forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),this.iban=d,this.sendIBANTransaction=h.bind(null,this)}Object.defineProperty(_.prototype,"defaultBlock",{get:function(){return a.defaultBlock},set:function(e){return a.defaultBlock=e,e}}),Object.defineProperty(_.prototype,"defaultAccount",{get:function(){return a.defaultAccount},set:function(e){return a.defaultAccount=e,e}});var w=function(){var e=new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter],outputFormatter:r.outputBigNumberFormatter}),t=new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,r.inputDefaultBlockNumberFormatter]}),n=new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[r.inputAddressFormatter,r.inputDefaultBlockNumberFormatter]}),s=new o({name:"getBlock",call:y,params:2,inputFormatter:[r.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:r.outputBlockFormatter}),a=new o({name:"getUncle",call:g,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputBlockFormatter}),u=new o({name:"getCompilers",call:"eth_getCompilers",params:0}),l=new o({name:"getBlockTransactionCount",call:v,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),c=new o({name:"getBlockUncleCount",call:b,params:1,inputFormatter:[r.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),f=new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:r.outputTransactionFormatter}),p=new o({name:"getTransactionFromBlock",call:m,params:2,inputFormatter:[r.inputBlockNumberFormatter,i.toHex],outputFormatter:r.outputTransactionFormatter}),d=new o({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:r.outputTransactionReceiptFormatter}),h=new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,r.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),_=new o({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),w=new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),T=new o({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[r.inputTransactionFormatter]}),x=new o({name:"sign",call:"eth_sign",params:2,inputFormatter:[r.inputAddressFormatter,null]});return[e,t,n,s,a,u,l,c,f,p,d,h,new o({name:"call",call:"eth_call",params:2,inputFormatter:[r.inputCallFormatter,r.inputDefaultBlockNumberFormatter]}),new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[r.inputCallFormatter],outputFormatter:i.toDecimal}),_,T,w,x,new o({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new o({name:"compile.lll",call:"eth_compileLLL",params:1}),new o({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new o({name:"submitWork",call:"eth_submitWork",params:3}),new o({name:"getWork",call:"eth_getWork",params:0})]},T=function(){return[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"syncing",getter:"eth_syncing",outputFormatter:r.outputSyncingFormatter}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:r.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal}),new s({name:"protocolVersion",getter:"eth_protocolVersion"})]};_.prototype.contract=function(e){return new u(this,e)},_.prototype.filter=function(e,t,n){return new c(e,"eth",this._requestManager,l.eth(),r.outputLogFormatter,t,n)},_.prototype.namereg=function(){return this.contract(p.global.abi).at(p.global.address)},_.prototype.icapNamereg=function(){return this.contract(p.icap.abi).at(p.icap.address)},_.prototype.isSyncing=function(e){return new f(this._requestManager,e)},e.exports=_},usdr:function(e,t,n){var r=n("Ecc2");"undefined"!=typeof window&&void 0===window.Web3&&(window.Web3=r),e.exports=r},vAyL:function(e,t,n){"use strict";n.r(t),n.d(t,"range",function(){return i}),n.d(t,"dispatch",function(){return o});var r=n(null);function i(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),new r.a(function(r){var i=0;if(n)return n.schedule(o,0,{index:i,count:t,start:e,subscriber:r});for(;;){if(i++>=t){r.complete();break}if(r.next(e++),r.closed)break}})}function o(e){var t=e.start,n=e.index,r=e.subscriber;n>=e.count?r.complete():(r.next(t),r.closed||(e.index=n+1,e.start=t+1,this.schedule(e)))}},vtD2:function(e,t,n){"use strict";var r=n("fDiS"),i=n("J1WT"),o=n("ioaB");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new r({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null]}),new r({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[o.inputAddressFormatter,null,null]}),new r({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[o.inputTransactionFormatter,null]}),new r({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[o.inputAddressFormatter]})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)}),[new i({name:"listAccounts",getter:"personal_listAccounts"})].forEach(function(e){e.attachToObject(t),e.setRequestManager(t._requestManager)})}},w3oT:function(e,t,n){var r=n("OzUK"),i=n("z9lM"),o=function(){this._inputFormatter=r.formatInputInt,this._outputFormatter=r.formatOutputInt};(o.prototype=new i({})).constructor=o,o.prototype.isType=function(e){return!!e.match(/^int([0-9]*)?(\[([0-9]*)\])*$/)},e.exports=o},w7YG:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("ETIr"),n("cv67"),n("K3mO"),n("OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var s=i%n,a=r[i];r[i]=r[o=(o+r[i]+(t[s>>>2]>>>24-s%4*8&255))%256],r[o]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){var o=e[t=(t+1)%256];e[t]=e[n=(n+e[t])%256],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}e.RC4=t._createHelper(i);var s=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(s)}(),r.RC4)},wZgz:function(e,t,n){var r;e.exports=(r=n("Ib8C"),n("ETIr"),n("cv67"),n("K3mO"),n("OLod"),function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],s=[],a=[],u=[],l=[],c=[],f=[],p=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,r=0;for(t=0;t<256;t++){var h=r^r<<1^r<<2^r<<3^r<<4;i[n]=h=h>>>8^255&h^99,o[h]=n;var y,m=e[n],g=e[m],v=e[g];s[n]=(y=257*e[h]^16843008*h)<<24|y>>>8,a[n]=y<<16|y>>>16,u[n]=y<<8|y>>>24,l[n]=y,c[h]=(y=16843009*v^65537*g^257*m^16843008*n)<<24|y>>>8,f[h]=y<<16|y>>>16,p[h]=y<<8|y>>>24,d[h]=y,n?(n=m^e[e[e[v^m]]],r^=e[e[r]]):n=r=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],y=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)if(s<n)o[s]=t[s];else{var a=o[s-1];s%n?n>6&&s%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a]):(a=i[(a=a<<8|a>>>24)>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[255&a],a^=h[s/n|0]<<24),o[s]=o[s-n]^a}for(var u=this._invKeySchedule=[],l=0;l<r;l++)s=r-l,a=l%4?o[s]:o[s-4],u[l]=l<4||s<=4?a:c[i[a>>>24]]^f[i[a>>>16&255]]^p[i[a>>>8&255]]^d[i[255&a]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,a,u,l,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,c,f,p,d,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,s,a){for(var u=this._nRounds,l=e[t]^n[0],c=e[t+1]^n[1],f=e[t+2]^n[2],p=e[t+3]^n[3],d=4,h=1;h<u;h++){var y=r[l>>>24]^i[c>>>16&255]^o[f>>>8&255]^s[255&p]^n[d++],m=r[c>>>24]^i[f>>>16&255]^o[p>>>8&255]^s[255&l]^n[d++],g=r[f>>>24]^i[p>>>16&255]^o[l>>>8&255]^s[255&c]^n[d++],v=r[p>>>24]^i[l>>>16&255]^o[c>>>8&255]^s[255&f]^n[d++];l=y,c=m,f=g,p=v}y=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&p])^n[d++],m=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[p>>>8&255]<<8|a[255&l])^n[d++],g=(a[f>>>24]<<24|a[p>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^n[d++],v=(a[p>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^n[d++],e[t]=y,e[t+1]=m,e[t+2]=g,e[t+3]=v},keySize:8});e.AES=t._createHelper(y)}(),r.AES)},wtYL:function(e,t,n){var r=n("8JLD"),i=n("FNdZ"),o=function(e){this.requestManager=e._requestManager,this.requests=[]};o.prototype.add=function(e){this.requests.push(e)},o.prototype.execute=function(){var e=this.requests;this.requestManager.sendBatch(e,function(t,n){n=n||[],e.map(function(e,t){return n[t]||{}}).forEach(function(t,n){if(e[n].callback){if(!r.isValidResponse(t))return e[n].callback(i.InvalidResponse(t));e[n].callback(null,e[n].format?e[n].format(t.result):t.result)}})})},e.exports=o},"x/km":function(e,t,n){var r=n("Xkrw"),i=n("9Z5i");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},x7SH:function(e){e.exports=[{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_refund",type:"address"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"}],name:"setAddr",outputs:[],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"}]},"xX+g":function(e,t,n){var r=n("3QZ1"),i=n("0ko0"),o=n("Qiyv"),s=n("cUeh"),a=n("kIvQ"),u=function(e,t){return e.filter(function(e){return"constructor"===e.type&&e.inputs.length===t.length}).map(function(e){return e.inputs.map(function(e){return e.type})}).map(function(e){return i.encodeParams(e,t)})[0]||""},l=function(e){e.abi.filter(function(e){return"function"===e.type}).map(function(t){return new s(e._eth,t,e.address)}).forEach(function(t){t.attachToContract(e)})},c=function(e){var t=e.abi.filter(function(e){return"event"===e.type});new a(e._eth._requestManager,t,e.address).attachToContract(e),t.map(function(t){return new o(e._eth._requestManager,t,e.address)}).forEach(function(t){t.attachToContract(e)})},f=function(e,t){var n=0,r=!1,i=e._eth.filter("latest",function(o){if(!o&&!r)if(++n>50){if(i.stopWatching(function(){}),r=!0,!t)throw new Error("Contract transaction couldn't be found after 50 blocks");t(new Error("Contract transaction couldn't be found after 50 blocks"))}else e._eth.getTransactionReceipt(e.transactionHash,function(n,o){o&&o.blockHash&&!r&&e._eth.getCode(o.contractAddress,function(n,s){if(!r&&s)if(i.stopWatching(function(){}),r=!0,s.length>3)e.address=o.contractAddress,l(e),c(e),t&&t(null,e);else{if(!t)throw new Error("The contract code couldn't be stored, please check your gas amount.");t(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},p=function(e,t){this.eth=e,this.abi=t,this.new=function(){var e,n=new d(this.eth,this.abi),i={},o=Array.prototype.slice.call(arguments);r.isFunction(o[o.length-1])&&(e=o.pop());var s=o[o.length-1];if(r.isObject(s)&&!r.isArray(s)&&(i=o.pop()),i.value>0&&!(t.filter(function(e){return"constructor"===e.type&&e.inputs.length===o.length})[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");var a=u(this.abi,o);if(i.data+=a,e)this.eth.sendTransaction(i,function(t,r){t?e(t):(n.transactionHash=r,e(null,n),f(n,e))});else{var l=this.eth.sendTransaction(i);n.transactionHash=l,f(n)}return n},this.new.getData=this.getData.bind(this)};p.prototype.at=function(e,t){var n=new d(this.eth,this.abi,e);return l(n),c(n),t&&t(null,n),n},p.prototype.getData=function(){var e={},t=Array.prototype.slice.call(arguments),n=t[t.length-1];r.isObject(n)&&!r.isArray(n)&&(e=t.pop());var i=u(this.abi,t);return e.data+=i,e.data};var d=function(e,t,n){this._eth=e,this.transactionHash=null,this.address=n,this.abi=t};e.exports=p},xXU7:function(e,t,n){"use strict";var r=n(null),i=n("T1DM"),o=n(null);function s(e,t){var n;return void 0===e&&(e=0),void 0===t&&(t=i.async),n=e,(Object(o.a)(n)||!(n-parseFloat(n)+1>=0)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=i.async),new r.a(function(n){return n.add(t.schedule(a,e,{subscriber:n,counter:0,period:e})),n})}function a(e){var t=e.subscriber,n=e.counter,r=e.period;t.next(n),this.schedule({subscriber:t,counter:n+1,period:r},r)}n.d(t,"interval",function(){return s})},y429:function(e,t,n){var r=n("4m0o"),i=n("Xkrw"),o=1,s=function(e,t){var n;return this.requestManager=e,this.pollId="syncPoll_"+o++,this.callbacks=[],this.addCallback(t),this.lastSyncState=!1,(n=this).requestManager.startPolling({method:"eth_syncing",params:[]},n.pollId,function(e,t){if(e)return n.callbacks.forEach(function(t){t(e)});i.isObject(t)&&t.startingBlock&&(t=r.outputSyncingFormatter(t)),n.callbacks.forEach(function(e){n.lastSyncState!==t&&(!n.lastSyncState&&i.isObject(t)&&e(null,!0),setTimeout(function(){e(null,t)},0),n.lastSyncState=t)})},n.stopWatching.bind(n)),this};s.prototype.addCallback=function(e){return e&&this.callbacks.push(e),this},s.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},e.exports=s},yOGc:function(e,t,n){var r=n("q4b3"),i=n("J1WT");e.exports=function(e){this._requestManager=e._requestManager;var t=this;[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})].forEach(function(n){n.attachToObject(t),n.setRequestManager(e._requestManager)})}},z9lM:function(e,t,n){var r=n("OzUK"),i=n("YHIM"),o=function(e){this._inputFormatter=e.inputFormatter,this._outputFormatter=e.outputFormatter};o.prototype.isType=function(e){throw"this method should be overrwritten for type "+e},o.prototype.staticPartLength=function(e){return(this.nestedTypes(e)||["[1]"]).map(function(e){return parseInt(e.slice(1,-1),10)||1}).reduce(function(e,t){return e*t},32)},o.prototype.isDynamicArray=function(e){var t=this.nestedTypes(e);return!!t&&!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.isStaticArray=function(e){var t=this.nestedTypes(e);return!!t&&!!t[t.length-1].match(/[0-9]{1,}/g)},o.prototype.staticArrayLength=function(e){var t=this.nestedTypes(e);return t?parseInt(t[t.length-1].match(/[0-9]{1,}/g)||1):1},o.prototype.nestedName=function(e){var t=this.nestedTypes(e);return t?e.substr(0,e.length-t[t.length-1].length):e},o.prototype.isDynamicType=function(){return!1},o.prototype.nestedTypes=function(e){return e.match(/(\[[0-9]*\])/g)},o.prototype.encode=function(e,t){var n,i,o,s=this;return this.isDynamicArray(t)?(n=e.length,i=s.nestedName(t),(o=[]).push(r.formatInputInt(n).encode()),e.forEach(function(e){o.push(s.encode(e,i))}),o):this.isStaticArray(t)?function(){for(var n=s.staticArrayLength(t),r=s.nestedName(t),i=[],o=0;o<n;o++)i.push(s.encode(e[o],r));return i}():this._inputFormatter(e,t).encode()},o.prototype.decode=function(e,t,n){var r=this;if(this.isDynamicArray(n))return function(){for(var i=parseInt("0x"+e.substr(2*t,64)),o=parseInt("0x"+e.substr(2*i,64)),s=i+32,a=r.nestedName(n),u=r.staticPartLength(a),l=32*Math.floor((u+31)/32),c=[],f=0;f<o*l;f+=l)c.push(r.decode(e,s+f,a));return c}();if(this.isStaticArray(n))return function(){for(var i=r.staticArrayLength(n),o=t,s=r.nestedName(n),a=r.staticPartLength(s),u=32*Math.floor((a+31)/32),l=[],c=0;c<i*u;c+=u)l.push(r.decode(e,o+c,s));return l}();if(this.isDynamicType(n))return function(){var o=parseInt("0x"+e.substr(2*t,64)),s=parseInt("0x"+e.substr(2*o,64)),a=Math.floor((s+31)/32),u=new i(e.substr(2*o,64*(1+a)),0);return r._outputFormatter(u,n)}();var o=this.staticPartLength(n),s=new i(e.substr(2*t,2*o));return this._outputFormatter(s,n)},e.exports=o},zUnb:function(e,t,n){"use strict";n.r(t);var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}function l(e){return"function"==typeof e}var c=!1,f={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){c=e},get useDeprecatedSynchronousErrorHandling(){return c}};function p(e){setTimeout(function(){throw e})}var d={closed:!0,next:function(e){},error:function(e){if(f.useDeprecatedSynchronousErrorHandling)throw e;p(e)},complete:function(){}},h=Array.isArray||function(e){return e&&"number"==typeof e.length};function y(e){return null!=e&&"object"==typeof e}var m,g={e:{}};function v(){try{return m.apply(this,arguments)}catch(e){return g.e=e,g}}function b(e){return m=e,v}var _=function(e){function t(n){var r=e.call(this,n?n.length+" errors occurred during unsubscription:\n  "+n.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,t.prototype),r}return i(t,e),t}(Error),w=function(){function e(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){var n=this._parent,r=this._parents,i=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=r?r.length:0;n;)n.remove(this),n=++s<a&&r[s]||null;if(l(i)&&b(i).call(this)===g&&(t=!0,e=e||(g.e instanceof _?T(g.e.errors):[g.e])),h(o))for(s=-1,a=o.length;++s<a;){var u=o[s];if(y(u)&&b(u.unsubscribe).call(u)===g){t=!0,e=e||[];var c=g.e;c instanceof _?e=e.concat(T(c.errors)):e.push(c)}}if(t)throw new _(e)}},e.prototype.add=function(t){if(!t||t===e.EMPTY)return e.EMPTY;if(t===this)return this;var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.prototype._addParent=function(e){var t=this._parent,n=this._parents;t&&t!==e?n?-1===n.indexOf(e)&&n.push(e):this._parents=[e]:this._parent=e},e.EMPTY=((t=new e).closed=!0,t),e}();function T(e){return e.reduce(function(e,t){return e.concat(t instanceof _?t.errors:t)},[])}var x="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber",S=function(e){function t(t,n,r){var i,o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=d;break;case 1:if(!t){o.destination=d;break}if("object"==typeof t){if((i=t)instanceof S||"syncErrorThrowable"in i&&i[x]){var s=t[x]();o.syncErrorThrowable=s.syncErrorThrowable,o.destination=s,s.add(o)}else o.syncErrorThrowable=!0,o.destination=new I(o,t);break}default:o.syncErrorThrowable=!0,o.destination=new I(o,t,n,r)}return o}return i(t,e),t.prototype[x]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parent,t=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this},t}(w),I=function(e){function t(t,n,r,i){var o,s=e.call(this)||this;s._parentSubscriber=t;var a=s;return l(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==d&&(l((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=o,s._error=r,s._complete=i,s}return i(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;f.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=f.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):p(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;p(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};f.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),f.useDeprecatedSynchronousErrorHandling)throw e;p(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!f.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return f.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(p(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(S),D="function"==typeof Symbol&&Symbol.observable||"@@observable";function C(){}function k(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return E(e)}function E(e){return e?1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}:C}var M=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=function(e,t,n){if(e){if(e instanceof S)return e;if(e[x])return e[x]()}return e||t||n?new S(e,t,n):new S(d)}(e,t,n);if(r?r.call(i,this.source):i.add(this.source||!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),f.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){f.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=A(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(e){r(e),i&&i.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[D]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:E(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=A(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function A(e){if(e||(e=f.Promise||Promise),!e)throw new Error("no Promise impl found");return e}function P(e){return e&&"function"==typeof e.schedule}var V=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(S),N=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.closed||t.complete()}},O=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,p),t}},R=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),L=function(e){return function(t){for(var n=e[R]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}},F=function(e){return function(t){var n=e[D]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}},B=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function q(e){return e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var j=function(e){if(e instanceof M)return function(t){return e._isScalar?(t.next(e.value),void t.complete()):e.subscribe(t)};if(B(e))return N(e);if(q(e))return O(e);if(e&&"function"==typeof e[R])return L(e);if(e&&"function"==typeof e[D])return F(e);var t=y(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function $(e,t,n,r){var i=new V(e,n,r);return j(t)(i)}var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(S);function H(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new z(e,t))}}var z=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new G(e,this.project,this.thisArg))},e}(),G=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(S);function W(e,t){return new M(t?function(n){var r=new w,i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:N(e))}function Z(e,t){if(!t)return e instanceof M?e:new M(j(e));if(null!=e){if(function(e){return e&&"function"==typeof e[D]}(e))return function(e,t){return new M(t?function(n){var r=new w;return r.add(t.schedule(function(){var i=e[D]();r.add(i.subscribe({next:function(e){r.add(t.schedule(function(){return n.next(e)}))},error:function(e){r.add(t.schedule(function(){return n.error(e)}))},complete:function(){r.add(t.schedule(function(){return n.complete()}))}}))})),r}:F(e))}(e,t);if(q(e))return function(e,t){return new M(t?function(n){var r=new w;return r.add(t.schedule(function(){return e.then(function(e){r.add(t.schedule(function(){n.next(e),r.add(t.schedule(function(){return n.complete()}))}))},function(e){r.add(t.schedule(function(){return n.error(e)}))})})),r}:O(e))}(e,t);if(B(e))return W(e,t);if(function(e){return e&&"function"==typeof e[R]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new M(t?function(n){var r,i=new w;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(function(){r=e[R](),i.add(t.schedule(function(){if(!n.closed){var e,t;try{var i=r.next();e=i.value,t=i.done}catch(e){return void n.error(e)}t?n.complete():(n.next(e),this.schedule())}}))})),i}:L(e))}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}function K(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(K(function(n,r){return Z(e(n,r)).pipe(H(function(e,i){return t(n,e,r,i)}))},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new J(e,n))})}var J=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new X(e,this.project,this.concurrent))},e}(),X=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){this.add($(this,e,t,n))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(U);function Y(e){return e}function Q(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),K(Y,e)}var ee=function(e){function t(){var n=e.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,t.prototype),n}return i(t,e),t}(Error),te=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return i(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(w),ne=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return i(t,e),t}(S),re=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype[x]=function(){return new ne(this)},t.prototype.lift=function(e){var t=new ie(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new ee;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new ee;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new ee;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new ee;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new ee;return this.hasError?(e.error(this.thrownError),w.EMPTY):this.isStopped?(e.complete(),w.EMPTY):(this.observers.push(e),new te(this,e))},t.prototype.asObservable=function(){var e=new M;return e.source=this,e},t.create=function(e,t){return new ie(e,t)},t}(M),ie=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return i(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):w.EMPTY},t}(re);function oe(){return function(e){return e.lift(new se(e))}}var se=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new ae(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),ae=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(S),ue=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new w).add(this.source.subscribe(new ce(this.getSubject(),this))),e.closed?(this._connection=null,e=w.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return oe()(this)},t}(M).prototype,le={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:ue._subscribe},_isComplete:{value:ue._isComplete,writable:!0},getSubject:{value:ue.getSubject},connect:{value:ue.connect},refCount:{value:ue.refCount}},ce=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(ne);function fe(){return new re}function pe(e){return{providedIn:e.providedIn||null,factory:e.factory,value:void 0}}var de=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==t?pe({providedIn:t.providedIn||"root",factory:t.factory}):void 0}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),he="__parameters__";function ye(e,t,n){var r=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e){var r=e.apply(void 0,u(t));for(var i in r)this[i]=r[i]}}}(t);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this instanceof i)return r.apply(this,e),this;var n,o=new((n=i).bind.apply(n,u([void 0],e)));return s.annotation=o,s;function s(e,t,n){for(var r=e.hasOwnProperty(he)?e[he]:Object.defineProperty(e,he,{value:[]})[he];r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),e}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i}var me=new de("AnalyzeForEntryComponents"),ge=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(ge||(ge={})),ve=function(e){return e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.Errored=4]="Errored",e[e.Destroyed=5]="Destroyed",e}(ve||(ve={}));Function;var be="undefined"!=typeof window&&window,_e="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,we="undefined"!=typeof global&&global,Te=be||we||_e,xe=Promise.resolve(0),Se=null;function Ie(){if(!Se){var e=Te.Symbol;if(e&&e.iterator)Se=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(Se=r)}}return Se}function De(e){"undefined"==typeof Zone?xe.then(function(){e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function Ce(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function ke(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(ke).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Ee(e){return e.__forward_ref__=Ee,e.toString=function(){return ke(this())},e}function Me(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===Ee?e():e}var Ae=ye("Inject",function(e){return{token:e}}),Pe=ye("Optional"),Ve=ye("Self"),Ne=ye("SkipSelf"),Oe="__source",Re=new Object,Le=new de("INJECTOR"),Fe=function(){function e(){}return e.prototype.get=function(e,t){if(void 0===t&&(t=Re),t===Re)throw new Error("NullInjectorError: No provider for "+ke(e)+"!");return t},e}(),Be=function(){function e(){}return e.create=function(e,t){return Array.isArray(e)?new Ke(e,t):new Ke(e.providers,e.parent,e.name||null)},e.THROW_IF_NOT_FOUND=Re,e.NULL=new Fe,e.ngInjectableDef=pe({providedIn:"any",factory:function(){return function(e,t){if(void 0===t&&(t=0),void 0===Qe)throw new Error("inject() must be called from an injection context");if(null===Qe){var n=e.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;throw new Error("Injector: NOT_FOUND ["+ke(e)+"]")}return Qe.get(e,8&t?null:void 0,t)}(Le)}}),e}(),qe=function(e){return e},je=[],$e=qe,Ue=function(){return Array.prototype.slice.call(arguments)},He={},ze=function(e){for(var t in e)if(e[t]===He)return t;throw Error("!prop")}({provide:String,useValue:He}),Ge=Be.NULL,We=/\n/gm,Ze="\u0275",Ke=function(){function e(e,t,n){void 0===t&&(t=Ge),void 0===n&&(n=null),this.parent=t,this.source=n;var r=this._records=new Map;r.set(Be,{token:Be,fn:qe,deps:je,value:this,useNew:!1}),r.set(Le,{token:Le,fn:qe,deps:je,value:this,useNew:!1}),function e(t,n){if(n)if((n=Me(n))instanceof Array)for(var r=0;r<n.length;r++)e(t,n[r]);else{if("function"==typeof n)throw Ye("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw Ye("Unexpected provider",n);var i=Me(n.provide),o=function(e){var t=function(e){var t=je,n=e.deps;if(n&&n.length){t=[];for(var r=0;r<n.length;r++){var i=6;if((u=Me(n[r]))instanceof Array)for(var o=0,s=u;o<s.length;o++){var a=s[o];a instanceof Pe||a==Pe?i|=1:a instanceof Ne||a==Ne?i&=-3:a instanceof Ve||a==Ve?i&=-5:u=a instanceof Ae?a.token:Me(a)}t.push({token:u,options:i})}}else if(e.useExisting){var u;t=[{token:u=Me(e.useExisting),options:6}]}else if(!(n||ze in e))throw Ye("'deps' required",e);return t}(e),n=qe,r=je,i=!1,o=Me(e.provide);if(ze in e)r=e.useValue;else if(e.useFactory)n=e.useFactory;else if(e.useExisting);else if(e.useClass)i=!0,n=Me(e.useClass);else{if("function"!=typeof o)throw Ye("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",e);i=!0,n=o}return{deps:t,fn:n,useNew:i,value:r}}(n);if(!0===n.multi){var s=t.get(i);if(s){if(s.fn!==Ue)throw Je(i)}else t.set(i,s={token:n.provide,deps:[],useNew:!1,fn:Ue,value:je});s.deps.push({token:i=n,options:6})}var a=t.get(i);if(a&&a.fn==Ue)throw Je(i);t.set(i,o)}}(r,e)}return e.prototype.get=function(e,t,n){void 0===n&&(n=0);var r=this._records.get(e);try{return function e(t,n,r,i,o,s){try{return function(t,n,r,i,o,s){var a,l;if(!n||4&s)2&s||(a=i.get(t,o,0));else{if((a=n.value)==$e)throw Error(Ze+"Circular dependency");if(a===je){n.value=$e;var c=n.useNew,f=n.fn,p=n.deps,d=je;if(p.length){d=[];for(var h=0;h<p.length;h++){var y=p[h],m=y.options,g=2&m?r.get(y.token):void 0;d.push(e(y.token,g,r,g||4&m?i:Ge,1&m?null:Be.THROW_IF_NOT_FOUND,0))}}n.value=a=c?new((l=f).bind.apply(l,u([void 0],d))):f.apply(void 0,d)}}return a}(t,n,r,i,o,s)}catch(e){throw e instanceof Error||(e=new Error(e)),(e.ngTempTokenPath=e.ngTempTokenPath||[]).unshift(t),n&&n.value==$e&&(n.value=je),e}}(e,r,this._records,this.parent,t,n)}catch(t){var i=t.ngTempTokenPath;throw e[Oe]&&i.unshift(e[Oe]),t.message=Xe("\n"+t.message,i,this.source),t.ngTokenPath=i,t.ngTempTokenPath=null,t}},e.prototype.toString=function(){var e=[];return this._records.forEach(function(t,n){return e.push(ke(n))}),"StaticInjector["+e.join(", ")+"]"},e}();function Je(e){return Ye("Cannot mix multi providers and regular providers",e)}function Xe(e,t,n){void 0===n&&(n=null),e=e&&"\n"===e.charAt(0)&&e.charAt(1)==Ze?e.substr(2):e;var r=ke(t);if(t instanceof Array)r=t.map(ke).join(" -> ");else if("object"==typeof t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):ke(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+e.replace(We,"\n  ")}function Ye(e,t){return new Error(Xe(e,t))}var Qe=void 0;function et(e){var t=Qe;return Qe=e,t}String;var tt=function(e){return e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e}(tt||(tt={})),nt=new function(e){this.full="6.0.1",this.major="6.0.1".split(".")[0],this.minor="6.0.1".split(".")[1],this.patch="6.0.1".split(".").slice(2).join(".")}("6.0.1"),rt="ngDebugContext",it="ngOriginalError",ot="ngErrorLogger";function st(e){return e[rt]}function at(e){return e[it]}function ut(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e.error.apply(e,u(t))}var lt=function(){function e(){this._console=console}return e.prototype.handleError=function(e){var t=this._findOriginalError(e),n=this._findContext(e),r=function(e){return e[ot]||ut}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),n&&r(this._console,"ERROR CONTEXT",n)},e.prototype._findContext=function(e){return e?st(e)?st(e):this._findContext(at(e)):null},e.prototype._findOriginalError=function(e){for(var t=at(e);t&&at(t);)t=at(t);return t},e}(),ct=new de("The presence of this token marks an injector as being the root injector.");function ft(e){return!!e&&"function"==typeof e.then}function pt(e){return!!e&&"function"==typeof e.subscribe}var dt=new de("Application Initializer"),ht=function(){function e(e){var t=this;this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return e.prototype.runInitializers=function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();ft(i)&&t.push(i)}Promise.all(t).then(function(){n()}).catch(function(t){e.reject(t)}),0===t.length&&n(),this.initialized=!0}},e}(),yt=new de("AppId");function mt(){return""+gt()+gt()+gt()}function gt(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var vt=new de("Platform Initializer"),bt=new de("Platform ID"),_t=new de("appBootstrapListener"),wt=function(){function e(){}return e.prototype.log=function(e){console.log(e)},e.prototype.warn=function(e){console.warn(e)},e.ctorParameters=function(){return[]},e}();function Tt(){throw new Error("Runtime compiler is not loaded")}var xt=function(){function e(){}return e.prototype.compileModuleSync=function(e){throw Tt()},e.prototype.compileModuleAsync=function(e){throw Tt()},e.prototype.compileModuleAndAllComponentsSync=function(e){throw Tt()},e.prototype.compileModuleAndAllComponentsAsync=function(e){throw Tt()},e.prototype.clearCache=function(){},e.prototype.clearCacheFor=function(e){},e}(),St=function(){},It=function(){};function Dt(e){var t=Error("No component factory found for "+ke(e)+". Did you add it to @NgModule.entryComponents?");return t[Et]=e,t}var Ct,kt,Et="ngComponent",Mt=function(){function e(){}return e.prototype.resolveComponentFactory=function(e){throw Dt(e)},e}(),At=function(){function e(){}return e.NULL=new Mt,e}(),Pt=function(){function e(e,t,n){this._parent=t,this._ngModule=n,this._factories=new Map;for(var r=0;r<e.length;r++){var i=e[r];this._factories.set(i.componentType,i)}}return e.prototype.resolveComponentFactory=function(e){var t=this._factories.get(e);if(!t&&this._parent&&(t=this._parent.resolveComponentFactory(e)),!t)throw Dt(e);return new Vt(t,this._ngModule)},e}(),Vt=function(e){function t(t,n){var r=e.call(this)||this;return r.factory=t,r.ngModule=n,r.selector=t.selector,r.componentType=t.componentType,r.ngContentSelectors=t.ngContentSelectors,r.inputs=t.inputs,r.outputs=t.outputs,r}return i(t,e),t.prototype.create=function(e,t,n,r){return this.factory.create(e,t,n,r||this.ngModule)},t}(It),Nt=function(){},Ot=function(){},Rt=function(){var e=Te.wtf;return!(!e||!(Ct=e.trace)||(kt=Ct.events,0))}();function Lt(e,t){return null}var Ft=Rt?function(e,t){return void 0===t&&(t=null),kt.createScope(e,t)}:function(e,t){return Lt},Bt=Rt?function(e,t){return Ct.leaveScope(e,t),t}:function(e,t){return t},qt=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;return n.__isAsync=t,n}return i(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,r){var i,o=function(e){return null},s=function(){return null};t&&"object"==typeof t?(i=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(o=this.__isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var a=e.prototype.subscribe.call(this,i,o,s);return t instanceof w&&t.add(a),a},t}(re),jt=function(){function e(e){var t,n=e.enableLongStackTrace,r=void 0!==n&&n;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new qt(!1),this.onMicrotaskEmpty=new qt(!1),this.onStable=new qt(!1),this.onError=new qt(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(t=this)._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(e,n,r,i,o,s){try{return zt(t),e.invokeTask(r,i,o,s)}finally{Gt(t)}},onInvoke:function(e,n,r,i,o,s,a){try{return zt(t),e.invoke(r,i,o,s,a)}finally{Gt(t)}},onHasTask:function(e,n,r,i){e.hasTask(r,i),n===r&&("microTask"==i.change?(t.hasPendingMicrotasks=i.microTask,Ht(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:function(e,n,r,i){return e.handleError(r,i),t.runOutsideAngular(function(){return t.onError.emit(i)}),!1}})}return e.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},e.assertInAngularZone=function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},e.assertNotInAngularZone=function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},e.prototype.run=function(e,t,n){return this._inner.run(e,t,n)},e.prototype.runTask=function(e,t,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,e,Ut,$t,$t);try{return i.runTask(o,t,n)}finally{i.cancelTask(o)}},e.prototype.runGuarded=function(e,t,n){return this._inner.runGuarded(e,t,n)},e.prototype.runOutsideAngular=function(e){return this._outer.run(e)},e}();function $t(){}var Ut={};function Ht(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(function(){return e.onStable.emit(null)})}finally{e.isStable=!0}}}function zt(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Gt(e){e._nesting--,Ht(e)}var Wt,Zt=function(){function e(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new qt,this.onMicrotaskEmpty=new qt,this.onStable=new qt,this.onError=new qt}return e.prototype.run=function(e){return e()},e.prototype.runGuarded=function(e){return e()},e.prototype.runOutsideAngular=function(e){return e()},e.prototype.runTask=function(e){return e()},e}(),Kt=function(){function e(e){var t=this;this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents(),e.run(function(){t.taskTrackingZone=Zone.current.get("TaskTrackingZone")})}return e.prototype._watchAngularEvents=function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.subscribe({next:function(){jt.assertNotInAngularZone(),De(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})}})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks},e.prototype._runCallbacksIfReady=function(){var e=this;if(this.isStable())De(function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1});else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)}),this._didWork=!0}},e.prototype.getPendingTasks=function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(e){return{source:e.source,isPeriodic:e.data.isPeriodic,delay:e.data.delay,creationLocation:e.creationLocation,xhr:e.data.target}}):[]},e.prototype.addCallback=function(e,t,n){var r=this,i=-1;t&&t>0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},e}(),Jt=function(){function e(){this._applications=new Map,Xt.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),Xt.findTestabilityInTree(this,e,t)},e.ctorParameters=function(){return[]},e}(),Xt=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}()),Yt=!0,Qt=!1,en=new de("AllowMultipleToken");function tn(){return Qt=!0,Yt}var nn=function(e,t){this.name=e,this.token=t};function rn(e,t,n){void 0===n&&(n=[]);var r="Platform: "+t,i=new de(r);return function(t){void 0===t&&(t=[]);var o=on();if(!o||o.injector.get(en,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var s=n.concat(t).concat({provide:i,useValue:!0});!function(e){if(Wt&&!Wt.destroyed&&!Wt.injector.get(en,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Wt=e.get(sn);var t=e.get(vt,null);t&&t.forEach(function(e){return e()})}(Be.create({providers:s,name:r}))}return function(e){var t=on();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function on(){return Wt&&!Wt.destroyed?Wt:null}var sn=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n,r=this,i="noop"===(n=t?t.ngZone:void 0)?new Zt:("zone.js"===n?void 0:n)||new jt({enableLongStackTrace:tn()}),o=[{provide:jt,useValue:i}];return i.run(function(){var t=Be.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),s=n.injector.get(lt,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return ln(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(e){s.handleError(e)}})}),function(e,t,i){try{var o=((s=n.injector.get(ht)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return ft(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}var s}(s,i)})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.injector.get(St),i=an({},t);return r.createCompiler([i]).compileModuleAsync(e).then(function(e){return n.bootstrapModuleFactory(e,i)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(un);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+ke(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function an(e,t){return Array.isArray(t)?t.reduce(an,e):o({},e,t)}var un=function(){function e(e,t,n,r,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=tn(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new M(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),u=new M(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){jt.assertNotInAngularZone(),De(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){jt.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,r=null,i=e[e.length-1];return P(i)?(r=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof i&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof M?e[0]:Q(n)(W(e,r))}(a,u.pipe(function(e){return oe()((t=fe,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,le);return r.source=e,r.subjectFactory=n,r})(e));var t}))}return e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof It?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n instanceof Vt?null:this._injector.get(Nt),o=n.create(Be.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(Kt,null);return s&&o.injector.get(Jt).registerApplication(o.location.nativeElement,s),this._loadComponent(o),tn()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},e.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,Bt(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;ln(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(_t,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),ln(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Ft("ApplicationRef#tick()"),e}();function ln(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var cn=function(){},fn=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(fn||(fn={})),pn=function(){},dn=function(e){this.nativeElement=e},hn=function(){},yn=function(){function e(){this.dirty=!0,this._results=[],this.changes=new qt,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[Ie()]=function(){return this._results[Ie()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),mn=function(){},gn={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},vn=function(){function e(e,t){this._compiler=e,this._config=t||gn}return e.prototype.load=function(e){return this._compiler instanceof xt?this.loadFactory(e):this.loadAndCompile(e)},e.prototype.loadAndCompile=function(e){var t=this,r=a(e.split("#"),2),i=r[0],o=r[1];return void 0===o&&(o="default"),n("crnd")(i).then(function(e){return e[o]}).then(function(e){return bn(e,i,o)}).then(function(e){return t._compiler.compileModuleAsync(e)})},e.prototype.loadFactory=function(e){var t=a(e.split("#"),2),r=t[0],i=t[1],o="NgFactory";return void 0===i&&(i="default",o=""),n("crnd")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(e){return e[i+o]}).then(function(e){return bn(e,r,i)})},e}();function bn(e,t,n){if(!e)throw new Error("Cannot find '"+n+"' in '"+t+"'");return e}var _n=function(){},wn=function(){},Tn=function(){},xn=function(){function e(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof Sn?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),Sn=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=t,i}return i(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,r=this,i=this.childNodes.indexOf(e);-1!==i&&((n=this.childNodes).splice.apply(n,u([i+1,0],t)),t.forEach(function(e){e.parent&&e.parent.removeChild(e),e.parent=r}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return function e(t,n,r){t.childNodes.forEach(function(t){t instanceof Sn&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return function e(t,n,r){t instanceof Sn&&t.childNodes.forEach(function(t){n(t)&&r.push(t),t instanceof Sn&&e(t,n,r)})}(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(xn),In=new Map;function Dn(e){return In.get(e)||null}function Cn(e){In.set(e.nativeNode,e)}function kn(e,t){var n=An(e),r=An(t);return n&&r?function(e,t,n){for(var r=e[Ie()](),i=t[Ie()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(e,t,kn):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||Ce(e,t)}var En=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e.unwrap=function(t){return e.isWrapped(t)?t.wrapped:t},e.isWrapped=function(t){return t instanceof e},e}(),Mn=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}();function An(e){return!!Pn(e)&&(Array.isArray(e)||!(e instanceof Map)&&Ie()in e)}function Pn(e){return null!==e&&("function"==typeof e||"object"==typeof e)}var Vn=function(){function e(){}return e.prototype.supports=function(e){return An(e)},e.prototype.create=function(e){return new On(e)},e}(),Nn=function(e,t){return t},On=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Nn}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex<Bn(n,r,i)?t:n,s=Bn(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,l=a-r;if(u!=l){for(var c=0;c<u;c++){var f=c<i.length?i[c]:i[c]=0,p=f+c;l<=p&&p<u&&(i[c]=f+1)}i[o.previousIndex]=l-u}}s!==a&&e(o,s,a)}},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},e.prototype.diff=function(e){if(null==e&&(e=[]),!An(e))throw new Error("Error trying to diff '"+ke(e)+"'. Only arrays and iterables are allowed");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=e[a]),null!==o&&Ce(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),Ce(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r=e[Ie()](),i=void 0;!(i=r.next()).done;)t(i.value)}(e,function(e){i=t._trackByFn(n,e),null!==o&&Ce(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,n)),Ce(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e=void 0,t=void 0;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Ce(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Ce(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new Rn(t,n),i,r),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._moveAfter=function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._addAfter=function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new Fn),this._linkedRecords.put(e),e.currentIndex=n,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Fn),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e},e}(),Rn=function(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},Ln=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Ce(n.trackById,e))return n;return null},e.prototype.remove=function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head},e}(),Fn=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=e.trackById,n=this.map.get(t);n||(n=new Ln,this.map.set(t,n)),n.add(e)},e.prototype.get=function(e,t){var n=this.map.get(e);return n?n.get(e,t):null},e.prototype.remove=function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e}();function Bn(e,t,n){var r=e.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+t+i}var qn=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||Pn(e)},e.prototype.create=function(){return new jn},e}(),jn=function(){function e(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(e){if(!(e instanceof Map||Pn(e)))throw new Error("Error trying to diff '"+ke(e)+"'. Only maps and objects are allowed")}else e=new Map;return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,function(e,r){if(n&&n.key===r)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var i=t._getOrCreateRecordForKey(r,e);n=t._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},e.prototype._insertBeforeOrAppend=function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null},e.prototype._getOrCreateRecordForKey=function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new $n(e);return this._records.set(e,o),o.currentValue=t,this._addToAdditions(o),o},e.prototype._reset=function(){if(this.isDirty){var e=void 0;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},e.prototype._maybeAddToChanges=function(e,t){Ce(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(function(n){return t(e[n],n)})},e}(),$n=function(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},Un=function(){function e(e){this.factories=e}return e.create=function(t,n){if(null!=n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new Ne,new Pe]]}},e.prototype.find=function(e){var t,n=this.factories.find(function(t){return t.supports(e)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+((t=e).name||typeof t)+"'")},e.ngInjectableDef=pe({providedIn:"root",factory:function(){return new e([new Vn])}}),e}(),Hn=function(){function e(e){this.factories=e}return e.create=function(t,n){if(n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new Ne,new Pe]]}},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(t)return t;throw new Error("Cannot find a differ supporting object '"+e+"'")},e}(),zn=[new qn],Gn=new Un([new Vn]),Wn=new Hn(zn),Zn=rn(null,"core",[{provide:bt,useValue:"unknown"},{provide:sn,deps:[Be]},{provide:Jt,deps:[]},{provide:wt,deps:[]}]),Kn=new de("LocaleId"),Jn=function(e){return e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore",e}(Jn||(Jn={}));function Xn(){return Gn}function Yn(){return Wn}function Qn(e){return e||"en-US"}var er=function(e){},tr=function(){function e(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),this.inertBodyElement=this.inertDocument.body,null==this.inertBodyElement){var t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),this.inertBodyElement=this.inertDocument.createElement("body"),t.appendChild(this.inertBodyElement)}this.inertBodyElement.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return e.prototype.getInertBodyElement_XHR=function(e){e="<body><remove></remove>"+e+"</body>";try{e=encodeURI(e)}catch(e){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(null);var n=t.response.body;return n.removeChild(n.firstChild),n},e.prototype.getInertBodyElement_DOMParser=function(e){e="<body><remove></remove>"+e+"</body>";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(e){return null}},e.prototype.getInertBodyElement_InertDocument=function(e){var t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},e.prototype.stripCustomNsAttrs=function(e){for(var t=e.attributes,n=t.length-1;0<n;n--){var r=t.item(n).name;"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||e.removeAttribute(r)}for(var i=e.firstChild;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling},e}(),nr=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,rr=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ir(e){return(e=String(e)).match(nr)||e.match(rr)?e:(tn()&&console.warn("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}function or(e){var t,n,r={};try{for(var i=s(e.split(",")),o=i.next();!o.done;o=i.next())r[o.value]=!0}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function sr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,i={};try{for(var o=s(e),a=o.next();!a.done;a=o.next()){var u=a.value;for(var l in u)u.hasOwnProperty(l)&&(i[l]=!0)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}var ar,ur=or("area,br,col,hr,img,wbr"),lr=or("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),cr=or("rp,rt"),fr=sr(cr,lr),pr=sr(ur,sr(lr,or("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),sr(cr,or("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),fr),dr=or("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hr=or("srcset"),yr=sr(dr,hr,or("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width")),mr=function(){function e(){this.sanitizedSomething=!1,this.buf=[]}return e.prototype.sanitizeChildren=function(e){for(var t=e.firstChild;t;)if(t.nodeType===Node.ELEMENT_NODE?this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);var n=this.checkClobberedElement(t,t.nextSibling);if(n){t=n;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")},e.prototype.startElement=function(e){var t=e.nodeName.toLowerCase();if(pr.hasOwnProperty(t)){this.buf.push("<"),this.buf.push(t);for(var n,r=e.attributes,i=0;i<r.length;i++){var o=r.item(i),s=o.name,a=s.toLowerCase();if(yr.hasOwnProperty(a)){var u=o.value;dr[a]&&(u=ir(u)),hr[a]&&(n=u,u=(n=String(n)).split(",").map(function(e){return ir(e.trim())}).join(", ")),this.buf.push(" ",s,'="',br(u),'"')}else this.sanitizedSomething=!0}this.buf.push(">")}else this.sanitizedSomething=!0},e.prototype.endElement=function(e){var t=e.nodeName.toLowerCase();pr.hasOwnProperty(t)&&!ur.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))},e.prototype.chars=function(e){this.buf.push(br(e))},e.prototype.checkClobberedElement=function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t},e}(),gr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vr=/([^\#-~ |!])/g;function br(e){return e.replace(/&/g,"&amp;").replace(gr,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vr,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _r(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var wr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),Tr=/^url\(([^)]+)\)$/,xr=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(xr||(xr={})),Sr=function(){};function Ir(e,t,n){var r=e.state,i=1792&r;return i===t?(e.state=-1793&r|n,e.initIndex=-1,!0):i===n}function Dr(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function Cr(e,t){return e.nodes[t]}function kr(e,t){return e.nodes[t]}function Er(e,t){return e.nodes[t]}function Mr(e,t){return e.nodes[t]}function Ar(e,t){return e.nodes[t]}var Pr={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function Vr(e,t,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(e,t){var n=new Error(e);return Nr(n,t),n}(i,e)}function Nr(e,t){e[rt]=t,e[ot]=t.logError.bind(t)}function Or(e){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+e)}var Rr=function(){},Lr=new Map;function Fr(e){var t=Lr.get(e);return t||(t=ke(e)+"_"+Lr.size,Lr.set(e,t)),t}function Br(e,t,n,r){if(En.isWrapped(r)){r=En.unwrap(r);var i=e.def.nodes[t].bindingIndex+n,o=En.unwrap(e.oldValues[i]);e.oldValues[i]=new En(o)}return r}var qr="$$undefined",jr="$$empty";function $r(e){return{id:qr,styles:e.styles,encapsulation:e.encapsulation,data:e.data}}var Ur=0;function Hr(e,t,n,r){return!(!(2&e.state)&&Ce(e.oldValues[t.bindingIndex+n],r))}function zr(e,t,n,r){return!!Hr(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function Gr(e,t,n,r){var i=e.oldValues[t.bindingIndex+n];if(1&e.state||!kn(i,r)){var o=t.bindings[n].name;throw Vr(Pr.createDebugContext(e,t.nodeIndex),o+": "+i,o+": "+r,0!=(1&e.state))}}function Wr(e){for(var t=e;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function Zr(e,t){for(var n=e;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function Kr(e,t,n,r){try{return Wr(33554432&e.def.nodes[t].flags?kr(e,t).componentView:e),Pr.handleEvent(e,t,n,r)}catch(t){e.root.errorHandler.handleError(t)}}function Jr(e){return e.parent?kr(e.parent,e.parentNodeDef.nodeIndex):null}function Xr(e){return e.parent?e.parentNodeDef.parent:null}function Yr(e,t){switch(201347067&t.flags){case 1:return kr(e,t.nodeIndex).renderElement;case 2:return Cr(e,t.nodeIndex).renderText}}function Qr(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function ei(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function ti(e){var t={},n=0,r={};return e&&e.forEach(function(e){var i=a(e,2),o=i[0],s=i[1];"number"==typeof o?(t[o]=s,n|=function(e){return 1<<e%32}(o)):r[o]=s}),{matchedQueries:t,references:r,matchedQueryIds:n}}function ni(e,t){return e.map(function(e){var n,r,i;return Array.isArray(e)?(r=(i=a(e,2))[0],n=i[1]):(r=0,n=e),n&&("function"==typeof n||"object"==typeof n)&&t&&Object.defineProperty(n,Oe,{value:t,configurable:!0}),{flags:r,token:n,tokenKey:Fr(n)}})}function ri(e,t,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===tt.Native?kr(e,n.renderParent.nodeIndex).renderElement:void 0:t}var ii=new WeakMap;function oi(e){var t=ii.get(e);return t||((t=e(function(){return Rr})).factory=e,ii.set(e,t)),t}function si(e,t,n,r,i){3===t&&(n=e.renderer.parentNode(Yr(e,e.def.lastRenderRootNode))),ai(e,t,0,e.def.nodes.length-1,n,r,i)}function ai(e,t,n,r,i,o,s){for(var a=n;a<=r;a++){var u=e.def.nodes[a];11&u.flags&&li(e,u,t,i,o,s),a+=u.childCount}}function ui(e,t,n,r,i,o){for(var s=e;s&&!Qr(s);)s=s.parent;for(var a=s.parent,u=Xr(s),l=u.nodeIndex+u.childCount,c=u.nodeIndex+1;c<=l;c++){var f=a.def.nodes[c];f.ngContentIndex===t&&li(a,f,n,r,i,o),c+=f.childCount}if(!a.parent){var p=e.root.projectableNodes[t];if(p)for(c=0;c<p.length;c++)ci(e,p[c],n,r,i,o)}}function li(e,t,n,r,i,o){if(8&t.flags)ui(e,t.ngContent.index,n,r,i,o);else{var s=Yr(e,t);if(3===n&&33554432&t.flags&&48&t.bindingFlags?(16&t.bindingFlags&&ci(e,s,n,r,i,o),32&t.bindingFlags&&ci(kr(e,t.nodeIndex).componentView,s,n,r,i,o)):ci(e,s,n,r,i,o),16777216&t.flags)for(var a=kr(e,t.nodeIndex).viewContainer._embeddedViews,u=0;u<a.length;u++)si(a[u],n,r,i,o);1&t.flags&&!t.element.name&&ai(e,n,t.nodeIndex+1,t.nodeIndex+t.childCount,r,i,o)}}function ci(e,t,n,r,i,o){var s=e.renderer;switch(n){case 1:s.appendChild(r,t);break;case 2:s.insertBefore(r,t,i);break;case 3:s.removeChild(r,t);break;case 0:o.push(t)}}var fi=/^:([^:]+):(.+)$/;function pi(e){if(":"===e[0]){var t=e.match(fi);return[t[1],t[2]]}return["",e]}function di(e){for(var t=0,n=0;n<e.length;n++)t|=e[n].flags;return t}function hi(e,t,n,r,i,o){e|=1;var s=ti(t);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:e,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:s.matchedQueries,matchedQueryIds:s.matchedQueryIds,references:s.references,ngContentIndex:n,childCount:r,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?oi(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:i||Rr},provider:null,text:null,query:null,ngContent:null}}function yi(e,t,n,r,i,o,s,u,l,c,f,p){void 0===s&&(s=[]),c||(c=Rr);var d=ti(n),h=d.matchedQueries,y=d.references,m=d.matchedQueryIds,g=null,v=null;o&&(g=(A=a(pi(o),2))[0],v=A[1]),u=u||[];for(var b=new Array(u.length),_=0;_<u.length;_++){var w=a(u[_],3),T=w[0],x=w[2],S=a(pi(w[1]),2),I=S[0],D=S[1],C=void 0,k=void 0;switch(15&T){case 4:k=x;break;case 1:case 8:C=x}b[_]={flags:T,ns:I,name:D,nonMinifiedName:D,securityContext:C,suffix:k}}l=l||[];var E=new Array(l.length);for(_=0;_<l.length;_++){var M=a(l[_],2);E[_]={type:0,target:M[0],eventName:M[1],propName:null}}var A,P=(s=s||[]).map(function(e){var t=a(e,2),n=t[1],r=a(pi(t[0]),2);return[r[0],r[1],n]});return p=function(e){if(e&&e.id===qr){var t=null!=e.encapsulation&&e.encapsulation!==tt.None||e.styles.length||Object.keys(e.data).length;e.id=t?"c"+Ur++:jr}return e&&e.id===jr&&(e=null),e||null}(p),f&&(t|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:h,matchedQueryIds:m,references:y,ngContentIndex:r,childCount:i,bindings:b,bindingFlags:di(b),outputs:E,element:{ns:g,name:v,attrs:P,template:null,componentProvider:null,componentView:f||null,componentRendererType:p,publicProviders:null,allProviders:null,handleEvent:c||Rr},provider:null,text:null,query:null,ngContent:null}}function mi(e,t,n){var r,i=n.element,o=e.root.selectorOrNode,s=e.renderer;if(e.parent||!o){r=i.name?s.createElement(i.name,i.ns):s.createComment("");var u=ri(e,t,n);u&&s.appendChild(u,r)}else r=s.selectRootElement(o);if(i.attrs)for(var l=0;l<i.attrs.length;l++){var c=a(i.attrs[l],3);s.setAttribute(r,c[1],c[2],c[0])}return r}function gi(e,t,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],s=vi(e,n.nodeIndex,(f=o.eventName,(c=o.target)?c+":"+f:f)),a=o.target,u=e;"component"===o.target&&(a=null,u=t);var l=u.renderer.listen(a||r,o.eventName,s);e.disposables[n.outputIndex+i]=l}var c,f}function vi(e,t,n){return function(r){return Kr(e,t,n,r)}}function bi(e,t,n,r){if(!zr(e,t,n,r))return!1;var i=t.bindings[n],o=kr(e,t.nodeIndex),s=o.renderElement,a=i.name;switch(15&i.flags){case 1:!function(e,t,n,r,i,o){var s=t.securityContext,a=s?e.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var u=e.renderer;null!=o?u.setAttribute(n,i,a,r):u.removeAttribute(n,i,r)}(e,i,s,i.ns,a,r);break;case 2:!function(e,t,n,r){var i=e.renderer;r?i.addClass(t,n):i.removeClass(t,n)}(e,s,a,r);break;case 4:!function(e,t,n,r,i){var o=e.root.sanitizer.sanitize(xr.STYLE,i);if(null!=o){o=o.toString();var s=t.suffix;null!=s&&(o+=s)}else o=null;var a=e.renderer;null!=o?a.setStyle(n,r,o):a.removeStyle(n,r)}(e,i,s,a,r);break;case 8:!function(e,t,n,r,i){var o=t.securityContext,s=o?e.root.sanitizer.sanitize(o,i):i;e.renderer.setProperty(n,r,s)}(33554432&t.flags&&32&i.flags?o.componentView:e,i,s,a,r)}return!0}var _i=new Object,wi=Fr(Be),Ti=Fr(Le),xi=Fr(Nt);function Si(e,t,n,r){return n=Me(n),{index:-1,deps:ni(r,ke(t)),flags:e,token:t,value:n}}function Ii(e,t,n){void 0===n&&(n=Be.THROW_IF_NOT_FOUND);var r,i,o=et(e);try{if(8&t.flags)return t.token;if(2&t.flags&&(n=null),1&t.flags)return e._parent.get(t.token,n);var s=t.tokenKey;switch(s){case wi:case Ti:case xi:return e}var a=e._def.providersByKey[s];if(a){var u=e._providers[a.index];return void 0===u&&(u=e._providers[a.index]=Di(e,a)),u===_i?void 0:u}if(t.token.ngInjectableDef&&(r=e,null!=(i=t.token.ngInjectableDef).providedIn&&(function(e,t){return e._def.modules.indexOf(i.providedIn)>-1}(r)||"root"===i.providedIn&&r._def.isRoot))){var l=e._providers.length;return e._def.providersByKey[t.tokenKey]={flags:5120,value:t.token.ngInjectableDef.factory,deps:[],index:l,token:t.token},e._providers[l]=_i,e._providers[l]=Di(e,e._def.providersByKey[t.tokenKey])}return e._parent.get(t.token,n)}finally{et(o)}}function Di(e,t){var n;switch(201347067&t.flags){case 512:n=function(e,t,n){var r=n.length;switch(r){case 0:return new t;case 1:return new t(Ii(e,n[0]));case 2:return new t(Ii(e,n[0]),Ii(e,n[1]));case 3:return new t(Ii(e,n[0]),Ii(e,n[1]),Ii(e,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=Ii(e,n[o]);return new(t.bind.apply(t,u([void 0],i)))}}(e,t.value,t.deps);break;case 1024:n=function(e,t,n){var r=n.length;switch(r){case 0:return t();case 1:return t(Ii(e,n[0]));case 2:return t(Ii(e,n[0]),Ii(e,n[1]));case 3:return t(Ii(e,n[0]),Ii(e,n[1]),Ii(e,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=Ii(e,n[o]);return t.apply(void 0,u(i))}}(e,t.value,t.deps);break;case 2048:n=Ii(e,t.deps[0]);break;case 256:n=t.value}return n===_i||null==n||"object"!=typeof n||131072&t.flags||"function"!=typeof n.ngOnDestroy||(t.flags|=131072),void 0===n?_i:n}function Ci(e,t){var n=e.viewContainer._embeddedViews;if((null==t||t>=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,Ai(n,t),Pr.dirtyParentQueries(r),Ei(r),r}function ki(e,t,n){var r=t?Yr(t,t.def.lastRenderRootNode):e.renderElement;si(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function Ei(e){si(e,3,null,null,void 0)}function Mi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Ai(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var Pi=new Object;function Vi(e,t,n,r,i,o){return new Ni(e,t,n,r,i,o)}var Ni=function(e){function t(t,n,r,i,o,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return i(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var i=oi(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=Pr.createRootView(e,t||[],n,i,r,Pi),a=Er(s,o).instance;return n&&s.renderer.setAttribute(kr(s,0).renderElement,"ng-version",nt.full),new Oi(s,new Bi(s),a)},t}(It),Oi=function(e){function t(t,n,r){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return i(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new dn(kr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Ui(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(function(){});function Ri(e,t,n){return new Li(e,t,n)}var Li=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new dn(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Ui(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=Xr(e),e=e.parent;return e?new Ui(e,t):new Ui(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=Ci(this._data,e);Pr.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Bi(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,i){var o=n||this.parentInjector;i||e instanceof Vt||(i=o.get(Nt));var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=e;return i=s._view,o=(n=this._data).viewContainer._embeddedViews,null!==(r=t)&&void 0!==r||(r=o.length),i.viewContainerParent=this._view,Mi(o,r,i),function(e,t){var n=Jr(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,t.parentNodeDef)}}(n,i),Pr.dirtyParentQueries(i),ki(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(e._view);return i=t,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],Ai(o,r),null==i&&(i=o.length),Mi(o,i,s),Pr.dirtyParentQueries(s),Ei(s),ki(n,i>0?o[i-1]:null,s),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=Ci(this._data,e);t&&Pr.destroyView(t)},e.prototype.detach=function(e){var t=Ci(this._data,e);return t?new Bi(t):null},e}();function Fi(e){return new Bi(e)}var Bi=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return si(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){Wr(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{Pr.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){Pr.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),Pr.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,Ei(this._view),Pr.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function qi(e,t){return new ji(e,t)}var ji=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return i(t,e),t.prototype.createEmbeddedView=function(e){return new Bi(Pr.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new dn(kr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(_n);function $i(e,t){return new Ui(e,t)}var Ui=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=Be.THROW_IF_NOT_FOUND),Pr.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Fr(e)},t)},e}();function Hi(e,t){var n=e.def.nodes[t];if(1&n.flags){var r=kr(e,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return Cr(e,n.nodeIndex).renderText;if(20240&n.flags)return Er(e,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+t)}function zi(e){return new Gi(e.renderer)}var Gi=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=a(pi(t),2),r=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,r),r},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n<t.length;n++)this.delegate.appendChild(e,t[n])},e.prototype.attachViewAfter=function(e,t){for(var n=this.delegate.parentNode(e),r=this.delegate.nextSibling(e),i=0;i<t.length;i++)this.delegate.insertBefore(n,t[i],r)},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},e.prototype.destroyView=function(e,t){for(var n=0;n<t.length;n++)this.delegate.destroyNode(t[n])},e.prototype.listen=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.listenGlobal=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.setElementProperty=function(e,t,n){this.delegate.setProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var r=a(pi(t),2),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(e,o,n,i):this.delegate.removeAttribute(e,o,i)},e.prototype.setBindingDebugInfo=function(e,t,n){},e.prototype.setElementClass=function(e,t,n){n?this.delegate.addClass(e,t):this.delegate.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,n){null!=n?this.delegate.setStyle(e,t,n):this.delegate.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,n){e[t].apply(e,n)},e.prototype.setText=function(e,t){this.delegate.setValue(e,t)},e.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},e}();function Wi(e,t,n,r){return new Zi(e,t,n,r)}var Zi=function(){function e(e,t,n,r){this._moduleType=e,this._parent=t,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(e){for(var t=e._def,n=e._providers=new Array(t.providers.length),r=0;r<t.providers.length;r++){var i=t.providers[r];4096&i.flags||void 0===n[r]&&(n[r]=Di(e,i))}}(this)}return e.prototype.get=function(e,t,n){void 0===t&&(t=Be.THROW_IF_NOT_FOUND),void 0===n&&(n=0);var r=0;return 4&n?r|=1:2&n&&(r|=4),Ii(this,{token:e,tokenKey:Fr(e),flags:r},t)},Object.defineProperty(e.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentFactoryResolver",{get:function(){return this.get(At)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+ke(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function(e,t){for(var n=e._def,r=new Set,i=0;i<n.providers.length;i++)if(131072&n.providers[i].flags){var o=e._providers[i];if(o&&o!==_i){var s=o.ngOnDestroy;"function"!=typeof s||r.has(o)||(s.apply(o),r.add(o))}}}(this),this._destroyListeners.forEach(function(e){return e()})},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},e}(),Ki=Fr(function(){}),Ji=Fr(pn),Xi=Fr(dn),Yi=Fr(wn),Qi=Fr(_n),eo=Fr(Tn),to=Fr(Be),no=Fr(Le);function ro(e,t,n,r,i,o,s,u){var l=[];if(s)for(var c in s){var f=a(s[c],2);l[f[0]]={flags:8,name:c,nonMinifiedName:f[1],ns:null,securityContext:null,suffix:null}}var p=[];if(u)for(var d in u)p.push({type:1,propName:d,target:null,eventName:u[d]});return so(e,t|=16384,n,r,i,i,o,l,p)}function io(e,t,n){return so(-1,e|=16,null,0,t,t,n)}function oo(e,t,n,r,i){return so(-1,e,t,0,n,r,i)}function so(e,t,n,r,i,o,s,a,u){var l=ti(n),c=l.matchedQueries,f=l.references,p=l.matchedQueryIds;u||(u=[]),a||(a=[]),o=Me(o);var d=ni(s,ke(i));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:c,matchedQueryIds:p,references:f,ngContentIndex:-1,childCount:r,bindings:a,bindingFlags:di(a),outputs:u,element:null,provider:{token:i,value:o,deps:d},text:null,query:null,ngContent:null}}function ao(e,t){return fo(e,t)}function uo(e,t){for(var n=e;n.parent&&!Qr(n);)n=n.parent;return po(n.parent,Xr(n),!0,t.provider.value,t.provider.deps)}function lo(e,t){var n=po(e,t.parent,(32768&t.flags)>0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var r=0;r<t.outputs.length;r++){var i=t.outputs[r],o=n[i.propName].subscribe(co(e,t.parent.nodeIndex,i.eventName));e.disposables[t.outputIndex+r]=o.unsubscribe.bind(o)}return n}function co(e,t,n){return function(r){return Kr(e,t,n,r)}}function fo(e,t){var n=(8192&t.flags)>0,r=t.provider;switch(201347067&t.flags){case 512:return po(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(yo(e,t,n,i[0]));case 2:return r(yo(e,t,n,i[0]),yo(e,t,n,i[1]));case 3:return r(yo(e,t,n,i[0]),yo(e,t,n,i[1]),yo(e,t,n,i[2]));default:for(var s=Array(o),a=0;a<o;a++)s[a]=yo(e,t,n,i[a]);return r.apply(void 0,u(s))}}(e,t.parent,n,r.value,r.deps);case 2048:return yo(e,t.parent,n,r.deps[0]);case 256:return r.value}}function po(e,t,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(yo(e,t,n,i[0]));case 2:return new r(yo(e,t,n,i[0]),yo(e,t,n,i[1]));case 3:return new r(yo(e,t,n,i[0]),yo(e,t,n,i[1]),yo(e,t,n,i[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=yo(e,t,n,i[a]);return new(r.bind.apply(r,u([void 0],s)))}}var ho={};function yo(e,t,n,r,i){if(void 0===i&&(i=Be.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=e;2&r.flags&&(i=null);var s=r.tokenKey;s===eo&&(n=!(!t||!t.element.componentView)),t&&1&r.flags&&(n=!1,t=t.parent);for(var a=e;a;){if(t)switch(s){case Ki:return zi(mo(a,t,n));case Ji:return mo(a,t,n).renderer;case Xi:return new dn(kr(a,t.nodeIndex).renderElement);case Yi:return kr(a,t.nodeIndex).viewContainer;case Qi:if(t.element.template)return kr(a,t.nodeIndex).template;break;case eo:return Fi(mo(a,t,n));case to:case no:return $i(a,t);default:var u=(n?t.element.allProviders:t.element.publicProviders)[s];if(u){var l=Er(a,u.nodeIndex);return l||(l={instance:fo(a,u)},a.nodes[u.nodeIndex]=l),l.instance}}n=Qr(a),t=Xr(a),a=a.parent,4&r.flags&&(a=null)}var c=o.root.injector.get(r.token,ho);return c!==ho||i===ho?c:o.root.ngModule.injector.get(r.token,i)}function mo(e,t,n){var r;if(n)r=kr(e,t.nodeIndex).componentView;else for(r=e;r.parent&&!Qr(r);)r=r.parent;return r}function go(e,t,n,r,i,o){if(32768&n.flags){var s=kr(e,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(t.instance[n.bindings[r].name]=i,524288&n.flags){o=o||{};var a=En.unwrap(e.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new Mn(a,i,0!=(2&e.state))}return e.oldValues[n.bindingIndex+r]=i,o}function vo(e,t){if(e.def.nodeFlags&t)for(var n=e.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],s=o.parent;for(!s&&o.flags&t&&_o(e,i,o.flags&t,r++),0==(o.childFlags&t)&&(i+=o.childCount);s&&1&s.flags&&i===s.nodeIndex+s.childCount;)s.directChildFlags&t&&(r=bo(e,s,t,r)),s=s.parent}}function bo(e,t,n,r){for(var i=t.nodeIndex+1;i<=t.nodeIndex+t.childCount;i++){var o=e.def.nodes[i];o.flags&n&&_o(e,i,o.flags&n,r++),i+=o.childCount}return r}function _o(e,t,n,r){var i=Er(e,t);if(i){var o=i.instance;o&&(Pr.setCurrentNode(e,t),1048576&n&&Dr(e,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&Dr(e,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}function wo(e){for(var t=e.def.nodeMatchedQueries;e.parent&&ei(e);){var n=e.parentNodeDef;e=e.parent;for(var r=n.nodeIndex+n.childCount,i=0;i<=r;i++)67108864&(o=e.def.nodes[i]).flags&&536870912&o.flags&&(o.query.filterId&t)===o.query.filterId&&Ar(e,i).setDirty(),!(1&o.flags&&i+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(i+=o.childCount)}if(134217728&e.def.nodeFlags)for(i=0;i<e.def.nodes.length;i++){var o;134217728&(o=e.def.nodes[i]).flags&&536870912&o.flags&&Ar(e,i).setDirty(),i+=o.childCount}}function To(e,t){var n=Ar(e,t.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&t.flags){var o=t.parent.parent;i=xo(e,o.nodeIndex,o.nodeIndex+o.childCount,t.query,[]),r=Er(e,t.parent.nodeIndex).instance}else 134217728&t.flags&&(i=xo(e,0,e.def.nodes.length-1,t.query,[]),r=e.component);n.reset(i);for(var s=t.query.bindings,a=!1,u=0;u<s.length;u++){var l=s[u],c=void 0;switch(l.bindingType){case 0:c=n.first;break;case 1:c=n,a=!0}r[l.propName]=c}a&&n.notifyOnChanges()}}function xo(e,t,n,r,i){for(var o=t;o<=n;o++){var s=e.def.nodes[o],a=s.matchedQueries[r.id];if(null!=a&&i.push(So(e,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var u=kr(e,o);if((s.childMatchedQueries&r.filterId)===r.filterId&&(xo(e,o+1,o+s.childCount,r,i),o+=s.childCount),16777216&s.flags)for(var l=u.viewContainer._embeddedViews,c=0;c<l.length;c++){var f=l[c],p=Jr(f);p&&p===u&&xo(f,0,f.def.nodes.length-1,r,i)}var d=u.template._projectedViews;if(d)for(c=0;c<d.length;c++){var h=d[c];xo(h,0,h.def.nodes.length-1,r,i)}}(s.childMatchedQueries&r.filterId)!==r.filterId&&(o+=s.childCount)}return i}function So(e,t,n){if(null!=n)switch(n){case 1:return kr(e,t.nodeIndex).renderElement;case 0:return new dn(kr(e,t.nodeIndex).renderElement);case 2:return kr(e,t.nodeIndex).template;case 3:return kr(e,t.nodeIndex).viewContainer;case 4:return Er(e,t.nodeIndex).instance}}function Io(e,t,n){var r=ri(e,t,n);r&&ui(e,n.ngContent.index,1,r,null,void 0)}function Do(e,t){return ko(128,e,new Array(t+1))}function Co(e,t){for(var n=Object.keys(t),r=n.length,i=new Array(r),o=0;o<r;o++){var s=n[o];i[t[s]]=s}return ko(64,e,i)}function ko(e,t,n){for(var r=new Array(n.length),i=0;i<n.length;i++){var o=n[i];r[i]={flags:8,name:o,ns:null,nonMinifiedName:o,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:r,bindingFlags:di(r),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}function Eo(e,t,n){for(var r=new Array(n.length-1),i=1;i<n.length;i++)r[i-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[i]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:r,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function Mo(e,t,n){var r,i=e.renderer;r=i.createText(n.text.prefix);var o=ri(e,t,n);return o&&i.appendChild(o,r),{renderText:r}}function Ao(e,t){return(null!=e?e.toString():"")+t.suffix}function Po(e,t,n,r){for(var i=0,o=0,s=0,a=0,u=0,l=null,c=null,f=!1,p=!1,d=null,h=0;h<t.length;h++){var y=t[h];if(y.nodeIndex=h,y.parent=l,y.bindingIndex=i,y.outputIndex=o,y.renderParent=c,s|=y.flags,u|=y.matchedQueryIds,y.element){var m=y.element;m.publicProviders=l?l.element.publicProviders:Object.create(null),m.allProviders=m.publicProviders,f=!1,p=!1,y.element.template&&(u|=y.element.template.nodeMatchedQueries)}if(No(l,y,t.length),i+=y.bindings.length,o+=y.outputs.length,!c&&3&y.flags&&(d=y),20224&y.flags){f||(f=!0,l.element.publicProviders=Object.create(l.element.publicProviders),l.element.allProviders=l.element.publicProviders);var g=0!=(32768&y.flags);0==(8192&y.flags)||g?l.element.publicProviders[Fr(y.provider.token)]=y:(p||(p=!0,l.element.allProviders=Object.create(l.element.publicProviders)),l.element.allProviders[Fr(y.provider.token)]=y),g&&(l.element.componentProvider=y)}if(l?(l.childFlags|=y.flags,l.directChildFlags|=y.flags,l.childMatchedQueries|=y.matchedQueryIds,y.element&&y.element.template&&(l.childMatchedQueries|=y.element.template.nodeMatchedQueries)):a|=y.flags,y.childCount>0)l=y,Vo(y)||(c=y);else for(;l&&h===l.nodeIndex+l.childCount;){var v=l.parent;v&&(v.childFlags|=l.childFlags,v.childMatchedQueries|=l.childMatchedQueries),c=(l=v)&&Vo(l)?l.renderParent:l}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:e,nodes:t,updateDirectives:n||Rr,updateRenderer:r||Rr,handleEvent:function(e,n,r,i){return t[n].element.handleEvent(e,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:d}}function Vo(e){return 0!=(1&e.flags)&&null===e.element.name}function No(e,t,n){var r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var i=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=i&&t.nodeIndex+t.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function Oo(e,t,n,r){var i=Fo(e.root,e.renderer,e,t,n);return Bo(i,e.component,r),qo(i),i}function Ro(e,t,n){var r=Fo(e,e.renderer,null,null,t);return Bo(r,n,n),qo(r),r}function Lo(e,t,n,r){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(r,o):e.root.renderer,Fo(e.root,i,e,t.element.componentProvider,n)}function Fo(e,t,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function Bo(e,t,n){e.component=t,e.context=n}function qo(e){var t;Qr(e)&&(t=kr(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,r=e.nodes,i=0;i<n.nodes.length;i++){var o=n.nodes[i];Pr.setCurrentNode(e,i);var s=void 0;switch(201347067&o.flags){case 1:var a=mi(e,t,o),u=void 0;if(33554432&o.flags){var l=oi(o.element.componentView);u=Pr.createComponentView(e,o,l,a)}gi(e,u,o,a),s={renderElement:a,componentView:u,viewContainer:null,template:o.element.template?qi(e,o):void 0},16777216&o.flags&&(s.viewContainer=Ri(e,o,s));break;case 2:s=Mo(e,t,o);break;case 512:case 1024:case 2048:case 256:(s=r[i])||4096&o.flags||(s={instance:ao(e,o)});break;case 16:s={instance:uo(e,o)};break;case 16384:(s=r[i])||(s={instance:lo(e,o)}),32768&o.flags&&Bo(kr(e,o.parent.nodeIndex).componentView,s.instance,s.instance);break;case 32:case 64:case 128:s={value:void 0};break;case 67108864:case 134217728:s=new yn;break;case 8:Io(e,t,o),s=void 0}r[i]=s}Ko(e,Zo.CreateViewNodes),Qo(e,201326592,268435456,0)}function jo(e){Ho(e),Pr.updateDirectives(e,1),Jo(e,Zo.CheckNoChanges),Pr.updateRenderer(e,1),Ko(e,Zo.CheckNoChanges),e.state&=-97}function $o(e){1&e.state?(e.state&=-2,e.state|=2):e.state&=-3,Ir(e,0,256),Ho(e),Pr.updateDirectives(e,0),Jo(e,Zo.CheckAndUpdate),Qo(e,67108864,536870912,0);var t=Ir(e,256,512);vo(e,2097152|(t?1048576:0)),Pr.updateRenderer(e,0),Ko(e,Zo.CheckAndUpdate),Qo(e,134217728,536870912,0),vo(e,8388608|((t=Ir(e,512,768))?4194304:0)),2&e.def.flags&&(e.state&=-9),e.state&=-97,Ir(e,768,1024)}function Uo(e,t,n,r,i,o,s,a,l,c,f,p,d){return 0===n?function(e,t,n,r,i,o,s,a,u,l,c,f){switch(201347067&t.flags){case 1:return function(e,t,n,r,i,o,s,a,u,l,c,f){var p=t.bindings.length,d=!1;return p>0&&bi(e,t,0,n)&&(d=!0),p>1&&bi(e,t,1,r)&&(d=!0),p>2&&bi(e,t,2,i)&&(d=!0),p>3&&bi(e,t,3,o)&&(d=!0),p>4&&bi(e,t,4,s)&&(d=!0),p>5&&bi(e,t,5,a)&&(d=!0),p>6&&bi(e,t,6,u)&&(d=!0),p>7&&bi(e,t,7,l)&&(d=!0),p>8&&bi(e,t,8,c)&&(d=!0),p>9&&bi(e,t,9,f)&&(d=!0),d}(e,t,n,r,i,o,s,a,u,l,c,f);case 2:return function(e,t,n,r,i,o,s,a,u,l,c,f){var p=!1,d=t.bindings,h=d.length;if(h>0&&zr(e,t,0,n)&&(p=!0),h>1&&zr(e,t,1,r)&&(p=!0),h>2&&zr(e,t,2,i)&&(p=!0),h>3&&zr(e,t,3,o)&&(p=!0),h>4&&zr(e,t,4,s)&&(p=!0),h>5&&zr(e,t,5,a)&&(p=!0),h>6&&zr(e,t,6,u)&&(p=!0),h>7&&zr(e,t,7,l)&&(p=!0),h>8&&zr(e,t,8,c)&&(p=!0),h>9&&zr(e,t,9,f)&&(p=!0),p){var y=t.text.prefix;h>0&&(y+=Ao(n,d[0])),h>1&&(y+=Ao(r,d[1])),h>2&&(y+=Ao(i,d[2])),h>3&&(y+=Ao(o,d[3])),h>4&&(y+=Ao(s,d[4])),h>5&&(y+=Ao(a,d[5])),h>6&&(y+=Ao(u,d[6])),h>7&&(y+=Ao(l,d[7])),h>8&&(y+=Ao(c,d[8])),h>9&&(y+=Ao(f,d[9]));var m=Cr(e,t.nodeIndex).renderText;e.renderer.setValue(m,y)}return p}(e,t,n,r,i,o,s,a,u,l,c,f);case 16384:return function(e,t,n,r,i,o,s,a,u,l,c,f){var p=Er(e,t.nodeIndex),d=p.instance,h=!1,y=void 0,m=t.bindings.length;return m>0&&Hr(e,t,0,n)&&(h=!0,y=go(e,p,t,0,n,y)),m>1&&Hr(e,t,1,r)&&(h=!0,y=go(e,p,t,1,r,y)),m>2&&Hr(e,t,2,i)&&(h=!0,y=go(e,p,t,2,i,y)),m>3&&Hr(e,t,3,o)&&(h=!0,y=go(e,p,t,3,o,y)),m>4&&Hr(e,t,4,s)&&(h=!0,y=go(e,p,t,4,s,y)),m>5&&Hr(e,t,5,a)&&(h=!0,y=go(e,p,t,5,a,y)),m>6&&Hr(e,t,6,u)&&(h=!0,y=go(e,p,t,6,u,y)),m>7&&Hr(e,t,7,l)&&(h=!0,y=go(e,p,t,7,l,y)),m>8&&Hr(e,t,8,c)&&(h=!0,y=go(e,p,t,8,c,y)),m>9&&Hr(e,t,9,f)&&(h=!0,y=go(e,p,t,9,f,y)),y&&d.ngOnChanges(y),65536&t.flags&&Dr(e,256,t.nodeIndex)&&d.ngOnInit(),262144&t.flags&&d.ngDoCheck(),h}(e,t,n,r,i,o,s,a,u,l,c,f);case 32:case 64:case 128:return function(e,t,n,r,i,o,s,a,u,l,c,f){var p=t.bindings,d=!1,h=p.length;if(h>0&&zr(e,t,0,n)&&(d=!0),h>1&&zr(e,t,1,r)&&(d=!0),h>2&&zr(e,t,2,i)&&(d=!0),h>3&&zr(e,t,3,o)&&(d=!0),h>4&&zr(e,t,4,s)&&(d=!0),h>5&&zr(e,t,5,a)&&(d=!0),h>6&&zr(e,t,6,u)&&(d=!0),h>7&&zr(e,t,7,l)&&(d=!0),h>8&&zr(e,t,8,c)&&(d=!0),h>9&&zr(e,t,9,f)&&(d=!0),d){var y=Mr(e,t.nodeIndex),m=void 0;switch(201347067&t.flags){case 32:m=new Array(p.length),h>0&&(m[0]=n),h>1&&(m[1]=r),h>2&&(m[2]=i),h>3&&(m[3]=o),h>4&&(m[4]=s),h>5&&(m[5]=a),h>6&&(m[6]=u),h>7&&(m[7]=l),h>8&&(m[8]=c),h>9&&(m[9]=f);break;case 64:m={},h>0&&(m[p[0].name]=n),h>1&&(m[p[1].name]=r),h>2&&(m[p[2].name]=i),h>3&&(m[p[3].name]=o),h>4&&(m[p[4].name]=s),h>5&&(m[p[5].name]=a),h>6&&(m[p[6].name]=u),h>7&&(m[p[7].name]=l),h>8&&(m[p[8].name]=c),h>9&&(m[p[9].name]=f);break;case 128:var g=n;switch(h){case 1:m=g.transform(n);break;case 2:m=g.transform(r);break;case 3:m=g.transform(r,i);break;case 4:m=g.transform(r,i,o);break;case 5:m=g.transform(r,i,o,s);break;case 6:m=g.transform(r,i,o,s,a);break;case 7:m=g.transform(r,i,o,s,a,u);break;case 8:m=g.transform(r,i,o,s,a,u,l);break;case 9:m=g.transform(r,i,o,s,a,u,l,c);break;case 10:m=g.transform(r,i,o,s,a,u,l,c,f)}}y.value=m}return d}(e,t,n,r,i,o,s,a,u,l,c,f);default:throw"unreachable"}}(e,t,r,i,o,s,a,l,c,f,p,d):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var r=!1,i=0;i<n.length;i++)bi(e,t,i,n[i])&&(r=!0);return r}(e,t,n);case 2:return function(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)zr(e,t,o,n[o])&&(i=!0);if(i){var s="";for(o=0;o<n.length;o++)s+=Ao(n[o],r[o]);s=t.text.prefix+s;var a=Cr(e,t.nodeIndex).renderText;e.renderer.setValue(a,s)}return i}(e,t,n);case 16384:return function(e,t,n){for(var r=Er(e,t.nodeIndex),i=r.instance,o=!1,s=void 0,a=0;a<n.length;a++)Hr(e,t,a,n[a])&&(o=!0,s=go(e,r,t,a,n[a],s));return s&&i.ngOnChanges(s),65536&t.flags&&Dr(e,256,t.nodeIndex)&&i.ngOnInit(),262144&t.flags&&i.ngDoCheck(),o}(e,t,n);case 32:case 64:case 128:return function(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)zr(e,t,o,n[o])&&(i=!0);if(i){var s=Mr(e,t.nodeIndex),a=void 0;switch(201347067&t.flags){case 32:a=n;break;case 64:for(a={},o=0;o<n.length;o++)a[r[o].name]=n[o];break;case 128:var l=n[0],c=n.slice(1);a=l.transform.apply(l,u(c))}s.value=a}return i}(e,t,n);default:throw"unreachable"}}(e,t,r)}function Ho(e){var t=e.def;if(4&t.nodeFlags)for(var n=0;n<t.nodes.length;n++){var r=t.nodes[n];if(4&r.flags){var i=kr(e,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var s=i[o];s.state|=32,Zr(s,e)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function zo(e,t,n,r,i,o,s,a,u,l,c,f,p){return 0===n?function(e,t,n,r,i,o,s,a,u,l,c,f){var p=t.bindings.length;p>0&&Gr(e,t,0,n),p>1&&Gr(e,t,1,r),p>2&&Gr(e,t,2,i),p>3&&Gr(e,t,3,o),p>4&&Gr(e,t,4,s),p>5&&Gr(e,t,5,a),p>6&&Gr(e,t,6,u),p>7&&Gr(e,t,7,l),p>8&&Gr(e,t,8,c),p>9&&Gr(e,t,9,f)}(e,t,r,i,o,s,a,u,l,c,f,p):function(e,t,n){for(var r=0;r<n.length;r++)Gr(e,t,r,n[r])}(e,t,r),!1}function Go(e,t){if(Ar(e,t.nodeIndex).dirty)throw Vr(Pr.createDebugContext(e,t.nodeIndex),"Query "+t.query.id+" not dirty","Query "+t.query.id+" dirty",0!=(1&e.state))}function Wo(e){if(!(128&e.state)){if(Jo(e,Zo.Destroy),Ko(e,Zo.Destroy),vo(e,131072),e.disposables)for(var t=0;t<e.disposables.length;t++)e.disposables[t]();!function(e){if(16&e.state){var t=Jr(e);if(t){var n=t.template._projectedViews;n&&(Ai(n,n.indexOf(e)),Pr.dirtyParentQueries(e))}}}(e),e.renderer.destroyNode&&function(e){for(var t=e.def.nodes.length,n=0;n<t;n++){var r=e.def.nodes[n];1&r.flags?e.renderer.destroyNode(kr(e,n).renderElement):2&r.flags?e.renderer.destroyNode(Cr(e,n).renderText):(67108864&r.flags||134217728&r.flags)&&Ar(e,n).destroy()}}(e),Qr(e)&&e.renderer.destroy(),e.state|=128}}var Zo=function(e){return e[e.CreateViewNodes=0]="CreateViewNodes",e[e.CheckNoChanges=1]="CheckNoChanges",e[e.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",e[e.CheckAndUpdate=3]="CheckAndUpdate",e[e.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",e[e.Destroy=5]="Destroy",e}(Zo||(Zo={}));function Ko(e,t){var n=e.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?Xo(kr(e,r).componentView,t):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function Jo(e,t){var n=e.def;if(16777216&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];if(16777216&i.flags)for(var o=kr(e,r).viewContainer._embeddedViews,s=0;s<o.length;s++)Xo(o[s],t);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function Xo(e,t){var n=e.state;switch(t){case Zo.CheckNoChanges:0==(128&n)&&(12==(12&n)?jo(e):64&n&&Yo(e,Zo.CheckNoChangesProjectedViews));break;case Zo.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?jo(e):64&n&&Yo(e,t));break;case Zo.CheckAndUpdate:0==(128&n)&&(12==(12&n)?$o(e):64&n&&Yo(e,Zo.CheckAndUpdateProjectedViews));break;case Zo.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?$o(e):64&n&&Yo(e,t));break;case Zo.Destroy:Wo(e);break;case Zo.CreateViewNodes:qo(e)}}function Yo(e,t){Jo(e,t),Ko(e,t)}function Qo(e,t,n,r){if(e.def.nodeFlags&t&&e.def.nodeFlags&n)for(var i=e.def.nodes.length,o=0;o<i;o++){var s=e.def.nodes[o];if(s.flags&t&&s.flags&n)switch(Pr.setCurrentNode(e,s.nodeIndex),r){case 0:To(e,s);break;case 1:Go(e,s)}s.childFlags&t&&s.childFlags&n||(o+=s.childCount)}}var es=!1;function ts(e,t,n,r,i,o){return Ro(rs(e,i,i.injector.get(cn),t,n),r,o)}function ns(e,t,n,r,i,o){var s=i.injector.get(cn),a=rs(e,i,new Ls(s),t,n),u=ds(r);return Os(Ts.create,Ro,null,[a,u,o])}function rs(e,t,n,r,i){var o=t.injector.get(Sr),s=t.injector.get(lt);return{ngModule:t,injector:e,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function is(e,t,n,r){var i=ds(n);return Os(Ts.create,Oo,null,[e,t,i,r])}function os(e,t,n,r){return n=ls.get(t.element.componentProvider.provider.token)||ds(n),Os(Ts.create,Lo,null,[e,t,n,r])}function ss(e,t,n,r){return Wi(e,t,n,function(e){var t=function(e){var t=!1,n=!1;return 0===as.size?{hasOverrides:t,hasDeprecatedOverrides:n}:(e.providers.forEach(function(e){var r=as.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),e.modules.forEach(function(e){us.forEach(function(r,i){i.ngInjectableDef.providedIn===e&&(t=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:t,hasDeprecatedOverrides:n})}(e),n=t.hasDeprecatedOverrides;return t.hasOverrides?(function(e){for(var t=0;t<e.providers.length;t++){var r=e.providers[t];n&&(r.flags|=4096);var i=as.get(r.token);i&&(r.flags=-3841&r.flags|i.flags,r.deps=ni(i.deps),r.value=i.value)}if(us.size>0){var o=new Set(e.modules);us.forEach(function(t,r){if(o.has(r.ngInjectableDef.providedIn)){var i={token:r,flags:t.flags|(n?4096:0),deps:ni(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[Fr(r)]=i}})}}(e=e.factory(function(){return Rr})),e):e}(r))}var as=new Map,us=new Map,ls=new Map;function cs(e){as.set(e.token,e),"function"==typeof e.token&&e.token.ngInjectableDef&&"function"==typeof e.token.ngInjectableDef.providedIn&&us.set(e.token,e)}function fs(e,t){var n=oi(oi(t.viewDefFactory).nodes[0].element.componentView);ls.set(e,n)}function ps(){as.clear(),us.clear(),ls.clear()}function ds(e){if(0===as.size)return e;var t=function(e){for(var t=[],n=null,r=0;r<e.nodes.length;r++){var i=e.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&as.has(i.provider.token)&&(t.push(n.nodeIndex),n=null)}return t}(e);if(0===t.length)return e;e=e.factory(function(){return Rr});for(var n=0;n<t.length;n++)r(e,t[n]);return e;function r(e,t){for(var n=t+1;n<e.nodes.length;n++){var r=e.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=as.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=ni(o.deps),i.value=o.value)}}}}function hs(e,t,n,r,i,o,s,a,u,l,c,f,p){var d=e.def.nodes[t];return Uo(e,d,n,r,i,o,s,a,u,l,c,f,p),224&d.flags?Mr(e,t).value:void 0}function ys(e,t,n,r,i,o,s,a,u,l,c,f,p){var d=e.def.nodes[t];return zo(e,d,n,r,i,o,s,a,u,l,c,f,p),224&d.flags?Mr(e,t).value:void 0}function ms(e){return Os(Ts.detectChanges,$o,null,[e])}function gs(e){return Os(Ts.checkNoChanges,jo,null,[e])}function vs(e){return Os(Ts.destroy,Wo,null,[e])}var bs,_s,ws,Ts=function(e){return e[e.create=0]="create",e[e.detectChanges=1]="detectChanges",e[e.checkNoChanges=2]="checkNoChanges",e[e.destroy=3]="destroy",e[e.handleEvent=4]="handleEvent",e}(Ts||(Ts={}));function xs(e,t){_s=e,ws=t}function Ss(e,t,n,r){return xs(e,t),Os(Ts.handleEvent,e.def.handleEvent,null,[e,t,n,r])}function Is(e,t){if(128&e.state)throw Or(Ts[bs]);return xs(e,As(e,0)),e.def.updateDirectives(function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.def.nodes[n];return 0===t?Cs(e,s,r,i):ks(e,s,r,i),16384&s.flags&&xs(e,As(e,n)),224&s.flags?Mr(e,s.nodeIndex).value:void 0},e)}function Ds(e,t){if(128&e.state)throw Or(Ts[bs]);return xs(e,Ps(e,0)),e.def.updateRenderer(function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.def.nodes[n];return 0===t?Cs(e,s,r,i):ks(e,s,r,i),3&s.flags&&xs(e,Ps(e,n)),224&s.flags?Mr(e,s.nodeIndex).value:void 0},e)}function Cs(e,t,n,r){if(Uo.apply(void 0,u([e,t,n],r))){var i=1===n?r[0]:r;if(16384&t.flags){for(var o={},s=0;s<t.bindings.length;s++){var a=t.bindings[s],l=i[s];8&a.flags&&(o[(d=a.nonMinifiedName,"ng-reflect-"+(d=d.replace(/[$@]/g,"_").replace(Es,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"-"+e[1].toLowerCase()})))]=Ms(l))}var c=t.parent,f=kr(e,c.nodeIndex).renderElement;if(c.element.name)for(var p in o)null!=(l=o[p])?e.renderer.setAttribute(f,p,l):e.renderer.removeAttribute(f,p);else e.renderer.setValue(f,"bindings="+JSON.stringify(o,null,2))}}var d}function ks(e,t,n,r){zo.apply(void 0,u([e,t,n],r))}var Es=/([A-Z])/g;function Ms(e){try{return null!=e?e.toString().slice(0,30):e}catch(e){return"[ERROR] Exception while trying to serialize the value"}}function As(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function Ps(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var Vs=function(){function e(e,t){this.view=e,this.nodeIndex=t,null==t&&(this.nodeIndex=t=0),this.nodeDef=e.def.nodes[t];for(var n=this.nodeDef,r=e;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=Xr(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(e.prototype,"elOrCompView",{get:function(){return kr(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return $i(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){var e=[];if(this.elDef)for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&e.push(n.provider.token),t+=n.childCount}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){var e={};if(this.elDef){Ns(this.elView,this.elDef,e);for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&Ns(this.elView,n,e),t+=n.childCount}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentRenderElement",{get:function(){var e=function(e){for(;e&&!Qr(e);)e=e.parent;return e.parent?kr(e.parent,Xr(e).nodeIndex):null}(this.elOrCompView);return e?e.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?Yr(this.view,this.nodeDef):Yr(this.elView,this.elDef)},enumerable:!0,configurable:!0}),e.prototype.logError=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(t=this.view.def,n=this.nodeDef.nodeIndex):(t=this.elView.def,n=this.elDef.nodeIndex);var o=function(e,t){for(var n=-1,r=0;r<=t;r++)3&e.nodes[r].flags&&n++;return n}(t,n),s=-1;t.factory(function(){return++s===o?(t=e.error).bind.apply(t,u([e],r)):Rr;var t}),s<o&&(e.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),e.error.apply(e,u(r)))},e}();function Ns(e,t,n){for(var r in t.references)n[r]=So(e,t,t.references[r])}function Os(e,t,n,r){var i=bs,o=_s,s=ws;try{bs=e;var a=t.apply(n,r);return _s=o,ws=s,bs=i,a}catch(e){if(st(e)||!_s)throw e;throw function(e,t){return e instanceof Error||(e=new Error(e.toString())),Nr(e,t),e}(e,Rs())}}function Rs(){return _s?new Vs(_s,ws):null}var Ls=function(){function e(e){this.delegate=e}return e.prototype.createRenderer=function(e,t){return new Fs(this.delegate.createRenderer(e,t))},e.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},e.prototype.end=function(){this.delegate.end&&this.delegate.end()},e.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},e}(),Fs=function(){function e(e){this.delegate=e,this.data=this.delegate.data}return e.prototype.destroyNode=function(e){!function(e){In.delete(e.nativeNode)}(Dn(e)),this.delegate.destroyNode&&this.delegate.destroyNode(e)},e.prototype.destroy=function(){this.delegate.destroy()},e.prototype.createElement=function(e,t){var n=this.delegate.createElement(e,t),r=Rs();if(r){var i=new Sn(n,null,r);i.name=e,Cn(i)}return n},e.prototype.createComment=function(e){var t=this.delegate.createComment(e),n=Rs();return n&&Cn(new xn(t,null,n)),t},e.prototype.createText=function(e){var t=this.delegate.createText(e),n=Rs();return n&&Cn(new xn(t,null,n)),t},e.prototype.appendChild=function(e,t){var n=Dn(e),r=Dn(t);n&&r&&n instanceof Sn&&n.addChild(r),this.delegate.appendChild(e,t)},e.prototype.insertBefore=function(e,t,n){var r=Dn(e),i=Dn(t),o=Dn(n);r&&i&&r instanceof Sn&&r.insertBefore(o,i),this.delegate.insertBefore(e,t,n)},e.prototype.removeChild=function(e,t){var n=Dn(e),r=Dn(t);n&&r&&n instanceof Sn&&n.removeChild(r),this.delegate.removeChild(e,t)},e.prototype.selectRootElement=function(e){var t=this.delegate.selectRootElement(e),n=Rs();return n&&Cn(new Sn(t,null,n)),t},e.prototype.setAttribute=function(e,t,n,r){var i=Dn(e);i&&i instanceof Sn&&(i.attributes[r?r+":"+t:t]=n),this.delegate.setAttribute(e,t,n,r)},e.prototype.removeAttribute=function(e,t,n){var r=Dn(e);r&&r instanceof Sn&&(r.attributes[n?n+":"+t:t]=null),this.delegate.removeAttribute(e,t,n)},e.prototype.addClass=function(e,t){var n=Dn(e);n&&n instanceof Sn&&(n.classes[t]=!0),this.delegate.addClass(e,t)},e.prototype.removeClass=function(e,t){var n=Dn(e);n&&n instanceof Sn&&(n.classes[t]=!1),this.delegate.removeClass(e,t)},e.prototype.setStyle=function(e,t,n,r){var i=Dn(e);i&&i instanceof Sn&&(i.styles[t]=n),this.delegate.setStyle(e,t,n,r)},e.prototype.removeStyle=function(e,t,n){var r=Dn(e);r&&r instanceof Sn&&(r.styles[t]=null),this.delegate.removeStyle(e,t,n)},e.prototype.setProperty=function(e,t,n){var r=Dn(e);r&&r instanceof Sn&&(r.properties[t]=n),this.delegate.setProperty(e,t,n)},e.prototype.listen=function(e,t,n){if("string"!=typeof e){var r=Dn(e);r&&r.listeners.push(new function(e,t){this.name=e,this.callback=t}(t,n))}return this.delegate.listen(e,t,n)},e.prototype.parentNode=function(e){return this.delegate.parentNode(e)},e.prototype.nextSibling=function(e){return this.delegate.nextSibling(e)},e.prototype.setValue=function(e,t){return this.delegate.setValue(e,t)},e}(),Bs=function(e){function t(t,n,r){var i=e.call(this)||this;return i.moduleType=t,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}return i(t,e),t.prototype.create=function(e){!function(){if(!es){es=!0;var e=tn()?{setCurrentNode:xs,createRootView:ns,createEmbeddedView:is,createComponentView:os,createNgModuleRef:ss,overrideProvider:cs,overrideComponentView:fs,clearOverrides:ps,checkAndUpdateView:ms,checkNoChangesView:gs,destroyView:vs,createDebugContext:function(e,t){return new Vs(e,t)},handleEvent:Ss,updateDirectives:Is,updateRenderer:Ds}:{setCurrentNode:function(){},createRootView:ts,createEmbeddedView:Oo,createComponentView:Lo,createNgModuleRef:Wi,overrideProvider:Rr,overrideComponentView:Rr,clearOverrides:Rr,checkAndUpdateView:$o,checkNoChangesView:jo,destroyView:Wo,createDebugContext:function(e,t){return new Vs(e,t)},handleEvent:function(e,t,n,r){return e.def.handleEvent(e,t,n,r)},updateDirectives:function(e,t){return e.def.updateDirectives(0===t?hs:ys,e)},updateRenderer:function(e,t){return e.def.updateRenderer(0===t?hs:ys,e)}};Pr.setCurrentNode=e.setCurrentNode,Pr.createRootView=e.createRootView,Pr.createEmbeddedView=e.createEmbeddedView,Pr.createComponentView=e.createComponentView,Pr.createNgModuleRef=e.createNgModuleRef,Pr.overrideProvider=e.overrideProvider,Pr.overrideComponentView=e.overrideComponentView,Pr.clearOverrides=e.clearOverrides,Pr.checkAndUpdateView=e.checkAndUpdateView,Pr.checkNoChangesView=e.checkNoChangesView,Pr.destroyView=e.destroyView,Pr.resolveDep=yo,Pr.createDebugContext=e.createDebugContext,Pr.handleEvent=e.handleEvent,Pr.updateDirectives=e.updateDirectives,Pr.updateRenderer=e.updateRenderer,Pr.dirtyParentQueries=wo}}();var t=oi(this._ngModuleDefFactory);return Pr.createNgModuleRef(this.moduleType,e||Be.NULL,this._bootstrapComponents,t)},t}(Ot);"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),"undefined"!=typeof global&&(global.ngDevMode=!0));var qs=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(qs||(qs={})),js={production:!0,HttpProvider:""},$s=function(){return function(e){this.total=parseInt(e[0],10),this.available=parseInt(e[1],10),this.price=parseFloat(e[2])}}(),Us=n("usdr"),Hs=function(){function e(){this.web3=void 0!==window.web3?new Us(window.web3.currentProvider):new Us(new Us.providers.HttpProvider(js.HttpProvider))}return e.prototype.getAccounts=function(){var e=this;return M.create(function(t){e.web3.eth.getAccounts(function(e,n){null!=e&&t.error("There was an error fetching accounts."),0===n.length&&t.error("Couldn't get any accounts! Make sure your Ethereum client is configured correctly."),t.next(n.map(function(e){return new function(e){this.address=e}(e)})),t.complete()})})},e}(),zs=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},Gs=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ws=n("4/gT"),Zs=n("9hYf"),Ks=function(){function e(e){this.web3Service=e,this.subject=new re}return e.prototype.loadABI=function(){var e=this;return M.create(function(t){return zs(e,void 0,void 0,function(){var e,n;return Gs(this,function(r){switch(r.label){case 0:return(e=Zs(Ws)).setProvider(this.web3Service.web3.currentProvider),n=this,[4,e.deployed()];case 1:return n.abi=r.sent(),t.next({loaded:!0}),t.complete(),[2]}})})})},e.prototype.getUserInfo=function(e){return(function(){return zs(this,void 0,void 0,function(){var t;return Gs(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),this.abi?[4,this.abi.voterDetails.call(e)]:[3,2];case 1:t=n.sent(),this.subject.next(new function(e){this.tokens=e[0].toString(),this.proposal=e[1].toString(),this.voted=e[2],this.delegate=e[3].toString()}(t)),n.label=2;case 2:return[3,4];case 3:return n.sent(),this.subject.observers.map(function(e){return e.error("Error fetching account info")}),[3,4];case 4:return[2]}})})}).bind(this)(),this.subject.asObservable()},e.prototype.getCandidates=function(){var e=this,t=this.web3Service.web3;return M.create(function(n){return zs(e,void 0,void 0,function(){var e,r;return Gs(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.abi?[4,this.abi.allCandidates.call()]:[3,2];case 1:e=i.sent(),n.next(e.map(function(e){return t.toUtf8(e)})),n.complete(),i.label=2;case 2:return[3,4];case 3:return r=i.sent(),n.error(r),[3,4];case 4:return[2]}})})})},e.prototype.buyTokens=function(e,t){var n=this,r=this.web3Service.web3,i=e*this.tokenPrice;return M.create(function(e){return zs(n,void 0,void 0,function(){var n,o;return Gs(this,function(s){switch(s.label){case 0:return n={value:r.toWei(i,"ether"),from:t},[4,this.abi.buy(n)];case 1:return o=s.sent(),e.next(o.receipt),e.complete(),this.getUserInfo(t),[2]}})})})},e.prototype.getTokensInfo=function(){var e=this,t=this.web3Service.web3;return M.create(function(n){return zs(e,void 0,void 0,function(){var e,r,i;return Gs(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),this.abi?[4,this.abi.getTokensInfo()]:[3,2];case 1:e=o.sent(),r=new $s(e),this.tokenPrice=t.fromWei(r.price),n.next([r]),n.complete(),o.label=2;case 2:return[3,4];case 3:return i=o.sent(),n.error(i),[3,4];case 4:return[2]}})})})},e.prototype.vote=function(e,t,n){var r=this;return M.create(function(i){return zs(r,void 0,void 0,function(){var r,o;return Gs(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.abi.vote(e,t,{gas:14e4,from:n})];case 1:return r=s.sent(),i.next(r.receipt),i.complete(),[3,3];case 2:return o=s.sent(),i.error(o),[3,3];case 3:return this.getUserInfo(n),[2]}})})})},e.prototype.delegate=function(e,t,n){var r=this;return M.create(function(i){return zs(r,void 0,void 0,function(){var r,o;return Gs(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.abi.delegate(e,t,{gas:14e4,from:n})];case 1:return r=s.sent(),i.next(r.receipt),i.complete(),[3,3];case 2:return o=s.sent(),i.error(o),[3,3];case 3:return this.getUserInfo(n),[2]}})})})},e.prototype.stats=function(){var e=this,t=this.web3Service.web3;return M.create(function(n){return zs(e,void 0,void 0,function(){var e,r,i,o,s,a,u;return Gs(this,function(l){switch(l.label){case 0:return l.trys.push([0,7,,8]),this.abi?[4,this.abi.allCandidates.call()]:[3,6];case 1:e=l.sent(),r=[],i=0,o=e,l.label=2;case 2:return i<o.length?(s=t.toUtf8(o[i]),[4,this.abi.totalVotesFor.call(s)]):[3,5];case 3:a=l.sent(),r.push({proposal:s,voteCount:a.toString()}),l.label=4;case 4:return i++,[3,2];case 5:n.next(r),n.complete(),l.label=6;case 6:return[3,8];case 7:return u=l.sent(),n.error(u),[3,8];case 8:return[2]}})})})},e.prototype.proposal=function(){var e=this,t=this.web3Service.web3;return M.create(function(n){return zs(e,void 0,void 0,function(){var e,r;return Gs(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),this.abi?[4,this.abi.winningProposal.call()]:[3,2];case 1:e=i.sent(),n.next(t.toUtf8(e)),n.complete(),i.label=2;case 2:return[3,4];case 3:return r=i.sent(),n.error(r),[3,4];case 4:return[2]}})})})},e}(),Js=function(){function e(e){this.web3Service=e}return e.prototype.transform=function(e){return e?this.web3Service.web3.toUtf8(e):e},e}(),Xs=function(){function e(e){this.web3Service=e}return e.prototype.transform=function(e){return e?this.web3Service.web3.fromWei(e):e},e}(),Ys=function(){},Qs=function(){function e(e){this.votingService=e}return e.prototype.ngOnInit=function(){var e=this;this.votingService.loadABI().subscribe(function(){e.loaded=!0},function(){console.warn("Contract abi not loaded")})},e}(),ea=function(){},ta=new de("Location Initialized"),na=function(){},ra=new de("appBaseHref"),ia=function(){function e(t){var n=this;this._subject=new qt,this._platformStrategy=t;var r=this._platformStrategy.getBaseHref();this._baseHref=e.stripTrailingSlash(oa(r)),this._platformStrategy.onPopState(function(e){n._subject.emit({url:n.path(!0),pop:!0,state:e.state,type:e.type})})}return e.prototype.path=function(e){return void 0===e&&(e=!1),this.normalize(this._platformStrategy.path(e))},e.prototype.isCurrentPathEqualTo=function(t,n){return void 0===n&&(n=""),this.path()==this.normalize(t+e.normalizeQueryParams(n))},e.prototype.normalize=function(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,oa(t)))},e.prototype.prepareExternalUrl=function(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)},e.prototype.go=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=null),this._platformStrategy.pushState(n,"",e,t)},e.prototype.replaceState=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=null),this._platformStrategy.replaceState(n,"",e,t)},e.prototype.forward=function(){this._platformStrategy.forward()},e.prototype.back=function(){this._platformStrategy.back()},e.prototype.subscribe=function(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})},e.normalizeQueryParams=function(e){return e&&"?"!==e[0]?"?"+e:e},e.joinWithSlash=function(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t},e.stripTrailingSlash=function(e){var t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)},e}();function oa(e){return e.replace(/\/index.html$/,"")}var sa=function(e){function t(t,n){var r=e.call(this)||this;return r._platformLocation=t,r._baseHref="",null!=n&&(r._baseHref=n),r}return i(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t},t.prototype.prepareExternalUrl=function(e){var t=ia.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+ia.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+ia.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t}(na),aa=function(e){function t(t,n){var r=e.call(this)||this;if(r._platformLocation=t,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return i(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.prepareExternalUrl=function(e){return ia.joinWithSlash(this._baseHref,e)},t.prototype.path=function(e){void 0===e&&(e=!1);var t=this._platformLocation.pathname+ia.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?""+t+n:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+ia.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+ia.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t}(na),ua=void 0,la=["en",[["a","p"],["AM","PM"],ua],[["AM","PM"],ua,ua],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],ua,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],ua,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",ua,"{1} 'at' {0}",ua],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],ca={},fa=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(fa||(fa={})),pa=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}(pa||(pa={})),da=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(da||(da={})),ha=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(ha||(ha={})),ya=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(ya||(ya={})),ma=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e[1/0]=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}(ma||(ma={})),ga=function(e){return e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday",e}(ga||(ga={})),va=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(va||(va={})),ba=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.Milliseconds=6]="Milliseconds",e[e.Day=7]="Day",e}(ba||(ba={})),_a=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(_a||(_a={})),wa=new de("UseV4Plurals"),Ta=function(){},xa=function(e){function t(t,n){var r=e.call(this)||this;return r.locale=t,r.deprecatedPluralFn=n,r}return i(t,e),t.prototype.getPluralCategory=function(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){return function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=ca[t];if(n)return n;var r=t.split("-")[0];if(n=ca[r])return n;if("en"===r)return la;throw new Error('Missing locale data for the locale "'+e+'".')}(e)[18]}(t||this.locale)(e)){case pa.Zero:return"zero";case pa.One:return"one";case pa.Two:return"two";case pa.Few:return"few";case pa.Many:return"many";default:return"other"}},t}(Ta);function Sa(e,t){t=encodeURIComponent(t);try{for(var n=s(e.split(";")),r=n.next();!r.done;r=n.next()){var i=r.value,o=i.indexOf("="),u=a(-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],2),l=u[1];if(u[0].trim()===t)return decodeURIComponent(l)}}catch(e){c={error:e}}finally{try{r&&!r.done&&(f=n.return)&&f.call(n)}finally{if(c)throw c.error}}return null;var c,f}var Ia=function(){function e(e,t,n,r){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(e.prototype,"klass",{set:function(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClass",{set:function(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(An(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(this._iterableDiffer){var e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){var t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}},e.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){return t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},e.prototype._applyIterableChanges=function(e){var t=this;e.forEachAddedItem(function(e){if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+ke(e.item));t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){return t._toggleClass(e.item,!1)})},e.prototype._applyClasses=function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!0)}):Object.keys(e).forEach(function(n){return t._toggleClass(n,!!e[n])}))},e.prototype._removeClasses=function(e){var t=this;e&&(Array.isArray(e)||e instanceof Set?e.forEach(function(e){return t._toggleClass(e,!1)}):Object.keys(e).forEach(function(e){return t._toggleClass(e,!1)}))},e.prototype._toggleClass=function(e,t){var n=this;(e=e.trim())&&e.split(/\s+/g).forEach(function(e){t?n._renderer.addClass(n._ngEl.nativeElement,e):n._renderer.removeClass(n._ngEl.nativeElement,e)})},e}(),Da=function(){function e(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}return Object.defineProperty(e.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),e}(),Ca=function(){function e(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._differ=null}return Object.defineProperty(e.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(e){tn()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(e)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){e&&(this._template=e)},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){if("ngForOf"in e){var t=e.ngForOf.currentValue;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(e){throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((n=t).name||typeof n)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var n},e.prototype.ngDoCheck=function(){if(this._differ){var e=this._differ.diff(this.ngForOf);e&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this,n=[];e.forEachOperation(function(e,r,i){if(null==e.previousIndex){var o=t._viewContainer.createEmbeddedView(t._template,new Da(null,t.ngForOf,-1,-1),i),s=new ka(e,o);n.push(s)}else null==i?t._viewContainer.remove(r):(o=t._viewContainer.get(r),t._viewContainer.move(o,i),s=new ka(e,o),n.push(s))});for(var r=0;r<n.length;r++)this._perViewChange(n[r].view,n[r].record);r=0;for(var i=this._viewContainer.length;r<i;r++){var o=this._viewContainer.get(r);o.context.index=r,o.context.count=i}e.forEachIdentityChange(function(e){t._viewContainer.get(e.currentIndex).context.$implicit=e.item})},e.prototype._perViewChange=function(e,t){e.context.$implicit=t.item},e}(),ka=function(e,t){this.record=e,this.view=t},Ea=function(){function e(e,t){this._viewContainer=e,this._context=new Ma,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){this._context.$implicit=this._context.ngIf=e,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfThen",{set:function(e){Aa("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngIfElse",{set:function(e){Aa("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),e.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},e}(),Ma=function(){this.$implicit=null,this.ngIf=null};function Aa(e,t){if(t&&!t.createEmbeddedView)throw new Error(e+" must be a TemplateRef, but received '"+ke(t)+"'.")}var Pa=function(){function e(){}return e.prototype.createSubscription=function(e,t){return e.subscribe({next:t,error:function(e){throw e}})},e.prototype.dispose=function(e){e.unsubscribe()},e.prototype.onDestroy=function(e){e.unsubscribe()},e}(),Va=new(function(){function e(){}return e.prototype.createSubscription=function(e,t){return e.then(t,function(e){throw e})},e.prototype.dispose=function(e){},e.prototype.onDestroy=function(e){},e}()),Na=new Pa,Oa=function(){function e(e){this._ref=e,this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null}return e.prototype.ngOnDestroy=function(){this._subscription&&this._dispose()},e.prototype.transform=function(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,En.wrap(this._latestValue)):(e&&this._subscribe(e),this._latestReturnedValue=this._latestValue,this._latestValue)},e.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(n){return t._updateLatestValue(e,n)})},e.prototype._selectStrategy=function(t){if(ft(t))return Va;if(pt(t))return Na;throw Error("InvalidPipeArgument: '"+t+"' for pipe '"+ke(e)+"'")},e.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},e.prototype._updateLatestValue=function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},e}(),Ra=function(){},La=new de("DocumentToken");function Fa(e,t,n){return function(r){return r.lift(new Ba(e,t,n))}}var Ba=function(){function e(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}return e.prototype.call=function(e,t){return t.subscribe(new qa(e,this.nextOrObserver,this.error,this.complete))},e}(),qa=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o._tapNext=C,o._tapError=C,o._tapComplete=C,o._tapError=r||C,o._tapComplete=i||C,l(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||C,o._tapError=n.error||C,o._tapComplete=n.complete||C),o}return i(t,e),t.prototype._next=function(e){try{this._tapNext.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.next(e)},t.prototype._error=function(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)},t.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()},t}(S),ja=function(){function e(e,t){this.web3Service=e,this.ref=t}return e.prototype.ngOnInit=function(){var e=this;this.accounts=this.web3Service.getAccounts().pipe(Fa(function(){setTimeout(function(){e.ref.tick()},0)}))},e}(),$a=$r({encapsulation:0,styles:[[""]],data:{}});function Ua(e){return Po(0,[(e()(),yi(0,0,null,null,7,"tr",[],null,null,null,null,null)),(e()(),yi(1,0,null,null,1,"td",[],null,null,null,null,null)),(e()(),Eo(2,null,["",""])),(e()(),yi(3,0,null,null,1,"td",[["class","address"]],null,null,null,null,null)),(e()(),Eo(4,null,["",""])),(e()(),yi(5,0,null,null,2,"td",[],null,null,null,null,null)),(e()(),yi(6,0,null,null,1,"a",[["class","button is-info is-outlined"]],[[8,"href",4]],null,null,null,null)),(e()(),Eo(-1,null,["Select"]))],null,function(e,t){var n;e(t,2,0,t.context.index+1),e(t,4,0,t.context.$implicit.address),e(t,6,0,"#/home/"+(null!=(n=t.context.$implicit.address)?n.toString():""))})}function Ha(e){return Po(0,[(e()(),yi(0,0,null,null,39,"div",[["class","columns"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,38,"div",[["class","column is-6 is-offset-3"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,15,"div",[["class","box is-shadowless"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,1,"h1",[["class","title is-2"]],null,null,null,null,null)),(e()(),Eo(-1,null,["Accounts"])),(e()(),yi(5,0,null,null,12,"table",[["class","table is-bordered is-fullwidth"]],null,null,null,null,null)),(e()(),yi(6,0,null,null,7,"thead",[],null,null,null,null,null)),(e()(),yi(7,0,null,null,6,"tr",[],null,null,null,null,null)),(e()(),yi(8,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["No."])),(e()(),yi(10,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Account"])),(e()(),yi(12,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Action"])),(e()(),yi(14,0,null,null,3,"tbody",[],null,null,null,null,null)),(e()(),hi(16777216,null,null,2,null,Ua)),ro(16,802816,null,0,Ca,[wn,_n,Un],{ngForOf:[0,"ngForOf"]},null),io(131072,Oa,[Tn]),(e()(),yi(18,0,null,null,21,"div",[],null,null,null,null,null)),(e()(),yi(19,0,null,null,1,"b",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Instructions "])),(e()(),yi(21,0,null,null,18,"ol",[],null,null,null,null,null)),(e()(),yi(22,0,null,null,4,"li",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Install "])),(e()(),yi(24,0,null,null,1,"a",[["href","https://metamask.io/"],["target","_blank"]],null,null,null,null,null)),(e()(),Eo(-1,null,["MetaMask"])),(e()(),Eo(-1,null,[" extension for your browser."])),(e()(),yi(27,0,null,null,1,"li",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Click on MetaMask ext icon, Select Rinkeby Test Network from upper right options dropdown."])),(e()(),yi(29,0,null,null,1,"li",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Create your wallet (new account)."])),(e()(),yi(31,0,null,null,3,"li",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Get some ethers from "])),(e()(),yi(33,0,null,null,1,"a",[["href","https://faucet.rinkeby.io/"],["target","_blank"]],null,null,null,null,null)),(e()(),Eo(-1,null,["here"])),(e()(),yi(35,0,null,null,4,"li",[],null,null,null,null,null)),(e()(),Eo(-1,null,["You will see your account listed here. "])),(e()(),yi(37,0,null,null,1,"strong",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Proceed and Vote"])),(e()(),Eo(-1,null,["."]))],function(e,t){var n=t.component;e(t,16,0,Br(t,16,0,Hi(t,17).transform(n.accounts)))},null)}var za=Vi("app-accounts",ja,function(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-accounts",[],null,null,null,Ha,$a)),ro(1,114688,null,0,ja,[Hs,un],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Ga=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wa=function(){function e(e,t){var n=this;this.route=e,this.votingService=t,this.onReady=function(){n.userInfo={},n.subscription=n.votingService.getUserInfo(n.account).subscribe(function(e){n.userInfo=Ga({},n.userInfo,e)},function(e){})}}return e.prototype.ngOnInit=function(){var e=this;this.routeSub=this.route.params.subscribe(function(t){e.account=t.account}),this.onReady()},e}(),Za=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new ee;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(re),Ka=new M(function(e){return e.complete()});function Ja(e){return e?function(e){return new M(function(t){return e.schedule(function(){return t.complete()})})}(e):Ka}function Xa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,i=e[e.length-1];switch(P(i)?e.pop():i=void 0,e.length){case 0:return Ja(i);case 1:return i?W(e,i):(n=e[0],(r=new M(function(e){e.next(n),e.complete()}))._isScalar=!0,r.value=n,r);default:return W(e,i)}}var Ya=function(e){function t(){var n=e.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,t.prototype),n}return i(t,e),t}(Error);function Qa(e,t){return K(e,t,1)}function eu(e,t){return function(n){return n.lift(new tu(e,t))}}var tu=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new nu(e,this.predicate,this.thisArg))},e}(),nu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(S),ru=function(e){function t(){var n=e.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,t.prototype),n}return i(t,e),t}(Error);function iu(e){return function(t){return 0===e?Ja():t.lift(new ou(e))}}var ou=function(){function e(e){if(this.total=e,this.total<0)throw new ru}return e.prototype.call=function(e,t){return t.subscribe(new su(e,this.total))},e}(),su=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.ring=new Array,r.count=0,r}return i(t,e),t.prototype._next=function(e){var t=this.ring,n=this.total,r=this.count++;t.length<n?t.push(e):t[r%n]=e},t.prototype._complete=function(){var e=this.destination,t=this.count;if(t>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=t++%n;e.next(r[o])}e.complete()},t}(S),au=function(e){return void 0===e&&(e=uu),Fa({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw e()}})};function uu(){return new Ya}function lu(e){return void 0===e&&(e=null),function(t){return t.lift(new cu(e))}}var cu=function(){function e(e){this.defaultValue=e}return e.prototype.call=function(e,t){return t.subscribe(new fu(e,this.defaultValue))},e}(),fu=function(e){function t(t,n){var r=e.call(this,t)||this;return r.defaultValue=n,r.isEmpty=!0,r}return i(t,e),t.prototype._next=function(e){this.isEmpty=!1,this.destination.next(e)},t.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},t}(S);function pu(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?eu(function(t,n){return e(t,n,r)}):Y,iu(1),n?lu(t):au(function(){return new Ya}))}}function du(e){return function(t){var n=new hu(e),r=t.lift(n);return n.caught=r}}var hu=function(){function e(e){this.selector=e}return e.prototype.call=function(e,t){return t.subscribe(new yu(e,this.selector,this.caught))},e}(),yu=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.selector=n,i.caught=r,i}return i(t,e),t.prototype.error=function(t){if(!this.isStopped){var n=void 0;try{n=this.selector(t,this.caught)}catch(t){return void e.prototype.error.call(this,t)}this._unsubscribeAndRecycle(),this.add($(this,n))}},t}(U);function mu(e,t){return function(n){return n.lift(new gu(e,t,n))}}var gu=function(){function e(e,t,n){this.predicate=e,this.thisArg=t,this.source=n}return e.prototype.call=function(e,t){return t.subscribe(new vu(e,this.predicate,this.thisArg,this.source))},e}(),vu=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return i(t,e),t.prototype.notifyComplete=function(e){this.destination.next(e),this.destination.complete()},t.prototype._next=function(e){var t=!1;try{t=this.predicate.call(this.thisArg,e,this.index++,this.source)}catch(e){return void this.destination.error(e)}t||this.notifyComplete(!1)},t.prototype._complete=function(){this.notifyComplete(!0)},t}(S),bu=function(){function e(e){if(this.total=e,this.total<0)throw new ru}return e.prototype.call=function(e,t){return t.subscribe(new _u(e,this.total))},e}(),_u=function(e){function t(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r}return i(t,e),t.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},t}(S);function wu(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?eu(function(t,n){return e(t,n,r)}):Y,function(e){return e.lift(new bu(1))},n?lu(t):au(function(){return new Ya}))}}function Tu(){return Q(1)}function xu(e,t){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Su(e,t,n))}}var Su=function(){function e(e,t,n){void 0===n&&(n=!1),this.accumulator=e,this.seed=t,this.hasSeed=n}return e.prototype.call=function(e,t){return t.subscribe(new Iu(e,this.accumulator,this.seed,this.hasSeed))},e}(),Iu=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return i(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.accumulator(this.seed,e,n)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(S),Du=null;function Cu(){return Du}var ku,Eu={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},Mu={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Au={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};Te.Node&&(ku=Te.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))});var Pu,Vu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){var e;e=new t,Du||(Du=e)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,n){e[t]=n},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,n){var r;(r=e)[t].apply(r,u(n))},t.prototype.logError=function(e){window.console&&(console.error?console.error(e):console.log(e))},t.prototype.log=function(e){window.console&&window.console.log&&window.console.log(e)},t.prototype.logGroup=function(e){window.console&&window.console.group&&window.console.group(e)},t.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return Eu},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return ku.call(e,t)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,n){e.addEventListener(t,n,!1)},t.prototype.onAndCancel=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getTemplateContent=function(e){return"content"in e&&this.isTemplateElement(e)?e.content:null},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,n=new Array(t.length),r=0;r<t.length;r++)n[r]=t[r];return n},t.prototype.clearNodes=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.prototype.appendChild=function(e,t){e.appendChild(t)},t.prototype.removeChild=function(e,t){e.removeChild(t)},t.prototype.replaceChild=function(e,t,n){e.replaceChild(t,n)},t.prototype.remove=function(e){return e.parentNode&&e.parentNode.removeChild(e),e},t.prototype.insertBefore=function(e,t,n){e.insertBefore(n,t)},t.prototype.insertAllBefore=function(e,t,n){n.forEach(function(n){return e.insertBefore(n,t)})},t.prototype.insertAfter=function(e,t,n){e.insertBefore(n,t.nextSibling)},t.prototype.setInnerHTML=function(e,t){e.innerHTML=t},t.prototype.getText=function(e){return e.textContent},t.prototype.setText=function(e,t){e.textContent=t},t.prototype.getValue=function(e){return e.value},t.prototype.setValue=function(e,t){e.value=t},t.prototype.getChecked=function(e){return e.checked},t.prototype.setChecked=function(e,t){e.checked=t},t.prototype.createComment=function(e){return this.getDefaultDocument().createComment(e)},t.prototype.createTemplate=function(e){var t=this.getDefaultDocument().createElement("template");return t.innerHTML=e,t},t.prototype.createElement=function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)},t.prototype.createElementNS=function(e,t,n){return(n=n||this.getDefaultDocument()).createElementNS(e,t)},t.prototype.createTextNode=function(e,t){return(t=t||this.getDefaultDocument()).createTextNode(e)},t.prototype.createScriptTag=function(e,t,n){var r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(e,t),r},t.prototype.createStyleElement=function(e,t){var n=(t=t||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(e,t)),n},t.prototype.createShadowRoot=function(e){return e.createShadowRoot()},t.prototype.getShadowRoot=function(e){return e.shadowRoot},t.prototype.getHost=function(e){return e.host},t.prototype.clone=function(e){return e.cloneNode(!0)},t.prototype.getElementsByClassName=function(e,t){return e.getElementsByClassName(t)},t.prototype.getElementsByTagName=function(e,t){return e.getElementsByTagName(t)},t.prototype.classList=function(e){return Array.prototype.slice.call(e.classList,0)},t.prototype.addClass=function(e,t){e.classList.add(t)},t.prototype.removeClass=function(e,t){e.classList.remove(t)},t.prototype.hasClass=function(e,t){return e.classList.contains(t)},t.prototype.setStyle=function(e,t,n){e.style[t]=n},t.prototype.removeStyle=function(e,t){e.style[t]=""},t.prototype.getStyle=function(e,t){return e.style[t]},t.prototype.hasStyle=function(e,t,n){var r=this.getStyle(e,t)||"";return n?r==n:r.length>0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r<n.length;r++){var i=n.item(r);t.set(i.name,i.value)}return t},t.prototype.hasAttribute=function(e,t){return e.hasAttribute(t)},t.prototype.hasAttributeNS=function(e,t,n){return e.hasAttributeNS(t,n)},t.prototype.getAttribute=function(e,t){return e.getAttribute(t)},t.prototype.getAttributeNS=function(e,t,n){return e.getAttributeNS(t,n)},t.prototype.setAttribute=function(e,t,n){e.setAttribute(t,n)},t.prototype.setAttributeNS=function(e,t,n,r){e.setAttributeNS(t,n,r)},t.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},t.prototype.removeAttributeNS=function(e,t,n){e.removeAttributeNS(t,n)},t.prototype.templateAwareRoot=function(e){return this.isTemplateElement(e)?this.content(e):e},t.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},t.prototype.getDefaultDocument=function(){return document},t.prototype.getBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(e){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},t.prototype.getTitle=function(e){return e.title},t.prototype.setTitle=function(e,t){e.title=t||""},t.prototype.elementMatches=function(e,t){return!!this.isElementNode(e)&&(e.matches&&e.matches(t)||e.msMatchesSelector&&e.msMatchesSelector(t)||e.webkitMatchesSelector&&e.webkitMatchesSelector(t))},t.prototype.isTemplateElement=function(e){return this.isElementNode(e)&&"TEMPLATE"===e.nodeName},t.prototype.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},t.prototype.isCommentNode=function(e){return e.nodeType===Node.COMMENT_NODE},t.prototype.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},t.prototype.hasShadowRoot=function(e){return null!=e.shadowRoot&&e instanceof HTMLElement},t.prototype.isShadowRoot=function(e){return e instanceof DocumentFragment},t.prototype.importIntoDoc=function(e){return document.importNode(this.templateAwareRoot(e),!0)},t.prototype.adoptNode=function(e){return document.adoptNode(e)},t.prototype.getHref=function(e){return e.getAttribute("href")},t.prototype.getEventKey=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&Au.hasOwnProperty(t)&&(t=Au[t]))}return Mu[t]||t},t.prototype.getGlobalEventTarget=function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null},t.prototype.getHistory=function(){return window.history},t.prototype.getLocation=function(){return window.location},t.prototype.getBaseHref=function(e){var t,n=Nu||(Nu=document.querySelector("base"))?Nu.getAttribute("href"):null;return null==n?null:(t=n,Pu||(Pu=document.createElement("a")),Pu.setAttribute("href",t),"/"===Pu.pathname.charAt(0)?Pu.pathname:"/"+Pu.pathname)},t.prototype.resetBaseElement=function(){Nu=null},t.prototype.getUserAgent=function(){return window.navigator.userAgent},t.prototype.setData=function(e,t,n){this.setAttribute(e,"data-"+t,n)},t.prototype.getData=function(e,t){return this.getAttribute(e,"data-"+t)},t.prototype.getComputedStyle=function(e){return getComputedStyle(e)},t.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},t.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},t.prototype.supportsCookies=function(){return!0},t.prototype.getCookie=function(e){return Sa(document.cookie,e)},t.prototype.setCookie=function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)},t}(function(e){function t(){var t=e.call(this)||this;t._animationPrefix=null,t._transitionEnd=null;try{var n=t.createElement("div",document);if(null!=t.getStyle(n,"animationName"))t._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],i=0;i<r.length;i++)if(null!=t.getStyle(n,r[i]+"AnimationName")){t._animationPrefix="-"+r[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(e){null!=t.getStyle(n,e)&&(t._transitionEnd=o[e])})}catch(e){t._animationPrefix=null,t._transitionEnd=null}return t}return i(t,e),t.prototype.getDistributedNodes=function(e){return e.getDistributedNodes()},t.prototype.resolveAndSetHref=function(e,t,n){e.href=null==n?t:t+"/../"+n},t.prototype.supportsDOMEvents=function(){return!0},t.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},t.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},t.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},t.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},t}(function(){function e(){this.resourceLoaderType=null}return Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),e}())),Nu=null,Ou=La;function Ru(){return!!window.history.pushState}var Lu=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._init(),n}return i(t,e),t.prototype._init=function(){this.location=Cu().getLocation(),this._history=Cu().getHistory()},t.prototype.getBaseHrefFromDOM=function(){return Cu().getBaseHref(this._doc)},t.prototype.onPopState=function(e){Cu().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)},t.prototype.onHashChange=function(e){Cu().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)},Object.defineProperty(t.prototype,"pathname",{get:function(){return this.location.pathname},set:function(e){this.location.pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),t.prototype.pushState=function(e,t,n){Ru()?this._history.pushState(e,t,n):this.location.hash=n},t.prototype.replaceState=function(e,t,n){Ru()?this._history.replaceState(e,t,n):this.location.hash=n},t.prototype.forward=function(){this._history.forward()},t.prototype.back=function(){this._history.back()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:Ae,args:[Ou]}]}]},t}(ea),Fu=function(){function e(e){this._doc=e,this._dom=Cu()}return e.prototype.addTag=function(e,t){return void 0===t&&(t=!1),e?this._getOrCreateElement(e,t):null},e.prototype.addTags=function(e,t){var n=this;return void 0===t&&(t=!1),e?e.reduce(function(e,r){return r&&e.push(n._getOrCreateElement(r,t)),e},[]):[]},e.prototype.getTag=function(e){return e&&this._dom.querySelector(this._doc,"meta["+e+"]")||null},e.prototype.getTags=function(e){if(!e)return[];var t=this._dom.querySelectorAll(this._doc,"meta["+e+"]");return t?[].slice.call(t):[]},e.prototype.updateTag=function(e,t){if(!e)return null;t=t||this._parseSelector(e);var n=this.getTag(t);return n?this._setMetaElementAttributes(e,n):this._getOrCreateElement(e,!0)},e.prototype.removeTag=function(e){this.removeTagElement(this.getTag(e))},e.prototype.removeTagElement=function(e){e&&this._dom.remove(e)},e.prototype._getOrCreateElement=function(e,t){if(void 0===t&&(t=!1),!t){var n=this._parseSelector(e),r=this.getTag(n);if(r&&this._containsAttributes(e,r))return r}var i=this._dom.createElement("meta");this._setMetaElementAttributes(e,i);var o=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(o,i),i},e.prototype._setMetaElementAttributes=function(e,t){var n=this;return Object.keys(e).forEach(function(r){return n._dom.setAttribute(t,r,e[r])}),t},e.prototype._parseSelector=function(e){var t=e.name?"name":"property";return t+'="'+e[t]+'"'},e.prototype._containsAttributes=function(e,t){var n=this;return Object.keys(e).every(function(r){return n._dom.getAttribute(t,r)===e[r]})},e}(),Bu=new de("TRANSITION_ID"),qu=[{provide:dt,useFactory:function(e,t,n){return function(){n.get(ht).donePromise.then(function(){var n=Cu();Array.prototype.slice.apply(n.querySelectorAll(t,"style[ng-transition]")).filter(function(t){return n.getAttribute(t,"ng-transition")===e}).forEach(function(e){return n.remove(e)})})}},deps:[Bu,Ou,Be],multi:!0}],ju=function(){function e(){}return e.init=function(){var t;t=new e,Xt=t},e.prototype.addToWindow=function(e){Te.getAngularTestability=function(t,n){void 0===n&&(n=!0);var r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},Te.getAllAngularTestabilities=function(){return e.getAllTestabilities()},Te.getAllAngularRootElements=function(){return e.getAllRootElements()},Te.frameworkStabilizers||(Te.frameworkStabilizers=[]),Te.frameworkStabilizers.push(function(e){var t=Te.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})},e.prototype.findTestabilityInTree=function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?Cu().isShadowRoot(t)?this.findTestabilityInTree(e,Cu().getHost(t),!0):this.findTestabilityInTree(e,Cu().parentElement(t),!0):null},e}(),$u=function(){function e(e){this._doc=e}return e.prototype.getTitle=function(){return Cu().getTitle(this._doc)},e.prototype.setTitle=function(e){Cu().setTitle(this._doc,e)},e}();function Uu(e,t){"undefined"!=typeof COMPILED&&COMPILED||((Te.ng=Te.ng||{})[e]=t)}var Hu={ApplicationRef:un,NgZone:jt};function zu(e){return Dn(e)}var Gu=new de("EventManagerPlugins"),Wu=function(){function e(e,t){var n=this;this._zone=t,this._eventNameToPlugin=new Map,e.forEach(function(e){return e.manager=n}),this._plugins=e.slice().reverse()}return e.prototype.addEventListener=function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)},e.prototype.addGlobalEventListener=function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)},e.prototype.getZone=function(){return this._zone},e.prototype._findPluginFor=function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(e))return this._eventNameToPlugin.set(e,i),i}throw new Error("No event manager plugin found for event "+e)},e}(),Zu=function(){function e(e){this._doc=e}return e.prototype.addGlobalEventListener=function(e,t,n){var r=Cu().getGlobalEventTarget(this._doc,e);if(!r)throw new Error("Unsupported event target "+r+" for event "+t);return this.addEventListener(r,t,n)},e}(),Ku=function(){function e(){this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=new Set;e.forEach(function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))}),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},e}(),Ju=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(t.head),n}return i(t,e),t.prototype._addStylesToHost=function(e,t){var n=this;e.forEach(function(e){var r=n._doc.createElement("style");r.textContent=e,n._styleNodes.add(t.appendChild(r))})},t.prototype.addHost=function(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)},t.prototype.removeHost=function(e){this._hostNodes.delete(e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach(function(n){return t._addStylesToHost(e,n)})},t.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(e){return Cu().remove(e)})},t}(Ku),Xu={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Yu=/%COMP%/g,Qu="_nghost-%COMP%",el="_ngcontent-%COMP%";function tl(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?tl(e,i,n):(i=i.replace(Yu,e),n.push(i))}return n}function nl(e){return function(t){!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var rl=function(){function e(e,t){this.eventManager=e,this.sharedStylesHost=t,this.rendererByCompId=new Map,this.defaultRenderer=new il(e)}return e.prototype.createRenderer=function(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case tt.Emulated:var n=this.rendererByCompId.get(t.id);return n||(n=new ul(this.eventManager,this.sharedStylesHost,t),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n;case tt.Native:return new ll(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){var r=tl(t.id,t.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}},e.prototype.begin=function(){},e.prototype.end=function(){},e}(),il=function(){function e(e){this.eventManager=e,this.data=Object.create(null)}return e.prototype.destroy=function(){},e.prototype.createElement=function(e,t){return t?document.createElementNS(Xu[t],e):document.createElement(e)},e.prototype.createComment=function(e){return document.createComment(e)},e.prototype.createText=function(e){return document.createTextNode(e)},e.prototype.appendChild=function(e,t){e.appendChild(t)},e.prototype.insertBefore=function(e,t,n){e&&e.insertBefore(t,n)},e.prototype.removeChild=function(e,t){e&&e.removeChild(t)},e.prototype.selectRootElement=function(e){var t="string"==typeof e?document.querySelector(e):e;if(!t)throw new Error('The selector "'+e+'" did not match any elements');return t.textContent="",t},e.prototype.parentNode=function(e){return e.parentNode},e.prototype.nextSibling=function(e){return e.nextSibling},e.prototype.setAttribute=function(e,t,n,r){if(r){t=r+":"+t;var i=Xu[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)},e.prototype.removeAttribute=function(e,t,n){if(n){var r=Xu[n];r?e.removeAttributeNS(r,t):e.removeAttribute(n+":"+t)}else e.removeAttribute(t)},e.prototype.addClass=function(e,t){e.classList.add(t)},e.prototype.removeClass=function(e,t){e.classList.remove(t)},e.prototype.setStyle=function(e,t,n,r){r&fn.DashCase?e.style.setProperty(t,n,r&fn.Important?"important":""):e.style[t]=n},e.prototype.removeStyle=function(e,t,n){n&fn.DashCase?e.style.removeProperty(t):e.style[t]=""},e.prototype.setProperty=function(e,t,n){sl(t,"property"),e[t]=n},e.prototype.setValue=function(e,t){e.nodeValue=t},e.prototype.listen=function(e,t,n){return sl(t,"listener"),"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,nl(n)):this.eventManager.addEventListener(e,t,nl(n))},e}(),ol="@".charCodeAt(0);function sl(e,t){if(e.charCodeAt(0)===ol)throw new Error("Found the synthetic "+t+" "+e+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var al,ul=function(e){function t(t,n,r){var i=e.call(this,t)||this;i.component=r;var o=tl(r.id,r.styles,[]);return n.addStyles(o),i.contentAttr=el.replace(Yu,r.id),i.hostAttr=Qu.replace(Yu,r.id),i}return i(t,e),t.prototype.applyToHost=function(t){e.prototype.setAttribute.call(this,t,this.hostAttr,"")},t.prototype.createElement=function(t,n){var r=e.prototype.createElement.call(this,t,n);return e.prototype.setAttribute.call(this,r,this.contentAttr,""),r},t}(il),ll=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;o.sharedStylesHost=n,o.hostEl=r,o.component=i,o.shadowRoot=r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=tl(i.id,i.styles,[]),a=0;a<s.length;a++){var u=document.createElement("style");u.textContent=s[a],o.shadowRoot.appendChild(u)}return o}return i(t,e),t.prototype.nodeOrShadowRoot=function(e){return e===this.hostEl?this.shadowRoot:e},t.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},t.prototype.appendChild=function(t,n){return e.prototype.appendChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.insertBefore=function(t,n,r){return e.prototype.insertBefore.call(this,this.nodeOrShadowRoot(t),n,r)},t.prototype.removeChild=function(t,n){return e.prototype.removeChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.parentNode=function(t){return this.nodeOrShadowRoot(e.prototype.parentNode.call(this,this.nodeOrShadowRoot(t)))},t}(il),cl="undefined"!=typeof Zone&&Zone.__symbol__||function(e){return"__zone_symbol__"+e},fl=cl("addEventListener"),pl=cl("removeEventListener"),dl={},hl="__zone_symbol__propagationStopped";"undefined"!=typeof Zone&&Zone[cl("BLACK_LISTED_EVENTS")]&&(al={});var yl=function(e){return!!al&&al.hasOwnProperty(e)},ml=function(e){var t=dl[e.type];if(t){var n=this[t];if(n){var r=[e];if(1===n.length)return(s=n[0]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r);for(var i=n.slice(),o=0;o<i.length&&!0!==e[hl];o++){var s;(s=i[o]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r)}}}},gl=function(e){function t(t,n){var r=e.call(this,t)||this;return r.ngZone=n,r.patchEvent(),r}return i(t,e),t.prototype.patchEvent=function(){if(Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var e=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[hl]=!0),e&&e.apply(this,arguments)}}},t.prototype.supports=function(e){return!0},t.prototype.addEventListener=function(e,t,n){var r=this,i=n;if(!e[fl]||jt.isInAngularZone()&&!yl(t))e.addEventListener(t,i,!1);else{var o=dl[t];o||(o=dl[t]=cl("ANGULAR"+t+"FALSE"));var s=e[o],a=s&&s.length>0;s||(s=e[o]=[]);var u=yl(t)?Zone.root:Zone.current;if(0===s.length)s.push({zone:u,handler:i});else{for(var l=!1,c=0;c<s.length;c++)if(s[c].handler===i){l=!0;break}l||s.push({zone:u,handler:i})}a||e[fl](t,ml,!1)}return function(){return r.removeEventListener(e,t,i)}},t.prototype.removeEventListener=function(e,t,n){var r=e[pl];if(!r)return e.removeEventListener.apply(e,[t,n,!1]);var i=dl[t],o=i&&e[i];if(!o)return e.removeEventListener.apply(e,[t,n,!1]);for(var s=!1,a=0;a<o.length;a++)if(o[a].handler===n){s=!0,o.splice(a,1);break}s?0===o.length&&r.apply(e,[t,ml,!1]):e.removeEventListener.apply(e,[t,n,!1])},t}(Zu),vl={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},bl=new de("HammerGestureConfig"),_l=function(){function e(){this.events=[],this.overrides={}}return e.prototype.buildHammer=function(e){var t=new Hammer(e,this.options);for(var n in t.get("pinch").set({enable:!0}),t.get("rotate").set({enable:!0}),this.overrides)t.get(n).set(this.overrides[n]);return t},e}(),wl=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._config=n,i.console=r,i}return i(t,e),t.prototype.supports=function(e){return!(!vl.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&(this.console.warn("Hammer.js is not loaded, can not bind '"+e+"' event."),1))},t.prototype.addEventListener=function(e,t,n){var r=this,i=this.manager.getZone();return t=t.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(e),s=function(e){i.runGuarded(function(){n(e)})};return o.on(t,s),function(){return o.off(t,s)}})},t.prototype.isCustomEvent=function(e){return this._config.events.indexOf(e)>-1},t}(Zu),Tl=["alt","control","meta","shift"],xl={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},Sl=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.supports=function(e){return null!=t.parseEventName(e)},t.prototype.addEventListener=function(e,n,r){var i=t.parseEventName(n),o=t.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return Cu().onAndCancel(e,i.domEventName,o)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var i=t._normalizeKey(n.pop()),o="";if(Tl.forEach(function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o+=e+".")}),o+=i,0!=n.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},t.getEventFullKey=function(e){var t="",n=Cu().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),Tl.forEach(function(r){r!=n&&(0,xl[r])(e)&&(t+=r+".")}),t+=n},t.eventCallback=function(e,n,r){return function(i){t.getEventFullKey(i)===e&&r.runGuarded(function(){return n(i)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t}(Zu),Il=function(){},Dl=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n}return i(t,e),t.prototype.sanitize=function(e,t){if(null==t)return null;switch(e){case xr.NONE:return t;case xr.HTML:return t instanceof kl?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),function(e,t){var n=null;try{ar=ar||new tr(e);var r=t?String(t):"";n=ar.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=ar.getInertBodyElement(r)}while(r!==o);var s=new mr,a=s.sanitizeChildren(_r(n)||n);return tn()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var u=_r(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}(this._doc,String(t)));case xr.STYLE:return t instanceof El?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),function(e){if(!(e=String(e).trim()))return"";var t=e.match(Tr);return t&&ir(t[1])===t[1]||e.match(wr)&&function(e){for(var t=!0,n=!0,r=0;r<e.length;r++){var i=e.charAt(r);"'"===i&&n?t=!t:'"'===i&&t&&(n=!n)}return t&&n}(e)?e:(tn()&&console.warn("WARNING: sanitizing unsafe style value "+e+" (see http://g.co/ng/security#xss)."),"unsafe")}(t));case xr.SCRIPT:if(t instanceof Ml)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"Script"),new Error("unsafe value used in a script context");case xr.URL:return t instanceof Pl||t instanceof Al?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"URL"),ir(String(t)));case xr.RESOURCE_URL:if(t instanceof Pl)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+e+" (see http://g.co/ng/security#xss)")}},t.prototype.checkNotSafeValue=function(e,t){if(e instanceof Cl)throw new Error("Required a safe "+t+", got a "+e.getTypeName()+" (see http://g.co/ng/security#xss)")},t.prototype.bypassSecurityTrustHtml=function(e){return new kl(e)},t.prototype.bypassSecurityTrustStyle=function(e){return new El(e)},t.prototype.bypassSecurityTrustScript=function(e){return new Ml(e)},t.prototype.bypassSecurityTrustUrl=function(e){return new Al(e)},t.prototype.bypassSecurityTrustResourceUrl=function(e){return new Pl(e)},t}(Il),Cl=function(){function e(e){this.changingThisBreaksApplicationSecurity=e}return e.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},e}(),kl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"HTML"},t}(Cl),El=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"Style"},t}(Cl),Ml=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"Script"},t}(Cl),Al=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"URL"},t}(Cl),Pl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"ResourceURL"},t}(Cl),Vl=rn(Zn,"browser",[{provide:bt,useValue:"browser"},{provide:vt,useValue:function(){Vu.makeCurrent(),ju.init()},multi:!0},{provide:ea,useClass:Lu,deps:[Ou]},{provide:Ou,useFactory:function(){return document},deps:[]}]);function Nl(){return new lt}var Ol=function(){function e(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return e.withServerTransition=function(t){return{ngModule:e,providers:[{provide:yt,useValue:t.appId},{provide:Bu,useExisting:yt},qu]}},e}();"undefined"!=typeof window&&window;var Rl=function(e,t){this.id=e,this.url=t},Ll=function(e){function t(t,n,r,i){void 0===r&&(r="imperative"),void 0===i&&(i=null);var o=e.call(this,t,n)||this;return o.navigationTrigger=r,o.restoredState=i,o}return i(t,e),t.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},t}(Rl),Fl=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.urlAfterRedirects=r,i}return i(t,e),t.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},t}(Rl),Bl=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.reason=r,i}return i(t,e),t.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},t}(Rl),ql=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.error=r,i}return i(t,e),t.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},t}(Rl),jl=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(t,e),t.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(Rl),$l=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(t,e),t.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(Rl),Ul=function(e){function t(t,n,r,i,o){var s=e.call(this,t,n)||this;return s.urlAfterRedirects=r,s.state=i,s.shouldActivate=o,s}return i(t,e),t.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},t}(Rl),Hl=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(t,e),t.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(Rl),zl=function(e){function t(t,n,r,i){var o=e.call(this,t,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return i(t,e),t.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},t}(Rl),Gl=function(){function e(e){this.route=e}return e.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},e}(),Wl=function(){function e(e){this.route=e}return e.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},e}(),Zl=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Kl=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Jl=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Xl=function(){function e(e){this.snapshot=e}return e.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},e}(),Yl="primary",Ql=function(){function e(e){this.params=e||{}}return e.prototype.has=function(e){return this.params.hasOwnProperty(e)},e.prototype.get=function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t[0]:t}return null},e.prototype.getAll=function(e){if(this.has(e)){var t=this.params[e];return Array.isArray(t)?t:[t]}return[]},Object.defineProperty(e.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),e}();function ec(e){return new Ql(e)}function tc(e,t,n){var r=n.path.split("/");if(r.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||r.length<e.length))return null;for(var i={},o=0;o<r.length;o++){var s=r[o],a=e[o];if(s.startsWith(":"))i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:e.slice(0,r.length),posParams:i}}var nc=function(e,t){this.routes=e,this.module=t};function rc(e,t){void 0===t&&(t="");for(var n=0;n<e.length;n++){var r=e[n];ic(r,oc(t,r))}}function ic(e,t){if(!e)throw new Error("\n      Invalid configuration of route '"+t+"': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    ");if(Array.isArray(e))throw new Error("Invalid configuration of route '"+t+"': Array cannot be specified");if(!e.component&&e.outlet&&e.outlet!==Yl)throw new Error("Invalid configuration of route '"+t+"': a componentless route cannot have a named outlet set");if(e.redirectTo&&e.children)throw new Error("Invalid configuration of route '"+t+"': redirectTo and children cannot be used together");if(e.redirectTo&&e.loadChildren)throw new Error("Invalid configuration of route '"+t+"': redirectTo and loadChildren cannot be used together");if(e.children&&e.loadChildren)throw new Error("Invalid configuration of route '"+t+"': children and loadChildren cannot be used together");if(e.redirectTo&&e.component)throw new Error("Invalid configuration of route '"+t+"': redirectTo and component cannot be used together");if(e.path&&e.matcher)throw new Error("Invalid configuration of route '"+t+"': path and matcher cannot be used together");if(void 0===e.redirectTo&&!e.component&&!e.children&&!e.loadChildren)throw new Error("Invalid configuration of route '"+t+"'. One of the following must be provided: component, redirectTo, children or loadChildren");if(void 0===e.path&&void 0===e.matcher)throw new Error("Invalid configuration of route '"+t+"': routes must have either a path or a matcher specified");if("string"==typeof e.path&&"/"===e.path.charAt(0))throw new Error("Invalid configuration of route '"+t+"': path cannot start with a slash");if(""===e.path&&void 0!==e.redirectTo&&void 0===e.pathMatch)throw new Error("Invalid configuration of route '{path: \""+t+'", redirectTo: "'+e.redirectTo+"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.");if(void 0!==e.pathMatch&&"full"!==e.pathMatch&&"prefix"!==e.pathMatch)throw new Error("Invalid configuration of route '"+t+"': pathMatch can only be set to 'prefix' or 'full'");e.children&&rc(e.children,t)}function oc(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:e+"/"+t.path:"":e}function sc(e){var t=e.children&&e.children.map(sc);return t?o({},e,{children:t}):o({},e)}function ac(e,t){var n,r=Object.keys(e),i=Object.keys(t);if(r.length!=i.length)return!1;for(var o=0;o<r.length;o++)if(e[n=r[o]]!==t[n])return!1;return!0}function uc(e){return Array.prototype.concat.apply([],e)}function lc(e){return e.length>0?e[e.length-1]:null}function cc(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function fc(e){return e.pipe(Q(),mu(function(e){return!0===e}))}function pc(e){return pt(e)?e:ft(e)?Z(Promise.resolve(e)):Xa(e)}function dc(e,t,n){return n?function(e,t){return ac(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!gc(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!t.children[r])return!1;if(!e(t.children[r],n.children[r]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(function(n){return t[n]===e[n]})}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,r,i){if(n.segments.length>i.length)return!!gc(s=n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!gc(n.segments,i))return!1;for(var o in r.children){if(!n.children[o])return!1;if(!e(n.children[o],r.children[o]))return!1}return!0}var s=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!!gc(n.segments,s)&&!!n.children[Yl]&&t(n.children[Yl],r,a)}(t,n,n.segments)}(e.root,t.root)}var hc=function(){function e(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}return Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=ec(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return wc.serialize(this)},e}(),yc=function(){function e(e,t){var n=this;this.segments=e,this.children=t,this.parent=null,cc(t,function(e,t){return e.parent=n})}return e.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(e.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return Tc(this)},e}(),mc=function(){function e(e,t){this.path=e,this.parameters=t}return Object.defineProperty(e.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=ec(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return kc(this)},e}();function gc(e,t){return e.length===t.length&&e.every(function(e,n){return e.path===t[n].path})}function vc(e,t){var n=[];return cc(e.children,function(e,r){r===Yl&&(n=n.concat(t(e,r)))}),cc(e.children,function(e,r){r!==Yl&&(n=n.concat(t(e,r)))}),n}var bc=function(){},_c=function(){function e(){}return e.prototype.parse=function(e){var t=new Vc(e);return new hc(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())},e.prototype.serialize=function(e){var t,n;return"/"+function e(t,n){if(!t.hasChildren())return Tc(t);if(n){var r=t.children[Yl]?e(t.children[Yl],!1):"",i=[];return cc(t.children,function(t,n){n!==Yl&&i.push(n+":"+e(t,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=vc(t,function(n,r){return r===Yl?[e(t.children[Yl],!1)]:[r+":"+e(n,!1)]});return Tc(t)+"/("+o.join("//")+")"}(e.root,!0)+(t=e.queryParams,(n=Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return Sc(e)+"="+Sc(t)}).join("&"):Sc(e)+"="+Sc(n)})).length?"?"+n.join("&"):"")+("string"==typeof e.fragment?"#"+encodeURI(e.fragment):"")},e}(),wc=new _c;function Tc(e){return e.segments.map(function(e){return kc(e)}).join("/")}function xc(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Sc(e){return xc(e).replace(/%3B/gi,";")}function Ic(e){return xc(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Dc(e){return decodeURIComponent(e)}function Cc(e){return Dc(e.replace(/\+/g,"%20"))}function kc(e){return""+Ic(e.path)+(t=e.parameters,Object.keys(t).map(function(e){return";"+Ic(e)+"="+Ic(t[e])}).join(""));var t}var Ec=/^[^\/()?;=#]+/;function Mc(e){var t=e.match(Ec);return t?t[0]:""}var Ac=/^[^=?&#]+/,Pc=/^[^?&#]+/,Vc=function(){function e(e){this.url=e,this.remaining=e}return e.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new yc([],{}):new yc([],this.parseChildren())},e.prototype.parseQueryParams=function(){var e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e},e.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null},e.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());var t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[Yl]=new yc(e,t)),n},e.prototype.parseSegment=function(){var e=Mc(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(e),new mc(Dc(e),this.parseMatrixParams())},e.prototype.parseMatrixParams=function(){for(var e={};this.consumeOptional(";");)this.parseParam(e);return e},e.prototype.parseParam=function(e){var t=Mc(this.remaining);if(t){this.capture(t);var n="";if(this.consumeOptional("=")){var r=Mc(this.remaining);r&&this.capture(n=r)}e[Dc(t)]=Dc(n)}},e.prototype.parseQueryParam=function(e){var t,n=(t=this.remaining.match(Ac))?t[0]:"";if(n){this.capture(n);var r="";if(this.consumeOptional("=")){var i=function(e){var t=e.match(Pc);return t?t[0]:""}(this.remaining);i&&this.capture(r=i)}var o=Cc(n),s=Cc(r);if(e.hasOwnProperty(o)){var a=e[o];Array.isArray(a)||(e[o]=a=[a]),a.push(s)}else e[o]=s}},e.prototype.parseParens=function(e){var t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=Mc(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i=Yl);var o=this.parseChildren();t[i]=1===Object.keys(o).length?o[Yl]:new yc([],o),this.consumeOptional("//")}return t},e.prototype.peekStartsWith=function(e){return this.remaining.startsWith(e)},e.prototype.consumeOptional=function(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)},e.prototype.capture=function(e){if(!this.consumeOptional(e))throw new Error('Expected "'+e+'".')},e}(),Nc=function(e){this.segmentGroup=e||null},Oc=function(e){this.urlTree=e};function Rc(e){return new M(function(t){return t.error(new Nc(e))})}function Lc(e){return new M(function(t){return t.error(new Oc(e))})}function Fc(e){return new M(function(t){return t.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+e+"'"))})}var Bc=function(){function e(e,t,n,r,i){this.configLoader=t,this.urlSerializer=n,this.urlTree=r,this.config=i,this.allowRedirects=!0,this.ngModule=e.get(Nt)}return e.prototype.apply=function(){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,Yl).pipe(H(function(t){return e.createUrlTree(t,e.urlTree.queryParams,e.urlTree.fragment)})).pipe(du(function(t){if(t instanceof Oc)return e.allowRedirects=!1,e.match(t.urlTree);if(t instanceof Nc)throw e.noMatchError(t);throw t}))},e.prototype.match=function(e){var t=this;return this.expandSegmentGroup(this.ngModule,this.config,e.root,Yl).pipe(H(function(n){return t.createUrlTree(n,e.queryParams,e.fragment)})).pipe(du(function(e){if(e instanceof Nc)throw t.noMatchError(e);throw e}))},e.prototype.noMatchError=function(e){return new Error("Cannot match any routes. URL Segment: '"+e.segmentGroup+"'")},e.prototype.createUrlTree=function(e,t,n){var r,i=e.segments.length>0?new yc([],((r={})[Yl]=e,r)):e;return new hc(i,t,n)},e.prototype.expandSegmentGroup=function(e,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(H(function(e){return new yc([],e)})):this.expandSegment(e,n,t,n.segments,r,!0)},e.prototype.expandChildren=function(e,t,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Xa({});var o=[],s=[],a={};return cc(n,function(n,i){var u,l,c=(u=i,l=n,r.expandSegmentGroup(e,t,l,u)).pipe(H(function(e){return a[i]=e}));i===Yl?o.push(c):s.push(c)}),Xa.apply(null,o.concat(s)).pipe(Tu(),pu(),H(function(){return a}))}(n.children)},e.prototype.expandSegment=function(e,t,n,r,i,o){var s=this;return Xa.apply(void 0,u(n)).pipe(H(function(a){return s.expandSegmentAgainstRoute(e,t,n,a,r,i,o).pipe(du(function(e){if(e instanceof Nc)return Xa(null);throw e}))}),Tu(),wu(function(e){return!!e}),du(function(e,n){if(e instanceof Ya||"EmptyError"===e.name){if(s.noLeftoversInUrl(t,r,i))return Xa(new yc([],{}));throw new Nc(t)}throw e}))},e.prototype.noLeftoversInUrl=function(e,t,n){return 0===t.length&&!e.children[n]},e.prototype.expandSegmentAgainstRoute=function(e,t,n,r,i,o,s){return Uc(r)!==o?Rc(t):void 0===r.redirectTo?this.matchSegmentAgainstRoute(e,t,r,i):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o):Rc(t)},e.prototype.expandSegmentAgainstRouteUsingRedirect=function(e,t,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,r,i,o)},e.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(e,t,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Lc(o):this.lineralizeSegments(n,o).pipe(K(function(n){var o=new yc(n,{});return i.expandSegment(e,o,t,n,r,!1)}))},e.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(e,t,n,r,i,o){var s=this,a=qc(t,r,i),u=a.consumedSegments,l=a.lastChild,c=a.positionalParamSegments;if(!a.matched)return Rc(t);var f=this.applyRedirectCommands(u,r.redirectTo,c);return r.redirectTo.startsWith("/")?Lc(f):this.lineralizeSegments(r,f).pipe(K(function(r){return s.expandSegment(e,t,n,r.concat(i.slice(l)),o,!1)}))},e.prototype.matchSegmentAgainstRoute=function(e,t,n,r){var i=this;if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(H(function(e){return n._loadedConfig=e,new yc(r,{})})):Xa(new yc(r,{}));var a=qc(t,n,r),u=a.consumedSegments,l=a.lastChild;if(!a.matched)return Rc(t);var c=r.slice(l);return this.getChildConfig(e,n).pipe(K(function(e){var n=e.module,r=e.routes,a=function(e,t,n,r){return n.length>0&&function(e,t,n){return r.some(function(n){return $c(e,t,n)&&Uc(n)!==Yl})}(e,n)?{segmentGroup:jc(new yc(t,function(e,t){var n,r,i={};i[Yl]=t;try{for(var o=s(e),a=o.next();!a.done;a=o.next()){var u=a.value;""===u.path&&Uc(u)!==Yl&&(i[Uc(u)]=new yc([],{}))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(r,new yc(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return r.some(function(n){return $c(e,t,n)})}(e,n)?{segmentGroup:jc(new yc(e.segments,function(e,t,n,r){var i,a,u={};try{for(var l=s(n),c=l.next();!c.done;c=l.next()){var f=c.value;$c(e,t,f)&&!r[Uc(f)]&&(u[Uc(f)]=new yc([],{}))}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o({},r,u)}(e,n,r,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,u,c,r),l=a.segmentGroup,f=a.slicedSegments;return 0===f.length&&l.hasChildren()?i.expandChildren(n,r,l).pipe(H(function(e){return new yc(u,e)})):0===r.length&&0===f.length?Xa(new yc(u,{})):i.expandSegment(n,l,r,f,Yl,!0).pipe(H(function(e){return new yc(u.concat(e.segments),e.children)}))}))},e.prototype.getChildConfig=function(e,t){var n=this;return t.children?Xa(new nc(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Xa(t._loadedConfig):function(e,t){var n=t.canLoad;return n&&0!==n.length?fc(Z(n).pipe(H(function(n){var r=e.get(n);return pc(r.canLoad?r.canLoad(t):r(t))}))):Xa(!0)}(e.injector,t).pipe(K(function(r){return r?n.configLoader.load(e.injector,t).pipe(H(function(e){return t._loadedConfig=e,e})):function(e){return new M(function(t){return t.error(((n=Error("NavigationCancelingError: Cannot load children because the guard of the route \"path: '"+e.path+"'\" returned false")).ngNavigationCancelingError=!0,n));var n})}(t)})):Xa(new nc([],e))},e.prototype.lineralizeSegments=function(e,t){for(var n=[],r=t.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Xa(n);if(r.numberOfChildren>1||!r.children[Yl])return Fc(e.redirectTo);r=r.children[Yl]}},e.prototype.applyRedirectCommands=function(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)},e.prototype.applyRedirectCreatreUrlTree=function(e,t,n,r){var i=this.createSegmentGroup(e,t.root,n,r);return new hc(i,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)},e.prototype.createQueryParams=function(e,t){var n={};return cc(e,function(e,r){if("string"==typeof e&&e.startsWith(":")){var i=e.substring(1);n[r]=t[i]}else n[r]=e}),n},e.prototype.createSegmentGroup=function(e,t,n,r){var i=this,o=this.createSegments(e,t.segments,n,r),s={};return cc(t.children,function(t,o){s[o]=i.createSegmentGroup(e,t,n,r)}),new yc(o,s)},e.prototype.createSegments=function(e,t,n,r){var i=this;return t.map(function(t){return t.path.startsWith(":")?i.findPosParam(e,t,r):i.findOrReturn(t,n)})},e.prototype.findPosParam=function(e,t,n){var r=n[t.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+e+"'. Cannot find '"+t.path+"'.");return r},e.prototype.findOrReturn=function(e,t){var n,r,i=0;try{for(var o=s(t),a=o.next();!a.done;a=o.next()){var u=a.value;if(u.path===e.path)return t.splice(i),u;i++}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e},e}();function qc(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(t.matcher||tc)(n,e,t);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function jc(e){if(1===e.numberOfChildren&&e.children[Yl]){var t=e.children[Yl];return new yc(e.segments.concat(t.segments),t.children)}return e}function $c(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Uc(e){return e.outlet||Yl}var Hc=function(){function e(e){this._root=e}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),e.prototype.parent=function(e){var t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null},e.prototype.children=function(e){var t=zc(e,this._root);return t?t.children.map(function(e){return e.value}):[]},e.prototype.firstChild=function(e){var t=zc(e,this._root);return t&&t.children.length>0?t.children[0].value:null},e.prototype.siblings=function(e){var t=Gc(e,this._root);return t.length<2?[]:t[t.length-2].children.map(function(e){return e.value}).filter(function(t){return t!==e})},e.prototype.pathFromRoot=function(e){return Gc(e,this._root).map(function(e){return e.value})},e}();function zc(e,t){if(e===t.value)return t;try{for(var n=s(t.children),r=n.next();!r.done;r=n.next()){var i=zc(e,r.value);if(i)return i}}catch(e){o={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}}return null;var o,a}function Gc(e,t){if(e===t.value)return[t];try{for(var n=s(t.children),r=n.next();!r.done;r=n.next()){var i=Gc(e,r.value);if(i.length)return i.unshift(t),i}}catch(e){o={error:e}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}}return[];var o,a}var Wc=function(){function e(e,t){this.value=e,this.children=t}return e.prototype.toString=function(){return"TreeNode("+this.value+")"},e}();function Zc(e){var t={};return e&&e.children.forEach(function(e){return t[e.value.outlet]=e}),t}var Kc=function(e){function t(t,n){var r=e.call(this,t)||this;return r.snapshot=n,tf(r,t),r}return i(t,e),t.prototype.toString=function(){return this.snapshot.toString()},t}(Hc);function Jc(e,t){var n=function(e,t){var n=new Qc([],{},{},"",{},Yl,t,null,e.root,-1,{});return new ef("",new Wc(n,[]))}(e,t),r=new Za([new mc("",{})]),i=new Za({}),o=new Za({}),s=new Za({}),a=new Za(""),u=new Xc(r,i,s,a,o,Yl,t,n.root);return u.snapshot=n.root,new Kc(new Wc(u,[]),n)}var Xc=function(){function e(e,t,n,r,i,o,s,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(e.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=this.params.pipe(H(function(e){return ec(e)}))),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(H(function(e){return ec(e)}))),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},e}();function Yc(e,t){void 0===t&&(t="emptyOnly");var n=e.pathFromRoot,r=0;if("always"!==t)for(r=n.length-1;r>=1;){var i=n[r],s=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(s.component)break;r--}}return function(e){return e.reduce(function(e,t){return{params:o({},e.params,t.params),data:o({},e.data,t.data),resolve:o({},e.resolve,t._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var Qc=function(){function e(e,t,n,r,i,o,s,a,u,l,c){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this.routeConfig=a,this._urlSegment=u,this._lastPathIndex=l,this._resolve=c}return Object.defineProperty(e.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=ec(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=ec(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"Route(url:'"+this.url.map(function(e){return e.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},e}(),ef=function(e){function t(t,n){var r=e.call(this,n)||this;return r.url=t,tf(r,n),r}return i(t,e),t.prototype.toString=function(){return nf(this._root)},t}(Hc);function tf(e,t){t.value._routerState=e,t.children.forEach(function(t){return tf(e,t)})}function nf(e){var t=e.children.length>0?" { "+e.children.map(nf).join(", ")+" } ":"";return""+e.value+t}function rf(e){if(e.snapshot){var t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,ac(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),ac(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!ac(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),ac(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function of(e,t){var n,r;return ac(e.params,t.params)&&gc(n=e.url,r=t.url)&&n.every(function(e,t){return ac(e.parameters,r[t].parameters)})&&!(!e.parent!=!t.parent)&&(!e.parent||of(e.parent,t.parent))}function sf(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function af(e,t,n,r,i){var o={};return r&&cc(r,function(e,t){o[t]=Array.isArray(e)?e.map(function(e){return""+e}):""+e}),new hc(n.root===e?t:function e(t,n,r){var i={};return cc(t.children,function(t,o){i[o]=t===n?r:e(t,n,r)}),new yc(t.segments,i)}(n.root,e,t),o,i)}var uf=function(){function e(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&sf(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(e){return"object"==typeof e&&null!=e&&e.outlets});if(r&&r!==lc(n))throw new Error("{outlets:{}} has to be the last command")}return e.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},e}(),lf=function(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n};function cf(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets[Yl]:""+e}function ff(e,t,n){if(e||(e=new yc([],{})),0===e.segments.length&&e.hasChildren())return pf(e,t,n);var r=function(e,t,n){for(var r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};i<e.segments.length;){if(r>=n.length)return o;var s=e.segments[i],a=cf(n[r]),u=r<n.length-1?n[r+1]:null;if(i>0&&void 0===a)break;if(a&&u&&"object"==typeof u&&void 0===u.outlets){if(!mf(a,u,s))return o;r+=2}else{if(!mf(a,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<e.segments.length){var o=new yc(e.segments.slice(0,r.pathIndex),{});return o.children[Yl]=new yc(e.segments.slice(r.pathIndex),e.children),pf(o,0,i)}return r.match&&0===i.length?new yc(e.segments,{}):r.match&&!e.hasChildren()?df(e,t,n):r.match?pf(e,0,i):df(e,t,n)}function pf(e,t,n){if(0===n.length)return new yc(e.segments,{});var r=function(e){return"object"!=typeof e[0]?((t={})[Yl]=e,t):void 0===e[0].outlets?((n={})[Yl]=e,n):e[0].outlets;var t,n}(n),i={};return cc(r,function(n,r){null!==n&&(i[r]=ff(e.children[r],t,n))}),cc(e.children,function(e,t){void 0===r[t]&&(i[t]=e)}),new yc(e.segments,i)}function df(e,t,n){for(var r=e.segments.slice(0,t),i=0;i<n.length;){if("object"==typeof n[i]&&void 0!==n[i].outlets){var o=hf(n[i].outlets);return new yc(r,o)}if(0===i&&sf(n[0]))r.push(new mc(e.segments[t].path,n[0])),i++;else{var s=cf(n[i]),a=i<n.length-1?n[i+1]:null;s&&a&&sf(a)?(r.push(new mc(s,yf(a))),i+=2):(r.push(new mc(s,{})),i++)}}return new yc(r,{})}function hf(e){var t={};return cc(e,function(e,n){null!==e&&(t[n]=df(new yc([],{}),0,e))}),t}function yf(e){var t={};return cc(e,function(e,n){return t[n]=""+e}),t}function mf(e,t,n){return e==n.path&&ac(t,n.parameters)}var gf=function(e){this.path=e,this.route=this.path[this.path.length-1]},vf=function(e,t){this.component=e,this.route=t},bf=function(){function e(e,t,n,r){this.future=e,this.curr=t,this.moduleInjector=n,this.forwardEvent=r,this.canActivateChecks=[],this.canDeactivateChecks=[]}return e.prototype.initialize=function(e){var t=this.future._root;this.setupChildRouteGuards(t,this.curr?this.curr._root:null,e,[t.value])},e.prototype.checkGuards=function(){var e=this;return this.isDeactivating()||this.isActivating()?this.runCanDeactivateChecks().pipe(K(function(t){return t?e.runCanActivateChecks():Xa(!1)})):Xa(!0)},e.prototype.resolveData=function(e){var t=this;return this.isActivating()?Z(this.canActivateChecks).pipe(Qa(function(n){return t.runResolve(n.route,e)}),function(e,t){return arguments.length>=2?function(n){return k(xu(e,t),iu(1),lu(t))(n)}:function(t){return k(xu(function(t,n,r){return e(t,n,r+1)}),iu(1))(t)}}(function(e,t){return e})):Xa(null)},e.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},e.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},e.prototype.setupChildRouteGuards=function(e,t,n,r){var i=this,o=Zc(t);e.children.forEach(function(e){i.setupRouteGuards(e,o[e.value.outlet],n,r.concat([e.value])),delete o[e.value.outlet]}),cc(o,function(e,t){return i.deactivateRouteAndItsChildren(e,n.getContext(t))})},e.prototype.setupRouteGuards=function(e,t,n,r){var i=e.value,o=t?t.value:null,s=n?n.getContext(e.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var a=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);a?this.canActivateChecks.push(new gf(r)):(i.data=o.data,i._resolvedData=o._resolvedData),this.setupChildRouteGuards(e,t,i.component?s?s.children:null:n,r),a&&this.canDeactivateChecks.push(new vf(s.outlet.component,o))}else o&&this.deactivateRouteAndItsChildren(t,s),this.canActivateChecks.push(new gf(r)),this.setupChildRouteGuards(e,null,i.component?s?s.children:null:n,r)},e.prototype.shouldRunGuardsAndResolvers=function(e,t,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!of(e,t)||!ac(e.queryParams,t.queryParams);case"paramsChange":default:return!of(e,t)}},e.prototype.deactivateRouteAndItsChildren=function(e,t){var n=this,r=Zc(e),i=e.value;cc(r,function(e,r){n.deactivateRouteAndItsChildren(e,i.component?t?t.children.getContext(r):null:t)}),this.canDeactivateChecks.push(new vf(i.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,i))},e.prototype.runCanDeactivateChecks=function(){var e=this;return Z(this.canDeactivateChecks).pipe(K(function(t){return e.runCanDeactivate(t.component,t.route)}),mu(function(e){return!0===e}))},e.prototype.runCanActivateChecks=function(){var e=this;return Z(this.canActivateChecks).pipe(Qa(function(t){return fc(Z([e.fireChildActivationStart(t.route.parent),e.fireActivationStart(t.route),e.runCanActivateChild(t.path),e.runCanActivate(t.route)]))}),mu(function(e){return!0===e}))},e.prototype.fireActivationStart=function(e){return null!==e&&this.forwardEvent&&this.forwardEvent(new Jl(e)),Xa(!0)},e.prototype.fireChildActivationStart=function(e){return null!==e&&this.forwardEvent&&this.forwardEvent(new Zl(e)),Xa(!0)},e.prototype.runCanActivate=function(e){var t=this,n=e.routeConfig?e.routeConfig.canActivate:null;return n&&0!==n.length?fc(Z(n).pipe(H(function(n){var r=t.getToken(n,e);return pc(r.canActivate?r.canActivate(e,t.future):r(e,t.future)).pipe(wu())}))):Xa(!0)},e.prototype.runCanActivateChild=function(e){var t=this,n=e[e.length-1];return fc(Z(e.slice(0,e.length-1).reverse().map(function(e){return t.extractCanActivateChild(e)}).filter(function(e){return null!==e})).pipe(H(function(e){return fc(Z(e.guards).pipe(H(function(r){var i=t.getToken(r,e.node);return pc(i.canActivateChild?i.canActivateChild(n,t.future):i(n,t.future)).pipe(wu())})))})))},e.prototype.extractCanActivateChild=function(e){var t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null},e.prototype.runCanDeactivate=function(e,t){var n=this,r=t&&t.routeConfig?t.routeConfig.canDeactivate:null;return r&&0!==r.length?Z(r).pipe(K(function(r){var i=n.getToken(r,t);return pc(i.canDeactivate?i.canDeactivate(e,t,n.curr,n.future):i(e,t,n.curr,n.future)).pipe(wu())})).pipe(mu(function(e){return!0===e})):Xa(!0)},e.prototype.runResolve=function(e,t){return this.resolveNode(e._resolve,e).pipe(H(function(n){return e._resolvedData=n,e.data=o({},e.data,Yc(e,t).resolve),null}))},e.prototype.resolveNode=function(e,t){var n=this,r=Object.keys(e);if(0===r.length)return Xa({});if(1===r.length){var i=r[0];return this.getResolver(e[i],t).pipe(H(function(e){return(t={})[i]=e,t;var t}))}var o={};return Z(r).pipe(K(function(r){return n.getResolver(e[r],t).pipe(H(function(e){return o[r]=e,e}))})).pipe(pu(),H(function(){return o}))},e.prototype.getResolver=function(e,t){var n=this.getToken(e,t);return pc(n.resolve?n.resolve(t,this.future):n(t,this.future))},e.prototype.getToken=function(e,t){var n=function(e){if(!e)return null;for(var t=e.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(t);return(n?n.module.injector:this.moduleInjector).get(e)},e}(),_f=function(){},wf=function(){function e(e,t,n,r,i){this.rootComponentType=e,this.config=t,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i}return e.prototype.recognize=function(){try{var e=Sf(this.urlTree.root,[],[],this.config).segmentGroup,t=this.processSegmentGroup(this.config,e,Yl),n=new Qc([],Object.freeze({}),Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,{},Yl,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Wc(n,t),i=new ef(this.url,r);return this.inheritParamsAndData(i._root),Xa(i)}catch(e){return new M(function(t){return t.error(e)})}},e.prototype.inheritParamsAndData=function(e){var t=this,n=e.value,r=Yc(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),e.children.forEach(function(e){return t.inheritParamsAndData(e)})},e.prototype.processSegmentGroup=function(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)},e.prototype.processChildren=function(e,t){var n,r=this,i=vc(t,function(t,n){return r.processSegmentGroup(e,t,n)});return n={},i.forEach(function(e){var t=n[e.value.outlet];if(t){var r=t.url.map(function(e){return e.toString()}).join("/"),i=e.value.url.map(function(e){return e.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[e.value.outlet]=e.value}),i.sort(function(e,t){return e.value.outlet===Yl?-1:t.value.outlet===Yl?1:e.value.outlet.localeCompare(t.value.outlet)}),i},e.prototype.processSegment=function(e,t,n,r){try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;try{return this.processSegmentAgainstRoute(a,t,n,r)}catch(e){if(!(e instanceof _f))throw e}}}catch(e){u={error:e}}finally{try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(u)throw u.error}}if(this.noLeftoversInUrl(t,n,r))return[];throw new _f;var u,l},e.prototype.noLeftoversInUrl=function(e,t,n){return 0===t.length&&!e.children[n]},e.prototype.processSegmentAgainstRoute=function(e,t,n,r){if(e.redirectTo)throw new _f;if((e.outlet||Yl)!==r)throw new _f;var i,s=[],a=[];if("**"===e.path){var u=n.length>0?lc(n).parameters:{};i=new Qc(n,u,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Cf(e),r,e.component,e,Tf(t),xf(t)+n.length,kf(e))}else{var l=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new _f;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(t.matcher||tc)(n,e,t);if(!r)throw new _f;var i={};cc(r.posParams,function(e,t){i[t]=e.path});var s=r.consumed.length>0?o({},i,r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s}}(t,e,n);s=l.consumedSegments,a=n.slice(l.lastChild),i=new Qc(s,l.parameters,Object.freeze(o({},this.urlTree.queryParams)),this.urlTree.fragment,Cf(e),r,e.component,e,Tf(t),xf(t)+s.length,kf(e))}var c=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),f=Sf(t,s,a,c),p=f.segmentGroup,d=f.slicedSegments;if(0===d.length&&p.hasChildren()){var h=this.processChildren(c,p);return[new Wc(i,h)]}if(0===c.length&&0===d.length)return[new Wc(i,[])];var y=this.processSegment(c,p,d,Yl);return[new Wc(i,y)]},e}();function Tf(e){for(var t=e;t._sourceSegment;)t=t._sourceSegment;return t}function xf(e){for(var t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;t._sourceSegment;)n+=(t=t._sourceSegment)._segmentIndexShift?t._segmentIndexShift:0;return n-1}function Sf(e,t,n,r){if(n.length>0&&function(e,t,n){return r.some(function(n){return If(e,t,n)&&Df(n)!==Yl})}(e,n)){var i=new yc(t,function(e,t,n,r){var i,o,a={};a[Yl]=r,r._sourceSegment=e,r._segmentIndexShift=t.length;try{for(var u=s(n),l=u.next();!l.done;l=u.next()){var c=l.value;if(""===c.path&&Df(c)!==Yl){var f=new yc([],{});f._sourceSegment=e,f._segmentIndexShift=t.length,a[Df(c)]=f}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return a}(e,t,r,new yc(n,e.children)));return i._sourceSegment=e,i._segmentIndexShift=t.length,{segmentGroup:i,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return r.some(function(n){return If(e,t,n)})}(e,n)){var a=new yc(e.segments,function(e,t,n,r){var i,a,u={};try{for(var l=s(n),c=l.next();!c.done;c=l.next()){var f=c.value;if(If(e,t,f)&&!r[Df(f)]){var p=new yc([],{});p._sourceSegment=e,p._segmentIndexShift=e.segments.length,u[Df(f)]=p}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o({},r,u)}(e,n,r,e.children));return a._sourceSegment=e,a._segmentIndexShift=t.length,{segmentGroup:a,slicedSegments:n}}var u=new yc(e.segments,e.children);return u._sourceSegment=e,u._segmentIndexShift=t.length,{segmentGroup:u,slicedSegments:n}}function If(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Df(e){return e.outlet||Yl}function Cf(e){return e.data||{}}function kf(e){return e.resolve||{}}var Ef=function(){},Mf=function(){function e(){}return e.prototype.shouldDetach=function(e){return!1},e.prototype.store=function(e,t){},e.prototype.shouldAttach=function(e){return!1},e.prototype.retrieve=function(e){return null},e.prototype.shouldReuseRoute=function(e,t){return e.routeConfig===t.routeConfig},e}(),Af=new de("ROUTES"),Pf=function(){function e(e,t,n,r){this.loader=e,this.compiler=t,this.onLoadStartListener=n,this.onLoadEndListener=r}return e.prototype.load=function(e,t){var n=this;return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(H(function(r){n.onLoadEndListener&&n.onLoadEndListener(t);var i=r.create(e);return new nc(uc(i.injector.get(Af)).map(sc),i)}))},e.prototype.loadModuleFactory=function(e){var t=this;return"string"==typeof e?Z(this.loader.load(e)):pc(e()).pipe(K(function(e){return e instanceof Ot?Xa(e):Z(t.compiler.compileModuleAsync(e))}))},e}(),Vf=function(){},Nf=function(){function e(){}return e.prototype.shouldProcessUrl=function(e){return!0},e.prototype.extract=function(e){return e},e.prototype.merge=function(e,t){return e},e}();function Of(e){throw e}function Rf(e){return Xa(null)}var Lf=function(){function e(e,t,n,r,i,o,s,a){var u=this;this.rootComponentType=e,this.urlSerializer=t,this.rootContexts=n,this.location=r,this.config=a,this.navigations=new Za(null),this.navigationId=0,this.events=new re,this.errorHandler=Of,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Rf,afterPreactivation:Rf},this.urlHandlingStrategy=new Nf,this.routeReuseStrategy=new Mf,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.ngModule=i.get(Nt),this.resetConfig(a),this.currentUrlTree=new hc(new yc([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new Pf(o,s,function(e){return u.triggerEvent(new Gl(e))},function(e){return u.triggerEvent(new Wl(e))}),this.routerState=Jc(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return e.prototype.resetRootComponentType=function(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType},e.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},e.prototype.setUpLocationChangeListener=function(){var e=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(t){var n=e.urlSerializer.parse(t.url),r="popstate"===t.type?"popstate":"hashchange",i=t.state&&t.state.navigationId?{navigationId:t.state.navigationId}:null;setTimeout(function(){e.scheduleNavigation(n,r,i,{replaceUrl:!0})},0)}))},Object.defineProperty(e.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),e.prototype.triggerEvent=function(e){this.events.next(e)},e.prototype.resetConfig=function(e){rc(e),this.config=e.map(sc),this.navigated=!1,this.lastSuccessfulId=-1},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},e.prototype.createUrlTree=function(e,t){void 0===t&&(t={});var n=t.relativeTo,r=t.queryParams,i=t.fragment,s=t.preserveQueryParams,a=t.queryParamsHandling,l=t.preserveFragment;tn()&&s&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var c=n||this.routerState.root,f=l?this.currentUrlTree.fragment:i,p=null;if(a)switch(a){case"merge":p=o({},this.currentUrlTree.queryParams,r);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=r||null}else p=s?this.currentUrlTree.queryParams:r||null;return null!==p&&(p=this.removeEmptyProps(p)),function(e,t,n,r,i){if(0===n.length)return af(t.root,t.root,t,r,i);var o=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new uf(!0,0,e);var t=0,n=!1,r=e.reduce(function(e,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return cc(r.outlets,function(e,t){o[t]="string"==typeof e?e.split("/"):e}),u(e,[{outlets:o}])}if(r.segmentPath)return u(e,[r.segmentPath])}return"string"!=typeof r?u(e,[r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?t++:""!=r&&e.push(r))}),e):u(e,[r])},[]);return new uf(n,t,r)}(n);if(o.toRoot())return af(t.root,new yc([],{}),t,r,i);var s=function(e,n,r){if(e.isAbsolute)return new lf(t.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new lf(r.snapshot._urlSegment,!0,0);var i=sf(e.commands[0])?0:1;return function(t,n,o){for(var s=r.snapshot._urlSegment,a=r.snapshot._lastPathIndex+i,u=e.numberOfDoubleDots;u>a;){if(u-=a,!(s=s.parent))throw new Error("Invalid number of '../'");a=s.segments.length}return new lf(s,!1,a-u)}()}(o,0,e),a=s.processChildren?pf(s.segmentGroup,s.index,o.commands):ff(s.segmentGroup,s.index,o.commands);return af(s.segmentGroup,a,t,r,i)}(c,this.currentUrlTree,e,p,f)},e.prototype.navigateByUrl=function(e,t){void 0===t&&(t={skipLocationChange:!1});var n=e instanceof hc?e:this.parseUrl(e),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",null,t)},e.prototype.navigate=function(e,t){return void 0===t&&(t={skipLocationChange:!1}),function(e){for(var t=0;t<e.length;t++){var n=e[t];if(null==n)throw new Error("The requested path contains "+n+" segment at index "+t)}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)},e.prototype.serializeUrl=function(e){return this.urlSerializer.serialize(e)},e.prototype.parseUrl=function(e){return this.urlSerializer.parse(e)},e.prototype.isActive=function(e,t){if(e instanceof hc)return dc(this.currentUrlTree,e,t);var n=this.urlSerializer.parse(e);return dc(this.currentUrlTree,n,t)},e.prototype.removeEmptyProps=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null!==r&&void 0!==r&&(t[n]=r),t},{})},e.prototype.processNavigations=function(){var e=this;this.navigations.pipe(Qa(function(t){return t?(e.executeScheduledNavigation(t),t.promise.catch(function(){})):Xa(null)})).subscribe(function(){})},e.prototype.scheduleNavigation=function(e,t,n,r){var i=this.navigations.value;if(i&&"imperative"!==t&&"imperative"===i.source&&i.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(i&&"hashchange"==t&&"popstate"===i.source&&i.rawUrl.toString()===e.toString())return Promise.resolve(!0);if(i&&"popstate"==t&&"hashchange"===i.source&&i.rawUrl.toString()===e.toString())return Promise.resolve(!0);var o=null,s=null,a=new Promise(function(e,t){o=e,s=t}),u=++this.navigationId;return this.navigations.next({id:u,source:t,state:n,rawUrl:e,extras:r,resolve:o,reject:s,promise:a}),a.catch(function(e){return Promise.reject(e)})},e.prototype.executeScheduledNavigation=function(e){var t=this,n=e.id,r=e.rawUrl,i=e.extras,o=e.resolve,s=e.reject,a=e.source,u=e.state,l=this.urlHandlingStrategy.extract(r),c=!this.navigated||l.toString()!==this.currentUrlTree.toString();("reload"===this.onSameUrlNavigation||c)&&this.urlHandlingStrategy.shouldProcessUrl(r)?(this.events.next(new Ll(n,this.serializeUrl(l),a,u)),Promise.resolve().then(function(e){return t.runNavigate(l,r,!!i.skipLocationChange,!!i.replaceUrl,n,null)}).then(o,s)):c&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)?(this.events.next(new Ll(n,this.serializeUrl(l),a,u)),Promise.resolve().then(function(e){return t.runNavigate(l,r,!1,!1,n,Jc(l,t.rootComponentType).snapshot)}).then(o,s)):(this.rawUrlTree=r,o(null))},e.prototype.runNavigate=function(e,t,n,r,i,o){var a=this;return i!==this.navigationId?(this.events.next(new Bl(i,this.serializeUrl(e),"Navigation ID "+i+" is not equal to the current navigation id "+this.navigationId)),Promise.resolve(!1)):new Promise(function(u,l){var c,f=(o?Xa({appliedUrl:e,snapshot:o}):new Bc(a.ngModule.injector,a.configLoader,a.urlSerializer,e,a.config).apply().pipe(K(function(t){return function(e,t,n,r,i){return void 0===i&&(i="emptyOnly"),new wf(e,t,n,r,i).recognize()}(a.rootComponentType,a.config,t,a.serializeUrl(t),a.paramsInheritanceStrategy).pipe(H(function(n){return a.events.next(new jl(i,a.serializeUrl(e),a.serializeUrl(t),n)),{appliedUrl:t,snapshot:n}}))}))).pipe(K(function(e){return"boolean"==typeof e?Xa(e):a.hooks.beforePreactivation(e.snapshot).pipe(H(function(){return e}))})).pipe(H(function(e){if("boolean"==typeof e)return e;var t=e.appliedUrl,n=e.snapshot;return(c=new bf(n,a.routerState.snapshot,a.ngModule.injector,function(e){return a.triggerEvent(e)})).initialize(a.rootContexts),{appliedUrl:t,snapshot:n}})).pipe(K(function(t){if("boolean"==typeof t||a.navigationId!==i)return Xa(!1);var n=t.appliedUrl,r=t.snapshot;return a.triggerEvent(new $l(i,a.serializeUrl(e),a.serializeUrl(n),r)),c.checkGuards().pipe(H(function(t){return a.triggerEvent(new Ul(i,a.serializeUrl(e),a.serializeUrl(n),r,t)),{appliedUrl:n,snapshot:r,shouldActivate:t}}))})).pipe(K(function(t){return"boolean"==typeof t||a.navigationId!==i?Xa(!1):t.shouldActivate&&c.isActivating()?(a.triggerEvent(new Hl(i,a.serializeUrl(e),a.serializeUrl(t.appliedUrl),t.snapshot)),c.resolveData(a.paramsInheritanceStrategy).pipe(H(function(){return a.triggerEvent(new zl(i,a.serializeUrl(e),a.serializeUrl(t.appliedUrl),t.snapshot)),t}))):Xa(t)})).pipe(K(function(e){return"boolean"==typeof e||a.navigationId!==i?Xa(!1):a.hooks.afterPreactivation(e.snapshot).pipe(H(function(){return e}))})).pipe(H(function(e){if("boolean"==typeof e||a.navigationId!==i)return!1;var t,n,r,o=e.appliedUrl,u=e.shouldActivate;return u?{appliedUrl:o,state:(r=function e(t,n,r){if(r&&t.shouldReuseRoute(n.value,r.value.snapshot)){(l=r.value)._futureSnapshot=n.value;var i=function(t,n,r){return n.children.map(function(n){try{for(var i=s(r.children),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.shouldReuseRoute(a.value.snapshot,n.value))return e(t,n,a)}}catch(e){u={error:e}}finally{try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(u)throw u.error}}return e(t,n);var u,l})}(t,n,r);return new Wc(l,i)}var o=t.retrieve(n.value);if(o){var a=o.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(var r=0;r<t.children.length;++r)e(t.children[r],n.children[r])}(n,a),a}var u,l=new Xc(new Za((u=n.value).url),new Za(u.params),new Za(u.queryParams),new Za(u.fragment),new Za(u.data),u.outlet,u.component,u);return i=n.children.map(function(n){return e(t,n)}),new Wc(l,i)}(a.routeReuseStrategy,(t=e.snapshot)._root,(n=a.routerState)?n._root:void 0),new Kc(r,t)),shouldActivate:u}:{appliedUrl:o,state:null,shouldActivate:u}}));a.activateRoutes(f,a.routerState,a.currentUrlTree,i,e,t,n,r,u,l)})},e.prototype.activateRoutes=function(e,t,n,r,i,o,s,a,u,l){var c,f=this;e.forEach(function(e){if("boolean"!=typeof e&&e.shouldActivate&&r===f.navigationId&&e.state){var n=e.state;if(f.currentUrlTree=e.appliedUrl,f.rawUrlTree=f.urlHandlingStrategy.merge(f.currentUrlTree,o),f.routerState=n,!s){var i=f.urlSerializer.serialize(f.rawUrlTree);f.location.isCurrentPathEqualTo(i)||a?f.location.replaceState(i,"",{navigationId:r}):f.location.go(i,"",{navigationId:r})}new Ff(f.routeReuseStrategy,n,t,function(e){return f.triggerEvent(e)}).activate(f.rootContexts),c=!0}else c=!1}).then(function(){c?(f.navigated=!0,f.lastSuccessfulId=r,f.events.next(new Fl(r,f.serializeUrl(i),f.serializeUrl(f.currentUrlTree))),u(!0)):(f.resetUrlToCurrentUrlTree(),f.events.next(new Bl(r,f.serializeUrl(i),"")),u(!1))},function(e){if((s=e)&&s.ngNavigationCancelingError)f.navigated=!0,f.resetStateAndUrl(t,n,o),f.events.next(new Bl(r,f.serializeUrl(i),e.message)),u(!1);else{f.resetStateAndUrl(t,n,o),f.events.next(new ql(r,f.serializeUrl(i),e));try{u(f.errorHandler(e))}catch(e){l(e)}}var s})},e.prototype.resetStateAndUrl=function(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()},e.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})},e}(),Ff=function(){function e(e,t,n,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r}return e.prototype.activate=function(e){var t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),rf(this.futureState.root),this.activateChildRoutes(t,n,e)},e.prototype.deactivateChildRoutes=function(e,t,n){var r=this,i=Zc(t);e.children.forEach(function(e){var t=e.value.outlet;r.deactivateRoutes(e,i[t],n),delete i[t]}),cc(i,function(e,t){r.deactivateRouteAndItsChildren(e,n)})},e.prototype.deactivateRoutes=function(e,t,n){var r=e.value,i=t?t.value:null;if(r===i)if(r.component){var o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(e,t,o.children)}else this.deactivateChildRoutes(e,t,n);else i&&this.deactivateRouteAndItsChildren(t,n)},e.prototype.deactivateRouteAndItsChildren=function(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)},e.prototype.detachAndStoreRouteSubtree=function(e,t){var n=t.getContext(e.value.outlet);if(n&&n.outlet){var r=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:r,route:e,contexts:i})}},e.prototype.deactivateRouteAndOutlet=function(e,t){var n=this,r=t.getContext(e.value.outlet);if(r){var i=Zc(e),o=e.value.component?r.children:t;cc(i,function(e,t){return n.deactivateRouteAndItsChildren(e,o)}),r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated())}},e.prototype.activateChildRoutes=function(e,t,n){var r=this,i=Zc(t);e.children.forEach(function(e){r.activateRoutes(e,i[e.value.outlet],n),r.forwardEvent(new Xl(e.value.snapshot))}),e.children.length&&this.forwardEvent(new Kl(e.value.snapshot))},e.prototype.activateRoutes=function(e,t,n){var r=e.value,i=t?t.value:null;if(rf(r),r===i)if(r.component){var o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,o.children)}else this.activateChildRoutes(e,t,n);else if(r.component)if(o=n.getOrCreateContext(r.outlet),this.routeReuseStrategy.shouldAttach(r.snapshot)){var s=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(s.contexts),o.attachRef=s.componentRef,o.route=s.route.value,o.outlet&&o.outlet.attach(s.componentRef,s.route.value),Bf(s.route)}else{var a=function(e){for(var t=r.snapshot.parent;t;t=t.parent){var n=t.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(),u=a?a.module.componentFactoryResolver:null;o.route=r,o.resolver=u,o.outlet&&o.outlet.activateWith(r,u),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,n)},e}();function Bf(e){rf(e.value),e.children.forEach(Bf)}var qf=function(){return function(){this.outlet=null,this.route=null,this.resolver=null,this.children=new jf,this.attachRef=null}}(),jf=function(){function e(){this.contexts=new Map}return e.prototype.onChildOutletCreated=function(e,t){var n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)},e.prototype.onChildOutletDestroyed=function(e){var t=this.getContext(e);t&&(t.outlet=null)},e.prototype.onOutletDeactivated=function(){var e=this.contexts;return this.contexts=new Map,e},e.prototype.onOutletReAttached=function(e){this.contexts=e},e.prototype.getOrCreateContext=function(e){var t=this.getContext(e);return t||(t=new qf,this.contexts.set(e,t)),t},e.prototype.getContext=function(e){return this.contexts.get(e)||null},e}(),$f=function(){function e(e,t,n,r,i){this.parentContexts=e,this.location=t,this.resolver=n,this.changeDetector=i,this.activated=null,this._activatedRoute=null,this.activateEvents=new qt,this.deactivateEvents=new qt,this.name=r||Yl,e.onChildOutletCreated(this.name,this)}return e.prototype.ngOnDestroy=function(){this.parentContexts.onChildOutletDestroyed(this.name)},e.prototype.ngOnInit=function(){if(!this.activated){var e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}},Object.defineProperty(e.prototype,"isActivated",{get:function(){return!!this.activated},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRoute",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activatedRouteData",{get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}},enumerable:!0,configurable:!0}),e.prototype.detach=function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var e=this.activated;return this.activated=null,this._activatedRoute=null,e},e.prototype.attach=function(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)},e.prototype.deactivate=function(){if(this.activated){var e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}},e.prototype.activateWith=function(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;var n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,i=new Uf(e,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,i),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)},e}(),Uf=function(){function e(e,t,n){this.route=e,this.childContexts=t,this.parent=n}return e.prototype.get=function(e,t){return e===Xc?this.route:e===jf?this.childContexts:this.parent.get(e,t)},e}(),Hf=function(){},zf=function(){function e(){}return e.prototype.preload=function(e,t){return t().pipe(du(function(){return Xa(null)}))},e}(),Gf=function(){function e(){}return e.prototype.preload=function(e,t){return Xa(null)},e}(),Wf=function(){function e(e,t,n,r,i){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=new Pf(t,n,function(t){return e.triggerEvent(new Gl(t))},function(t){return e.triggerEvent(new Wl(t))})}return e.prototype.setUpPreloading=function(){var e=this;this.subscription=this.router.events.pipe(eu(function(e){return e instanceof Fl}),Qa(function(){return e.preload()})).subscribe(function(){})},e.prototype.preload=function(){var e=this.injector.get(Nt);return this.processRoutes(e,this.router.config)},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.processRoutes=function(e,t){var n,r,i=[];try{for(var o=s(t),a=o.next();!a.done;a=o.next()){var u=a.value;if(u.loadChildren&&!u.canLoad&&u._loadedConfig){var l=u._loadedConfig;i.push(this.processRoutes(l.module,l.routes))}else u.loadChildren&&!u.canLoad?i.push(this.preloadConfig(e,u)):u.children&&i.push(this.processRoutes(e,u.children))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return Z(i).pipe(Q(),H(function(e){}))},e.prototype.preloadConfig=function(e,t){var n=this;return this.preloadingStrategy.preload(t,function(){return n.loader.load(e.injector,t).pipe(K(function(e){return t._loadedConfig=e,n.processRoutes(e.module,e.routes)}))})},e}(),Zf=new de("ROUTER_CONFIGURATION"),Kf=new de("ROUTER_FORROOT_GUARD"),Jf=[ia,{provide:bc,useClass:_c},{provide:Lf,useFactory:np,deps:[un,bc,jf,ia,Be,hn,xt,Af,Zf,[Vf,new Pe],[Ef,new Pe]]},jf,{provide:Xc,useFactory:rp,deps:[Lf]},{provide:hn,useClass:vn},Wf,Gf,zf,{provide:Zf,useValue:{enableTracing:!1}}];function Xf(){return new nn("Router",Lf)}var Yf=function(){function e(e,t){}return e.forRoot=function(t,n){return{ngModule:e,providers:[Jf,tp(t),{provide:Kf,useFactory:ep,deps:[[Lf,new Pe,new Ne]]},{provide:Zf,useValue:n||{}},{provide:na,useFactory:Qf,deps:[ea,[new Ae(ra),new Pe],Zf]},{provide:Hf,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Gf},{provide:nn,multi:!0,useFactory:Xf},[ip,{provide:dt,multi:!0,useFactory:op,deps:[ip]},{provide:ap,useFactory:sp,deps:[ip]},{provide:_t,multi:!0,useExisting:ap}]]}},e.forChild=function(t){return{ngModule:e,providers:[tp(t)]}},e}();function Qf(e,t,n){return void 0===n&&(n={}),n.useHash?new sa(e,t):new aa(e,t)}function ep(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function tp(e){return[{provide:me,multi:!0,useValue:e},{provide:Af,multi:!0,useValue:e}]}function np(e,t,n,r,i,o,s,a,u,l,c){void 0===u&&(u={});var f=new Lf(null,t,n,r,i,o,s,uc(a));if(l&&(f.urlHandlingStrategy=l),c&&(f.routeReuseStrategy=c),u.errorHandler&&(f.errorHandler=u.errorHandler),u.enableTracing){var p=Cu();f.events.subscribe(function(e){p.logGroup("Router Event: "+e.constructor.name),p.log(e.toString()),p.log(e),p.logGroupEnd()})}return u.onSameUrlNavigation&&(f.onSameUrlNavigation=u.onSameUrlNavigation),u.paramsInheritanceStrategy&&(f.paramsInheritanceStrategy=u.paramsInheritanceStrategy),f}function rp(e){return e.routerState.root}var ip=function(){function e(e){this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new re}return e.prototype.appInitializer=function(){var e=this;return this.injector.get(ta,Promise.resolve(null)).then(function(){var t=null,n=new Promise(function(e){return t=e}),r=e.injector.get(Lf),i=e.injector.get(Zf);if(e.isLegacyDisabled(i)||e.isLegacyEnabled(i))t(!0);else if("disabled"===i.initialNavigation)r.setUpLocationChangeListener(),t(!0);else{if("enabled"!==i.initialNavigation)throw new Error("Invalid initialNavigation options: '"+i.initialNavigation+"'");r.hooks.afterPreactivation=function(){return e.initNavigation?Xa(null):(e.initNavigation=!0,t(!0),e.resultOfPreactivationDone)},r.initialNavigation()}return n})},e.prototype.bootstrapListener=function(e){var t=this.injector.get(Zf),n=this.injector.get(Wf),r=this.injector.get(Lf),i=this.injector.get(un);e===i.components[0]&&(this.isLegacyEnabled(t)?r.initialNavigation():this.isLegacyDisabled(t)&&r.setUpLocationChangeListener(),n.setUpPreloading(),r.resetRootComponentType(i.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())},e.prototype.isLegacyEnabled=function(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation},e.prototype.isLegacyDisabled=function(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation},e}();function op(e){return e.appInitializer.bind(e)}function sp(e){return e.bootstrapListener.bind(e)}var ap=new de("Router Initializer"),up=$r({encapsulation:0,styles:[[""]],data:{}});function lp(e){return Po(0,[io(0,Js,[Hs]),(e()(),yi(1,0,null,null,30,"div",[["class","columns"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,29,"div",[["class","column is-10 is-offset-1"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,28,"div",[["class","box is-shadowless"]],null,null,null,null,null)),(e()(),yi(4,0,null,null,4,"h1",[["class","is-6"]],null,null,null,null,null)),(e()(),yi(5,0,null,null,1,"span",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Address: "])),(e()(),yi(7,0,null,null,1,"span",[["class","address"]],null,null,null,null,null)),(e()(),Eo(8,null,["",""])),(e()(),yi(9,0,null,null,22,"table",[["class","table is-bordered is-fullwidth"]],null,null,null,null,null)),(e()(),yi(10,0,null,null,21,"tbody",[],null,null,null,null,null)),(e()(),yi(11,0,null,null,4,"tr",[],null,null,null,null,null)),(e()(),yi(12,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Tokens"])),(e()(),yi(14,0,null,null,1,"td",[["class","tokens"]],null,null,null,null,null)),(e()(),Eo(15,null,["",""])),(e()(),yi(16,0,null,null,4,"tr",[],null,null,null,null,null)),(e()(),yi(17,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Delegate"])),(e()(),yi(19,0,null,null,1,"td",[["style","word-break: break-all;"]],null,null,null,null,null)),(e()(),Eo(20,null,["",""])),(e()(),yi(21,0,null,null,4,"tr",[],null,null,null,null,null)),(e()(),yi(22,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Voted"])),(e()(),yi(24,0,null,null,1,"td",[["class","voted"]],null,null,null,null,null)),(e()(),Eo(25,null,["",""])),(e()(),yi(26,0,null,null,5,"tr",[],null,null,null,null,null)),(e()(),yi(27,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Proposal"])),(e()(),yi(29,0,null,null,2,"td",[],null,null,null,null,null)),(e()(),Eo(30,null,["",""])),Do(31,1)],null,function(e,t){var n=t.component;e(t,8,0,n.account),e(t,15,0,null==n.userInfo?null:n.userInfo.tokens),e(t,20,0,null==n.userInfo?null:n.userInfo.delegate),e(t,25,0,null==n.userInfo?null:n.userInfo.voted),e(t,30,0,Br(t,30,0,e(t,31,0,Hi(t,0),null==n.userInfo?null:n.userInfo.proposal)))})}var cp=function(e){function t(t,n){var r=e.call(this,t)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;o<i;o++){var s=$(r,n[o],null,o);s&&r.add(s)}return r}return i(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.values[n]=t,i._hasValue||(i._hasValue=!0,this.haveValues++)},t.prototype.notifyComplete=function(e){var t=this.destination,n=this.haveValues,r=this.values,i=r.length;e._hasValue?(this.completed++,this.completed===i&&(n===i&&t.next(r),t.complete())):t.complete()},t}(U),fp=function(){function e(){}return Object.defineProperty(e.prototype,"value",{get:function(){return this.control?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.control?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"invalid",{get:function(){return this.control?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this.control?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.control?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this.control?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this.control?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this.control?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return this.control?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return this.control?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.control?this.control.status:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return this.control?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanges",{get:function(){return this.control?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueChanges",{get:function(){return this.control?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.reset=function(e){void 0===e&&(e=void 0),this.control&&this.control.reset(e)},e.prototype.hasError=function(e,t){return!!this.control&&this.control.hasError(e,t)},e.prototype.getError=function(e,t){return this.control?this.control.getError(e,t):null},e}(),pp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}(fp);function dp(e){return null==e||0===e.length}var hp=new de("NgValidators"),yp=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,mp=function(){function e(){}return e.min=function(e){return function(t){if(dp(t.value)||dp(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}},e.max=function(e){return function(t){if(dp(t.value)||dp(e))return null;var n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}},e.required=function(e){return dp(e.value)?{required:!0}:null},e.requiredTrue=function(e){return!0===e.value?null:{required:!0}},e.email=function(e){return dp(e.value)?null:yp.test(e.value)?null:{email:!0}},e.minLength=function(e){return function(t){if(dp(t.value))return null;var n=t.value?t.value.length:0;return n<e?{minlength:{requiredLength:e,actualLength:n}}:null}},e.maxLength=function(e){return function(t){var n=t.value?t.value.length:0;return n>e?{maxlength:{requiredLength:e,actualLength:n}}:null}},e.pattern=function(t){return t?("string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),n=new RegExp(r)):(r=t.toString(),n=t),function(e){if(dp(e.value))return null;var t=e.value;return n.test(t)?null:{pattern:{requiredPattern:r,actualValue:t}}}):e.nullValidator;var n,r},e.nullValidator=function(e){return null},e.compose=function(e){if(!e)return null;var t=e.filter(gp);return 0==t.length?null:function(e){return bp(function(e,n){return t.map(function(t){return t(e)})}(e))}},e.composeAsync=function(e){if(!e)return null;var t=e.filter(gp);return 0==t.length?null:function(e){return function e(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&h(n[0])&&(n=n[0]),0===n.length?Ka:t?e(n).pipe(H(function(e){return t.apply(void 0,e)})):new M(function(e){return new cp(e,n)})}(function(e,n){return t.map(function(t){return t(e)})}(e).map(vp)).pipe(H(bp))}},e}();function gp(e){return null!=e}function vp(e){var t=ft(e)?Z(e):e;if(!pt(t))throw new Error("Expected validator to return Promise or Observable.");return t}function bp(e){var t=e.reduce(function(e,t){return null!=t?o({},e,t):e},{});return 0===Object.keys(t).length?null:t}var _p=new de("NgValueAccessor"),wp=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}(),Tp=new de("CompositionEventMode"),xp=function(){function e(e,t,n){var r;this._renderer=e,this._elementRef=t,this._compositionMode=n,this.onChange=function(e){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Cu()?Cu().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._handleInput=function(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)},e.prototype._compositionStart=function(){this._composing=!0},e.prototype._compositionEnd=function(e){this._composing=!1,this._compositionMode&&this.onChange(e)},e}();function Sp(e){return e.validate?function(t){return e.validate(t)}:e}function Ip(e){return e.validate?function(t){return e.validate(t)}:e}var Dp=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}();function Cp(){throw new Error("unimplemented")}var kp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return i(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return Cp()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Cp()},enumerable:!0,configurable:!0}),t}(fp),Ep=function(){function e(){this._accessors=[]}return e.prototype.add=function(e,t){this._accessors.push([e,t])},e.prototype.remove=function(e){for(var t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)},e.prototype.select=function(e){var t=this;this._accessors.forEach(function(n){t._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})},e.prototype._isSameGroup=function(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name},e}(),Mp=function(){function e(e,t,n,r){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){this._control=this._injector.get(kp),this._checkName(),this._registry.add(this._control,this)},e.prototype.ngOnDestroy=function(){this._registry.remove(this)},e.prototype.writeValue=function(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},e.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}},e.prototype.fireUncheck=function(e){this.writeValue(e)},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},e.prototype._throwNameError=function(){throw new Error('\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type="radio" formControlName="food" name="food">\n    ')},e}(),Ap='\n    <div [formGroup]="myGroup">\n       <div formGroupName="person">\n          <input formControlName="firstName">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });',Pp='\n    <form>\n       <div ngModelGroup="person">\n          <input [(ngModel)]="person.name" name="firstName">\n       </div>\n    </form>';function Vp(e,t){return u(t.path,[e])}function Np(e,t){e||Rp(t,"Cannot find control with"),t.valueAccessor||Rp(t,"No value accessor for form control with"),e.validator=mp.compose([e.validator,t.validator]),e.asyncValidator=mp.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange(function(n){e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&Op(e,t)})}(e,t),function(e,t){e.registerOnChange(function(e,n){t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(function(){e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&Op(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(function(e){t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})}),t._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})})}function Op(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Rp(e,t){var n;throw n=e.path.length>1?"path: '"+e.path.join(" -> ")+"'":e.path[0]?"name: '"+e.path+"'":"unspecified name attribute",new Error(t+" "+n)}function Lp(e){return null!=e?mp.compose(e.map(Sp)):null}function Fp(e){return null!=e?mp.composeAsync(e.map(Ip)):null}var Bp=[wp,function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e}(),Dp,function(){function e(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Ce}return Object.defineProperty(e.prototype,"compareWith",{set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this.value=e;var t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),(e+": "+t).slice(0,50))}(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},e.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){t.value=t._getOptionValue(n),e(t.value)}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._registerOption=function(){return(this._idCounter++).toString()},e.prototype._getOptionId=function(e){try{for(var t=s(Array.from(this._optionMap.keys())),n=t.next();!n.done;n=t.next()){var r=n.value;if(this._compareWith(this._optionMap.get(r),e))return r}}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=t.return)&&o.call(t)}finally{if(i)throw i.error}}return null;var i,o},e.prototype._getOptionValue=function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e},e}(),function(){function e(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){},this._compareWith=Ce}return Object.defineProperty(e.prototype,"compareWith",{set:function(e){if("function"!=typeof e)throw new Error("compareWith must be a function, but received "+JSON.stringify(e));this._compareWith=e},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){var t,n=this;if(this.value=e,Array.isArray(e)){var r=e.map(function(e){return n._getOptionId(e)});t=function(e,t){e._setSelected(r.indexOf(t.toString())>-1)}}else t=function(e,t){e._setSelected(!1)};this._optionMap.forEach(t)},e.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o<i.length;o++){var s=i.item(o),a=t._getOptionValue(s.value);r.push(a)}else for(i=n.options,o=0;o<i.length;o++)(s=i.item(o)).selected&&(a=t._getOptionValue(s.value),r.push(a));t.value=r,e(r)}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)},e.prototype._registerOption=function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t},e.prototype._getOptionId=function(e){try{for(var t=s(Array.from(this._optionMap.keys())),n=t.next();!n.done;n=t.next()){var r=n.value;if(this._compareWith(this._optionMap.get(r)._value,e))return r}}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=t.return)&&o.call(t)}finally{if(i)throw i.error}}return null;var i,o},e.prototype._getOptionValue=function(e){var t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e},e}(),Mp],qp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},t.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return Vp(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return Lp(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Fp(this._asyncValidators)},enumerable:!0,configurable:!0}),t.prototype._checkParentType=function(){},t}(pp),jp=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(function(){function e(e){this._cd=e}return Object.defineProperty(e.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),e}());function $p(e){var t=Hp(e)?e.validators:e;return Array.isArray(t)?Lp(t):t||null}function Up(e,t){var n=Hp(t)?t.asyncValidators:e;return Array.isArray(n)?Fp(n):n||null}function Hp(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var zp=function(){function e(e,t){this.validator=e,this.asyncValidator=t,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return"VALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"invalid",{get:function(){return"INVALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return"PENDING"==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return"DISABLED"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return"DISABLED"!==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),e.prototype.setValidators=function(e){this.validator=$p(e)},e.prototype.setAsyncValidators=function(e){this.asyncValidator=Up(e)},e.prototype.clearValidators=function(){this.validator=null},e.prototype.clearAsyncValidators=function(){this.asyncValidator=null},e.prototype.markAsTouched=function(e){void 0===e&&(e={}),this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)},e.prototype.markAsUntouched=function(e){void 0===e&&(e={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)},e.prototype.markAsDirty=function(e){void 0===e&&(e={}),this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)},e.prototype.markAsPristine=function(e){void 0===e&&(e={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)},e.prototype.markAsPending=function(e){void 0===e&&(e={}),this.status="PENDING",!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)},e.prototype.disable=function(e){void 0===e&&(e={}),this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable(o({},e,{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(e),this._onDisabledChange.forEach(function(e){return e(!0)})},e.prototype.enable=function(e){void 0===e&&(e={}),this.status="VALID",this._forEachChild(function(t){t.enable(o({},e,{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(e),this._onDisabledChange.forEach(function(e){return e(!1)})},e.prototype._updateAncestors=function(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),this._parent._updatePristine(),this._parent._updateTouched())},e.prototype.setParent=function(e){this._parent=e},e.prototype.updateValueAndValidity=function(e){void 0===e&&(e={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)},e.prototype._updateTreeValidity=function(e){void 0===e&&(e={emitEvent:!0}),this._forEachChild(function(t){return t._updateTreeValidity(e)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})},e.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"},e.prototype._runValidator=function(){return this.validator?this.validator(this):null},e.prototype._runAsyncValidator=function(e){var t=this;if(this.asyncValidator){this.status="PENDING";var n=vp(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return t.setErrors(n,{emitEvent:e})})}},e.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},e.prototype.setErrors=function(e,t){void 0===t&&(t={}),this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)},e.prototype.get=function(e){return function(e,t,n){return null==t?null:(t instanceof Array||(t=t.split(".")),t instanceof Array&&0===t.length?null:t.reduce(function(e,t){return e instanceof Wp?e.controls[t]||null:e instanceof Zp&&e.at(t)||null},e))}(this,e)},e.prototype.getError=function(e,t){var n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null},e.prototype.hasError=function(e,t){return!!this.getError(e,t)},Object.defineProperty(e.prototype,"root",{get:function(){for(var e=this;e._parent;)e=e._parent;return e},enumerable:!0,configurable:!0}),e.prototype._updateControlsErrors=function(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)},e.prototype._initObservables=function(){this.valueChanges=new qt,this.statusChanges=new qt},e.prototype._calculateStatus=function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"},e.prototype._anyControlsHaveStatus=function(e){return this._anyControls(function(t){return t.status===e})},e.prototype._anyControlsDirty=function(){return this._anyControls(function(e){return e.dirty})},e.prototype._anyControlsTouched=function(){return this._anyControls(function(e){return e.touched})},e.prototype._updatePristine=function(e){void 0===e&&(e={}),this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)},e.prototype._updateTouched=function(e){void 0===e&&(e={}),this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)},e.prototype._isBoxedValue=function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e},e.prototype._registerOnCollectionChange=function(e){this._onCollectionChange=e},e.prototype._setUpdateStrategy=function(e){Hp(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)},e}(),Gp=function(e){function t(t,n,r){void 0===t&&(t=null);var i=e.call(this,$p(n),Up(r,n))||this;return i._onChange=[],i._applyFormState(t),i._setUpdateStrategy(n),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i._initObservables(),i}return i(t,e),t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(function(e){return e(n.value,!1!==t.emitViewToModelChange)}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){void 0===t&&(t={}),this.setValue(e,t)},t.prototype.reset=function(e,t){void 0===e&&(e=null),void 0===t&&(t={}),this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1},t.prototype._updateValue=function(){},t.prototype._anyControls=function(e){return!1},t.prototype._allControlsDisabled=function(){return this.disabled},t.prototype.registerOnChange=function(e){this._onChange.push(e)},t.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},t.prototype.registerOnDisabledChange=function(e){this._onDisabledChange.push(e)},t.prototype._forEachChild=function(e){},t.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))},t.prototype._applyFormState=function(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e},t}(zp),Wp=function(e){function t(t,n,r){var i=e.call(this,$p(n),Up(r,n))||this;return i.controls=t,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return i(t,e),t.prototype.registerControl=function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)},t.prototype.addControl=function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.removeControl=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.contains=function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled},t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this._checkAllValuesPresent(e),Object.keys(e).forEach(function(r){n._throwIfControlMissing(r),n.controls[r].setValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){var n=this;void 0===t&&(t={}),Object.keys(e).forEach(function(r){n.controls[r]&&n.controls[r].patchValue(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.reset=function(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)},t.prototype.getRawValue=function(){return this._reduceChildren({},function(e,t,n){return e[n]=t instanceof Gp?t.value:t.getRawValue(),e})},t.prototype._syncPendingControls=function(){var e=this._reduceChildren(!1,function(e,t){return!!t._syncPendingControls()||e});return e&&this.updateValueAndValidity({onlySelf:!0}),e},t.prototype._throwIfControlMissing=function(e){if(!Object.keys(this.controls).length)throw new Error("\n        There are no form controls registered with this group yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.controls[e])throw new Error("Cannot find form control with name: "+e+".")},t.prototype._forEachChild=function(e){var t=this;Object.keys(this.controls).forEach(function(n){return e(t.controls[n],n)})},t.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})},t.prototype._updateValue=function(){this.value=this._reduceValue()},t.prototype._anyControls=function(e){var t=this,n=!1;return this._forEachChild(function(r,i){n=n||t.contains(i)&&e(r)}),n},t.prototype._reduceValue=function(){var e=this;return this._reduceChildren({},function(t,n,r){return(n.enabled||e.disabled)&&(t[r]=n.value),t})},t.prototype._reduceChildren=function(e,t){var n=e;return this._forEachChild(function(e,r){n=t(n,e,r)}),n},t.prototype._allControlsDisabled=function(){try{for(var e=s(Object.keys(this.controls)),t=e.next();!t.done;t=e.next())if(this.controls[t.value].enabled)return!1}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return Object.keys(this.controls).length>0||this.disabled;var n,r},t.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},t}(zp),Zp=function(e){function t(t,n,r){var i=e.call(this,$p(n),Up(r,n))||this;return i.controls=t,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return i(t,e),t.prototype.at=function(e){return this.controls[e]},t.prototype.push=function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},t.prototype.insert=function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()},t.prototype.removeAt=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity()},t.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(t.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),t.prototype.setValue=function(e,t){var n=this;void 0===t&&(t={}),this._checkAllValuesPresent(e),e.forEach(function(e,r){n._throwIfControlMissing(r),n.at(r).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.patchValue=function(e,t){var n=this;void 0===t&&(t={}),e.forEach(function(e,r){n.at(r)&&n.at(r).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)},t.prototype.reset=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={}),this._forEachChild(function(n,r){n.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t),this._updatePristine(t),this._updateTouched(t)},t.prototype.getRawValue=function(){return this.controls.map(function(e){return e instanceof Gp?e.value:e.getRawValue()})},t.prototype._syncPendingControls=function(){var e=this.controls.reduce(function(e,t){return!!t._syncPendingControls()||e},!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e},t.prototype._throwIfControlMissing=function(e){if(!this.controls.length)throw new Error("\n        There are no form controls registered with this array yet.  If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)},t.prototype._forEachChild=function(e){this.controls.forEach(function(t,n){e(t,n)})},t.prototype._updateValue=function(){var e=this;this.value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})},t.prototype._anyControls=function(e){return this.controls.some(function(t){return t.enabled&&e(t)})},t.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})},t.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,n){if(void 0===e[n])throw new Error("Must supply a value for form control at index: "+n+".")})},t.prototype._allControlsDisabled=function(){try{for(var e=s(this.controls),t=e.next();!t.done;t=e.next())if(t.value.enabled)return!1}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return this.controls.length>0||this.disabled;var n,r},t.prototype._registerControl=function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)},t}(zp),Kp=Promise.resolve(null),Jp=function(e){function t(t,n){var r=e.call(this)||this;return r.submitted=!1,r._directives=[],r.ngSubmit=new qt,r.form=new Wp({},Lp(t),Fp(n)),r}return i(t,e),t.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this;Kp.then(function(){var n=t._findContainer(e.path);e.control=n.registerControl(e.name,e.control),Np(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),t._directives.push(e)})},t.prototype.getControl=function(e){return this.form.get(e.path)},t.prototype.removeControl=function(e){var t=this;Kp.then(function(){var n,r,i=t._findContainer(e.path);i&&i.removeControl(e.name),(r=(n=t._directives).indexOf(e))>-1&&n.splice(r,1)})},t.prototype.addFormGroup=function(e){var t=this;Kp.then(function(){var n=t._findContainer(e.path),r=new Wp({});(function(e,t){null==e&&Rp(t,"Cannot find control with"),e.validator=mp.compose([e.validator,t.validator]),e.asyncValidator=mp.composeAsync([e.asyncValidator,t.asyncValidator])})(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.removeFormGroup=function(e){var t=this;Kp.then(function(){var n=t._findContainer(e.path);n&&n.removeControl(e.name)})},t.prototype.getFormGroup=function(e){return this.form.get(e.path)},t.prototype.updateModel=function(e,t){var n=this;Kp.then(function(){n.form.get(e.path).setValue(t)})},t.prototype.setValue=function(e){this.control.setValue(e)},t.prototype.onSubmit=function(e){return this.submitted=!0,t=this._directives,this.form._syncPendingControls(),t.forEach(function(e){var t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)}),this.ngSubmit.emit(e),!1;var t},t.prototype.onReset=function(){this.resetForm()},t.prototype.resetForm=function(e){void 0===e&&(e=void 0),this.form.reset(e),this.submitted=!1},t.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},t.prototype._findContainer=function(e){return e.pop(),e.length?this.form.get(e):this.form},t}(pp),Xp=function(){function e(){}return e.modelParentException=function(){throw new Error('\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup\'s partner directive "formControlName" instead.  Example:\n\n      \n    <div [formGroup]="myGroup">\n      <input formControlName="firstName">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });\n\n      Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n      Example:\n\n      \n    <div [formGroup]="myGroup">\n       <input formControlName="firstName">\n       <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n    </div>\n  ')},e.formGroupNameException=function(){throw new Error("\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      "+Ap+"\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      "+Pp)},e.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as \'standalone\' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]="person.firstName" name="first">\n      Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')},e.modelGroupParentException=function(){throw new Error("\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      "+Ap+"\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      "+Pp)},e}(),Yp=function(e){function t(t,n,r){var i=e.call(this)||this;return i._parent=t,i._validators=n,i._asyncValidators=r,i}return i(t,e),t.prototype._checkParentType=function(){this._parent instanceof t||this._parent instanceof Jp||Xp.modelGroupParentException()},t}(qp),Qp=Promise.resolve(null),ed=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.control=new Gp,o._registered=!1,o.update=new qt,o._parent=t,o._rawValidators=n||[],o._rawAsyncValidators=r||[],o.valueAccessor=function(e,t){if(!t)return null;Array.isArray(t)||Rp(e,"Value accessor was not provided as an array for form control with");var n=void 0,r=void 0,i=void 0;return t.forEach(function(t){var o;t.constructor===xp?n=t:(o=t,Bp.some(function(e){return o.constructor===e})?(r&&Rp(e,"More than one built-in value accessor matches form control with"),r=t):(i&&Rp(e,"More than one custom value accessor matches form control with"),i=t))}),i||r||n||(Rp(e,"No valid value accessor for form control with"),null)}(o,i),o}return i(t,e),t.prototype.ngOnChanges=function(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),function(e,t){if(!e.hasOwnProperty("model"))return!1;var n=e.model;return!!n.isFirstChange()||!Ce(t,n.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},t.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(t.prototype,"path",{get:function(){return this._parent?Vp(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return Lp(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return Fp(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,this.update.emit(e)},t.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},t.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},t.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},t.prototype._setUpStandalone=function(){Np(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},t.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},t.prototype._checkParentType=function(){!(this._parent instanceof Yp)&&this._parent instanceof qp?Xp.formGroupNameException():this._parent instanceof Yp||this._parent instanceof Jp||Xp.modelParentException()},t.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Xp.missingNameException()},t.prototype._updateValue=function(e){var t=this;Qp.then(function(){t.control.setValue(e,{emitViewToModelChange:!1})})},t.prototype._updateDisabled=function(e){var t=this,n=e.isDisabled.currentValue,r=""===n||n&&"false"!==n;Qp.then(function(){r&&!t.control.disabled?t.control.disable():!r&&t.control.disabled&&t.control.enable()})},t}(kp),td=function(){function e(){}return e.prototype.ngOnChanges=function(e){"pattern"in e&&(this._createValidator(),this._onChange&&this._onChange())},e.prototype.validate=function(e){return this._validator(e)},e.prototype.registerOnValidatorChange=function(e){this._onChange=e},e.prototype._createValidator=function(){this._validator=mp.pattern(this.pattern)},e}(),nd=function(){},rd=function(){},id=function(){function e(e){var t=this;this.votingService=e,this.onVoteClick=function(){t.proposal&&!t.voting&&parseInt(t.tokens,10)&&(t.voting=!0,t.votingService.vote(t.proposal,parseInt(t.tokens,10),t.account).subscribe(function(e){e.keys=Object.keys(e),t.receipt=e,t.voting=!1},function(e){t.voting=!1,console.log(e)}))},this.onCandidateClick=function(e){t.proposal=t.candidates[e]}}return e.prototype.ngOnInit=function(){var e=this;this.candidates=[],this.votingService.getCandidates().subscribe(function(t){e.candidates=t},function(e){console.error(e)})},e}(),od=$r({encapsulation:0,styles:[[""]],data:{}});function sd(e){return Po(0,[(e()(),yi(0,0,null,null,2,"span",[["class","icon is-small"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,1,"i",[["class","fas fa-align-left"]],null,null,null,null,null)),(e()(),Eo(-1,null,["\u2713"]))],null,null)}function ad(e){return Po(0,[(e()(),yi(0,0,null,null,5,"p",[["class","control proposal"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.onCandidateClick(e.context.index)&&r),r},null,null)),(e()(),yi(1,0,null,null,4,"a",[["class","button is-primary is-large"]],null,null,null,null,null)),(e()(),hi(16777216,null,null,1,null,sd)),ro(3,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),yi(4,0,null,null,1,"span",[],null,null,null,null,null)),(e()(),Eo(5,null,["",""]))],function(e,t){e(t,3,0,t.context.$implicit==t.component.proposal)},function(e,t){e(t,5,0,t.context.$implicit)})}function ud(e){return Po(0,[(e()(),yi(0,0,null,null,4,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,3,"span",[],null,null,null,null,null)),(e()(),yi(2,0,null,null,1,"b",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Transaction Hash: "])),(e()(),Eo(4,null,[" ",""]))],null,function(e,t){e(t,4,0,t.component.receipt.transactionHash)})}function ld(e){return Po(0,[(e()(),yi(0,0,null,null,16,"div",[["class","control box"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,2,"div",[["class","field is-grouped"]],null,null,null,null,null)),(e()(),hi(16777216,null,null,1,null,ad)),ro(3,802816,null,0,Ca,[wn,_n,Un],{ngForOf:[0,"ngForOf"]},null),(e()(),yi(4,0,null,null,12,"div",[["class","field has-addons"],["style","margin-top: 20px;"]],null,null,null,null,null)),(e()(),yi(5,0,null,null,6,"div",[["class","control"],["style","width: 100%;"]],null,null,null,null,null)),(e()(),yi(6,0,null,null,5,"input",[["class","input is-large"],["placeholder","Votes in Tokens."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var r=!0,i=e.component;return"input"===t&&(r=!1!==Hi(e,7)._handleInput(n.target.value)&&r),"blur"===t&&(r=!1!==Hi(e,7).onTouched()&&r),"compositionstart"===t&&(r=!1!==Hi(e,7)._compositionStart()&&r),"compositionend"===t&&(r=!1!==Hi(e,7)._compositionEnd(n.target.value)&&r),"ngModelChange"===t&&(r=!1!==(i.tokens=n)&&r),r},null,null)),ro(7,16384,null,0,xp,[pn,dn,[2,Tp]],null,null),oo(1024,null,_p,function(e){return[e]},[xp]),ro(9,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,_p]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),oo(2048,null,kp,null,[ed]),ro(11,16384,null,0,jp,[[4,kp]],null,null),(e()(),yi(12,0,null,null,4,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(13,0,null,null,3,"a",[["class","button cast is-primary is-large"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.onVoteClick()&&r),r},null,null)),ro(14,278528,null,0,Ia,[Un,Hn,dn,pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Co(15,{"is-loading":0}),(e()(),Eo(-1,null,["Vote"])),(e()(),hi(16777216,null,null,1,null,ud)),ro(18,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,3,0,n.candidates),e(t,9,0,n.voting,n.tokens),e(t,14,0,"button cast is-primary is-large",e(t,15,0,n.voting)),e(t,18,0,n.receipt)},function(e,t){e(t,6,0,Hi(t,11).ngClassUntouched,Hi(t,11).ngClassTouched,Hi(t,11).ngClassPristine,Hi(t,11).ngClassDirty,Hi(t,11).ngClassValid,Hi(t,11).ngClassInvalid,Hi(t,11).ngClassPending)})}var cd=function(){function e(e){var t=this;this.votingService=e,this.getAccount=function(){return t.account},this.onDelegateClick=function(){t.delegateAddress&&!t.delegating&&parseInt(t.tokens,10)&&(t.delegating=!0,t.votingService.delegate(t.delegateAddress,parseInt(t.tokens,10),t.account).subscribe(function(e){e.keys=Object.keys(e),t.receipt=e,t.delegating=!1},function(e){t.delegating=!1,console.log(e)}))}}return e.prototype.ngOnInit=function(){},e}(),fd=$r({encapsulation:0,styles:[[""]],data:{}});function pd(e){return Po(0,[(e()(),yi(0,0,null,null,4,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,3,"span",[],null,null,null,null,null)),(e()(),yi(2,0,null,null,1,"b",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Transaction Hash: "])),(e()(),Eo(4,null,[" ",""]))],null,function(e,t){e(t,4,0,t.component.receipt.transactionHash)})}function dd(e){return Po(0,[(e()(),yi(0,0,null,null,23,"div",[["class","control box"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,7,"div",[["class","field"],["style","margin-top: 20px;"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,6,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,5,"input",[["class","input is-large"],["placeholder","Delegate Address"],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var r=!0,i=e.component;return"input"===t&&(r=!1!==Hi(e,4)._handleInput(n.target.value)&&r),"blur"===t&&(r=!1!==Hi(e,4).onTouched()&&r),"compositionstart"===t&&(r=!1!==Hi(e,4)._compositionStart()&&r),"compositionend"===t&&(r=!1!==Hi(e,4)._compositionEnd(n.target.value)&&r),"ngModelChange"===t&&(r=!1!==(i.delegateAddress=n)&&r),r},null,null)),ro(4,16384,null,0,xp,[pn,dn,[2,Tp]],null,null),oo(1024,null,_p,function(e){return[e]},[xp]),ro(6,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,_p]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),oo(2048,null,kp,null,[ed]),ro(8,16384,null,0,jp,[[4,kp]],null,null),(e()(),yi(9,0,null,null,12,"div",[["class","field has-addons"],["style","margin-top: 20px;"]],null,null,null,null,null)),(e()(),yi(10,0,null,null,6,"div",[["class","control"],["style","width: 100%;"]],null,null,null,null,null)),(e()(),yi(11,0,null,null,5,"input",[["class","input is-large"],["placeholder","Votes in Tokens."],["type","text"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var r=!0,i=e.component;return"input"===t&&(r=!1!==Hi(e,12)._handleInput(n.target.value)&&r),"blur"===t&&(r=!1!==Hi(e,12).onTouched()&&r),"compositionstart"===t&&(r=!1!==Hi(e,12)._compositionStart()&&r),"compositionend"===t&&(r=!1!==Hi(e,12)._compositionEnd(n.target.value)&&r),"ngModelChange"===t&&(r=!1!==(i.tokens=n)&&r),r},null,null)),ro(12,16384,null,0,xp,[pn,dn,[2,Tp]],null,null),oo(1024,null,_p,function(e){return[e]},[xp]),ro(14,671744,null,0,ed,[[8,null],[8,null],[8,null],[6,_p]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),oo(2048,null,kp,null,[ed]),ro(16,16384,null,0,jp,[[4,kp]],null,null),(e()(),yi(17,0,null,null,4,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(18,0,null,null,3,"a",[["class","button is-primary is-large"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.onDelegateClick()&&r),r},null,null)),ro(19,278528,null,0,Ia,[Un,Hn,dn,pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Co(20,{"is-loading":0}),(e()(),Eo(-1,null,["Delegate"])),(e()(),hi(16777216,null,null,1,null,pd)),ro(23,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,6,0,n.delegating,n.delegateAddress),e(t,14,0,n.delegating,n.tokens),e(t,19,0,"button is-primary is-large",e(t,20,0,n.delegating)),e(t,23,0,n.receipt)},function(e,t){e(t,3,0,Hi(t,8).ngClassUntouched,Hi(t,8).ngClassTouched,Hi(t,8).ngClassPristine,Hi(t,8).ngClassDirty,Hi(t,8).ngClassValid,Hi(t,8).ngClassInvalid,Hi(t,8).ngClassPending),e(t,11,0,Hi(t,16).ngClassUntouched,Hi(t,16).ngClassTouched,Hi(t,16).ngClassPristine,Hi(t,16).ngClassDirty,Hi(t,16).ngClassValid,Hi(t,16).ngClassInvalid,Hi(t,16).ngClassPending)})}var hd=function(){function e(){}return e.prototype.ngOnInit=function(){},e}(),yd=$r({encapsulation:0,styles:[[""]],data:{}});function md(e){return Po(0,[(e()(),yi(0,0,null,null,3,"label",[["class","radio"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,0,"input",[["name","opt"],["type","radio"]],[[8,"checked",0]],null,null,null,null)),(e()(),yi(2,0,null,null,1,"span",[["class","title is-6"]],null,null,null,null,null)),(e()(),Eo(3,null,["",""]))],null,function(e,t){var n=t.component;e(t,1,0,n.checked),e(t,3,0,n.text)})}var gd=function(){function e(){var e=this;this.getAccount=function(){return e.account},this.onDelegateOptClick=function(){e.state=e.STATES.DELEGATE},this.onVoteOptClick=function(){e.state=e.STATES.VOTE}}return e.prototype.ngOnInit=function(){this.STATES={VOTE:1,DELEGATE:2},this.state=this.STATES.VOTE},e}(),vd=$r({encapsulation:0,styles:[[""]],data:{}});function bd(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-vote",[],null,null,null,ld,od)),ro(1,114688,null,0,id,[Ks],{account:[0,"account"]},null)],function(e,t){e(t,1,0,t.component.account)},null)}function _d(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-delegate-vote",[],null,null,null,dd,fd)),ro(1,114688,null,0,cd,[Ks],{account:[0,"account"]},null)],function(e,t){e(t,1,0,t.component.account)},null)}function wd(e){return Po(0,[(e()(),yi(0,0,null,null,9,"div",[["class","box is-shadowless"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,4,"div",[["class","control box"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,1,"app-radio-input",[],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.onVoteOptClick()&&r),r},md,yd)),ro(3,114688,null,0,hd,[],{text:[0,"text"],checked:[1,"checked"]},null),(e()(),yi(4,0,null,null,1,"app-radio-input",[],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.onDelegateOptClick()&&r),r},md,yd)),ro(5,114688,null,0,hd,[],{text:[0,"text"]},null),(e()(),hi(16777216,null,null,1,null,bd)),ro(7,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null),(e()(),hi(16777216,null,null,1,null,_d)),ro(9,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,3,0,"Vote for candidate","checked"),e(t,5,0,"Delegate Vote"),e(t,7,0,n.state==n.STATES.VOTE),e(t,9,0,n.state==n.STATES.DELEGATE)},null)}var Td=function(){function e(e){var t=this;this.votingService=e,this.onReady=function(){t.tokensInfo=t.votingService.getTokensInfo()},this.buyTokens=function(){t.pending=!0,t.votingService.buyTokens(t.tokens,t.account).pipe(Fa(function(){t.tokens=0,t.pending=!1,t.tokensInfo=t.votingService.getTokensInfo()})).subscribe()}}return e.prototype.ngOnInit=function(){this.onReady()},e}(),xd=$r({encapsulation:0,styles:[[""]],data:{}});function Sd(e){return Po(0,[(e()(),yi(0,0,null,null,11,"tbody",[],null,null,null,null,null)),(e()(),yi(1,0,null,null,4,"tr",[],null,null,null,null,null)),(e()(),yi(2,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Tokens Available"])),(e()(),yi(4,0,null,null,1,"td",[["class","available"]],null,null,null,null,null)),(e()(),Eo(5,null,["",""])),(e()(),yi(6,0,null,null,5,"tr",[],null,null,null,null,null)),(e()(),yi(7,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Price/token"])),(e()(),yi(9,0,null,null,2,"td",[],null,null,null,null,null)),(e()(),Eo(10,null,[""," Ether"])),Do(11,1)],null,function(e,t){e(t,5,0,t.context.$implicit.available),e(t,10,0,Br(t,10,0,e(t,11,0,Hi(t.parent,0),t.context.$implicit.price)))})}function Id(e){return Po(0,[io(0,Xs,[Hs]),(e()(),yi(1,0,null,null,1,"h1",[["class","title is-4"]],null,null,null,null,null)),(e()(),Eo(-1,null,["Buy Tokens"])),(e()(),yi(3,0,null,null,3,"table",[["class","table is-bordered is-fullwidth is-narrow"]],null,null,null,null,null)),(e()(),hi(16777216,null,null,2,null,Sd)),ro(5,802816,null,0,Ca,[wn,_n,Un],{ngForOf:[0,"ngForOf"]},null),io(131072,Oa,[Tn]),(e()(),yi(7,0,null,null,14,"div",[["class","field has-addons"]],null,null,null,null,null)),(e()(),yi(8,0,null,null,8,"div",[["class","control"],["style","width: 100%;"]],null,null,null,null,null)),(e()(),yi(9,0,null,null,7,"input",[["class","input"],["pattern","0|[1-9]\\d*"],["placeholder","Number of tokens to buy."],["type","text"]],[[1,"pattern",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(e,t,n){var r=!0,i=e.component;return"input"===t&&(r=!1!==Hi(e,10)._handleInput(n.target.value)&&r),"blur"===t&&(r=!1!==Hi(e,10).onTouched()&&r),"compositionstart"===t&&(r=!1!==Hi(e,10)._compositionStart()&&r),"compositionend"===t&&(r=!1!==Hi(e,10)._compositionEnd(n.target.value)&&r),"ngModelChange"===t&&(r=!1!==(i.tokens=n)&&r),r},null,null)),ro(10,16384,null,0,xp,[pn,dn,[2,Tp]],null,null),ro(11,540672,null,0,td,[],{pattern:[0,"pattern"]},null),oo(1024,null,hp,function(e){return[e]},[td]),oo(1024,null,_p,function(e){return[e]},[xp]),ro(14,671744,null,0,ed,[[8,null],[6,hp],[8,null],[6,_p]],{isDisabled:[0,"isDisabled"],model:[1,"model"]},{update:"ngModelChange"}),oo(2048,null,kp,null,[ed]),ro(16,16384,null,0,jp,[[4,kp]],null,null),(e()(),yi(17,0,null,null,4,"div",[["class","control"]],null,null,null,null,null)),(e()(),yi(18,0,null,null,3,"a",[["class","button is-primary"]],null,[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.buyTokens()&&r),r},null,null)),ro(19,278528,null,0,Ia,[Un,Hn,dn,pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Co(20,{"is-loading":0}),(e()(),Eo(-1,null,["Buy Tokens"]))],function(e,t){var n=t.component;e(t,5,0,Br(t,5,0,Hi(t,6).transform(n.tokensInfo))),e(t,11,0,"0|[1-9]\\d*"),e(t,14,0,n.pending,n.tokens),e(t,19,0,"button is-primary",e(t,20,0,n.pending))},function(e,t){e(t,9,0,Hi(t,11).pattern?Hi(t,11).pattern:null,Hi(t,16).ngClassUntouched,Hi(t,16).ngClassTouched,Hi(t,16).ngClassPristine,Hi(t,16).ngClassDirty,Hi(t,16).ngClassValid,Hi(t,16).ngClassInvalid,Hi(t,16).ngClassPending)})}var Dd=function(){function e(e){this.route=e}return e.prototype.ngOnInit=function(){var e=this;this.routeSub=this.route.params.subscribe(function(t){e.account=t.account})},e.prototype.getAccount=function(){return this.account},e.prototype.ngOnDestroy=function(){this.routeSub.unsubscribe()},e}(),Cd=$r({encapsulation:0,styles:[[""]],data:{}});function kd(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-account-info",[],null,null,null,lp,up)),ro(1,114688,null,0,Wa,[Xc,Ks],null,null),(e()(),yi(2,0,null,null,7,"div",[["class","columns"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,2,"div",[["class","column is-5 is-offset-1 is-gappless"]],null,null,null,null,null)),(e()(),yi(4,0,null,null,1,"app-compose-in",[],null,null,null,wd,vd)),ro(5,114688,null,0,gd,[],{account:[0,"account"]},null),(e()(),yi(6,0,null,null,3,"div",[["class","column is-4 is-offset-1 is-gappless"]],null,null,null,null,null)),(e()(),yi(7,0,null,null,2,"div",[["class","box is-shadowless"]],null,null,null,null,null)),(e()(),yi(8,0,null,null,1,"app-buy-tokens",[],null,null,null,Id,xd)),ro(9,114688,null,0,Td,[Ks],{account:[0,"account"]},null)],function(e,t){var n=t.component;e(t,1,0),e(t,5,0,n.account),e(t,9,0,n.account)},null)}var Ed=Vi("app-main",Dd,function(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-main",[],null,null,null,kd,Cd)),ro(1,245760,null,0,Dd,[Xc],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Md=function(){function e(e){this.votingService=e}return e.prototype.ngOnInit=function(){var e=this;this.votingService.stats().subscribe(function(t){e.stats=t}),this.votingService.proposal().subscribe(function(t){e.proposal=t},function(e){})},e}(),Ad=$r({encapsulation:0,styles:[[""]],data:{}});function Pd(e){return Po(0,[(e()(),yi(0,0,null,null,4,"tr",[["class","record"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(2,null,["",""])),(e()(),yi(3,0,null,null,1,"td",[],null,null,null,null,null)),(e()(),Eo(4,null,["",""]))],null,function(e,t){e(t,2,0,t.context.$implicit.proposal),e(t,4,0,t.context.$implicit.voteCount)})}function Vd(e){return Po(0,[(e()(),yi(0,0,null,null,18,"div",[["class","columns"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,17,"div",[["class","column is-6 is-offset-3"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,12,"div",[["class","box is-shadowless"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,1,"h1",[["class","title is-2"]],null,null,null,null,null)),(e()(),Eo(-1,null,["Stats"])),(e()(),yi(5,0,null,null,9,"table",[["class","table is-bordered is-fullwidth"]],null,null,null,null,null)),(e()(),yi(6,0,null,null,5,"thead",[],null,null,null,null,null)),(e()(),yi(7,0,null,null,4,"tr",[],null,null,null,null,null)),(e()(),yi(8,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Proposal"])),(e()(),yi(10,0,null,null,1,"th",[],null,null,null,null,null)),(e()(),Eo(-1,null,["Vote Count"])),(e()(),yi(12,0,null,null,2,"tbody",[],null,null,null,null,null)),(e()(),hi(16777216,null,null,1,null,Pd)),ro(14,802816,null,0,Ca,[wn,_n,Un],{ngForOf:[0,"ngForOf"]},null),(e()(),yi(15,0,null,null,1,"h2",[["class","sub-title is-2"]],null,null,null,null,null)),(e()(),Eo(-1,null,["Winner"])),(e()(),yi(17,0,null,null,1,"div",[["class","proposal"]],null,null,null,null,null)),(e()(),Eo(18,null,["",""]))],function(e,t){e(t,14,0,t.component.stats)},function(e,t){e(t,18,0,t.component.proposal)})}var Nd=Vi("app-stats",Md,function(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-stats",[],null,null,null,Vd,Ad)),ro(1,114688,null,0,Md,[Ks],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Od=$r({encapsulation:2,styles:[],data:{}});function Rd(e){return Po(0,[(e()(),yi(0,0,null,null,2,"div",[],null,null,null,null,null)),(e()(),yi(1,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),ro(2,212992,null,0,$f,[jf,wn,At,[8,null],Tn],null,null)],function(e,t){e(t,2,0)},null)}function Ld(e){return Po(0,[(e()(),yi(0,0,null,null,11,"section",[["class","hero is-primary is-info is-bold"]],null,null,null,null,null)),(e()(),yi(1,0,null,null,10,"div",[["class","hero-head"]],null,null,null,null,null)),(e()(),yi(2,0,null,null,9,"nav",[["class","navbar"]],null,null,null,null,null)),(e()(),yi(3,0,null,null,6,"div",[["class","container"]],null,null,null,null,null)),(e()(),yi(4,0,null,null,5,"div",[["class","navbar-brand"]],null,null,null,null,null)),(e()(),yi(5,0,null,null,4,"a",[["class","navbar-item"]],null,null,null,null,null)),(e()(),yi(6,0,null,null,3,"h6",[["class","title is-6"]],null,null,null,null,null)),ro(7,278528,null,0,Ia,[Un,Hn,dn,pn],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),Co(8,{connected:0}),(e()(),Eo(-1,null,[" Octane Sunu "])),(e()(),yi(10,0,null,null,1,"a",[["href","https://github.com/khizarvaio/octane-sunu"],["style","margin: auto;"],["target","_blank"]],null,null,null,null,null)),(e()(),Eo(-1,null,["Github Repo"])),(e()(),hi(16777216,null,null,1,null,Rd)),ro(13,16384,null,0,Ea,[wn,_n],{ngIf:[0,"ngIf"]},null)],function(e,t){var n=t.component;e(t,7,0,"title is-6",e(t,8,0,n.loaded)),e(t,13,0,n.loaded)},null)}var Fd=Vi("app-root",Qs,function(e){return Po(0,[(e()(),yi(0,0,null,null,1,"app-root",[],null,null,null,Ld,Od)),ro(1,114688,null,0,Qs,[Ks],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),Bd=function(){function e(){}return e.prototype.build=function(){return new XMLHttpRequest},e}(),qd=function(e){return e[e.Get=0]="Get",e[e.Post=1]="Post",e[e.Put=2]="Put",e[e.Delete=3]="Delete",e[e.Options=4]="Options",e[e.Head=5]="Head",e[e.Patch=6]="Patch",e}(qd||(qd={})),jd=function(e){return e[e.Unsent=0]="Unsent",e[e.Open=1]="Open",e[e.HeadersReceived=2]="HeadersReceived",e[e.Loading=3]="Loading",e[e.Done=4]="Done",e[e.Cancelled=5]="Cancelled",e}(jd||(jd={})),$d=function(e){return e[e.Basic=0]="Basic",e[e.Cors=1]="Cors",e[e.Default=2]="Default",e[e.Error=3]="Error",e[e.Opaque=4]="Opaque",e}($d||($d={})),Ud=function(e){return e[e.NONE=0]="NONE",e[e.JSON=1]="JSON",e[e.FORM=2]="FORM",e[e.FORM_DATA=3]="FORM_DATA",e[e.TEXT=4]="TEXT",e[e.BLOB=5]="BLOB",e[e.ARRAY_BUFFER=6]="ARRAY_BUFFER",e}(Ud||(Ud={})),Hd=function(e){return e[e.Text=0]="Text",e[e.Json=1]="Json",e[e.ArrayBuffer=2]="ArrayBuffer",e[e.Blob=3]="Blob",e}(Hd||(Hd={})),zd=function(){function e(t){var n=this;this._headers=new Map,this._normalizedNames=new Map,t&&(t instanceof e?t.forEach(function(e,t){e.forEach(function(e){return n.append(t,e)})}):Object.keys(t).forEach(function(e){var r=Array.isArray(t[e])?t[e]:[t[e]];n.delete(e),r.forEach(function(t){return n.append(e,t)})}))}return e.fromResponseHeaderString=function(t){var n=new e;return t.split("\n").forEach(function(e){var t=e.indexOf(":");if(t>0){var r=e.slice(0,t),i=e.slice(t+1).trim();n.set(r,i)}}),n},e.prototype.append=function(e,t){var n=this.getAll(e);null===n?this.set(e,t):n.push(t)},e.prototype.delete=function(e){var t=e.toLowerCase();this._normalizedNames.delete(t),this._headers.delete(t)},e.prototype.forEach=function(e){var t=this;this._headers.forEach(function(n,r){return e(n,t._normalizedNames.get(r),t._headers)})},e.prototype.get=function(e){var t=this.getAll(e);return null===t?null:t.length>0?t[0]:null},e.prototype.has=function(e){return this._headers.has(e.toLowerCase())},e.prototype.keys=function(){return Array.from(this._normalizedNames.values())},e.prototype.set=function(e,t){Array.isArray(t)?t.length&&this._headers.set(e.toLowerCase(),[t.join(",")]):this._headers.set(e.toLowerCase(),[t]),this.mayBeSetNormalizedName(e)},e.prototype.values=function(){return Array.from(this._headers.values())},e.prototype.toJSON=function(){var e=this,t={};return this._headers.forEach(function(n,r){var i=[];n.forEach(function(e){return i.push.apply(i,u(e.split(",")))}),t[e._normalizedNames.get(r)]=i}),t},e.prototype.getAll=function(e){return this.has(e)&&this._headers.get(e.toLowerCase())||null},e.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},e.prototype.mayBeSetNormalizedName=function(e){var t=e.toLowerCase();this._normalizedNames.has(t)||this._normalizedNames.set(t,e)},e}(),Gd=function(){function e(e){void 0===e&&(e={});var t=e.body,n=e.status,r=e.headers,i=e.statusText,o=e.type,s=e.url;this.body=null!=t?t:null,this.status=null!=n?n:null,this.headers=null!=r?r:null,this.statusText=null!=i?i:null,this.type=null!=o?o:null,this.url=null!=s?s:null}return e.prototype.merge=function(t){return new e({body:t&&null!=t.body?t.body:this.body,status:t&&null!=t.status?t.status:this.status,headers:t&&null!=t.headers?t.headers:this.headers,statusText:t&&null!=t.statusText?t.statusText:this.statusText,type:t&&null!=t.type?t.type:this.type,url:t&&null!=t.url?t.url:this.url})},e}(),Wd=function(e){function t(){return e.call(this,{status:200,statusText:"Ok",type:$d.Default,headers:new zd})||this}return i(t,e),t}(Gd),Zd=function(){};function Kd(e){if("string"!=typeof e)return e;switch(e.toUpperCase()){case"GET":return qd.Get;case"POST":return qd.Post;case"PUT":return qd.Put;case"DELETE":return qd.Delete;case"OPTIONS":return qd.Options;case"HEAD":return qd.Head;case"PATCH":return qd.Patch}throw new Error('Invalid request method. The method "'+e+'" is not supported.')}var Jd=function(e){return e>=200&&e<300},Xd=function(){function e(){}return e.prototype.encodeKey=function(e){return Yd(e)},e.prototype.encodeValue=function(e){return Yd(e)},e}();function Yd(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Qd=function(){function e(e,t){void 0===e&&(e=""),void 0===t&&(t=new Xd),this.rawParams=e,this.queryEncoder=t,this.paramsMap=function(e){void 0===e&&(e="");var t=new Map;return e.length>0&&e.split("&").forEach(function(e){var n=e.indexOf("="),r=a(-1==n?[e,""]:[e.slice(0,n),e.slice(n+1)],2),i=r[0],o=r[1],s=t.get(i)||[];s.push(o),t.set(i,s)}),t}(e)}return e.prototype.clone=function(){var t=new e("",this.queryEncoder);return t.appendAll(this),t},e.prototype.has=function(e){return this.paramsMap.has(e)},e.prototype.get=function(e){var t=this.paramsMap.get(e);return Array.isArray(t)?t[0]:null},e.prototype.getAll=function(e){return this.paramsMap.get(e)||[]},e.prototype.set=function(e,t){if(void 0!==t&&null!==t){var n=this.paramsMap.get(e)||[];n.length=0,n.push(t),this.paramsMap.set(e,n)}else this.delete(e)},e.prototype.setAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){var r=t.paramsMap.get(n)||[];r.length=0,r.push(e[0]),t.paramsMap.set(n,r)})},e.prototype.append=function(e,t){if(void 0!==t&&null!==t){var n=this.paramsMap.get(e)||[];n.push(t),this.paramsMap.set(e,n)}},e.prototype.appendAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){for(var r=t.paramsMap.get(n)||[],i=0;i<e.length;++i)r.push(e[i]);t.paramsMap.set(n,r)})},e.prototype.replaceAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){var r=t.paramsMap.get(n)||[];r.length=0;for(var i=0;i<e.length;++i)r.push(e[i]);t.paramsMap.set(n,r)})},e.prototype.toString=function(){var e=this,t=[];return this.paramsMap.forEach(function(n,r){n.forEach(function(n){return t.push(e.queryEncoder.encodeKey(r)+"="+e.queryEncoder.encodeValue(n))})}),t.join("&")},e.prototype.delete=function(e){this.paramsMap.delete(e)},e}(),eh=function(){function e(){}return e.prototype.json=function(){return"string"==typeof this._body?JSON.parse(this._body):this._body instanceof ArrayBuffer?JSON.parse(this.text()):this._body},e.prototype.text=function(e){if(void 0===e&&(e="legacy"),this._body instanceof Qd)return this._body.toString();if(this._body instanceof ArrayBuffer)switch(e){case"legacy":return String.fromCharCode.apply(null,new Uint16Array(this._body));case"iso-8859":return String.fromCharCode.apply(null,new Uint8Array(this._body));default:throw new Error("Invalid value for encodingHint: "+e)}return null==this._body?"":"object"==typeof this._body?JSON.stringify(this._body,null,2):this._body.toString()},e.prototype.arrayBuffer=function(){return this._body instanceof ArrayBuffer?this._body:function(e){for(var t=new Uint16Array(e.length),n=0,r=e.length;n<r;n++)t[n]=e.charCodeAt(n);return t.buffer}(this.text())},e.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw new Error("The request body isn't either a blob or an array buffer")},e}(),th=function(e){function t(t){var n=e.call(this)||this;return n._body=t.body,n.status=t.status,n.ok=n.status>=200&&n.status<=299,n.statusText=t.statusText,n.headers=t.headers,n.type=t.type,n.url=t.url,n}return i(t,e),t.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},t}(eh),nh=/^\)\]\}',?\n/,rh=function(){function e(e,t,n){var r=this;this.request=e,this.response=new M(function(i){var o=t.build();o.open(qd[e.method].toUpperCase(),e.url),null!=e.withCredentials&&(o.withCredentials=e.withCredentials);var s=function(){var t=1223===o.status?204:o.status,r=null;204!==t&&"string"==typeof(r=void 0===o.response?o.responseText:o.response)&&(r=r.replace(nh,"")),0===t&&(t=r?200:0);var s,a=zd.fromResponseHeaderString(o.getAllResponseHeaders()),u=("responseURL"in(s=o)?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):null)||e.url,l=new Gd({body:r,status:t,headers:a,statusText:o.statusText||"OK",url:u});null!=n&&(l=n.merge(l));var c=new th(l);if(c.ok=Jd(t),c.ok)return i.next(c),void i.complete();i.error(c)},a=function(e){var t=new Gd({body:e,type:$d.Error,status:o.status,statusText:o.statusText});null!=n&&(t=n.merge(t)),i.error(new th(t))};if(r.setDetectedContentType(e,o),null==e.headers&&(e.headers=new zd),e.headers.has("Accept")||e.headers.append("Accept","application/json, text/plain, */*"),e.headers.forEach(function(e,t){return o.setRequestHeader(t,e.join(","))}),null!=e.responseType&&null!=o.responseType)switch(e.responseType){case Hd.ArrayBuffer:o.responseType="arraybuffer";break;case Hd.Json:o.responseType="json";break;case Hd.Text:o.responseType="text";break;case Hd.Blob:o.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return o.addEventListener("load",s),o.addEventListener("error",a),o.send(r.request.getBody()),function(){o.removeEventListener("load",s),o.removeEventListener("error",a),o.abort()}})}return e.prototype.setDetectedContentType=function(e,t){if(null==e.headers||null==e.headers.get("Content-Type"))switch(e.contentType){case Ud.NONE:break;case Ud.JSON:t.setRequestHeader("content-type","application/json");break;case Ud.FORM:t.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case Ud.TEXT:t.setRequestHeader("content-type","text/plain");break;case Ud.BLOB:var n=e.blob();n.type&&t.setRequestHeader("content-type",n.type)}},e}(),ih=function(){function e(e,t){void 0===e&&(e="XSRF-TOKEN"),void 0===t&&(t="X-XSRF-TOKEN"),this._cookieName=e,this._headerName=t}return e.prototype.configureRequest=function(e){var t=Cu().getCookie(this._cookieName);t&&e.headers.set(this._headerName,t)},e}(),oh=function(){function e(e,t,n){this._browserXHR=e,this._baseResponseOptions=t,this._xsrfStrategy=n}return e.prototype.createConnection=function(e){return this._xsrfStrategy.configureRequest(e),new rh(e,this._browserXHR,this._baseResponseOptions)},e}(),sh=function(){function e(e){void 0===e&&(e={});var t=e.method,n=e.headers,r=e.body,i=e.url,o=e.search,s=e.params,a=e.withCredentials,u=e.responseType;this.method=null!=t?Kd(t):null,this.headers=null!=n?n:null,this.body=null!=r?r:null,this.url=null!=i?i:null,this.params=this._mergeSearchParams(s||o),this.withCredentials=null!=a?a:null,this.responseType=null!=u?u:null}return Object.defineProperty(e.prototype,"search",{get:function(){return this.params},set:function(e){this.params=e},enumerable:!0,configurable:!0}),e.prototype.merge=function(t){return new e({method:t&&null!=t.method?t.method:this.method,headers:t&&null!=t.headers?t.headers:new zd(this.headers),body:t&&null!=t.body?t.body:this.body,url:t&&null!=t.url?t.url:this.url,params:t&&this._mergeSearchParams(t.params||t.search),withCredentials:t&&null!=t.withCredentials?t.withCredentials:this.withCredentials,responseType:t&&null!=t.responseType?t.responseType:this.responseType})},e.prototype._mergeSearchParams=function(e){return e?e instanceof Qd?e.clone():"string"==typeof e?new Qd(e):this._parseParams(e):this.params},e.prototype._parseParams=function(e){var t=this;void 0===e&&(e={});var n=new Qd;return Object.keys(e).forEach(function(r){var i=e[r];Array.isArray(i)?i.forEach(function(e){return t._appendParam(r,e,n)}):t._appendParam(r,i,n)}),n},e.prototype._appendParam=function(e,t,n){"string"!=typeof t&&(t=JSON.stringify(t)),n.append(e,t)},e}(),ah=function(e){function t(){return e.call(this,{method:qd.Get,headers:new zd})||this}return i(t,e),t}(sh),uh=function(e){function t(t){var n=e.call(this)||this,r=t.url;n.url=t.url;var i,o=t.params||t.search;if(o&&(i="object"!=typeof o||o instanceof Qd?o.toString():function(e){var t=new Qd;return Object.keys(e).forEach(function(n){var r=e[n];r&&Array.isArray(r)?r.forEach(function(e){return t.append(n,e.toString())}):t.append(n,r.toString())}),t}(o).toString()).length>0){var s="?";-1!=n.url.indexOf("?")&&(s="&"==n.url[n.url.length-1]?"":"&"),n.url=r+s+i}return n._body=t.body,n.method=Kd(t.method),n.headers=new zd(t.headers),n.contentType=n.detectContentType(),n.withCredentials=t.withCredentials,n.responseType=t.responseType,n}return i(t,e),t.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return Ud.JSON;case"application/x-www-form-urlencoded":return Ud.FORM;case"multipart/form-data":return Ud.FORM_DATA;case"text/plain":case"text/html":return Ud.TEXT;case"application/octet-stream":return this._body instanceof dh?Ud.ARRAY_BUFFER:Ud.BLOB;default:return this.detectContentTypeFromBody()}},t.prototype.detectContentTypeFromBody=function(){return null==this._body?Ud.NONE:this._body instanceof Qd?Ud.FORM:this._body instanceof fh?Ud.FORM_DATA:this._body instanceof ph?Ud.BLOB:this._body instanceof dh?Ud.ARRAY_BUFFER:this._body&&"object"==typeof this._body?Ud.JSON:Ud.TEXT},t.prototype.getBody=function(){switch(this.contentType){case Ud.JSON:case Ud.FORM:return this.text();case Ud.FORM_DATA:return this._body;case Ud.TEXT:return this.text();case Ud.BLOB:return this.blob();case Ud.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},t}(eh),lh=function(){},ch="object"==typeof window?window:lh,fh=ch.FormData||lh,ph=ch.Blob||lh,dh=ch.ArrayBuffer||lh;function hh(e,t){return e.createConnection(t).response}function yh(e,t,n,r){return e.merge(new sh(t?{method:t.method||n,url:t.url||r,search:t.search,params:t.params,headers:t.headers,body:t.body,withCredentials:t.withCredentials,responseType:t.responseType}:{method:n,url:r}))}var mh=function(){function e(e,t){this._backend=e,this._defaultOptions=t}return e.prototype.request=function(e,t){var n;if("string"==typeof e)n=hh(this._backend,new uh(yh(this._defaultOptions,t,qd.Get,e)));else{if(!(e instanceof uh))throw new Error("First argument must be a url string or Request instance.");n=hh(this._backend,e)}return n},e.prototype.get=function(e,t){return this.request(new uh(yh(this._defaultOptions,t,qd.Get,e)))},e.prototype.post=function(e,t,n){return this.request(new uh(yh(this._defaultOptions.merge(new sh({body:t})),n,qd.Post,e)))},e.prototype.put=function(e,t,n){return this.request(new uh(yh(this._defaultOptions.merge(new sh({body:t})),n,qd.Put,e)))},e.prototype.delete=function(e,t){return this.request(new uh(yh(this._defaultOptions,t,qd.Delete,e)))},e.prototype.patch=function(e,t,n){return this.request(new uh(yh(this._defaultOptions.merge(new sh({body:t})),n,qd.Patch,e)))},e.prototype.head=function(e,t){return this.request(new uh(yh(this._defaultOptions,t,qd.Head,e)))},e.prototype.options=function(e,t){return this.request(new uh(yh(this._defaultOptions,t,qd.Options,e)))},e}();function gh(){return new ih}function vh(e,t){return new mh(e,t)}var bh=function(){},_h=function(){},wh=function(){},Th=function(){function e(e){var t=this;this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?function(){t.headers=new Map,e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>0){var r=e.slice(0,n),i=r.toLowerCase(),o=e.slice(n+1).trim();t.maybeSetNormalizedName(r,i),t.headers.has(i)?t.headers.get(i).push(o):t.headers.set(i,[o])}})}:function(){t.headers=new Map,Object.keys(e).forEach(function(n){var r=e[n],i=n.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(t.headers.set(i,r),t.maybeSetNormalizedName(n,i))})}:this.headers=new Map}return e.prototype.has=function(e){return this.init(),this.headers.has(e.toLowerCase())},e.prototype.get=function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null},e.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},e.prototype.getAll=function(e){return this.init(),this.headers.get(e.toLowerCase())||null},e.prototype.append=function(e,t){return this.clone({name:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({name:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({name:e,value:t,op:"d"})},e.prototype.maybeSetNormalizedName=function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)},e.prototype.init=function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))},e.prototype.copyFrom=function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})},e.prototype.clone=function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n},e.prototype.applyUpdate=function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,u(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var o=this.headers.get(t);if(!o)return;0===(o=o.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}},e.prototype.forEach=function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})},e}(),xh=function(){function e(){}return e.prototype.encodeKey=function(e){return Sh(e)},e.prototype.encodeValue=function(e){return Sh(e)},e.prototype.decodeKey=function(e){return decodeURIComponent(e)},e.prototype.decodeValue=function(e){return decodeURIComponent(e)},e}();function Sh(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Ih=function(){function e(e){void 0===e&&(e={});var t,n,r,i=this;if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new xh,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(t=e.fromString,n=this.encoder,r=new Map,t.length>0&&t.split("&").forEach(function(e){var t=e.indexOf("="),i=a(-1==t?[n.decodeKey(e),""]:[n.decodeKey(e.slice(0,t)),n.decodeValue(e.slice(t+1))],2),o=i[0],s=i[1],u=r.get(o)||[];u.push(s),r.set(o,u)}),r)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(function(t){var n=e.fromObject[t];i.map.set(t,Array.isArray(n)?n:[n])})):this.map=null}return e.prototype.has=function(e){return this.init(),this.map.has(e)},e.prototype.get=function(e){this.init();var t=this.map.get(e);return t?t[0]:null},e.prototype.getAll=function(e){return this.init(),this.map.get(e)||null},e.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},e.prototype.append=function(e,t){return this.clone({param:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({param:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({param:e,value:t,op:"d"})},e.prototype.toString=function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).join("&")},e.prototype.clone=function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n},e.prototype.init=function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=null)},e}();function Dh(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function Ch(e){return"undefined"!=typeof Blob&&e instanceof Blob}function kh(e){return"undefined"!=typeof FormData&&e instanceof FormData}var Eh=function(){function e(e,t,n,r){var i;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,i=r):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.params&&(this.params=i.params)),this.headers||(this.headers=new Th),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{var s=t.indexOf("?");this.urlWithParams=t+(-1===s?"?":s<t.length-1?"&":"")+o}}else this.params=new Ih,this.urlWithParams=t}return e.prototype.serializeBody=function(){return null===this.body?null:Dh(this.body)||Ch(this.body)||kh(this.body)||"string"==typeof this.body?this.body:this.body instanceof Ih?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},e.prototype.detectContentTypeHeader=function(){return null===this.body?null:kh(this.body)?null:Ch(this.body)?this.body.type||null:Dh(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Ih?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},e.prototype.clone=function(t){void 0===t&&(t={});var n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,u=t.headers||this.headers,l=t.params||this.params;return void 0!==t.setHeaders&&(u=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},u)),t.setParams&&(l=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},l)),new e(n,r,o,{params:l,headers:u,reportProgress:a,responseType:i,withCredentials:s})},e}(),Mh=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Mh||(Mh={})),Ah=function(){return function(e,t,n){void 0===t&&(t=200),void 0===n&&(n="OK"),this.headers=e.headers||new Th,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}(),Ph=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type=Mh.ResponseHeader,n}return i(t,e),t.prototype.clone=function(e){return void 0===e&&(e={}),new t({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})},t}(Ah),Vh=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type=Mh.Response,n.body=void 0!==t.body?t.body:null,n}return i(t,e),t.prototype.clone=function(e){return void 0===e&&(e={}),new t({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})},t}(Ah),Nh=function(e){function t(t){var n=e.call(this,t,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.message=n.status>=200&&n.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):"Http failure response for "+(t.url||"(unknown url)")+": "+t.status+" "+t.statusText,n.error=t.error||null,n}return i(t,e),t}(Ah);function Oh(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var Rh=function(){function e(e){this.handler=e}return e.prototype.request=function(e,t,n){var r,i=this;if(void 0===n&&(n={}),e instanceof Eh)r=e;else{var o;o=n.headers instanceof Th?n.headers:new Th(n.headers);var s=void 0;n.params&&(s=n.params instanceof Ih?n.params:new Ih({fromObject:n.params})),r=new Eh(e,t,void 0!==n.body?n.body:null,{headers:o,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var a=Xa(r).pipe(Qa(function(e){return i.handler.handle(e)}));if(e instanceof Eh||"events"===n.observe)return a;var u=a.pipe(eu(function(e){return e instanceof Vh}));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return u.pipe(H(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return u.pipe(H(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return u.pipe(H(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return u.pipe(H(function(e){return e.body}))}case"response":return u;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},e.prototype.delete=function(e,t){return void 0===t&&(t={}),this.request("DELETE",e,t)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("GET",e,t)},e.prototype.head=function(e,t){return void 0===t&&(t={}),this.request("HEAD",e,t)},e.prototype.jsonp=function(e,t){return this.request("JSONP",e,{params:(new Ih).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},e.prototype.options=function(e,t){return void 0===t&&(t={}),this.request("OPTIONS",e,t)},e.prototype.patch=function(e,t,n){return void 0===n&&(n={}),this.request("PATCH",e,Oh(n,t))},e.prototype.post=function(e,t,n){return void 0===n&&(n={}),this.request("POST",e,Oh(n,t))},e.prototype.put=function(e,t,n){return void 0===n&&(n={}),this.request("PUT",e,Oh(n,t))},e}(),Lh=function(){function e(e,t){this.next=e,this.interceptor=t}return e.prototype.handle=function(e){return this.interceptor.intercept(e,this.next)},e}(),Fh=new de("HTTP_INTERCEPTORS"),Bh=function(){function e(){}return e.prototype.intercept=function(e,t){return t.handle(e)},e}(),qh=/^\)\]\}',?\n/,jh=function(){},$h=function(){function e(){}return e.prototype.build=function(){return new XMLHttpRequest},e}(),Uh=function(){function e(e){this.xhrFactory=e}return e.prototype.handle=function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new M(function(n){var r=t.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(function(e,t){return r.setRequestHeader(e,t.join(","))}),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var i=e.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(e.responseType){var o=e.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var s=e.serializeBody(),a=null,u=function(){if(null!==a)return a;var t=1223===r.status?204:r.status,n=r.statusText||"OK",i=new Th(r.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return a=new Ph({headers:i,status:t,statusText:n,url:o})},l=function(){var t=u(),i=t.headers,o=t.status,s=t.statusText,a=t.url,l=null;204!==o&&(l=void 0===r.response?r.responseText:r.response),0===o&&(o=l?200:0);var c=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof l){var f=l;l=l.replace(qh,"");try{l=""!==l?JSON.parse(l):null}catch(e){l=f,c&&(c=!1,l={error:e,text:l})}}c?(n.next(new Vh({body:l,headers:i,status:o,statusText:s,url:a||void 0})),n.complete()):n.error(new Nh({error:l,headers:i,status:o,statusText:s,url:a||void 0}))},c=function(e){var t=new Nh({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error"});n.error(t)},f=!1,p=function(t){f||(n.next(u()),f=!0);var i={type:Mh.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),"text"===e.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},d=function(e){var t={type:Mh.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return r.addEventListener("load",l),r.addEventListener("error",c),e.reportProgress&&(r.addEventListener("progress",p),null!==s&&r.upload&&r.upload.addEventListener("progress",d)),r.send(s),n.next({type:Mh.Sent}),function(){r.removeEventListener("error",c),r.removeEventListener("load",l),e.reportProgress&&(r.removeEventListener("progress",p),null!==s&&r.upload&&r.upload.removeEventListener("progress",d)),r.abort()}})},e}(),Hh=new de("XSRF_COOKIE_NAME"),zh=new de("XSRF_HEADER_NAME"),Gh=function(){},Wh=function(){function e(e,t,n){this.doc=e,this.platform=t,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return e.prototype.getToken=function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Sa(e,this.cookieName),this.lastCookieString=e),this.lastToken},e}(),Zh=function(){function e(e,t){this.tokenService=e,this.headerName=t}return e.prototype.intercept=function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var r=this.tokenService.getToken();return null===r||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,r)})),t.handle(e)},e}(),Kh=function(){function e(e,t){this.backend=e,this.injector=t,this.chain=null}return e.prototype.handle=function(e){if(null===this.chain){var t=this.injector.get(Fh,[]);this.chain=t.reduceRight(function(e,t){return new Lh(e,t)},this.backend)}return this.chain.handle(e)},e}(),Jh=function(){function e(){}return e.disable=function(){return{ngModule:e,providers:[{provide:Zh,useClass:Bh}]}},e.withOptions=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[t.cookieName?{provide:Hh,useValue:t.cookieName}:[],t.headerName?{provide:zh,useValue:t.headerName}:[]]}},e}(),Xh=function(){},Yh=function(){},Qh=function(e,t,n){return new Bs(Ys,[Qs],function(e){return function(e){for(var t={},n=[],r=!1,i=0;i<e.length;i++){var o=e[i];o.token===ct&&(r=!0),1073741824&o.flags&&n.push(o.token),o.index=i,t[Fr(o.token)]=o}return{factory:null,providersByKey:t,providers:e,modules:n,isRoot:r}}([Si(512,At,Pt,[[8,[za,Ed,Nd,Fd]],[3,At],Nt]),Si(5120,Kn,Qn,[[3,Kn]]),Si(4608,Ta,xa,[Kn,[2,wa]]),Si(5120,yt,mt,[]),Si(5120,Un,Xn,[]),Si(5120,Hn,Yn,[]),Si(4608,Il,Dl,[La]),Si(6144,Sr,null,[Il]),Si(4608,bl,_l,[]),Si(5120,Gu,function(e,t,n,r,i,o){return[new gl(e,t),new Sl(n),new wl(r,i,o)]},[La,jt,La,La,bl,wt]),Si(4608,Wu,Wu,[Gu,jt]),Si(135680,Ju,Ju,[La]),Si(4608,rl,rl,[Wu,Ju]),Si(6144,cn,null,[rl]),Si(6144,Ku,null,[Ju]),Si(4608,Kt,Kt,[jt]),Si(4608,Fu,Fu,[La]),Si(4608,$u,$u,[La]),Si(4608,Ep,Ep,[]),Si(4608,Bd,Bd,[]),Si(4608,Gd,Wd,[]),Si(5120,Zd,gh,[]),Si(4608,oh,oh,[Bd,Gd,Zd]),Si(4608,sh,ah,[]),Si(5120,mh,vh,[oh,sh]),Si(4608,Gh,Wh,[La,bt,Hh]),Si(4608,Zh,Zh,[Gh,zh]),Si(5120,Fh,function(e){return[e]},[Zh]),Si(4608,$h,$h,[]),Si(6144,jh,null,[$h]),Si(4608,Uh,Uh,[jh]),Si(6144,wh,null,[Uh]),Si(4608,_h,Kh,[wh,Be]),Si(4608,Rh,Rh,[_h]),Si(5120,Xc,rp,[Lf]),Si(4608,Gf,Gf,[]),Si(6144,Hf,null,[Gf]),Si(135680,Wf,Wf,[Lf,hn,xt,Be,Hf]),Si(4608,zf,zf,[]),Si(5120,ap,sp,[ip]),Si(5120,_t,function(e){return[e]},[ap]),Si(4608,Hs,Hs,[]),Si(4608,Ks,Ks,[Hs]),Si(1073742336,Ra,Ra,[]),Si(1024,lt,Nl,[]),Si(1024,nn,function(){return[Xf()]},[]),Si(512,ip,ip,[Be]),Si(1024,dt,function(e,t){return[(n=e,Uu("probe",zu),Uu("coreTokens",o({},Hu,(n||[]).reduce(function(e,t){return e[t.name]=t.token,e},{}))),function(){return zu}),op(t)];var n},[[2,nn],ip]),Si(512,ht,ht,[[2,dt]]),Si(131584,un,un,[jt,wt,Be,lt,At,ht]),Si(1073742336,er,er,[un]),Si(1073742336,Ol,Ol,[[3,Ol]]),Si(1073742336,nd,nd,[]),Si(1073742336,rd,rd,[]),Si(1073742336,bh,bh,[]),Si(1073742336,Jh,Jh,[]),Si(1073742336,Xh,Xh,[]),Si(1024,Kf,ep,[[3,Lf]]),Si(512,bc,_c,[]),Si(512,jf,jf,[]),Si(256,Zf,{useHash:!0},[]),Si(1024,na,Qf,[ea,[2,ra],Zf]),Si(512,ia,ia,[na]),Si(512,xt,xt,[]),Si(512,hn,vn,[xt,[2,mn]]),Si(1024,Af,function(){return[[{path:"",component:ja},{path:"home",component:ja},{path:"home/:account",component:Dd},{path:"stats",component:Md}]]},[]),Si(1024,Lf,np,[un,bc,jf,ia,Be,hn,xt,Af,Zf,[2,Vf],[2,Ef]]),Si(1073742336,Yf,Yf,[[2,Kf],[2,Lf]]),Si(1073742336,Yh,Yh,[]),Si(1073742336,Ys,Ys,[]),Si(256,ct,!0,[]),Si(256,Hh,"XSRF-TOKEN",[]),Si(256,zh,"X-XSRF-TOKEN",[])])})}();js.production&&function(){if(Qt)throw new Error("Cannot enable prod mode after platform setup.");Yt=!1}(),Vl().bootstrapModuleFactory(Qh)},zb58:function(e,t,n){var r=n("ZMb4"),i=function(e,t){for(var n=e;n.length<2*t;)n="0"+n;return n},o=function(e){var t="A".charCodeAt(0),n="Z".charCodeAt(0);return(e=(e=e.toUpperCase()).substr(4)+e.substr(0,4)).split("").map(function(e){var r=e.charCodeAt(0);return r>=t&&r<=n?r-t+10:e}).join("")},s=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},a=function(e){this._iban=e};a.fromAddress=function(e){var t=new r(e,16).toString(36),n=i(t,15);return a.fromBban(n.toUpperCase())},a.fromBban=function(e){var t=("0"+(98-s(o("XE00"+e)))).slice(-2);return new a("XE"+t+e)},a.createIndirect=function(e){return a.fromBban("ETH"+e.institution+e.identifier)},a.isValid=function(e){return new a(e).isValid()},a.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(o(this._iban))},a.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},a.prototype.isIndirect=function(){return 20===this._iban.length},a.prototype.checksum=function(){return this._iban.substr(2,2)},a.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},a.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},a.prototype.address=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i(t.toString(16),20)}return""},a.prototype.toString=function(){return this._iban},e.exports=a},zjql:function(e,t,n){var r=n("NFKh"),i=n("5hvy");e.exports=function(e,t){return t&&"hex"===t.encoding&&(e.length>2&&"0x"===e.substr(0,2)&&(e=e.substr(2)),e=r.enc.Hex.parse(e)),i(e,{outputLength:256}).toString()}},"zo/c":function(e,t,n){var r=n("LRpe");e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"],ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:r.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},zo3G:function(e,t,n){"use strict";var r=n(null),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return r.c(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.c(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(function(e){function t(t,n){return e.call(this)||this}return r.c(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(null).a))),o=n("siIJ"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.c(t,e),t}(function(e){function t(n,r){void 0===r&&(r=o.Scheduler.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.c(t,e),t.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,i):e.prototype.schedule.call(this,n,r,i)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(o.Scheduler));n.d(t,"queue",function(){return a});var a=new s(i)},"zrt+":function(e,t,n){"use strict";n.r(t),n.d(t,"isObservable",function(){return i});var r=n(null);function i(e){return e&&e instanceof r.a||"function"==typeof e.lift&&"function"==typeof e.subscribe}}},[[4,0]]]);