-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
180 lines (165 loc) · 398 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="ie=edge"><meta name="robots" content="index, follow"><meta name="viewport" content="width=device-width, initial-scale=1"><link href="style.css" rel="stylesheet"><script src="https://use.fontawesome.com/2e0323659f.js"></script></head><body><div class="container"><div class="row"><div class="column"><div id="header"></div></div></div><div class="row"><div class="column"><div id="content"><div class="loader"></div></div></div></div><div class="row"><div class="column"><div class="footer"></div></div></div></div></body><script type='text/javascript' src='https://cdn.jsdelivr.net/remarkable/1.7.1/remarkable.min.js'></script><script type="text/javascript">
var s=[]; // Steemlink Settings
s['steemusername'] = 'ausbitbank';
s['showresteems'] = true;
s['steemsite']='';
//s['steemsite']='https://steemit.com';
s['showfullposts']=true;
s['defaultsort']='created';
//steemjs
!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){(function(n){"use strict";var i={api:r(1),auth:r(140),broadcast:r(234),formatter:r(236)};"undefined"!=typeof window&&(window.steem=i),"undefined"!=typeof n&&(n.steem=i),e=t.exports=i}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),u=r(2),f=n(u),c=r(3),l=n(c),h=r(7),p=n(h),d=r(119),v=n(d),g=r(132),y=n(g),_=r(133),m=n(_),b=r(136),w=n(b),E=r(137),k=n(E),T=r(138),B=(0,m.default)("steem:emitters"),S=(0,m.default)("steem:protocol"),x=(0,m.default)("steem:setup"),j=(0,m.default)("steem:api_ids"),I=(0,m.default)("steem:ws"),A=void 0;if(y.default)A=r(139);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");A=window.WebSocket}var O={url:w.default.websocket,apiIds:{database_api:0,login_api:1,follow_api:2,network_broadcast_api:4},id:0},R=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,v.default)(t,O),r.options=(0,p.default)(t),r.id=0,r.inFlight=0,r.currentP=l.default.fulfilled(),r.apiIds=r.options.apiIds,r.isOpen=!1,r.releases=[],r.apiIdsP={},r}return a(e,t),s(e,[{key:"setWebSocket",value:function(t){x("Setting WS",t),this.options.url=t,this.stop()}},{key:"start",value:function(){var t=this;if(this.startP)return this.startP;var e=new l.default(function(r,n){if(e===t.startP){var i=t.options.url;t.ws=new A(i);var o=t.listenTo(t.ws,"open",function(){I("Opened WS connection with",i),t.isOpen=!0,o(),r()}),a=t.listenTo(t.ws,"close",function(){I("Closed WS connection with",i),t.isOpen=!1,delete t.ws,t.stop(),e.isPending()&&n(new Error("The WS connection was closed before this operation was made"))}),s=t.listenTo(t.ws,"message",function(e){I("Received message",e.data),t.emit("message",JSON.parse(e.data))});t.releases=t.releases.concat([o,a,s])}});return this.startP=e,this.getApiIds(),e}},{key:"stop",value:function(){x("Stopping..."),this.ws&&this.ws.close(),this.apiIdsP={},delete this.startP,delete this.ws,this.releases.forEach(function(t){return t()}),this.releases=[]}},{key:"listenTo",value:function(t,e,r){return B("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){B("Removing listener for",e,"from",t.constructor.name),t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"getApiIds",value:function(t,e){var r=this;if(!e&&t&&this.apiIdsP[t])return this.apiIdsP[t];var n=t?[t]:Object.keys(this.apiIds);return n.forEach(function(t){j("Syncing API ID",t),r.apiIdsP[t]=r.getApiByNameAsync(t).then(function(e){null!=e?r.apiIds[t]=e:j("Dropped null API ID for",t,e)})}),t?this.apiIdsP[t]:l.default.props(this.apiIdsP)}},{key:"waitForSlot",value:function(){var t=this;return this.inFlight<10?(B("Less than 10 in-flight messages, moving on"),null):(B("More than 10 in-flight messages, waiting"),l.default.delay(100).then(function(){return t.inFlight<10?(B("Less than 10 in-flight messages, moving on"),null):t.waitForSlot()}))}},{key:"send",value:function(t,e,r){var n=this;x("Steem::send",t,e);var i=e.id||this.id++,o=this.start(),a="login_api"===t&&"get_api_by_name"===e.method?l.default.fulfilled():this.getApiIds(t);return j("login_api"===t&&"get_api_by_name"===e.method?"Sending setup message":"Going to wait for setup messages to resolve"),this.currentP=l.default.join(o,a,this.waitForSlot()).then(function(){return new l.default(function(r,o){if(!n.ws)return void o(new Error("The WS connection was closed while this request was pending"));var a=JSON.stringify({id:i,method:"call",params:[n.apiIds[t],e.method,e.params]}),s=n.listenTo(n,"message",function(a){if(a.id!==i)return void S("Different message was dropped",a);n.inFlight-=1,s();var u=a.error;if(u){var f=new Error((u.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return f.payload=a,void o(f)}"login_api"===t&&"login"===e.method&&(j("network_broadcast_api API ID depends on the WS' session. Triggering a refresh..."),n.getApiIds("network_broadcast_api",!0)),S("Resolved",t,e,"->",a),r(a.result)});I("Sending message",a),n.ws.send(a)})}).nodeify(r),this.inFlight+=1,this.currentP}},{key:"streamBlockNumber",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n="",i=!0,o=function o(){i&&e.getDynamicGlobalPropertiesAsync().then(function(e){var i=e.head_block_number;i!==n&&(n=i,t(null,n)),l.default.delay(r).then(function(){o()})},function(e){t(e)})};return o(),function(){i=!1}}},{key:"streamBlock",value:function(t){var e=this,r="",n="",i=this.streamBlockNumber(function(o,a){return o?(i(),void t(o)):(r=a,void(r!==n&&(n=r,e.getBlock(r,t))))});return i}},{key:"streamTransactions",value:function(t){var e=this.streamBlock(function(r,n){return r?(e(),void t(r)):void(n&&n.transactions&&n.transactions.forEach(function(e){t(null,e)}))});return e}},{key:"streamOperations",value:function(t){var e=this.streamTransactions(function(r,n){return r?(e(),void t(r)):void n.operations.forEach(function(e){t(null,e)})});return e}}]),e}(f.default);k.default.forEach(function(t){var e=(0,T.camelCase)(t.method),r=t.params||[];R.prototype[e+"With"]=function(e,n){var i=r.map(function(t){return e[t]});return this.send(t.api,{method:t.method,params:i},n)},R.prototype[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.reduce(function(t,e,r){return t[e]=n[r],t},{}),a=n[r.length];return this[e+"With"](o,a)}}),l.default.promisifyAll(R.prototype);var C=new R;e=t.exports=C,e.Steem=R,e.Steem.DEFAULTS=O},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(r=this._events[t],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),f=r.slice(),i=f.length,u=0;u<i;u++)f[u].apply(this,s);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(function(e,r,n){!function(e){t.exports=e()}(function(){var t,i,o;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var c=r[a]={exports:{}};e[a][0].call(c.exports,function(t){var r=e[a][1][t];return i(r?r:t)},c,c.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,r,n){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new c(16),this._normalQueue=new c(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=f}function o(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function a(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var f=t("./schedule"),c=t("./queue"),l=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){l.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},l.hasDevTools?(i.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},i.prototype.invoke=function(t,e,r){this._trampolineEnabled?a.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=a,i.prototype.settlePromises=s),i.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var f=r(o),c=new t(e);c._propagateFrom(this,1);var l=this._target();if(c._setBoundTo(f),f instanceof t){var h={promiseRejectionQueued:!1,promise:c,target:l,bindingPromise:f};l._then(e,a,void 0,c,h),f._then(s,u,void 0,c,h),c._setOnCancel(f)}else c._resolveCallback(l);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=n,e.exports=o},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+s.classString(t)+" has no method '"+s.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=a(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,r){"use strict";e.exports=function(e){function r(t,r,s){return function(u){var f=s._boundValue();t:for(var c=0;c<t.length;++c){var l=t[c];if(l===Error||null!=l&&l.prototype instanceof Error){if(u instanceof l)return o(r).call(f,u)}else if("function"==typeof l){var h=o(l).call(f,u);if(h===a)return h;if(h)return o(r).call(f,u)}else if(n.isObject(u)){for(var p=i(l),d=0;d<p.length;++d){var v=p[d];if(l[v]!=u[v])continue t}return o(r).call(f,u)}}return e}}var n=t("./util"),i=t("./es5").keys,o=n.tryCatch,a=n.errorObj;return r}},{"./es5":13,"./util":36}],8:[function(t,e,r){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(i)return new e}function n(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+q.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?q.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function f(t){this._onCancelField=t}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function l(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new R(this._peekContext())}function v(t,e){if(M(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=T(t);q.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),q.notEnumerableProp(t,"__stackCleaned__",!0)}}}function g(t,e,r,n,i){if(void 0===t&&null!==e&&Z){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=E(s),f=u.length-1;f>=0;--f){var c=u[f];if(!z.test(c)){var l=c.match(V);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0)for(var h=u[0],f=0;f<s.length;++f)if(s[f]===h){f>0&&(a="\n"+s[f-1]);break}}var p="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(p,!0,e)}}function y(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),_(r)}function _(t,e,n){if(at.warnings){var i,o=new D(t);if(e)n._attachExtraTrace(o);else if(at.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=T(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||B(o,"",!0)}}function m(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function b(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(e[i]!==u)break;e.pop(),i--}e=n}}function E(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||H.test(n),o=i&&nt(n);i&&!o&&(Y&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function k(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||H.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function T(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?k(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:E(e)}}function B(t,e,r){if("undefined"!=typeof console){var n;if(q.isObject(t)){var i=t.stack;n=e+W(i,t)}else n=e+String(t);"function"==typeof F?F(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function S(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){P.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||i||B(r,"Unhandled rejection "):et(t,n)}function x(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():q.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+j(e)+">, no stack trace)"}function j(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function I(){return"function"==typeof ot}function A(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function O(t,e){if(I()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,u=0;u<i.length;++u){var f=A(i[u]);if(f){r=f.fileName,a=f.line;break}}for(var u=0;u<o.length;++u){var f=A(o[u]);if(f){n=f.fileName,s=f.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(nt=function(t){if(N.test(t))return!0;var e=A(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function R(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,R),e>32&&this.uncycle()}var C,L,F,U=r._getDomain,P=r._async,D=t("./errors").Warning,q=t("./util"),M=q.canAttachTrace,N=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,z=/\((?:timers\.js):\d+:\d+\)/,V=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,W=null,Y=!1,X=!(0==q.env("BLUEBIRD_DEBUG")),G=!(0==q.env("BLUEBIRD_WARNINGS")||!X&&!q.env("BLUEBIRD_WARNINGS")),$=!(0==q.env("BLUEBIRD_LONG_STACK_TRACES")||!X&&!q.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=q.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(G||!!q.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),P.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){S("rejectionHandled",C,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),S("unhandledRejection",L,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return _(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=U();L="function"==typeof t?null===e?t:q.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=U();C="function"==typeof t?null===e?t:q.domainBind(e,t):void 0};var Q=function(){};r.longStackTraces=function(){if(P.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&I()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;at.longStackTraces=!0,Q=function(){if(P.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),P.enableTrampoline(),at.longStackTraces=!1},r.prototype._captureStackTrace=d,r.prototype._attachExtraTrace=v,n.activateLongStackTraces(),P.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return at.longStackTraces&&I()};var K=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return q.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!q.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return q.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!q.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),q.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!q.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),J=function(){return q.isNode?function(){return e.emit.apply(e,arguments)}:q.global?function(t){var e="on"+t.toLowerCase(),r=q.global[e];return!!r&&(r.apply(q.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:i},et=function(t){var e=!1;try{e=J.apply(null,arguments)}catch(t){P.throwLater(t),e=!0}var r=!1;try{r=K(t,tt[t].apply(null,arguments))}catch(t){P.throwLater(t),r=!0}return r||e};r.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&Q()),"warnings"in t){var e=t.warnings;at.warnings=!!e,Z=at.warnings,q.isObject(e)&&"wForgottenReturn"in e&&(Z=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(P.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=c,r.prototype._propagateFrom=l,r.prototype._onCancel=u,r.prototype._setOnCancel=f,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,rt=l,at.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,r.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,r.prototype._fireEvent=o)),r},r.prototype._fireEvent=o,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var rt=h,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;q.inherits(R,Error),n.CapturedTrace=R,R.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n<t;++n){var a=e[n].stack,s=r[a];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var f=u._length+1,c=n-2;c>=0;--c)e[c]._length=f,f++;return}}}},R.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=T(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(E(i.stack.split("\n"))),i=i._parent;w(n),b(n),q.notEnumerableProp(t,"stack",m(r,n)),q.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():x(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=t,W=e;var r=Error.captureStackTrace;return nt=function(t){return N.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,W=e,Y=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?x(e):e.toString()},null):(H=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(F=function(t){
console.warn(t)},q.isNode&&e.stderr.isTTY?F=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:q.isNode||"string"!=typeof(new Error).stack||(F=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:G,longStackTraces:!1,cancellation:!1,monitoring:!1};return $&&r.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return p},checkForgottenReturns:g,setBounds:O,warn:_,deprecated:y,CapturedTrace:R,fireDomEvent:K,fireGlobalEvent:J}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},{}],12:[function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(l(this,"message","string"==typeof n?n:e),l(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return c(r,Error),r}function i(t){return this instanceof i?(l(this,"name","OperationalError"),l(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(l(this,"message",t.message),l(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),u=s.freeze,f=t("./util"),c=f.inherits,l=f.notEnumerableProp,h=n("Warning","warning"),p=n("CancellationError","cancellation error"),d=n("TimeoutError","timeout error"),v=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<g.length;++y)"function"==typeof Array.prototype[g[y]]&&(v.prototype[g[y]]=Array.prototype[g[y]]);s.defineProperty(v.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),v.prototype.isOperational=!0;var _=0;v.prototype.toString=function(){var t=Array(4*_+1).join(" "),e="\n"+t+"AggregateError of:\n";_++,t=Array(4*_+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return _--,e},c(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=u({CancellationError:p,TimeoutError:d,OperationalError:i,RejectionError:i,AggregateError:v}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var r in t)i.call(t,r)&&e.push(r);return e},u=function(t,e){return{value:t[e]}},f=function(t,e,r){return t[e]=r.value,t},c=function(t){return t},l=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},h=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:h,keys:s,names:s,defineProperty:f,getDescriptor:u,freeze:c,getPrototypeOf:l,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],15:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!o(this,t))return l.e=t,l}function u(t){var n=this.promise,u=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?u.call(n._boundValue()):u.call(n._boundValue(),t);if(void 0!==f){n._setReturnedNonUndefined();var h=r(f,n);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var p=new c("late cancellation observer");return n._attachExtraTrace(p),l.e=p,l}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(a,s,void 0,this,void 0)}}}return n.isRejected()?(o(this),l.e=t,l):(o(this),t)}var f=t("./util"),c=e.CancellationError,l=f.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,i){return"function"!=typeof t?this.then():this._then(r,i,void 0,new n(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},n}},{"./util":36}],16:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=p(r[o])(t);if(n._popContext(),a===h){n._pushContext();var s=e.reject(h.e);return n._popContext(),s}var u=i(a,n);if(u instanceof e)return u}return null}function u(t,r,i,o){if(a.cancellation()){var s=new e(n),u=this._finallyPromise=new e(n);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{var f=this._promise=new e(n);f._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var f=t("./errors"),c=f.TypeError,l=t("./util"),h=l.errorObj,p=l.tryCatch,d=[];l.inherits(u,o),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,r="undefined"!=typeof this._generator.return;if(r)this._promise._pushContext(),t=p(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=p(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=p(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=p(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var r=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(!(o instanceof e)&&(o=s(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new c("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var a=o._bitField;0===(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&a)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&a)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new c("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=u,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new c("expecting a function but got "+l.classString(t));d.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new u(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}var i=[].slice.call(arguments);t&&i.pop();var n=new r(i).promise();return void 0!==t?n.spread(t):n}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=f();this._callback=null===i?e:c.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],p.invoke(this._asyncInit,this,void 0)}function u(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+c.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,r,a,o).promise()}var f=e._getDomain,c=t("./util"),l=c.tryCatch,h=c.errorObj,p=e._async;c.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var f=this._promise,c=this._callback,p=f._boundValue();f._pushContext();var d=l(c).call(p,t,r,o),v=f._popContext();if(a.checkForgottenReturns(d,v,null!==s?"Promise.filter":"Promise.map",f),d===h)return this._reject(d.e),!0;var g=i(d,this._promise);if(g instanceof e){g=g._target();var y=g._bitField;if(0===(50397184&y))return u>=1&&this._inFlight++,n[r]=g,g._proxy(this,(r+1)*-1),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(g._reason()),!0):(this._cancel(),!0);d=g._value()}n[r]=d}var _=++this._totalResolved;return _>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,r,n){return u(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var n=new e(r);n._captureStackTrace(),n._pushContext();var u;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];u=a.isArray(f)?s(t).apply(c,f):s(t).call(c,f)}else u=s(t)();var l=n._popContext();return o.checkForgottenReturns(u,l,"Promise.try",n),n._resolveFromSyncValue(u),n},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&c.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new f(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=c.keys(t),i=0;i<r.length;++i){var o=r[i];l.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(r,n){if(null!==t){if(r){var o=i(s(r));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(n);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,u=t("./errors"),f=u.OperationalError,c=t("./es5"),l=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=s(e).apply(r._boundValue(),[null].concat(t));i===u&&a.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?s(e).call(n,null):s(e).call(n,null,t);i===u&&a.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var i=s(e).call(r._boundValue(),t);i===u&&a.throwLater(i.e)}var o=t("./util"),a=e._async,s=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,r,n){"use strict";r.exports=function(){function n(){}function i(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+d.classString(e));if(t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function o(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(i(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var f,c=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},l=function(){return new o.PromiseInspection(this._target())},h=function(t){return o.reject(new m(t))},p={},d=t("./util");f=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",f);var v=t("./es5"),g=t("./async"),y=new g;v.defineProperty(o,"_async",{value:y});var _=t("./errors"),m=o.TypeError=_.TypeError;o.RangeError=_.RangeError;var b=o.CancellationError=_.CancellationError;o.TimeoutError=_.TimeoutError,o.OperationalError=_.OperationalError,o.RejectionError=_.OperationalError,o.AggregateError=_.AggregateError;var w=function(){},E={},k={},T=t("./thenables")(o,w),B=t("./promise_array")(o,w,T,h,n),S=t("./context")(o),x=S.create,j=t("./debuggability")(o,S),I=(j.CapturedTrace,t("./finally")(o,T)),A=t("./catch_filter")(k),O=t("./nodeback"),R=d.errorObj,C=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var o=arguments[r];if(!d.isObject(o))return h("expecting an object but got A catch statement predicate "+d.classString(o));n[i++]=o}return n.length=i,t=arguments[r],this.then(void 0,A(n,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},o.prototype.then=function(t,e){if(j.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?h("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,E,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new B(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=r.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=C(t)(O(e,r));return n===R&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new B(t).promise()},o.cast=function(t){var e=T(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));return y.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),c=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var l=f();if(0!==(50397184&c)){var h,p,v=u._settlePromiseCtx;0!==(33554432&c)?(p=u._rejectionHandler0,h=t):0!==(16777216&c)?(p=u._fulfillmentHandler0,h=e,u._unsetRejectionIsUnhandled()):(v=u._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),u._attachExtraTrace(p),h=e),y.invoke(v,u,{handler:null===l?h:"function"==typeof h&&d.domainBind(l,h),promise:s,receiver:n,value:p})}else u._addCallbacks(t,e,s,n,l);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){y.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var r=T(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(c());var i=n._bitField;if(0===(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s<a;++s)n._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(n._value());else if(0!==(16777216&i))this._reject(n._reason());else{var u=new b("late cancellation observer");n._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(t,e,r){var n=d.ensureErrorObject(t),i=n===t;if(!i&&!r&&j.warnings()){var o="a promise was rejected with a non-error: "+d.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},o.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0===(65536&i)){n._pushContext();var o;e===E?r&&"number"==typeof r.length?o=C(t).apply(this._boundValue(),r):(o=R,o.e=new m("cannot .spread() a non-array: "+d.classString(r))):o=C(t).call(e,r);var a=n._popContext();i=n._bitField,0===(65536&i)&&(o===k?n._reject(r):o===R?n._rejectCallback(o.e,!1):(j.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof I&&r.isFinallyHandler()?(r.cancelPromise=t,C(e).call(r,i)===R&&t._reject(R.e)):e===l?t._fulfill(l.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof B?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(u&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof o?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof o&&r._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=c();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():y.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?y.fatalError(t,d.isNode):void((65535&e)>0?y.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){j.deprecated("Promise.defer","new Promise");var t=new o(w);return{promise:t,resolve:a,reject:s}},d.notEnumerableProp(o,"_makeSelfResolutionError",c),t("./method")(o,w,T,h,j),t("./bind")(o,w,T,j),t("./cancel")(o,B,h,j),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,B,T,w,y,f),o.Promise=o,o.version="3.4.7",t("./map.js")(o,B,h,T,w,j),t("./call_get.js")(o),t("./using.js")(o,h,T,x,w,j),t("./timers.js")(o,w,j),t("./generators.js")(o,h,w,T,n,j),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,B,T,h),t("./race.js")(o,w,T,h),t("./reduce.js")(o,B,h,T,w,j),t("./settle.js")(o,B,j),t("./some.js")(o,B,h),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),j.setBounds(g.firstLineError,d.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(r,o){var s=n(this._values,this._promise);if(s instanceof e){s=s._target();var f=s._bitField;if(this._values=s,0===(50397184&f))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,o);if(0===(33554432&f))return 0!==(16777216&f)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var c=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(c,!1)}return 0===s.length?void(o===-5?this._resolveEmptyArray():this._resolve(a(o))):void this._iterate(s)},s.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var u=n(t[s],i);u instanceof e?(u=u._target(),a=u._bitField):a=null,o?null!==a&&u.suppressUnhandledRejections():null!==a?0===(50397184&a)?(u._proxy(this,s),this._values[s]=u):o=0!==(33554432&a)?this._promiseFulfilled(u._value(),s):0!==(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(u,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!E.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function o(t,e,r){var n=p.getDataPropertyOrDefault(t,e+r,b);return!!n&&i(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new _("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,r,n){for(var s=p.inheritedDataKeys(t),u=[],f=0;f<s.length;++f){
var c=s[f],l=t[c],h=n===k||k(c,l,t);"function"!=typeof l||i(l)||o(t,c,e)||!n(c,l,t,h)||u.push(c,l)}return a(u,e,r),u}function u(t,n,i,o,a,s){function u(){var i=n;n===h&&(i=this);var o=new e(r);o._captureStackTrace();var a="string"==typeof c&&this!==f?this[c]:t,u=d(o,s);try{a.apply(i,v(arguments,u))}catch(t){o._rejectCallback(g(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var f=function(){return this}(),c=t;return"string"==typeof c&&(t=o),p.notEnumerableProp(u,"__isPromisified__",!0),u}function f(t,e,r,n,i){for(var o=new RegExp(T(e)+"$"),a=s(t,e,o,r),u=0,f=a.length;u<f;u+=2){var c=a[u],l=a[u+1],d=c+e;if(n===B)t[d]=B(c,h,c,l,e,i);else{var v=n(l,function(){return B(c,h,c,l,e,i)});p.notEnumerableProp(v,"__isPromisified__",!0),t[d]=v}}return p.toFastProperties(t),t}function c(t,e,r){return B(t,e,void 0,t,null,r)}var l,h={},p=t("./util"),d=t("./nodeback"),v=p.withAppended,g=p.maybeWrapAsError,y=p.canEvaluate,_=t("./errors").TypeError,m="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],E=new RegExp("^(?:"+w.join("|")+")$"),k=function(t){return p.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},T=function(t){return t.replace(/([$])/,"\\$")},B=y?l:u;e.promisify=function(t,e){if("function"!=typeof t)throw new _("expecting a function but got "+p.classString(t));if(i(t))return t;e=Object(e);var r=void 0===e.context?h:e.context,o=!!e.multiArgs,a=c(t,r,o);return p.copyDescriptors(t,a,n),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new _("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,n=e.suffix;"string"!=typeof n&&(n=m);var i=e.filter;"function"!=typeof i&&(i=k);var o=e.promisifier;if("function"!=typeof o&&(o=B),!p.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=p.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&p.isClass(u)&&(f(u.prototype,n,i,o,r),f(u,n,i,o,r))}return f(t,n,i,o,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){var e,r=!1;if(void 0!==s&&t instanceof s)e=l(t),r=!0;else{var n=c.keys(t),i=n.length;e=new Array(2*i);for(var o=0;o<i;++o){var a=n[o];e[o]=t[a],e[o+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,-3)}function a(t){var r,a=n(t);return f(a)?(r=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&r._propagateFrom(a,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=t("./util"),f=u.isObject,c=t("./es5");"function"==typeof Map&&(s=Map);var l=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var i=new Array(2*n.size);return n.forEach(t,i),i}}(),h=function(t){for(var e=new s,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],o=t[n];e.set(i,o)}return e};u.inherits(o,r),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var i=this.length(),o=0,a=this.length();o<a;++o)n[this._values[o+i]]=this._values[o]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},i.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var r=this._front,i=this._length,o=r+i&e-1;n(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t,o){var u=n(t);if(u instanceof e)return s(u);if(t=a.asArray(t),null===t)return i("expecting an array or an iterable object but got "+a.classString(t));var f=new e(r);void 0!==o&&f._propagateFrom(o,3);for(var c=f._fulfill,l=f._reject,h=0,p=t.length;h<p;++h){var d=t[h];(void 0!==d||h in t)&&e.cast(d)._then(c,l,void 0,f,null)}return f}var a=t("./util"),s=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n,i){this.constructor$(t);var a=h();this._fn=null===a?r:p.domainBind(a,r),void 0!==n&&(n=e.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function f(t,e,r,i){if("function"!=typeof e)return n("expecting a function but got "+p.classString(e));var o=new s(t,e,r,i);return o.promise()}function c(t){this.accum=t,this.array._gotAccum(t);var r=i(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(l,void 0,void 0,this,void 0)):l.call(this,r)}function l(t){var r=this.array,n=r._promise,i=d(r._fn);n._pushContext();var o;o=void 0!==r._eachValues?i.call(n._boundValue(),t,this.index,this.length):i.call(n._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(r._currentCancellable=o);var s=n._popContext();return a.checkForgottenReturns(o,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),o}var h=e._getDomain,p=t("./util"),d=p.tryCatch;p.inherits(s,r),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},s.prototype._iterate=function(t){this._values=t;var r,n,i=t.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(c,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},e.prototype.reduce=function(t,e){return f(this,t,e,null)},e.reduce=function(t,e,r,n){return f(t,e,r,n)}}},{"./util":36}],29:[function(t,i,o){"use strict";var a,s=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},f=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var c=r.setImmediate,l=e.nextTick;a=s.isRecentNode?function(t){c.call(r,t)}:function(t){l.call(e,t)}}else if("function"==typeof f&&"function"==typeof f.resolve){var h=f.resolve();a=function(t){h.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof n?function(t){n(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});i.observe(n,e);var o=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),o()}}();i.exports=a},{"./util":36}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t)}var o=e.PromiseInspection,a=t("./util");a.inherits(i,r),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,f=a.isArray,c={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=f(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==c&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(c(t)){if(t instanceof e)return t;var i=o(t);if(i===f){n&&n._pushContext();var u=e.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(a(t)){var u=new e(r);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,i,n)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return f.e=t,f}}function a(t){try{return l.call(t,"_promise0")}catch(t){return!1}}function s(t,n,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,l,!0),s=null)}var s=new e(r),c=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var l=!0,h=u.tryCatch(n).call(t,o,a);return l=!1,s&&h===f&&(s._rejectCallback(h.e,!0,!0),s=null),c}var u=t("./util"),f=u.errorObj,c=u.isObject,l={}.hasOwnProperty;return n}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var f=function(t){return c(+this).thenReturn(t)},c=e.delay=function(t,o){var a,s;return void 0!==o?(a=e.resolve(o)._then(f,null,null,t,void 0),n.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(r),s=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return c(t,this)};var l=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};e.prototype.timeout=function(t,e){t=+t;var r,s,u=new i(setTimeout(function(){r.isPending()&&l(r,e,s)},t));return n.cancellation()?(s=this.then(),r=s._then(o,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function f(t,r){function i(){if(a>=f)return c._fulfill();var o=u(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(t){return s(t)}if(o instanceof e)return o._then(i,s,null,null,null)}i()}var a=0,f=t.length,c=new e(o);return i(),c}function c(t,e,r){this._data=t,this._promise=e,this._context=r}function l(t,e,r){this.constructor$(t,e,r)}function h(t){return c.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var d=t("./util"),v=t("./errors").TypeError,g=t("./util").inherits,y=d.errorObj,_=d.tryCatch,m={};c.prototype.data=function(){return this._data},c.prototype.promise=function(){return this._promise},c.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},c.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},c.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},g(l,c),l.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},p.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("expecting a function but got "+d.classString(i));var o,s=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,s=!1):(o=arguments,t--);for(var u=new p(t),l=0;l<t;++l){var v=o[l];if(c.isDisposer(v)){var g=v;v=v.promise(),v._setDisposable(g)}else{var m=n(v);m instanceof e&&(v=m._then(h,null,null,{resources:u,index:l},void 0))}u[l]=v}for(var b=new Array(u.length),l=0;l<b.length;++l)b[l]=e.resolve(u[l]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return y.e=r.error(),y;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),i=_(i);var n=s?i.apply(void 0,t):i(t),o=E._popContext();return a.checkForgottenReturns(n,o,"Promise.using",E),n}),E=w.lastly(function(){var t=new e.PromiseInspection(w);return f(u,t)});return u.promise=E,E._setOnCancel(u),E},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new l(t,this,i());throw new v}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";function o(){try{var t=O;return O=null,t.apply(this,arguments)}catch(t){return A.e=t,A}}function a(t){return O=t,o}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function f(t){return s(t)?new Error(_(t)):t}function c(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function l(t,e,r){if(!j.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function h(t,e,r){if(s(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return j.defineProperty(t,e,n),t}function p(t){throw t}function d(t){try{if("function"==typeof t){var e=j.names(t.prototype),r=j.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=F.test(t+"")&&j.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function v(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function g(t){return U.test(t)}function y(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function _(t){try{return t+""}catch(t){return"[no string representation]"}}function m(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function b(t){try{h(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function E(t){return m(t)&&j.propertyIsWritable(t,"stack")}function k(t){return{}.toString.call(t)}function T(t,e,r){for(var n=j.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{j.defineProperty(e,o,j.getDescriptor(t,o))}catch(t){}}}function B(t){return N?e.env[t]:void 0}function S(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function x(t,e){return t.bind(e)}var j=t("./es5"),I="undefined"==typeof navigator,A={e:{}},O,R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof r?r:void 0!==this?this:null,C=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},L=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(j.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(t){return n}for(var a=0;a<o.length;++a){var s=o[a];if(!i[s]){i[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&n.push(s)}}t=j.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<t.length;++a)if(n.call(t[a],o))continue t;i.push(o)}return i}}(),F=/this\s*\.\s*\S+\s*=/,U=/^[a-z$_][a-z$_0-9]*$/i,P=function(){return"stack"in new Error?function(t){return E(t)?t:new Error(_(t))}:function(t){if(E(t))return t;try{throw new Error(_(t))}catch(t){return t}}}(),D=function(t){return j.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var q="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};D=function(t){return j.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?q(t):null}}var M="undefined"!=typeof e&&"[object process]"===k(e).toLowerCase(),N="undefined"!=typeof e&&"undefined"!=typeof e.env,z={isClass:d,isIdentifier:g,inheritedDataKeys:L,getDataPropertyOrDefault:l,thrower:p,isArray:j.isArray,asArray:D,notEnumerableProp:h,isPrimitive:s,isObject:u,isError:m,canEvaluate:I,errorObj:A,tryCatch:a,inherits:C,withAppended:c,maybeWrapAsError:f,toFastProperties:v,filledRange:y,toString:_,canAttachTrace:E,ensureErrorObject:P,originatesFromRejection:w,markAsOriginatingFromRejection:b,classString:k,copyDescriptors:T,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:M,hasEnvVariables:N,env:B,global:R,getNativePromise:S,domainBind:x};z.isRecentNode=z.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),z.isNode&&z.toFastProperties(e);try{throw new Error}catch(t){z.lastLineError=t}n.exports=z},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,r(4),function(){return this}(),r(5).setImmediate)},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(l===clearTimeout)return clearTimeout(t);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?d=p.concat(d):g=-1,d.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=d.length;e;){for(p=d,d=[];++g<e;)p&&p[g].run();g=-1,e=d.length}p=null,v=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function f(){}var c,l,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(t){c=r}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(t){l=n}}();var p,d=[],v=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||v||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=f,h.addListener=f,h.once=f,h.off=f,h.removeListener=f,h.removeAllListeners=f,h.emit=f,h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(6),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function n(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var n={callback:t,args:e};return v[d]=n,p(d),d++}function i(t){delete v[t]}function o(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}function a(t){if(g)setTimeout(a,0,t);else{var e=v[t];if(e){g=!0;try{o(e)}finally{i(t),g=!1}}}}function s(){p=function(t){e.nextTick(function(){a(t)})}}function u(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}function f(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&a(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),p=function(r){t.postMessage(e+r,"*")}}function c(){var t=new MessageChannel;t.port1.onmessage=function(t){var e=t.data;a(e)},p=function(e){t.port2.postMessage(e)}}function l(){var t=y.documentElement;p=function(e){var r=y.createElement("script");r.onreadystatechange=function(){a(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}function h(){p=function(t){setTimeout(a,0,t)}}if(!t.setImmediate){var p,d=1,v={},g=!1,y=t.document,_=Object.getPrototypeOf&&Object.getPrototypeOf(t);_=_&&_.setTimeout?_:t,"[object process]"==={}.toString.call(t.process)?s():u()?f():t.MessageChannel?c():y&&"onreadystatechange"in y.createElement("script")?l():h(),_.setImmediate=n,_.clearImmediate=i}}("undefined"==typeof self?"undefined"==typeof t?this:t:self)}).call(e,function(){return this}(),r(4))},function(t,e,r){function n(t){return i(t,o|a)}var i=r(8),o=1,a=4;t.exports=n},function(t,e,r){function n(t,e,r,x,j,I){var A,C=e&k,L=e&T,U=e&B;if(r&&(A=j?r(t,x,j,I):r(t)),void 0!==A)return A;if(!w(t))return t;var P=m(t);if(P){if(A=g(t),!C)return c(t,A)}else{var D=v(t),q=D==O||D==R;if(b(t))return f(t,C);if(D==F||D==S||q&&!j){if(A=L||q?{}:_(t),!C)return L?h(t,u(A,t)):l(t,s(A,t))}else{if(!K[D])return j?t:{};A=y(t,D,n,C)}}I||(I=new i);var M=I.get(t);if(M)return M;I.set(t,A);var N=U?L?d:p:L?keysIn:E,z=P?void 0:N(t);return o(z||t,function(i,o){z&&(o=i,i=t[o]),a(A,o,n(i,e,r,o,t,I))}),A}var i=r(9),o=r(53),a=r(54),s=r(57),u=r(80),f=r(84),c=r(85),l=r(86),h=r(90),p=r(94),d=r(96),v=r(97),g=r(102),y=r(103),_=r(117),m=r(65),b=r(66),w=r(33),E=r(59),k=1,T=2,B=4,S="[object Arguments]",x="[object Array]",j="[object Boolean]",I="[object Date]",A="[object Error]",O="[object Function]",R="[object GeneratorFunction]",C="[object Map]",L="[object Number]",F="[object Object]",U="[object RegExp]",P="[object Set]",D="[object String]",q="[object Symbol]",M="[object WeakMap]",N="[object ArrayBuffer]",z="[object DataView]",V="[object Float32Array]",H="[object Float64Array]",W="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",G="[object Uint8Array]",$="[object Uint8ClampedArray]",Z="[object Uint16Array]",Q="[object Uint32Array]",K={};K[S]=K[x]=K[N]=K[z]=K[j]=K[I]=K[V]=K[H]=K[W]=K[Y]=K[X]=K[C]=K[L]=K[F]=K[U]=K[P]=K[D]=K[q]=K[G]=K[$]=K[Z]=K[Q]=!0,K[A]=K[O]=K[M]=!1,t.exports=n},function(t,e,r){function n(t){var e=this.__data__=new i(t);this.size=e.size}var i=r(10),o=r(18),a=r(19),s=r(20),u=r(21),f=r(22);n.prototype.clear=o,n.prototype.delete=a,n.prototype.get=s,n.prototype.has=u,n.prototype.set=f,t.exports=n},function(t,e,r){function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(11),o=r(12),a=r(15),s=r(16),u=r(17);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e){function r(){this.__data__=[],this.size=0}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=i(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():a.call(e,r,1),--this.size,!0}var i=r(13),o=Array.prototype,a=o.splice;t.exports=n},function(t,e,r){function n(t,e){for(var r=t.length;r--;)if(i(t[r][0],e))return r;return-1}var i=r(14);t.exports=n},function(t,e){function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__,r=i(e,t);return r<0?void 0:e[r][1]}var i=r(13);t.exports=n},function(t,e,r){function n(t){return i(this.__data__,t)>-1}var i=r(13);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var i=r(13);t.exports=n},function(t,e,r){function n(){this.__data__=new i,this.size=0}var i=r(10);t.exports=n},function(t,e){function r(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}t.exports=r},function(t,e){function r(t){return this.__data__.get(t)}t.exports=r},function(t,e){function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,r){function n(t,e){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!o||n.length<s-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(t,e),this.size=r.size,this}var i=r(10),o=r(23),a=r(38),s=200;t.exports=n},function(t,e,r){var n=r(24),i=r(29),o=n(i,"Map");t.exports=o},function(t,e,r){function n(t,e){var r=o(t,e);return i(r)?r:void 0}var i=r(25),o=r(37);t.exports=n},function(t,e,r){function n(t){if(!a(t)||o(t))return!1;var e=i(t)?d:f;return e.test(s(t))}var i=r(26),o=r(34),a=r(33),s=r(36),u=/[\\^$.*+?()[\]{}|]/g,f=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,h=c.toString,p=l.hasOwnProperty,d=RegExp("^"+h.call(p).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},function(t,e,r){function n(t){if(!o(t))return!1;var e=i(t);return e==s||e==u||e==a||e==f}var i=r(27),o=r(33),a="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",f="[object Proxy]";
t.exports=n},function(t,e,r){function n(t){return null==t?void 0===t?u:s:f&&f in Object(t)?o(t):a(t)}var i=r(28),o=r(31),a=r(32),s="[object Null]",u="[object Undefined]",f=i?i.toStringTag:void 0;t.exports=n},function(t,e,r){var n=r(29),i=n.Symbol;t.exports=i},function(t,e,r){var n=r(30),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){function n(t){var e=a.call(t,u),r=t[u];try{t[u]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[u]=r:delete t[u]),i}var i=r(28),o=Object.prototype,a=o.hasOwnProperty,s=o.toString,u=i?i.toStringTag:void 0;t.exports=n},function(t,e){function r(t){return i.call(t)}var n=Object.prototype,i=n.toString;t.exports=r},function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t){return!!o&&o in t}var i=r(35),o=function(){var t=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=n},function(t,e,r){var n=r(29),i=n["__core-js_shared__"];t.exports=i},function(t,e){function r(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var n=Function.prototype,i=n.toString;t.exports=r},function(t,e){function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e,r){function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(39),o=r(47),a=r(50),s=r(51),u=r(52);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||o),string:new i}}var i=r(40),o=r(10),a=r(23);t.exports=n},function(t,e,r){function n(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}var i=r(41),o=r(43),a=r(44),s=r(45),u=r(46);n.prototype.clear=i,n.prototype.delete=o,n.prototype.get=a,n.prototype.has=s,n.prototype.set=u,t.exports=n},function(t,e,r){function n(){this.__data__=i?i(null):{},this.size=0}var i=r(42);t.exports=n},function(t,e,r){var n=r(24),i=n(Object,"create");t.exports=i},function(t,e){function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=r},function(t,e,r){function n(t){var e=this.__data__;if(i){var r=e[t];return r===o?void 0:r}return s.call(e,t)?e[t]:void 0}var i=r(42),o="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t){var e=this.__data__;return i?void 0!==e[t]:a.call(e,t)}var i=r(42),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?o:e,this}var i=r(42),o="__lodash_hash_undefined__";t.exports=n},function(t,e,r){function n(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}var i=r(48);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}var i=r(49);t.exports=n},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e,r){function n(t){return i(this,t).get(t)}var i=r(48);t.exports=n},function(t,e,r){function n(t){return i(this,t).has(t)}var i=r(48);t.exports=n},function(t,e,r){function n(t,e){var r=i(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var i=r(48);t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}t.exports=r},function(t,e,r){function n(t,e,r){var n=t[e];s.call(t,e)&&o(n,r)&&(void 0!==r||e in t)||i(t,e,r)}var i=r(55),o=r(14),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e,r){function n(t,e,r){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var i=r(56);t.exports=n},function(t,e,r){var n=r(24),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){function n(t,e){return t&&i(e,o(e),t)}var i=r(58),o=r(59);t.exports=n},function(t,e,r){function n(t,e,r,n){var a=!r;r||(r={});for(var s=-1,u=e.length;++s<u;){var f=e[s],c=n?n(r[f],t[f],f,r,t):void 0;void 0===c&&(c=t[f]),a?o(r,f,c):i(r,f,c)}return r}var i=r(54),o=r(55);t.exports=n},function(t,e,r){function n(t){return a(t)?i(t):o(t)}var i=r(60),o=r(75),a=r(79);t.exports=n},function(t,e,r){function n(t,e){var r=a(t),n=!r&&o(t),c=!r&&!n&&s(t),h=!r&&!n&&!c&&f(t),p=r||n||c||h,d=p?i(t.length,String):[],v=d.length;for(var g in t)!e&&!l.call(t,g)||p&&("length"==g||c&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,v))||d.push(g);return d}var i=r(61),o=r(62),a=r(65),s=r(66),u=r(69),f=r(70),c=Object.prototype,l=c.hasOwnProperty;t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}t.exports=r},function(t,e,r){var n=r(63),i=r(64),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,r){function n(t){return o(t)&&i(t)==a}var i=r(27),o=r(64),a="[object Arguments]";t.exports=n},function(t,e){function r(t){return null!=t&&"object"==typeof t}t.exports=r},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){(function(t){var n=r(29),i=r(68),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?n.Buffer:void 0,f=u?u.isBuffer:void 0,c=f||i;t.exports=c}).call(e,r(67)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function r(){return!1}t.exports=r},function(t,e){function r(t,e){return e=null==e?n:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t<e}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e,r){var n=r(71),i=r(73),o=r(74),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){function n(t){return a(t)&&o(t.length)&&!!O[i(t)]}var i=r(27),o=r(72),a=r(64),s="[object Arguments]",u="[object Array]",f="[object Boolean]",c="[object Date]",l="[object Error]",h="[object Function]",p="[object Map]",d="[object Number]",v="[object Object]",g="[object RegExp]",y="[object Set]",_="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",E="[object Float32Array]",k="[object Float64Array]",T="[object Int8Array]",B="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",j="[object Uint8ClampedArray]",I="[object Uint16Array]",A="[object Uint32Array]",O={};O[E]=O[k]=O[T]=O[B]=O[S]=O[x]=O[j]=O[I]=O[A]=!0,O[s]=O[u]=O[b]=O[f]=O[w]=O[c]=O[l]=O[h]=O[p]=O[d]=O[v]=O[g]=O[y]=O[_]=O[m]=!1,t.exports=n},function(t,e){function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}var n=9007199254740991;t.exports=r},function(t,e){function r(t){return function(e){return t(e)}}t.exports=r},function(t,e,r){(function(t){var n=r(30),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a&&n.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(e,r(67)(t))},function(t,e,r){function n(t){if(!i(t))return o(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e}var i=r(76),o=r(77),a=Object.prototype,s=a.hasOwnProperty;t.exports=n},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){var n=r(78),i=n(Object.keys,Object);t.exports=i},function(t,e){function r(t,e){return function(r){return t(e(r))}}t.exports=r},function(t,e,r){function n(t){return null!=t&&o(t.length)&&!i(t)}var i=r(26),o=r(72);t.exports=n},function(t,e,r){function n(t,e){return t&&i(e,o(e),t)}var i=r(58),o=r(81);t.exports=n},function(t,e,r){function n(t){return a(t)?i(t,!0):o(t)}var i=r(60),o=r(82),a=r(79);t.exports=n},function(t,e,r){function n(t){if(!i(t))return a(t);var e=o(t),r=[];for(var n in t)("constructor"!=n||!e&&u.call(t,n))&&r.push(n);return r}var i=r(33),o=r(76),a=r(83),s=Object.prototype,u=s.hasOwnProperty;t.exports=n},function(t,e){function r(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}t.exports=r},function(t,e,r){(function(t){function n(t,e){if(e)return t.slice();var r=t.length,n=f?f(r):new t.constructor(r);return t.copy(n),n}var i=r(29),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o,u=s?i.Buffer:void 0,f=u?u.allocUnsafe:void 0;t.exports=n}).call(e,r(67)(t))},function(t,e){function r(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}t.exports=r},function(t,e,r){function n(t,e){return i(t,o(t),e)}var i=r(58),o=r(87);t.exports=n},function(t,e,r){var n=r(88),i=r(89),o=Object.prototype,a=o.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(t){return null==t?[]:(t=Object(t),n(s(t),function(e){return a.call(t,e)}))}:i;t.exports=u},function(t,e){function r(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}t.exports=r},function(t,e){function r(){return[]}t.exports=r},function(t,e,r){function n(t,e){return i(t,o(t),e)}var i=r(58),o=r(91);t.exports=n},function(t,e,r){var n=r(92),i=r(93),o=r(87),a=r(89),s=Object.getOwnPropertySymbols,u=s?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:a;t.exports=u},function(t,e){function r(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}t.exports=r},function(t,e,r){var n=r(78),i=n(Object.getPrototypeOf,Object);t.exports=i},function(t,e,r){function n(t){return i(t,a,o)}var i=r(95),o=r(87),a=r(59);t.exports=n},function(t,e,r){function n(t,e,r){var n=e(t);return o(t)?n:i(n,r(t))}var i=r(92),o=r(65);t.exports=n},function(t,e,r){function n(t){return i(t,a,o)}var i=r(95),o=r(91),a=r(81);t.exports=n},function(t,e,r){var n=r(98),i=r(23),o=r(99),a=r(100),s=r(101),u=r(27),f=r(36),c="[object Map]",l="[object Object]",h="[object Promise]",p="[object Set]",d="[object WeakMap]",v="[object DataView]",g=f(n),y=f(i),_=f(o),m=f(a),b=f(s),w=u;(n&&w(new n(new ArrayBuffer(1)))!=v||i&&w(new i)!=c||o&&w(o.resolve())!=h||a&&w(new a)!=p||s&&w(new s)!=d)&&(w=function(t){var e=u(t),r=e==l?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case g:return v;case y:return c;case _:return h;case m:return p;case b:return d}return e}),t.exports=w},function(t,e,r){var n=r(24),i=r(29),o=n(i,"DataView");t.exports=o},function(t,e,r){var n=r(24),i=r(29),o=n(i,"Promise");t.exports=o},function(t,e,r){var n=r(24),i=r(29),o=n(i,"Set");t.exports=o},function(t,e,r){var n=r(24),i=r(29),o=n(i,"WeakMap");t.exports=o},function(t,e){function r(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&i.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var n=Object.prototype,i=n.hasOwnProperty;t.exports=r},function(t,e,r){function n(t,e,r,n){var A=t.constructor;switch(e){case m:return i(t);case l:case h:return new A(+t);case b:return o(t,n);case w:case E:case k:case T:case B:case S:case x:case j:case I:return c(t,n);case p:return a(t,n,r);case d:case y:return new A(t);case v:return s(t);case g:return u(t,n,r);case _:return f(t)}}var i=r(104),o=r(106),a=r(107),s=r(111),u=r(112),f=r(115),c=r(116),l="[object Boolean]",h="[object Date]",p="[object Map]",d="[object Number]",v="[object RegExp]",g="[object Set]",y="[object String]",_="[object Symbol]",m="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",k="[object Int8Array]",T="[object Int16Array]",B="[object Int32Array]",S="[object Uint8Array]",x="[object Uint8ClampedArray]",j="[object Uint16Array]",I="[object Uint32Array]";t.exports=n},function(t,e,r){function n(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}var i=r(105);t.exports=n},function(t,e,r){var n=r(29),i=n.Uint8Array;t.exports=i},function(t,e,r){function n(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var i=r(104);t.exports=n},function(t,e,r){function n(t,e,r){var n=e?r(a(t),s):a(t);return o(n,i,new t.constructor)}var i=r(108),o=r(109),a=r(110),s=1;t.exports=n},function(t,e){function r(t,e){return t.set(e[0],e[1]),t}t.exports=r},function(t,e){function r(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}t.exports=r},function(t,e){function r(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}var n=/\w*$/;t.exports=r},function(t,e,r){function n(t,e,r){var n=e?r(a(t),s):a(t);return o(n,i,new t.constructor)}var i=r(113),o=r(109),a=r(114),s=1;t.exports=n},function(t,e){function r(t,e){return t.add(e),t}t.exports=r},function(t,e){function r(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}t.exports=r},function(t,e,r){function n(t){return a?Object(a.call(t)):{}}var i=r(28),o=i?i.prototype:void 0,a=o?o.valueOf:void 0;t.exports=n},function(t,e,r){function n(t,e){var r=e?i(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var i=r(104);t.exports=n},function(t,e,r){function n(t){return"function"!=typeof t.constructor||a(t)?{}:i(o(t))}var i=r(118),o=r(93),a=r(76);t.exports=n},function(t,e,r){var n=r(33),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e,r){var n=r(120),i=r(121),o=r(123),a=r(131),s=o(function(t){return t.push(void 0,a),n(i,void 0,t)});t.exports=s},function(t,e){function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}t.exports=r},function(t,e,r){var n=r(58),i=r(122),o=r(81),a=i(function(t,e,r,i){n(e,o(e),t,i)});t.exports=a},function(t,e,r){function n(t){return i(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var u=r[n];u&&t(e,u,n,a)}return e})}var i=r(123),o=r(130);t.exports=n},function(t,e,r){function n(t,e){return a(o(t,e,i),t+"")}var i=r(124),o=r(125),a=r(126);t.exports=n},function(t,e){function r(t){return t}t.exports=r},function(t,e,r){function n(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var n=arguments,a=-1,s=o(n.length-e,0),u=Array(s);++a<s;)u[a]=n[e+a];a=-1;for(var f=Array(e+1);++a<e;)f[a]=n[a];return f[e]=r(u),i(t,this,f)}}var i=r(120),o=Math.max;t.exports=n},function(t,e,r){var n=r(127),i=r(129),o=i(n);t.exports=o},function(t,e,r){var n=r(128),i=r(56),o=r(124),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=a},function(t,e){function r(t){return function(){return t}}t.exports=r},function(t,e){function r(t){var e=0,r=0;return function(){var a=o(),s=i-(a-r);if(r=a,s>0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var n=800,i=16,o=Date.now;t.exports=r},function(t,e,r){function n(t,e,r){if(!s(r))return!1;var n=typeof e;return!!("number"==n?o(r)&&a(e,r.length):"string"==n&&e in r)&&i(r[e],t)}var i=r(14),o=r(79),a=r(69),s=r(33);t.exports=n},function(t,e,r){function n(t,e,r,n){return void 0===t||i(t,o[r])&&!a.call(n,r)?e:t}var i=r(14),o=Object.prototype,a=o.hasOwnProperty;t.exports=n},function(t,e){(function(e){t.exports=!1;try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(t){}}).call(e,function(){return this}())},function(t,e,r){(function(n){function i(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,n)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){try{return e.storage.debug}catch(t){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function f(){try{return window.localStorage}catch(t){}}e=t.exports=r(134),e.log=a,e.formatArgs=o,e.save=s,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:f(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,r(4))},function(t,e,r){function n(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function r(){if(r.enabled){var t=r,n=+new Date,i=n-(f||n);t.diff=i,t.prev=f,t.curr=n,f=n;for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];o[0]=e.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var s=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;s++;var i=e.formatters[n];if("function"==typeof i){var a=o[s];r=i.call(t,a),o.splice(s,1),s--}return r}),e.formatArgs.call(t,o);var u=r.log||e.log||console.log.bind(console);u.apply(t,o)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=n(t),"function"==typeof e.init&&e.init(r),r}function o(t){e.save(t),e.names=[],e.skips=[];for(var r=(t||"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(t=r[i].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function a(){e.enable("")}function s(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=i.debug=i.default=i,e.coerce=u,e.disable=a,e.enable=o,e.enabled=s,e.humanize=r(135),e.names=[],e.skips=[],e.formatters={};var f},function(t,e){function r(t){if(t=String(t),!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"days":case"day":case"d":return r*f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(t){return t>=f?Math.round(t/f)+"d":t>=u?Math.round(t/u)+"h":t>=s?Math.round(t/s)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return o(t,f,"day")||o(t,u,"hour")||o(t,s,"minute")||o(t,a,"second")||t+" ms"}function o(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var a=1e3,s=60*a,u=60*s,f=24*u,c=365.25*f;t.exports=function(t,e){e=e||{};var o=typeof t;if("string"===o&&t.length>0)return r(t);if("number"===o&&isNaN(t)===!1)return e.long?i(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e){t.exports={websocket:"wss://steemd.steemit.com",address_prefix:"STM",chain_id:"0000000000000000000000000000000000000000000000000000000000000000"}},function(t,e){t.exports=[{api:"database_api",method:"set_subscribe_callback",params:["callback","clearFilter"]},{api:"database_api",method:"set_pending_transaction_callback",params:["cb"]},{api:"database_api",method:"set_block_applied_callback",params:["cb"]},{api:"database_api",method:"cancel_all_subscriptions"},{api:"database_api",method:"get_trending_tags",params:["afterTag","limit"]},{api:"database_api",method:"get_tags_used_by_author",params:["author"]},{api:"database_api",method:"get_discussions_by_trending",params:["query"]},{api:"database_api",method:"get_discussions_by_trending30",params:["query"]},{api:"database_api",method:"get_discussions_by_created",params:["query"]},{api:"database_api",method:"get_discussions_by_active",params:["query"]},{api:"database_api",method:"get_discussions_by_cashout",params:["query"]},{api:"database_api",method:"get_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_discussions_by_votes",params:["query"]},{api:"database_api",method:"get_discussions_by_children",params:["query"]},{api:"database_api",method:"get_discussions_by_hot",params:["query"]},{api:"database_api",method:"get_discussions_by_feed",params:["query"]},{api:"database_api",method:"get_discussions_by_blog",params:["query"]},{api:"database_api",method:"get_discussions_by_comments",params:["query"]},{api:"database_api",method:"get_discussions_by_promoted",params:["query"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"database_api",method:"get_state",params:["path"]},{api:"database_api",method:"get_trending_categories",params:["after","limit"]},{api:"database_api",method:"get_best_categories",params:["after","limit"]},{api:"database_api",method:"get_active_categories",params:["after","limit"]},{api:"database_api",method:"get_recent_categories",params:["after","limit"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"database_api",method:"get_chain_properties"},{api:"database_api",method:"get_feed_history"},{api:"database_api",method:"get_current_median_history_price"},{api:"database_api",method:"get_witness_schedule"},{api:"database_api",method:"get_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"database_api",method:"get_key_references",params:["key"]},{api:"database_api",method:"get_accounts",params:["names"]},{api:"database_api",method:"get_account_references",params:["accountId"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_conversion_requests",params:["accountName"]},{api:"database_api",method:"get_account_history",params:["account","from","limit"]},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_recovery_request",params:["account"]},{api:"database_api",method:"get_escrow",params:["from","escrowId"]},{api:"database_api",method:"get_withdraw_routes",params:["account","withdrawRouteType"]},{api:"database_api",method:"get_account_bandwidth",params:["account","bandwidthType"]},{api:"database_api",method:"get_savings_withdraw_from",params:["account"]},{api:"database_api",method:"get_savings_withdraw_to",params:["account"]},{api:"database_api",method:"get_order_book",params:["limit"]},{api:"database_api",method:"get_open_orders",params:["owner"]},{api:"database_api",method:"get_liquidity_queue",params:["startAccount","limit"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"database_api",method:"get_transaction",params:["trxId"]},{api:"database_api",method:"get_required_signatures",params:["trx","availableKeys"]},{api:"database_api",method:"get_potential_signatures",params:["trx"]},{api:"database_api",method:"verify_authority",params:["trx"]},{api:"database_api",method:"verify_account_authority",params:["nameOrId","signers"]},{api:"database_api",method:"get_active_votes",params:["author","permlink"]},{api:"database_api",method:"get_account_votes",params:["voter"]},{api:"database_api",method:"get_content",params:["author","permlink"]},{api:"database_api",method:"get_content_replies",params:["parent","parentPermlink"]},{api:"database_api",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"database_api",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit"]},{api:"database_api",method:"get_witnesses",params:["witnessIds"]},{api:"database_api",method:"get_witness_by_account",params:["accountName"]},{api:"database_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"database_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_witness_count"},{api:"database_api",method:"get_active_witnesses"},{api:"database_api",method:"get_miner_queue"},{api:"login_api",method:"login",params:["username","password"]},{api:"login_api",method:"get_api_by_name",params:["apiName"]},{api:"login_api",method:"get_version"},{api:"follow_api",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow_api",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow_api",method:"get_follow_count",params:["account"]},{api:"follow_api",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_feed",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog",params:["account","entryId","limit"]},{api:"follow_api",method:"get_account_reputations",params:["lowerBoundName","limit"]},{api:"follow_api",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow_api",method:"get_blog_authors",params:["blogAccount"]},{api:"network_broadcast_api",method:"broadcast_transaction",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_with_callback",params:["confirmationCallback","trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["b"]},{api:"network_broadcast_api",method:"set_max_block_age",params:["maxBlockAge"]}]},function(t,e){"use strict";function r(t){return t.replace(n,function(t,e){return e.toUpperCase()})}Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=r;var n=/_([a-z])/g},function(t,e){},function(t,e,r){(function(e){"use strict";var n=r(145),i=r(153),o=r(201),a=r(203),s=a.Point,u=a.getCurveByName("secp256k1"),f=r(136),c=r(208),l=r(221),h=r(220),p={},d=c.transaction,v=c.signed_transaction;p.verify=function(t,e,r){var n=!1,i=[];for(var o in r)i.push(o);var a=this.generateKeys(t,e,i);return i.forEach(function(t){r[t][0][0]===a[t]&&(n=!0)}),n},p.generateKeys=function(t,r,a){var c={};return a.forEach(function(a){var l=t+a+r,h=l.trim().split(/[\t\n\v\f\r ]+/).join(" "),p=i.createHash("sha256").update(h).digest(),d=n.fromBuffer(p),v=u.G.multiply(d),g=new s(v.curve,v.x,v.y,v.z),y=g.getEncoded(v.compressed),_=i.createHash("rmd160").update(y).digest(),m=e.concat([y,_.slice(0,4)]);c[a]=f.address_prefix+o.encode(m)}),c},p.getPrivateKeys=function(t,e,r){var n={};return r.forEach(function(r){n[r]=this.toWif(t,e,r)}.bind(this)),n},p.isWif=function(t){var r=!1;try{var n=new e(o.decode(t)),a=n.slice(0,-4),s=n.slice(-4),u=i.createHash("sha256").update(a).digest();u=i.createHash("sha256").update(u).digest(),u=u.slice(0,4),s.toString()==u.toString()&&(r=!0)}catch(t){}return r},p.toWif=function(t,r,n){var a=t+n+r,s=a.trim().split(/[\t\n\v\f\r ]+/).join(" "),u=i.createHash("sha256").update(s).digest(),f=e.concat([new e([128]),u]),c=i.createHash("sha256").update(f).digest();c=i.createHash("sha256").update(c).digest(),c=c.slice(0,4);var l=e.concat([f,c]);return o.encode(l)},p.wifIsValid=function(t,e){return this.wifToPublic(t)==e},p.wifToPublic=function(t){var e=h.fromWif(t);return e=e.toPublic().toString()},p.signTransaction=function(t,r){var n=[];t.signatures&&(n=[].concat(t.signatures));var i=new e(f.chain_id,"hex"),o=d.toBuffer(t);for(var a in r){var s=l.signBuffer(e.concat([i,o]),r[a]);n.push(s.toBuffer())}return v.toObject(Object.assign(t,{signatures:n}))},t.exports=p}).call(e,r(141).Buffer)},function(t,e,r){(function(t){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=a.prototype):(null===t&&(t=new a(e)),t.length=e),t}function a(t,e,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,e,r)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,r,n):"string"==typeof e?l(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e,r,n){return u(e),e<=0?o(t,e):void 0!==r?"string"==typeof n?o(t,e).fill(r,n):o(t,e).fill(r):o(t,e)}function c(t,e){if(u(e),t=o(t,e<0?0:0|v(e)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,r);t=o(t,n);var i=t.write(e,r);return i!==n&&(t=t.slice(0,i)),t}function h(t,e){var r=e.length<0?0:0|v(e.length);t=o(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),a.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=a.prototype):t=h(t,e),t}function d(t,e){if(a.isBuffer(e)){var r=0|v(e.length);return t=o(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||Z(e.length)?o(t,0):h(t,e);if("Buffer"===e.type&&J(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function v(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),a.alloc(+t)}function y(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return W(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),
e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return j(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;f<s;f++)if(o(t,f)===o(e,c===-1?0:f-c)){if(c===-1&&(c=f),f-c+1===u)return c*a}else c!==-1&&(f-=f-c),c=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){for(var l=!0,h=0;h<u;h++)if(o(t,f+h)!==o(e,h)){l=!1;break}if(l)return f}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function k(t,e,r,n){return $(W(e,t.length-r),t,r,n)}function T(t,e,r,n){return $(Y(e),t,r,n)}function B(t,e,r,n){return T(t,e,r,n)}function S(t,e,r,n){return $(G(e),t,r,n)}function x(t,e,r,n){return $(X(e,t.length-r),t,r,n)}function j(t,e,r){return 0===e&&r===t.length?Q.fromByteArray(t):Q.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,f,c,l;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(l=(31&o)<<6|63&u,l>127&&(a=l));break;case 3:u=t[i+1],f=t[i+2],128===(192&u)&&128===(192&f)&&(l=(15&o)<<12|(63&u)<<6|63&f,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:u=t[i+1],f=t[i+2],c=t[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(l=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return A(n)}function A(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function L(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function F(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function q(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,i){return i||q(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||q(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,e,r,n,52,8),r+8}function z(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function G(t){return Q.toByteArray(z(t))}function $(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t){return t!==t}var Q=r(142),K=r(143),J=r(144);e.Buffer=a,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),e.kMaxLength=i(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,r){return s(null,t,e,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,r){return f(null,t,e,r)},a.allocUnsafe=function(t){return c(null,t)},a.allocUnsafeSlow=function(t){return c(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).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}},a.concat=function(t,e){if(!J(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},a.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?I(this,0,t):_.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),f=this.slice(n,i),c=t.slice(e,r),l=0;l<u;++l)if(f[l]!==c[l]){o=f[l],s=c[l];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},a.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return B(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=a.prototype;else{var i=e-t;n=new a(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},a.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return e||F(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||F(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||F(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||F(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return e||F(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},a.prototype.readInt16LE=function(t,e){e||F(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||F(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||F(t,4,this.length),K.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||F(t,4,this.length),K.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||F(t,8,this.length),K.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||F(t,8,this.length),K.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;U(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;U(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);U(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);U(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:W(new a(t,n).toString()),u=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,a,s,u=t.length;a=r(t),s=new c(3*u/4-a),i=a>0?u-4:u;var l=0;for(e=0,n=0;e<i;e+=4,n+=3)o=f[t.charCodeAt(e)]<<18|f[t.charCodeAt(e+1)]<<12|f[t.charCodeAt(e+2)]<<6|f[t.charCodeAt(e+3)],s[l++]=o>>16&255,s[l++]=o>>8&255,s[l++]=255&o;return 2===a?(o=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,s[l++]=255&o):1===a&&(o=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,s[l++]=o>>8&255,s[l++]=255&o),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(o(n));return i.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",o=[],s=16383,f=0,c=r-n;f<c;f+=s)o.push(a(t,f,f+s>c?c:f+s));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=s;for(var u=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=l.length;h<p;++h)u[h]=l[h],f[l.charCodeAt(h)]=h;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+l>=1?h/u:h*Math.pow(2,1-l),e*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*v}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(146);r(148),t.exports=n},function(t,e,r){function n(t,e,r){return this instanceof n?void(null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))):new n(t,e,r)}function i(t,e,r,n,i,o){for(;--o>=0;){var a=e*this[t++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i}function o(t){return oe.charAt(t)}function a(t,e){var r=ae[t.charCodeAt(e)];return null==r?-1:r}function s(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function u(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+ee:this.t=0}function f(t){var e=new n;return e.fromInt(t),e}function c(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,s=!1,u=0;--o>=0;){var f=8==r?255&t[o]:a(t,o);f<0?"-"==t.charAt(o)&&(s=!0):(s=!1,0==u?i[i.t++]=f:u+r>i.DB?(i[i.t-1]|=(f&(1<<i.DB-u)-1)<<u,i[i.t++]=f>>i.DB-u):i[i.t-1]|=f<<u,u+=r,u>=i.DB&&(u-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,u>0&&(i[i.t-1]|=(1<<i.DB-u)-1<<u)),i.clamp(),s&&n.ZERO.subTo(i,i)}function l(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function h(t){var e=this;if(e.s<0)return"-"+e.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return e.toRadix(t);r=2}var n,i=(1<<r)-1,a=!1,s="",u=e.t,f=e.DB-u*e.DB%r;if(u-- >0)for(f<e.DB&&(n=e[u]>>f)>0&&(a=!0,s=o(n));u>=0;)f<r?(n=(e[u]&(1<<f)-1)<<r-f,n|=e[--u]>>(f+=e.DB-r)):(n=e[u]>>(f-=r)&i,f<=0&&(f+=e.DB,--u)),n>0&&(a=!0),a&&(s+=o(n));return a?s:"0"}function p(){var t=new n;return n.ZERO.subTo(this,t),t}function d(){return this.s<0?this.negate():this}function v(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(e=r-t.t,0!=e)return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function g(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function y(){return this.t<=0?0:this.DB*(this.t-1)+g(this[this.t-1]^this.s&this.DM)}function _(){return this.bitLength()>>3}function m(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function b(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s}function w(t,e){var r,n=this,i=t%n.DB,o=n.DB-i,a=(1<<o)-1,s=Math.floor(t/n.DB),u=n.s<<i&n.DM;for(r=n.t-1;r>=0;--r)e[r+s+1]=n[r]>>o|u,u=(n[r]&a)<<i;for(r=s-1;r>=0;--r)e[r]=0;e[s]=u,e.t=n.t+s+1,e.s=n.s,e.clamp()}function E(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)return void(e.t=0);var i=t%r.DB,o=r.DB-i,a=(1<<i)-1;e[0]=r[n]>>i;for(var s=n+1;s<r.t;++s)e[s-n-1]|=(r[s]&a)<<o,e[s-n]=r[s]>>i;i>0&&(e[r.t-n-1]|=(r.s&a)<<o),e.t=r.t-n,e.clamp()}function k(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]-t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i-=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i-=t[n],e[n++]=i&r.DM,i>>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()}function T(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)}function B(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function S(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var a=i.abs();if(a.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&i.copyTo(r));null==r&&(r=new n);var s=new n,u=i.s,f=t.s,c=i.DB-g(o[o.t-1]);c>0?(o.lShiftTo(c,s),a.lShiftTo(c,r)):(o.copyTo(s),a.copyTo(r));var l=s.t,h=s[l-1];if(0!=h){var p=h*(1<<i.F1)+(l>1?s[l-2]>>i.F2:0),d=i.FV/p,v=(1<<i.F1)/p,y=1<<i.F2,_=r.t,m=_-l,b=null==e?new n:e;for(s.dlShiftTo(m,b),r.compareTo(b)>=0&&(r[r.t++]=1,r.subTo(b,r)),n.ONE.dlShiftTo(l,b),b.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--m>=0;){var w=r[--_]==h?i.DM:Math.floor(r[_]*d+(r[_-1]+y)*v);if((r[_]+=s.am(0,w,r,m,0,l))<w)for(s.dlShiftTo(m,b),r.subTo(b,r);r[_]<--w;)r.subTo(b,r)}null!=e&&(r.drShiftTo(l,e),u!=f&&n.ZERO.subTo(e,e)),r.t=l,r.clamp(),c>0&&r.rShiftTo(c,r),u<0&&n.ZERO.subTo(r,r)}}}function x(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function j(t){this.m=t}function I(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function A(t){return t}function O(t){t.divRemTo(this.m,null,t)}function R(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function C(t,e){t.squareTo(e),this.reduce(e)}function L(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function F(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function U(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e}function P(t){var e=new n;return t.copyTo(e),this.reduce(e),e}function D(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function q(t,e){t.squareTo(e),this.reduce(e)}function M(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function N(){return 0==(this.t>0?1&this[0]:this.s)}function z(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),a=g(t)-1;for(o.copyTo(r);--a>=0;)if(e.sqrTo(r,i),(t&1<<a)>0)e.mulTo(i,o,r);else{var s=r;r=i,i=s}return e.revert(r)}function V(t,e){var r;return r=t<256||e.isEven()?new j(e):new F(e),this.exp(t,r)}function H(){var t=new n;return this.copyTo(t),t}function W(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function Y(){return 0==this.t?this.s:this[0]<<24>>24}function X(){return 0==this.t?this.s:this[0]<<16>>16}function G(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function $(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function Z(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=f(r),o=new n,a=new n,s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(t).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(t)+s}function Q(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),s=!1,u=0,f=0,c=0;c<t.length;++c){var l=a(t,c);l<0?"-"==t.charAt(c)&&0==r.signum()&&(s=!0):(f=e*f+l,++u>=i&&(r.dMultiply(o),r.dAddOffset(f,0),u=0,f=0))}u>0&&(r.dMultiply(Math.pow(e,u)),r.dAddOffset(f,0)),s&&n.ZERO.subTo(r,r)}function K(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),at,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,a=7&t;o.length=(t>>3)+1,e.nextBytes(o),a>0?o[0]&=(1<<a)-1:o[0]=0,i.fromString(o,256)}}function J(){var t=this,e=t.t,r=new Array;r[0]=t.s;var n,i=t.DB-e*t.DB%8,o=0;if(e-- >0)for(i<t.DB&&(n=t[e]>>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<<t.DB-i);e>=0;)i<8?(n=(t[e]&(1<<i)-1)<<8-i,n|=t[--e]>>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r}function tt(t){return 0==this.compareTo(t)}function et(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function nt(t,e,r){var n,i,o=this,a=Math.min(t.t,o.t);for(n=0;n<a;++n)r[n]=e(o[n],t[n]);if(t.t<o.t){for(i=t.s&o.DM,n=a;n<o.t;++n)r[n]=e(o[n],i);r.t=o.t}else{for(i=o.s&o.DM,n=a;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(o.s,t.s),r.clamp()}function it(t,e){return t&e}function ot(t){var e=new n;return this.bitwiseTo(t,it,e),e}function at(t,e){return t|e}function st(t){var e=new n;return this.bitwiseTo(t,at,e),e}function ut(t,e){return t^e}function ft(t){var e=new n;return this.bitwiseTo(t,ut,e),e}function ct(t,e){return t&~e}function lt(t){var e=new n;return this.bitwiseTo(t,ct,e),e}function ht(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function pt(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function dt(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function vt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function gt(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+vt(this[t]);return this.s<0?this.t*this.DB:-1}function yt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function _t(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=yt(this[r]^e);return t}function mt(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function bt(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r}function wt(t){return this.changeBit(t,at)}function Et(t){return this.changeBit(t,ct)}function kt(t){return this.changeBit(t,ut)}function Tt(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]+t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i+=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i+=t[n],e[n++]=i&r.DM,i>>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()}function Bt(t){var e=new n;return this.addTo(t,e),e}function St(t){var e=new n;return this.subTo(t,e),e}function xt(t){var e=new n;return this.multiplyTo(t,e),e}function jt(){var t=new n;return this.squareTo(t),t}function It(t){var e=new n;return this.divRemTo(t,e,null),e}function At(t){var e=new n;return this.divRemTo(t,null,e),e}function Ot(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)}function Rt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Ct(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Lt(){}function Ft(t){return t}function Ut(t,e,r){t.multiplyTo(e,r)}function Pt(t,e){t.squareTo(e)}function Dt(t){return this.exp(t,new Lt)}function qt(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,t[n],r,n,0,this.t);for(i=Math.min(t.t,e);n<i;++n)this.am(0,t[n],r,n,0,e-n);r.clamp()}function Mt(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)}function Nt(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function zt(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e}function Vt(t){return t}function Ht(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)}function Wt(t,e){t.squareTo(e),this.reduce(e)}function Yt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function Xt(t,e){var r,i,o=t.bitLength(),a=f(1);if(o<=0)return a;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new j(e):e.isEven()?new Nt(e):new F(e);var s=new Array,u=3,c=r-1,l=(1<<r)-1;if(s[1]=i.convert(this),r>1){var h=new n;for(i.sqrTo(s[1],h);u<=l;)s[u]=new n,i.mulTo(h,s[u-2],s[u]),u+=2}var p,d,v=t.t-1,y=!0,_=new n;for(o=g(t[v])-1;v>=0;){for(o>=c?p=t[v]>>o-c&l:(p=(t[v]&(1<<o+1)-1)<<c-o,v>0&&(p|=t[v-1]>>this.DB+o-c)),u=r;0==(1&p);)p>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),y)s[p].copyTo(a),y=!1;else{for(;u>1;)i.sqrTo(a,_),i.sqrTo(_,a),u-=2;u>0?i.sqrTo(a,_):(d=a,a=_,_=d),i.mulTo(_,s[p],a)}for(;v>=0&&0==(t[v]&1<<o);)i.sqrTo(a,_),d=a,a=_,_=d,--o<0&&(o=this.DB-1,--v)}return i.revert(a)}function Gt(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function $t(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function Zt(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");
if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=f(1),a=f(0),s=f(0),u=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),e?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(s,o),a.subTo(u,a)):(i.subTo(r,i),e&&s.subTo(o,s),u.subTo(a,u))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u}function Qt(t){var e,r=this.abs();if(1==r.t&&r[0]<=se[se.length-1]){for(e=0;e<se.length;++e)if(r[0]==se[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<se.length;){for(var n=se[e],i=e+1;i<se.length&&n<ue;)n*=se[i++];for(n=r.modInt(n);e<i;)if(n%se[e++]==0)return!1}return r.millerRabin(t)}function Kt(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);t=t+1>>1,t>se.length&&(t=se.length);for(var o,a=new n(null),s=[],u=0;u<t;++u){for(;o=se[Math.floor(Math.random()*se.length)],s.indexOf(o)!=-1;);s.push(o),a.fromInt(o);var f=a.modPow(i,this);if(0!=f.compareTo(n.ONE)&&0!=f.compareTo(e)){for(var o=1;o++<r&&0!=f.compareTo(e);)if(f=f.modPowInt(2,this),0==f.compareTo(n.ONE))return!1;if(0!=f.compareTo(e))return!1}}return!0}var Jt=n.prototype;Jt.__bigi=r(147).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===Jt.__bigi)};var te;n.prototype.am=i,te=26,n.prototype.DB=te,n.prototype.DM=(1<<te)-1;var ee=n.prototype.DV=1<<te,re=52;n.prototype.FV=Math.pow(2,re),n.prototype.F1=re-te,n.prototype.F2=2*te-re;var ne,ie,oe="0123456789abcdefghijklmnopqrstuvwxyz",ae=new Array;for(ne="0".charCodeAt(0),ie=0;ie<=9;++ie)ae[ne++]=ie;for(ne="a".charCodeAt(0),ie=10;ie<36;++ie)ae[ne++]=ie;for(ne="A".charCodeAt(0),ie=10;ie<36;++ie)ae[ne++]=ie;j.prototype.convert=I,j.prototype.revert=A,j.prototype.reduce=O,j.prototype.mulTo=R,j.prototype.sqrTo=C,F.prototype.convert=U,F.prototype.revert=P,F.prototype.reduce=D,F.prototype.mulTo=M,F.prototype.sqrTo=q,Jt.copyTo=s,Jt.fromInt=u,Jt.fromString=c,Jt.clamp=l,Jt.dlShiftTo=m,Jt.drShiftTo=b,Jt.lShiftTo=w,Jt.rShiftTo=E,Jt.subTo=k,Jt.multiplyTo=T,Jt.squareTo=B,Jt.divRemTo=S,Jt.invDigit=L,Jt.isEven=N,Jt.exp=z,Jt.toString=h,Jt.negate=p,Jt.abs=d,Jt.compareTo=v,Jt.bitLength=y,Jt.byteLength=_,Jt.mod=x,Jt.modPowInt=V,Lt.prototype.convert=Ft,Lt.prototype.revert=Ft,Lt.prototype.mulTo=Ut,Lt.prototype.sqrTo=Pt,Nt.prototype.convert=zt,Nt.prototype.revert=Vt,Nt.prototype.reduce=Ht,Nt.prototype.mulTo=Yt,Nt.prototype.sqrTo=Wt;var se=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],ue=(1<<26)/se[se.length-1];Jt.chunkSize=G,Jt.toRadix=Z,Jt.fromRadix=Q,Jt.fromNumber=K,Jt.bitwiseTo=nt,Jt.changeBit=bt,Jt.addTo=Tt,Jt.dMultiply=Rt,Jt.dAddOffset=Ct,Jt.multiplyLowerTo=qt,Jt.multiplyUpperTo=Mt,Jt.modInt=$t,Jt.millerRabin=Kt,Jt.clone=H,Jt.intValue=W,Jt.byteValue=Y,Jt.shortValue=X,Jt.signum=$,Jt.toByteArray=J,Jt.equals=tt,Jt.min=et,Jt.max=rt,Jt.and=ot,Jt.or=st,Jt.xor=ft,Jt.andNot=lt,Jt.not=ht,Jt.shiftLeft=pt,Jt.shiftRight=dt,Jt.getLowestSetBit=gt,Jt.bitCount=_t,Jt.testBit=mt,Jt.setBit=wt,Jt.clearBit=Et,Jt.flipBit=kt,Jt.add=Bt,Jt.subtract=St,Jt.multiply=xt,Jt.divide=It,Jt.remainder=At,Jt.divideAndRemainder=Ot,Jt.modPow=Xt,Jt.modInverse=Zt,Jt.pow=Dt,Jt.gcd=Gt,Jt.isProbablePrime=Qt,Jt.square=jt,n.ZERO=f(0),n.ONE=f(1),n.valueOf=f,t.exports=n},function(t,e){t.exports={_args:[[{raw:"bigi@^1.4.2",scope:null,escapedName:"bigi",name:"bigi",rawSpec:"^1.4.2",spec:">=1.4.2 <2.0.0",type:"range"},"/Users/fabien/WebstormProjects/steem-js"]],_from:"bigi@>=1.4.2 <2.0.0",_id:"[email protected]",_inCache:!0,_location:"/bigi",_nodeVersion:"6.1.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/bigi-1.4.2.tgz_1469584192413_0.6801238611806184"},_npmUser:{name:"jprichardson",email:"[email protected]"},_npmVersion:"3.8.6",_phantomChildren:{},_requested:{raw:"bigi@^1.4.2",scope:null,escapedName:"bigi",name:"bigi",rawSpec:"^1.4.2",spec:">=1.4.2 <2.0.0",type:"range"},_requiredBy:["/","/ecurve"],_resolved:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz",_shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",_shrinkwrap:null,_spec:"bigi@^1.4.2",_where:"/Users/fabien/WebstormProjects/steem-js",bugs:{url:"https://github.com/cryptocoinjs/bigi/issues"},dependencies:{},description:"Big integers.",devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},directories:{},dist:{shasum:"9c665a95f88b8b08fc05cfd731f561859d725825",tarball:"https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz"},gitHead:"c25308081c896ff84702303722bf5ecd8b3f78e3",homepage:"https://github.com/cryptocoinjs/bigi#readme",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],main:"./lib/index.js",maintainers:[{name:"midnightlightning",email:"[email protected]"},{name:"sidazhang",email:"[email protected]"},{name:"nadav",email:"[email protected]"},{name:"jprichardson",email:"[email protected]"}],name:"bigi",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{url:"git+https://github.com/cryptocoinjs/bigi.git",type:"git"},scripts:{"browser-test":"mochify --wd -R spec",coverage:"istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info",jshint:"jshint --config jshint.json lib/*.js ; true",test:"_mocha -- test/*.js",unit:"mocha"},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},version:"1.4.2"}},function(t,e,r){(function(t){var e=r(149),n=r(146);n.fromByteArrayUnsigned=function(t){return new n(128&t[0]?[0].concat(t):t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}function o(t){return Object.prototype.toString.call(t)}function a(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function s(t){if(b.isFunction(t)){if(k)return t.name;var e=t.toString(),r=e.match(B);return r&&r[1]}}function u(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function f(t){if(k||!b.isFunction(t))return b.inspect(t);var e=s(t),r=e?": "+e:"";return"[Function"+r+"]"}function c(t){return u(f(t.actual),128)+" "+t.operator+" "+u(f(t.expected),128)}function l(t,e,r,n,i){throw new T.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function h(t,e){t||l(t,!0,e,"==",T.ok)}function p(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(b.isDate(t)&&b.isDate(e))return t.getTime()===e.getTime();if(b.isRegExp(t)&&b.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(a(t)&&a(e)&&o(t)===o(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;s=s||{actual:[],expected:[]};var u=s.actual.indexOf(t);return u!==-1&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),v(t,e,r,s))}return r?t===e:t==e}function d(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(b.isPrimitive(t)||b.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=d(t),o=d(e);if(i&&!o||!i&&o)return!1;if(i)return t=E.call(t),e=E.call(e),p(t,e,r);var a,s,u=S(t),f=S(e);if(u.length!==f.length)return!1;for(u.sort(),f.sort(),s=u.length-1;s>=0;s--)if(u[s]!==f[s])return!1;for(s=u.length-1;s>=0;s--)if(a=u[s],!p(t[a],e[a],r,n))return!1;return!0}function g(t,e,r){p(t,e,!0)&&l(t,e,r,"notDeepStrictEqual",g)}function y(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function _(t){var e;try{t()}catch(t){e=t}return e}function m(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=_(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&l(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&b.isError(i),s=!t&&i&&!r;if((a&&o&&y(i,r)||s)&&l(i,r,"Got unwanted exception"+n),t&&i&&r&&!y(i,r)||!t&&i)throw i}var b=r(150),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,k=function(){return"foo"===function(){}.name}(),T=t.exports=h,B=/\s*function\s+([^\(\s]*)\s*/;T.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=s(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},b.inherits(T.AssertionError,Error),T.fail=l,T.ok=h,T.equal=function(t,e,r){t!=e&&l(t,e,r,"==",T.equal)},T.notEqual=function(t,e,r){t==e&&l(t,e,r,"!=",T.notEqual)},T.deepEqual=function(t,e,r){p(t,e,!1)||l(t,e,r,"deepEqual",T.deepEqual)},T.deepStrictEqual=function(t,e,r){p(t,e,!0)||l(t,e,r,"deepStrictEqual",T.deepStrictEqual)},T.notDeepEqual=function(t,e,r){p(t,e,!1)&&l(t,e,r,"notDeepEqual",T.notDeepEqual)},T.notDeepStrictEqual=g,T.strictEqual=function(t,e,r){t!==e&&l(t,e,r,"===",T.strictEqual)},T.notStrictEqual=function(t,e,r){t===e&&l(t,e,r,"!==",T.notStrictEqual)},T.throws=function(t,e,r){m(!0,t,e,r)},T.doesNotThrow=function(t,e,r){m(!1,t,e,r)},T.ifError=function(t){if(t)throw t};var S=Object.keys||function(t){var e=[];for(var r in t)w.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var o=f(t,r);if(o)return o;var a=Object.keys(r),v=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),B(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(S(r)){var g=r.name?": "+r.name:"";return t.stylize("[Function"+g+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(B(r))return c(r)}var y="",_=!1,b=["{","}"];if(d(r)&&(_=!0,b=["[","]"]),S(r)){var w=r.name?": "+r.name:"";y=" [Function"+w+"]"}if(E(r)&&(y=" "+RegExp.prototype.toString.call(r)),T(r)&&(y=" "+Date.prototype.toUTCString.call(r)),B(r)&&(y=" "+c(r)),0===a.length&&(!_||0==r.length))return b[0]+y+b[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=_?l(t,r,n,v,a):a.map(function(e){return h(t,r,n,v,e,_)}),t.seen.pop(),p(k,y,b)}function f(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return _(e)?t.stylize(""+e,"number"):v(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)O(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}function h(t,e,r,n,i,o){var a,s,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?s=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(s=t.stylize("[Setter]","special")),O(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(f.value)<0?(s=g(r)?u(t,f.value,null):u(t,f.value,r-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return null==t}function _(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return k(t)&&"[object RegExp]"===j(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===j(t)}function B(t){return k(t)&&("[object Error]"===j(t)||t instanceof Error)}function S(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function j(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}function A(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),F[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var R=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(t).replace(R,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),s=n[r];r<o;s=n[++r])a+=g(s)||!k(s)?" "+s:" "+i(s);return a},e.deprecate=function(r,i){function o(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var a=!1;return o};var C,L={};e.debuglog=function(t){if(w(C)&&(C=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!L[t])if(new RegExp("\\b"+t+"\\b","i").test(C)){var r=n.pid;L[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else L[t]=function(){};return L[t]},e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=v,e.isNull=g,e.isNullOrUndefined=y,e.isNumber=_,e.isString=m,e.isSymbol=b,e.isUndefined=w,e.isRegExp=E,e.isObject=k,e.isDate=T,e.isError=B,e.isFunction=S,e.isPrimitive=x,e.isBuffer=r(151);var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=r(152),e._extend=function(t,e){if(!e||!k(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(4))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){function i(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var r in t)e(t[r],r)}var a=r(154);e.createHash=r(156),e.createHmac=r(165),e.randomBytes=function(t,e){if(!e||!e.call)return new n(a(t));try{e.call(this,void 0,new n(a(t)))}catch(t){e(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var s=r(166)(e);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync,r(168)(e,t.exports),o(["createCredentials","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){i("sorry,",t,"is not implemented yet")}})}).call(e,r(141).Buffer)},function(t,e,r){(function(e,n){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||r(155),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),r(141).Buffer)},139,function(t,e,r){(function(e){function n(t){return function(){var r=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),r.push(t),this},digest:function(n){var i=e.concat(r),o=t(i);return r=null,n?o.toString(n):o}};return n}}var i=r(157),o=n(r(162)),a=n(r(164));t.exports=function(t){return"md5"===t?new o:"rmd160"===t?new a:i(t)}}).call(e,r(141).Buffer)},function(t,e,r){var e=t.exports=function(t){var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r},n=r(141).Buffer,i=r(158)(n);e.sha1=r(159)(n,i),e.sha256=r(160)(n,i),e.sha512=r(161)(n,i)},function(t,e){t.exports=function(t){function e(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s=this._s||0,o=0,a=this._block;i<n;){for(var s=Math.min(e.length,o+this._blockSize-i%this._blockSize),u=s-o,f=0;f<u;f++)a[i%this._blockSize+f]=e[f+o];i+=u,o+=u,i%this._blockSize===0&&this._update(a)}return this._s=i,this},e.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,r){var n=r(150).inherits;t.exports=function(t,e){function r(){return d.length?d.pop().init():this instanceof r?(this._w=p,e.call(this,64,56),this._h=null,void this.init()):new r}function i(t,e,r,n){return t<20?e&r|~e&n:t<40?e^r^n:t<60?e&r|e&n|r&n:e^r^n}function o(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function a(t,e){return t+e|0}function s(t,e){return t<<e|t>>>32-e}var u=0,f=4,c=8,l=12,h=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(r,e),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},r.prototype._POOL=d,r.prototype._update=function(t){var e,r,n,u,f,c,l,h,p,d;e=c=this._a,r=l=this._b,n=h=this._c,u=p=this._d,f=d=this._e;for(var v=this._w,g=0;g<80;g++){var y=v[g]=g<16?t.readInt32BE(4*g):s(v[g-3]^v[g-8]^v[g-14]^v[g-16],1),_=a(a(s(e,5),i(g,r,n,u)),a(a(f,y),o(g)));f=u,u=n,n=s(r,30),r=e,e=_}this._a=a(e,c),this._b=a(r,l),this._c=a(n,h),this._d=a(u,p),this._e=a(f,d)},r.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,u),e.writeInt32BE(0|this._b,f),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,l),e.writeInt32BE(0|this._e,h),e},r}},function(t,e,r){var n=r(150).inherits;t.exports=function(t,e){function r(){this.init(),this._w=p,e.call(this,64,56)}function i(t,e){return t>>>e|t<<32-e}function o(t,e){return t>>>e}function a(t,e,r){return t&e^~t&r}function s(t,e,r){return t&e^t&r^e&r}function u(t){return i(t,2)^i(t,13)^i(t,22)}function f(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^o(t,3)}function l(t){return i(t,17)^i(t,19)^o(t,10)}var h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);return n(r,e),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},r.prototype._update=function(t){var e,r,n,i,o,p,d,v,g,y,_=this._w;e=0|this._a,r=0|this._b,n=0|this._c,i=0|this._d,o=0|this._e,p=0|this._f,d=0|this._g,v=0|this._h;for(var m=0;m<64;m++){var b=_[m]=m<16?t.readInt32BE(4*m):l(_[m-2])+_[m-7]+c(_[m-15])+_[m-16];g=v+f(o)+a(o,p,d)+h[m]+b,y=u(e)+s(e,r,n),v=d,d=p,p=o,o=i+g,i=n,n=r,r=e,e=g+y}this._a=e+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=p+this._f|0,this._g=d+this._g|0,this._h=v+this._h|0},r.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},r}},function(t,e,r){var n=r(150).inherits;t.exports=function(t,e){function r(){this.init(),this._w=u,e.call(this,128,112)}function i(t,e,r){return t>>>r|e<<32-r}function o(t,e,r){return t&e^~t&r}function a(t,e,r){return t&e^t&r^e&r}var s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],u=new Array(160);return n(r,e),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},r.prototype._update=function(t){var e,r,n,u,f,c,l,h,p,d,v,g,y,_,m,b,w=this._w;e=0|this._a,r=0|this._b,n=0|this._c,u=0|this._d,f=0|this._e,c=0|this._f,l=0|this._g,h=0|this._h,p=0|this._al,d=0|this._bl,v=0|this._cl,g=0|this._dl,y=0|this._el,_=0|this._fl,m=0|this._gl,b=0|this._hl;for(var E=0;E<80;E++){var k,T,B=2*E;if(E<16)k=w[B]=t.readInt32BE(4*B),T=w[B+1]=t.readInt32BE(4*B+4);else{var S=w[B-30],x=w[B-30+1],j=i(S,x,1)^i(S,x,8)^S>>>7,I=i(x,S,1)^i(x,S,8)^i(x,S,7);S=w[B-4],x=w[B-4+1];var A=i(S,x,19)^i(x,S,29)^S>>>6,O=i(x,S,19)^i(S,x,29)^i(x,S,6),R=w[B-14],C=w[B-14+1],L=w[B-32],F=w[B-32+1];T=I+C,k=j+R+(T>>>0<I>>>0?1:0),T+=O,k=k+A+(T>>>0<O>>>0?1:0),T+=F,k=k+L+(T>>>0<F>>>0?1:0),w[B]=k,w[B+1]=T}var U=a(e,r,n),P=a(p,d,v),D=i(e,p,28)^i(p,e,2)^i(p,e,7),q=i(p,e,28)^i(e,p,2)^i(e,p,7),M=i(f,y,14)^i(f,y,18)^i(y,f,9),N=i(y,f,14)^i(y,f,18)^i(f,y,9),z=s[B],V=s[B+1],H=o(f,c,l),W=o(y,_,m),Y=b+N,X=h+M+(Y>>>0<b>>>0?1:0);Y+=W,X=X+H+(Y>>>0<W>>>0?1:0),Y+=V,X=X+z+(Y>>>0<V>>>0?1:0),Y+=T,X=X+k+(Y>>>0<T>>>0?1:0);var G=q+P,$=D+U+(G>>>0<q>>>0?1:0);h=l,b=m,l=c,m=_,c=f,_=y,y=g+Y|0,f=u+X+(y>>>0<g>>>0?1:0)|0,u=n,g=v,n=r,v=d,r=e,d=p,p=Y+G|0,e=X+$+(p>>>0<Y>>>0?1:0)|0}this._al=this._al+p|0,this._bl=this._bl+d|0,this._cl=this._cl+v|0,this._dl=this._dl+g|0,this._el=this._el+y|0,this._fl=this._fl+_|0,this._gl=this._gl+m|0,this._hl=this._hl+b|0,this._a=this._a+e+(this._al>>>0<p>>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0<d>>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0<v>>>0?1:0)|0,this._d=this._d+u+(this._dl>>>0<g>>>0?1:0)|0,this._e=this._e+f+(this._el>>>0<y>>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0<_>>>0?1:0)|0,this._g=this._g+l+(this._gl>>>0<m>>>0?1:0)|0,this._h=this._h+h+(this._hl>>>0<b>>>0?1:0)|0},r.prototype._hash=function(){function e(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),r},r}},function(t,e,r){function n(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,l=0;l<t.length;l+=16){var h=r,p=n,d=i,v=c;r=o(r,n,i,c,t[l+0],7,-680876936),c=o(c,r,n,i,t[l+1],12,-389564586),i=o(i,c,r,n,t[l+2],17,606105819),n=o(n,i,c,r,t[l+3],22,-1044525330),r=o(r,n,i,c,t[l+4],7,-176418897),c=o(c,r,n,i,t[l+5],12,1200080426),i=o(i,c,r,n,t[l+6],17,-1473231341),n=o(n,i,c,r,t[l+7],22,-45705983),r=o(r,n,i,c,t[l+8],7,1770035416),c=o(c,r,n,i,t[l+9],12,-1958414417),i=o(i,c,r,n,t[l+10],17,-42063),n=o(n,i,c,r,t[l+11],22,-1990404162),r=o(r,n,i,c,t[l+12],7,1804603682),c=o(c,r,n,i,t[l+13],12,-40341101),i=o(i,c,r,n,t[l+14],17,-1502002290),n=o(n,i,c,r,t[l+15],22,1236535329),r=a(r,n,i,c,t[l+1],5,-165796510),c=a(c,r,n,i,t[l+6],9,-1069501632),i=a(i,c,r,n,t[l+11],14,643717713),n=a(n,i,c,r,t[l+0],20,-373897302),r=a(r,n,i,c,t[l+5],5,-701558691),c=a(c,r,n,i,t[l+10],9,38016083),i=a(i,c,r,n,t[l+15],14,-660478335),n=a(n,i,c,r,t[l+4],20,-405537848),r=a(r,n,i,c,t[l+9],5,568446438),c=a(c,r,n,i,t[l+14],9,-1019803690),i=a(i,c,r,n,t[l+3],14,-187363961),n=a(n,i,c,r,t[l+8],20,1163531501),r=a(r,n,i,c,t[l+13],5,-1444681467),c=a(c,r,n,i,t[l+2],9,-51403784),i=a(i,c,r,n,t[l+7],14,1735328473),n=a(n,i,c,r,t[l+12],20,-1926607734),r=s(r,n,i,c,t[l+5],4,-378558),c=s(c,r,n,i,t[l+8],11,-2022574463),i=s(i,c,r,n,t[l+11],16,1839030562),n=s(n,i,c,r,t[l+14],23,-35309556),r=s(r,n,i,c,t[l+1],4,-1530992060),c=s(c,r,n,i,t[l+4],11,1272893353),i=s(i,c,r,n,t[l+7],16,-155497632),n=s(n,i,c,r,t[l+10],23,-1094730640),r=s(r,n,i,c,t[l+13],4,681279174),c=s(c,r,n,i,t[l+0],11,-358537222),i=s(i,c,r,n,t[l+3],16,-722521979),n=s(n,i,c,r,t[l+6],23,76029189),r=s(r,n,i,c,t[l+9],4,-640364487),c=s(c,r,n,i,t[l+12],11,-421815835),i=s(i,c,r,n,t[l+15],16,530742520),n=s(n,i,c,r,t[l+2],23,-995338651),r=u(r,n,i,c,t[l+0],6,-198630844),c=u(c,r,n,i,t[l+7],10,1126891415),i=u(i,c,r,n,t[l+14],15,-1416354905),n=u(n,i,c,r,t[l+5],21,-57434055),r=u(r,n,i,c,t[l+12],6,1700485571),c=u(c,r,n,i,t[l+3],10,-1894986606),i=u(i,c,r,n,t[l+10],15,-1051523),n=u(n,i,c,r,t[l+1],21,-2054922799),r=u(r,n,i,c,t[l+8],6,1873313359),c=u(c,r,n,i,t[l+15],10,-30611744),i=u(i,c,r,n,t[l+6],15,-1560198380),n=u(n,i,c,r,t[l+13],21,1309151649),r=u(r,n,i,c,t[l+4],6,-145523070),c=u(c,r,n,i,t[l+11],10,-1120210379),i=u(i,c,r,n,t[l+2],15,718787259),n=u(n,i,c,r,t[l+9],21,-343485551),r=f(r,h),n=f(n,p),i=f(i,d),c=f(c,v)}return Array(r,n,i,c)}function i(t,e,r,n,i,o){return f(c(f(f(e,t),f(n,o)),i),r)}function o(t,e,r,n,o,a,s){return i(e&r|~e&n,t,e,o,a,s)}function a(t,e,r,n,o,a,s){return i(e&n|r&~n,t,e,o,a,s)}function s(t,e,r,n,o,a,s){return i(e^r^n,t,e,o,a,s)}function u(t,e,r,n,o,a,s){return i(r^(e|~n),t,e,o,a,s)}function f(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<<e|t>>>32-e}var l=r(163);t.exports=function(t){return l.hash(t,n,16)}},function(t,e,r){(function(e){function r(t,r){if(t.length%o!==0){var n=t.length+(o-t.length%o);t=e.concat([t,a],n)}for(var i=[],s=r?t.readInt32BE:t.readInt32LE,u=0;u<t.length;u+=o)i.push(s.call(t,u));return i}function n(t,r,n){for(var i=new e(r),o=n?i.writeInt32BE:i.writeInt32LE,a=0;a<t.length;a++)o.call(i,t[a],4*a,!0);
return i}function i(t,i,o,a){e.isBuffer(t)||(t=new e(t));var u=i(r(t,a),t.length*s);return n(u,o,a)}var o=4,a=new e(o);a.fill(0);var s=8;t.exports={hash:i}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){function r(t,e,r){return t^e^r}function n(t,e,r){return t&e|~t&r}function i(t,e,r){return(t|~e)^r}function o(t,e,r){return t&r|e&~r}function a(t,e,r){return t^(e|~r)}function s(t,e){return t<<e|t>>>32-e}function u(t){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=v(t),i=8*t.length,o=8*t.length;n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);for(var a=0;a<n.length;a+=16)y(r,n,a);for(var a=0;a<5;a++){var s=r[a];r[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var u=g(r);return new e(u)}t.exports=u;var f=[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],c=[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=[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],h=[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],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],v=function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},g=function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},y=function(t,e,u){for(var v=0;v<16;v++){var g=u+v,y=e[g];e[g]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8)}var _,m,b,w,E,k,T,B,S,x;k=_=t[0],T=m=t[1],B=b=t[2],S=w=t[3],x=E=t[4];for(var j,v=0;v<80;v+=1)j=_+e[u+f[v]]|0,j+=v<16?r(m,b,w)+p[0]:v<32?n(m,b,w)+p[1]:v<48?i(m,b,w)+p[2]:v<64?o(m,b,w)+p[3]:a(m,b,w)+p[4],j|=0,j=s(j,l[v]),j=j+E|0,_=E,E=w,w=s(b,10),b=m,m=j,j=k+e[u+c[v]]|0,j+=v<16?a(T,B,S)+d[0]:v<32?o(T,B,S)+d[1]:v<48?i(T,B,S)+d[2]:v<64?n(T,B,S)+d[3]:r(T,B,S)+d[4],j|=0,j=s(j,h[v]),j=j+x|0,k=x,x=S,S=s(B,10),B=T,T=j;j=t[1]+b+S|0,t[1]=t[2]+w+x|0,t[2]=t[3]+E+k|0,t[3]=t[4]+_+T|0,t[4]=t[0]+m+B|0,t[0]=j}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){function n(t,r){if(!(this instanceof n))return new n(t,r);this._opad=u,this._alg=t;var a="sha512"===t?128:64;r=this._key=e.isBuffer(r)?r:new e(r),r.length>a?r=i(t).update(r).digest():r.length<a&&(r=e.concat([r,o],a));for(var s=this._ipad=new e(a),u=this._opad=new e(a),f=0;f<a;f++)s[f]=54^r[f],u[f]=92^r[f];this._hash=i(t).update(s)}var i=r(156),o=new e(128);o.fill(0),t.exports=n,n.prototype.update=function(t,e){return this._hash.update(t,e),this},n.prototype.digest=function(t){var e=this._hash.digest();return i(this._alg).update(this._opad).update(e).digest(t)}}).call(e,r(141).Buffer)},function(t,e,r){var n=r(167);t.exports=function(t,e){e=e||{};var r=n(t);return e.pbkdf2=r.pbkdf2,e.pbkdf2Sync=r.pbkdf2Sync,e}},function(t,e,r){(function(e){t.exports=function(t){function r(t,e,r,i,o,a){if("function"==typeof o&&(a=o,o=void 0),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var s;try{s=n(t,e,r,i,o)}catch(t){return a(t)}a(void 0,s)})}function n(r,n,i,o,a){if("number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0)throw new TypeError("Bad key length");a=a||"sha1",e.isBuffer(r)||(r=new e(r)),e.isBuffer(n)||(n=new e(n));var s,u,f,c=1,l=new e(o),h=new e(n.length+4);n.copy(h,0,0,n.length);for(var p=1;p<=c;p++){h.writeUInt32BE(p,n.length);var d=t.createHmac(a,r).update(h).digest();if(!s&&(s=d.length,f=new e(s),c=Math.ceil(o/s),u=o-(c-1)*s,o>(Math.pow(2,32)-1)*s))throw new TypeError("keylen exceeds maximum length");d.copy(f,0,0,s);for(var v=1;v<i;v++){d=t.createHmac(a,r).update(d).digest();for(var g=0;g<s;g++)f[g]^=d[g]}var y=(p-1)*s,_=p==c?u:s;f.copy(l,y,0,_)}return l}return{pbkdf2:r,pbkdf2Sync:n}}}).call(e,r(141).Buffer)},function(t,e,r){t.exports=function(t,e){function n(){return Object.keys(a)}e=e||{};var i=r(169)(t);e.createCipher=i.createCipher,e.createCipheriv=i.createCipheriv;var o=r(200)(t);e.createDecipher=o.createDecipher,e.createDecipheriv=o.createDecipheriv;var a=r(191);e.listCiphers=n}},function(t,e,r){(function(e){function n(t,r,s){return this instanceof n?(a.call(this),this._cache=new i,this._cipher=new o.AES(r),this._prev=new e(s.length),s.copy(this._prev),void(this._mode=t)):new n(t,r,s)}function i(){return this instanceof i?void(this.cache=new e("")):new i}var o=r(170),a=r(171),s=r(173),u=r(191),f=r(192),c=r(193);s(n,a),n.prototype._transform=function(t,e,r){this._cache.add(t);for(var n,i;n=this._cache.get();)i=this._mode.encrypt(this,n),this.push(i);r()},n.prototype._flush=function(t){var e=this._cache.flush();this.push(this._mode.encrypt(this,e)),this._cipher.scrub(),t()},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){for(var t=16-this.cache.length,r=new e(t),n=-1;++n<t;)r.writeUInt8(t,n);var i=e.concat([this.cache,r]);return i};var l={ECB:r(194),CBC:r(195),CFB:r(197),OFB:r(198),CTR:r(199)};t.exports=function(t){function r(t,r,i){var o=u[t];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new c(l[o.mode],r,i):new n(l[o.mode],r,i)}function i(e,n){var i=u[e];if(!i)throw new TypeError("invalid suite type");var o=f(t,n,i.key,i.iv);return r(e,o.key,o.iv)}return{createCipher:i,createCipheriv:r}}}).call(e,r(141).Buffer)},function(t,e,r){(function(t){function r(t){var e,r;return e=t>s||t<0?(r=Math.abs(t)%s,t<0?s-r:r):t}function n(t){var e,r,n;for(e=r=0,n=t.length;0<=n?r<n:r>n;e=0<=n?++r:--r)t[e]=0;return!1}function i(){var t;this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var e,r;for(r=[],t=e=0;e<4;t=++e)r.push([]);return r}(),this.INV_SUB_MIX=function(){var e,r;for(r=[],t=e=0;e<4;t=++e)r.push([]);return r}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function o(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function a(t){this._key=o(t),this._doReset()}var s=Math.pow(2,32);i.prototype.init=function(){var t,e,r,n,i,o,a,s,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=u^u<<1^u<<2^u<<3^u<<4,r=r>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,o=t[i],a=t[o],s=t[a],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*a^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[s^o]]],u^=t[t[u]]);return!0};var u=new i;a.blockSize=16,a.prototype.blockSize=a.blockSize,a.keySize=32,a.prototype.keySize=a.keySize,a.ivSize=a.blockSize,a.prototype.ivSize=a.ivSize,a.prototype._doReset=function(){var t,e,r,n,i,o,a,s;for(r=this._key,e=r.length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=a=0;0<=i?a<i:a>i;n=0<=i?++a:--a)this._keySchedule[n]=n<e?r[n]:(o=this._keySchedule[n-1],n%e===0?(o=o<<8|o>>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=u.RCON[n/e|0]<<24):e>6&&n%e===4?o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]:void 0,this._keySchedule[n-e]^o);for(this._invKeySchedule=[],t=s=0;0<=i?s<i:s>i;t=0<=i?++s:--s)n=i-t,o=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?o:u.INV_SUB_MIX[0][u.SBOX[o>>>24]]^u.INV_SUB_MIX[1][u.SBOX[o>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[o>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&o]];return!0},a.prototype.encryptBlock=function(e){e=o(new t(e));var r=this._doCryptBlock(e,this._keySchedule,u.SUB_MIX,u.SBOX),n=new t(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},a.prototype.decryptBlock=function(e){e=o(new t(e));var r=[e[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX),i=new t(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},a.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},a.prototype._doCryptBlock=function(t,e,n,i){var o,a,s,u,f,c,l,h,p,d,v,g;for(s=t[0]^e[0],u=t[1]^e[1],f=t[2]^e[2],c=t[3]^e[3],o=4,a=v=1,g=this._nRounds;1<=g?v<g:v>g;a=1<=g?++v:--v)l=n[0][s>>>24]^n[1][u>>>16&255]^n[2][f>>>8&255]^n[3][255&c]^e[o++],h=n[0][u>>>24]^n[1][f>>>16&255]^n[2][c>>>8&255]^n[3][255&s]^e[o++],p=n[0][f>>>24]^n[1][c>>>16&255]^n[2][s>>>8&255]^n[3][255&u]^e[o++],d=n[0][c>>>24]^n[1][s>>>16&255]^n[2][u>>>8&255]^n[3][255&f]^e[o++],s=l,u=h,f=p,c=d;return l=(i[s>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&c])^e[o++],h=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[c>>>8&255]<<8|i[255&s])^e[o++],p=(i[f>>>24]<<24|i[c>>>16&255]<<16|i[s>>>8&255]<<8|i[255&u])^e[o++],d=(i[c>>>24]<<24|i[s>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^e[o++],[r(l),r(h),r(p),r(d)]},e.AES=a}).call(e,r(141).Buffer)},function(t,e,r){(function(e){function n(){i.call(this)}var i=r(172).Transform,o=r(173);t.exports=n,o(n,i),n.prototype.update=function(t,r,n){this.write(t,r);for(var i,o=new e("");i=this.read();)o=e.concat([o,i]);return n&&(o=o.toString(n)),o},n.prototype.final=function(t){this.end();for(var r,n=new e("");r=this.read();)n=e.concat([n,r]);return t&&(n=n.toString(t)),n}}).call(e,r(141).Buffer)},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(173);o(n,i),n.Readable=r(174),n.Writable=r(187),n.Duplex=r(188),n.Transform=r(189),n.PassThrough=r(190),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&f.pause&&f.pause()}function n(){f.readable&&f.resume&&f.resume()}function o(){c||(c=!0,t.end())}function a(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){f.removeListener("data",r),t.removeListener("drain",n),f.removeListener("end",o),f.removeListener("close",a),f.removeListener("error",s),t.removeListener("error",s),f.removeListener("end",u),f.removeListener("close",u),t.removeListener("close",u)}var f=this;f.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(f.on("end",o),f.on("close",a));var c=!1;return f.on("error",s),t.on("error",s),f.on("end",u),f.on("close",u),t.on("close",u),t.emit("pipe",f),t}},152,function(t,e,r){(function(n){var i=function(){try{return r(172)}catch(t){}}();e=t.exports=r(175),e.Stream=i||e,e.Readable=e,e.Writable=r(182),e.Duplex=r(181),e.Transform=r(185),e.PassThrough=r(186),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(e,r(4))},function(t,e,r){(function(e){"use strict";function n(t,e,r){return"function"==typeof t.prependListener?t.prependListener(e,r):void(t._events&&t._events[e]?O(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r))}function i(t,e){I=I||r(181),t=t||{},this.objectMode=!!t.objectMode,e instanceof I&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(q||(q=r(184).StringDecoder),this.decoder=new q(t.encoding),this.encoding=t.encoding)}function o(t){return I=I||r(181),this instanceof o?(this._readableState=new i(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),void R.call(this)):new o(t)}function a(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(null===r)e.reading=!1,l(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var u=new Error("stream.unshift() after end event");t.emit("error",u)}else{var f;!e.decoder||i||n||(r=e.decoder.write(r),f=!e.objectMode&&0===r.length),i||(e.reading=!1),f||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&h(t))),d(t,e)}else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function u(t){return t>=N?t=N:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function f(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=u(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function c(t,e){var r=null;return L.isBuffer(e)||"string"==typeof e||null===e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,h(t)}}function h(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(D("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?A(p,t):p(t))}function p(t){D("emit readable"),t.emit("readable"),b(t)}function d(t,e){e.readingMore||(e.readingMore=!0,A(v,t,e))}function v(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(D("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;D("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&C(t,"data")&&(e.flowing=!0,b(t))}}function y(t){D("readable nexttick read 0"),t.read(0)}function _(t,e){e.resumeScheduled||(e.resumeScheduled=!0,A(m,t,e))}function m(t,e){e.reading||(D("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;for(D("flow",e.flowing);e.flowing&&null!==t.read(););}function w(t,e){if(0===e.length)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=E(t,e.buffer,e.decoder),r}function E(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?k(t,e):T(t,e),n}function k(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(i+=a===o.length?o:o.slice(0,t),t-=a,0===t){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}function T(t,e){var r=F.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),t-=a,0===t){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}function B(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,A(S,e,t))}function S(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function x(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function j(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=o;var I,A=r(176),O=r(144);o.ReadableState=i;var R,C=(r(2).EventEmitter,function(t,e){return t.listeners(e).length});!function(){try{R=r(172)}catch(t){}finally{R||(R=r(2).EventEmitter)}}();var L=r(141).Buffer,F=r(177),U=r(178);U.inherits=r(173);var P=r(179),D=void 0;D=P&&P.debuglog?P.debuglog("stream"):function(){};var q,M=r(180);U.inherits(o,R),o.prototype.push=function(t,e){var r=this._readableState;return r.objectMode||"string"!=typeof t||(e=e||r.defaultEncoding,e!==r.encoding&&(t=F.from(t,e),e="")),a(this,r,t,e,!1)},o.prototype.unshift=function(t){var e=this._readableState;return a(this,e,t,"",!0)},o.prototype.isPaused=function(){return this._readableState.flowing===!1},o.prototype.setEncoding=function(t){return q||(q=r(184).StringDecoder),this._readableState.decoder=new q(t),this._readableState.encoding=t,this};var N=8388608;o.prototype.read=function(t){D("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return D("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):h(this),null;if(t=f(t,e),0===t&&e.ended)return 0===e.length&&B(this),null;var n=e.needReadable;D("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,D("length less than watermark",n)),e.ended||e.reading?(n=!1,D("reading or ended",n)):n&&(D("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=f(r,e)));var i;return i=t>0?w(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(t,r){function i(t){D("onunpipe"),t===h&&a()}function o(){D("onend"),t.end()}function a(){D("cleanup"),t.removeListener("close",f),t.removeListener("finish",c),t.removeListener("drain",y),t.removeListener("error",u),t.removeListener("unpipe",i),h.removeListener("end",o),h.removeListener("end",a),h.removeListener("data",s),_=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||y()}function s(e){D("ondata"),m=!1;var r=t.write(e);!1!==r||m||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&j(p.pipes,t)!==-1)&&!_&&(D("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,m=!0),h.pause())}function u(e){D("onerror",e),l(),t.removeListener("error",u),0===C(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",c),l()}function c(){D("onfinish"),t.removeListener("close",f),l()}function l(){D("unpipe"),h.unpipe(t)}var h=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,D("pipe count=%d opts=%j",p.pipesCount,r);var d=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,v=d?o:a;p.endEmitted?A(v):h.once("end",v),t.on("unpipe",i);var y=g(h);t.on("drain",y);var _=!1,m=!1;return h.on("data",s),n(t,"error",u),t.once("close",f),t.once("finish",c),t.emit("pipe",h),p.flowing||(D("pipe resume"),h.resume()),t},o.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var o=j(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},o.prototype.on=function(t,e){var r=R.prototype.on.call(this,t,e);if("data"===t)this._readableState.flowing!==!1&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&h(this,n):A(y,this))}return r},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var t=this._readableState;return t.flowing||(D("resume"),t.flowing=!0,_(this,t)),this},o.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(D("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(D("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return x(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){D("wrapped _read",e),r&&(r=!1,t.resume())},n},o._fromList=w}).call(e,r(4))},function(t,e,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick(function(){t.apply(null,o)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=r:t.exports=e.nextTick}).call(e,r(4))},function(t,e,r){(function(t){"use strict";var n=r(141),i=n.Buffer,o=n.SlowBuffer,a=n.kMaxLength||2147483647;e.alloc=function(t,e,r){if("function"==typeof i.alloc)return i.alloc(t,e,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof t)throw new TypeError("size must be a number");if(t>a)throw new RangeError("size is too large");var n=r,o=e;void 0===o&&(n=void 0,o=0);var s=new i(t);if("string"==typeof o)for(var u=new i(o,n),f=u.length,c=-1;++c<t;)s[c]=u[c%f];else s.fill(o);return s},e.allocUnsafe=function(t){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(t);if("number"!=typeof t)throw new TypeError("size must be a number");if(t>a)throw new RangeError("size is too large");return new i(t)},e.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r;if(1===arguments.length)return new i(e);"undefined"==typeof o&&(o=0);var a=n;if("undefined"==typeof a&&(a=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+a))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},e.allocUnsafeSlow=function(t){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(t);if("number"!=typeof t)throw new TypeError("size must be a number");if(t>=a)throw new RangeError("size is too large");return new o(t)}}).call(e,function(){return this}())},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===g(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function a(t){return"number"==typeof t}function s(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function f(t){return void 0===t}function c(t){return"[object RegExp]"===g(t)}function l(t){return"object"==typeof t&&null!==t}function h(t){return"[object Date]"===g(t)}function p(t){return"[object Error]"===g(t)||t instanceof Error}function d(t){return"function"==typeof t}function v(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function g(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=a,e.isString=s,e.isSymbol=u,e.isUndefined=f,e.isRegExp=c,e.isObject=l,e.isDate=h,e.isError=p,e.isFunction=d,e.isPrimitive=v,e.isBuffer=t.isBuffer}).call(e,r(141).Buffer)},139,function(t,e,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(r(141).Buffer,r(177));t.exports=n,n.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},n.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},n.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},n.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),r=this.head,n=0;r;)r.data.copy(e,n),n+=r.data.length,r=r.next;return e}},function(t,e,r){"use strict";function n(t){return this instanceof n?(f.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(t){t.end()}var a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=n;var s=r(176),u=r(178);u.inherits=r(173);var f=r(175),c=r(182);u.inherits(n,f);for(var l=a(c.prototype),h=0;h<l.length;h++){var p=l[h];n.prototype[p]||(n.prototype[p]=c.prototype[p])}},function(t,e,r){(function(e,n){"use strict";function i(){}function o(t,e,r){this.chunk=t,this.encoding=e,this.callback=r,this.next=null}function a(t,e){T=T||r(181),t=t||{},this.objectMode=!!t.objectMode,e instanceof T&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){v(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new k(this)}function s(t){return T=T||r(181),R.call(s,this)||this instanceof T?(this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),void j.call(this)):new s(t)}function u(t,e){var r=new Error("write after end");t.emit("error",r),B(e,r)}function f(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):A.isBuffer(r)||"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),B(n,o),i=!1),i}function c(t,e,r){return t.objectMode||t.decodeStrings===!1||"string"!=typeof e||(e=O.from(e,r)),e}function l(t,e,r,n,i){r=c(e,r,n),A.isBuffer(r)&&(n="buffer");var a=e.objectMode?1:r.length;e.length+=a;var s=e.length<e.highWaterMark;if(s||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest=new o(r,n,i),u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else h(t,e,!1,a,r,n,i);return s}function h(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function p(t,e,r,n,i){--e.pendingcb,r?B(i,n):i(n),t._writableState.errorEmitted=!0,t.emit("error",n)}function d(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function v(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(d(r),e)p(t,r,n,e,i);else{var o=m(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?S(g,t,r,o,i):g(t,r,o,i)}}function g(t,e,r,n){r||y(t,e),e.pendingcb--,n(),w(t,e)}function y(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0;r;)i[a]=r,r=r.next,a+=1;h(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new k(e)}else{for(;r;){var s=r.chunk,u=r.encoding,f=r.callback,c=e.objectMode?1:s.length;if(h(t,e,!1,c,s,u,f),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function m(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function w(t,e){var r=m(e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function E(t,e,r){e.ending=!0,w(t,e),r&&(e.finished?B(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function k(t){var e=this;this.next=null,this.entry=null,this.finish=function(r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}t.exports=s;var T,B=r(176),S=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:B;s.WritableState=a;var x=r(178);x.inherits=r(173);var j,I={deprecate:r(183)};!function(){try{j=r(172)}catch(t){}finally{j||(j=r(2).EventEmitter)}}();var A=r(141).Buffer,O=r(177);x.inherits(s,j),a.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(a.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(t){}}();var R;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(t){return!!R.call(this,t)||t&&t._writableState instanceof a}})):R=function(t){return t instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(t,e,r){var n=this._writableState,o=!1;return"function"==typeof e&&(r=e,e=null),A.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=i),n.ended?u(this,r):f(this,n,t,r)&&(n.pendingcb++,o=l(this,n,t,e,r)),o},s.prototype.cork=function(){var t=this._writableState;t.corked++},s.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},s.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,
this},s.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||E(this,n,r)}}).call(e,r(4),r(5).setImmediate)},function(t,e){(function(e){function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(e,function(){return this}())},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function a(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var s=r(141).Buffer,u=s.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},f=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};f.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},f.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},f.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){"use strict";function n(t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&t.push(r),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);s.call(this,t),this._transformState=new n(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){a(e,t,r)}):a(e)})}function a(t,e,r){if(e)return t.emit("error",e);null!==r&&void 0!==r&&t.push(r);var n=t._writableState,i=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}t.exports=o;var s=r(181),u=r(178);u.inherits=r(173),u.inherits(o,s),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},function(t,e,r){"use strict";function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(185),o=r(178);o.inherits=r(173),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(182)},function(t,e,r){t.exports=r(181)},function(t,e,r){t.exports=r(185)},function(t,e,r){t.exports=r(186)},function(t,e){e["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},e["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},e["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},e["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},e["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},e["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},e.aes128=e["aes-128-cbc"],e.aes192=e["aes-192-cbc"],e.aes256=e["aes-256-cbc"],e["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},e["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},e["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},e["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},e["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},e["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},e["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},e["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},e["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"}},function(t,e,r){(function(e){t.exports=function(t,r,n,i){n/=8,i=i||0;for(var o,a,s,u=0,f=0,c=new e(n),l=new e(i),h=0;;){if(o=t.createHash("md5"),h++>0&&o.update(a),o.update(r),a=o.digest(),s=0,n>0)for(;;){if(0===n)break;if(s===a.length)break;c[u++]=a[s],n--,s++}if(i>0&&s!==a.length)for(;;){if(0===i)break;if(s===a.length)break;l[f++]=a[s],i--,s++}if(0===n&&0===i)break}for(s=0;s<a.length;s++)a[s]=0;return{key:c,iv:l}}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){function n(t,r,a,s){return this instanceof n?(o.call(this),this._cipher=new i.AES(r),this._prev=new e(a.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=s,a.copy(this._prev),void(this._mode=t)):new n(t,r,a)}var i=r(170),o=r(171),a=r(173);a(n,o),t.exports=n,n.prototype._transform=function(t,e,r){r(null,this._mode.encrypt(this,t,this._decrypt))},n.prototype._flush=function(t){this._cipher.scrub(),t()}}).call(e,r(141).Buffer)},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(196);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(e){function r(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=-1;++o<n;)i.writeUInt8(t[o]^r[o],o);return i}t.exports=r}).call(e,r(141).Buffer)},function(t,e,r){(function(t){function n(e,r,n){var o=r.length,a=i(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,n?r:a]),a}var i=r(196);e.encrypt=function(e,r,i){for(var o,a=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){a=t.concat([a,n(e,r,i)]);break}o=e._cache.length,a=t.concat([a,n(e,r.slice(0,o),i)]),r=r.slice(o)}return a}}).call(e,r(141).Buffer)},function(t,e,r){(function(t){function n(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}var i=r(196);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),i(r,o)}}).call(e,r(141).Buffer)},function(t,e,r){(function(t){function n(t){var e=t._cipher.encryptBlock(t._prev);return i(t._prev),e}function i(t){for(var e,r=t.length;r--;){if(e=t.readUInt8(r),255!==e){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}var o=r(196);e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,n(e)]);var i=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),o(r,i)}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){function n(t,r,o){return this instanceof n?(s.call(this),this._cache=new i,this._last=void 0,this._cipher=new a.AES(r),this._prev=new e(o.length),o.copy(this._prev),void(this._mode=t)):new n(t,r,o)}function i(){return this instanceof i?void(this.cache=new e("")):new i}function o(t){var e=t[15];if(16!==e)return t.slice(0,16-e)}var a=r(170),s=r(171),u=r(173),f=r(191),c=r(193),l=r(192);u(n,s),n.prototype._transform=function(t,e,r){this._cache.add(t);for(var n,i;n=this._cache.get();)i=this._mode.decrypt(this,n),this.push(i);r()},n.prototype._flush=function(t){var e=this._cache.flush();return e?(this.push(o(this._mode.decrypt(this,e))),void t()):t},i.prototype.add=function(t){this.cache=e.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>16){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var h={ECB:r(194),CBC:r(195),CFB:r(197),OFB:r(198),CTR:r(199)};t.exports=function(t){function r(t,r,i){var o=f[t];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new e(i)),"string"==typeof r&&(r=new e(r)),r.length!==o.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===o.type?new c(h[o.mode],r,i,!0):new n(h[o.mode],r,i)}function i(e,n){var i=f[e];if(!i)throw new TypeError("invalid suite type");var o=l(t,n,i.key,i.iv);return r(e,o.key,o.iv)}return{createDecipher:i,createDecipheriv:r}}}).call(e,r(141).Buffer)},function(t,e,r){var n=r(202),i="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";t.exports=n(i)},function(t,e,r){(function(e){t.exports=function(t){function r(e){if(0===e.length)return"";for(var r=[0],n=0;n<e.length;++n){for(var i=0,o=e[n];i<r.length;++i)o+=r[i]<<8,r[i]=o%a,o=o/a|0;for(;o>0;)r.push(o%a),o=o/a|0}for(var s="",u=0;0===e[u]&&u<e.length-1;++u)s+=t[0];for(var f=r.length-1;f>=0;--f)s+=t[r[f]];return s}function n(t){if(0===t.length)return new e(0);for(var r=[0],n=0;n<t.length;n++){var i=o[t[n]];if(void 0===i)return;for(var u=0,f=i;u<r.length;++u)f+=r[u]*a,r[u]=255&f,f>>=8;for(;f>0;)r.push(255&f),f>>=8}for(var c=0;t[c]===s&&c<t.length-1;++c)r.push(0);return new e(r.reverse())}function i(t){var e=n(t);if(e)return e;throw new Error("Non-base"+a+" character")}for(var o={},a=t.length,s=t.charAt(0),u=0;u<t.length;u++){var f=t.charAt(u);if(void 0!==o[f])throw new TypeError(f+" is ambiguous");o[f]=u}return{encode:r,decodeUnsafe:n,decode:i}}}).call(e,r(141).Buffer)},function(t,e,r){var n=r(204),i=r(205),o=r(206);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){(function(e){function n(t,e,r,n){i.notStrictEqual(n,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=n,this._zInv=null,this.compressed=!0}var i=r(149),o=r(145),a=o.valueOf(3);Object.defineProperty(n.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(n.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(n.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),n.fromAffine=function(t,e,r){return new n(t,e,r,o.ONE)},n.prototype.equals=function(t){if(t===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(t);if(this.curve.isInfinity(t))return this.curve.isInfinity(this);var e=t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p);if(0!==e.signum())return!1;var r=t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p);return 0===r.signum()},n.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new n(this.curve,this.x,t,this.z)},n.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,i=t.x,o=t.y,s=o.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),u=i.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===u.signum())return 0===s.signum()?this.twice():this.curve.infinity;var f=u.square(),c=f.multiply(u),l=e.multiply(f),h=s.square().multiply(this.z),p=h.subtract(l.shiftLeft(1)).multiply(t.z).subtract(c).multiply(u).mod(this.curve.p),d=l.multiply(a).multiply(s).subtract(r.multiply(c)).subtract(h.multiply(s)).multiply(t.z).add(s.multiply(c)).mod(this.curve.p),v=c.multiply(this.z).multiply(t.z).mod(this.curve.p);return new n(this.curve,p,d,v)},n.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),i=r.multiply(e).mod(this.curve.p),o=this.curve.a,s=t.square().multiply(a);0!==o.signum()&&(s=s.add(this.z.square().multiply(o))),s=s.mod(this.curve.p);var u=s.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),f=s.multiply(a).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new n(this.curve,u,f,c)},n.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(a),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var s=r.testBit(o),u=e.testBit(o);i=i.twice(),s!==u&&(i=i.add(s?this:n))}return i},n.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var a=t.testBit(n),s=r.testBit(n);i=i.twice(),a?i=s?i.add(o):i.add(this):s&&(i=i.add(e)),--n}return i},n.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var r,n=this.affineX,i=this.affineY,o=this.curve.pLength;return t?(r=new e(1+o),r.writeUInt8(i.isEven()?2:3,0)):(r=new e(1+o+o),r.writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},n.decodeFrom=function(t,e){var r,a=e.readUInt8(0),s=4!==a,u=Math.floor((t.p.bitLength()+7)/8),f=o.fromBuffer(e.slice(1,1+u));if(s){i.equal(e.length,u+1,"Invalid sequence length"),i(2===a||3===a,"Invalid sequence tag");var c=3===a;r=t.pointFromX(c,f)}else{i.equal(e.length,1+u+u,"Invalid sequence length");var l=o.fromBuffer(e.slice(1+u));r=n.fromAffine(t,f,l)}return r.compressed=s,r},n.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=n}).call(e,r(141).Buffer)},function(t,e,r){function n(t,e,r,n,i,s,u){this.p=t,this.a=e,this.b=r,this.G=a.fromAffine(this,n,i),this.n=s,this.h=u,this.infinity=new a(this,null,null,o.ZERO),this.pOverFour=t.add(o.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}var i=r(149),o=r(145),a=r(204);n.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p),n=r.modPow(this.pOverFour,this.p),i=n;return n.isEven()^!t&&(i=this.p.subtract(i)),a.fromAffine(this,e,i)},n.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},n.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var a=r.square().mod(o),s=e.pow(3).add(n.multiply(e)).add(i).mod(o);return a.equals(s)},n.prototype.validate=function(t){i(!this.isInfinity(t),"Point is at infinity"),i(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return i(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=n},function(t,e,r){function n(t){var e=o[t];if(!e)return null;var r=new i(e.p,16),n=new i(e.a,16),s=new i(e.b,16),u=new i(e.n,16),f=new i(e.h,16),c=new i(e.Gx,16),l=new i(e.Gy,16);return new a(r,n,s,c,l,u,f)}var i=r(145),o=r(207),a=r(205);t.exports=n},function(t,e){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(209),o=n(i),a=r(232),s=n(a),u=o.default.uint16,f=o.default.uint32,c=o.default.int16,l=o.default.uint64,h=o.default.string,p=o.default.string_binary,d=o.default.bytes,v=o.default.bool,g=o.default.array,y=o.default.static_variant,_=o.default.map,m=o.default.set,b=o.default.public_key,w=o.default.time_point_sec,E=o.default.optional,k=o.default.asset,T=o.default.void,B=o.default.void,S=o.default.void,x=y();t.exports.operation=x;var j=function(e,r){var n=new s.default(e,r);return t.exports[e]=n},I=new j("signed_transaction",{ref_block_num:u,ref_block_prefix:f,expiration:w,operations:g(x),extensions:m(T),signatures:g(d(65))}),A=(new j("signed_block",{previous:d(20),timestamp:w,witness:h,transaction_merkle_root:d(20),extensions:m(y([T,S,B])),witness_signature:d(65),transactions:g(I)}),new j("block_header",{previous:d(20),timestamp:w,witness:h,transaction_merkle_root:d(20),extensions:m(y([T,S,B]))}),new j("signed_block_header",{previous:d(20),timestamp:w,witness:h,transaction_merkle_root:d(20),extensions:m(y([T,S,B])),witness_signature:d(65)})),O=new j("vote",{voter:h,author:h,permlink:h,weight:c}),R=new j("comment",{parent_author:h,parent_permlink:h,author:h,permlink:h,title:h,body:h,json_metadata:h}),C=new j("transfer",{from:h,to:h,amount:k,memo:h}),L=new j("transfer_to_vesting",{from:h,to:h,amount:k}),F=new j("withdraw_vesting",{account:h,vesting_shares:k}),U=new j("limit_order_create",{owner:h,orderid:f,amount_to_sell:k,min_to_receive:k,fill_or_kill:v,expiration:w}),P=new j("limit_order_cancel",{owner:h,orderid:f}),D=new j("price",{base:k,quote:k}),q=new j("feed_publish",{publisher:h,exchange_rate:D}),M=new j("convert",{owner:h,requestid:f,amount:k}),N=new j("authority",{weight_threshold:f,account_auths:_(h,u),key_auths:_(b,u)}),z=new j("account_create",{fee:k,creator:h,new_account_name:h,owner:N,active:N,posting:N,memo_key:b,json_metadata:h}),V=new j("account_update",{account:h,owner:E(N),active:E(N),posting:E(N),memo_key:b,json_metadata:h}),H=new j("chain_properties",{account_creation_fee:k,maximum_block_size:f,sbd_interest_rate:u}),W=new j("witness_update",{owner:h,url:h,block_signing_key:b,props:H,fee:k}),Y=new j("account_witness_vote",{account:h,witness:h,approve:v}),X=new j("account_witness_proxy",{account:h,proxy:h}),G=new j("pow",{worker:b,input:d(32),signature:d(65),work:d(32)}),$=new j("custom",{required_auths:m(h),id:u,data:d()}),Z=new j("report_over_production",{reporter:h,first_block:A,second_block:A}),Q=new j("delete_comment",{author:h,permlink:h}),K=new j("custom_json",{required_auths:m(h),required_posting_auths:m(h),id:h,json:h}),J=new j("comment_options",{author:h,permlink:h,max_accepted_payout:k,percent_steem_dollars:u,allow_votes:v,allow_curation_rewards:v,extensions:m(T)}),tt=new j("set_withdraw_vesting_route",{from_account:h,to_account:h,percent:u,auto_vest:v}),et=new j("limit_order_create2",{owner:h,orderid:f,amount_to_sell:k,exchange_rate:D,fill_or_kill:v,expiration:w}),rt=new j("challenge_authority",{challenger:h,challenged:h,require_owner:v}),nt=new j("prove_authority",{challenged:h,require_owner:v}),it=new j("request_account_recovery",{recovery_account:h,account_to_recover:h,new_owner_authority:N,extensions:m(T)}),ot=new j("recover_account",{account_to_recover:h,new_owner_authority:N,recent_owner_authority:N,extensions:m(T)}),at=new j("change_recovery_account",{account_to_recover:h,new_recovery_account:h,extensions:m(T)}),st=new j("escrow_transfer",{from:h,to:h,sbd_amount:k,steem_amount:k,escrow_id:f,agent:h,fee:k,json_meta:h,ratification_deadline:w,escrow_expiration:w}),ut=new j("escrow_dispute",{from:h,to:h,agent:h,who:h,escrow_id:f}),ft=new j("escrow_release",{from:h,to:h,agent:h,who:h,receiver:h,escrow_id:f,sbd_amount:k,steem_amount:k}),ct=new j("pow2_input",{worker_account:h,prev_block:d(20),nonce:l}),lt=new j("pow2",{input:ct,pow_summary:f}),ht=new j("equihash_proof",{n:f,k:f,seed:d(32),inputs:g(f)}),pt=(new j("equihash_pow",{input:ct,proof:ht,prev_block:d(20),pow_summary:f}),new j("escrow_approve",{from:h,to:h,agent:h,who:h,escrow_id:f,approve:v})),dt=new j("transfer_to_savings",{from:h,to:h,amount:k,memo:h}),vt=new j("transfer_from_savings",{from:h,request_id:f,to:h,amount:k,memo:h}),gt=new j("cancel_transfer_from_savings",{from:h,request_id:f}),yt=new j("custom_binary",{required_owner_auths:m(h),required_active_auths:m(h),required_posting_auths:m(h),required_auths:g(N),id:h,data:d()}),_t=new j("decline_voting_rights",{account:h,decline:v}),mt=new j("reset_account",{reset_account:h,account_to_reset:h,new_owner_authority:N}),bt=new j("set_reset_account",{account:h,current_reset_account:h,reset_account:h}),wt=new j("claim_reward_balance",{account:h,reward_steem:k,reward_sbd:k,reward_vests:k}),Et=new j("fill_convert_request",{owner:h,requestid:f,amount_in:k,amount_out:k}),kt=new j("author_reward",{author:h,permlink:h,sbd_payout:k,steem_payout:k,vesting_payout:k}),Tt=new j("curation_reward",{curator:h,reward:k,comment_author:h,comment_permlink:h}),Bt=new j("comment_reward",{author:h,permlink:h,payout:k}),St=new j("liquidity_reward",{owner:h,payout:k}),xt=new j("interest",{owner:h,interest:k}),jt=new j("fill_vesting_withdraw",{from_account:h,to_account:h,withdrawn:k,deposited:k}),It=new j("fill_order",{current_owner:h,current_orderid:f,current_pays:k,open_owner:h,open_orderid:f,open_pays:k}),At=new j("shutdown_witness",{owner:h}),Ot=new j("fill_transfer_from_savings",{from:h,to:h,amount:k,request_id:f,memo:h}),Rt=new j("hardfork",{hardfork_id:f}),Ct=new j("comment_payout_update",{author:h,permlink:h});x.st_operations=[O,R,C,L,F,U,P,q,M,z,V,W,Y,X,G,$,Z,Q,K,J,tt,et,rt,nt,it,ot,at,st,ut,ft,lt,pt,dt,vt,gt,yt,_t,mt,bt,wt,Et,kt,Tt,Bt,St,xt,jt,It,At,Ot,Rt,Ct];new j("transaction",{ref_block_num:u,ref_block_prefix:f,expiration:w,operations:g(x),extensions:m(T)}),new j("encrypted_memo",{from:b,to:b,nonce:l,check:f,encrypted:p})},function(t,e,r){(function(e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=r(210),s=r(227),u=r(228),f=r(230),c=r(231),l=r(229),h={};t.exports=h;var p=e.env.npm_config__graphene_serializer_hex_dump;h.asset={fromByteBuffer:function(t){var e=t.readInt64(),r=t.readUint8(),i=t.copy(t.offset,t.offset+7),o=new n(i.toBinary(),"binary").toString().replace(/\x00/g,"");t.skip(7);var a=(0,s.fromImpliedDecimal)(e,r);return a+" "+o},appendByteBuffer:function(t,e){if(e=e.trim(),!/^[0-9]+\.?[0-9]* [A-Za-z0-9]+$/.test(e))throw new Error("Expecting amount like '99.000 SYMBOL', instead got '"+e+"'");var r=e.split(" "),n=o(r,2),i=n[0],a=n[1];if(a.length>6)throw new Error("Symbols are not longer than 6 characters "+a+"-"+a.length);t.writeInt64(u.to_long(i.replace(".","")));var s=i.indexOf("."),f=s===-1?0:i.length-s-1;t.writeUint8(f),t.append(a.toUpperCase(),"binary");for(var c=0;c<7-a.length;c++)t.writeUint8(0)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.000 STEEM":t}},h.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){u.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return u.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,255,t,"uint8 "+t),parseInt(t))}},h.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){u.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return u.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},h.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){u.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return u.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var d=-1*Math.pow(2,31),v=Math.pow(2,31)-1;h.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){u.require_range(d,v,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return u.require_range(d,v,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(d,v,t,"uint32 "+t),parseInt(t))}},h.int16={fromByteBuffer:function(t){return t.readInt16()},appendByteBuffer:function(t,e){t.writeInt16(e)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:parseInt(t)}},h.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){u.required(e),t.writeInt64(u.to_long(e))},fromObject:function(t){return u.required(t),u.to_long(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":(u.required(t),u.to_long(t).toString())}},h.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(u.to_long(u.unsigned(e)))},fromObject:function(t){return u.to_long(u.unsigned(t))},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":u.to_long(t).toString()}},h.string={fromByteBuffer:function(t){return new n(t.readVString(),"utf8")},appendByteBuffer:function(t,e){u.required(e),t.writeVString(e.toString())},fromObject:function(t){return u.required(t),new n(t,"utf8")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString("utf8")}},h.string_binary={fromByteBuffer:function(t){var e,r=t.readVarint32();return e=t.copy(t.offset,t.offset+r),t.skip(r),new n(e.toBinary(),"binary")},appendByteBuffer:function(t,e){t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return u.required(t),new n(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString()}},h.bytes=function(t){return{fromByteBuffer:function(e){if(void 0===t){var r,i=e.readVarint32();return r=e.copy(e.offset,e.offset+i),e.skip(i),new n(r.toBinary(),"binary")}return r=e.copy(e.offset,e.offset+t),e.skip(t),new n(r.toBinary(),"binary")},appendByteBuffer:function(e,r){u.required(r),"string"==typeof r&&(r=new n(r,"hex")),void 0===t&&e.writeVarint32(r.length),e.append(r.toString("binary"),"binary")},fromObject:function(t){return u.required(t),n.isBuffer(t)?t:new n(t,"hex")},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e){var n=function(t){return new Array(t).join("00")};return n(t)}return u.required(e),e.toString("hex")}}},h.bool={fromByteBuffer:function(t){return 1===t.readUint8()},appendByteBuffer:function(t,e){t.writeUint8(JSON.parse(e)?1:0)},fromObject:function(t){return!!JSON.parse(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(!e.use_default||void 0!==t)&&!!JSON.parse(t)}},h.void={fromByteBuffer:function(t){throw new Error("(void) undefined type")},appendByteBuffer:function(t,e){throw new Error("(void) undefined type")},fromObject:function(t){throw new Error("(void) undefined type")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.use_default||void 0!==t)throw new Error("(void) undefined type")}},h.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();p&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return m(n,t)},appendByteBuffer:function(e,r){u.required(r),r=m(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){u.required(e),e=m(e,t);
for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e)return[t.toObject(e,r)];u.required(e),e=m(e,t);for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}}},h.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=h.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(u.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return"string"!=typeof t||/Z$/.test(t)||(t+="Z"),Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(u.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var r=parseInt(t);return u.require_range(0,4294967295,r,"uint32 "+t),new Date(1e3*r).toISOString().split(".")[0]}},h.set=function(t){return{validate:function(e){for(var r,n={},o=0;o<e.length;o++){r=e[o];var a;if(a="undefined"==typeof r?"undefined":i(r),["string","number"].indexOf(a)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return m(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return p&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;0<r?i++:i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===e?[t.toObject(e,r)]:(e||(e=[]),this.validate(function(){for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},h.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o,a;for(a=[],n=i=0,o=t;i<o;n=i+=1)a.push(e.fromByteBuffer(r));return m(a,e)},appendByteBuffer:function(r,n){var i,o,a;for(0!==t&&(u.required(n),n=m(n,e)),i=o=0,a=t;o<a;i=o+=1)e.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,o,a;for(0!==t&&u.required(r),a=[],n=i=0,o=t;i<o;n=i+=1)a.push(e.fromObject(r[n]));return a},toObject:function(r,n){var i,o,a,s,f,c,l;if(null==n&&(n={}),n.use_default&&void 0===r){for(c=[],i=o=0,s=t;o<s;i=o+=1)c.push(e.toObject(void 0,n));return c}for(0!==t&&u.required(r),l=[],i=a=0,f=t;a<f;i=a+=1)l.push(e.toObject(r[i],n));return l}}};var g=function(t,e){return u.required(t,"reserved_spaces"),u.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){u.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=u.get_instance(t,e,n)),r.writeVarint32(u.to_number(n))},fromObject:function(r){return u.required(r),void 0!==r.resolve&&(r=r.resolve),u.is_digits(r)?u.to_number(r):u.get_instance(t,e,r)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=l.object_type[e];return n.use_default&&void 0===r?t+"."+i+".0":(u.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=u.get_instance(t,e,r)),t+"."+i+"."+r)}}};h.protocol_id_type=function(t){return u.required(t,"name"),g(l.reserved_spaces.protocol_ids,t)},h.object_id_type={fromByteBuffer:function(t){return f.fromByteBuffer(t)},appendByteBuffer:function(t,e){u.required(e),void 0!==e.resolve&&(e=e.resolve),e=f.fromString(e),e.appendByteBuffer(t)},fromObject:function(t){return u.required(t),void 0!==t.resolve&&(t=t.resolve),f.fromString(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.0.0":(u.required(t),void 0!==t.resolve&&(t=t.resolve),t=f.fromString(t),t.toString())}},h.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(t){var e=t.readUint32();return{type:e&this.TYPE,id:e&this.ID}},appendByteBuffer:function(t,e){u.required(e),"string"===e&&(e=h.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(u.required(t,"(type vote_id)"),"object"===("undefined"==typeof t?"undefined":i(t)))return u.required(t.type,"type"),u.required(t.id,"id"),t;u.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=o(e,2),n=r[0],a=r[1];return u.require_range(0,255,n,"vote type "+t),u.require_range(0,16777215,a,"vote id "+t),{type:n,id:a}},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0:0":(u.required(t),"string"==typeof t&&(t=h.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==("undefined"==typeof t?"undefined":i(t))&&(t=h.vote_id.fromObject(t)),"object"!==("undefined"==typeof e?"undefined":i(e))&&(e=h.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},h.optional=function(t){return u.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readUint8())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null!==r&&void 0!==r?(e.writeUint8(1),t.appendByteBuffer(e,r)):e.writeUint8(0)},fromObject:function(e){if(void 0!==e)return t.fromObject(e)},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){return r.use_default||void 0!==e?t.toObject(e,r):void 0}();return r.annotate&&("object"===("undefined"==typeof n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.static_variant=function(t){return{nosort:!0,st_operations:t,opTypeId:function(t){var e=0,r=void 0;if("number"==typeof t)r=t;else{var n=!0,i=!1,o=void 0;try{for(var a,s=this.st_operations[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(u.operation_name===t){r=e;break}e++}}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return p&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),u.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){u.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];u.required(n,"operation "+r),t.writeVarint32(r),n.appendByteBuffer(t,e[1])},fromObject:function(t){u.required(t);var e=this.opTypeId(t[0]),r=this.st_operations[e];return u.required(r,"operation "+e),[e,r.fromObject(t[1])]},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,e)];u.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];return u.required(n,"operation "+r),[n.operation_name,n.toObject(t[1],e)]},compare:function(t,e){return y(this.opTypeId(t[0]),this.opTypeId(e[0]))}}},h.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o<e.length;o++){r=e[o];var a;if(2!==r.length)throw new Error("expecting two elements");if(a=i(r[0]),["number","string"].indexOf(a)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return m(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;0<i?o++:o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){u.required(r);for(var n,i=[],o=0;o<r.length;o++)n=r[o],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.use_default&&void 0===r)return[[t.toObject(void 0,n),e.toObject(void 0,n)]];u.required(r),r=this.validate(r);for(var i,o=[],a=0;a<r.length;a++)i=r[a],o.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return o}}},h.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:a.PublicKey.fromStringOrThrow(t)},fromByteBuffer:function(t){return c.public_key(t)},appendByteBuffer:function(t,e){u.required(e),c.public_key(t,h.public_key.toPublic(e))},fromObject:function(t){return u.required(t),t.Q?t:h.public_key.toPublic(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?a.ecc_config.address_prefix+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(u.required(t),t.toString())},compare:function(t,e){return-1*y(t.toString(),e.toString())}},h.address={_to_address:function(t){return u.required(t),t.addy?t:a.Address.fromString(t)},fromByteBuffer:function(t){return new a.Address(c.ripemd160(t))},appendByteBuffer:function(t,e){c.ripemd160(t,h.address._to_address(e).toBuffer())},fromObject:function(t){return h.address._to_address(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?a.ecc_config.address_prefix+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(t).toString()},compare:function(t,e){return-1*y(t.toString(),e.toString())}};var y=function(t,e){return t>e?1:t<e?-1:0},_=function(t){return Array.isArray(t)?t[0]:t},m=function(t,e){return e.nosort?t:e.compare?t.sort(function(t,r){return e.compare(_(t),_(r))}):t.sort(function(t,e){return"number"==typeof _(t)&&"number"==typeof _(e)?_(t)-_(e):n.isBuffer(_(t))&&n.isBuffer(_(e))?y(_(t).toString("hex"),_(e).toString("hex")):y(_(t).toString(),_(e).toString())})}}).call(e,r(4),r(141).Buffer)},function(t,e,r){"use strict";t.exports={Address:r(211),Aes:r(213),PrivateKey:r(220),PublicKey:r(219),Signature:r(221),brainKey:r(225),key_utils:r(226),hash:r(212),ecc_config:r(136)}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(149),a=r(136),s=r(212),u=r(201),f=function(){function t(e){n(this,t),this.addy=e}return i(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.address_prefix,r=s.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+u.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=s.sha512(e),n=s.ripemd160(r);return new t(n)}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.address_prefix,i=r.slice(0,n.length);o.equal(n,i,"Expecting key to begin with "+n+", instead got "+i);var f=r.slice(n.length);f=new e(u.decode(f),"binary");var c=f.slice(-4);f=f.slice(0,-4);var l=s.ripemd160(f);return l=l.slice(0,4),o.deepEqual(c,l,"Checksum did not match"),new t(f)}},{key:"fromPublic",value:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=s.sha256(r.toBuffer(n)),a=s.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,a]),c=s.sha256(f);c=s.sha256(c);var l=e.concat([f,c.slice(0,4)]);return new t(s.ripemd160(l))}}]),t}();t.exports=f}).call(e,r(141).Buffer)},function(t,e,r){"use strict";function n(t,e){return u.createHash("sha1").update(t).digest(e)}function i(t,e){return u.createHash("sha256").update(t).digest(e)}function o(t,e){return u.createHash("sha512").update(t).digest(e)}function a(t,e){return u.createHmac("sha256",e).update(t).digest()}function s(t){return u.createHash("rmd160").update(t).digest()}var u=r(153);t.exports={sha1:n,sha256:i,sha512:o,HmacSHA256:a,ripemd160:s}},function(t,e,r){(function(t){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f();return a(t,e,n,r)}function o(t,e,r,n,i){return a(t,e,r,n,i).message}function a(e,r,n,i,o){if(e=w(e),!e)throw new TypeError("private_key is required");if(r=E(r),!r)throw new TypeError("public_key is required");if(n=k(n),!n)throw new TypeError("nonce is required");if(!t.isBuffer(i)){if("string"!=typeof i)throw new TypeError("message should be buffer or string");i=new t(i,"binary")}if(o&&"number"!=typeof o)throw new TypeError("checksum should be a number");var a=e.get_shared_secret(r),f=new p.default(p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);f.writeUint64(n),f.append(a.toString("binary"),"binary"),f=new t(f.copy(0,f.offset).toBinary(),"binary");var c=_.sha512(f),l=g.enc.Hex.parse(c.toString("hex").substring(64,96)),h=g.enc.Hex.parse(c.toString("hex").substring(0,64)),d=_.sha256(c);d=d.slice(0,4);var v=p.default.fromBinary(d.toString("binary"),p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);if(d=v.readUint32(),o){if(d!==o)throw new Error("Invalid key");i=s(i,h,l)}else i=u(i,h,l);return{nonce:n,message:i,checksum:d}}function s(e,r,n){return y(e,"Missing cipher text"),e=T(e),e=g.enc.Base64.parse(e.toString("base64")),e=g.AES.decrypt({ciphertext:e,salt:null},r,{iv:n}),new t(e.toString(),"hex")}function u(e,r,n){return y(e,"Missing plain text"),e=T(e),e=g.lib.WordArray.create(e),e=g.AES.encrypt(e,r,{iv:n}),new t(e.toString(),"base64")}function f(){if(null===b){var t=l.default.randomUint8Array(2);b=parseInt(t[0]<<8|t[1],10)}var e=m.fromNumber(Date.now()),r=++b%65535;return e=e.shiftLeft(16).or(m.fromNumber(r)),e.toString()}Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=i,e.decrypt=o;var c=r(214),l=n(c),h=r(216),p=n(h),d=r(219),v=r(220),g=r(153),y=r(149),_=r(212),m=p.default.Long,b=null,w=function(t){return t?t.d?t:v.fromWif(t):t},E=function(t){return t?t.Q?t:d.fromString(t):t},k=function(t){return t?m.isLong(t)?t:m.fromString(t):t},T=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(141).Buffer)},function(t,e,r){var n,i;(function(o,a){!function(s){"use strict";function u(t,e){if(e=e||{type:"Array"},"undefined"!=typeof o&&"number"==typeof o.pid)return f(t,e);var r=window.crypto||window.msCrypto;if(!r)throw new Error("Your browser does not support window.crypto.");return c(t,e)}function f(t,e){var n=r(215),i=n.randomBytes(t);switch(e.type){case"Array":return[].slice.call(i);case"Buffer":return i;case"Uint8Array":for(var o=new Uint8Array(t),a=0;a<t;++a)o[a]=i.readUInt8(a);return o;default:throw new Error(e.type+" is unsupported.")}}function c(t,e){var r=new Uint8Array(t),n=window.crypto||window.msCrypto;switch(n.getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new a(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new a(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}n=[],i=function(){return u}.apply(e,n),!(void 0!==i&&(t.exports=i)),u.randomArray=function(t){return u(t,{type:"Array"})},u.randomUint8Array=function(t){return u(t,{type:"Uint8Array"})},u.randomBuffer=function(t){return u(t,{type:"Buffer"})}}(this)}).call(e,r(4),r(141).Buffer)},139,function(t,e,r){var n,i,o;(function(t){!function(a,s){r(217).amd?(i=[r(218)],n=s,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(218)}catch(t){}return s(t)}():(a.dcodeIO=a.dcodeIO||{}).ByteBuffer=s(a.dcodeIO.Long)}(this,function(t){"use strict";function e(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function r(){var t=[],e=[];return function(){return 0===arguments.length?e.join("")+u.apply(String,t):(t.length+arguments.length>1024&&(e.push(u.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function n(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)}function i(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+l>=1?h/u:h*Math.pow(2,1-l),e*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*v}var o=function(t,e,r){if("undefined"==typeof t&&(t=o.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=o.DEFAULT_ENDIAN),"undefined"==typeof r&&(r=o.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");e=!!e,r=!!r}this.buffer=0===t?s:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=r};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var a=o.prototype;a.__isByteBuffer__,Object.defineProperty(a,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var s=new ArrayBuffer(0),u=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,r){return new o(t,e,r)},o.concat=function(t,e,r,n){"boolean"!=typeof e&&"string"==typeof e||(n=r,r=e,e=void 0);for(var i,a=0,s=0,u=t.length;s<u;++s)o.isByteBuffer(t[s])||(t[s]=o.wrap(t[s],e)),i=t[s].limit-t[s].offset,i>0&&(a+=i);if(0===a)return new o(0,r,n);var f,c=new o(a,r,n);for(s=0;s<u;)f=t[s++],i=f.limit-f.offset,i<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=i);return c.limit=c.offset,c.offset=0,c},o.isByteBuffer=function(t){return(t&&t.__isByteBuffer__)===!0},o.type=function(){return ArrayBuffer},o.wrap=function(t,e,r,n){if("string"!=typeof e&&(n=r,r=e,e=void 0),"string"==typeof t)switch("undefined"==typeof e&&(e="utf8"),e){case"base64":return o.fromBase64(t,r);case"hex":return o.fromHex(t,r);case"binary":return o.fromBinary(t,r);case"utf8":return o.fromUTF8(t,r);case"debug":return o.fromDebug(t,r);default:throw Error("Unsupported encoding: "+e)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var i;if(o.isByteBuffer(t))return i=a.clone.call(t),i.markedOffset=-1,i;if(t instanceof Uint8Array)i=new o(0,r,n),t.length>0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,r,n),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,r,n),i.limit=t.length;for(var s=0;s<t.length;++s)i.view[s]=t[s]}return i},a.writeBitSet=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,a=o>>3,s=0;for(e+=this.writeVarint32(o,e);a--;)n=1&!!t[s++]|(1&!!t[s++])<<1|(1&!!t[s++])<<2|(1&!!t[s++])<<3|(1&!!t[s++])<<4|(1&!!t[s++])<<5|(1&!!t[s++])<<6|(1&!!t[s++])<<7,this.writeByte(n,e++);if(s<o){var u=0;for(n=0;s<o;)n|=(1&!!t[s++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},a.readBitSet=function(t){var e="undefined"==typeof t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,a=0,s=[];for(t+=n.length;o--;)r=this.readByte(t++),s[a++]=!!(1&r),s[a++]=!!(2&r),s[a++]=!!(4&r),s[a++]=!!(8&r),s[a++]=!!(16&r),s[a++]=!!(32&r),s[a++]=!!(64&r),s[a++]=!!(128&r);if(a<i){var u=0;for(r=this.readByte(t++);a<i;)s[a++]=!!(r>>u++&1)}return e&&(this.offset=t),s},a.readBytes=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},a.writeBytes=a.append,a.writeInt8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},a.writeByte=a.writeInt8,a.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128===(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},a.readByte=a.readInt8,a.writeUint8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},a.writeUInt8=a.writeUint8,a.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},a.readUInt8=a.readUint8,a.writeInt16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},a.writeShort=a.writeInt16,a.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768===(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},a.readShort=a.readInt16,a.writeUint16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},a.writeUInt16=a.writeUint16,a.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},a.readUInt16=a.readUint16,a.writeInt32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},a.writeInt=a.writeInt32,a.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},a.readInt=a.readInt32,a.writeUint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},a.writeUInt32=a.writeUint32,a.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},a.readUInt32=a.readUint32,t&&(a.writeInt64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,a=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},a.writeLong=a.writeInt64,a.readInt64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!1);return r&&(this.offset+=8),o},a.readLong=a.readInt64,a.writeUint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,a=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},a.writeUInt64=a.writeUint64,a.readUint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!0);return r&&(this.offset+=8),o},a.readUInt64=a.readUint64),a.writeFloat32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,i(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},a.writeFloat=a.writeFloat32,a.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},a.readFloat=a.readFloat32,
a.writeFloat64=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,i(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},a.writeDouble=a.writeFloat64,a.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},a.readDouble=a.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},a.writeVarint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=o.calculateVarint32(t);e+=i;var a=this.buffer.byteLength;for(e>a&&this.resize((a*=2)>e?a:e),e-=i,t>>>=0;t>=128;)n=127&t|128,this.view[e++]=n,t>>>=7;return this.view[e++]=t,r?(this.offset=e,this):i},a.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},a.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!==(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},a.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},a.writeVarint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var i=o.calculateVarint64(e),a=e.toInt()>>>0,s=e.shiftRightUnsigned(28).toInt()>>>0,u=e.shiftRightUnsigned(56).toInt()>>>0;r+=i;var f=this.buffer.byteLength;switch(r>f&&this.resize((f*=2)>r?f:r),r-=i,i){case 10:this.view[r+9]=u>>>7&1;case 9:this.view[r+8]=9!==i?128|u:127&u;case 8:this.view[r+7]=8!==i?s>>>21|128:s>>>21&127;case 7:this.view[r+6]=7!==i?s>>>14|128:s>>>14&127;case 6:this.view[r+5]=6!==i?s>>>7|128:s>>>7&127;case 5:this.view[r+4]=5!==i?128|s:127&s;case 4:this.view[r+3]=4!==i?a>>>21|128:a>>>21&127;case 3:this.view[r+2]=3!==i?a>>>14|128:a>>>14&127;case 2:this.view[r+1]=2!==i?a>>>7|128:a>>>7&127;case 1:this.view[r]=1!==i?128|a:127&a}return n?(this.offset+=i,this):i},a.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},a.readVarint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,a=0,s=0;if(s=this.view[e++],i=127&s,128&s&&(s=this.view[e++],i|=(127&s)<<7,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],i|=(127&s)<<14,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],i|=(127&s)<<21,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],o=127&s,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],o|=(127&s)<<7,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],o|=(127&s)<<14,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],o|=(127&s)<<21,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],a=127&s,(128&s||this.noAssert&&"undefined"==typeof s)&&(s=this.view[e++],a|=(127&s)<<7,128&s||this.noAssert&&"undefined"==typeof s))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},a.readVarint64ZigZag=function(e){var r=this.readVarint64(e);return r&&r.value instanceof t?r.value=o.zigZagDecode64(r.value):r=o.zigZagDecode64(r),r}),a.writeCString=function(t,r){var n="undefined"==typeof r;n&&(r=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i<o;++i)if(0===t.charCodeAt(i))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}o=c.calculateUTF16asUTF8(e(t))[1],r+=o+1;var a=this.buffer.byteLength;return r>a&&this.resize((a*=2)>r?a:r),r-=o+1,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),this.view[r++]=0,n?(this.offset=r,this):o},a.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,i=t,o=-1;return c.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),n=r(),!0),e?(this.offset=t,n()):{string:n(),length:t-i}},a.writeIString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],r+=4+i;var a=this.buffer.byteLength;if(r>a&&this.resize((a*=2)>r?a:r),r-=4+i,this.littleEndian?(this.view[r+3]=i>>>24&255,this.view[r+2]=i>>>16&255,this.view[r+1]=i>>>8&255,this.view[r]=255&i):(this.view[r]=i>>>24&255,this.view[r+1]=i>>>16&255,this.view[r+2]=i>>>8&255,this.view[r+3]=255&i),r+=4,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==o+4+i)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+4+i));return n?(this.offset=r,this):r-o},a.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),i=this.readUTF8String(n,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",a.writeUTF8String=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t))[1],r+=i;var a=this.buffer.byteLength;return r>a&&this.resize((a*=2)>r?a:r),r-=i,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),n?(this.offset=r,this):r-o},a.writeString=a.writeUTF8String,o.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,a.readUTF8String=function(t,e,n){"number"==typeof e&&(n=e,e=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),"undefined"==typeof e&&(e=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var a,s=0,u=n;if(e===o.METRICS_CHARS){if(a=r(),c.decodeUTF8(function(){return s<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++s,c.UTF8toUTF16(t,a)}),s!==t)throw RangeError("Illegal range: Truncated data, "+s+" == "+t);return i?(this.offset=n,a()):{string:a(),length:n-u}}if(e===o.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(c.decodeUTF8toUTF16(function(){return n<f?this.view[n++]:null}.bind(this),a=r(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,a()):{string:a(),length:n-u}}throw TypeError("Unsupported metrics: "+e)},a.readString=a.readUTF8String,a.writeVString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],a=o.calculateVarint32(i),r+=a+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=a+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==s+i+a)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+a));return n?(this.offset=r,this):r-s},a.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),i=this.readUTF8String(n.value,o.METRICS_BYTES,t+=n.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},a.append=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;r+=i;var a=this.buffer.byteLength;return r>a&&this.resize((a*=2)>r?a:r),r-=i,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=i,n&&(this.offset+=i),this},a.appendTo=function(t,e){return t.append(this,e),this},a.assert=function(t){return this.noAssert=!t,this},a.capacity=function(){return this.buffer.byteLength},a.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},a.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},a.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=s,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(r),i=new Uint8Array(n);return i.set(this.view.subarray(t,e)),this.buffer=n,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},a.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new o(0,this.littleEndian,this.noAssert);var r=e-t,n=new o(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,e),n},a.copyTo=function(t,e,r,n){var i,a;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(a="undefined"==typeof e)?t.offset:0|e,r=(i="undefined"==typeof r)?this.offset:0|r,n="undefined"==typeof n?this.limit:0|n,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var s=n-r;return 0===s?t:(t.ensureCapacity(e+s),t.view.set(this.view.subarray(r,n),e),i&&(this.offset+=s),a&&(t.offset+=s),this)},a.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},a.fill=function(t,e,r){var n="undefined"==typeof e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e<r;)this.view[e++]=t;return n&&(this.offset=e),this},a.flip=function(){return this.limit=this.offset,this.offset=0,this},a.mark=function(t){if(t="undefined"==typeof t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},a.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},a.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},a.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},a.prepend=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var a=i-r;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),u=new Uint8Array(s);u.set(this.view.subarray(r,this.buffer.byteLength),i),this.buffer=s,this.view=u,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,r+=a}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),r-i),t.offset=t.limit,n&&(this.offset-=i),this},a.prependTo=function(t,e){return t.prepend(this,e),this},a.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},a.remaining=function(){return this.limit-this.offset},a.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},a.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},a.reverse=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},a.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},a.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},a.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return s;var n=new ArrayBuffer(r-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,r),0),n},a.toArrayBuffer=a.toBuffer,a.toString=function(t,e,r){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,r=e),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var f=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(i|=n>>4&15,r(e[63&(i|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){function n(t){throw Error("Illegal character code: "+t)}for(var i,o,a;null!==(i=t());)if(o=r[i],"undefined"==typeof o&&n(i),null!==(i=t())&&(a=r[i],"undefined"==typeof a&&n(i),e(o<<2>>>0|(48&a)>>4),null!==(i=t()))){if(o=r[i],"undefined"==typeof o){if(61===i)break;n(i)}if(e((15&a)<<4>>>0|(60&o)>>2),null!==(i=t())){if(a=r[i],"undefined"==typeof a){if(61===i)break;n(i)}e((3&o)<<6>>>0|a)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();a.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var n;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),n=r()),n()},o.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new o(t.length/4*3,r),i=0;return f.decode(e(t),function(t){n.view[i++]=t}),n.limit=i,n},o.btoa=function(t){return o.fromBinary(t).toBase64()},o.atob=function(t){return o.fromBase64(t).toBinary()},a.toBinary=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,i=t.length,a=new o(i,e);n<i;){if(r=t.charCodeAt(n),r>255)throw RangeError("illegal char code: "+r);a.view[n++]=r}return a.limit=i,a},a.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",a="";r<n;){if(r!==-1&&(e=this.view[r],i+=e<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16===0&&r!==n){for(;i.length<51;)i+=" ";a+=i+o+"\n",i=o=""}i+=r===this.offset&&r===this.limit?r===this.markedOffset?"!":"|":r===this.offset?r===this.markedOffset?"[":"<":r===this.limit?r===this.markedOffset?"]":">":r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return t?a:i},o.fromDebug=function(t,e,r){for(var n,i,a=t.length,s=new o((a+1)/3|0,e,r),u=0,f=0,c=!1,l=!1,h=!1,p=!1,d=!1;u<a;){switch(n=t.charAt(u++)){case"!":if(!r){if(l||h||p){d=!0;break}l=h=p=!0}s.offset=s.markedOffset=s.limit=f,c=!1;break;case"|":if(!r){if(l||p){d=!0;break}l=p=!0}s.offset=s.limit=f,c=!1;break;case"[":if(!r){if(l||h){d=!0;break}l=h=!0}s.offset=s.markedOffset=f,c=!1;break;case"<":if(!r){if(l){d=!0;break}l=!0}s.offset=f,c=!1;break;case"]":if(!r){if(p||h){d=!0;break}p=h=!0}s.limit=s.markedOffset=f,c=!1;break;case">":if(!r){if(p){d=!0;break}p=!0}s.limit=f,c=!1;break;case"'":if(!r){if(h){d=!0;break}h=!0}s.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!r&&c){d=!0;break}if(i=parseInt(n+t.charAt(u++),16),!r&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[f++]=i,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!r){if(!l||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+a)}return s},a.toHex=function(t,e){if(t="undefined"==typeof t?this.offset:t,e="undefined"==typeof e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t<e;)r=this.view[t++],r<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},o.fromHex=function(t,e,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!==0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,i=t.length,a=new o(i/2|0,e),s=0,u=0;s<i;s+=2){if(n=parseInt(t.substring(s,s+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[u++]=n}return a.limit=u,a};var c=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},t.decodeUTF8=function(t,e){for(var r,n,i,o,a=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0===(128&r))e(r);else if(192===(224&r))null===(n=t())&&a([r,n]),e((31&r)<<6|63&n);else if(224===(240&r))(null===(n=t())||null===(i=t()))&&a([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!==(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(o=t()))&&a([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var r,n=null;;){if(null===(r=null!==n?n:t()))break;r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r)}null!==n&&e(n)},t.UTF8toUTF16=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(r-=65536,e((r>>10)+55296),e(r%1024+56320)),r=null},t.encodeUTF16toUTF8=function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},t.decodeUTF8toUTF16=function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},t.calculateUTF16asUTF8=function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]},t}();return a.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var n;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),n=r())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return n()},o.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new o(c.calculateUTF16asUTF8(e(t),!0)[1],r,n),a=0;return c.encodeUTF16toUTF8(e(t),function(t){i.view[a++]=t}),i.limit=a,i},o})}).call(e,r(67)(t))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,r){var n,i,o;(function(t){!function(a,s){r(217).amd?(i=[],n=s,o="function"==typeof n?n.apply(e,i):n,!(void 0!==o&&(t.exports=o))):"object"==typeof t&&t&&t.exports?t.exports=s():(a.dcodeIO=a.dcodeIO||{}).Long=s()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return(t&&t.__isLong__)===!0}function r(t,e){var r,n,o;return e?(t>>>=0,(o=0<=t&&t<256)&&(n=u[t])?n:(r=i(t,(0|t)<0?-1:0,!0),o&&(u[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=s[t])?n:(r=i(t,t<0?-1:0,!1),o&&(s[t]=r),r))}function n(t,e){if(isNaN(t)||!isFinite(t))return e?g:v;if(e){if(t<0)return g;if(t>=h)return w}else{if(t<=-p)return E;if(t+1>=p)return b}return t<0?n(-t,e).neg():i(t%l|0,t/l|0,e)}function i(e,r,n){return new t(e,r,n)}function o(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return v;if("number"==typeof e?(r=e,e=!1):e=!!e,r=r||10,r<2||36<r)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,r).neg();for(var a=n(f(r,8)),s=v,u=0;u<t.length;u+=8){var c=Math.min(8,t.length-u),l=parseInt(t.substring(u,u+c),r);if(c<8){var h=n(f(r,c));s=s.mul(h).add(n(l))}else s=s.mul(a),s=s.add(n(l))}return s.unsigned=e,s}function a(e){return e instanceof t?e:"number"==typeof e?n(e):"string"==typeof e?o(e):i(e.low,e.high,e.unsigned)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var s={},u={};t.fromInt=r,t.fromNumber=n,t.fromBits=i;var f=Math.pow;t.fromString=o,t.fromValue=a;var c=1<<24,l=4294967296,h=0x10000000000000000,p=h/2,d=r(c),v=r(0);t.ZERO=v;var g=r(0,!0);t.UZERO=g;var y=r(1);t.ONE=y;var _=r(1,!0);t.UONE=_;var m=r(-1);t.NEG_ONE=m;var b=i(-1,2147483647,!1);t.MAX_VALUE=b;var w=i(-1,-1,!0);t.MAX_UNSIGNED_VALUE=w;var E=i(0,-2147483648,!1);t.MIN_VALUE=E;var k=t.prototype;return k.toInt=function(){return this.unsigned?this.low>>>0:this.low},k.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},k.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=n(t),r=this.div(e),i=r.mul(e).sub(this);return r.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=n(f(t,6),this.unsigned),a=this,s="";;){var u=a.div(o),c=a.sub(u.mul(o)).toInt()>>>0,l=c.toString(t);if(a=u,a.isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},k.getHighBits=function(){return this.high},k.getHighBitsUnsigned=function(){return this.high>>>0},k.getLowBits=function(){return this.low},k.getLowBitsUnsigned=function(){return this.low>>>0},k.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},k.isZero=function(){return 0===this.high&&0===this.low},k.isNegative=function(){return!this.unsigned&&this.high<0},k.isPositive=function(){return this.unsigned||this.high>=0},k.isOdd=function(){return 1===(1&this.low)},k.isEven=function(){return 0===(1&this.low)},k.equals=function(t){return e(t)||(t=a(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},k.eq=k.equals,k.notEquals=function(t){return!this.eq(t)},k.neq=k.notEquals,k.lessThan=function(t){return this.comp(t)<0},k.lt=k.lessThan,k.lessThanOrEqual=function(t){return this.comp(t)<=0},k.lte=k.lessThanOrEqual,k.greaterThan=function(t){return this.comp(t)>0},k.gt=k.greaterThan,k.greaterThanOrEqual=function(t){return this.comp(t)>=0},k.gte=k.greaterThanOrEqual,k.compare=function(t){if(e(t)||(t=a(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},k.comp=k.compare,k.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(y)},k.neg=k.negate,k.add=function(t){e(t)||(t=a(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,s=65535&this.low,u=t.high>>>16,f=65535&t.high,c=t.low>>>16,l=65535&t.low,h=0,p=0,d=0,v=0;
return v+=s+l,d+=v>>>16,v&=65535,d+=o+c,p+=d>>>16,d&=65535,p+=n+f,h+=p>>>16,p&=65535,h+=r+u,h&=65535,i(d<<16|v,h<<16|p,this.unsigned)},k.subtract=function(t){return e(t)||(t=a(t)),this.add(t.neg())},k.sub=k.subtract,k.multiply=function(t){if(this.isZero())return v;if(e(t)||(t=a(t)),t.isZero())return v;if(this.eq(E))return t.isOdd()?E:v;if(t.eq(E))return this.isOdd()?E:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return n(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,s=this.low>>>16,u=65535&this.low,f=t.high>>>16,c=65535&t.high,l=t.low>>>16,h=65535&t.low,p=0,g=0,y=0,_=0;return _+=u*h,y+=_>>>16,_&=65535,y+=s*h,g+=y>>>16,y&=65535,y+=u*l,g+=y>>>16,y&=65535,g+=o*h,p+=g>>>16,g&=65535,g+=s*l,p+=g>>>16,g&=65535,g+=u*c,p+=g>>>16,g&=65535,p+=r*h+o*l+s*c+u*f,p&=65535,i(y<<16|_,p<<16|g,this.unsigned)},k.mul=k.multiply,k.divide=function(t){if(e(t)||(t=a(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?g:v;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return _;o=g}else{if(this.eq(E)){if(t.eq(y)||t.eq(m))return E;if(t.eq(E))return y;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(v)?t.isNegative()?y:m:(i=this.sub(t.mul(r)),o=r.add(i.div(t)))}if(t.eq(E))return this.unsigned?g:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(r)/Math.LN2),c=u<=48?1:f(2,u-48),l=n(r),h=l.mul(t);h.isNegative()||h.gt(i);)r-=c,l=n(r,this.unsigned),h=l.mul(t);l.isZero()&&(l=y),o=o.add(l),i=i.sub(h)}return o},k.div=k.divide,k.modulo=function(t){return e(t)||(t=a(t)),this.sub(this.div(t).mul(t))},k.mod=k.modulo,k.not=function(){return i(~this.low,~this.high,this.unsigned)},k.and=function(t){return e(t)||(t=a(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},k.or=function(t){return e(t)||(t=a(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},k.xor=function(t){return e(t)||(t=a(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},k.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):i(0,this.low<<t-32,this.unsigned)},k.shl=k.shiftLeft,k.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},k.shr=k.shiftRight,k.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var r=this.high;if(t<32){var n=this.low;return i(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?i(r,0,this.unsigned):i(r>>>t-32,0,this.unsigned)},k.shru=k.shiftRightUnsigned,k.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},k.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},k.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},k.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},k.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,r(67)(t))},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(145),a=r(203),s=a.getCurveByName("secp256k1");o=r(145);var u=r(201),f=r(212),c=r(136),l=r(149),h=s.G,p=s.n,d=function(){function t(e){n(this,t),this.Q=e}return i(t,[{key:"toBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q.compressed;return this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=a.Point.decodeFrom(s,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=f.sha512(t);return f.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.address_prefix;return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.address_prefix;if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=f.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=u.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.address_prefix,r=this.toBuffer(),n=f.sha512(r),i=f.ripemd160(n),o=f.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+u.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=f.sha256(t),n=f.ripemd160(r);n=e.concat([new e([56]),n]);var i=f.sha256(n);return i=f.sha256(i),n=e.concat([n,i.slice(0,4)]),u.encode(n)}},{key:"child",value:function(r){l(e.isBuffer(r),"Buffer required: offset"),l.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=f.sha256(r);var n=o.fromBuffer(r);if(n.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=h.multiply(n),a=this.Q.add(i);if(s.isInfinity(a))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(a)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(r){return t.fromBuffer(new e(r,"binary"))}},{key:"fromBuffer",value:function(e){return new t(a.Point.decodeFrom(s,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromString",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.address_prefix;try{return t.fromStringOrThrow(e,r)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.address_prefix,i=r.slice(0,n.length);l.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length),r=new e(u.decode(r),"binary");var o=r.slice(-4);r=r.slice(0,-4);var a=f.ripemd160(r);return a=a.slice(0,4),l.deepEqual(o,a,"Checksum did not match"),t.fromBuffer(r)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"fromStringHex",value:function(r){return t.fromString(new e(r,"hex"))}}]),t}();t.exports=d}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(203),a=o.Point,s=o.getCurveByName("secp256k1"),u=r(145),f=r(201),c=r(149),l=r(212),h=r(219),p=(s.G,s.n),d=function(){function t(e){n(this,t),this.d=e}return i(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=l.sha256(t);r=l.sha256(r),r=r.slice(0,4);var n=e.concat([t,r]);return f.encode(n)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){var t;return t=s.G.multiply(this.d)}},{key:"toPublic",value:function(){return this.public_key?this.public_key:this.public_key=h.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){t=v(t);var e=t.toUncompressed().toBuffer(),r=a.fromAffine(s,u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33,65))),n=this.toBuffer(),i=r.multiply(u.fromBuffer(n)),o=i.affineX.toBuffer({size:32});return l.sha512(o)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=l.sha256(r);var n=u.fromBuffer(r);if(n.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(r){if(!e.isBuffer(r))throw new Error("Expecting paramter to be a Buffer type");if(32!==r.length&&console.log("WARN: Expecting 32 bytes, instead got "+r.length+", stack trace:",(new Error).stack),0===r.length)throw new Error("Empty buffer");return new t(u.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(l.sha256(e))}},{key:"isWif",value:function(t){try{return this.fromWif(t),!0}catch(t){return!1}}},{key:"fromWif",value:function(r){var n=new e(f.decode(r)),i=n.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),a=n.slice(-4),s=l.sha256(o);if(s=l.sha256(s),s=s.slice(0,4),a.toString()!==s.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),t.fromBuffer(o)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=d;var v=function(t){return null==t?t:t.Q?t:h.fromStringOrThrow(t)}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(222),a=r(212),s=r(203).getCurveByName("secp256k1"),u=r(149),f=r(145),c=r(219),l=r(220),h=function(){function t(e,r,i){n(this,t),this.r=e,this.s=r,this.i=i,u.equal(null!=this.r,!0,"Missing parameter"),u.equal(null!=this.s,!0,"Missing parameter"),u.equal(null!=this.i,!0,"Missing parameter")}return i(t,[{key:"toBuffer",value:function(){var t;return t=new e(65),t.writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(a.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e=void 0,r=void 0,n=void 0;return r=f.fromBuffer(t),n=this.i,n-=27,n&=3,e=o.recoverPubKey(s,r,this,n),c.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=a.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return u.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),o.verify(s,t,{r:this.r,s:this.s},e.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r,n,i;return u.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),u.equal(r-27,r-27&7,"Invalid signature parameter"),n=f.fromBuffer(e.slice(1,33)),i=f.fromBuffer(e.slice(33)),new t(n,i,r)}},{key:"signBuffer",value:function(e,r){var n=a.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");n=p(n),u(n,"private_key required");var i,a,c,l,h,d,v;for(l=null,v=0,a=f.fromBuffer(r);;){if(c=o.sign(s,r,n.d,v++),i=c.toDER(),h=i[3],d=i[5+h],32===h&&32===d){l=o.calcPubKeyRecoveryParam(s,a,c,n.toPublicKey().Q),l+=4,l+=27;break}v%10===0&&console.log("WARN: "+v+" attempts to find canonical signature")}return new t(c.r,c.s,l)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}}]),t}(),p=function(t){return t?t.d?t:l.fromWif(t):t};t.exports=h}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,r,n,i,o){l("Buffer",r),l(h,n),o&&(r=c.sha256(e.concat([r,new e(o)]))),f.equal(r.length,32,"Hash must be 256 bit");var a=n.toBuffer(32),s=new e(32),u=new e(32);u.fill(1),s.fill(0),s=c.HmacSHA256(e.concat([u,new e([0]),a,r]),s),u=c.HmacSHA256(u,s),s=c.HmacSHA256(e.concat([u,new e([1]),a,r]),s),u=c.HmacSHA256(u,s),u=c.HmacSHA256(u,s);for(var p=h.fromBuffer(u);p.signum()<=0||p.compareTo(t.n)>=0||!i(p);)s=c.HmacSHA256(e.concat([u,new e([0])]),s),u=c.HmacSHA256(u,s),u=c.HmacSHA256(u,s),p=h.fromBuffer(u);return p}function i(t,e,r,i){var o,a,s=h.fromBuffer(e),u=t.n,f=t.G,c=(n(t,e,r,function(e){var n=f.multiply(e);return!t.isInfinity(n)&&(o=n.affineX.mod(u),0!==o.signum()&&(a=e.modInverse(u).multiply(s.add(r.multiply(o))).mod(u),0!==a.signum()))},i),u.shiftRight(1));return a.compareTo(c)>0&&(a=u.subtract(a)),new p(o,a)}function o(t,e,r,n){var i=t.n,o=t.G,a=r.r,s=r.s;if(a.signum()<=0||a.compareTo(i)>=0)return!1;if(s.signum()<=0||s.compareTo(i)>=0)return!1;var u=s.modInverse(i),f=e.multiply(u).mod(i),c=a.multiply(u).mod(i),l=o.multiplyTwo(f,n,c);if(t.isInfinity(l))return!1;var h=l.affineX,p=h.mod(i);return p.equals(a)}function a(t,e,r,n){var i=h.fromBuffer(e);return o(t,i,r,n)}function s(t,e,r,n){f.strictEqual(3&n,n,"Recovery param is more than two bits");var i=t.n,o=t.G,a=r.r,s=r.s;f(a.signum()>0&&a.compareTo(i)<0,"Invalid r value"),f(s.signum()>0&&s.compareTo(i)<0,"Invalid s value");var u=1&n,c=n>>1,l=c?a.add(i):a,h=t.pointFromX(u,l),p=h.multiply(i);f(t.isInfinity(p),"nR is not a valid curve point");var d=e.negate().mod(i),v=a.modInverse(i),g=h.multiplyTwo(s,o,d).multiply(v);return t.validate(g),g}function u(t,e,r,n){for(var i=0;i<4;i++){var o=s(t,e,r,i);if(o.equals(n))return i}throw new Error("Unable to find valid recovery factor")}var f=r(149),c=r(212),l=r(223),h=r(145),p=r(224);t.exports={calcPubKeyRecoveryParam:u,deterministicGenerateK:n,recoverPubKey:s,sign:i,verify:a,verifyRaw:o}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function r(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(e,r(141).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){o(a,t),o(a,e),this.r=t,this.s=e}var i=r(149),o=r(223),a=r(145);n.parseCompact=function(t){i.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;i.equal(e,7&e,"Invalid signature parameter");var r=!!(4&e);e&=3;var o=a.fromBuffer(t.slice(1,33)),s=a.fromBuffer(t.slice(33));return{compressed:r,i:e,signature:new n(o,s)}},n.fromDER=function(t){i.equal(t.readUInt8(0),48,"Not a DER sequence"),i.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);i(e>0,"R length is zero");var r=4+e;i.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var o=t.readUInt8(r+1);i(o>0,"S length is zero");var s=t.slice(4,r),u=t.slice(r+2);r+=2+o,e>1&&0===s.readUInt8(0)&&i(128&s.readUInt8(1),"R value excessively padded"),o>1&&0===u.readUInt8(0)&&i(128&u.readUInt8(1),"S value excessively padded"),i.equal(r,t.length,"Invalid DER encoding");var f=a.fromDERInteger(s),c=a.fromDERInteger(u);return i(f.signum()>=0,"R value is negative"),i(c.signum()>=0,"S value is negative"),new n(f,c)},n.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=e&-129;return i(r>0&&r<4,"Invalid hashType"),{signature:n.fromDER(t.slice(0,-1)),hashType:e}},n.prototype.toCompact=function(t,r){r&&(t+=4),t+=27;var n=new e(65);return n.writeUInt8(t,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},n.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),n=n.concat(t),n.push(2,r.length),n=n.concat(r),n.unshift(48,n.length),new e(n)},n.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=n}).call(e,r(141).Buffer)},function(t,e){"use strict";function r(t){if("string"!=typeof t)throw new Error("string required for brain_key");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")}Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=r},function(t,e,r){(function(e){"use strict";var n=r(220),i=r(212),o=r(214),a=250,s=0,u=0,f=o.randomBuffer(101);t.exports={addEntropy:function(){u++;for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){var l=a.value,h=s++%101,p=f[h]+=l;p>9007199254740991&&(f[h]=0)}}catch(t){i=!0,o=t}finally{try{!n&&c.return&&c.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof t)throw new Error("string required for entropy");if(t.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var r=Date.now();Date.now()-r<a;)t=i.sha256(t);var n=[];return n.push(t),n.push(o.randomBuffer(32)),i.sha256(e.concat(n))},get_random_key:function(t){return n.fromBuffer(this.random32ByteBuffer(t))},browserEntropy:function(){var t=Array(f).join();try{t+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n<navigator.mimeTypes.length;n++)r=navigator.mimeTypes[n],t+=r.description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",u,"events")}catch(e){t+=i.sha256((new Date).toString())}var o=new e(t);return t+=o.toString("binary")+" "+(new Date).toString()}}}).call(e,r(141).Buffer)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){"number"==typeof t?((0,f.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString()),(0,f.default)("string"==typeof t,"number should be an actual number or string: "+("undefined"==typeof t?"undefined":s(t))),t=t.trim(),(0,f.default)(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),n=a(r,2),i=n[0],o=void 0===i?"":i,u=n[1],c=void 0===u?"":u,l=e-c.length;(0,f.default)(l>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var h=0;h<l;h++)c+="0";for(;"0"===o.charAt(0);)o=o.substring(1);return o+c}function o(t,e){for("number"==typeof t?((0,f.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());t.length<e+1;)t="0"+t;var r=t.substring(t.length-e);return t.substring(0,t.length-e)+(r?"."+r:"")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.toImpliedDecimal=i,e.fromImpliedDecimal=o;var u=r(149),f=n(u)},function(t,e,r){"use strict";var n,i,o,a,s,u,f,c,l,h,p,d,v,g,y,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m=r(216).Long,b=r(229),w=9007199254740991,E=-9007199254740991;t.exports=n={is_empty:i=function(t){return null===t||void 0===t},required:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))throw new Error("value required "+e+" "+t);return t},require_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t))throw new Error("Long value required "+e+" "+t);return t},string:function(t){if(i(t))return t;if("string"!=typeof t)throw new Error("string required: "+t);return t},number:function(t){if(i(t))return t;if("number"!=typeof t)throw new Error("number required: "+t);return t},whole_number:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/\./.test(t))throw new Error("whole number required "+e+" "+t);return t},unsigned:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/-/.test(t))throw new Error("unsigned required "+e+" "+t);return t},is_digits:o=function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;n.no_overflow53(t,e);var r=function(){return"number"==typeof t?t:parseInt(t)}();return r},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:m.isLong(t)?t:(n.no_overflow64(t,e),"number"==typeof t&&(t=""+t),m.fromString(t))},to_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if("string"==typeof t)return t;if("number"==typeof t)return n.no_overflow53(t,e),""+t;if(m.isLong(t))return t.toString();throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t},require_test:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;if(!t.test(e))throw new Error("unmatched "+t+" "+r+" "+e);return e},require_match:s=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;var n=e.match(t);if(null===n)throw new Error("unmatched "+t+" "+r+" "+e);return n},require_range:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;a(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=b.object_type[e];if(!o)throw new Error("Unknown object type: "+e+", "+n+", "+r);var a=new RegExp(t+"."+o+".[0-9]+$");if(!a.test(r))throw new Error("Expecting "+e+" in format "+(t+"."+o+".[0-9]+ ")+("instead of "+r+" "+n+" "+r));return r},get_instance:c=function(t,e,r,n){return i(r)?r:(f(t,e,r,n),a(r.split(".")[2]))},require_relative_type:l=function(t,e,r){return f(0,t,e,r),e},get_relative_instance:h=function(t,e,r){return i(e)?e:(f(0,t,e,r),a(e.split(".")[2]))},require_protocol_type:p=function(t,e,r){return f(1,t,e,r),e},get_protocol_instance:d=function(t,e,r){return i(e)?e:(f(1,t,e,r),a(e.split(".")[2]))},get_protocol_type:v=function(t,e){if(i(t))return t;u(t,e);var r=t.split(".");return a(r[1])},get_protocol_type_name:function(t,e){if(i(t))return t;var r=v(t,e);return Object.keys(b.object_type)[r]},require_implementation_type:g=function(t,e,r){return f(2,t,e,r),e},get_implementation_instance:y=function(t,e,r){return i(e)?e:(f(2,t,e,r),a(e.split(".")[2]))},no_overflow53:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof t){if("string"!=typeof t){if(m.isLong(t))return void n.no_overflow53(t.toInt(),e);throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t}parseInt(t);if(t>w||t<E)throw new Error("overflow "+e+" "+t)}else if(t>w||t<E)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t)){if(void 0!==t.t&&void 0!==t.s)return void n.no_overflow64(t.toString(),e);if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t;if(t>w||t<E)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0");var r=m.fromString(t).toString();if(r!==t.trim())throw new Error("overflow "+e+" "+t)}}}}},function(t,e){"use strict";var r;t.exports=r={},r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.operations={vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,pow:14,custom:15,report_over_production:16,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,challenge_authority:22,prove_authority:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,pow2:30,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,custom_binary:35,decline_voting_rights:36,reset_account:37,set_reset_account:38,claim_reward_balance:39,fill_convert_request:40,author_reward:41,curation_reward:42,comment_reward:43,liquidity_reward:44,interest:45,fill_vesting_withdraw:46,fill_order:47,shutdown_witness:48,fill_transfer_from_savings:49,hardfork:50,comment_payout_update:51},r.object_type={null:0,base:1}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(216).Long,a=r(228),s=o.fromNumber(Math.pow(2,48)-1),u=function(){function t(e,r,i){n(this,t),this.space=e,this.type=r,this.instance=i;var o=this.instance.toString(),s=this.space+"."+this.type+"."+o;if(!a.is_digits(o))throw new("Invalid object id "+s)}return i(t,[{key:"toLong",value:function(){return o.fromNumber(this.space).shiftLeft(56).or(o.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=a.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,a.required(e,"object_id"),"object_id");return new t(parseInt(r[1]),parseInt(r[2]),o.fromString(r[3]))}},{key:"fromLong",value:function(e){var r=e.shiftRight(56).toInt(),n=255&e.shiftRight(48).toInt(),i=e.and(s);return new t(r,n,i)}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=u},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),o=r(210),a=function(){function t(){n(this,t)}return i(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(r){var n=r.toBuffer();return void e.append(n.toString("binary"),"binary")}return n=t.fixed_data(e,33),o.PublicKey.fromBuffer(n)}}},{key:"ripemd160",value:function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)}},{key:"time_point_sec",value:function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))}}]),t}();t.exports=a}).call(e,r(141).Buffer)},function(t,e,r){(function(e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),a=r(216),s=r(233),u=e.env.npm_config__graphene_serializer_hex_dump,f=function(){function t(e,r){i(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return o(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var a=this.types[n];try{if(u)if(a.operation_name)console.error(a.operation_name);else{var f=e.offset;a.fromByteBuffer(e);var c=e.offset;e.offset=f;var l=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",l.toHex())}r[n]=a.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"appendByteBuffer",value:function(t,e){var r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r];o.appendByteBuffer(t,e[r])}}catch(t){try{s.throw(this.operation_name+"."+r+" = "+JSON.stringify(e[r]),t)}catch(n){s.throw(this.operation_name+"."+r+" = "+e[r],t)}}}},{key:"fromObject",value:function(t){var e={},r=null;try{for(var r,n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],a=t[r],u=o.fromObject(a);e[r]=u}}catch(t){s.throw(this.operation_name+"."+r,t)}return e}},{key:"toObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var n,i=this.keys,o=0;o<i.length;o++){n=i[o];var f=this.types[n],c=f.toObject("undefined"!=typeof t&&null!==t?t[n]:void 0,e);if(r[n]=c,u){var l=new a(a.DEFAULT_CAPACITY,a.LITTLE_ENDIAN),h="undefined"!=typeof t&&null!==t;if(h){var p=t[n];p&&f.appendByteBuffer(l,p)}l=l.copy(0,l.offset),console.error(this.operation_name+"."+n,l.toHex())}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"compare",value:function(t,e){var r=this.keys[0],i=this.types[r],o=t[r],a=e[r];if(i.compare)return i.compare(o,a);if("number"==typeof o&&"number"==typeof a)return o-a;var s=void 0;n.isBuffer(o)&&n.isBuffer(a)&&(s="hex");var u=o.toString(s),f=a.toString(s);return u>f?1:u<f?-1:0}},{key:"fromHex",value:function(t){var e=a.fromHex(t,a.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=a.fromBinary(t.toString("binary"),a.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){var e=this.toByteBuffer(t);return e.toHex()}},{key:"toByteBuffer",value:function(t){var e=new a(a.DEFAULT_CAPACITY,a.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new n(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();t.exports=f}).call(e,r(4),r(141).Buffer)},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=function(){function t(e,n){r(this,t),this.message=e,("undefined"!=typeof n&&null!==n?n.message:void 0)&&(this.message="cause\t"+n.message+"\t"+this.message);var i="";("undefined"!=typeof n&&null!==n?n.stack:void 0)&&(i="caused by\n\t"+n.stack+"\t"+i),this.stack=this.message+"\n"+i}return n(t,null,[{
key:"throw",value:function(t,e){var r=t;throw("undefined"!=typeof e&&null!==e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),("undefined"!=typeof e&&null!==e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=i},function(t,e,r){(function(n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var o=r(3),a=i(o),s=r(133),u=i(s),f=r(235),c=i(f),l=r(236),h=i(l),p=r(237),d=i(p),v=r(1),g=i(v),y=r(140),_=i(y),m=r(138),b=(0,u.default)("steem:broadcast"),w={};w.send=function(t,e,r){var n=w._prepareTransaction(t).then(function(t){return b("Signing transaction (transaction, transaction.operations)",t,t.operations),a.default.join(t,_.default.signTransaction(t,e))}).spread(function(t,e){return b("Broadcasting transaction (transaction, transaction.operations)",t,t.operations),g.default.broadcastTransactionWithCallbackAsync(function(){},e).then(function(){return e})});n.nodeify(r||c.default)},w._prepareTransaction=function(t){var e=g.default.loginAsync("",""),r=e.then(function(){return g.default.getDynamicGlobalPropertiesAsync()});return r.then(function(e){return Object.assign({ref_block_num:65535&e.head_block_number,ref_block_prefix:new n(e.head_block_id,"hex").readUInt32LE(4),expiration:new Date((e.timestamp||Date.now())+15e3)},t)})},d.default.forEach(function(t){var e=(0,m.camelCase)(t.operation),r=t.params||[],n=r.indexOf("parent_permlink")!==-1&&r.indexOf("parent_permlink")!==-1;w[e+"With"]=function(r,i,o){b('Sending operation "'+e+'" with',{options:i,callback:o});var a={};return t.roles&&t.roles.length&&(a[t.roles[0]]=r),w.send({extensions:[],operations:[[t.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:JSON.stringify(i.json_metadata)}:{},n&&null==i.permlink?{permlink:h.default.commentPermlink(i.parent_author,i.parent_permlink)}:{})]]},a,o)},w[e]=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];b('Parsing operation "'+e+'" with',{args:i});var a=r.reduce(function(t,e,r){return t[e]=i[r],t},{}),s=i[r.length];return w[e+"With"](t,a,s)}}),a.default.promisifyAll(w),e=t.exports=w}).call(e,r(141).Buffer)},function(t,e){function r(){}t.exports=r},function(t,e){"use strict";t.exports={reputation:function(t){if(null==t)return t;t=parseInt(t);var e=String(t),r="-"===e.charAt(0);e=r?e.substring(1):e;var n=e,i=parseInt(n.substring(0,4)),o=Math.log(i)/Math.log(10),a=n.length-1,s=a+(o-parseInt(o));return isNaN(s)&&(s=0),s=Math.max(s-9,0),s*=r?-1:1,s=9*s+25,s=parseInt(s)},vestToSteem:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},commentPermlink:function(t,e){var r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"");return e=e.replace(/(-\d{8}t\d{9}z)/g,""),"re-"+t+"-"+e+"-"+r},amount:function(t,e){return t.toFixed(3)+" "+e}}},function(t,e){t.exports=[{roles:["active"],operation:"account_create",params:["fee","creator","new_account_name","owner","active","posting","memo_key","json_metadata"]},{roles:["owner","active"],operation:"account_update",params:["account","owner","active","posting","memo_key","json_metadata"]},{roles:["posting"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["posting"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["posting"],operation:"challenge_authority",params:["challenger","challenged","require_owner"]},{roles:["owner"],operation:"change_recovery_account",params:["account_to_recover","new_recovery_account","extensions"]},{roles:["posting"],operation:"comment",params:["parent_author","parent_permlink","author","permlink","title","body","json_metadata"]},{roles:["posting"],operation:"comment_options",params:["author","permlink","max_accepted_payout","percent_steem_dollars","allow_votes","allow_curation_rewards","extensions"]},{roles:["posting"],operation:"comment_payout",params:["author","permlink","payout"]},{roles:["posting"],operation:"comment_reward",params:["author","permlink","sbd_payout","vesting_payout"]},{roles:["active"],operation:"convert",params:["owner","requestid","amount"]},{roles:["active"],operation:"curate_reward",params:["curator","reward","comment_author","comment_permlink"]},{roles:["active"],operation:"custom",params:["required_auths","id","data"]},{roles:["posting","active","owner"],operation:"custom_binary",params:["id","data"]},{roles:["posting","active"],operation:"custom_json",params:["required_auths","required_posting_auths","id","json"]},{roles:["posting"],operation:"delete_comment",params:["author","permlink"]},{roles:["active"],operation:"escrow_transfer",params:["from","to","agent","escrow_id","sbd_amount","steem_amount","fee","ratification_deadline","escrow_expiration","json_meta"]},{roles:["active"],operation:"escrow_approve",params:["from","to","agent","who","escrow_id","approve"]},{roles:["active"],operation:"escrow_dispute",params:["from","to","agent","who","escrow_id"]},{roles:["active"],operation:"escrow_release",params:["from","to","agent","who","receiver","escrow_id","sbd_amount","steem_amount"]},{roles:["active"],operation:"feed_publish",params:["publisher","exchange_rate"]},{roles:["active"],operation:"pow2",params:["work","new_owner_key","props"]},{roles:["active"],operation:"fill_convert_request",params:["owner","requestid","amount_in","amount_out"]},{roles:["posting"],operation:"fill_order",params:["current_owner","current_orderid","current_pays","open_owner","open_orderid","open_pays"]},{roles:["active"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["active"],operation:"interest",params:["owner","interest"]},{roles:["active"],operation:"limit_order_cancel",params:["owner","orderid"]},{roles:["active"],operation:"limit_order_create",params:["owner","orderid","amount_to_sell","min_to_receive","fill_or_kill","expiration"]},{roles:["active"],operation:"limit_order_create2",params:["owner","orderid","amount_to_sell","exchange_rate","fill_or_kill","expiration"]},{roles:["active"],operation:"liquidity_reward",params:["owner","payout"]},{roles:["active"],operation:"pow",params:["worker","input","signature","work"]},{roles:["active","owner"],operation:"prove_authority",params:["challenged","require_owner"]},{roles:[],operation:"recover_account",params:["account_to_recover","new_owner_authority","recent_owner_authority","extensions"]},{roles:[],operation:"report_over_production",params:["reporter","first_block","second_block"]},{roles:["active"],operation:"request_account_recovery",params:["recovery_account","account_to_recover","new_owner_authority","extensions"]},{operation:"escrow_approve",roles:["active"],params:["from","to","agent","who","escrow_id","approve"]},{roles:["active"],operation:"set_withdraw_vesting_route",params:["from_account","to_account","percent","auto_vest"]},{roles:["active","owner"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["posting"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["active"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["active"],operation:"witness_update",params:["owner","url","block_signing_key","props","fee"]},{roles:["active"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["posting"],operation:"fill_order",params:["current_owner","current_orderid","current_pays","open_owner","open_orderid","open_pays"]},{roles:["posting"],operation:"fill_transfer_from_savings",params:["from","to","amount","request_id","memo"]},{roles:["posting"],operation:"comment_payout",params:["author","permlink","payout"]},{roles:["active"],operation:"transfer_to_savings",params:["from","to","amount","memo"]},{roles:["active"],operation:"transfer_from_savings",params:["from","request_id","to","amount","memo"]},{roles:["active"],operation:"cancel_transfer_from_savings",params:["from","request_id"]}]}]));
//# sourceMappingURL=steem.min.js.map
//steemconnect
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(n){"use strict";var o=r(1);"undefined"!=typeof window&&(window.steemconnect=o),"undefined"!=typeof n&&(n.steemconnect=o),t=e.exports=o}).call(t,function(){return this}())},function(e,t,r){"use strict";var n=r(2),o=r(4),i=r(9)("steemconnect"),s={baseURL:"https://steemconnect.com",app:"",callbackURL:""};s.init=function(e){e.baseURL&&s.setBaseURL(e.baseURL),e.app&&s.setApp(e.app),e.callbackURL&&s.setCallbackURL(e.callbackURL)},s.setBaseURL=function(e){s.baseURL=e},s.setApp=function(e){s.app=e},s.setCallbackURL=function(e){s.callbackURL=e},s.getLoginURL=function(e){return e?s.baseURL+"/authorize/@"+s.app+"?redirect_url="+e:s.baseURL+"/authorize/@"+s.app+"?redirect_url="+s.callbackURL},s.send=function(e,t,r){var a=s.baseURL+"/api/@"+s.app+"/"+e,c=n(a+"?"+o.stringify(t),{credentials:"include"}).then(function(e){if(i("GET "+e.status+" "+a),e.status>=400){var t=new Error("Steem Connect API call failed with "+e.status);throw t.res=e,t}return e.json()});return r?c.then(function(e){r(null,e)},function(e){r(e)}):c},s.isAuthenticated=function(e){return s.send("verify",{},e)},s.vote=function(e,t,r,n,o){var i={voter:e,author:t,permlink:r,weight:n};return s.send("vote",i,o)},s.follow=function(e,t,r){var n={follower:e,following:t};return s.send("follow",n,r)},s.unfollow=function(e,t,r){var n={unfollower:e,unfollowing:t};return s.send("unfollow",n,r)},s.ignore=function(e,t,r){var n={follower:e,following:t};return s.send("ignore",n,r)},s.reblog=function(e,t,r,n){var o={account:e,author:t,permlink:r};return s.send("reblog",o,n)},s.comment=function(e,t,r,n,o,i,a,c){var u={parentAuthor:e,parentPermlink:t,author:r,permlink:n,title:o,body:i,jsonMetadata:a};return s.send("comment",u,c)},s.deleteComment=function(e,t,r){var n={author:e,permlink:t};return s.send("deleteComment",n,r)},s.post=function(e,t,r,n,o,i){var a={author:e,permlink:t,title:r,body:n,jsonMetadata:o};return s.send("post",a,i)},s.escrowTransfer=function(e,t,r,n,o,i,a,c,u,l){var f={from:e,to:t,amount:r,memo:n,escrow_id:o,agent:i,fee:a,json_meta:c,expiration:u};return s.send("escrowTransfer",f,l)},s.escrowDispute=function(e,t,r,n,o){var i={from:e,to:t,escrow_id:r,who:n};return s.send("escrowDispute",i,o)},s.escrowRelease=function(e,t,r,n,o,i){var a={from:e,to:t,escrow_id:r,who:n,amount:o};return s.send("escrowRelease",a,i)},t=e.exports=s},function(e,t,r){r(3),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),s(t)}function c(e){var t=new FileReader;return t.readAsText(e),s(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(y.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(y.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return c(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function f(e,t){t=t||{};var r=t.body;if(f.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,r||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=l(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function d(e){var t=new o,r=(e.getAllResponseHeaders()||"").trim().split("\n");return r.forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=[r(n)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),n(e)},y.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},u.call(f.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];h.redirect=function(e,t){if(b.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=h,e.fetch=function(e,t){return new Promise(function(r,n){function o(){return"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(e)&&!t?e:new f(e,t);var s=new XMLHttpRequest;s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:d(s),url:o()},t="response"in s?s.response:s.responseText;r(new h(t,e))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&y.blob&&(s.responseType="blob"),i.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,r){"use strict";var n=r(5),o=r(8),i=r(7);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";var n=r(6),o=r(7),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Date.prototype.toISOString,a={delimiter:"&",encode:!0,encoder:n.encode,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,o,i,s,a,c,u,l,f,p){var d=t;if("function"==typeof c)d=c(r,d);else if(d instanceof Date)d=f(d);else if(null===d){if(i)return a?a(r):r;d=""}if("string"==typeof d||"number"==typeof d||"boolean"==typeof d||n.isBuffer(d))return a?[p(a(r))+"="+p(a(d))]:[p(r)+"="+p(String(d))];var h=[];if("undefined"==typeof d)return h;var y;if(Array.isArray(c))y=c;else{var m=Object.keys(d);y=u?m.sort(u):m}for(var b=0;b<y.length;++b){var v=y[b];s&&null===d[v]||(h=Array.isArray(d)?h.concat(e(d[v],o(r,v),o,i,s,a,c,u,l,f,p)):h.concat(e(d[v],r+(l?"."+v:"["+v+"]"),o,i,s,a,c,u,l,f,p)))}return h};e.exports=function(e,t){var r=e,n=t||{},s="undefined"==typeof n.delimiter?a.delimiter:n.delimiter,u="boolean"==typeof n.strictNullHandling?n.strictNullHandling:a.strictNullHandling,l="boolean"==typeof n.skipNulls?n.skipNulls:a.skipNulls,f="boolean"==typeof n.encode?n.encode:a.encode,p=f?"function"==typeof n.encoder?n.encoder:a.encoder:null,d="function"==typeof n.sort?n.sort:null,h="undefined"!=typeof n.allowDots&&n.allowDots,y="function"==typeof n.serializeDate?n.serializeDate:a.serializeDate;if("undefined"==typeof n.format)n.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,n.format))throw new TypeError("Unknown format option provided.");var m,b,v=o.formatters[n.format];if(null!==n.encoder&&void 0!==n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof n.filter?(b=n.filter,r=b("",r)):Array.isArray(n.filter)&&(b=n.filter,m=b);var g=[];if("object"!=typeof r||null===r)return"";var w;w=n.arrayFormat in i?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices";var x=i[w];m||(m=Object.keys(r)),d&&m.sort(d);for(var O=0;O<m.length;++O){var R=m[O];l&&null===r[R]||(g=g.concat(c(r[R],R,x,u,l,p,b,d,h,y,v)))}return g.join(s)}},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];e[n]=!0}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,r){var i=n[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],i,o):e[r]=i,e},i)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(o):i<128?r+=n[i]:i<2048?r+=n[192|i>>6]+n[128|63&i]:i<55296||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},t.compact=function(e,r){if("object"!=typeof e||null===e)return e;var n=r||[],o=n.indexOf(e);if(o!==-1)return n[o];if(n.push(e),Array.isArray(e)){for(var i=[],s=0;s<e.length;++s)e[s]&&"object"==typeof e[s]?i.push(t.compact(e[s],n)):"undefined"!=typeof e[s]&&i.push(e[s]);return i}var a=Object.keys(e);return a.forEach(function(r){e[r]=t.compact(e[r],n)}),e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&"undefined"!=typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";var n=r(6),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},s=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<n.length;++i){var s,a,c=n[i],u=c.indexOf("]=")===-1?c.indexOf("="):c.indexOf("]=")+1;u===-1?(s=t.decoder(c),a=t.strictNullHandling?null:""):(s=t.decoder(c.slice(0,u)),a=t.decoder(c.slice(u+1))),o.call(r,s)?r[s]=[].concat(r[s]).concat(a):r[s]=a}return r},a=function e(t,r,n){if(!t.length)return r;var o,i=t.shift();if("[]"===i)o=[],o=o.concat(e(t,r,n));else{o=n.plainObjects?Object.create(null):{};var s="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,a=parseInt(s,10);!isNaN(a)&&i!==s&&String(a)===s&&a>=0&&n.parseArrays&&a<=n.arrayLimit?(o=[],o[a]=e(t,r,n)):o[s]=e(t,r,n)}return o},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,s=/(\[[^\[\]]*\])/g,c=i.exec(n),u=[];if(c[1]){if(!r.plainObjects&&o.call(Object.prototype,c[1])&&!r.allowPrototypes)return;u.push(c[1])}for(var l=0;null!==(c=s.exec(n))&&l<r.depth;)l+=1,(r.plainObjects||!o.call(Object.prototype,c[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&u.push(c[1]);return c&&u.push("["+n.slice(c.index)+"]"),a(u,t,r)}};e.exports=function(e,t){var r=t||{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:i.delimiter,r.depth="number"==typeof r.depth?r.depth:i.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:i.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.decoder="function"==typeof r.decoder?r.decoder:i.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:i.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:i.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:i.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:i.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:i.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var o="string"==typeof e?s(e,r):e,a=r.plainObjects?Object.create(null):{},u=Object.keys(o),l=0;l<u.length;++l){var f=u[l],p=c(f,o[f],r);a=n.merge(a,p,r)}return n.compact(a)}},function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,n),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function a(){var e;try{e=t.storage.debug}catch(e){}return e}function c(){try{return window.localStorage}catch(e){}}t=e.exports=r(10),t.log=i,t.formatArgs=o,t.save=s,t.load=a,t.useColors=n,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(a())},function(e,t,r){function n(){return t.colors[l++%t.colors.length]}function o(e){function r(){}function o(){var e=o,r=+new Date,i=r-(u||r);e.diff=i,e.prev=u,e.curr=r,u=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;a++;var o=t.formatters[n];if("function"==typeof o){var i=s[a];r=o.call(e,i),s.splice(a,1),a--}return r}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var c=o.log||t.log||console.log.bind(console);c.apply(e,s)}r.enabled=!1,o.enabled=!0;var i=t.enabled(e)?o:r;return i.namespace=e,i}function i(e){t.save(e);for(var r=(e||"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&(e=r[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function a(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=c,t.disable=s,t.enable=i,t.enabled=a,t.humanize=r(11),t.names=[],t.skips=[],t.formatters={};var u,l=0},function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*u;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(e){return e>=u?Math.round(e/u)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return i(e,u,"day")||i(e,c,"hour")||i(e,a,"minute")||i(e,s,"second")||e+" ms"}function i(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,l=365.25*u;e.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t.long?o(e):n(e)}}]);
//# sourceMappingURL=steemconnect.min.js.map
var c = document.getElementById("content");var h = document.getElementById("header");
var md = new Remarkable({html: true,breaks: true,linkify: true,typographer: true});
function loader(handle){ if (handle==undefined) {c.innerHTML='<div class="loader">Loading</div>';} else {handle.innerHTML='<div class="loader">Loading</div>';}}
function loadnext(author,permlink,sort,tag){if (sort!==undefined){document.getElementById('loadmore').onclick=function(e){e.preventDefault();loader();loadpostsbytag(tag,sort,author,permlink);}} else {document.getElementById('loadmore').onclick=function(e){e.preventDefault();loader();loadblogposts(s['steemusername'],20,author,permlink);}}}
function timeSince(a){var b=Math.floor((new Date-a)/1e3),c=Math.floor(b/31536e3);return c>1?c+" years":(c=Math.floor(b/2592e3))>1?c+" months":(c=Math.floor(b/86400))>1?c+" days":(c=Math.floor(b/3600))>1?c+" hours":(c=Math.floor(b/60),c>1?c+" minutes":Math.floor(b)+" seconds")}
function showtags(tags){var taghtml='';taghtml='<i class="fa fa-tags" aria-hidden="true"></i> '; for (var i=0;i<tags.length;i+=1){taghtml+='<a href="'+s['steemsite']+'/'+s['defaultsort']+'/'+tags[i]+'">'+tags[i]+'</a>';if(i!==tags.length-1){taghtml+=' , ';}} return taghtml;}
function tiplink(author,memo,amount,currency) {if (memo==undefined){memo='Thanks for your posts!';}if (amount==undefined){amount=1;}if (currency==undefined){currency='SBD';}return '<span class="tip"><a href="https://busy.org/transfer?to='+author+'&amount='+amount+'¤cy='+currency+'&memo=Thank%20you%20for%20your%20post:%20'+memo+'" class="tip"><i class="fa fa-money" aria-hidden="true"></i> Tip '+author+' for this content</a></span>';}
function loadpost(author,permlink){steem.api.getContent(author, permlink, function(err, result) {var posts=[];document.title=result['title'];result['body']=sanitize(result['body']);posts.push(result);h.innerHTML='';displayposts(posts);});}
function votebutton(author,permlink){return '<i class="fa fa-bullhorn" aria-hidden="true"></i> Vote now! <iframe src="https://steemconnect.com/embed/vote?author='+author+'&permlink='+permlink+'" allowtransparency="true" scrolling="no" class="scvote" width="50" height="20" frameborder="0"></iframe>';}
function socialshare(link,title){return '<div class="share center"><ul class="share-list"><li class="share-item grow"><a class="share-dialog" href="https://www.facebook.com/sharer/sharer.php?u=https://steemit.com/'+link+'" title="Share post on Facebook" target="_blank"><svg class="share-icon share-icon-facebook" version="1.1" viewBox="0 0 512 512"><g><path d="M377,2c0,29.667,0,59.333,0,89c-2.162,0.06-4.323,0.171-6.485,0.173c-16.313,0.015-32.631,0.248-48.938-0.068c-12.828-0.248-26.457,11.102-25.569,25.504c0.859,13.93,0.186,27.954,0.186,41.936c0,12.106,0,12.118,12.264,12.124c20.807,0.01,41.615-0.034,62.422,0.06c2.042,0.009,4.079,0.828,6.119,1.27c0,0.667,0,1.333,0,2c-0.373,1.909-0.873,3.803-1.101,5.73c-2.879,24.288-5.799,48.572-8.484,72.882c-0.419,3.795-2.037,4.477-5.44,4.452c-19.315-0.14-38.633-0.097-57.949-0.056c-9.124,0.019-8.111-1.018-8.113,7.866c-0.02,75.934-0.011,151.868-0.011,227.802c0,6.437,0,12.874,0,19.786c-3.129,0-5.093,0-7.058,0c-30.14,0-60.281-0.011-90.421,0.023c-2.141,0.002-4.282,0.335-6.423,0.515c-0.333,0-0.667,0-1,0c-0.33-1.756-0.935-3.511-0.948-5.269c-0.131-17.308-0.212-34.616-0.217-51.925c-0.021-64.413-0.049-128.826,0.083-193.239c0.009-4.289-0.955-5.762-5.493-5.679c-15.471,0.283-30.949,0.111-46.425,0.112c0-28.667,0-57.333,0-86c14.976-0.034,29.952-0.031,44.927-0.117c6.895-0.04,6.885-0.118,6.901-6.805c0.057-23.97-0.24-47.948,0.283-71.907c0.527-24.116,7.969-45.809,25.44-63.188c15.799-15.715,35.612-24.249,57.23-25.428c34.344-1.872,68.82-1.3,103.241-1.752C376.348,1.798,376.674,1.931,377,2z"></path></g></svg></a></li><li class="share-item grow"><a class="share-dialog" href="https://twitter.com/intent/tweet?text='+encodeURI(title)+'&url=https://steemit.com/'+link+'" title="Share post on Twitter" target="_blank"><svg class="share-icon share-icon-twitter" version="1.1" viewBox="0 0 512 512"><g><path d="M340,49c2.667,0,5.333,0,8,0c4.667,0.846,9.333,0.846,14,0c3,0,6,0,9,0c23.222,1.862,42.354,12.474,59.256,27.789c3.053,2.766,6.414,3.124,10.211,2.183c13.285-3.29,26.104-7.918,38.556-13.546c4.697-2.123,9.451-4.125,14.087-6.394c2.14-1.047,4.734-2.936,6.908-0.821c2.008,1.954,0.191,4.442-0.685,6.489c-7.267,16.988-18.382,31.125-32.251,43.199c-1.341,1.167-3.054,1.946-4.248,4.079c14.715-2.513,28.605-6.36,42.186-11.423c2.553-0.952,5.16-2.73,7.979-0.557c0,0.667,0,1.333,0,2c-3.067,7.786-8.694,13.819-14.35,19.607c-9.882,10.114-19.313,20.754-30.77,29.217c-3.06,2.26-3.507,5.348-3.542,8.837c-0.2,19.831-1.537,39.583-5.088,59.116c-4.943,27.193-13.586,53.224-25.255,78.254c-10.608,22.754-23.611,44.031-39.617,63.412c-40.462,48.997-90.847,82.552-152.724,98.377c-14.049,3.593-28.254,5.875-42.655,7.178c-2.667,0-5.333,0-8,0c-1.54-0.937-3.242-0.485-4.863-0.489c-15.758-0.038-31.516-0.038-47.274,0c-1.621,0.004-3.323-0.448-4.863,0.489c-2,0-4,0-6,0c-13.398-1.11-26.629-3.055-39.712-6.345c-28.632-7.201-55.298-19.022-80.92-33.437c-0.725-0.408-1.453-0.826-2.093-1.354c-1.387-1.146-3.285-2.198-2.487-4.383c0.684-1.871,2.647-1.799,4.288-1.819c9.482-0.12,18.97-0.233,28.447-0.005c12.233,0.295,24.154-1.486,35.935-4.526c28.905-6.141,54.981-18.49,80.055-36.398c-8.944-1.607-16.766-2.814-24.309-5.227c-26.129-8.358-46.449-24.093-60.683-47.577c-2.759-4.552-5.273-9.24-7.249-14.22c-2.839-7.151-1.087-10.115,6.58-8.854c9.405,1.547,18.588-0.8,27.878-0.358c1.268,0.06,2.618-0.071,4.132-0.976c-14.562-4.406-27.657-11.068-39.101-20.75c-23.222-19.647-36.641-44.44-39.049-74.927c-0.795-10.063,0.566-10.877,9.833-6.607c9.763,4.499,20.218,6.632,30.678,8.693c1.114,0.239,2.177,0.715,3.335,0.762c0.063,0.003,0.487,0.553,0.485-0.219c-0.002-0.585-0.125,0.306-0.516-0.263c-24.133-18.634-38.329-42.844-42.083-73.256c-2.61-21.147,1.036-41.09,9.82-60.289c2.677-5.852,4.267-6.071,9.053-1.844c14.476,12.786,27.362,27.251,42.301,39.562c25.88,21.325,54.87,36.981,86.323,48.293c25.068,9.015,50.933,14.285,77.432,16.676c3.417,0.308,5.079-0.312,4.452-4.197c-1.984-12.284-0.882-24.55,0.534-36.794c1.204-10.41,4.819-20.117,9.66-29.262c14.407-27.213,36.388-45.472,65.839-54.69C331.164,50.061,335.693,50.193,340,49z"></path></g></svg></a></li><li class="share-item grow"><a class="share-dialog" href="https://plus.google.com/share?url=https://steemit.com/'+link+'" title="Share post on Google+" target="_blank"><svg class="share-icon share-icon-google" version="1.1" viewBox="0 0 512 512"><g><path d="M316.141,8.264c-8.39,9.015-16.741,18.067-25.188,27.029c-3.729,3.956-8.417,5.764-13.892,5.718c-8.933-0.076-17.867-0.021-26.8-0.021c-0.139,0.423-0.277,0.847-0.416,1.27c1.944,1.621,3.879,3.254,5.834,4.862c16.414,13.501,25.413,31.313,29.857,51.696c5.371,24.636,3.428,48.326-9.758,70.395c-6.843,11.453-16.793,20.195-26.187,29.388c-7.143,6.99-14.805,13.466-21.732,20.656c-14.526,15.076-14.326,30.926,0.105,46.22c12.305,13.041,27.197,22.994,40.933,34.326c14.581,12.028,28.314,24.857,38.239,41.188c20.359,33.5,21.554,88.728-19.606,125.687c-21.927,19.689-47.788,30.225-75.972,36.268c-8.939,1.917-17.978,3.385-27.12,4.05c-0.704,0.051-1.285,0.202-1.439,1.005c-0.667,0-1.333,0-2,0c-0.597-0.657-1.395-0.478-2.141-0.516c-0.575,0.001-1.149,0.001-1.723,0c-0.744,0.037-1.54-0.139-2.135,0.516c-1.333,0-2.667,0-4,0c-8.667-0.85-17.333-0.85-26,0c-2,0-4,0-6,0c-1-0.75-2-0.75-3,0c-1.667,0-3.333,0-5,0c-10.489-1.427-21.031-2.349-31.397-4.771c-25.084-5.86-48.676-14.913-68.752-31.526C17.495,460.653,7.565,447.16,2.804,430.197C1.767,426.503,2.292,422.617,1,419c0-1.667,0-3.333,0-5c1.17-4.739,0.204-9.556,0.516-14.322c0.112-26.778,12.625-47.41,32.245-64.359c18.528-16.005,40.708-24.393,64.189-29.733c21.82-4.962,43.988-7.275,66.34-7.916c0.808-0.023,1.658,0.116,2.376-0.514c0.143-1.37-0.986-2.034-1.717-2.861c-13.583-15.373-16.337-32.966-10.785-52.28c2.014-7.007,2.028-7.153-4.973-7.925c-17.766-1.958-35.399-4.524-51.931-11.784c-38.449-16.884-58.933-46.819-63.617-88.105c-2.673-23.56,1.759-45.826,13.137-66.535C60.8,42.15,82.393,25.385,109.414,15.343c14.126-5.25,28.695-8.561,43.853-8.826c1.685,0,3.367-0.002,5.052,0c2.662,0,5.321-0.003,7.982,0c4.937,0,9.871-0.003,14.807,0c6.34,0.001,12.678-0.002,19.018,0c12.947,0.001,25.892-0.002,38.838,0c13.343,0.001,26.686-0.002,40.029,0c10.965,0,21.931-0.062,32.894,0.074C313.321,6.607,315.765,5.144,316.141,8.264z"></path><path d="M158.983,479.194c-24.73,1.905-49.193-4.98-70.45-21.368c-19.187-14.792-31.413-33.953-31.41-59.055c0.002-18.817,8.003-34.474,21.175-47.511c25.925-25.659,57.921-34.747,93.5-33.55c25.303,0.851,48.488,7.918,68.345,24.205c25.716,21.092,35.615,51.936,25.747,81.684c-7.814,23.554-25.312,37.51-47.597,46.519C199.892,477.557,180.691,479.657,158.983,479.194z"></path><path d="M230.028,143.295c0.175,11.26-1.451,22.256-5.565,32.745c-10.499,26.77-35.532,39.418-63.92,32.444c-21.217-5.212-37.572-17.624-49.917-35.176C91.59,146.245,85.358,116.069,91.21,83.595c2.921-16.205,10.655-30.164,23.334-40.83c17.682-14.874,41.749-15.79,63.366-3.052c16.024,9.442,27.109,23.398,35.877,39.386C223.711,97.19,229.99,122.534,230.028,143.295z"></path><path d="M513,115c-20.992,0.08-41.984,0.274-62.974,0.143c-4.107-0.026-5.324,1.021-5.276,5.208c0.222,19.33-0.067,38.665,0.218,57.993c0.068,4.612-1.308,5.579-5.622,5.293c-7.972-0.53-15.986-0.63-23.979-0.54c-3.611,0.04-4.842-0.854-4.838-4.721c0.02-19.494-0.399-38.987-0.397-58.481c0-3.727-0.935-4.785-4.723-4.746c-19.33,0.198-38.664,0.012-57.995,0.166c-3.417,0.027-4.629-0.795-4.52-4.392c0.258-8.492,0.268-17.002-0.001-25.493c-0.121-3.827,0.808-5.109,4.903-5.059c19.163,0.234,38.331,0.002,57.494,0.193c3.701,0.037,4.797-0.85,4.756-4.669c-0.204-19.33-0.014-38.664-0.17-57.995c-0.028-3.434,0.832-4.621,4.407-4.522c8.826,0.244,17.666,0.214,26.495,0.011c3.359-0.077,4.165,1.081,4.14,4.31c-0.146,19.164,0.04,38.331-0.163,57.495c-0.042,3.978,0.753,5.391,5.088,5.392c20.656,0.004,41.312,0.395,61.968,0.649c1.361,1.759,0.374,3.795,0.672,5.679c0,1.673,0.002,3.347,0,5.019c0,1.92,0.001,3.84,0,5.759c0.264,2.094-0.573,4.279,0.516,6.307C513,107.667,513,111.333,513,115z"></path></g></svg></a></li><li class="share-item grow"><a class="share-dialog" href="https://www.linkedin.com/shareArticle?mini=true&amp;url='+link+'&amp;title='+encodeURI(title)+'" title="Share post on LinkedIn" target="_blank"><svg class="share-icon share-icon-linkedin" version="1.1" viewBox="0 0 512 512"><g><path d="M69,12c2.872,1.877,6.278,1.212,9.405,1.851c27.815,5.69,46.267,28.103,45.974,56.221c-0.29,27.835-18.973,49.97-46.828,54.862c-20.365,3.577-39.757,1.427-56.524-12.087c-10.497-8.46-16.61-19.588-19.034-32.792C1.847,79.263,1.99,78.369,1,78c0-5.667,0-11.333,0-17c0.697-8.772,3.368-16.828,8.494-24.055c10.573-14.908,24.87-23.18,43.157-24.426C53.464,12.464,54.324,12.659,55,12c1.667,0,3.333,0,5,0c2.333,0.824,4.667,0.824,7,0C67.667,12,68.333,12,69,12z"></path><path d="M116.934,500.961c-36.338,0.025-72.676,0.05-109.015,0.075c-0.127-1.646-0.364-3.292-0.364-4.938C7.538,389.791,7.567,283.485,7.444,177.178c-0.005-4.438,0.916-5.87,5.656-5.838c33.157,0.226,66.316,0.157,99.474,0.06c3.162-0.009,4.664,0.304,4.66,4.163c-0.113,107.806-0.091,215.612-0.1,323.418C117.134,499.642,117.004,500.301,116.934,500.961z"></path><path d="M178.14,500.937c0.023-37.64-0.101-75.281,0.1-112.921c0.376-70.29,0.545-140.58-0.325-210.867c-0.053-4.297,0.678-5.856,5.506-5.82c32.978,0.249,65.96,0.243,98.939,0.006c4.795-0.034,5.7,1.477,5.608,5.854c-0.274,13.099-0.099,26.208-0.099,40.669c6.508-9.462,12.775-17.472,20.131-24.581c17.102-16.528,37.588-25.661,61.102-28.34c22.106-2.519,43.74-0.802,64.787,6.832c26.304,9.541,45.83,26.89,59.286,51.239c11.436,20.695,16.545,43.203,18.829,66.507c0.115,1.177-0.729,2.731,0.995,3.482c0,2,0,4,0,6c-0.63,0.667-0.63,1.333,0,2c0,66.667,0,133.333,0,200c-1.56,0.884-3.262,0.462-4.894,0.464c-32.951,0.027-65.903,0.022-98.854,0.019c-6.387,0-6.637-0.178-6.643-6.789c-0.042-43.602,0.026-87.205-0.046-130.807c-0.021-12.473,0.423-24.951-0.312-37.404c-0.818-9.086-0.786-18.244-2.665-27.271c-1.847-8.875-4.294-17.469-9.087-25.227c-8.417-13.627-20.777-20.464-36.67-21.751c-16.604-1.345-31.337,2.65-43.829,13.896c-12.566,11.313-19.842,25.255-20.644,42.318c-0.14,2.99,0.069,6-0.589,8.967c-0.596,2.476-0.341,4.984-0.342,7.47c-0.017,55.409-0.012,110.817-0.014,166.226c0,1.83-0.038,3.661-0.029,5.49c0.016,3.415-1.179,4.982-5.045,4.966c-34.11-0.142-68.22-0.08-102.331-0.089C180.025,501.478,178.993,501.659,178.14,500.937z"></path></g></svg></a></li><li class="share-item only-mobile grow"><a class="share-dialog" href="whatsapp://send?text='+encodeURI(title)+' https://steemit.com/'+link+'" title="Share post on Whatsapp" target="_blank"><svg class="share-icon share-icon-whatsapp" version="1.1" viewBox="0 0 512 512"><g><path d="M256,1c2.667,0,5.333,0,8,0c2,0.812,4,0.812,6,0c2,0,4,0,6,0c1,0.748,2,0.748,3,0c0.667,0,1.333,0,2,0c10.692,1.216,21.453,1.516,32.063,3.808c44.622,9.639,83.973,29.397,118.129,59.784c29.6,26.333,51.218,58.118,65.906,94.687c7.158,17.821,12.273,36.296,14.614,55.439c0.661,5.406,0.307,10.898,1.287,16.283c0,2.667,0,5.333,0,8c-0.812,2-0.812,4,0,6c0,3.667,0,7.333,0,11c-0.812,2-0.812,4,0,6c0,3,0,6,0,9c-1.422,9.497-1.509,19.118-3.467,28.599c-8.318,40.268-25.18,76.457-51.225,108.254c-31.297,38.209-70.427,65.258-117.344,80.745c-20.15,6.652-40.874,10.522-62.141,11.976c-45.284,3.096-88.198-5.62-128.853-25.303c-7.19-3.481-13.082-4.11-20.637-1.633c-24.533,8.043-49.178,15.762-73.802,23.534c-14.615,4.613-29.188,9.362-43.837,13.866C8.265,512.091,4.704,513.266,1,512c0-0.333,0-0.667,0-1c11.836-40.078,26.325-79.272,39.622-118.864c0.212-0.631,0.367-1.295,0.665-1.883c3.648-7.208,2.295-13.418-1.683-20.535c-16.111-28.822-25.667-59.844-29.153-92.751c-5.002-47.219,2.803-92.203,23.336-134.939c11.328-23.577,26.207-44.695,44.272-63.72c32.369-34.089,71.307-56.984,116.361-69.718c14.601-4.127,29.467-6.954,44.73-7.078C239.818,1.507,240.474,1.5,241,1c3,0,6,0,9,0C252,1.812,254,1.812,256,1z"></path><path d="M64.255,451.143c4.926-14.547,9.591-28.294,14.237-42.048c3.548-10.504,6.887-21.083,10.714-31.484c1.205-3.275,0.686-5.521-1.191-8.186c-14.663-20.823-25.326-43.563-31.24-68.331c-13.074-54.756-6.209-106.79,22.261-155.644c19.654-33.726,46.867-59.813,80.93-78.644c25.254-13.961,52.334-22.303,81.171-24.971c42.343-3.917,82.409,3.727,119.897,23.714c32.469,17.31,58.736,41.577,78.784,72.536c16.11,24.877,26.553,51.949,30.787,81.208c6.891,47.613-1.319,92.548-25.333,134.431c-16.169,28.2-37.746,51.48-64.571,69.689c-25.271,17.154-52.997,28.701-83.28,33.576c-53.151,8.556-102.716-1.162-148.516-29.573c-2.48-1.538-4.622-1.699-7.43-0.795C116.112,434.786,90.692,442.775,64.255,451.143z"></path><path d="M389.224,314.597c-0.499,29.044-17.91,43.708-45.126,51.36c-12.34,3.47-24.32,1.874-36.248-1.895c-22.27-7.036-44.505-14.173-64.575-26.532c-30.13-18.554-53.808-43.758-74.301-72.25c-10.292-14.309-19.953-28.894-25.721-45.793c-9.621-28.188-1.794-59.479,19.622-77.308c4.706-3.917,9.96-5.786,16.059-5.457c3.16,0.171,6.368,0.553,9.484,0.207c6.685-0.741,10.818,2.338,13.282,8.145c6.983,16.458,13.969,32.916,20.788,49.442c2.322,5.628-0.696,10.374-3.523,14.885c-3.639,5.807-8.416,10.749-13.032,15.756c-3.622,3.929-3.973,7.829-1.335,12.186c16.707,27.598,38.381,50.033,67.52,64.632c5.326,2.668,10.763,5.13,16.233,7.49c6.926,2.988,9.569,2.354,14.333-3.366c5.751-6.904,11.443-13.861,17.052-20.881c5.157-6.455,7.479-7.395,14.899-4.253c16.93,7.171,33.358,15.427,49.856,23.529C389.627,307.02,389.436,311.425,389.224,314.597z"></path></g></svg></a></li></ul></div>';}
function postpreview(post) {var txt=post.replace(/ +/g,' ');var max_words=15;var words = 0;var preview='';for (let i = 0;i<txt.length; i++) {var char = txt.charAt(i);if (char === '.') break;if (char === ' ' || char === '\n') {words++;if(words>max_words)break;if (i>30) break;};preview += char;}return preview;}
function readtime(a){var b=270,c=b/60,d=a.trim().split(/\s+/g).length,e=d/c,f=Math.round(e/60);Math.round(e-60*f);return f<1?"Less than a minute read":f+" min read"}
function displayheadertag(tag,sort){h.innerHTML = '<div class="profile clearfix"><h1><i class="fa fa-tag" aria-hidden="true"></i> '+tag+'</h1></div><div class="headerinfo"><span class="about">Viewing posts tagged "'+tag+'"</span></div>';document.title = 'Posts tagged '+tag;}
function loadcomments(parent,permlink,nest){if (nest==false) {loader('commentblock-'+parent+'/'+permlink);}steem.api.getContentReplies(parent, permlink, function(err, result) {var handle = 'commentblock-'+parent+'/'+permlink;if (nest==true) { handle='commentnest-'+parent+'/'+permlink; }displaycomments(result,handle,nest);});}
function sanitize(str){
var yturl= /(?:<a href\=\":?)?(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?([\w\-]{10,12})(?:&feature=related)?(?:[\w\-]{0}:?)?(?:">:?)?(?:\<\/a\>:?)?/g;
var ytplayer= '\n<iframe width="640" height="360" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>\n';
var imgregex=/([a-z\-_0-9\/\:\.]*\.(jpg|jpeg|png|gif)(?!["\)]))/i
var imgregexreplace = '\!\[\]($1)';
str=str.replace(yturl, ytplayer);
str=str.replace(imgregex,imgregexreplace);
str=md.render(str);
return str;
}
function displayheaderprofile(profile,steemusername){
if (profile['name']==undefined){profile['name']=steemusername;}
if (profile['cover_image']!==undefined){h.style.backgroundImage = "url('"+profile['cover_image']+"')";}
if (profile['profile_image']==undefined){profile['profile_image']="https://steemitimages.com/DQmSjRRVNtX9WC3Eqcscrzq1xUQj8TLcUiT5MsWvRNstiA8/image.png";}
var headerhtml = '<img src="'+profile['profile_image']+'" id="profilepicture"><br /><div class="profile"><h1>'+profile['name']+'</h1></div><div class="clearfix"></div>';
if (profile['about']!==undefined){headerhtml+='<div id="headerinfo"><span class="about">'+profile['about']+'</span></div>';}
h.innerHTML = headerhtml;
document.title = 'Recent posts by '+profile['name'];
}
function displayposts(posts,sort,tag){
var postcontent='';
for (var i = 0; i < posts.length; i += 1) {
posts[i]['body']=sanitize(posts[i]['body']);
var timesincepost=new Date(posts[i]['last_update']);
var jsonmeta=JSON.parse(posts[i]['json_metadata']);
postcontent += '<div class="postblock"><div class="postheader"><h3><a href="'+s['steemsite']+'/@'+posts[i]['author']+'/'+posts[i]['permlink']+'">'+posts[i]['title']+'</a></h3>';
postcontent += '<a href="'+s['steemsite']+'/@'+posts[i]['author']+'"><img src="https://img.steemconnect.com/@'+posts[i]['author']+'?size=50" class="avatar2"> '+posts[i]['author']+'</a> wrote '+timeSince(timesincepost)+' ago <i class="fa fa-clock-o" aria-hidden="true"></i> '+readtime(posts[i]['body'])+'</div>';
postcontent += '<div class="post" id="'+posts[i]['author']+'/'+posts[i]['permlink']+'">'+posts[i]['body']+'</div><hr>'+socialshare('@'+posts[i]['author']+'/'+posts[i]['permlink'],posts[i]['title']);
postcontent += '<div class="postfooter">'+votebutton(posts[i]['author'],posts[i]['permlink'])+' '+showtags(jsonmeta['tags'])+'<br />'+tiplink(posts[i]['author'],posts[i]['title'])+'</div>';
postcontent += '<div class="center" id="commentblock-'+posts[i]['author']+'/'+posts[i]['permlink']+'"><button class="button grow" id="loadcomments" onClick="loadcomments(\''+posts[i]['author']+'\',\''+posts[i]['permlink']+'\',false);"><i class="fa fa-comments" aria-hidden="true"></i> View '+posts[i]['children']+' comments</button></div></div>';
if (i==posts.length-1){author=posts[i]['author'];permlink=posts[i]['permlink'];
if(posts.length>0){
postcontent+='\n<div class="center"><button class="button grow" id="loadmore"><i class="fa fa-refresh" aria-hidden="true"></i> Load More Posts</button></div>';
} else { postcontent+='\n<div class="center"><a href="/"><button class="button grow">Return to home page</button></a></div>';}
c.innerHTML=postcontent;
if(posts.length>0){loadnext(posts[i]['author'],posts[i]['permlink'],sort,tag);}
}
}
}
function loadblogposts(username,limit,start_author,start_permlink){
var posts= [];var post=[];
if (start_permlink==undefined){
steem.api.getState('/@'+username, function(err, result) {
if (err){console.log(err);}
if (result['accounts'][username]['json_metadata']==''){var profile=[];displayheaderprofile(profile,username);}else{var json=JSON.parse(result['accounts'][username]['json_metadata']);displayheaderprofile(json['profile'],username);}
var sortindex=result['accounts'][username]['blog'];
for (var i = 0; i < sortindex.length; i += 1) {
var handle = sortindex[i].split('/');
var postauthor = handle[0];var postpermlink = handle[1];
if (postauthor!=username) {var postlink='@'+postauthor+'/'+postpermlink;} else {var postlink=postpermlink;}
post=result['content'][postauthor+'/'+postpermlink];
if (s['steemusername']!==post['author']&&s['showresteems']==false) {} else {posts.push(post);}
}
if (posts.length==0){loadblogposts(username,20,post['author'],post['permlink']);console.log("loading next 20 posts");} else {loader();displayposts(posts);}
});
} else {
var query={tag: username,limit:limit,start_author: start_author,start_permlink:start_permlink};
steem.api.getDiscussionsByBlog(query, function(err, result) {
for (var i=0;i<result.length;i+=1){post=result[i];if (s['steemusername']!==post['author']&&s['showresteems']==false) {} else {posts.push(post);}}
if (posts.length==0){loadblogposts(username,20,post['author'],post['permlink']);console.log("loading next 20 posts");} else {loader();displayposts(posts);loadnext(result[result.length-1]['author'],result[result.length-1]['permlink']);}
});
}
}
function loadpostsbytag(tag,sort,start_author,start_permlink){
var posts=[];var post=[];
displayheadertag(tag);
if (sort==undefined){sort=s['defaultsort']}
if (start_permlink==undefined){
steem.api.getState('/'+sort+'/'+tag, function(err, result) {
var sortindex=result['discussion_idx'][tag][sort];
for (var i=0;i<sortindex.length;i+=1){
var handle = sortindex[i].split('/');
var postauthor=handle[0];var postpermlink=handle[1];
post=result['content'][postauthor+'/'+postpermlink];
if (post==''){console.log('no post');}else{posts.push(post);}
} displayposts(posts,sort,tag);});
} else {
var query={tag: tag,limit:10,start_author: start_author,start_permlink:start_permlink};
if (sort=='created'){steem.api.getDiscussionsByCreated(query, function(err, result) {displayposts(result);});}
if (sort=='trending'){steem.api.getDiscussionsByTrending(query, function(err, result) {displayposts(result);});}
if (sort=='active'){steem.api.getDiscussionsByActive(query, function(err, result) {displayposts(result);});}
if (sort=='cashout'){steem.api.getDiscussionsByCashout(query, function(err, result) {displayposts(result);});}
if (sort=='payout'){steem.api.getDiscussionsByPayout(query, function(err, result) {displayposts(result);});}
if (sort=='votes'){steem.api.getDiscussionsByVotes(query, function(err, result) {displayposts(result);});}
if (sort=='comments'){steem.api.getDiscussionsByChildren(query, function(err, result) {displayposts(result);});}
if (sort=='feed'){steem.api.getDiscussionsByFeed(query, function(err, result) {displayposts(result);});}
if (sort=='blog'){steem.api.getDiscussionsByBlog(query, function(err, result) {displayposts(result);});}
}
}
function displaycomments(comments,handle,nest){
if (nest==true){var commentsdiv='';} else {var commentsdiv='<div class="comments"><h4 class="center"><i class="fa fa-comments" aria-hidden="true"></i> Comments</h4>';}
for (var i = 0; i < comments.length; i += 1) {
var timesincecomment=new Date(comments[i]['last_update']);
commentsdiv+='<div class="comment" id="comment-'+comments[i]['author']+'/'+comments[i]['permlink']+'">';
commentsdiv+='<span class="commentauthor"><a href="/@'+comments[i]['author']+'"><img src="https://img.steemconnect.com/@'+comments[i]['author']+'?size=50" class="avatar">'+comments[i]['author']+'</a> replied '+timeSince(timesincecomment)+' ago <a href="'+s['steemsite']+'/@'+comments[i]['author']+'/'+comments[i]['permlink']+'"><i class="fa fa-link" aria-hidden="true"></i></a></span>';
commentsdiv+='<span class="commentbody">'+sanitize(comments[i]['body'])+'</span>';
if (comments[i]['children']>0) {commentsdiv+='<div class="commentnest" id="commentnest-'+comments[i]['author']+'/'+comments[i]['permlink']+'"></div>';document.getElementById(handle).innerHTML+=commentsdiv;loadcomments(comments[i]['author'],comments[i]['permlink'],true);}
commentsdiv+='</div>';
}
if (nest==false){commentsdiv+='</div>';}
document.getElementById(handle).innerHTML=commentsdiv;
}
function route(redirect){
loader();
if (redirect && redirect != location.href) {
history.replaceState(null, null, redirect);
var link = redirect.split('/');var path=[];
if (link.length==5){path[0]=link[3];path[1]=link[4];}
else {path[0]=link[1];path[1]=link[2];}
if (path[0]=='created'||path[0]=='hot'||path[0]=='trending'||path[0]=='trending30'||path[0]=='cashout'||path[0]=='promoted'){
if(path[1]==undefined){var tag='';}else{var tag=path[1];}
var sort=path[0];loadpostsbytag(tag,sort);
}
if (path[0].startsWith('@')) { var postauthor=path[0].replace("@","");s['steemusername']=postauthor;var permlink=path[1]; }
else { var postauthor=s['steemusername'];var permlink=path[1]; }
if (path[1]==undefined){loadblogposts(postauthor,10);} else {loadpost(postauthor,permlink);}
} else {loadblogposts(s['steemusername'],10);}
}
document.body.addEventListener('click', function(event) {var tag = event.target;if (tag.tagName == 'A' && tag.href && event.button == 0) {if (tag.origin == document.location.origin) {var oldPath = document.location.pathname;var newPath = tag.pathname;event.preventDefault();route(newPath);history.pushState(null, '', newPath);}}});
window.onpopstate = function(event) {route(document.location.pathname);event.preventDefault();};
var redirect = sessionStorage.redirect;
delete sessionStorage.redirect;
//redirect='/created/pizzagate';
route(redirect);
</script></html>