@steemit/steem-js 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -192
- package/dist/api/index.d.ts +8 -0
- package/dist/api/signature-verification.d.ts +90 -0
- package/dist/index.browser.js +56377 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.cjs +1736 -6593
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1736 -6586
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2623 -2399
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/polyfills/async-hooks-browser.d.ts +6 -0
- package/dist/polyfills/secure-random-browser.d.ts +8 -0
- package/package.json +8 -2
package/dist/index.umd.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"undefined"!=typeof globalThis&&(void 0===globalThis.process&&(globalThis.process={browser:!0,env:{},version:"",versions:{},nextTick:function(t){setTimeout(t,0)},exit:function(){},cwd:function(){return"/"},platform:"browser"}),void 0===globalThis.Buffer&&(globalThis.Buffer={from:function(t,e){if("string"==typeof t){if("hex"===e){const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)e[r/2]=parseInt(t.substr(r,2),16);return e}if("binary"===e){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=255&t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}return new Uint8Array(t)},alloc:function(t,e){const r=new Uint8Array(t);return void 0!==e&&r.fill(e),r},concat:function(t){const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r},isBuffer:function(t){return t instanceof Uint8Array}},Uint8Array.prototype.toString||(Uint8Array.prototype.toString=function(t){return"hex"===t?Array.from(this).map((t=>t.toString(16).padStart(2,"0"))).join(""):"binary"===t?Array.from(this).map((t=>String.fromCharCode(t))).join(""):(new TextDecoder).decode(this)}),Uint8Array.prototype.readUInt8||(Uint8Array.prototype.readUInt8=function(t){return this[t]}),Uint8Array.prototype.writeUInt8||(Uint8Array.prototype.writeUInt8=function(t,e){this[e]=255&t}),Uint8Array.prototype.readUInt32LE||(Uint8Array.prototype.readUInt32LE=function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24)>>>0}),Uint8Array.prototype.slice||(Uint8Array.prototype.slice=function(t,e){return new Uint8Array(Array.prototype.slice.call(this,t,e))}))),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).steem=e()}(this,(function(){"use strict";function t(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(r){if("default"!==r&&!(r in t)){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}))})),Object.freeze(t)}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}var i,o={exports:{}},a="object"==typeof Reflect?Reflect:null,s=a&&"function"==typeof a.apply?a.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var f=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}o.exports=u,o.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}v(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&v(t,"error",e,r)}(t,i,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function d(t,e,r,n){var i,o,a,s;if(h(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function g(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):m(i,i.length)}function y(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function v(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||f(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||f(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return l(this)},u.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var f=i[t];if(void 0===f)return!1;if("function"==typeof f)s(f,this,e);else{var u=f.length,c=m(f,u);for(r=0;r<u;++r)s(c[r],this,e)}return!0},u.prototype.addListener=function(t,e){return d(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return d(this,t,e,!0)},u.prototype.once=function(t,e){return h(e),this.on(t,b(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return h(e),this.prependListener(t,b(this,t,e)),this},u.prototype.removeListener=function(t,e){var r,n,i,o,a;if(h(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},u.prototype.listeners=function(t){return g(this,t,!0)},u.prototype.rawListeners=function(t){return g(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},u.prototype.listenerCount=y,u.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};var _=o.exports,w={exports:{}};!function(t){t.exports=function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var f="function"==typeof _dereq_&&_dereq_;if(!s&&f)return f(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,(function(t){var r=e[a][1][t];return i(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){e.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},{}],2:[function(t,e,r){var n;try{throw new Error}catch(t){n=t}var i=t("./schedule"),o=t("./queue");function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function s(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function f(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function u(t){this._normalQueue._pushOne(t),this._queueTick()}function c(t){for(;t.length()>0;)h(t)}function h(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},a.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")}},a.prototype.invokeLater=s,a.prototype.invoke=f,a.prototype.settlePromises=u,a.prototype._drainQueues=function(){c(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,c(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},e.exports=a,e.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(t,e,r){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){50397184&this._bitField||this._resolveCallback(e.target)},f=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 u=r(o),c=new t(e);c._propagateFrom(this,1);var h=this._target();if(c._setBoundTo(u),u instanceof t){var l={promiseRejectionQueued:!1,promise:c,target:h,bindingPromise:u};h._then(e,a,void 0,c,l),u._then(s,f,void 0,c,l),c._setOnCancel(u)}else c._resolveCallback(h);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return!(2097152&~this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(t){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=t("./promise")();o.noConflict=i,e.exports=o},{"./promise":22}],5:[function(t,e,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var r,n=t("./util"),i=n.canEvaluate;function o(t,r){var i;if(null!=t&&(i=t[r]),"function"!=typeof i){var o="Object "+n.classString(t)+" has no method '"+n.toString(r)+"'";throw new e.TypeError(o)}return i}function a(t){return o(t,this.pop()).apply(t,this)}function s(t){return t[this]}function f(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}n.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(a,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=f;else if(i){var n=r(t);e=null!==n?n:s}else e=s;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,f=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(),f.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),f.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),f.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){e.exports=function(e){var r=t("./util"),n=t("./es5").keys,i=r.tryCatch,o=r.errorObj;function a(t,a,s){return function(f){var u=s._boundValue();t:for(var c=0;c<t.length;++c){var h=t[c];if(h===Error||null!=h&&h.prototype instanceof Error){if(f instanceof h)return i(a).call(u,f)}else if("function"==typeof h){var l=i(h).call(u,f);if(l===o)return l;if(l)return i(a).call(u,f)}else if(r.isObject(f)){for(var d=n(h),p=0;p<d.length;++p){var b=d[p];if(h[b]!=f[b])continue t}return i(a).call(u,f)}}return e}}return a}},{"./es5":13,"./util":36}],8:[function(t,e,r){e.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(e)return new n}function o(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,f=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=f,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,e,r){e.exports=function(e,r,n,i){var o,a,s,f,u=e._async,c=t("./errors").Warning,h=t("./util"),l=t("./es5"),d=h.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,b=/\((?:timers\.js):\d+:\d+\)/,g=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,v=!1,_=!(0==h.env("BLUEBIRD_DEBUG")),w=!(0==h.env("BLUEBIRD_WARNINGS")||!_&&!h.env("BLUEBIRD_WARNINGS")),E=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!_&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),S=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var t=[];function r(){for(var e=0;e<t.length;++e)t[e]._notifyUnhandledRejection();n()}function n(){t.length=0}f=function(e){t.push(e),setTimeout(r,1)},l.defineProperty(e,"_unhandledRejectionCheck",{value:r}),l.defineProperty(e,"_unhandledRejectionClear",{value:n})}(),e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),f(this))},e.prototype._notifyUnhandledRejectionIsHandled=function(){tt("rejectionHandled",o,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),tt("unhandledRejection",a,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,r){return K(t,e,r||this)},e.onPossiblyUnhandledRejection=function(t){var r=e._getContext();a=h.contextBind(r,t)},e.onUnhandledRejectionHandled=function(t){var r=e._getContext();o=h.contextBind(r,t)};var A=function(){};e.longStackTraces=function(){if(u.haveItemsQueued()&&!ct.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ct.longStackTraces&&nt()){var t=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;ct.longStackTraces=!0,A=function(){if(u.haveItemsQueued()&&!ct.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=n,e.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ct.longStackTraces=!1},e.prototype._captureStackTrace=q,e.prototype._attachExtraTrace=z,e.prototype._dereferenceTrace=H,r.activateLongStackTraces()}},e.hasLongStackTraces=function(){return ct.longStackTraces&&nt()};var M={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},k=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return l.defineProperty(n,"promise",{value:r.promise}),l.defineProperty(n,"reason",{value:r.reason}),t(M[e],n)}}return"function"==typeof Event?(e=new Event("CustomEvent"),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,l.defineProperty(n,"promise",{value:r.promise}),l.defineProperty(n,"reason",{value:r.reason}),t(M[e],n)}):((e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(M[e],n)})}catch(t){}return function(){return!1}}(),T=h.isNode?function(){return process.emit.apply(process,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function B(t,e){return{promise:e}}var x={promiseCreated:B,promiseFulfilled:B,promiseRejected:B,promiseResolved:B,promiseCancelled:B,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:B},O=function(t){var e=!1;try{e=T.apply(null,arguments)}catch(t){u.throwLater(t),e=!0}var r=!1;try{r=k(t,x[t].apply(null,arguments))}catch(t){u.throwLater(t),r=!0}return r||e};function j(){return!1}function R(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: "+h.toString(t));n._attachCancellationCallback(t)}))}catch(t){return t}}function I(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function P(){return this._onCancelField}function C(t){this._onCancelField=t}function L(){this._cancellationParent=void 0,this._onCancelField=void 0}function N(t,e){if(1&e){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}2&e&&t._isBound()&&this._setBoundTo(t._boundTo)}function U(t,e){2&e&&t._isBound()&&this._setBoundTo(t._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&A()),"warnings"in t){var r=t.warnings;ct.warnings=!!r,S=ct.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(S=!!r.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ct.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=L,e.prototype._propagateFrom=N,e.prototype._onCancel=P,e.prototype._setOnCancel=C,e.prototype._attachCancellationCallback=I,e.prototype._execute=R,F=N,ct.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!ct.monitoring?(ct.monitoring=!0,e.prototype._fireEvent=O):!t.monitoring&&ct.monitoring&&(ct.monitoring=!1,e.prototype._fireEvent=j)),"asyncHooks"in t&&h.nodeSupportsAsyncResource){var o=ct.asyncHooks,a=!!t.asyncHooks;o!==a&&(ct.asyncHooks=a,a?n():i())}return e},e.prototype._fireEvent=j,e.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var F=U;function D(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function q(){this._trace=new ft(this._peekContext())}function z(t,e){if(d(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=Y(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function H(){this._trace=void 0}function V(t,e,r,n,i){if(void 0===t&&null!==e&&S){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),f=J(s),u=f.length-1;u>=0;--u){var c=f[u];if(!b.test(c)){var h=c.match(g);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(f.length>0){var l=f[0];for(u=0;u<s.length;++u)if(s[u]===l){u>0&&(a="\n"+s[u-1]);break}}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(d,!0,e)}}function W(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),K(r)}function K(t,r,n){if(ct.warnings){var i,o=new c(t);if(r)n._attachExtraTrace(o);else if(ct.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=Y(o);o.stack=a.message+"\n"+a.stack.join("\n")}O("warning",o)||Q(o,"",!0)}}function $(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 G(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 Z(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(s=a;s>=0;--s){var f=n[s];if(e[i]!==f)break;e.pop(),i--}e=n}}function J(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||y.test(n),o=i&&it(n);i&&!o&&(v&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function X(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||y.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function Y(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?X(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:J(e)}}function Q(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var i=t.stack;n=e+m(i,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function tt(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){u.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||i||Q(r,"Unhandled rejection "):O(t,n)}function et(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():h.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+rt(e)+">, no stack trace)"}function rt(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function nt(){return"function"==typeof ut}var it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function at(t){var e=t.match(ot);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function st(t,e){if(nt()){for(var r,n,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),a=-1,s=-1,f=0;f<i.length;++f)if(u=at(i[f])){r=u.fileName,a=u.line;break}for(f=0;f<o.length;++f){var u;if(u=at(o[f])){n=u.fileName,s=u.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(it=function(t){if(p.test(t))return!0;var e=at(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function ft(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ut(this,ft),e>32&&this.uncycle()}h.inherits(ft,Error),r.CapturedTrace=ft,ft.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;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var a=r[e[n].stack];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var f=s._length+1,u=n-2;u>=0;--u)e[u]._length=f,f++;return}}}},ft.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Y(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(J(i.stack.split("\n"))),i=i._parent;Z(n),G(n),h.notEnumerableProp(t,"stack",$(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var ut=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():et(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=t,m=e;var r=Error.captureStackTrace;return it=function(t){return p.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=e,v=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=t,m=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}):(m=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?et(e):e.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},h.isNode&&process.stderr.isTTY?s=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ct={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return E&&e.longStackTraces(),{asyncHooks:function(){return ct.asyncHooks},longStackTraces:function(){return ct.longStackTraces},warnings:function(){return ct.warnings},cancellation:function(){return ct.cancellation},monitoring:function(){return ct.monitoring},propagateFromFunction:function(){return F},boundValueFunction:function(){return D},checkForgottenReturns:V,setBounds:st,warn:K,deprecated:W,CapturedTrace:ft,fireDomEvent:k,fireGlobalEvent:T}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,r){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){e.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}function o(t,n){return r(t,n,e,e)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=o}},{}],12:[function(t,e,r){var n,i,o=t("./es5"),a=o.freeze,s=t("./util"),f=s.inherits,u=s.notEnumerableProp;function c(t,e){function r(n){if(!(this instanceof r))return new r(n);u(this,"message","string"==typeof n?n:e),u(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return f(r,Error),r}var h=c("Warning","warning"),l=c("CancellationError","cancellation error"),d=c("TimeoutError","timeout error"),p=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var b="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<b.length;++g)"function"==typeof Array.prototype[b[g]]&&(p.prototype[b[g]]=Array.prototype[b[g]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);u(this,"name","OperationalError"),u(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(u(this,"message",t.message),u(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+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];e+=(n=i.join("\n"))+"\n"}return y--,e},f(m,Error);var v=Error.__BluebirdErrorTypes__;v||(v=a({CancellationError:l,TimeoutError:d,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){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},f=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},c=function(t){return t},h=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},l=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:l,keys:s,names:s,defineProperty:u,getDescriptor:f,freeze:c,getPrototypeOf:h,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){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){e.exports=function(e,r,n){var i=t("./util"),o=e.CancellationError,a=i.errorObj,s=t("./catch_filter")(n);function f(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function u(t){this.finallyHandler=t}function c(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function h(){return d.call(this,this.promise._target()._settledValue())}function l(t){if(!c(this,t))return a.e=t,a}function d(t){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),t);if(f===n)return f;if(void 0!==f){i._setReturnedNonUndefined();var d=r(f,i);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),a.e=p,a}d.isPending()&&d._attachCancellationCallback(new u(this))}return d._then(h,l,void 0,this,void 0)}}}return i.isRejected()?(c(this),a.e=t,a):(c(this),t)}return f.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){c(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new f(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,d,d)},e.prototype.tap=function(t){return this._passThrough(t,1,d)},e.prototype.tapCatch=function(t){var r=arguments.length;if(1===r)return this._passThrough(t,1,void 0,d);var n,o=new Array(r-1),a=0;for(n=0;n<r-1;++n){var f=arguments[n];if(!i.isObject(f))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(f)));o[a++]=f}o.length=a;var u=arguments[n];return this._passThrough(s(o,u,this),1,void 0,d)},f}},{"./catch_filter":7,"./util":36}],16:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./errors").TypeError,f=t("./util"),u=f.errorObj,c=f.tryCatch,h=[];function l(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=c(r[o])(t);if(n._popContext(),a===u){n._pushContext();var s=e.reject(u.e);return n._popContext(),s}var f=i(a,n);if(f instanceof e)return f}return null}function d(t,r,i,o){if(a.cancellation()){var s=new e(n),f=this._finallyPromise=new e(n);this._promise=s.lastly((function(){return f})),s._captureStackTrace(),s._setOnCancel(this)}else(this._promise=new e(n))._captureStackTrace();this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}f.inherits(d,o),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},d.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=c(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},d.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=c(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(t){var r=this._promise;if(t===u)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof e||null!==(o=l(o,this._yieldHandlers,this._promise))){var a=(o=o._target())._bitField;50397184&a?33554432&a?e._async.invoke(this._promiseFulfilled,this,o._value()):16777216&a?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(t,e){if("function"!=typeof t)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=d,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 s("expecting a function but got "+f.classString(t));h.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 d(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){e.exports=function(e,r,n,i,o){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj,e.join=function(){var t,e=arguments.length-1;e>0&&"function"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var i=new r(n).promise();return void 0!==t?i.spread(t):i}}},{"./util":36}],18:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=s.tryCatch,u=s.errorObj,c=e._async;function h(t,r,n,i){this.constructor$(t),this._promise._captureStackTrace();var a=e._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),s.isArray(t))for(var f=0;f<t.length;++f){var u=t[f];u instanceof e&&u.suppressUnhandledRejections()}}function l(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+s.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 "+s.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(i.concurrency)));a=i.concurrency}return new h(t,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(h,r),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var h=this._promise,l=this._callback,d=h._boundValue();h._pushContext();var p=f(l).call(d,t,r,o),b=h._popContext();if(a.checkForgottenReturns(p,b,null!==s?"Promise.filter":"Promise.map",h),p===u)return this._reject(p.e),!0;var g=i(p,this._promise);if(g instanceof e){var y=(g=g._target())._bitField;if(!(50397184&y))return c>=1&&this._inFlight++,n[r]=g,g._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(g._reason()),!0):(this._cancel(),!0);p=g._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.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)}},h.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)},h.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return l(this,t,e,null)},e.map=function(t,e,r,n){return l(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){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,f=new e(r);if(f._captureStackTrace(),f._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];n=a.isArray(u)?s(t).apply(c,u):s(t).call(c,u)}else n=s(t)();var h=f._popContext();return o.checkForgottenReturns(n,h,"Promise.try",f),f._resolveFromSyncValue(n),f},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){var n=t("./util"),i=n.maybeWrapAsError,o=t("./errors").OperationalError,a=t("./es5");function s(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}var f=/^(?:name|message|stack|cause)$/;function u(t){var e;if(s(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=a.keys(t),i=0;i<r.length;++i){var u=r[i];f.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}function c(t,e){return function(r,n){if(null!==t){if(r){var o=u(i(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}}}e.exports=c},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){e.exports=function(e){var r=t("./util"),n=e._async,i=r.tryCatch,o=r.errorObj;function a(t,e){var a=this;if(!r.isArray(t))return s.call(a,t,e);var f=i(e).apply(a._boundValue(),[null].concat(t));f===o&&n.throwLater(f.e)}function s(t,e){var r=this._boundValue(),a=void 0===t?i(e).call(r,null):i(e).call(r,null,t);a===o&&n.throwLater(a.e)}function f(t,e){var r=this;if(!t){var a=new Error(t+"");a.cause=t,t=a}var s=i(e).call(r._boundValue(),t);s===o&&n.throwLater(s.e)}e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var r=s;void 0!==e&&Object(e).spread&&(r=a),this._then(r,f,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,r){e.exports=function(){var r=function(){return new _("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new L.PromiseInspection(this._target())},i=function(t){return L.reject(new _(t))};function o(){}var a={},s=t("./util");s.setReflectHandler(n);var f=function(){var t=process.domain;return void 0===t?null:t},u=function(){return null},c=function(){return{domain:f(),async:null}},h=s.isNode&&s.nodeSupportsAsyncResource?t("async_hooks").AsyncResource:null,l=function(){return{domain:f(),async:new h("Bluebird::Promise")}},d=s.isNode?c:u;s.notEnumerableProp(L,"_getContext",d);var p=function(){d=l,s.notEnumerableProp(L,"_getContext",l)},b=function(){d=c,s.notEnumerableProp(L,"_getContext",c)},g=t("./es5"),y=t("./async"),m=new y;g.defineProperty(L,"_async",{value:m});var v=t("./errors"),_=L.TypeError=v.TypeError;L.RangeError=v.RangeError;var w=L.CancellationError=v.CancellationError;L.TimeoutError=v.TimeoutError,L.OperationalError=v.OperationalError,L.RejectionError=v.OperationalError,L.AggregateError=v.AggregateError;var E=function(){},S={},A={},M=t("./thenables")(L,E),k=t("./promise_array")(L,E,M,i,o),T=t("./context")(L),B=T.create,x=t("./debuggability")(L,T,p,b);x.CapturedTrace;var O=t("./finally")(L,M,A),j=t("./catch_filter")(A),R=t("./nodeback"),I=s.errorObj,P=s.tryCatch;function C(t,e){if(null==t||t.constructor!==L)throw new _("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new _("expecting a function but got "+s.classString(e))}function L(t){t!==E&&C(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function N(t){this.promise._resolveCallback(t)}function U(t){this.promise._rejectCallback(t,!1)}function F(t){var e=new L(E);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return L.prototype.toString=function(){return"[object Promise]"},L.prototype.caught=L.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),o=0;for(r=0;r<e-1;++r){var a=arguments[r];if(!s.isObject(a))return i("Catch statement predicate: expecting an object but got "+s.classString(a));n[o++]=a}if(n.length=o,"function"!=typeof(t=arguments[r]))throw new _("The last argument to .catch() must be a function, got "+s.toString(t));return this.then(void 0,j(n,t,this))}return this.then(void 0,t)},L.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},L.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+s.classString(t);arguments.length>1&&(r+=", "+s.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},L.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},L.prototype.spread=function(t){return"function"!=typeof t?i("expecting a function but got "+s.classString(t)):this.all()._then(t,void 0,void 0,S,void 0)},L.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},L.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},L.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},L.getNewLibraryCopy=e.exports,L.is=function(t){return t instanceof L},L.fromNode=L.fromCallback=function(t){var e=new L(E);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=P(t)(R(e,r));return n===I&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},L.all=function(t){return new k(t).promise()},L.cast=function(t){var e=M(t);return e instanceof L||((e=new L(E))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},L.resolve=L.fulfilled=L.cast,L.reject=L.rejected=function(t){var e=new L(E);return e._captureStackTrace(),e._rejectCallback(t,!0),e},L.setScheduler=function(t){if("function"!=typeof t)throw new _("expecting a function but got "+s.classString(t));return m.setScheduler(t)},L.prototype._then=function(t,e,r,n,i){var o=void 0!==i,a=o?i:new L(E),f=this._target(),u=f._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&u?this._boundValue():f===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c=d();if(50397184&u){var h,l,p=f._settlePromiseCtx;33554432&u?(l=f._rejectionHandler0,h=t):16777216&u?(l=f._fulfillmentHandler0,h=e,f._unsetRejectionIsUnhandled()):(p=f._settlePromiseLateCancellationObserver,l=new w("late cancellation observer"),f._attachExtraTrace(l),h=e),m.invoke(p,f,{handler:s.contextBind(c,h),promise:a,receiver:n,value:l})}else f._addCallbacks(t,e,a,n,c);return a},L.prototype._length=function(){return 65535&this._bitField},L.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},L.prototype._isFollowing=function(){return!(67108864&~this._bitField)},L.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},L.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},L.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},L.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},L.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},L.prototype._isFinal=function(){return(4194304&this._bitField)>0},L.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},L.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},L.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},L.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},L.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},L.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},L.prototype._promiseAt=function(t){return this[4*t-4+2]},L.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},L.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},L.prototype._boundValue=function(){},L.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,r,n,i,null)},L.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=a),this._addCallbacks(r,n,i,o,null)},L.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=s.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=s.contextBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=s.contextBind(i,t)),"function"==typeof e&&(this[a+1]=s.contextBind(i,e))}return this._setLength(o+1),o},L.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},L.prototype._resolveCallback=function(t,e){if(!(117506048&this._bitField)){if(t===this)return this._rejectCallback(r(),!1);var n=M(t,this);if(!(n instanceof L))return this._fulfill(t);e&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var a=new w("late cancellation observer");i._attachExtraTrace(a),this._reject(a)}else{var s=this._length();s>0&&i._migrateCallback0(this);for(var f=1;f<s;++f)i._migrateCallbackAt(this,f);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},L.prototype._rejectCallback=function(t,e,r){var n=s.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+s.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},L.prototype._resolveFromExecutor=function(t){if(t!==E){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)}},L.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),e===S?r&&"number"==typeof r.length?o=P(t).apply(this._boundValue(),r):(o=I).e=new _("cannot .spread() a non-array: "+s.classString(r)):o=P(t).call(e,r);var a=n._popContext();65536&(i=n._bitField)||(o===A?n._reject(r):o===I?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},L.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},L.prototype._followee=function(){return this._rejectionHandler0},L.prototype._setFollowee=function(t){this._rejectionHandler0=t},L.prototype._settlePromise=function(t,e,r,i){var a=t instanceof L,s=this._bitField,f=!!(134217728&s);65536&s?(a&&t._invokeInternalOnCancel(),r instanceof O&&r.isFinallyHandler()?(r.cancelPromise=t,P(e).call(r,i)===I&&t._reject(I.e)):e===n?t._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(f&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof o?r._isResolved()||(33554432&s?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(f&&t._setAsyncGuaranteed(),33554432&s?t._fulfill(i):t._reject(i))},L.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof L?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof L&&r._reject(i)},L.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},L.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)},L.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},L.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(134217728&e?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},L.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return m.fatalError(t,s.isNode);(65535&e)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},L.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)}},L.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)}},L.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(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()},L.prototype._settledValue=function(){var t=this._bitField;return 33554432&t?this._rejectionHandler0:16777216&t?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&g.defineProperty(L.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),L.defer=L.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new L(E),resolve:N,reject:U}},s.notEnumerableProp(L,"_makeSelfResolutionError",r),t("./method")(L,E,M,i,x),t("./bind")(L,E,M,x),t("./cancel")(L,k,i,x),t("./direct_resolve")(L),t("./synchronous_inspection")(L),t("./join")(L,k,M,E,m),L.Promise=L,L.version="3.7.2",t("./call_get.js")(L),t("./generators.js")(L,i,E,M,o,x),t("./map.js")(L,k,i,M,E,x),t("./nodeify.js")(L),t("./promisify.js")(L,E),t("./props.js")(L,k,M,i),t("./race.js")(L,E,M,i),t("./reduce.js")(L,k,i,M,E,x),t("./settle.js")(L,k,x),t("./some.js")(L,k,i),t("./timers.js")(L,E,x),t("./using.js")(L,i,M,B,E,x),t("./any.js")(L),t("./each.js")(L,E),t("./filter.js")(L,E),s.toFastProperties(L),s.toFastProperties(L.prototype),F({a:1}),F({b:2}),F({c:3}),F(1),F((function(){})),F(void 0),F(!1),F(new L(E)),x.setBounds(y.firstLineError,s.lastLineError),L}},{"./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,async_hooks:void 0}],23:[function(t,e,r){e.exports=function(e,r,n,i,o){var a=t("./util");function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function f(t){var n=this._promise=new e(r);t instanceof e&&(n._propagateFrom(t,3),t.suppressUnhandledRejections()),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(f,o),f.prototype.length=function(){return this._length},f.prototype.promise=function(){return this._promise},f.prototype._init=function t(r,o){var f=n(this._values,this._promise);if(f instanceof e){var u=(f=f._target())._bitField;if(this._values=f,!(50397184&u))return this._promise._setAsyncGuaranteed(),f._then(t,this._reject,void 0,this,o);if(!(33554432&u))return 16777216&u?this._reject(f._reason()):this._cancel();f=f._value()}if(null!==(f=a.asArray(f)))0!==f.length?this._iterate(f):-5===o?this._resolveEmptyArray():this._resolve(s(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(f)).reason();this._promise._rejectCallback(c,!1)}},f.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 f=n(t[s],i);a=f instanceof e?(f=f._target())._bitField:null,o?null!==a&&f.suppressUnhandledRejections():null!==a?50397184&a?o=33554432&a?this._promiseFulfilled(f._value(),s):16777216&a?this._promiseRejected(f._reason(),s):this._promiseCancelled(s):(f._proxy(this,s),this._values[s]=f):o=this._promiseFulfilled(f,s)}o||i._setAsyncGuaranteed()},f.prototype._isResolved=function(){return null===this._values},f.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},f.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},f.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},f.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},f.prototype._promiseCancelled=function(){return this._cancel(),!0},f.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},f.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()}},f.prototype.shouldCopyValues=function(){return!0},f.prototype.getActualLength=function(t){return t},f}},{"./util":36}],24:[function(t,e,r){e.exports=function(e,r){var n={},i=t("./util"),o=t("./nodeback"),a=i.withAppended,s=i.maybeWrapAsError,f=i.canEvaluate,u=t("./errors").TypeError,c="Async",h={__isPromisified__:!0},l=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),d=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!l.test(t)}function b(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function g(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,h);return!!n&&b(n)}function y(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 u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function m(t,e,r,n){for(var o=i.inheritedDataKeys(t),a=[],s=0;s<o.length;++s){var f=o[s],u=t[f],c=n===d||d(f);"function"!=typeof u||b(u)||g(t,f,e)||!n(f,u,t,c)||a.push(f,u)}return y(a,e,r),a}var v,_=function(t){return t.replace(/([$])/,"\\$")};function w(t,f,u,c,h,l){var d=function(){return this}(),p=t;function b(){var i=f;f===n&&(i=this);var u=new e(r);u._captureStackTrace();var c="string"==typeof p&&this!==d?this[p]:t,h=o(u,l);try{c.apply(i,a(arguments,h))}catch(t){u._rejectCallback(s(t),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"==typeof p&&(t=c),i.notEnumerableProp(b,"__isPromisified__",!0),b}var E=f?v:w;function S(t,e,r,o,a){for(var s=new RegExp(_(e)+"$"),f=m(t,e,s,r),u=0,c=f.length;u<c;u+=2){var h=f[u],l=f[u+1],d=h+e;if(o===E)t[d]=E(h,n,h,l,e,a);else{var p=o(l,(function(){return E(h,n,h,l,e,a)}));i.notEnumerableProp(p,"__isPromisified__",!0),t[d]=p}}return i.toFastProperties(t),t}function A(t,e,r){return E(t,e,void 0,t,null,r)}e.promisify=function(t,e){if("function"!=typeof t)throw new u("expecting a function but got "+i.classString(t));if(b(t))return t;var r=A(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,p),r},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n=c);var o=e.filter;"function"!=typeof o&&(o=d);var a=e.promisifier;if("function"!=typeof a&&(a=E),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(t),f=0;f<s.length;++f){var h=t[s[f]];"constructor"!==s[f]&&i.isClass(h)&&(S(h.prototype,n,o,a,r),S(h,n,o,a,r))}return S(t,n,o,a,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){e.exports=function(e,r,n,i){var o,a=t("./util"),s=a.isObject,f=t("./es5");"function"==typeof Map&&(o=Map);var u=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),c=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],a=t[n];e.set(i,a)}return e};function h(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=u(t),r=!0;else{var n=f.keys(t),i=n.length;e=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];e[a]=t[s],e[a+i]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function l(t){var r,o=n(t);return s(o)?(r=o instanceof e?o._then(e.props,void 0,void 0,void 0,void 0):new h(o).promise(),o instanceof e&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(h,r),h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},h.prototype.shouldCopyValues=function(){return!1},h.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return l(this)},e.props=function(t){return l(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){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),this[this._front+e&this._capacity-1]=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,n(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,r){e.exports=function(e,r,n,i){var o=t("./util"),a=function(t){return t.then((function(e){return s(e,t)}))};function s(t,s){var f=n(t);if(f instanceof e)return a(f);if(null===(t=o.asArray(t)))return i("expecting an array or an iterable object but got "+o.classString(t));var u=new e(r);void 0!==s&&u._propagateFrom(s,3);for(var c=u._fulfill,h=u._reject,l=0,d=t.length;l<d;++l){var p=t[l];(void 0!==p||l in t)&&e.cast(p)._then(c,h,void 0,u,null)}return u}e.race=function(t){return s(t,void 0)},e.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=s.tryCatch;function u(t,r,n,i){this.constructor$(t);var a=e._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=e.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function h(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+s.classString(e)):new u(t,e,r,i).promise()}function l(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(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(t){var r,n=this.array,i=n._promise,o=f(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),t,this.index,this.length):o.call(i._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=r);var s=i._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}s.inherits(u,r),u.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},u.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},u.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},u.prototype._iterate=function(t){var r,n;this._values=t;var i=t.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var a=t[o];a instanceof e&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var s={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,s,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},e.prototype.reduce=function(t,e){return h(this,t,e,null)},e.reduce=function(t,e,r,n){return h(t,e,r,n)}}},{"./util":36}],29:[function(t,r,n){var i,o=t("./util"),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var f=e.setImmediate,u=process.nextTick;i=o.isRecentNode?function(t){f.call(e,t)}:function(t){u.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var c=s.resolve();i=function(t){c.then(t)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:a:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){t.classList.toggle("foo"),r=!1})).observe(n,e);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(t,e),i()}}();r.exports=i},{"./util":36}],30:[function(t,e,r){e.exports=function(e,r,n){var i=e.PromiseInspection;function o(t){this.constructor$(t)}t("./util").inherits(o,r),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.allSettled=function(t){return new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){e.exports=function(e,r,n){var i=t("./util"),o=t("./errors").RangeError,a=t("./errors").AggregateError,s=i.isArray,f={};function u(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(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 u(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(u,r),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(t){this._howMany=t},u.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)},u.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(f),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==f&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(t){this._values.push(t)},u.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return c(t,e)},e.prototype.some=function(t){return c(this,t)},e._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(t,e,r){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!!(33554432&this._bitField)},o=e.prototype.isRejected=function(){return!!(16777216&this._bitField)},a=e.prototype.isPending=function(){return!(50397184&this._bitField)},s=e.prototype.isResolved=function(){return!!(50331648&this._bitField)};e.prototype.isCancelled=function(){return!!(8454144&this._bitField)},t.prototype.__isCancelled=function(){return!(65536&~this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return!!(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){e.exports=function(e,r){var n=t("./util"),i=n.errorObj,o=n.isObject;function a(t,n){if(o(t)){if(t instanceof e)return t;var a=f(t);if(a===i){n&&n._pushContext();var s=e.reject(a.e);return n&&n._popContext(),s}if("function"==typeof a)return c(t)?(s=new e(r),t._then(s._fulfill,s._reject,void 0,s,null),s):h(t,a,n)}return t}function s(t){return t.then}function f(t){try{return s(t)}catch(t){return i.e=t,i}}var u={}.hasOwnProperty;function c(t){try{return u.call(t,"_promise0")}catch(t){return!1}}function h(t,o,a){var s=new e(r),f=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,c=n.tryCatch(o).call(t,h,l);function h(t){s&&(s._resolveCallback(t),s=null)}function l(t){s&&(s._rejectCallback(t,u,!0),s=null)}return u=!1,s&&c===i&&(s._rejectCallback(c.e,!0,!0),s=null),f}return a}},{"./util":36}],34:[function(t,e,r){e.exports=function(e,r,n){var i=t("./util"),o=e.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return f(+this).thenReturn(t)},f=e.delay=function(t,i){var o,f;return void 0!==i?(o=e.resolve(i)._then(s,null,null,t,void 0),n.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(r),f=setTimeout((function(){o._fulfill()}),+t),n.cancellation()&&o._setOnCancel(new a(f)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};e.prototype.delay=function(t){return f(t,this)};var u=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};function c(t){return clearTimeout(this.handle),t}function h(t){throw clearTimeout(this.handle),t}e.prototype.timeout=function(t,e){var r,i;t=+t;var o=new a(setTimeout((function(){r.isPending()&&u(r,e,i)}),t));return n.cancellation()?(i=this.then(),(r=i._then(c,h,void 0,o,void 0))._setOnCancel(o)):r=this._then(c,h,void 0,o,void 0),r}}},{"./util":36}],35:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=t("./errors").TypeError,u=t("./util").inherits,c=s.errorObj,h=s.tryCatch,l={};function d(t){setTimeout((function(){throw t}),0)}function p(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function b(t,r){var i=0,a=t.length,s=new e(o);function f(){if(i>=a)return s._fulfill();var o=p(t[i++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(t){return d(t)}if(o instanceof e)return o._then(f,d,null,null,null)}f()}return f(),s}function g(t,e,r){this._data=t,this._promise=e,this._context=r}function y(t,e,r){this.constructor$(t,e,r)}function m(t){return g.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function v(t){this.length=t,this.promise=null,this[t-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():l},g.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==l?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},g.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},u(y,g),y.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},v.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,o=arguments[t-1];if("function"!=typeof o)return r("expecting a function but got "+s.classString(o));var f=!0;2===t&&Array.isArray(arguments[0])?(t=(i=arguments[0]).length,f=!1):(i=arguments,t--);for(var u=new v(t),l=0;l<t;++l){var d=i[l];if(g.isDisposer(d)){var p=d;(d=d.promise())._setDisposable(p)}else{var y=n(d);y instanceof e&&(d=y._then(m,null,null,{resources:u,index:l},void 0))}u[l]=d}var _=new Array(u.length);for(l=0;l<_.length;++l)_[l]=e.resolve(u[l]).reflect();var w=e.all(_).then((function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=h(o);var n=f?o.apply(void 0,t):o(t),i=E._popContext();return a.checkForgottenReturns(n,i,"Promise.using",E),n})),E=w.lastly((function(){var t=new e.PromiseInspection(w);return b(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=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new y(t,this,i());throw new f}}},{"./errors":12,"./util":36}],36:[function(t,r,n){var i,o=t("./es5"),a="undefined"==typeof navigator,s={e:{}},f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function u(){try{var t=i;return i=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function c(t){return i=t,u}var h=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function l(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function d(t){return"function"==typeof t||"object"==typeof t&&null!==t}function p(t){return l(t)?new Error(k(t)):t}function b(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 g(t,e,r){if(!o.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 y(t,e,r){if(l(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(t,e,n),t}function m(t){throw t}var v=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(o.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var a;try{a=r(t)}catch(t){return n}for(var s=0;s<a.length;++s){var f=a[s];if(!i[f]){i[f]=!0;var u=Object.getOwnPropertyDescriptor(t,f);null!=u&&null==u.get&&null==u.set&&n.push(f)}}t=o.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}}(),_=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=o.names(t.prototype),r=o.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=_.test(t+"")&&o.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var S=/^[a-z$_][a-z$_0-9]*$/i;function A(t){return S.test(t)}function M(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function k(t){try{return t+""}catch(t){return"[no string representation]"}}function T(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function B(t){try{y(t,"isOperational",!0)}catch(t){}}function x(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function O(t){return T(t)&&o.propertyIsWritable(t,"stack")}var j="stack"in new Error?function(t){return O(t)?t:new Error(k(t))}:function(t){if(O(t))return t;try{throw new Error(k(t))}catch(t){return t}};function R(t){return{}.toString.call(t)}function I(t,e,r){for(var n=o.names(t),i=0;i<n.length;++i){var a=n[i];if(r(a))try{o.defineProperty(e,a,o.getDescriptor(t,a))}catch(t){}}}var P=function(t){return o.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var C="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};P=function(t){return o.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?C(t):null}}var L,N="undefined"!=typeof process&&"[object process]"===R(process).toLowerCase(),U="undefined"!=typeof process&&void 0!==process.env;function F(t){return U?process.env[t]:void 0}function D(){if("function"==typeof Promise)try{if("[object Promise]"===R(new Promise((function(){}))))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===L)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){var t=new Array(2).concat([].slice.call(arguments));return t[0]=n,t[1]=this,r.runInAsyncScope.apply(r,t)}}return e}var z={setReflectHandler:function(t){L=t},isClass:w,isIdentifier:A,inheritedDataKeys:v,getDataPropertyOrDefault:g,thrower:m,isArray:o.isArray,asArray:P,notEnumerableProp:y,isPrimitive:l,isObject:d,isError:T,canEvaluate:a,errorObj:s,tryCatch:c,inherits:h,withAppended:b,maybeWrapAsError:p,toFastProperties:E,filledRange:M,toString:k,canAttachTrace:O,ensureErrorObject:j,originatesFromRejection:x,markAsOriginatingFromRejection:B,classString:R,copyDescriptors:I,isNode:N,hasEnvVariables:U,env:F,global:f,getNativePromise:D,contextBind:q};z.isRecentNode=z.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),z.nodeSupportsAsyncResource=z.isNode&&function(){var e=!1;try{e="function"==typeof t("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(t){z.lastLineError=t}r.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}(w);var E=r(w.exports);class S{constructor(){this.config={}}get(t){return this.config[t]}getBoolean(t){return!!this.get(t)}getNumber(t){const e=this.get(t);return"number"==typeof e?e:parseFloat(e)}getString(t){const e=this.get(t);return"string"==typeof e?e:String(e)}set(t,e){this.config[t]=e}all(){return{...this.config}}}const A=new S;Object.entries({address_prefix:"STM",chain_id:"0000000000000000000000000000000000000000000000000000000000000000",node:"https://api.steemit.com",nodes:["https://api.steemit.com"],uri:"https://api.steemit.com",websocket:"wss://api.steemit.com"}).forEach((([t,e])=>A.set(t,e)));const M=()=>A,k=t=>{Object.entries(t).forEach((([t,e])=>A.set(t,e)))},T=k;var B=Object.freeze({__proto__:null,Config:S,getConfig:M,setConfig:k,setOptions:T});const x=process.env.DEBUG||"",O=x.includes("steem-js"),j=x.split(",").map((t=>t.trim()));function R(t){const e=M().get("debug");if(!0===e)return!0;if(!1===e)return!1;if(!O)return!1;if(!t)return x.includes("steem-js")&&!x.includes("steem-js:");const r=`steem-js:${t}`;return j.some((t=>t===r||"steem-js:*"===t))}const I={log(t,...e){if(R(t)){const r=t?`[steem-js:${t}]`:"[steem-js]";console.log(r,...e)}},transaction(...t){this.log("transaction",...t)},signature(...t){this.log("signature",...t)},warn(...t){(R()||!1!==M().get("debug_warnings"))&&console.warn("[steem-js]",...t)},error(...t){console.error("[steem-js]",...t)},isEnabled:t=>R(t)};var P=Object.freeze({__proto__:null,debug:I});const C=t=>new Promise((e=>setTimeout(e,t))),L=async(t,e=3,r=1e3)=>{try{return await t()}catch(n){if(0===e)throw n;return await C(r),L(t,e-1,r)}},N=t=>t.replace(/_([a-z])/g,(t=>t[1].toUpperCase()));var U=Object.freeze({__proto__:null,camelCase:N,chunk:(t,e)=>{const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r},debug:I,flatten:t=>t.reduce(((t,e)=>t.concat(e)),[]),isValidAddress:t=>/^[1-5a-z]{1,12}$/.test(t),isValidAmount:t=>/^\d+\.\d{3}\s(STEEM|SBD)$/.test(t),isValidPermlink:t=>/^[a-z0-9-]+$/.test(t),retry:L,sleep:C,unique:t=>Array.from(new Set(t))}),F={},D="6.6.1",q={},z={exports:{}},H=n(Object.freeze({__proto__:null,default:{}}));!function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function i(t,e,r){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:H.Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=f>>>26,h=67108863&f,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],f=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?u[6-f.length]+f+n:f+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?b+n:u[l-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,f="le"===e,u=new t(o),c=this.clone();if(f){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[o-s-1]=a}return u},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},i.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},i.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},i.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,a=t.words,s=e.words,f=r.words,u=0,c=0|a[0],h=8191&c,l=c>>>13,d=0|a[1],p=8191&d,b=d>>>13,g=0|a[2],y=8191&g,m=g>>>13,v=0|a[3],_=8191&v,w=v>>>13,E=0|a[4],S=8191&E,A=E>>>13,M=0|a[5],k=8191&M,T=M>>>13,B=0|a[6],x=8191&B,O=B>>>13,j=0|a[7],R=8191&j,I=j>>>13,P=0|a[8],C=8191&P,L=P>>>13,N=0|a[9],U=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],$=8191&K,G=K>>>13,Z=0|s[3],J=8191&Z,X=Z>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ft=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,lt=ct>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0;var mt=(u+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,$)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(u+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,X)|0;var _t=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(u+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Et=(u+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(I,q)|0,o=Math.imul(I,z),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var St=(u+(n=n+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,ut)|0)+Math.imul(l,ft)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;u=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0;var Mt=(u+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,ut)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,G))+Math.imul(F,$)|0,o=Math.imul(F,G),n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Tt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,X))+Math.imul(F,J)|0,o=Math.imul(F,X),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0;var Bt=(u+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var xt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,lt)|0;var Ot=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ut)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var jt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,ut))+Math.imul(F,ft)|0,o=Math.imul(F,ut),n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,lt)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(u+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,bt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,bt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,f[0]=gt,f[1]=yt,f[2]=mt,f[3]=vt,f[4]=_t,f[5]=wt,f[6]=Et,f[7]=St,f[8]=At,f[9]=Mt,f[10]=kt,f[11]=Tt,f[12]=Bt,f[13]=xt,f[14]=Ot,f[15]=jt,f[16]=Rt,f[17]=It,f[18]=Pt,0!==u&&(f[19]=u,r.length++),r};function p(t,e,r){return(new b).mulp(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(d=l),i.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,f=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=f;u++){var c=o-u,h=(0|t.words[c])*(0|e.words[u]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=i.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,f=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var h=f,l=u,d=0;d<a;d++){var p=r[c+d],b=n[c+d],g=r[c+d+a],y=n[c+d+a],m=h*g-l*y;y=h*y+l*g,g=m,r[c+d]=p+g,n[c+d]=b+y,r[c+d+a]=p-g,n[c+d+a]=b-y,d!==s&&(m=f*h-u*l,l=f*l+u*h,h=m)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,n,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)n[a]=0;r(0===o),r(!(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),f=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,u,n),this.transform(a,o,s,f,n,i),this.transform(u,o,c,h,n,i);for(var d=0;d<n;d++){var p=s[d]*c[d]-f[d]*h[d];f[d]=s[d]*h[d]+f[d]*c[d],s[d]=p}return this.conjugate(s,f,n),this.transform(s,f,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),p(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this.length=0===t?1:this.length,this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,f=(0|this.words[e])-s<<n;this.words[e]=f|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,f=n;if(i-=a,i=Math.max(0,i),f){for(var u=0;u<a;u++)f.words[u]=this.words[u];f.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var f=(0|t.words[i])*e;s=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,f=n.length-o.length;if("mod"!==e){(s=new i(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(o,1,f);0===c.negative&&(n=c,s&&(s.words[f]=1));for(var h=f-1;h>=0;h--){var l=67108864*(0|n.words[o.length+h])+(0|n.words[o.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},i.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),a=new i(0),s=new i(0),f=new i(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;!(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(h)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;!(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(h)),s.iushrn(1),f.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(f)):(n.isub(e),s.isub(o),f.isub(a))}return{a:s,b:f,gcd:n.iushln(u)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new i(1),s=new i(0),f=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;!(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var h=0,l=1;!(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new E(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(m,y),m.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},m.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(v,y),n(_,y),n(w,y),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new m;else if("p224"===t)e=new v;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return g[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var h=this.pow(c,o),l=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=a;0!==d.cmp(s);){for(var b=d,g=0;0!==b.cmp(s);g++)b=b.redSqr();r(g<p);var y=this.pow(h,new i(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],a=0,s=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=f-1;c>=0;c--){var h=u>>c&1;o!==r[0]&&(o=this.sqr(o)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}f=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new S(t)},n(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,e)}(z);var V=z.exports,W=K;function K(t,e){if(!t)throw new Error(e||"Assertion failed")}K.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var $={};!function(t){var e=t;function r(t){return 1===t.length?"0"+t:t}function n(t){for(var e="",n=0;n<t.length;n++)e+=r(t[n].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},e.zero2=r,e.toHex=n,e.encode=function(t,e){return"hex"===e?n(t):t}}($),function(t){var e=t,r=V,n=W,i=$;e.assert=n,e.toArray=i.toArray,e.zero2=i.zero2,e.toHex=i.toHex,e.encode=i.encode,e.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<e+1,a=t.clone();for(n=0;n<i.length;n++){var s,f=a.andln(o-1);a.isOdd()?(s=f>(o>>1)-1?(o>>1)-f:f,a.isubn(s)):s=0,i[n]=s,a.iushrn(1)}return i},e.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,f=t.andln(3)+i&3,u=e.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=1&f?3!==(n=t.andln(7)+i&7)&&5!==n||2!==u?f:-f:0,r[0].push(a),s=1&u?3!==(n=e.andln(7)+o&7)&&5!==n||2!==f?u:-u:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},e.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new r(t,"hex","le")}}(q);for(var G={exports:{}},Z={},J={exports:{}},X={exports:{}},Y={},Q={byteLength:function(t){var e=ot(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=ot(t),i=n[0],o=n[1],a=new rt(function(t,e,r){return 3*(e+r)/4-r}(0,i,o)),s=0,f=o>0?i-4:i;for(r=0;r<f;r+=4)e=et[t.charCodeAt(r)]<<18|et[t.charCodeAt(r+1)]<<12|et[t.charCodeAt(r+2)]<<6|et[t.charCodeAt(r+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=et[t.charCodeAt(r)]<<2|et[t.charCodeAt(r+1)]>>4,a[s++]=255&e);1===o&&(e=et[t.charCodeAt(r)]<<10|et[t.charCodeAt(r+1)]<<4|et[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(at(t,a,a+o>s?s:a+o));1===n?(e=t[r-1],i.push(tt[e>>2]+tt[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(tt[e>>10]+tt[e>>4&63]+tt[e<<2&63]+"="));return i.join("")}},tt=[],et=[],rt="undefined"!=typeof Uint8Array?Uint8Array:Array,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=0;it<64;++it)tt[it]=nt[it],et[nt.charCodeAt(it)]=it;function ot(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function at(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(tt[(i=n)>>18&63]+tt[i>>12&63]+tt[i>>6&63]+tt[63&i]);return o.join("")}et["-".charCodeAt(0)]=62,et["_".charCodeAt(0)]=63;var st={read:function(t,e,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+h>=1?l/f:l*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*f-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*b}};(function(t){const e=Q,r=st,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=o(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);const i=function(t){if(a.isBuffer(t)){const e=0|l(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||G(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),o(t<0?0:0|l(t))}function c(t){const e=t.length<0?0:0|l(t.length),r=o(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,a.prototype),n}function l(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){let 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))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function g(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),G(r=+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:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,f/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+f>s&&(r=s-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function m(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(G(n))return a;t[r+a]=n}return a}function v(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function _(t,e,r,n){return K(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return K(W(e),t,r,n)}function E(t,e,r,n){return K(function(t,e){let r,n,i;const o=[];for(let 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}(e,t.length-r),t,r,n)}function S(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function A(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,f;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(f=(31&e)<<6|63&r,f>127&&(o=f));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(f=(15&e)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,f>65535&&f<1114112&&(o=f))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return s(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},a.allocUnsafe=function(t){return u(t)},a.allocUnsafeSlow=function(t){return u(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let 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(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=a.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if($(e,Uint8Array))i+e.length>n.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!a.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)b(this,e,e+1);return this},a.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},a.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},a.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,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(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);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(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const f=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r);for(let t=0;t<f;++t)if(u[t]!==c[t]){o=u[t],s=c[t];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return g(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)}const 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");let o=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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)}};const M=4096;function k(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function B(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Z[t[n]];return i}function x(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function O(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 j(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 R(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function I(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function P(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 C(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function L(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,8),r.write(t,e,n,i,52,8),n+8}a.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),a.prototype.readBigUInt64BE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++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||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;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 t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(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 t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),a.prototype.readBigInt64BE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),a.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=J((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=J((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),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||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=J((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=J((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},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),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);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=a.isBuffer(t)?t:a.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const N={};function U(t,e,r){N[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function F(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function D(t,e,r,n,i,o){if(t>r||t<e){const r="bigint"==typeof e?"n":"";let n;throw n=0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`,new N.ERR_OUT_OF_RANGE("value",n,t)}!function(t,e,r){q(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||z(e,t.length-(r+1))}(n,i,o)}function q(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,r){if(Math.floor(t)!==t)throw q(t,r),new N.ERR_OUT_OF_RANGE("offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let 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=65536+(i-55296<<10|r-56320)}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 W(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function G(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}})(Y),function(t,e){var r=Y,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(X,X.exports);var ft=X.exports,ut=65536,ct=4294967295;var ht=ft.Buffer,lt=e.crypto||e.msCrypto;lt&<.getRandomValues?J.exports=function(t,e){if(t>ct)throw new RangeError("requested too many random bytes");var r=ht.allocUnsafe(t);if(t>0)if(t>ut)for(var n=0;n<t;n+=ut)lt.getRandomValues(r.slice(n,n+ut));else lt.getRandomValues(r);if("function"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:J.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var dt=J.exports,pt={exports:{}};"function"==typeof Object.create?pt.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pt.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}};var bt=pt.exports,gt={}.toString,yt=Array.isArray||function(t){return"[object Array]"==gt.call(t)},mt=TypeError,vt=Object,_t=Error,wt=EvalError,Et=RangeError,St=ReferenceError,At=SyntaxError,Mt=URIError,kt=Math.abs,Tt=Math.floor,Bt=Math.max,xt=Math.min,Ot=Math.pow,jt=Math.round,Rt=Number.isNaN||function(t){return t!=t},It=Object.getOwnPropertyDescriptor;if(It)try{It([],"length")}catch(t){It=null}var Pt=It,Ct=Object.defineProperty||!1;if(Ct)try{Ct({},"a",{value:1})}catch(t){Ct=!1}var Lt,Nt,Ut,Ft,Dt,qt,zt,Ht,Vt,Wt,Kt,$t,Gt,Zt,Jt=Ct,Xt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0};function Yt(){return Ft?Ut:(Ft=1,Ut="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Qt(){return qt?Dt:(qt=1,Dt=vt.getPrototypeOf||null)}function te(){if(Wt)return Vt;Wt=1;var t=function(){if(Ht)return zt;Ht=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};return zt=function(n){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=e(0,i.length-a.length),f=[],u=0;u<s;u++)f[u]="$"+u;if(o=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(f,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=i.apply(this,r(a,arguments));return Object(t)===t?t:this}return i.apply(n,r(a,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,o.prototype=new c,c.prototype=null}return o},zt}();return Vt=Function.prototype.bind||t}function ee(){return $t?Kt:($t=1,Kt=Function.prototype.call)}function re(){return Zt?Gt:(Zt=1,Gt=Function.prototype.apply)}var ne,ie="undefined"!=typeof Reflect&&Reflect&&Reflect.apply,oe=te(),ae=re(),se=ee(),fe=ie||oe.call(se,ae),ue=te(),ce=mt,he=ee(),le=fe,de=function(t){if(t.length<1||"function"!=typeof t[0])throw new ce("a function is required");return le(ue,he,t)},pe=de,be=Pt;try{ne=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var ge,ye,me,ve=!!ne&&be&&be(Object.prototype,"__proto__"),_e=Object,we=_e.getPrototypeOf,Ee=ve&&"function"==typeof ve.get?pe([ve.get]):"function"==typeof we&&function(t){return we(null==t?t:_e(t))},Se=Yt(),Ae=Qt(),Me=Ee,ke=Se?function(t){return Se(t)}:Ae?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return Ae(t)}:Me?function(t){return Me(t)}:null;function Te(){if(ye)return ge;ye=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=te();return ge=r.call(t,e)}var Be=vt,xe=_t,Oe=wt,je=Et,Re=St,Ie=At,Pe=mt,Ce=Mt,Le=kt,Ne=Tt,Ue=Bt,Fe=xt,De=Ot,qe=jt,ze=function(t){return Rt(t)||0===t?t:t<0?-1:1},He=Function,Ve=function(t){try{return He('"use strict"; return ('+t+").constructor;")()}catch(t){}},We=Pt,Ke=Jt,$e=function(){throw new Pe},Ge=We?function(){try{return $e}catch(t){try{return We(arguments,"callee").get}catch(t){return $e}}}():$e,Ze=function(){if(Nt)return Lt;Nt=1;var t="undefined"!=typeof Symbol&&Symbol,e=Xt;return Lt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}()(),Je=ke,Xe=Qt(),Ye=Yt(),Qe=re(),tr=ee(),er={},rr="undefined"!=typeof Uint8Array&&Je?Je(Uint8Array):me,nr={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?me:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?me:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&Je?Je([][Symbol.iterator]()):me,"%AsyncFromSyncIteratorPrototype%":me,"%AsyncFunction%":er,"%AsyncGenerator%":er,"%AsyncGeneratorFunction%":er,"%AsyncIteratorPrototype%":er,"%Atomics%":"undefined"==typeof Atomics?me:Atomics,"%BigInt%":"undefined"==typeof BigInt?me:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?me:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xe,"%eval%":eval,"%EvalError%":Oe,"%Float16Array%":"undefined"==typeof Float16Array?me:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?me:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?me:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?me:FinalizationRegistry,"%Function%":He,"%GeneratorFunction%":er,"%Int8Array%":"undefined"==typeof Int8Array?me:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?me:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ze&&Je?Je(Je([][Symbol.iterator]())):me,"%JSON%":"object"==typeof JSON?JSON:me,"%Map%":"undefined"==typeof Map?me:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ze&&Je?Je((new Map)[Symbol.iterator]()):me,"%Math%":Math,"%Number%":Number,"%Object%":Be,"%Object.getOwnPropertyDescriptor%":We,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?me:Promise,"%Proxy%":"undefined"==typeof Proxy?me:Proxy,"%RangeError%":je,"%ReferenceError%":Re,"%Reflect%":"undefined"==typeof Reflect?me:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?me:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ze&&Je?Je((new Set)[Symbol.iterator]()):me,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&Je?Je(""[Symbol.iterator]()):me,"%Symbol%":Ze?Symbol:me,"%SyntaxError%":Ie,"%ThrowTypeError%":Ge,"%TypedArray%":rr,"%TypeError%":Pe,"%Uint8Array%":"undefined"==typeof Uint8Array?me:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?me:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?me:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?me:Uint32Array,"%URIError%":Ce,"%WeakMap%":"undefined"==typeof WeakMap?me:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?me:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?me:WeakSet,"%Function.prototype.call%":tr,"%Function.prototype.apply%":Qe,"%Object.defineProperty%":Ke,"%Object.getPrototypeOf%":Xe,"%Math.abs%":Le,"%Math.floor%":Ne,"%Math.max%":Ue,"%Math.min%":Fe,"%Math.pow%":De,"%Math.round%":qe,"%Math.sign%":ze,"%Reflect.getPrototypeOf%":Ye};if(Je)try{null.error}catch(t){var ir=Je(Je(t));nr["%Error.prototype%"]=ir}var or,ar,sr=function t(e){var r;if("%AsyncFunction%"===e)r=Ve("async function () {}");else if("%GeneratorFunction%"===e)r=Ve("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=Ve("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&Je&&(r=Je(i.prototype))}return nr[e]=r,r},fr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=te(),cr=Te(),hr=ur.call(tr,Array.prototype.concat),lr=ur.call(Qe,Array.prototype.splice),dr=ur.call(tr,String.prototype.replace),pr=ur.call(tr,String.prototype.slice),br=ur.call(tr,RegExp.prototype.exec),gr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yr=/\\(\\)?/g,mr=function(t,e){var r,n=t;if(cr(fr,n)&&(n="%"+(r=fr[n])[0]+"%"),cr(nr,n)){var i=nr[n];if(i===er&&(i=sr(n)),void 0===i&&!e)throw new Pe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new Ie("intrinsic "+t+" does not exist!")},vr=function(t,e){if("string"!=typeof t||0===t.length)throw new Pe("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new Pe('"allowMissing" argument must be a boolean');if(null===br(/^%?[^%]*%?$/,t))throw new Ie("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=pr(t,0,1),r=pr(t,-1);if("%"===e&&"%"!==r)throw new Ie("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new Ie("invalid intrinsic syntax, expected opening `%`");var n=[];return dr(t,gr,(function(t,e,r,i){n[n.length]=r?dr(i,yr,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=mr("%"+n+"%",e),o=i.name,a=i.value,s=!1,f=i.alias;f&&(n=f[0],lr(r,hr([0,1],f)));for(var u=1,c=!0;u<r.length;u+=1){var h=r[u],l=pr(h,0,1),d=pr(h,-1);if(('"'===l||"'"===l||"`"===l||'"'===d||"'"===d||"`"===d)&&l!==d)throw new Ie("property names with quotes must have matching quotes");if("constructor"!==h&&c||(s=!0),cr(nr,o="%"+(n+="."+h)+"%"))a=nr[o];else if(null!=a){if(!(h in a)){if(!e)throw new Pe("base intrinsic for "+t+" exists, but the property is not available.");return}if(We&&u+1>=r.length){var p=We(a,h);a=(c=!!p)&&"get"in p&&!("originalValue"in p.get)?p.get:a[h]}else c=cr(a,h),a=a[h];c&&!s&&(nr[o]=a)}}return a},_r=vr,wr=de,Er=wr([_r("%String.prototype.indexOf%")]),Sr=function(t,e){var r=_r(t,!!e);return"function"==typeof r&&Er(t,".prototype.")>-1?wr([r]):r},Ar=Function.prototype.toString,Mr="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof Mr&&"function"==typeof Object.defineProperty)try{or=Object.defineProperty({},"length",{get:function(){throw ar}}),ar={},Mr((function(){throw 42}),null,or)}catch(t){t!==ar&&(Mr=null)}else Mr=null;var kr=/^\s*class\b/,Tr=function(t){try{var e=Ar.call(t);return kr.test(e)}catch(t){return!1}},Br=function(t){try{return!Tr(t)&&(Ar.call(t),!0)}catch(t){return!1}},xr=Object.prototype.toString,Or="function"==typeof Symbol&&!!Symbol.toStringTag,jr=!(0 in[,]),Rr=function(){return!1};if("object"==typeof document){var Ir=document.all;xr.call(Ir)===xr.call(document.all)&&(Rr=function(t){if((jr||!t)&&(void 0===t||"object"==typeof t))try{var e=xr.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}var Pr=Mr?function(t){if(Rr(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{Mr(t,null,or)}catch(t){if(t!==ar)return!1}return!Tr(t)&&Br(t)}:function(t){if(Rr(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(Or)return Br(t);if(Tr(t))return!1;var e=xr.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&Br(t)},Cr=Object.prototype.toString,Lr=Object.prototype.hasOwnProperty;var Nr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ur="undefined"==typeof globalThis?e:globalThis,Fr={exports:{}},Dr=Jt,qr=At,zr=mt,Hr=Pt,Vr=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new zr("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new zr("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new zr("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],s=!!Hr&&Hr(t,e);if(Dr)Dr(t,e,{configurable:null===o&&s?s.configurable:!o,enumerable:null===n&&s?s.enumerable:!n,value:r,writable:null===i&&s?s.writable:!i});else{if(!a&&(n||i||o))throw new qr("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}},Wr=Jt,Kr=function(){return!!Wr};Kr.hasArrayLengthDefineBug=function(){if(!Wr)return null;try{return 1!==Wr([],"length",{value:1}).length}catch(t){return!0}};var $r=Kr,Gr=vr,Zr=Vr,Jr=$r(),Xr=Pt,Yr=mt,Qr=Gr("%Math.floor%"),tn=function(t,e){if("function"!=typeof t)throw new Yr("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||Qr(e)!==e)throw new Yr("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in t&&Xr){var o=Xr(t,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!r)&&(Jr?Zr(t,"length",e,!0,!0):Zr(t,"length",e)),t},en=te(),rn=re(),nn=fe,on=function(){return nn(en,rn,arguments)};!function(t){var e=tn,r=Jt,n=de,i=on;t.exports=function(t){var r=n(arguments),i=t.length-(arguments.length-1);return e(r,1+(i>0?i:0),!0)},r?r(t.exports,"apply",{value:i}):t.exports.apply=i}(Fr);var an=Fr.exports,sn=Xt,fn=function(){return sn()&&!!Symbol.toStringTag},un=function(t,e,r){if(!Pr(e))throw new TypeError("iterator must be a function");var n,i;arguments.length>=3&&(n=r),i=t,"[object Array]"===Cr.call(i)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)Lr.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,n):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,n):function(t,e,r){for(var n in t)Lr.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,n)},cn=function(){for(var t=[],e=0;e<Nr.length;e++)"function"==typeof Ur[Nr[e]]&&(t[t.length]=Nr[e]);return t},hn=an,ln=Sr,dn=Pt,pn=ke,bn=ln("Object.prototype.toString"),gn=fn(),yn="undefined"==typeof globalThis?e:globalThis,mn=cn(),vn=ln("String.prototype.slice"),_n=ln("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},wn={__proto__:null};un(mn,gn&&dn&&pn?function(t){var e=new yn[t];if(Symbol.toStringTag in e&&pn){var r=pn(e),n=dn(r,Symbol.toStringTag);if(!n&&r){var i=pn(r);n=dn(i,Symbol.toStringTag)}wn["$"+t]=hn(n.get)}}:function(t){var e=new yn[t],r=e.slice||e.set;r&&(wn["$"+t]=hn(r))});var En=function(t){if(!t||"object"!=typeof t)return!1;if(!gn){var e=vn(bn(t),8,-1);return _n(mn,e)>-1?e:"Object"===e&&function(t){var e=!1;return un(wn,(function(r,n){if(!e)try{r(t),e=vn(n,1)}catch(t){}})),e}(t)}return dn?function(t){var e=!1;return un(wn,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=vn(n,1))}catch(t){}})),e}(t):null},Sn=En,An=function(t){return!!Sn(t)},Mn=mt,kn=Sr("TypedArray.prototype.buffer",!0),Tn=An,Bn=kn||function(t){if(!Tn(t))throw new Mn("Not a Typed Array");return t.buffer},xn=ft.Buffer,On=yt,jn=Bn,Rn=ArrayBuffer.isView||function(t){try{return jn(t),!0}catch(t){return!1}},In="undefined"!=typeof Uint8Array,Pn="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,Cn=Pn&&(xn.prototype instanceof Uint8Array||xn.TYPED_ARRAY_SUPPORT),Ln=function(t,e){if(xn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?xn.from(t):t;if("string"==typeof t)return xn.from(t,e);if(Pn&&Rn(t)){if(0===t.byteLength)return xn.alloc(0);if(Cn){var r=xn.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),i=xn.from(n);if(i.length===t.byteLength)return i}if(In&&t instanceof Uint8Array)return xn.from(t);var o=On(t);if(o)for(var a=0;a<t.length;a+=1){var s=t[a];if("number"!=typeof s||s<0||s>255||~~s!==s)throw new RangeError("Array items must be numbers in the range 0-255.")}if(o||xn.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return xn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},Nn=ft.Buffer,Un=Ln,Fn="undefined"!=typeof Uint8Array,Dn=Fn&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView,qn={exports:{}},zn={exports:{}};"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?zn.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick((function(){t.call(null,e)}));case 3:return process.nextTick((function(){t.call(null,e,r)}));case 4:return process.nextTick((function(){t.call(null,e,r,n)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return process.nextTick((function(){t.apply(null,i)}))}}}:zn.exports=process;var Hn=zn.exports,Vn={}.toString,Wn=Array.isArray||function(t){return"[object Array]"==Vn.call(t)},Kn=_.EventEmitter,$n={exports:{}};!function(t,e){var r=Y,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}($n,$n.exports);var Gn=$n.exports,Zn={};function Jn(t){return Object.prototype.toString.call(t)}Zn.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Jn(t)},Zn.isBoolean=function(t){return"boolean"==typeof t},Zn.isNull=function(t){return null===t},Zn.isNullOrUndefined=function(t){return null==t},Zn.isNumber=function(t){return"number"==typeof t},Zn.isString=function(t){return"string"==typeof t},Zn.isSymbol=function(t){return"symbol"==typeof t},Zn.isUndefined=function(t){return void 0===t},Zn.isRegExp=function(t){return"[object RegExp]"===Jn(t)},Zn.isObject=function(t){return"object"==typeof t&&null!==t},Zn.isDate=function(t){return"[object Date]"===Jn(t)},Zn.isError=function(t){return"[object Error]"===Jn(t)||t instanceof Error},Zn.isFunction=function(t){return"function"==typeof t},Zn.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},Zn.isBuffer=Y.Buffer.isBuffer;var Xn,Yn={exports:{}};function Qn(){return Xn||(Xn=1,function(t){var e=Gn.Buffer,r=H;t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.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},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.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}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.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},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r,n,i,o=e.allocUnsafe(t>>>0),a=this.head,s=0;a;)r=a.data,n=o,i=s,r.copy(n,i),s+=a.data.length,a=a.next;return o},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Yn)),Yn.exports}var ti=Hn;function ei(t,e){t.emit("error",e)}var ri,ni,ii,oi,ai={destroy:function(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ti.nextTick(ei,this,t)):ti.nextTick(ei,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,ti.nextTick(ei,r,t)):ti.nextTick(ei,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}},si=function(t,e){if(fi("noDeprecation"))return t;var r=!1;return function(){if(!r){if(fi("throwDeprecation"))throw new Error(e);fi("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}};function fi(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}function ui(){if(ni)return ri;ni=1;var t=Hn;function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}ri=p;var n,i=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;p.WritableState=d;var o=Object.create(Zn);o.inherits=bt;var a={deprecate:si},s=Kn,f=Gn.Buffer,u=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,h=ai;function l(){}function d(e,o){n=n||ci(),e=e||{};var a=o instanceof n;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var s=e.highWaterMark,f=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:a&&(f||0===f)?f:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var n=e._writableState,o=n.sync,a=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),r)!function(e,r,n,i,o){--r.pendingcb,n?(t.nextTick(o,i),t.nextTick(_,e,r),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),_(e,r))}(e,n,o,r,a);else{var s=m(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),o?i(g,e,n,s,a):g(e,n,s,a)}}(o,e)},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 r(this)}function p(t){if(n=n||ci(),!(c.call(p,this)||this instanceof n))return new p(t);this._writableState=new d(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function b(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 g(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),_(t,e)}function y(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,o=new Array(i),a=e.corkedRequestsFree;a.entry=n;for(var s=0,f=!0;n;)o[s]=n,n.isBuf||(f=!1),n=n.next,s+=1;o.allBuffers=f,b(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,h=n.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function m(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),_(t,e)}))}function _(e,r){var n=m(r);return n&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(v,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),n}return o.inherits(p,s),d.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(d.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===p&&(t&&t._writableState instanceof d)}})):c=function(t){return t instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,r,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,f.isBuffer(i)||i instanceof u);return s&&!f.isBuffer(e)&&(e=function(t){return f.from(t)}(e)),"function"==typeof r&&(n=r,r=null),s?r="buffer":r||(r=o.defaultEncoding),"function"!=typeof n&&(n=l),o.ended?function(e,r){var n=new Error("write after end");e.emit("error",n),t.nextTick(r,n)}(this,n):(s||function(e,r,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),t.nextTick(i,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,n,i,o);return u}(this,o,s,e,r,n)),a},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||y(this,t))},p.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},Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,r,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,r=null):"function"==typeof r&&(n=r,r=null),null!=e&&this.write(e,r),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,r,n){r.ending=!0,_(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n));r.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),p.prototype.destroy=h.destroy,p.prototype._undestroy=h.undestroy,p.prototype._destroy=function(t,e){this.end(),e(t)},ri}function ci(){if(oi)return ii;oi=1;var t=Hn,e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ii=f;var r=Object.create(Zn);r.inherits=bt;var n=Mi(),i=ui();r.inherits(f,n);for(var o=e(i.prototype),a=0;a<o.length;a++){var s=o[a];f.prototype[s]||(f.prototype[s]=i.prototype[s])}function f(t){if(!(this instanceof f))return new f(t);n.call(this,t),i.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(c,this)}function c(t){t.end()}return Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},ii}var hi,li,di={},pi=Gn.Buffer,bi=pi.isEncoding||function(t){switch((t=""+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}};function gi(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(pi.isEncoding===bi||!bi(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=vi,this.end=_i,e=4;break;case"utf8":this.fillLast=mi,e=4;break;case"base64":this.text=wi,this.end=Ei,e=3;break;default:return this.write=Si,void(this.end=Ai)}this.lastNeed=0,this.lastTotal=0,this.lastChar=pi.allocUnsafe(e)}function yi(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function mi(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function vi(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _i(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function wi(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Ei(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Si(t){return t.toString(this.encoding)}function Ai(t){return t&&t.length?this.write(t):""}function Mi(){if(li)return hi;li=1;var t=Hn;hi=g;var r,n=Wn;g.ReadableState=b,_.EventEmitter;var i=function(t,e){return t.listeners(e).length},o=Kn,a=Gn.Buffer,s=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(Zn);f.inherits=bt;var u=H,c=void 0;c=u&&u.debuglog?u.debuglog("stream"):function(){};var h,l=Qn(),d=ai;f.inherits(g,o);var p=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(r=r||ci());this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new l,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=di.StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function g(t){if(r=r||ci(),!(this instanceof g))return new g(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function y(t,e,r,n,i){var o,f=t._readableState;null===e?(f.reading=!1,function(t,e){if(e.ended)return;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,E(t)}(t,f)):(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof s||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(f,e)),o?t.emit("error",o):f.objectMode||e&&e.length>0?("string"==typeof e||f.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n?f.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):m(t,f,e,!0):f.ended?t.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(e=f.decoder.write(e),f.objectMode||0!==e.length?m(t,f,e,!1):A(t,f)):m(t,f,e,!1))):n||(f.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(f)}function m(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),y(this,t,e,!1,r)},g.prototype.unshift=function(t){return y(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(t){return h||(h=di.StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var v=8388608;function w(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=function(t){return t>=v?t=v:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(c("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(S,e):S(e))}function S(t){c("emit readable"),t.emit("readable"),B(t)}function A(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(M,e,r))}function M(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(c("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function k(t){c("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(c("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(c("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(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=function(t,e,r){var n;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?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){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}(t,e):function(t,e){var r=a.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function O(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(j,r,e))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}return g.prototype.read=function(t){c("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 c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?O(this):E(this),null;if(0===(t=w(t,e))&&e.ended)return 0===e.length&&O(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=w(r,e))),null===(n=t>0?x(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,r){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,c("pipe count=%d opts=%j",a.pipesCount,r);var s=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?u:m;function f(t,r){c("onunpipe"),t===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",f),o.removeListener("end",u),o.removeListener("end",m),o.removeListener("data",p),l=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}a.endEmitted?t.nextTick(s):o.once("end",s),e.on("unpipe",f);var h=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,B(t))}}(o);e.on("drain",h);var l=!1;var d=!1;function p(t){c("ondata"),d=!1,!1!==e.write(t)||d||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!l&&(c("false write response, pause",a.awaitDrain),a.awaitDrain++,d=!0),o.pause())}function b(t){c("onerror",t),m(),e.removeListener("error",b),0===i(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),m()}function y(){c("onfinish"),e.removeListener("close",g),m()}function m(){c("unpipe"),o.unpipe(e)}return o.on("data",p),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?n(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",o),a.flowing||(c("pipe resume"),o.resume()),e},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=R(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},g.prototype.on=function(e,r){var n=o.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):t.nextTick(k,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(T,e,r))}(this,e)),this},g.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<p.length;o++)t.on(p[o],this.emit.bind(this,p[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=x,hi}di.StringDecoder=gi,gi.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},gi.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},gi.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=yi(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=yi(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=yi(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},gi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};var ki=Oi,Ti=ci(),Bi=Object.create(Zn);function xi(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Oi(t){if(!(this instanceof Oi))return new Oi(t);Ti.call(this,t),this._transformState={afterTransform:xi.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},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.on("prefinish",ji)}function ji(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){Ri(t,e,r)})):Ri(this,null,null)}function Ri(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}Bi.inherits=bt,Bi.inherits(Oi,Ti),Oi.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ti.prototype.push.call(this,t,e)},Oi.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},Oi.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)}},Oi.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},Oi.prototype._destroy=function(t,e){var r=this;Ti.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))};var Ii=Li,Pi=ki,Ci=Object.create(Zn);function Li(t){if(!(this instanceof Li))return new Li(t);Pi.call(this,t)}Ci.inherits=bt,Ci.inherits(Li,Pi),Li.prototype._transform=function(t,e,r){r(null,t)},function(t,e){(e=t.exports=Mi()).Stream=e,e.Readable=e,e.Writable=ui(),e.Duplex=ci(),e.Transform=ki,e.PassThrough=Ii}(qn,qn.exports);var Ni=qn.exports,Ui=ft.Buffer,Fi=function(t,e){if("string"==typeof t||Nn.isBuffer(t)||Fn&&t instanceof Uint8Array||Dn&&Dn(t))return Un(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},Di=Ni.Transform;function qi(t){Di.call(this),this._block=Ui.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}bt(qi,Di),qi.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},qi.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},qi.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=Fi(t,e),n=this._block,i=0;this._blockOffset+r.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o]=r[i],o+=1,i+=1;this._update(),this._blockOffset=0}for(;i<r.length;)n[this._blockOffset]=r[i],this._blockOffset+=1,i+=1;for(var a=0,s=8*r.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},qi.prototype._update=function(){throw new Error("_update is not implemented")},qi.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},qi.prototype._digest=function(){throw new Error("_digest is not implemented")};var zi=qi,Hi=bt,Vi=zi,Wi=ft.Buffer,Ki=new Array(16);function $i(){Vi.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Gi(t,e){return t<<e|t>>>32-e}function Zi(t,e,r,n,i,o,a){return Gi(t+(e&r|~e&n)+i+o|0,a)+e|0}function Ji(t,e,r,n,i,o,a){return Gi(t+(e&n|r&~n)+i+o|0,a)+e|0}function Xi(t,e,r,n,i,o,a){return Gi(t+(e^r^n)+i+o|0,a)+e|0}function Yi(t,e,r,n,i,o,a){return Gi(t+(r^(e|~n))+i+o|0,a)+e|0}Hi($i,Vi),$i.prototype._update=function(){for(var t=Ki,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=Zi(r,n,i,o,t[0],3614090360,7),o=Zi(o,r,n,i,t[1],3905402710,12),i=Zi(i,o,r,n,t[2],606105819,17),n=Zi(n,i,o,r,t[3],3250441966,22),r=Zi(r,n,i,o,t[4],4118548399,7),o=Zi(o,r,n,i,t[5],1200080426,12),i=Zi(i,o,r,n,t[6],2821735955,17),n=Zi(n,i,o,r,t[7],4249261313,22),r=Zi(r,n,i,o,t[8],1770035416,7),o=Zi(o,r,n,i,t[9],2336552879,12),i=Zi(i,o,r,n,t[10],4294925233,17),n=Zi(n,i,o,r,t[11],2304563134,22),r=Zi(r,n,i,o,t[12],1804603682,7),o=Zi(o,r,n,i,t[13],4254626195,12),i=Zi(i,o,r,n,t[14],2792965006,17),r=Ji(r,n=Zi(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=Ji(o,r,n,i,t[6],3225465664,9),i=Ji(i,o,r,n,t[11],643717713,14),n=Ji(n,i,o,r,t[0],3921069994,20),r=Ji(r,n,i,o,t[5],3593408605,5),o=Ji(o,r,n,i,t[10],38016083,9),i=Ji(i,o,r,n,t[15],3634488961,14),n=Ji(n,i,o,r,t[4],3889429448,20),r=Ji(r,n,i,o,t[9],568446438,5),o=Ji(o,r,n,i,t[14],3275163606,9),i=Ji(i,o,r,n,t[3],4107603335,14),n=Ji(n,i,o,r,t[8],1163531501,20),r=Ji(r,n,i,o,t[13],2850285829,5),o=Ji(o,r,n,i,t[2],4243563512,9),i=Ji(i,o,r,n,t[7],1735328473,14),r=Xi(r,n=Ji(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=Xi(o,r,n,i,t[8],2272392833,11),i=Xi(i,o,r,n,t[11],1839030562,16),n=Xi(n,i,o,r,t[14],4259657740,23),r=Xi(r,n,i,o,t[1],2763975236,4),o=Xi(o,r,n,i,t[4],1272893353,11),i=Xi(i,o,r,n,t[7],4139469664,16),n=Xi(n,i,o,r,t[10],3200236656,23),r=Xi(r,n,i,o,t[13],681279174,4),o=Xi(o,r,n,i,t[0],3936430074,11),i=Xi(i,o,r,n,t[3],3572445317,16),n=Xi(n,i,o,r,t[6],76029189,23),r=Xi(r,n,i,o,t[9],3654602809,4),o=Xi(o,r,n,i,t[12],3873151461,11),i=Xi(i,o,r,n,t[15],530742520,16),r=Yi(r,n=Xi(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=Yi(o,r,n,i,t[7],1126891415,10),i=Yi(i,o,r,n,t[14],2878612391,15),n=Yi(n,i,o,r,t[5],4237533241,21),r=Yi(r,n,i,o,t[12],1700485571,6),o=Yi(o,r,n,i,t[3],2399980690,10),i=Yi(i,o,r,n,t[10],4293915773,15),n=Yi(n,i,o,r,t[1],2240044497,21),r=Yi(r,n,i,o,t[8],1873313359,6),o=Yi(o,r,n,i,t[15],4264355552,10),i=Yi(i,o,r,n,t[6],2734768916,15),n=Yi(n,i,o,r,t[13],1309151649,21),r=Yi(r,n,i,o,t[4],4149444226,6),o=Yi(o,r,n,i,t[11],3174756917,10),i=Yi(i,o,r,n,t[2],718787259,15),n=Yi(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},$i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Wi.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Qi=$i,to=Y.Buffer,eo=bt,ro=zi,no=new Array(16),io=[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],oo=[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],ao=[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],so=[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],fo=[0,1518500249,1859775393,2400959708,2840853838],uo=[1352829926,1548603684,1836072691,2053994217,0];function co(t,e){return t<<e|t>>>32-e}function ho(t,e,r,n,i,o,a,s){return co(t+(e^r^n)+o+a|0,s)+i|0}function lo(t,e,r,n,i,o,a,s){return co(t+(e&r|~e&n)+o+a|0,s)+i|0}function po(t,e,r,n,i,o,a,s){return co(t+((e|~r)^n)+o+a|0,s)+i|0}function bo(t,e,r,n,i,o,a,s){return co(t+(e&n|r&~n)+o+a|0,s)+i|0}function go(t,e,r,n,i,o,a,s){return co(t+(e^(r|~n))+o+a|0,s)+i|0}function yo(){ro.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}eo(yo,ro),yo.prototype._update=function(){for(var t=no,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,f=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,l=0;l<80;l+=1){var d,p;l<16?(d=ho(r,n,i,o,a,t[io[l]],fo[0],ao[l]),p=go(s,f,u,c,h,t[oo[l]],uo[0],so[l])):l<32?(d=lo(r,n,i,o,a,t[io[l]],fo[1],ao[l]),p=bo(s,f,u,c,h,t[oo[l]],uo[1],so[l])):l<48?(d=po(r,n,i,o,a,t[io[l]],fo[2],ao[l]),p=po(s,f,u,c,h,t[oo[l]],uo[2],so[l])):l<64?(d=bo(r,n,i,o,a,t[io[l]],fo[3],ao[l]),p=lo(s,f,u,c,h,t[oo[l]],uo[3],so[l])):(d=go(r,n,i,o,a,t[io[l]],fo[4],ao[l]),p=ho(s,f,u,c,h,t[oo[l]],uo[4],so[l])),r=a,a=o,o=co(i,10),i=n,n=d,s=h,h=c,c=co(u,10),u=f,f=p}var b=this._b+i+c|0;this._b=this._c+o+h|0,this._c=this._d+a+s|0,this._d=this._e+r+f|0,this._e=this._a+n+u|0,this._a=b},yo.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=to.alloc?to.alloc(20):new to(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var mo=yo,vo={exports:{}},_o=ft.Buffer,wo=Ln;function Eo(t,e){this._block=_o.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Eo.prototype.update=function(t,e){t=wo(t,e||"utf8");for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,a=0;a<i;){for(var s=o%n,f=Math.min(i-a,n-s),u=0;u<f;u++)r[s+u]=t[a+u];a+=f,(o+=f)%n==0&&this._update(r)}return this._len+=i,this},Eo.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Eo.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var So=Eo,Ao=bt,Mo=So,ko=ft.Buffer,To=[1518500249,1859775393,-1894007588,-899497514],Bo=new Array(80);function xo(){this.init(),this._w=Bo,Mo.call(this,64,56)}function Oo(t){return t<<30|t>>>2}function jo(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}Ao(xo,Mo),xo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},xo.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var u=0;u<80;++u){var c=~~(u/20),h=0|((e=n)<<5|e>>>27)+jo(c,i,o,a)+s+r[u]+To[c];s=a,a=o,o=Oo(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},xo.prototype._hash=function(){var t=ko.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Ro=xo,Io=bt,Po=So,Co=ft.Buffer,Lo=[1518500249,1859775393,-1894007588,-899497514],No=new Array(80);function Uo(){this.init(),this._w=No,Po.call(this,64,56)}function Fo(t){return t<<5|t>>>27}function Do(t){return t<<30|t>>>2}function qo(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}Io(Uo,Po),Uo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Uo.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=(e=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|e>>>31;for(var u=0;u<80;++u){var c=~~(u/20),h=Fo(n)+qo(c,i,o,a)+s+r[u]+Lo[c]|0;s=a,a=o,o=Do(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},Uo.prototype._hash=function(){var t=Co.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var zo=Uo,Ho=bt,Vo=So,Wo=ft.Buffer,Ko=[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],$o=new Array(64);function Go(){this.init(),this._w=$o,Vo.call(this,64,56)}function Zo(t,e,r){return r^t&(e^r)}function Jo(t,e,r){return t&e|r&(t|e)}function Xo(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Yo(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Qo(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Ho(Go,Vo),Go.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Go.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((e=r[h-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[h-7]+Qo(r[h-15])+r[h-16];for(var l=0;l<64;++l){var d=c+Yo(s)+Zo(s,f,u)+Ko[l]+r[l]|0,p=Xo(n)+Jo(n,i,o)|0;c=u,u=f,f=s,s=a+d|0,a=o,o=i,i=n,n=d+p|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},Go.prototype._hash=function(){var t=Wo.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var ta=Go,ea=bt,ra=ta,na=So,ia=ft.Buffer,oa=new Array(64);function aa(){this.init(),this._w=oa,na.call(this,64,56)}ea(aa,ra),aa.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},aa.prototype._hash=function(){var t=ia.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var sa=aa,fa=bt,ua=So,ca=ft.Buffer,ha=[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],la=new Array(160);function da(){this.init(),this._w=la,ua.call(this,128,112)}function pa(t,e,r){return r^t&(e^r)}function ba(t,e,r){return t&e|r&(t|e)}function ga(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function ya(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function ma(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function va(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function _a(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function wa(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ea(t,e){return t>>>0<e>>>0?1:0}fa(da,ua),da.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},da.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,f=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,l=0|this._cl,d=0|this._dl,p=0|this._el,b=0|this._fl,g=0|this._gl,y=0|this._hl,m=0;m<32;m+=2)e[m]=t.readInt32BE(4*m),e[m+1]=t.readInt32BE(4*m+4);for(;m<160;m+=2){var v=e[m-30],_=e[m-30+1],w=ma(v,_),E=va(_,v),S=_a(v=e[m-4],_=e[m-4+1]),A=wa(_,v),M=e[m-14],k=e[m-14+1],T=e[m-32],B=e[m-32+1],x=E+k|0,O=w+M+Ea(x,E)|0;O=(O=O+S+Ea(x=x+A|0,A)|0)+T+Ea(x=x+B|0,B)|0,e[m]=O,e[m+1]=x}for(var j=0;j<160;j+=2){O=e[j],x=e[j+1];var R=ba(r,n,i),I=ba(c,h,l),P=ga(r,c),C=ga(c,r),L=ya(a,p),N=ya(p,a),U=ha[j],F=ha[j+1],D=pa(a,s,f),q=pa(p,b,g),z=y+N|0,H=u+L+Ea(z,y)|0;H=(H=(H=H+D+Ea(z=z+q|0,q)|0)+U+Ea(z=z+F|0,F)|0)+O+Ea(z=z+x|0,x)|0;var V=C+I|0,W=P+R+Ea(V,C)|0;u=f,y=g,f=s,g=b,s=a,b=p,a=o+H+Ea(p=d+z|0,d)|0,o=i,d=l,i=n,l=h,n=r,h=c,r=H+W+Ea(c=z+V|0,z)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+l|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+b|0,this._gl=this._gl+g|0,this._hl=this._hl+y|0,this._ah=this._ah+r+Ea(this._al,c)|0,this._bh=this._bh+n+Ea(this._bl,h)|0,this._ch=this._ch+i+Ea(this._cl,l)|0,this._dh=this._dh+o+Ea(this._dl,d)|0,this._eh=this._eh+a+Ea(this._el,p)|0,this._fh=this._fh+s+Ea(this._fl,b)|0,this._gh=this._gh+f+Ea(this._gl,g)|0,this._hh=this._hh+u+Ea(this._hl,y)|0},da.prototype._hash=function(){var t=ca.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var Sa=da,Aa=bt,Ma=Sa,ka=So,Ta=ft.Buffer,Ba=new Array(160);function xa(){this.init(),this._w=Ba,ka.call(this,128,112)}Aa(xa,Ma),xa.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},xa.prototype._hash=function(){var t=Ta.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Oa=xa;!function(t){t.exports=function(e){var r=e.toLowerCase(),n=t.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n},t.exports.sha=Ro,t.exports.sha1=zo,t.exports.sha224=sa,t.exports.sha256=ta,t.exports.sha384=Oa,t.exports.sha512=Sa}(vo);var ja,Ra,Ia,Pa,Ca,La,Na=vo.exports;function Ua(){return Ra?ja:(Ra=1,ja=_.EventEmitter)}function Fa(){if(Pa)return Ia;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r){return e&&function(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,i(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}Pa=1;var o=Y.Buffer,a=H.inspect,s=a&&a.custom||"inspect";return Ia=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return n(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value: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}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0===(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:s,value:function(t,r){return a(this,e(e({},r),{},{depth:0,customInspect:!1}))}}]),t}(),Ia}function Da(){if(La)return Ca;function t(t,n){r(t,n),e(t)}function e(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function r(t,e){t.emit("error",e)}return La=1,Ca={destroy:function(n,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,n)):process.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!i&&r?o._writableState?o._writableState.errorEmitted?process.nextTick(e,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,r)):process.nextTick(t,o,r):i?(process.nextTick(e,o),i(r)):process.nextTick(e,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}var qa,za,Ha,Va,Wa,Ka,$a,Ga,Za,Ja,Xa,Ya,Qa,ts,es,rs,ns,is,os,as,ss,fs={};function us(){if(qa)return fs;qa=1;var t={};function e(e,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function r(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return e("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),e("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,a;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var s=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(i," ").concat(r(e,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),fs.codes=t,fs}function cs(){if(Ha)return za;Ha=1;var t=us().codes.ERR_INVALID_OPT_VALUE;return za={getHighWaterMark:function(e,r,n,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(r,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new t(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}}function hs(){if(Wa)return Va;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var r;Wa=1,Va=E,E.WritableState=w;var n={deprecate:si},i=Ua(),o=Y.Buffer,a=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,f=Da(),u=cs().getHighWaterMark,c=us().codes,h=c.ERR_INVALID_ARG_TYPE,l=c.ERR_METHOD_NOT_IMPLEMENTED,d=c.ERR_MULTIPLE_CALLBACK,p=c.ERR_STREAM_CANNOT_PIPE,b=c.ERR_STREAM_DESTROYED,g=c.ERR_STREAM_NULL_VALUES,y=c.ERR_STREAM_WRITE_AFTER_END,m=c.ERR_UNKNOWN_ENCODING,v=f.errorOrDestroy;function _(){}function w(e,n,i){r=r||ls(),e=e||{},"boolean"!=typeof i&&(i=n instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(B,t,e),t._writableState.errorEmitted=!0,v(t,n)):(i(n),t._writableState.errorEmitted=!0,v(t,n),B(t,e))}(t,r,n,e,i);else{var o=k(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||M(t,r),n?process.nextTick(A,t,r,o,i):A(t,r,o,i)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function E(t){var e=this instanceof(r=r||ls());if(!e&&!s.call(E,this))return new E(t);this._writableState=new w(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),i.call(this)}function S(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),B(t,e)}function M(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,f=!0;n;)o[s]=n,n.isBuf||(f=!1),n=n.next,s+=1;o.allBuffers=f,S(e,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,h=n.callback;if(S(e,r,!1,r.objectMode?1:u.length,u,c,h),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&v(t,r),e.prefinished=!0,t.emit("prefinish"),B(t,e)}))}function B(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(T,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}return bt(E,i),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===E&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},E.prototype.pipe=function(){v(this,new p)},E.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,f=!i.objectMode&&(n=t,o.isBuffer(n)||n instanceof a);return f&&!o.isBuffer(t)&&(t=function(t){return o.from(t)}(t)),"function"==typeof e&&(r=e,e=null),f?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ending?function(t,e){var r=new y;v(t,r),process.nextTick(e,r)}(this,r):(f||function(t,e,r,n){var i;return null===r?i=new g:"string"==typeof r||e.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(v(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,a){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=o.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var f=e.objectMode?1:n.length;e.length+=f;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,f,n,i,a);return u}(this,i,f,t,e,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||M(this,t))},E.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 m(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,r){r(new l("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,B(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(t,e){e(t)},Va}function ls(){if($a)return Ka;$a=1;var t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ka=a;var e=bs(),r=hs();bt(a,e);for(var n=t(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(t){if(!(this instanceof a))return new a(t);e.call(this,t),r.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||process.nextTick(f,this)}function f(t){t.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Ka}function ds(){if(Za)return Ga;Za=1;var t=us().codes.ERR_STREAM_PREMATURE_CLOSE;function e(){}return Ga=function r(n,i,o){if("function"==typeof i)return r(n,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||e);var a=i.readable||!1!==i.readable&&n.readable,s=i.writable||!1!==i.writable&&n.writable,f=function(){n.writable||c()},u=n._writableState&&n._writableState.finished,c=function(){s=!1,u=!0,a||o.call(n)},h=n._readableState&&n._readableState.endEmitted,l=function(){a=!1,h=!0,s||o.call(n)},d=function(t){o.call(n,t)},p=function(){var e;return a&&!h?(n._readableState&&n._readableState.ended||(e=new t),o.call(n,e)):s&&!u?(n._writableState&&n._writableState.ended||(e=new t),o.call(n,e)):void 0},b=function(){n.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(n)?s&&!n._writableState&&(n.on("end",f),n.on("close",f)):(n.on("complete",c),n.on("abort",p),n.req?b():n.on("request",b)),n.on("end",l),n.on("finish",c),!1!==i.error&&n.on("error",d),n.on("close",p),function(){n.removeListener("complete",c),n.removeListener("abort",p),n.removeListener("request",b),n.req&&n.req.removeListener("finish",c),n.removeListener("end",f),n.removeListener("close",f),n.removeListener("finish",c),n.removeListener("end",l),n.removeListener("error",d),n.removeListener("close",p)}},Ga}function ps(){if(Xa)return Ja;var t;function e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Xa=1;var r=ds(),n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),f=Symbol("handlePromise"),u=Symbol("stream");function c(t,e){return{value:t,done:e}}function h(t){var e=t[n];if(null!==e){var r=t[u].read();null!==r&&(t[s]=null,t[n]=null,t[i]=null,e(c(r,!1)))}}function l(t){process.nextTick(h,t)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[a])return Promise.resolve(c(void 0,!0));if(this[u].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[o]?r(t[o]):e(c(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[a]?r(c(void 0,!0)):e[f](r,n)}),n)}}(n,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(c(i,!1));r=new Promise(this[f])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,r){t[u].destroy(null,(function(t){t?r(t):e(c(void 0,!0))}))}))})),t),d);return Ja=function(t){var h,d=Object.create(p,(e(h={},u,{value:t,writable:!0}),e(h,n,{value:null,writable:!0}),e(h,i,{value:null,writable:!0}),e(h,o,{value:null,writable:!0}),e(h,a,{value:t._readableState.endEmitted,writable:!0}),e(h,f,{value:function(t,e){var r=d[u].read();r?(d[s]=null,d[n]=null,d[i]=null,t(c(r,!1))):(d[n]=t,d[i]=e)},writable:!0}),h));return d[s]=null,r(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=d[i];return null!==e&&(d[s]=null,d[n]=null,d[i]=null,e(t)),void(d[o]=t)}var r=d[n];null!==r&&(d[s]=null,d[n]=null,d[i]=null,r(c(void 0,!0))),d[a]=!0})),t.on("readable",l.bind(null,d)),d},Ja}function bs(){if(es)return ts;var t;es=1,ts=S,S.ReadableState=E,_.EventEmitter;var r=function(t,e){return t.listeners(e).length},n=Ua(),i=Y.Buffer,o=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,s=H;a=s&&s.debuglog?s.debuglog("stream"):function(){};var f,u,c,h=Fa(),l=Da(),d=cs().getHighWaterMark,p=us().codes,b=p.ERR_INVALID_ARG_TYPE,g=p.ERR_STREAM_PUSH_AFTER_EOF,y=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;bt(S,n);var v=l.errorOrDestroy,w=["error","close","destroy","pause","resume"];function E(e,r,n){t=t||ls(),e=e||{},"boolean"!=typeof n&&(n=r instanceof t),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=d(this,e,"readableHighWaterMark",n),this.buffer=new h,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.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=di.StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function S(e){if(t=t||ls(),!(this instanceof S))return new S(e);var r=this instanceof t;this._readableState=new E(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function A(t,e,r,n,s){a("readableAddChunk",e);var f,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(a("onEofChunk"),e.ended)return;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,e.sync?B(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,x(t)))}(t,u);else if(s||(f=function(t,e){var r;n=e,i.isBuffer(n)||n instanceof o||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(u,e)),f)v(t,f);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===i.prototype||(e=function(t){return i.from(t)}(e)),n)u.endEmitted?v(t,new m):M(t,u,e,!0);else if(u.ended)v(t,new g);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?M(t,u,e,!1):O(t,u)):M(t,u,e,!1)}else n||(u.reading=!1,O(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function M(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&B(t)),O(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=i.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},S.prototype.unshift=function(t){return A(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){f||(f=di.StringDecoder);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var k=1073741824;function T(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=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function B(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(x,t))}function x(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,C(t)}function O(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function I(t){a("readable nexttick read 0"),t.read(0)}function P(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(U,e,t))}function U(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}return S.prototype.read=function(t){a("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):B(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return a("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&a("length less than watermark",i=!0),e.ended||e.reading?a("reading or ended",i=!1):i&&(a("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){v(this,new y("_read()"))},S.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?f:b;function s(e,r){a("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,a("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",l),t.removeListener("unpipe",s),n.removeListener("end",f),n.removeListener("end",b),n.removeListener("data",h),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function f(){a("onend"),t.end()}i.endEmitted?process.nextTick(o):n.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&r(t,"data")&&(e.flowing=!0,C(t))}}(n);t.on("drain",u);var c=!1;function h(e){a("ondata");var r=t.write(e);a("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!c&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function l(e){a("onerror",e),b(),t.removeListener("error",l),0===r(t,"error")&&v(t,e)}function d(){t.removeListener("finish",p),b()}function p(){a("onfinish"),t.removeListener("close",d),b()}function b(){a("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",d),t.once("finish",p),t.emit("pipe",n),i.flowing||(a("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=F(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},S.prototype.on=function(t,e){var r=n.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?B(this):i.reading||process.nextTick(I,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=n.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(R,this),r},S.prototype.removeAllListeners=function(t){var e=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(R,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(P,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<w.length;o++)t.on(w[o],this.emit.bind(this,w[o]));return this._read=function(e){a("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=ps()),u(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=L,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===c&&(c=Qa?Ya:(Qa=1,Ya=function(){throw new Error("Readable.from is not available in the browser")})),c(S,t,e)}),ts}function gs(){if(ns)return rs;ns=1,rs=s;var t=us().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,r=t.ERR_MULTIPLE_CALLBACK,n=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=t.ERR_TRANSFORM_WITH_LENGTH_0,o=ls();function a(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);o.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},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.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(e,r){u(t,e,r)}))}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new i;if(t._transformState.transforming)throw new n;return t.push(null)}return bt(s,o),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,o.prototype.push.call(this,t,e)},s.prototype._transform=function(t,r,n){n(new e("_transform()"))},s.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)}},s.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},s.prototype._destroy=function(t,e){o.prototype._destroy.call(this,t,(function(t){e(t)}))},rs}var ys=vs,ms=_.EventEmitter;function vs(){ms.call(this)}bt(vs,ms),vs.Readable=bs(),vs.Writable=hs(),vs.Duplex=ls(),vs.Transform=gs(),vs.PassThrough=function(){if(os)return is;os=1,is=e;var t=gs();function e(r){if(!(this instanceof e))return new e(r);t.call(this,r)}return bt(e,t),e.prototype._transform=function(t,e,r){r(null,t)},is}(),vs.finished=ds(),vs.pipeline=function(){if(ss)return as;var t;ss=1;var e=us().codes,r=e.ERR_MISSING_ARGS,n=e.ERR_STREAM_DESTROYED;function i(t){if(t)throw t}function o(t){t()}function a(t,e){return t.pipe(e)}return as=function(){for(var e=arguments.length,s=new Array(e),f=0;f<e;f++)s[f]=arguments[f];var u,c=function(t){return t.length?"function"!=typeof t[t.length-1]?i:t.pop():i}(s);if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new r("streams");var h=s.map((function(e,r){var i=r<s.length-1;return function(e,r,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===t&&(t=ds()),t(e,{readable:r,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var s=!1;return function(t){if(!a&&!s)return s=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new n("pipe"))}}(e,i,r>0,(function(t){u||(u=t),t&&h.forEach(o),i||(h.forEach(o),c(u))}))}));return s.reduce(a)},as}(),vs.Stream=vs,vs.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",i),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(u(),0===ms.listenerCount(this,"error"))throw t}function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",f),t.on("error",f),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t};var _s=ft.Buffer,ws=ys.Transform,Es=di.StringDecoder,Ss=Ln;function As(t){ws.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}bt(As,ws),As.prototype.update=function(t,e,r){var n=Ss(t,e),i=this._update(n);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},As.prototype.setAutoPadding=function(){},As.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},As.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},As.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},As.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},As.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},As.prototype._finalOrDigest=function(t){var e=this.__final()||_s.alloc(0);return t&&(e=this._toString(e,t,!0)),e},As.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new Es(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var Ms=As,ks=Qi,Ts=mo,Bs=Na,xs=Ms;function Os(t){xs.call(this,"digest"),this._hash=t}bt(Os,xs),Os.prototype._update=function(t){this._hash.update(t)},Os.prototype._final=function(){return this._hash.digest()};var js=function(t){return"md5"===(t=t.toLowerCase())?new ks:"rmd160"===t||"ripemd160"===t?new Ts:new Os(Bs(t))},Rs=r(js),Is=bt,Ps=ft.Buffer,Cs=Ms,Ls=Ps.alloc(128),Ns=64;function Us(t,e){Cs.call(this,"digest"),"string"==typeof e&&(e=Ps.from(e)),this._alg=t,this._key=e,e.length>Ns?e=t(e):e.length<Ns&&(e=Ps.concat([e,Ls],Ns));for(var r=this._ipad=Ps.allocUnsafe(Ns),n=this._opad=Ps.allocUnsafe(Ns),i=0;i<Ns;i++)r[i]=54^e[i],n[i]=92^e[i];this._hash=[r]}Is(Us,Cs),Us.prototype._update=function(t){this._hash.push(t)},Us.prototype._final=function(){var t=this._alg(Ps.concat(this._hash));return this._alg(Ps.concat([this._opad,t]))};var Fs=Qi,Ds=function(t){return(new Fs).update(t).digest()},qs=bt,zs=Us,Hs=Ms,Vs=ft.Buffer,Ws=Ds,Ks=mo,$s=Na,Gs=Vs.alloc(128);function Zs(t,e){Hs.call(this,"digest"),"string"==typeof e&&(e=Vs.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new Ks:$s(t)).update(e).digest():e.length<r&&(e=Vs.concat([e,Gs],r));for(var n=this._ipad=Vs.allocUnsafe(r),i=this._opad=Vs.allocUnsafe(r),o=0;o<r;o++)n[o]=54^e[o],i[o]=92^e[o];this._hash="rmd160"===t?new Ks:$s(t),this._hash.update(n)}qs(Zs,Hs),Zs.prototype._update=function(t){this._hash.update(t)},Zs.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Ks:$s(this._alg)).update(this._opad).update(t).digest()};var Js,Xs=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Zs("rmd160",e):"md5"===t?new zs(Ws,e):new Zs(t,e)},Ys=r(Xs),Qs={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},tf=Qs,ef={},rf=isFinite,nf=Math.pow(2,30)-1,of=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0||!rf(t))throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>nf||e!=e)throw new TypeError("Bad key length")};if(e.process&&e.process.browser)Js="utf-8";else if(e.process&&e.process.version){Js=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else Js="utf-8";var af=Js,sf=ft.Buffer,ff=Ln,uf="undefined"!=typeof Uint8Array,cf=uf&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView,hf=function(t,e,r){if("string"==typeof t||sf.isBuffer(t)||uf&&t instanceof Uint8Array||cf&&cf(t))return ff(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")},lf=Ds,df=mo,pf=Na,bf=ft.Buffer,gf=of,yf=af,mf=hf,vf=bf.alloc(128),_f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},wf={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function Ef(t){return(new df).update(t).digest()}function Sf(t,e,r){var n=function(t){return"rmd160"===t||"ripemd160"===t?Ef:"md5"===t?lf:function(e){return pf(t).update(e).digest()}}(t),i="sha512"===t||"sha384"===t?128:64;e.length>i?e=n(e):e.length<i&&(e=bf.concat([e,vf],i));for(var o=bf.allocUnsafe(i+_f[t]),a=bf.allocUnsafe(i+_f[t]),s=0;s<i;s++)o[s]=54^e[s],a[s]=92^e[s];var f=bf.allocUnsafe(i+r+4);o.copy(f,0,0,i),this.ipad1=f,this.ipad2=o,this.opad=a,this.alg=t,this.blocksize=i,this.hash=n,this.size=_f[t]}Sf.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var Af,Mf,kf=function(t,e,r,n,i){gf(r,n),t=mf(t,yf,"Password"),e=mf(e,yf,"Salt");var o=(i||"sha1").toLowerCase(),a=wf[o]||o,s=_f[a];if("number"!=typeof s||!s)throw new TypeError("Digest algorithm not supported: "+i);var f=new Sf(a,t,e.length),u=bf.allocUnsafe(n),c=bf.allocUnsafe(e.length+4);e.copy(c,0,0,e.length);for(var h=0,l=s,d=Math.ceil(n/l),p=1;p<=d;p++){c.writeUInt32BE(p,e.length);for(var b=f.run(c,f.ipad1),g=b,y=1;y<r;y++){g=f.run(g,f.ipad2);for(var m=0;m<l;m++)b[m]^=g[m]}b.copy(u,h),h+=l}return u},Tf=ft.Buffer,Bf=of,xf=af,Of=kf,jf=hf,Rf=e.crypto&&e.crypto.subtle,If={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Pf=[];function Cf(){return Mf||(Mf=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function Lf(t,e,r,n,i){return Rf.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return Rf.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return Tf.from(t)}))}ef.pbkdf2=function(t,r,n,i,o,a){if("function"==typeof o&&(a=o,o=void 0),Bf(n,i),t=jf(t,xf,"Password"),r=jf(r,xf,"Salt"),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");var s=If[(o=o||"sha1").toLowerCase()];s&&"function"==typeof e.Promise?function(t,e){t.then((function(t){Cf()((function(){e(null,t)}))}),(function(t){Cf()((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!Rf||!Rf.importKey||!Rf.deriveBits)return Promise.resolve(!1);if(void 0!==Pf[t])return Pf[t];var r=Lf(Af=Af||Tf.alloc(8),Af,10,128,t).then((function(){return!0}),(function(){return!1}));return Pf[t]=r,r}(s).then((function(e){return e?Lf(t,r,n,i,s):Of(t,r,n,i,o)})),a):Cf()((function(){var e;try{e=Of(t,r,n,i,o)}catch(t){return void a(t)}a(null,e)}))},ef.pbkdf2Sync=kf;var Nf={},Uf={},Ff={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},ip:function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},rip:function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},pc1:function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},Df=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ff.pc2=function(t,e,r,n){for(var i=0,o=0,a=Df.length>>>1,s=0;s<a;s++)i<<=1,i|=t>>>Df[s]&1;for(s=a;s<Df.length;s++)o<<=1,o|=e>>>Df[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},Ff.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var qf=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ff.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=qf[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=qf[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var zf=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ff.permute=function(t){for(var e=0,r=0;r<zf.length;r++)e<<=1,e|=t>>>zf[r]&1;return e>>>0},Ff.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")};var Hf=W;function Vf(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var Wf=Vf;Vf.prototype._init=function(){},Vf.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},Vf.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},Vf.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},Vf.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},Vf.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},Vf.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},Vf.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},Vf.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},Vf.prototype._unpad=function(t){return t},Vf.prototype._finalDecrypt=function(){Hf.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var Kf=W,$f=Ff,Gf=Wf;function Zf(){this.tmp=new Array(2),this.keys=null}function Jf(t){Gf.call(this,t);var e=new Zf;this._desState=e,this.deriveKeys(e,t.key)}bt(Jf,Gf);var Xf=Jf;Jf.create=function(t){return new Jf(t)};var Yf=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Jf.prototype.deriveKeys=function(t,e){t.keys=new Array(32),Kf.equal(e.length,this.blockSize,"Invalid key length");var r=$f.readUInt32BE(e,0),n=$f.readUInt32BE(e,4);$f.pc1(r,n,t.tmp,0),r=t.tmp[0],n=t.tmp[1];for(var i=0;i<t.keys.length;i+=2){var o=Yf[i>>>1];r=$f.r28shl(r,o),n=$f.r28shl(n,o),$f.pc2(r,n,t.keys,i)}},Jf.prototype._update=function(t,e,r,n){var i=this._desState,o=$f.readUInt32BE(t,e),a=$f.readUInt32BE(t,e+4);$f.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],$f.writeUInt32BE(r,o,n),$f.writeUInt32BE(r,a,n+4)},Jf.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},Jf.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)Kf.equal(t[r],e);return t.slice(0,t.length-e)},Jf.prototype._encrypt=function(t,e,r,n,i){for(var o=e,a=r,s=0;s<t.keys.length;s+=2){var f=t.keys[s],u=t.keys[s+1];$f.expand(a,t.tmp,0),f^=t.tmp[0],u^=t.tmp[1];var c=$f.substitute(f,u),h=a;a=(o^$f.permute(c))>>>0,o=h}$f.rip(a,o,n,i)},Jf.prototype._decrypt=function(t,e,r,n,i){for(var o=r,a=e,s=t.keys.length-2;s>=0;s-=2){var f=t.keys[s],u=t.keys[s+1];$f.expand(o,t.tmp,0),f^=t.tmp[0],u^=t.tmp[1];var c=$f.substitute(f,u),h=o;o=(a^$f.permute(c))>>>0,a=h}$f.rip(o,a,n,i)};var Qf={},tu=W,eu=bt,ru={};function nu(t){tu.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Qf.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}eu(e,t);for(var r=Object.keys(ru),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=ru[i]}return e.create=function(t){return new e(t)},e},ru._cbcInit=function(){var t=new nu(this.options.iv);this._cbcState=t},ru._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=t[e+s];o._update.call(this,a,0,r,n);for(s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{o._update.call(this,t,e,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=t[e+s]}};var iu=W,ou=Wf,au=Xf;function su(t,e){iu.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);this.ciphers="encrypt"===t?[au.create({type:"encrypt",key:r}),au.create({type:"decrypt",key:n}),au.create({type:"encrypt",key:i})]:[au.create({type:"decrypt",key:i}),au.create({type:"encrypt",key:n}),au.create({type:"decrypt",key:r})]}function fu(t){ou.call(this,t);var e=new su(this.type,this.options.key);this._edeState=e}bt(fu,ou);var uu=fu;fu.create=function(t){return new fu(t)},fu.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},fu.prototype._pad=au.prototype._pad,fu.prototype._unpad=au.prototype._unpad,Uf.utils=Ff,Uf.Cipher=Wf,Uf.DES=Xf,Uf.CBC=Qf,Uf.EDE=uu;var cu=Ms,hu=Uf,lu=bt,du=ft.Buffer,pu={"des-ede3-cbc":hu.CBC.instantiate(hu.EDE),"des-ede3":hu.EDE,"des-ede-cbc":hu.CBC.instantiate(hu.EDE),"des-ede":hu.EDE,"des-cbc":hu.CBC.instantiate(hu.DES),"des-ecb":hu.DES};pu.des=pu["des-cbc"],pu.des3=pu["des-ede3-cbc"];var bu=gu;function gu(t){cu.call(this);var e,r=t.mode.toLowerCase(),n=pu[r];e=t.decrypt?"decrypt":"encrypt";var i=t.key;du.isBuffer(i)||(i=du.from(i)),"des-ede"!==r&&"des-ede-cbc"!==r||(i=du.concat([i,i.slice(0,8)]));var o=t.iv;du.isBuffer(o)||(o=du.from(o)),this._des=n.create({key:i,iv:o,type:e})}lu(gu,cu),gu.prototype._update=function(t){return du.from(this._des.update(t))},gu.prototype._final=function(){return du.from(this._des.final())};var yu={},mu={},vu={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},_u={},wu=function(t,e){for(var r=Math.min(t.length,e.length),n=new Buffer(r),i=0;i<r;++i)n[i]=t[i]^e[i];return n},Eu=wu;_u.encrypt=function(t,e){var r=Eu(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},_u.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return Eu(n,r)};var Su={},Au=ft.Buffer,Mu=wu;function ku(t,e,r){var n=e.length,i=Mu(e,t._cache);return t._cache=t._cache.slice(n),t._prev=Au.concat([t._prev,r?e:i]),i}Su.encrypt=function(t,e,r){for(var n,i=Au.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Au.allocUnsafe(0)),!(t._cache.length<=e.length)){i=Au.concat([i,ku(t,e,r)]);break}n=t._cache.length,i=Au.concat([i,ku(t,e.slice(0,n),r)]),e=e.slice(n)}return i};var Tu={},Bu=ft.Buffer;function xu(t,e,r){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=Bu.concat([t._prev.slice(1),Bu.from([r?e:n])]),n}Tu.encrypt=function(t,e,r){for(var n=e.length,i=Bu.allocUnsafe(n),o=-1;++o<n;)i[o]=xu(t,e[o],r);return i};var Ou={},ju=ft.Buffer;function Ru(t,e,r){for(var n,i,o=-1,a=0;++o<8;)n=e&1<<7-o?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>o%8,t._prev=Iu(t._prev,r?n:i);return a}function Iu(t,e){var r=t.length,n=-1,i=ju.allocUnsafe(t.length);for(t=ju.concat([t,ju.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}Ou.encrypt=function(t,e,r){for(var n=e.length,i=ju.allocUnsafe(n),o=-1;++o<n;)i[o]=Ru(t,e[o],r);return i};var Pu={},Cu=wu;function Lu(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}Pu.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=Buffer.concat([t._cache,Lu(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Cu(e,r)};var Nu={};var Uu=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}},Fu=wu,Du=ft.Buffer,qu=Uu;function zu(t){var e=t._cipher.encryptBlockRaw(t._prev);return qu(t._prev),e}Nu.encrypt=function(t,e){var r=Math.ceil(e.length/16),n=t._cache.length;t._cache=Du.concat([t._cache,Du.allocUnsafe(16*r)]);for(var i=0;i<r;i++){var o=zu(t),a=n+16*i;t._cache.writeUInt32BE(o[0],a+0),t._cache.writeUInt32BE(o[1],a+4),t._cache.writeUInt32BE(o[2],a+8),t._cache.writeUInt32BE(o[3],a+12)}var s=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Fu(e,s)};var Hu={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Vu={ECB:vu,CBC:_u,CFB:Su,CFB8:Tu,CFB1:Ou,OFB:Pu,CTR:Nu,GCM:Nu},Wu=Hu;for(var Ku in Wu)Wu[Ku].module=Vu[Wu[Ku].mode];var $u=Wu,Gu={},Zu=ft.Buffer;function Ju(t){Zu.isBuffer(t)||(t=Zu.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function Xu(t){for(;0<t.length;t++)t[0]=0}function Yu(t,e,r,n,i){for(var o,a,s,f,u=r[0],c=r[1],h=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],b=t[2]^e[2],g=t[3]^e[3],y=4,m=1;m<i;m++)o=u[d>>>24]^c[p>>>16&255]^h[b>>>8&255]^l[255&g]^e[y++],a=u[p>>>24]^c[b>>>16&255]^h[g>>>8&255]^l[255&d]^e[y++],s=u[b>>>24]^c[g>>>16&255]^h[d>>>8&255]^l[255&p]^e[y++],f=u[g>>>24]^c[d>>>16&255]^h[p>>>8&255]^l[255&b]^e[y++],d=o,p=a,b=s,g=f;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&g])^e[y++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^e[y++],s=(n[b>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[y++],f=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^e[y++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var Qu=[0,1,2,4,8,16,32,64,128,27,54],tc=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var c=t[a],h=t[c],l=t[h],d=257*t[u]^16843008*u;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*c^16843008*a,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===a?a=s=1:(a=c^t[t[t[l^c]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function ec(t){this._key=Ju(t),this._reset()}ec.blockSize=16,ec.keySize=32,ec.prototype.blockSize=ec.blockSize,ec.prototype.keySize=ec.keySize,ec.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var a=i[o-1];o%e==0?(a=a<<8|a>>>24,a=tc.SBOX[a>>>24]<<24|tc.SBOX[a>>>16&255]<<16|tc.SBOX[a>>>8&255]<<8|tc.SBOX[255&a],a^=Qu[o/e|0]<<24):e>6&&o%e==4&&(a=tc.SBOX[a>>>24]<<24|tc.SBOX[a>>>16&255]<<16|tc.SBOX[a>>>8&255]<<8|tc.SBOX[255&a]),i[o]=i[o-e]^a}for(var s=[],f=0;f<n;f++){var u=n-f,c=i[u-(f%4?0:4)];s[f]=f<4||u<=4?c:tc.INV_SUB_MIX[0][tc.SBOX[c>>>24]]^tc.INV_SUB_MIX[1][tc.SBOX[c>>>16&255]]^tc.INV_SUB_MIX[2][tc.SBOX[c>>>8&255]]^tc.INV_SUB_MIX[3][tc.SBOX[255&c]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},ec.prototype.encryptBlockRaw=function(t){return Yu(t=Ju(t),this._keySchedule,tc.SUB_MIX,tc.SBOX,this._nRounds)},ec.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Zu.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},ec.prototype.decryptBlock=function(t){var e=(t=Ju(t))[1];t[1]=t[3],t[3]=e;var r=Yu(t,this._invKeySchedule,tc.INV_SUB_MIX,tc.INV_SBOX,this._nRounds),n=Zu.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},ec.prototype.scrub=function(){Xu(this._keySchedule),Xu(this._invKeySchedule),Xu(this._key)},Gu.AES=ec;var rc=ft.Buffer,nc=rc.alloc(16,0);function ic(t){var e=rc.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function oc(t){this.h=t,this.state=rc.alloc(16,0),this.cache=rc.allocUnsafe(0)}oc.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},oc.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(!!(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=ic(i)},oc.prototype.update=function(t){var e;for(this.cache=rc.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},oc.prototype.final=function(t,e){return this.cache.length&&this.ghash(rc.concat([this.cache,nc],16)),this.ghash(ic([0,t,0,e])),this.state};var ac=oc,sc=Gu,fc=ft.Buffer,uc=Ms,cc=ac,hc=wu,lc=Uu;function dc(t,e,r,n){uc.call(this);var i=fc.alloc(4,0);this._cipher=new sc.AES(e);var o=this._cipher.encryptBlock(i);this._ghash=new cc(o),r=function(t,e,r){if(12===e.length)return t._finID=fc.concat([e,fc.from([0,0,0,1])]),fc.concat([e,fc.from([0,0,0,2])]);var n=new cc(r),i=e.length,o=i%16;n.update(e),o&&(o=16-o,n.update(fc.alloc(o,0))),n.update(fc.alloc(8,0));var a=8*i,s=fc.alloc(8);s.writeUIntBE(a,0,8),n.update(s),t._finID=n.state;var f=fc.from(t._finID);return lc(f),f}(this,r,o),this._prev=fc.from(r),this._cache=fc.allocUnsafe(0),this._secCache=fc.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}bt(dc,uc),dc.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=fc.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},dc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=hc(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},dc.prototype.getAuthTag=function(){if(this._decrypt||!fc.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},dc.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},dc.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var pc=dc,bc=Gu,gc=ft.Buffer,yc=Ms;function mc(t,e,r,n){yc.call(this),this._cipher=new bc.AES(e),this._prev=gc.from(r),this._cache=gc.allocUnsafe(0),this._secCache=gc.allocUnsafe(0),this._decrypt=n,this._mode=t}bt(mc,yc),mc.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},mc.prototype._final=function(){this._cipher.scrub()};var vc=mc,_c=ft.Buffer,wc=Qi;var Ec=function(t,e,r,n){if(_c.isBuffer(t)||(t=_c.from(t,"binary")),e&&(_c.isBuffer(e)||(e=_c.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=_c.alloc(i),a=_c.alloc(n||0),s=_c.alloc(0);i>0||n>0;){var f=new wc;f.update(s),f.update(t),e&&f.update(e),s=f.digest();var u=0;if(i>0){var c=o.length-i;u=Math.min(i,s.length),s.copy(o,c,0,u),i-=u}if(u<s.length&&n>0){var h=a.length-n,l=Math.min(n,s.length-u);s.copy(a,h,u,u+l),n-=l}}return s.fill(0),{key:o,iv:a}},Sc=$u,Ac=pc,Mc=ft.Buffer,kc=vc,Tc=Ms,Bc=Gu,xc=Ec;function Oc(t,e,r){Tc.call(this),this._cache=new Rc,this._cipher=new Bc.AES(e),this._prev=Mc.from(r),this._mode=t,this._autopadding=!0}bt(Oc,Tc),Oc.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return Mc.concat(n)};var jc=Mc.alloc(16,16);function Rc(){this.cache=Mc.allocUnsafe(0)}function Ic(t,e,r){var n=Sc[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=Mc.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=Mc.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new kc(n.module,e,r):"auth"===n.type?new Ac(n.module,e,r):new Oc(n.module,e,r)}Oc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(jc))throw this._cipher.scrub(),new Error("data not multiple of block length")},Oc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Rc.prototype.add=function(t){this.cache=Mc.concat([this.cache,t])},Rc.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},Rc.prototype.flush=function(){for(var t=16-this.cache.length,e=Mc.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return Mc.concat([this.cache,e])},mu.createCipheriv=Ic,mu.createCipher=function(t,e){var r=Sc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=xc(e,!1,r.key,r.iv);return Ic(t,n.key,n.iv)};var Pc={},Cc=pc,Lc=ft.Buffer,Nc=$u,Uc=vc,Fc=Ms,Dc=Gu,qc=Ec;function zc(t,e,r){Fc.call(this),this._cache=new Hc,this._last=void 0,this._cipher=new Dc.AES(e),this._prev=Lc.from(r),this._mode=t,this._autopadding=!0}function Hc(){this.cache=Lc.allocUnsafe(0)}function Vc(t,e,r){var n=Nc[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=Lc.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=Lc.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===n.type?new Uc(n.module,e,r,!0):"auth"===n.type?new Cc(n.module,e,r,!0):new zc(n.module,e,r)}bt(zc,Fc),zc.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return Lc.concat(n)},zc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},zc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Hc.prototype.add=function(t){this.cache=Lc.concat([this.cache,t])},Hc.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Hc.prototype.flush=function(){if(this.cache.length)return this.cache},Pc.createDecipher=function(t,e){var r=Nc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=qc(e,!1,r.key,r.iv);return Vc(t,n.key,n.iv)},Pc.createDecipheriv=Vc;var Wc=mu,Kc=Pc,$c=Hu;yu.createCipher=yu.Cipher=Wc.createCipher,yu.createCipheriv=yu.Cipheriv=Wc.createCipheriv,yu.createDecipher=yu.Decipher=Kc.createDecipher,yu.createDecipheriv=yu.Decipheriv=Kc.createDecipheriv,yu.listCiphers=yu.getCiphers=function(){return Object.keys($c)};var Gc={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(Gc);var Zc=bu,Jc=yu,Xc=$u,Yc=Gc,Qc=Ec;function th(t,e,r){if(t=t.toLowerCase(),Xc[t])return Jc.createCipheriv(t,e,r);if(Yc[t])return new Zc({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function eh(t,e,r){if(t=t.toLowerCase(),Xc[t])return Jc.createDecipheriv(t,e,r);if(Yc[t])return new Zc({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}Nf.createCipher=Nf.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),Xc[t])r=Xc[t].key,n=Xc[t].iv;else{if(!Yc[t])throw new TypeError("invalid suite type");r=8*Yc[t].key,n=Yc[t].iv}var i=Qc(e,!1,r,n);return th(t,i.key,i.iv)},Nf.createCipheriv=Nf.Cipheriv=th,Nf.createDecipher=Nf.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),Xc[t])r=Xc[t].key,n=Xc[t].iv;else{if(!Yc[t])throw new TypeError("invalid suite type");r=8*Yc[t].key,n=Yc[t].iv}var i=Qc(e,!1,r,n);return eh(t,i.key,i.iv)},Nf.createDecipheriv=Nf.Decipheriv=eh,Nf.listCiphers=Nf.getCiphers=function(){return Object.keys(Yc).concat(Jc.getCiphers())};var rh,nh,ih,oh,ah={};function sh(){if(nh)return rh;nh=1;var t=V,e=Hd();function r(t){this.rand=t||new e.Rand}return rh=r,r.create=function(t){return new r(t)},r.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do{var i=new t(this.rand.generate(n))}while(i.cmp(e)>=0);return i},r.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},r.prototype.test=function(e,r,n){var i=e.bitLength(),o=t.mont(e),a=new t(1).toRed(o);r||(r=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var u=e.shrn(f),c=s.toRed(o);r>0;r--){var h=this._randrange(new t(2),s);n&&n(h);var l=h.toRed(o).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var d=1;d<f;d++){if(0===(l=l.redSqr()).cmp(a))return!1;if(0===l.cmp(c))break}if(d===f)return!1}}return!0},r.prototype.getDivisor=function(e,r){var n=e.bitLength(),i=t.mont(e),o=new t(1).toRed(i);r||(r=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var f=e.shrn(s),u=a.toRed(i);r>0;r--){var c=this._randrange(new t(2),a),h=e.gcd(c);if(0!==h.cmpn(1))return h;var l=c.toRed(i).redPow(f);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var d=1;d<s;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(u))break}if(d===s)return(l=l.redSqr()).fromRed().subn(1).gcd(e)}}return!1},rh}function fh(){if(oh)return ih;oh=1;var t=dt;ih=b,b.simpleSieve=d,b.fermatTest=p;var e=V,r=new e(24),n=new(sh()),i=new e(1),o=new e(2),a=new e(5);new e(16),new e(8);var s=new e(10),f=new e(3);new e(7);var u=new e(11),c=new e(4);new e(12);var h=null;function l(){if(null!==h)return h;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return h=t,t}function d(t){for(var e=l(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function p(t){var r=e.mont(t);return 0===o.toRed(r).redPow(t.subn(1)).fromRed().cmpn(1)}function b(h,l){if(h<16)return new e(2===l||5===l?[140,123]:[140,39]);var b,g;for(l=new e(l);;){for(b=new e(t(Math.ceil(h/8)));b.bitLength()>h;)b.ishrn(1);if(b.isEven()&&b.iadd(i),b.testn(1)||b.iadd(o),l.cmp(o)){if(!l.cmp(a))for(;b.mod(s).cmp(f);)b.iadd(c)}else for(;b.mod(r).cmp(u);)b.iadd(c);if(d(g=b.shrn(1))&&d(b)&&p(g)&&p(b)&&n.test(g)&&n.test(b))return b}}return ih}var uh,ch,hh,lh={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function dh(){if(ch)return uh;ch=1;var t=V,e=new(sh()),r=new t(24),n=new t(11),i=new t(10),o=new t(3),a=new t(7),s=fh(),f=dt;function u(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this._pub=new t(e),this}function c(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this._priv=new t(e),this}uh=l;var h={};function l(e,r,n){this.setGenerator(r),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=u,this.setPrivateKey=c):this._primeCode=8}function d(t,e){var r=new Buffer(t.toArray());return e?r.toString(e):r}return Object.defineProperty(l.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,f){var u=f.toString("hex"),c=[u,t.toString(16)].join("_");if(c in h)return h[c];var l,d=0;if(t.isEven()||!s.simpleSieve||!s.fermatTest(t)||!e.test(t))return d+=1,d+="02"===u||"05"===u?8:4,h[c]=d,d;switch(e.test(t.shrn(1))||(d+=2),u){case"02":t.mod(r).cmp(n)&&(d+=8);break;case"05":(l=t.mod(i)).cmp(o)&&l.cmp(a)&&(d+=8);break;default:d+=4}return h[c]=d,d}(this.__prime,this.__gen)),this._primeCode}}),l.prototype.generateKeys=function(){return this._priv||(this._priv=new t(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},l.prototype.computeSecret=function(e){var r=(e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new Buffer(r.toArray()),i=this.getPrime();if(n.length<i.length){var o=new Buffer(i.length-n.length);o.fill(0),n=Buffer.concat([o,n])}return n},l.prototype.getPublicKey=function(t){return d(this._pub,t)},l.prototype.getPrivateKey=function(t){return d(this._priv,t)},l.prototype.getPrime=function(t){return d(this.__prime,t)},l.prototype.getGenerator=function(t){return d(this._gen,t)},l.prototype.setGenerator=function(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this.__gen=e,this._gen=new t(e),this},uh}var ph={exports:{}},bh={exports:{}};!function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function i(t,e,r){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:H.Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),f=e;f<s;f++){var u=t.charCodeAt(f)-48;o*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a<i,"Invalid character"),o+=a}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},i.prototype._move=function(t){u(t,this)},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(t){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],f=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?h[6-f.length]+f+n:f+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(t);n=(p=p.idivn(c)).isZero()?b+n:h[u-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=f>>>26,h=67108863&f,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===o?(r<t.length&&(t[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},i.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},i.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},i.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},i.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var b=function(t,e,r){var n,i,o,a=t.words,s=e.words,f=r.words,u=0,c=0|a[0],h=8191&c,l=c>>>13,d=0|a[1],p=8191&d,b=d>>>13,g=0|a[2],y=8191&g,m=g>>>13,v=0|a[3],_=8191&v,w=v>>>13,E=0|a[4],S=8191&E,A=E>>>13,M=0|a[5],k=8191&M,T=M>>>13,B=0|a[6],x=8191&B,O=B>>>13,j=0|a[7],R=8191&j,I=j>>>13,P=0|a[8],C=8191&P,L=P>>>13,N=0|a[9],U=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],$=8191&K,G=K>>>13,Z=0|s[3],J=8191&Z,X=Z>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ft=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,lt=ct>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0;var mt=(u+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,$)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(u+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,X)|0;var _t=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(u+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Et=(u+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(I,q)|0,o=Math.imul(I,z),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var St=(u+(n=n+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,ut)|0)+Math.imul(l,ft)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;u=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0;var Mt=(u+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,ut)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,G))+Math.imul(F,$)|0,o=Math.imul(F,G),n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Tt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,X))+Math.imul(F,J)|0,o=Math.imul(F,X),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0;var Bt=(u+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var xt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,lt)|0;var Ot=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ut)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var jt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,ut))+Math.imul(F,ft)|0,o=Math.imul(F,ut),n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,lt)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(u+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,bt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,bt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,f[0]=gt,f[1]=yt,f[2]=mt,f[3]=vt,f[4]=_t,f[5]=wt,f[6]=Et,f[7]=St,f[8]=At,f[9]=Mt,f[10]=kt,f[11]=Tt,f[12]=Bt,f[13]=xt,f[14]=Ot,f[15]=jt,f[16]=Rt,f[17]=It,f[18]=Pt,0!==u&&(f[19]=u,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,f=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=f;u++){var c=o-u,h=(0|t.words[c])*(0|e.words[u]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return g(t,e,r)}Math.imul||(b=p),i.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?b(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):y(this,t,e)},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),y(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),this.length=0===t?1:this.length,e?this.ineg():this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,f=(0|this.words[e])-s<<n;this.words[e]=f|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,f=n;if(i-=a,i=Math.max(0,i),f){for(var u=0;u<a;u++)f.words[u]=this.words[u];f.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var f=(0|t.words[i])*e;s=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,f=n.length-o.length;if("mod"!==e){(s=new i(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(o,1,f);0===c.negative&&(n=c,s&&(s.words[f]=1));for(var h=f-1;h>=0;h--){var l=67108864*(0|n.words[o.length+h])+(0|n.words[o.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},i.prototype.modn=function(t){return this.modrn(t)},i.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),a=new i(0),s=new i(0),f=new i(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;!(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(h)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;!(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(h)),s.iushrn(1),f.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(f)):(n.isub(e),s.isub(o),f.isub(a))}return{a:s,b:f,gcd:n.iushln(u)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new i(1),s=new i(0),f=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;!(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var h=0,l=1;!(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new A(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(_,v),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(E,v),n(S,v),S.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new w;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return m[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var h=this.pow(c,o),l=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=a;0!==d.cmp(s);){for(var b=d,g=0;0!==b.cmp(s);g++)b=b.redSqr();r(g<p);var y=this.pow(h,new i(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],a=0,s=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=f-1;c>=0;c--){var h=u>>c&1;o!==r[0]&&(o=this.sqr(o)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}f=26}return o},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new M(t)},n(M,A),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,e)}(bh);var gh=bh.exports,yh=r(gh),mh=gh,vh=dt,_h=ft.Buffer;function wh(t){var e,r=t.modulus.byteLength();do{e=new mh(vh(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function Eh(t,e){var r=function(t){var e=wh(t);return{blinder:e.toRed(mh.mont(t.modulus)).redPow(new mh(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),n=e.modulus.byteLength(),i=new mh(t).mul(r.blinder).umod(e.modulus),o=i.toRed(mh.mont(e.prime1)),a=i.toRed(mh.mont(e.prime2)),s=e.coefficient,f=e.prime1,u=e.prime2,c=o.redPow(e.exponent1).fromRed(),h=a.redPow(e.exponent2).fromRed(),l=c.isub(h).imul(s).umod(f).imul(u);return h.iadd(l).imul(r.unblinder).umod(e.modulus).toArrayLike(_h,"be",n)}Eh.getr=wh;var Sh,Ah=Eh,Mh={},kh={},Th={};var Bh={},xh={},Oh=bt;function jh(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Rh(t,e){this.path=t,this.rethrow(e)}xh.Reporter=jh,jh.prototype.isError=function(t){return t instanceof Rh},jh.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},jh.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},jh.prototype.enterKey=function(t){return this._reporterState.path.push(t)},jh.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},jh.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},jh.prototype.path=function(){return this._reporterState.path.join("/")},jh.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},jh.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},jh.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof Rh;if(e=n?t:new Rh(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},jh.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},Oh(Rh,Error),Rh.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Rh),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var Ih,Ph,Ch,Lh,Nh={};function Uh(){if(Ih)return Nh;Ih=1;var t=bt,e=Fh().Reporter,r=Y.Buffer;function n(t,n){e.call(this,n),r.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function i(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof i||(t=new i(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=r.byteLength(t);else{if(!r.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}return t(n,e),Nh.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(t){var r=new n(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,e.prototype.restore.call(this,t.reporter),r},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},n.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},n.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},Nh.EncoderBuffer=i,i.prototype.join=function(t,e){return t||(t=new r(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):r.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t},Nh}function Fh(){return Lh||(Lh=1,function(t){var e=t;e.Reporter=xh.Reporter,e.DecoderBuffer=Uh().DecoderBuffer,e.EncoderBuffer=Uh().EncoderBuffer,e.Node=function(){if(Ch)return Ph;Ch=1;var t=Fh().Reporter,e=Fh().EncoderBuffer,r=Fh().DecoderBuffer,n=W,i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i);function a(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}Ph=a;var s=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return a.prototype.clone=function(){var t=this._baseState,e={};s.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},a.prototype._wrap=function(){var t=this._baseState;o.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},a.prototype._init=function(t){var e=this._baseState;n(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),n.equal(e.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(n(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(n(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){a.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),i.forEach((function(t){a.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return n(null===e.tag),e.tag=t,this._useArgs(r),this}})),a.prototype.use=function(t){n(t);var e=this._baseState;return n(null===e.use),e.use=t,this},a.prototype.optional=function(){return this._baseState.optional=!0,this},a.prototype.def=function(t){var e=this._baseState;return n(null===e.default),e.default=t,e.optional=!0,this},a.prototype.explicit=function(t){var e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.explicit=t,this},a.prototype.implicit=function(t){var e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.implicit=t,this},a.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},a.prototype.key=function(t){var e=this._baseState;return n(null===e.key),e.key=t,this},a.prototype.any=function(){return this._baseState.any=!0,this},a.prototype.choice=function(t){var e=this._baseState;return n(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},a.prototype.contains=function(t){var e=this._baseState;return n(null===e.use),e.contains=t,this},a.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var i,o=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){var f=null;if(null!==n.explicit?f=n.explicit:null!==n.implicit?f=n.implicit:null!==n.tag&&(f=n.tag),null!==f||n.any){if(a=this._peekTag(t,f,n.any),t.isError(a))return a}else{var u=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(u)}}if(n.obj&&a&&(i=t.enterObject()),a){if(null!==n.explicit){var c=this._decodeTag(t,n.explicit);if(t.isError(c))return c;t=c}var h=t.offset;if(null===n.use&&null===n.choice){n.any&&(u=t.save());var l=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(l))return l;n.any?o=t.raw(u):t=l}if(e&&e.track&&null!==n.tag&&e.track(t.path(),h,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(r){r._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var d=new r(o);o=this._getUse(n.contains,t._reporterState.obj)._decode(d,e)}}return n.obj&&a&&(o=t.leaveObject(i)),null===n.key||null===o&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,o),o},a.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},a.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),n(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},a.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=t.save(),s=r.choice[o];try{var f=s._decode(t,e);if(t.isError(f))return!1;n={type:o,value:f},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?n:t.error("Choice not matched")},a.prototype._createEncoderBuffer=function(t){return new e(t,this.reporter)},a.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},a.prototype._encodeValue=function(e,r,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,r||new t);var o=null;if(this.reporter=r,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,r);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,r),s=!0;else if(i.children)a=i.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,r,e);if(null===t._baseState.key)return r.error("Child should have a key");var n=r.enterKey(t._baseState.key);if("object"!=typeof e)return r.error("Child expected, but input is not object");var i=t._encode(e[t._baseState.key],r,e);return r.leaveKey(n),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(t){var n=this._baseState;return this._getUse(n.args[0],e)._encode(t,r)}),f))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,r):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===u?null===i.use&&r.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,s,c,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},a.prototype._encodeChoice=function(t,e){var r=this._baseState,i=r.choice[t.type];return i||n(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},a.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},a.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},a.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)},Ph}()}(Bh)),Bh}var Dh,qh,zh={},Hh={};function Vh(){return qh||(qh=1,function(t){var e=t;e._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},e.der=(Dh||(Dh=1,function(t){var e=Vh();t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e._reverse(t.tag)}(Hh)),Hh)}(zh)),zh}var Wh,Kh,$h,Gh,Zh,Jh={};function Xh(){if(Kh)return Wh;Kh=1;var t=bt,e=fl(),r=e.base,n=e.bignum,i=e.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){r.Node.call(this,"der",t)}function s(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=i.tagClass[r>>6],o=!(32&r);if(31&~r)r&=31;else{var a=r;for(r=0;!(128&~a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}return{cls:n,primitive:o,tag:r,tagStr:i.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var a=t.readUInt8(r);if(t.isError(a))return a;n|=a}return n}return Wh=o,o.prototype.decode=function(t,e){return t instanceof r.DecoderBuffer||(t=new r.DecoderBuffer(t,e)),this.tree._decode(t,e)},t(a,r.Node),a.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=s(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},a.prototype._decodeTag=function(t,e,r){var n=s(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=f(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},a.prototype._skipUntilEnd=function(t,e){for(;;){var r=s(t,e);if(t.isError(r))return r;var n,i=f(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},a.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var a=r.decode(t,"der",n);if(t.isError(a)&&o)break;i.push(a)}return i},a.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var a=t.raw().toString("ascii");return this._isNumstr(a)?a:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},a.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var a=t.readUInt8();o<<=7,o|=127&a,128&a||(i.push(o),o=0)}128&a&&i.push(o);var s=i[0]/40|0,f=i[0]%40;if(n=r?i:[s,f].concat(i.slice(1)),e){var u=e[n.join(" ")];void 0===u&&(u=e[n.join(".")]),void 0!==u&&(n=u)}return n},a.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),f=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,f,0)},a.prototype._decodeNull=function(t){return null},a.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},a.prototype._decodeInt=function(t,e){var r=t.raw(),i=new n(r);return e&&(i=e[i.toString(10)]||i),i},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree},Wh}function Yh(){return Zh||(Zh=1,function(t){var e=t;e.der=Xh(),e.pem=function(){if(Gh)return $h;Gh=1;var t=bt,e=Y.Buffer,r=Xh();function n(t){r.call(this,t),this.enc="pem"}return t(n,r),$h=n,n.prototype.decode=function(t,n){for(var i=t.toString().split(/[\r\n]+/g),o=n.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,f=-1,u=0;u<i.length;u++){var c=i[u].match(a);if(null!==c&&c[2]===o){if(-1!==s){if("END"!==c[1])break;f=u;break}if("BEGIN"!==c[1])break;s=u}}if(-1===s||-1===f)throw new Error("PEM section not found for: "+o);var h=i.slice(s+1,f).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new e(h,"base64");return r.prototype.decode.call(this,l,n)},$h}()}(Jh)),Jh}var Qh,tl,el,rl,nl,il,ol={};function al(){if(tl)return Qh;tl=1;var t=bt,e=Y.Buffer,r=fl(),n=r.base,i=r.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){n.Node.call(this,"der",t)}function s(t){return t<10?"0"+t:t}return Qh=o,o.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},t(a,n.Node),a.prototype._encodeComposite=function(t,r,n,o){var a,s=function(t,e,r,n){var o;"seqof"===t?t="seq":"setof"===t&&(t="set");if(i.tagByName.hasOwnProperty(t))o=i.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);o=t}if(o>=31)return n.error("Multi-octet tag encoding unsupported");e||(o|=32);return o|=i.tagClassByName[r||"universal"]<<6,o}(t,r,n,this.reporter);if(o.length<128)return(a=new e(2))[0]=s,a[1]=o.length,this._createEncoderBuffer([a,o]);for(var f=1,u=o.length;u>=256;u>>=8)f++;(a=new e(2+f))[0]=s,a[1]=128|f;u=1+f;for(var c=o.length;c>0;u--,c>>=8)a[u]=255&c;return this._createEncoderBuffer([a,o])},a.prototype._encodeStr=function(t,r){if("bitstr"===r)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===r){for(var n=new e(2*t.length),i=0;i<t.length;i++)n.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(n)}return"numstr"===r?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===r?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)||"objDesc"===r?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")},a.prototype._encodeObjid=function(t,r,n){if("string"==typeof t){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t)){t=t.slice();for(i=0;i<t.length;i++)t[i]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(i=0;i<t.length;i++){var a=t[i];for(o++;a>=128;a>>=7)o++}var s=new e(o),f=s.length-1;for(i=t.length-1;i>=0;i--){a=t[i];for(s[f--]=127&a;(a>>=7)>0;)s[f--]=128|127&a}return this._createEncoderBuffer(s)},a.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[s(n.getFullYear()),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[s(n.getFullYear()%100),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(t,r){if("string"==typeof t){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if("number"!=typeof t&&!e.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=new e(n)}if(e.isBuffer(t)){var i=t.length;0===t.length&&i++;var o=new e(i);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var a=t;a>=256;a>>=8)i++;for(a=(o=new Array(i)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new e(o))},a.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},a.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0},Qh}function sl(){return nl||(nl=1,function(t){var e=t;e.der=al(),e.pem=function(){if(rl)return el;rl=1;var t=bt,e=al();function r(t){e.call(this,t),this.enc="pem"}return t(r,e),el=r,r.prototype.encode=function(t,r){for(var n=e.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+r.label+"-----"],o=0;o<n.length;o+=64)i.push(n.slice(o,o+64));return i.push("-----END "+r.label+"-----"),i.join("\n")},el}()}(ol)),ol}function fl(){return il||(il=1,function(t){var e=t;e.bignum=V,e.define=(Sh||(Sh=1,function(t){var e=fl(),r=bt;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){var e;try{e=require("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return r(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(e.decoders[t])),this.decoders[t]},n.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e.encoders[t])),this.encoders[t]},n.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}}(Th)),Th).define,e.base=Fh(),e.constants=Vh(),e.decoders=Yh(),e.encoders=sl()}(kh)),kh}var ul=fl(),cl=ul.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),hl=ul.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),ll=ul.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),dl=ul.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(ll),this.key("subjectPublicKey").bitstr())})),pl=ul.define("RelativeDistinguishedName",(function(){this.setof(hl)})),bl=ul.define("RDNSequence",(function(){this.seqof(pl)})),gl=ul.define("Name",(function(){this.choice({rdnSequence:this.use(bl)})})),yl=ul.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(cl),this.key("notAfter").use(cl))})),ml=ul.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),vl=ul.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(ll),this.key("issuer").use(gl),this.key("validity").use(yl),this.key("subject").use(gl),this.key("subjectPublicKeyInfo").use(dl),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(ml).optional())})),_l=ul.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(vl),this.key("signatureAlgorithm").use(ll),this.key("signatureValue").bitstr())})),wl=fl();Mh.certificate=_l;var El=wl.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Mh.RSAPrivateKey=El;var Sl=wl.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Mh.RSAPublicKey=Sl;var Al=wl.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),Ml=wl.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Al),this.key("subjectPublicKey").bitstr())}));Mh.PublicKey=Ml;var kl=wl.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(Al),this.key("subjectPrivateKey").octstr())}));Mh.PrivateKey=kl;var Tl=wl.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Mh.EncryptedPrivateKey=Tl;var Bl=wl.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Mh.DSAPrivateKey=Bl,Mh.DSAparam=wl.define("DSAparam",(function(){this.int()}));var xl=wl.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),Ol=wl.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(xl),this.key("publicKey").optional().explicit(1).bitstr())}));Mh.ECPrivateKey=Ol,Mh.signature=wl.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var jl=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Rl=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Il=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Pl=Ec,Cl=yu,Ll=ft.Buffer,Nl=Mh,Ul={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},Fl=function(t,e){var r,n=t.toString(),i=n.match(jl);if(i){var o="aes"+i[1],a=Ll.from(i[2],"hex"),s=Ll.from(i[3].replace(/[\r\n]/g,""),"base64"),f=Pl(e,a.slice(0,8),parseInt(i[1],10)).key,u=[],c=Cl.createDecipheriv(o,f,a);u.push(c.update(s)),u.push(c.final()),r=Ll.concat(u)}else{var h=n.match(Il);r=Ll.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:n.match(Rl)[1],data:r}},Dl=yu,ql=ef.pbkdf2Sync,zl=ft.Buffer;function Hl(t){var e;"object"!=typeof t||zl.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=zl.from(t));var r,n,i=Fl(t,e),o=i.tag,a=i.data;switch(o){case"CERTIFICATE":n=Nl.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(n||(n=Nl.PublicKey.decode(a,"der")),r=n.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Nl.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=Nl.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":a=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=Ul[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,a=t.subjectPrivateKey,s=parseInt(i.split("-")[1],10)/8,f=ql(e,r,n,s,"sha1"),u=Dl.createDecipheriv(i,f,o),c=[];return c.push(u.update(a)),c.push(u.final()),zl.concat(c)}(a=Nl.EncryptedPrivateKey.decode(a,"der"),e);case"PRIVATE KEY":switch(r=(n=Nl.PrivateKey.decode(a,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Nl.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:Nl.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=Nl.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return Nl.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Nl.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Nl.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return{curve:(a=Nl.ECPrivateKey.decode(a,"der")).parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+o)}}Hl.signature=Nl.signature;var Vl,Wl,Kl,$l,Gl,Zl,Jl,Xl=Hl,Yl={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Ql(){if(Vl)return ph.exports;Vl=1;var t=ft.Buffer,e=Xs,r=Ah,n=uy().ec,i=gh,o=Xl,a=Yl;function s(r,n,i,o){if((r=t.from(r.toArray())).length<n.byteLength()){var a=t.alloc(n.byteLength()-r.length);r=t.concat([a,r])}var s=i.length,u=function(e,r){e=f(e,r),e=e.mod(r);var n=t.from(e.toArray());if(n.length<r.byteLength()){var i=t.alloc(r.byteLength()-n.length);n=t.concat([i,n])}return n}(i,n),c=t.alloc(s);c.fill(1);var h=t.alloc(s);return h=e(o,h).update(c).update(t.from([0])).update(r).update(u).digest(),c=e(o,h).update(c).digest(),{k:h=e(o,h).update(c).update(t.from([1])).update(r).update(u).digest(),v:c=e(o,h).update(c).digest()}}function f(t,e){var r=new i(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function u(r,n,i){var o,a;do{for(o=t.alloc(0);8*o.length<r.bitLength();)n.v=e(i,n.k).update(n.v).digest(),o=t.concat([o,n.v]);a=f(o,r),n.k=e(i,n.k).update(n.v).update(t.from([0])).digest(),n.v=e(i,n.k).update(n.v).digest()}while(-1!==a.cmp(r));return a}function c(t,e,r,n){return t.toRed(i.mont(r)).redPow(e).fromRed().mod(n)}return ph.exports=function(e,h,l,d,p){var b=o(h);if(b.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(e,r){var i=a[r.curve.join(".")];if(!i)throw new Error("unknown curve "+r.curve.join("."));var o=new n(i),s=o.keyFromPrivate(r.privateKey),f=s.sign(e);return t.from(f.toDER())}(e,b)}if("dsa"===b.type){if("dsa"!==d)throw new Error("wrong private key type");return function(e,r,n){var o,a=r.params.priv_key,h=r.params.p,l=r.params.q,d=r.params.g,p=new i(0),b=f(e,l).mod(l),g=!1,y=s(a,l,e,n);for(;!1===g;)p=c(d,o=u(l,y,n),h,l),0===(g=o.invm(l).imul(b.add(a.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new i(0));return function(e,r){e=e.toArray(),r=r.toArray(),128&e[0]&&(e=[0].concat(e));128&r[0]&&(r=[0].concat(r));var n=e.length+r.length+4,i=[48,n,2,e.length];return i=i.concat(e,[2,r.length],r),t.from(i)}(p,g)}(e,b,l)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");if(void 0!==h.padding&&1!==h.padding)throw new Error("illegal or unsupported padding mode");e=t.concat([p,e]);for(var g=b.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var m=-1;++m<e.length;)y.push(e[m]);return r(y,b)},ph.exports.getKey=s,ph.exports.makeKey=u,ph.exports}function td(){if(Kl)return Wl;Kl=1;var t=ft.Buffer,e=gh,r=uy().ec,n=Xl,i=Yl;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}return Wl=function(a,s,f,u,c){var h=n(f);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,n){var o=i[n.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new r(o),s=n.data.subjectPrivateKey.data;return a.verify(e,t,s)}(a,s,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,r,i){var a=i.data.p,s=i.data.q,f=i.data.g,u=i.data.pub_key,c=n.signature.decode(t,"der"),h=c.s,l=c.r;o(h,s),o(l,s);var d=e.mont(a),p=h.invm(s),b=f.toRed(d).redPow(new e(r).mul(p).mod(s)).fromRed().mul(u.toRed(d).redPow(l.mul(p).mod(s)).fromRed()).mod(a).mod(s);return 0===b.cmp(l)}(a,s,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");s=t.concat([c,s]);for(var l=h.modulus.byteLength(),d=[1],p=0;s.length+d.length+2<l;)d.push(255),p+=1;d.push(0);for(var b=-1;++b<s.length;)d.push(s[b]);d=t.from(d);var g=e.mont(h.modulus);a=(a=new e(a).toRed(g)).redPow(new e(h.publicExponent)),a=t.from(a.fromRed().toArray());var y=p<8?1:0;for(l=Math.min(a.length,d.length),a.length!==d.length&&(y=1),b=-1;++b<l;)y|=a[b]^d[b];return 0===y},Wl}var ed={},rd=js,nd=ft.Buffer,id=function(t,e){for(var r,n=nd.alloc(0),i=0;n.length<e;)r=od(i++),n=nd.concat([n,rd("sha1").update(t).update(r).digest()]);return n.slice(0,e)};function od(t){var e=nd.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var ad=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t},sd=V,fd=ft.Buffer;var ud=function(t,e){return fd.from(t.toRed(sd.mont(e.modulus)).redPow(new sd(e.publicExponent)).fromRed().toArray())},cd=Xl,hd=dt,ld=js,dd=id,pd=ad,bd=V,gd=ud,yd=Ah,md=ft.Buffer,vd=function(t,e,r){var n;n=t.padding?t.padding:r?1:4;var i,o=cd(t);if(4===n)i=function(t,e){var r=t.modulus.byteLength(),n=e.length,i=ld("sha1").update(md.alloc(0)).digest(),o=i.length,a=2*o;if(n>r-a-2)throw new Error("message too long");var s=md.alloc(r-n-a-2),f=r-o-1,u=hd(o),c=pd(md.concat([i,s,md.alloc(1,1),e],f),dd(u,f)),h=pd(u,dd(c,o));return new bd(md.concat([md.alloc(1),h,c],r))}(o,e);else if(1===n)i=function(t,e,r){var n,i=e.length,o=t.modulus.byteLength();if(i>o-11)throw new Error("message too long");n=r?md.alloc(o-i-3,255):function(t){var e,r=md.allocUnsafe(t),n=0,i=hd(2*t),o=0;for(;n<t;)o===i.length&&(i=hd(2*t),o=0),(e=i[o++])&&(r[n++]=e);return r}(o-i-3);return new bd(md.concat([md.from([0,r?1:2]),n,md.alloc(1),e],o))}(o,e,r);else{if(3!==n)throw new Error("unknown padding");if((i=new bd(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return r?yd(i,o):gd(i,o)};var _d=Xl,wd=id,Ed=ad,Sd=V,Ad=Ah,Md=js,kd=ud,Td=ft.Buffer,Bd=function(t,e,r){var n;n=t.padding?t.padding:r?1:4;var i,o=_d(t),a=o.modulus.byteLength();if(e.length>a||new Sd(e).cmp(o.modulus)>=0)throw new Error("decryption error");i=r?kd(new Sd(e),o):Ad(e,o);var s=Td.alloc(a-i.length);if(i=Td.concat([s,i],a),4===n)return function(t,e){var r=t.modulus.byteLength(),n=Md("sha1").update(Td.alloc(0)).digest(),i=n.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,i+1),a=e.slice(i+1),s=Ed(o,wd(a,i)),f=Ed(a,wd(s,r-i-1));if(function(t,e){t=Td.from(t),e=Td.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,f.slice(0,i)))throw new Error("decryption error");var u=i;for(;0===f[u];)u++;if(1!==f[u++])throw new Error("decryption error");return f.slice(u)}(o,i);if(1===n)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var a=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,i,r);if(3===n)return i;throw new Error("unknown padding")};!function(t){t.publicEncrypt=vd,t.privateDecrypt=Bd,t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}}(ed);var xd={};function Od(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var jd,Rd,Id=ft,Pd=dt,Cd=Id.Buffer,Ld=Id.kMaxLength,Nd=e.crypto||e.msCrypto,Ud=Math.pow(2,32)-1;function Fd(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Ud||t<0)throw new TypeError("offset must be a uint32");if(t>Ld||t>e)throw new RangeError("offset out of range")}function Dd(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Ud||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Ld)throw new RangeError("buffer too small")}function qd(t,e,r,n){if(process.browser){var i=t.buffer,o=new Uint8Array(i,e,r);return Nd.getRandomValues(o),n?void process.nextTick((function(){n(null,t)})):t}if(!n)return Pd(r).copy(t,e),t;Pd(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}function zd(){if(jd)return Z;jd=1,Z.randomBytes=Z.rng=Z.pseudoRandomBytes=Z.prng=dt,Z.createHash=Z.Hash=js,Z.createHmac=Z.Hmac=Xs;var t=tf,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Z.getHashes=function(){return r};var n=ef;Z.pbkdf2=n.pbkdf2,Z.pbkdf2Sync=n.pbkdf2Sync;var i=Nf;Z.Cipher=i.Cipher,Z.createCipher=i.createCipher,Z.Cipheriv=i.Cipheriv,Z.createCipheriv=i.createCipheriv,Z.Decipher=i.Decipher,Z.createDecipher=i.createDecipher,Z.Decipheriv=i.Decipheriv,Z.createDecipheriv=i.createDecipheriv,Z.getCiphers=i.getCiphers,Z.listCiphers=i.listCiphers;var o=function(){if(hh)return ah;hh=1;var t=fh(),e=lh,r=dh(),n={binary:!0,hex:!0,base64:!0};return ah.DiffieHellmanGroup=ah.createDiffieHellmanGroup=ah.getDiffieHellman=function(t){var n=new Buffer(e[t].prime,"hex"),i=new Buffer(e[t].gen,"hex");return new r(n,i)},ah.createDiffieHellman=ah.DiffieHellman=function e(i,o,a,s){return Buffer.isBuffer(o)||void 0===n[o]?e(i,"binary",o,a):(o=o||"binary",s=s||"binary",a=a||new Buffer([2]),Buffer.isBuffer(a)||(a=new Buffer(a,s)),"number"==typeof i?new r(t(i,a),a,!0):(Buffer.isBuffer(i)||(i=new Buffer(i,o)),new r(i,a,!0)))},ah}();Z.DiffieHellmanGroup=o.DiffieHellmanGroup,Z.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Z.getDiffieHellman=o.getDiffieHellman,Z.createDiffieHellman=o.createDiffieHellman,Z.DiffieHellman=o.DiffieHellman;var a=function(){if(Gl)return $l;Gl=1;var t=ft.Buffer,e=js,r=Ni,n=bt,i=Ql(),o=td(),a=Qs;function s(t){r.Writable.call(this);var n=a[t];if(!n)throw new Error("Unknown message digest");this._hashType=n.hash,this._hash=e(n.hash),this._tag=n.id,this._signType=n.sign}function f(t){r.Writable.call(this);var n=a[t];if(!n)throw new Error("Unknown message digest");this._hash=e(n.hash),this._tag=n.id,this._signType=n.sign}function u(t){return new s(t)}function c(t){return new f(t)}return Object.keys(a).forEach((function(e){a[e].id=t.from(a[e].id,"hex"),a[e.toLowerCase()]=a[e]})),n(s,r.Writable),s.prototype._write=function(t,e,r){this._hash.update(t),r()},s.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},s.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=i(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},n(f,r.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},f.prototype.verify=function(e,r,n){var i="string"==typeof r?t.from(r,n):r;this.end();var a=this._hash.digest();return o(i,a,e,this._signType,this._tag)},$l={Sign:u,Verify:c,createSign:u,createVerify:c}}();Z.createSign=a.createSign,Z.Sign=a.Sign,Z.createVerify=a.createVerify,Z.Verify=a.Verify,Z.createECDH=function(){if(Jl)return Zl;Jl=1;var t=uy(),e=V;Zl=function(t){return new n(t)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function i(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new Buffer(t);if(r&&n.length<r){var i=new Buffer(r-n.length);i.fill(0),n=Buffer.concat([i,n])}return e?n.toString(e):n}return r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,n.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},n.prototype.computeSecret=function(t,e,r){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),i(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},n.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),i(r,t)},n.prototype.getPrivateKey=function(t){return i(this.keys.getPrivate(),t)},n.prototype.setPublicKey=function(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this.keys._importPublic(t),this},n.prototype.setPrivateKey=function(t,r){r=r||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,r));var n=new e(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this},Zl}();var s=ed;Z.publicEncrypt=s.publicEncrypt,Z.privateEncrypt=s.privateEncrypt,Z.publicDecrypt=s.publicDecrypt,Z.privateDecrypt=s.privateDecrypt;var f=xd;return Z.randomFill=f.randomFill,Z.randomFillSync=f.randomFillSync,Z.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},Z.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Z}function Hd(){if(Rd)return G.exports;var t;function e(t){this.rand=t}if(Rd=1,G.exports=function(r){return t||(t=new e(null)),t.generate(r)},G.exports.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=zd();if("function"!=typeof r.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return r.randomBytes(t)}}catch(t){}return G.exports}Nd&&Nd.getRandomValues||!process.browser?(xd.randomFill=function(t,r,n,i){if(!(Cd.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return Fd(r,t.length),Dd(n,r,t.length),qd(t,r,n,i)},xd.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(Cd.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');Fd(r,t.length),void 0===n&&(n=t.length-r);return Dd(n,r,t.length),qd(t,r,n)}):(xd.randomFill=Od,xd.randomFillSync=Od);var Vd={},Wd=V,Kd=q,$d=Kd.getNAF,Gd=Kd.getJSF,Zd=Kd.assert;function Jd(t,e){this.type=t,this.p=new Wd(e.p,16),this.red=e.prime?Wd.red(e.prime):Wd.mont(this.p),this.zero=new Wd(0).toRed(this.red),this.one=new Wd(1).toRed(this.red),this.two=new Wd(2).toRed(this.red),this.n=e.n&&new Wd(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xd=Jd;function Yd(t,e){this.curve=t,this.type=e,this.precomputed=null}Jd.prototype.point=function(){throw new Error("Not implemented")},Jd.prototype.validate=function(){throw new Error("Not implemented")},Jd.prototype._fixedNafMul=function(t,e){Zd(t.precomputed);var r=t._getDoubles(),n=$d(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,a,s=[];for(o=0;o<n.length;o+=r.step){a=0;for(var f=o+r.step-1;f>=o;f--)a=(a<<1)+n[f];s.push(a)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<s.length;o++)(a=s[o])===h?c=c.mixedAdd(r.points[o]):a===-h&&(c=c.mixedAdd(r.points[o].neg()));u=u.add(c)}return u.toP()},Jd.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=$d(e,r,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var f=0;s>=0&&0===o[s];s--)f++;if(s>=0&&f++,a=a.dblp(f),s<0)break;var u=o[s];Zd(0!==u),a="affine"===t.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===t.type?a.toP():a},Jd.prototype._wnafMulAdd=function(t,e,r,n,i){var o,a,s,f=this._wnafT1,u=this._wnafT2,c=this._wnafT3,h=0;for(o=0;o<n;o++){var l=(s=e[o])._getNAFPoints(t);f[o]=l.wnd,u[o]=l.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===f[d]&&1===f[p]){var b=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(b[1]=e[d].add(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].add(e[p].neg())):(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Gd(r[d],r[p]);for(h=Math.max(y[0].length,h),c[d]=new Array(h),c[p]=new Array(h),a=0;a<h;a++){var m=0|y[0][a],v=0|y[1][a];c[d][a]=g[3*(m+1)+(v+1)],c[p][a]=0,u[d]=b}}else c[d]=$d(r[d],f[d],this._bitLength),c[p]=$d(r[p],f[p],this._bitLength),h=Math.max(c[d].length,h),h=Math.max(c[p].length,h)}var _=this.jpoint(null,null,null),w=this._wnafT4;for(o=h;o>=0;o--){for(var E=0;o>=0;){var S=!0;for(a=0;a<n;a++)w[a]=0|c[a][o],0!==w[a]&&(S=!1);if(!S)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(a=0;a<n;a++){var A=w[a];0!==A&&(A>0?s=u[a][A-1>>1]:A<0&&(s=u[a][-A-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o<n;o++)u[o]=null;return i?_:_.toP()},Jd.BasePoint=Yd,Yd.prototype.eq=function(){throw new Error("Not implemented")},Yd.prototype.validate=function(){return this.curve.validate(this)},Jd.prototype.decodePoint=function(t,e){t=Kd.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?Zd(t[t.length-1]%2==0):7===t[0]&&Zd(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},Yd.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Yd.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},Yd.prototype.encode=function(t,e){return Kd.encode(this._encode(e),t)},Yd.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Yd.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Yd.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},Yd.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},Yd.prototype._getBeta=function(){return null},Yd.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var Qd=V,tp=bt,ep=Xd,rp=q.assert;function np(t){ep.call(this,"short",t),this.a=new Qd(t.a,16).toRed(this.red),this.b=new Qd(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}tp(np,ep);var ip=np;function op(t,e,r,n){ep.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new Qd(e,16),this.y=new Qd(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function ap(t,e,r,n){ep.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Qd(0)):(this.x=new Qd(e,16),this.y=new Qd(r,16),this.z=new Qd(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}np.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new Qd(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new Qd(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],rp(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new Qd(t.a,16),b:new Qd(t.b,16)}})):this._getEndoBasis(r)}}},np.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:Qd.mont(t),r=new Qd(2).toRed(e).redInvm(),n=r.redNeg(),i=new Qd(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},np.prototype._getEndoBasis=function(t){for(var e,r,n,i,o,a,s,f,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,l=this.n.clone(),d=new Qd(1),p=new Qd(0),b=new Qd(0),g=new Qd(1),y=0;0!==h.cmpn(0);){var m=l.div(h);f=l.sub(m.mul(h)),u=b.sub(m.mul(d));var v=g.sub(m.mul(p));if(!n&&f.cmp(c)<0)e=s.neg(),r=d,n=f.neg(),i=u;else if(n&&2==++y)break;s=f,l=h,h=f,b=d,d=u,g=p,p=v}o=f.neg(),a=u;var _=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(_)>=0&&(o=e,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},np.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:f.add(u).neg()}},np.prototype.pointFromX=function(t,e){(t=new Qd(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},np.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},np.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],f=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),f=f.neg(!0)),n[2*o]=s,n[2*o+1]=f,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),c=0;c<2*o;c++)n[c]=null,i[c]=null;return u},tp(op,ep.BasePoint),np.prototype.point=function(t,e,r){return new op(this,t,e,r)},np.prototype.pointFromJSON=function(t,e){return op.fromJSON(this,t,e)},op.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},op.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},op.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},op.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},op.prototype.isInfinity=function(){return this.inf},op.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},op.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},op.prototype.getX=function(){return this.x.fromRed()},op.prototype.getY=function(){return this.y.fromRed()},op.prototype.mul=function(t){return t=new Qd(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},op.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},op.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},op.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},op.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},op.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},tp(ap,ep.BasePoint),np.prototype.jpoint=function(t,e,r){return new ap(this,t,e,r)},ap.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},ap.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ap.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),h=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(h).redISub(h),d=f.redMul(h.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},ap.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),h=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(h)).redISub(i.redMul(u)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},ap.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,f=s.redSqr().redSqr(),u=a.redAdd(a);for(e=0;e<t;e++){var c=o.redSqr(),h=u.redSqr(),l=h.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(f)),p=o.redMul(h),b=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=d.redMul(g);y=y.redIAdd(y).redISub(l);var m=u.redMul(s);e+1<t&&(f=f.redMul(l)),o=b,s=m,u=y}return this.curve.jpoint(o,u.redMul(i),s)},ap.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ap.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),f=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=f,e=s.redMul(a.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(c).redISub(l);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),b=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},ap.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=s.redSqr().redISub(a).redISub(a);t=f;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=s.redMul(a.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},ap.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),f=e.redAdd(e),u=(f=f.redIAdd(f)).redMul(a),c=s.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=s.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},ap.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),f=n.redIAdd(n);f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(f),c=e.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(s).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(u.redMul(f.redISub(u)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,l,d)},ap.prototype.mul=function(t,e){return t=new Qd(t,e),this.curve._wnafMul(this,t)},ap.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},ap.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},ap.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},ap.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var sp=V,fp=bt,up=Xd,cp=q;function hp(t){up.call(this,"mont",t),this.a=new sp(t.a,16).toRed(this.red),this.b=new sp(t.b,16).toRed(this.red),this.i4=new sp(4).toRed(this.red).redInvm(),this.two=new sp(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}fp(hp,up);var lp=hp;function dp(t,e,r){up.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new sp(e,16),this.z=new sp(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}hp.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},fp(dp,up.BasePoint),hp.prototype.decodePoint=function(t,e){return this.point(cp.toArray(t,e),1)},hp.prototype.point=function(t,e){return new dp(this,t,e)},hp.prototype.pointFromJSON=function(t){return dp.fromJSON(this,t)},dp.prototype.precompute=function(){},dp.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},dp.fromJSON=function(t,e){return new dp(t,e[0],e[1]||t.one)},dp.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},dp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},dp.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},dp.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),f=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},dp.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},dp.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},dp.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},dp.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var pp=V,bp=bt,gp=Xd,yp=q.assert;function mp(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,gp.call(this,"edwards",t),this.a=new pp(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new pp(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new pp(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),yp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}bp(mp,gp);var vp=mp;function _p(t,e,r,n,i){gp.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new pp(e,16),this.y=new pp(r,16),this.z=n?new pp(n,16):this.curve.one,this.t=i&&new pp(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}mp.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},mp.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},mp.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},mp.prototype.pointFromX=function(t,e){(t=new pp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(e&&!s||!e&&s)&&(a=a.redNeg()),this.point(t,a)},mp.prototype.pointFromY=function(t,e){(t=new pp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},mp.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},bp(_p,gp.BasePoint),mp.prototype.pointFromJSON=function(t){return _p.fromJSON(this,t)},mp.prototype.point=function(t,e,r,n){return new _p(this,t,e,r,n)},_p.fromJSON=function(t,e){return new _p(t,e[0],e[1],e[2])},_p.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},_p.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},_p.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),h=a.redMul(o);return this.curve.point(f,u,h,c)},_p.prototype._projDbl=function(){var t,e,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(t=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),e=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),t=a.redSub(s).redISub(f).redMul(o),e=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(a.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(t,e,r)},_p.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},_p.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(e),u=o.redMul(a),c=s.redMul(f),h=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,h)},_p.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),h=n.redMul(f).redMul(c);return this.curve.twisted?(e=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(e=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(h,e,r)},_p.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},_p.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},_p.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},_p.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},_p.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},_p.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},_p.prototype.getX=function(){return this.normalize(),this.x.fromRed()},_p.prototype.getY=function(){return this.normalize(),this.y.fromRed()},_p.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},_p.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},_p.prototype.toP=_p.prototype.normalize,_p.prototype.mixedAdd=_p.prototype.add,function(t){var e=t;e.base=Xd,e.short=ip,e.mont=lp,e.edwards=vp}(Vd);var wp={},Ep={},Sp={},Ap=W,Mp=bt;function kp(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function Tp(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function Bp(t){return 1===t.length?"0"+t:t}function xp(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}Sp.inherits=Mp,Sp.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):kp(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},Sp.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=Bp(t[r].toString(16));return e},Sp.htonl=Tp,Sp.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=Tp(i)),r+=xp(i.toString(16))}return r},Sp.zero2=Bp,Sp.zero8=xp,Sp.join32=function(t,e,r,n){var i=r-e;Ap(i%4==0);for(var o=new Array(i/4),a=0,s=e;a<o.length;a++,s+=4){var f;f="big"===n?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],o[a]=f>>>0}return o},Sp.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},Sp.rotr32=function(t,e){return t>>>e|t<<32-e},Sp.rotl32=function(t,e){return t<<e|t>>>32-e},Sp.sum32=function(t,e){return t+e>>>0},Sp.sum32_3=function(t,e,r){return t+e+r>>>0},Sp.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},Sp.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},Sp.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o},Sp.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},Sp.sum64_lo=function(t,e,r,n){return e+n>>>0},Sp.sum64_4_hi=function(t,e,r,n,i,o,a,s){var f=0,u=e;return f+=(u=u+n>>>0)<e?1:0,f+=(u=u+o>>>0)<o?1:0,t+r+i+a+(f+=(u=u+s>>>0)<s?1:0)>>>0},Sp.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},Sp.sum64_5_hi=function(t,e,r,n,i,o,a,s,f,u){var c=0,h=e;return c+=(h=h+n>>>0)<e?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+s>>>0)<s?1:0,t+r+i+a+f+(c+=(h=h+u>>>0)<u?1:0)>>>0},Sp.sum64_5_lo=function(t,e,r,n,i,o,a,s,f,u){return e+n+o+s+u>>>0},Sp.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},Sp.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},Sp.shr64_hi=function(t,e,r){return t>>>r},Sp.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var Op={},jp=Sp,Rp=W;function Ip(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Op.BlockHash=Ip,Ip.prototype.update=function(t,e){if(t=jp.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=jp.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},Ip.prototype.digest=function(t){return this.update(this._pad()),Rp(null===this.pending),this._digest(t)},Ip.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n};var Pp={},Cp={},Lp=Sp.rotr32;function Np(t,e,r){return t&e^~t&r}function Up(t,e,r){return t&e^t&r^e&r}function Fp(t,e,r){return t^e^r}Cp.ft_1=function(t,e,r,n){return 0===t?Np(e,r,n):1===t||3===t?Fp(e,r,n):2===t?Up(e,r,n):void 0},Cp.ch32=Np,Cp.maj32=Up,Cp.p32=Fp,Cp.s0_256=function(t){return Lp(t,2)^Lp(t,13)^Lp(t,22)},Cp.s1_256=function(t){return Lp(t,6)^Lp(t,11)^Lp(t,25)},Cp.g0_256=function(t){return Lp(t,7)^Lp(t,18)^t>>>3},Cp.g1_256=function(t){return Lp(t,17)^Lp(t,19)^t>>>10};var Dp=Sp,qp=Op,zp=Cp,Hp=Dp.rotl32,Vp=Dp.sum32,Wp=Dp.sum32_5,Kp=zp.ft_1,$p=qp.BlockHash,Gp=[1518500249,1859775393,2400959708,3395469782];function Zp(){if(!(this instanceof Zp))return new Zp;$p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Dp.inherits(Zp,$p);var Jp=Zp;Zp.blockSize=512,Zp.outSize=160,Zp.hmacStrength=80,Zp.padLength=64,Zp.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=Hp(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4];for(n=0;n<r.length;n++){var u=~~(n/20),c=Wp(Hp(i,5),Kp(u,o,a,s),f,r[n],Gp[u]);f=s,s=a,a=Hp(o,30),o=i,i=c}this.h[0]=Vp(this.h[0],i),this.h[1]=Vp(this.h[1],o),this.h[2]=Vp(this.h[2],a),this.h[3]=Vp(this.h[3],s),this.h[4]=Vp(this.h[4],f)},Zp.prototype._digest=function(t){return"hex"===t?Dp.toHex32(this.h,"big"):Dp.split32(this.h,"big")};var Xp=Sp,Yp=Op,Qp=Cp,tb=W,eb=Xp.sum32,rb=Xp.sum32_4,nb=Xp.sum32_5,ib=Qp.ch32,ob=Qp.maj32,ab=Qp.s0_256,sb=Qp.s1_256,fb=Qp.g0_256,ub=Qp.g1_256,cb=Yp.BlockHash,hb=[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];function lb(){if(!(this instanceof lb))return new lb;cb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=hb,this.W=new Array(64)}Xp.inherits(lb,cb);var db=lb;lb.blockSize=512,lb.outSize=256,lb.hmacStrength=192,lb.padLength=64,lb.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=rb(ub(r[n-2]),r[n-7],fb(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7];for(tb(this.k.length===r.length),n=0;n<r.length;n++){var l=nb(h,sb(f),ib(f,u,c),this.k[n],r[n]),d=eb(ab(i),ob(i,o,a));h=c,c=u,u=f,f=eb(s,l),s=a,a=o,o=i,i=eb(l,d)}this.h[0]=eb(this.h[0],i),this.h[1]=eb(this.h[1],o),this.h[2]=eb(this.h[2],a),this.h[3]=eb(this.h[3],s),this.h[4]=eb(this.h[4],f),this.h[5]=eb(this.h[5],u),this.h[6]=eb(this.h[6],c),this.h[7]=eb(this.h[7],h)},lb.prototype._digest=function(t){return"hex"===t?Xp.toHex32(this.h,"big"):Xp.split32(this.h,"big")};var pb=Sp,bb=db;function gb(){if(!(this instanceof gb))return new gb;bb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pb.inherits(gb,bb);var yb=gb;gb.blockSize=512,gb.outSize=224,gb.hmacStrength=192,gb.padLength=64,gb.prototype._digest=function(t){return"hex"===t?pb.toHex32(this.h.slice(0,7),"big"):pb.split32(this.h.slice(0,7),"big")};var mb=Sp,vb=Op,_b=W,wb=mb.rotr64_hi,Eb=mb.rotr64_lo,Sb=mb.shr64_hi,Ab=mb.shr64_lo,Mb=mb.sum64,kb=mb.sum64_hi,Tb=mb.sum64_lo,Bb=mb.sum64_4_hi,xb=mb.sum64_4_lo,Ob=mb.sum64_5_hi,jb=mb.sum64_5_lo,Rb=vb.BlockHash,Ib=[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];function Pb(){if(!(this instanceof Pb))return new Pb;Rb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Ib,this.W=new Array(160)}mb.inherits(Pb,Rb);var Cb=Pb;function Lb(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function Nb(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function Ub(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function Fb(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function Db(t,e){var r=wb(t,e,28)^wb(e,t,2)^wb(e,t,7);return r<0&&(r+=4294967296),r}function qb(t,e){var r=Eb(t,e,28)^Eb(e,t,2)^Eb(e,t,7);return r<0&&(r+=4294967296),r}function zb(t,e){var r=wb(t,e,14)^wb(t,e,18)^wb(e,t,9);return r<0&&(r+=4294967296),r}function Hb(t,e){var r=Eb(t,e,14)^Eb(t,e,18)^Eb(e,t,9);return r<0&&(r+=4294967296),r}function Vb(t,e){var r=wb(t,e,1)^wb(t,e,8)^Sb(t,e,7);return r<0&&(r+=4294967296),r}function Wb(t,e){var r=Eb(t,e,1)^Eb(t,e,8)^Ab(t,e,7);return r<0&&(r+=4294967296),r}function Kb(t,e){var r=wb(t,e,19)^wb(e,t,29)^Sb(t,e,6);return r<0&&(r+=4294967296),r}function $b(t,e){var r=Eb(t,e,19)^Eb(e,t,29)^Ab(t,e,6);return r<0&&(r+=4294967296),r}Pb.blockSize=1024,Pb.outSize=512,Pb.hmacStrength=192,Pb.padLength=128,Pb.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=Kb(r[n-4],r[n-3]),o=$b(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],f=Vb(r[n-30],r[n-29]),u=Wb(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=Bb(i,o,a,s,f,u,c,h),r[n+1]=xb(i,o,a,s,f,u,c,h)}},Pb.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],f=this.h[5],u=this.h[6],c=this.h[7],h=this.h[8],l=this.h[9],d=this.h[10],p=this.h[11],b=this.h[12],g=this.h[13],y=this.h[14],m=this.h[15];_b(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var _=y,w=m,E=zb(h,l),S=Hb(h,l),A=Lb(h,l,d,p,b),M=Nb(h,l,d,p,b,g),k=this.k[v],T=this.k[v+1],B=r[v],x=r[v+1],O=Ob(_,w,E,S,A,M,k,T,B,x),j=jb(_,w,E,S,A,M,k,T,B,x);_=Db(n,i),w=qb(n,i),E=Ub(n,i,o,a,s),S=Fb(n,i,o,a,s,f);var R=kb(_,w,E,S),I=Tb(_,w,E,S);y=b,m=g,b=d,g=p,d=h,p=l,h=kb(u,c,O,j),l=Tb(c,c,O,j),u=s,c=f,s=o,f=a,o=n,a=i,n=kb(O,j,R,I),i=Tb(O,j,R,I)}Mb(this.h,0,n,i),Mb(this.h,2,o,a),Mb(this.h,4,s,f),Mb(this.h,6,u,c),Mb(this.h,8,h,l),Mb(this.h,10,d,p),Mb(this.h,12,b,g),Mb(this.h,14,y,m)},Pb.prototype._digest=function(t){return"hex"===t?mb.toHex32(this.h,"big"):mb.split32(this.h,"big")};var Gb=Sp,Zb=Cb;function Jb(){if(!(this instanceof Jb))return new Jb;Zb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Gb.inherits(Jb,Zb);var Xb=Jb;Jb.blockSize=1024,Jb.outSize=384,Jb.hmacStrength=192,Jb.padLength=128,Jb.prototype._digest=function(t){return"hex"===t?Gb.toHex32(this.h.slice(0,12),"big"):Gb.split32(this.h.slice(0,12),"big")},Pp.sha1=Jp,Pp.sha224=yb,Pp.sha256=db,Pp.sha384=Xb,Pp.sha512=Cb;var Yb={},Qb=Sp,tg=Op,eg=Qb.rotl32,rg=Qb.sum32,ng=Qb.sum32_3,ig=Qb.sum32_4,og=tg.BlockHash;function ag(){if(!(this instanceof ag))return new ag;og.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function sg(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function fg(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function ug(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}Qb.inherits(ag,og),Yb.ripemd160=ag,ag.blockSize=512,ag.outSize=160,ag.hmacStrength=192,ag.padLength=64,ag.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=r,f=n,u=i,c=o,h=a,l=0;l<80;l++){var d=rg(eg(ig(r,sg(l,n,i,o),t[cg[l]+e],fg(l)),lg[l]),a);r=a,a=o,o=eg(i,10),i=n,n=d,d=rg(eg(ig(s,sg(79-l,f,u,c),t[hg[l]+e],ug(l)),dg[l]),h),s=h,h=c,c=eg(u,10),u=f,f=d}d=ng(this.h[1],i,c),this.h[1]=ng(this.h[2],o,h),this.h[2]=ng(this.h[3],a,s),this.h[3]=ng(this.h[4],r,f),this.h[4]=ng(this.h[0],n,u),this.h[0]=d},ag.prototype._digest=function(t){return"hex"===t?Qb.toHex32(this.h,"little"):Qb.split32(this.h,"little")};var cg=[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],hg=[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],lg=[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],dg=[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],pg=Sp,bg=W;function gg(t,e,r){if(!(this instanceof gg))return new gg(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(pg.toArray(e,r))}var yg,mg,vg=gg;gg.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),bg(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},gg.prototype.update=function(t,e){return this.inner.update(t,e),this},gg.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=t;e.utils=Sp,e.common=Op,e.sha=Pp,e.ripemd=Yb,e.hmac=vg,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(Ep),function(t){var e,r=t,n=Ep,i=Vd,o=q.assert;function a(t){"short"===t.type?this.curve=new i.short(t):"edwards"===t.type?this.curve=new i.edwards(t):this.curve=new i.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){var n=new a(e);return Object.defineProperty(r,t,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=mg?yg:(mg=1,yg={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}(wp);var _g=Ep,wg=$,Eg=W;function Sg(t){if(!(this instanceof Sg))return new Sg(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=wg.toArray(t.entropy,t.entropyEnc||"hex"),r=wg.toArray(t.nonce,t.nonceEnc||"hex"),n=wg.toArray(t.pers,t.persEnc||"hex");Eg(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Ag=Sg;Sg.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Sg.prototype._hmac=function(){return new _g.hmac(this.hash,this.K)},Sg.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Sg.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=wg.toArray(t,e),r=wg.toArray(r,n),Eg(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},Sg.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=wg.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,wg.encode(o,e)};var Mg=V,kg=q.assert;function Tg(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var Bg=Tg;Tg.fromPublic=function(t,e,r){return e instanceof Tg?e:new Tg(t,{pub:e,pubEnc:r})},Tg.fromPrivate=function(t,e,r){return e instanceof Tg?e:new Tg(t,{priv:e,privEnc:r})},Tg.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Tg.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},Tg.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},Tg.prototype._importPrivate=function(t,e){this.priv=new Mg(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},Tg.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?kg(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||kg(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},Tg.prototype.derive=function(t){return t.validate()||kg(t.validate(),"public point not validated"),t.mul(this.priv).getX()},Tg.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},Tg.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},Tg.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var xg=V,Og=q,jg=Og.assert;function Rg(t,e){if(t instanceof Rg)return t;this._importDER(t,e)||(jg(t.r&&t.s,"Signature without r or s"),this.r=new xg(t.r,16),this.s=new xg(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Ig,Pg,Cg=Rg;function Lg(){this.place=0}function Ng(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===t[e.place])return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function Ug(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function Fg(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}Rg.prototype._importDER=function(t,e){t=Og.toArray(t,e);var r=new Lg;if(48!==t[r.place++])return!1;var n=Ng(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=Ng(t,r);if(!1===i)return!1;if(128&t[r.place])return!1;var o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var a=Ng(t,r);if(!1===a)return!1;if(t.length!==a+r.place)return!1;if(128&t[r.place])return!1;var s=t.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new xg(o),this.s=new xg(s),this.recoveryParam=null,!0},Rg.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=Ug(e),r=Ug(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Fg(n,e.length),(n=n.concat(e)).push(2),Fg(n,r.length);var i=n.concat(r),o=[48];return Fg(o,i.length),o=o.concat(i),Og.encode(o,t)};var Dg=q,qg=Dg.assert,zg=Dg.parseBytes,Hg=Dg.cachedProperty;function Vg(t,e){this.eddsa=t,this._secret=zg(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=zg(e.pub)}Vg.fromPublic=function(t,e){return e instanceof Vg?e:new Vg(t,{pub:e})},Vg.fromSecret=function(t,e){return e instanceof Vg?e:new Vg(t,{secret:e})},Vg.prototype.secret=function(){return this._secret},Hg(Vg,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Hg(Vg,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Hg(Vg,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),Hg(Vg,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Hg(Vg,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Hg(Vg,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Vg.prototype.sign=function(t){return qg(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},Vg.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},Vg.prototype.getSecret=function(t){return qg(this._secret,"KeyPair is public only"),Dg.encode(this.secret(),t)},Vg.prototype.getPublic=function(t){return Dg.encode(this.pubBytes(),t)};var Wg=Vg,Kg=V,$g=q,Gg=$g.assert,Zg=$g.cachedProperty,Jg=$g.parseBytes;function Xg(t,e){this.eddsa=t,"object"!=typeof e&&(e=Jg(e)),Array.isArray(e)&&(Gg(e.length===2*t.encodingLength,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Gg(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Kg&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Zg(Xg,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Zg(Xg,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Zg(Xg,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Zg(Xg,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Xg.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Xg.prototype.toHex=function(){return $g.encode(this.toBytes(),"hex").toUpperCase()};var Yg=Xg,Qg=Ep,ty=wp,ey=q,ry=ey.assert,ny=ey.parseBytes,iy=Wg,oy=Yg;function ay(t){if(ry("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof ay))return new ay(t);t=ty[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Qg.sha512}var sy,fy=ay;function uy(){return sy||(sy=1,function(t){var e=t;e.version=D,e.utils=q,e.rand=Hd(),e.curve=Vd,e.curves=wp,e.ec=function(){if(Pg)return Ig;Pg=1;var t=V,e=Ag,r=q,n=wp,i=Hd(),o=r.assert,a=Bg,s=Cg;function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(n,t),"Unknown curve "+t),t=n[t]),t instanceof n.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return Ig=f,f.prototype.keyPair=function(t){return new a(this,t)},f.prototype.keyFromPrivate=function(t,e){return a.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return a.fromPublic(this,t,e)},f.prototype.genKeyPair=function(r){r||(r={});for(var n=new e({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||i(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new t(2));;){var s=new t(n.generate(o));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,r,n){var i;if(t.isBN(e)||"number"==typeof e)i=(e=new t(e,16)).byteLength();else if("object"==typeof e)i=e.length,e=new t(e,16);else{var o=e.toString();i=o.length+1>>>1,e=new t(o,16)}"number"!=typeof n&&(n=8*i);var a=n-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(r,n,i,a){if("object"==typeof i&&(a=i,i=null),a||(a={}),"string"!=typeof r&&"number"!=typeof r&&!t.isBN(r)){o("object"==typeof r&&r&&"number"==typeof r.length,"Expected message to be an array-like, a hex string, or a BN instance"),o(r.length>>>0===r.length);for(var f=0;f<r.length;f++)o((255&r[f])===r[f])}n=this.keyFromPrivate(n,i),r=this._truncateToN(r,!1,a.msgBitLength),o(!r.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),c=n.getPrivate().toArray("be",u),h=r.toArray("be",u);o(new t(h).eq(r),"Can not sign message");for(var l=new e({hash:this.hash,entropy:c,nonce:h,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new t(1)),p=0;;p++){var b=a.k?a.k(p):new t(l.generate(this.n.byteLength()));if(!((b=this._truncateToN(b,!0)).cmpn(1)<=0||b.cmp(d)>=0)){var g=this.g.mul(b);if(!g.isInfinity()){var y=g.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var v=b.invm(this.n).mul(m.mul(n.getPrivate()).iadd(r));if(0!==(v=v.umod(this.n)).cmpn(0)){var _=(g.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),_^=1),new s({r:m,s:v,recoveryParam:_})}}}}}},f.prototype.verify=function(t,e,r,n,i){i||(i={}),t=this._truncateToN(t,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(e=new s(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var f,u=a.invm(this.n),c=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(f=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&f.eqXToP(o):!(f=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===f.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,r,n,i){o((3&n)===n,"The recovery param is more than two bits"),r=new s(r,i);var a=this.n,f=new t(e),u=r.r,c=r.s,h=1&n,l=n>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");u=l?this.curve.pointFromX(u.add(this.curve.n),h):this.curve.pointFromX(u,h);var d=r.r.invm(a),p=a.sub(f).mul(d).umod(a),b=c.mul(d).umod(a);return this.g.mulAdd(p,u,b)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new s(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")},Ig}(),e.eddsa=fy}(F)),F}ay.prototype.sign=function(t,e){t=ny(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},ay.prototype.verify=function(t,e,r){if(t=ny(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},ay.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return ey.intFromLE(t.digest()).umod(this.curve.n)},ay.prototype.keyFromPublic=function(t){return iy.fromPublic(this,t)},ay.prototype.keyFromSecret=function(t){return iy.fromSecret(this,t)},ay.prototype.makeSignature=function(t){return t instanceof oy?t:new oy(this,t)},ay.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},ay.prototype.decodePoint=function(t){var e=(t=ey.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=!!(128&t[e]),i=ey.intFromLE(r);return this.curve.pointFromY(i,n)},ay.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},ay.prototype.decodeInt=function(t){return ey.intFromLE(t)},ay.prototype.isPoint=function(t){return t instanceof this.pointClass};var cy=uy();function hy(t,e){return e?Buffer.from(Rs("sha256").update(t).digest(e)):Rs("sha256").update(t).digest()}function ly(t,e){return e?Buffer.from(Rs("sha512").update(t).digest(e)):Rs("sha512").update(t).digest()}function dy(t,e){return Ys("sha256",e).update(t).digest()}function py(t){return Rs("rmd160").update(t).digest()}var by=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let t=0;t<e.length;t++)e[t]=255;for(let r=0;r<t.length;r++){const n=t.charAt(r),i=n.charCodeAt(0);if(255!==e[i])throw new TypeError(n+" is ambiguous");e[i]=r}const r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r);function a(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;let o=0,a=0,s=0;for(;t[o]===n;)a++,o++;const f=(t.length-o)*i+1>>>0,u=new Uint8Array(f);for(;o<t.length;){const n=t.charCodeAt(o);if(n>255)return;let i=e[n];if(255===i)return;let a=0;for(let t=f-1;(0!==i||a<s)&&-1!==t;t--,a++)i+=r*u[t]>>>0,u[t]=i%256>>>0,i=i/256>>>0;if(0!==i)throw new Error("Non-zero carry");s=a,o++}let c=f-s;for(;c!==f&&0===u[c];)c++;const h=new Uint8Array(a+(f-c));let l=a;for(;c!==f;)h[l++]=u[c++];return h}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";let i=0,a=0,s=0;const f=e.length;for(;s!==f&&0===e[s];)s++,i++;const u=(f-s)*o+1>>>0,c=new Uint8Array(u);for(;s!==f;){let t=e[s],n=0;for(let e=u-1;(0!==t||n<a)&&-1!==e;e--,n++)t+=256*c[e]>>>0,c[e]=t%r>>>0,t=t/r>>>0;if(0!==t)throw new Error("Non-zero carry");a=n,s++}let h=u-a;for(;h!==u&&0===c[h];)h++;let l=n.repeat(i);for(;h<u;++h)l+=t.charAt(c[h]);return l},decodeUnsafe:a,decode:function(t){const e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),gy={exports:{}},yy={},my={},vy={},_y=fn(),wy=Sr("Object.prototype.toString"),Ey=function(t){return!(_y&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===wy(t)},Sy=function(t){return!!Ey(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==wy(t)&&"callee"in t&&"[object Function]"===wy(t.callee)},Ay=function(){return Ey(arguments)}();Ey.isLegacyArguments=Sy;var My,ky=Ay?Ey:Sy,Ty=Sr,By=fn(),xy=Te(),Oy=Pt;if(By){var jy=Ty("RegExp.prototype.exec"),Ry={},Iy=function(){throw Ry},Py={toString:Iy,valueOf:Iy};"symbol"==typeof Symbol.toPrimitive&&(Py[Symbol.toPrimitive]=Iy),My=function(t){if(!t||"object"!=typeof t)return!1;var e=Oy(t,"lastIndex");if(!(e&&xy(e,"value")))return!1;try{jy(t,Py)}catch(t){return t===Ry}}}else{var Cy=Ty("Object.prototype.toString");My=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===Cy(t)}}var Ly,Ny,Uy=My,Fy=Sr("RegExp.prototype.exec"),Dy=mt;var qy=Sr,zy=function(t){if(!Uy(t))throw new Dy("`regex` must be a RegExp");return function(e){return null!==Fy(t,e)}},Hy=zy(/^\s*(?:function)?\*/),Vy=fn(),Wy=ke,Ky=qy("Object.prototype.toString"),$y=qy("Function.prototype.toString"),Gy=function(){if(Ny)return Ly;Ny=1;const t=function*(){}.constructor;return Ly=()=>t}(),Zy=function(t){if("function"!=typeof t)return!1;if(Hy($y(t)))return!0;if(!Vy)return"[object GeneratorFunction]"===Ky(t);if(!Wy)return!1;var e=Gy();return e&&Wy(t)===e.prototype};!function(t){var e=ky,r=Zy,n=En,i=An;function o(t){return t.call.bind(t)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,f=o(Object.prototype.toString),u=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(a)var l=o(BigInt.prototype.valueOf);if(s)var d=o(Symbol.prototype.valueOf);function p(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===f(t)}function g(t){return"[object Set]"===f(t)}function y(t){return"[object WeakMap]"===f(t)}function m(t){return"[object WeakSet]"===f(t)}function v(t){return"[object ArrayBuffer]"===f(t)}function _(t){return"undefined"!=typeof ArrayBuffer&&(v.working?v(t):t instanceof ArrayBuffer)}function w(t){return"[object DataView]"===f(t)}function E(t){return"undefined"!=typeof DataView&&(w.working?w(t):t instanceof DataView)}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=i,t.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},t.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):i(t)||E(t)},t.isUint8Array=function(t){return"Uint8Array"===n(t)},t.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===n(t)},t.isUint16Array=function(t){return"Uint16Array"===n(t)},t.isUint32Array=function(t){return"Uint32Array"===n(t)},t.isInt8Array=function(t){return"Int8Array"===n(t)},t.isInt16Array=function(t){return"Int16Array"===n(t)},t.isInt32Array=function(t){return"Int32Array"===n(t)},t.isFloat32Array=function(t){return"Float32Array"===n(t)},t.isFloat64Array=function(t){return"Float64Array"===n(t)},t.isBigInt64Array=function(t){return"BigInt64Array"===n(t)},t.isBigUint64Array=function(t){return"BigUint64Array"===n(t)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},g.working="undefined"!=typeof Set&&g(new Set),t.isSet=function(t){return"undefined"!=typeof Set&&(g.working?g(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),t.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},m.working="undefined"!=typeof WeakSet&&m(new WeakSet),t.isWeakSet=function(t){return m(t)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),t.isArrayBuffer=_,w.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&w(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=E;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(t){return"[object SharedArrayBuffer]"===f(t)}function M(t){return void 0!==S&&(void 0===A.working&&(A.working=A(new S)),A.working?A(t):t instanceof S)}function k(t){return p(t,u)}function T(t){return p(t,c)}function B(t){return p(t,h)}function x(t){return a&&p(t,l)}function O(t){return s&&p(t,d)}t.isSharedArrayBuffer=M,t.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},t.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},t.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},t.isGeneratorObject=function(t){return"[object Generator]"===f(t)},t.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},t.isNumberObject=k,t.isStringObject=T,t.isBooleanObject=B,t.isBigIntObject=x,t.isSymbolObject=O,t.isBoxedPrimitive=function(t){return k(t)||T(t)||B(t)||x(t)||O(t)},t.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(_(t)||M(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))}(vy);var Jy,Xy,Yy,Qy=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8};function tm(){if(Jy)return yy;function t(e){return t="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},t(e)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}function r(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,o=n(e);if(r){var a=n(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(this,i)}}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}Jy=1;var i,o,a={};function s(t,n,i){i||(i=Error);var o=function(i){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)}(s,i);var o,a=r(s);function s(e,r,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),o=a.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i)),o.code=t,o}return o=s,Object.defineProperty(o,"prototype",{writable:!1}),o}(i);a[t]=o}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,r,n){var o,a,s;if(void 0===i&&(i=Ym()),i("string"==typeof e,"'name' must be a string"),"string"==typeof r&&(a="not ",r.substr(0,a.length)===a)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(f(r,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(f(r,"type"))}return s+=". Received type ".concat(t(n))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=my);var n=o.inspect(e);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(r,". Received ").concat(n)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(e,r,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(t(n)),"Expected ".concat(e,' to be returned from the "').concat(r,'"')+" function but got ".concat(i,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];void 0===i&&(i=Ym()),i(e.length>0,"At least one arg needs to be specified");var n="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:n+="".concat(e[0]," argument");break;case 2:n+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:n+=e.slice(0,o-1).join(", "),n+=", and ".concat(e[o-1]," arguments")}return"".concat(n," must be specified")}),TypeError),yy.codes=a,yy}function em(){if(Yy)return Xy;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r){return e&&function(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,i(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===l(e)?e:String(e)}function o(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){var e="function"==typeof Map?new Map:void 0;return s=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return f(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)},s(t)}function f(t,e,r){return f=u()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i},f.apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function l(t){return l="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},l(t)}Yy=1;var d=my.inspect,p=tm().codes.ERR_INVALID_ARG_TYPE;function b(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var g="",y="",m="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function E(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function S(t,e,r){var n="",i="",o=0,a="",s=!1,f=E(t),u=f.split("\n"),c=E(e).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===l(t)&&"object"===l(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===u.length&&1===c.length&&u[0]!==c[0]){var p=u[0].length+c[0].length;if(p<=10){if(!("object"===l(t)&&null!==t||"object"===l(e)&&null!==e||0===t&&0===e))return"".concat(_[r],"\n\n")+"".concat(u[0]," !== ").concat(c[0],"\n")}else if("strictEqualObject"!==r){if(p<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;u[0][h]===c[0][h];)h++;h>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}}for(var w=u[u.length-1],S=c[c.length-1];w===S&&(h++<2?a="\n ".concat(w).concat(a):n=w,u.pop(),c.pop(),0!==u.length&&0!==c.length);)w=u[u.length-1],S=c[c.length-1];var A=Math.max(u.length,c.length);if(0===A){var M=f.split("\n");if(M.length>30)for(M[26]="".concat(g,"...").concat(v);M.length>27;)M.pop();return"".concat(_.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(a="\n".concat(g,"...").concat(v).concat(a),s=!0),""!==n&&(a="\n ".concat(n).concat(a),n="");var k=0,T=_[r]+"\n".concat(y,"+ actual").concat(v," ").concat(m,"- expected").concat(v),B=" ".concat(g,"...").concat(v," Lines skipped");for(h=0;h<A;h++){var x=h-o;if(u.length<h+1)x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(c[h-2]),k++),i+="\n ".concat(c[h-1]),k++),o=h,n+="\n".concat(m,"-").concat(v," ").concat(c[h]),k++;else if(c.length<h+1)x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(u[h-2]),k++),i+="\n ".concat(u[h-1]),k++),o=h,i+="\n".concat(y,"+").concat(v," ").concat(u[h]),k++;else{var O=c[h],j=u[h],R=j!==O&&(!b(j,",")||j.slice(0,-1)!==O);R&&b(O,",")&&O.slice(0,-1)===j&&(R=!1,j+=","),R?(x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(u[h-2]),k++),i+="\n ".concat(u[h-1]),k++),o=h,i+="\n".concat(y,"+").concat(v," ").concat(j),n+="\n".concat(m,"-").concat(v," ").concat(O),k+=2):(i+=n,n="",1!==x&&0!==h||(i+="\n ".concat(j),k++))}if(k>20&&h<A-2)return"".concat(T).concat(B,"\n").concat(i,"\n").concat(g,"...").concat(v).concat(n,"\n")+"".concat(g,"...").concat(v)}return"".concat(T).concat(s?B:"","\n").concat(i).concat(n).concat(a).concat(d)}var A=function(t,r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(b,t);var i,s,f=(i=b,s=u(),function(){var t,e=h(i);if(s){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return o(this,t)});function b(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==l(t)||null===t)throw new p("options","Object",t);var r=t.message,n=t.operator,i=t.stackStartFn,s=t.actual,u=t.expected,c=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=f.call(this,String(r));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(g="[34m",y="[32m",v="[39m",m="[31m"):(g="",y="",v="",m="")),"object"===l(s)&&null!==s&&"object"===l(u)&&null!==u&&"stack"in s&&s instanceof Error&&"stack"in u&&u instanceof Error&&(s=w(s),u=w(u)),"deepStrictEqual"===n||"strictEqual"===n)e=f.call(this,S(s,u,n));else if("notDeepStrictEqual"===n||"notStrictEqual"===n){var h=_[n],d=E(s).split("\n");if("notStrictEqual"===n&&"object"===l(s)&&null!==s&&(h=_.notStrictEqualObject),d.length>30)for(d[26]="".concat(g,"...").concat(v);d.length>27;)d.pop();e=1===d.length?f.call(this,"".concat(h," ").concat(d[0])):f.call(this,"".concat(h,"\n\n").concat(d.join("\n"),"\n"))}else{var A=E(s),M="",k=_[n];"notDeepEqual"===n||"notEqual"===n?(A="".concat(_[n],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(M="".concat(E(u)),A.length>512&&(A="".concat(A.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===n||"equal"===n?A="".concat(k,"\n\n").concat(A,"\n\nshould equal\n\n"):M=" ".concat(n," ").concat(M)),e=f.call(this,"".concat(A).concat(M))}return Error.stackTraceLimit=c,e.generatedMessage=!r,Object.defineProperty(a(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=s,e.expected=u,e.operator=n,Error.captureStackTrace&&Error.captureStackTrace(a(e),i),e.stack,e.name="AssertionError",o(e)}return n(b,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:r,value:function(t,r){return d(this,e(e({},r),{},{customInspect:!1,depth:0}))}}]),b}(s(Error),d.custom);return Xy=A}!function(t){var e=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},r=/%[sdj%]/g;t.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var i=arguments,o=i.length,s=String(t).replace(r,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return t}})),f=i[n];n<o;f=i[++n])p(f)||!v(f)?s+=" "+f:s+=" "+a(f);return s},t.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var n={},i=/^$/;if(process.env.NODE_DEBUG){var o=process.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}function a(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function u(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return g(i)||(i=u(e,i,n)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(p(e))return t.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(E(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return c(r)}var v,S="",A=!1,M=["{","}"];(l(r)&&(A=!0,M=["[","]"]),E(r))&&(S=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(S=" "+RegExp.prototype.toString.call(r)),_(r)&&(S=" "+Date.prototype.toUTCString.call(r)),w(r)&&(S=" "+c(r)),0!==a.length||A&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),v=A?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)k(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}(e,r,n,s,a):a.map((function(t){return h(e,r,n,s,t,A)})),e.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(v,S,M)):M[0]+S+M[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(s=t.stylize("[Setter]","special")),k(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(f.value)<0?(s=p(r)?u(t,f.value,null):u(t,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function l(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function p(t){return null===t}function b(t){return"number"==typeof t}function g(t){return"string"==typeof t}function y(t){return void 0===t}function m(t){return v(t)&&"[object RegExp]"===S(t)}function v(t){return"object"==typeof t&&null!==t}function _(t){return v(t)&&"[object Date]"===S(t)}function w(t){return v(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!n[e])if(i.test(e)){var r=process.pid;n[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else n[e]=function(){};return n[e]},t.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=vy,t.isArray=l,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(t){return null==t},t.isNumber=b,t.isString=g,t.isSymbol=function(t){return"symbol"==typeof t},t.isUndefined=y,t.isRegExp=m,t.types.isRegExp=m,t.isObject=v,t.isDate=_,t.types.isDate=_,t.isError=w,t.types.isNativeError=w,t.isFunction=E,t.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},t.isBuffer=Qy;var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=bt,t._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function B(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}t.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var r;if("function"!=typeof(r=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,T,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),T&&Object.defineProperty(r,T,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,e(t))},t.promisify.custom=T,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(B.bind(null,t,o))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,e(t)),r}}(my);var rm,nm,im=Object.prototype.toString,om=function(t){var e=im.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===im.call(t.callee)),r};var am=Array.prototype.slice,sm=om,fm=Object.keys,um=fm?function(t){return fm(t)}:function(){if(nm)return rm;var t;if(nm=1,!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=om,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call((function(){}),"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!u["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();t=function(t){var i=null!==t&&"object"==typeof t,u="[object Function]"===r.call(t),h=n(t),l=i&&"[object String]"===r.call(t),d=[];if(!i&&!u&&!h)throw new TypeError("Object.keys called on a non-object");var p=a&&u;if(l&&t.length>0&&!e.call(t,0))for(var b=0;b<t.length;++b)d.push(String(b));if(h&&t.length>0)for(var g=0;g<t.length;++g)d.push(String(g));else for(var y in t)p&&"prototype"===y||!e.call(t,y)||d.push(String(y));if(o)for(var m=function(t){if("undefined"==typeof window||!c)return f(t);try{return f(t)}catch(t){return!1}}(t),v=0;v<s.length;++v)m&&"constructor"===s[v]||!e.call(t,s[v])||d.push(s[v]);return d}}return rm=t}(),cm=Object.keys;um.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return sm(t)?cm(am.call(t)):cm(t)})}else Object.keys=um;return Object.keys||um};var hm,lm,dm,pm,bm,gm,ym,mm,vm,_m,wm,Em,Sm,Am,Mm,km,Tm,Bm=um,xm=Bm,Om=Xt(),jm=Sr,Rm=vt,Im=jm("Array.prototype.push"),Pm=jm("Object.prototype.propertyIsEnumerable"),Cm=Om?Rm.getOwnPropertySymbols:null,Lm=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=Rm(t);if(1===arguments.length)return r;for(var n=1;n<arguments.length;++n){var i=Rm(arguments[n]),o=xm(i),a=Om&&(Rm.getOwnPropertySymbols||Cm);if(a)for(var s=a(i),f=0;f<s.length;++f){var u=s[f];Pm(i,u)&&Im(o,u)}for(var c=0;c<o.length;++c){var h=o[c];if(Pm(i,h)){var l=i[h];r[h]=l}}}return r},Nm=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),o="";for(var a in i)o+=a;return t!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1}()?Lm:Object.assign:Lm},Um=function(t){return t!=t},Fm=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!Um(t)||!Um(e))},Dm=Fm,qm=function(){return"function"==typeof Object.is?Object.is:Dm},zm=vr,Hm=an,Vm=Hm(zm("String.prototype.indexOf")),Wm=function(t,e){var r=zm(t,!!e);return"function"==typeof r&&Vm(t,".prototype.")>-1?Hm(r):r};function Km(){if(lm)return hm;lm=1;var t=Bm,e="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),r=Object.prototype.toString,n=Array.prototype.concat,i=Vr,o=$r(),a=function(t,e,n,a){if(e in t)if(!0===a){if(t[e]===n)return}else if(!function(t){return"function"==typeof t&&"[object Function]"===r.call(t)}(a)||!a())return;o?i(t,e,n,!0):i(t,e,n)},s=function(r,i){var o=arguments.length>2?arguments[2]:{},s=t(i);e&&(s=n.call(s,Object.getOwnPropertySymbols(i)));for(var f=0;f<s.length;f+=1)a(r,s[f],i[s[f]],o[s[f]])};return s.supportsDescriptors=!!o,hm=s}function $m(){if(gm)return bm;gm=1;var t=Km(),e=an,r=Fm,n=qm,i=function(){if(pm)return dm;pm=1;var t=qm,e=Km();return dm=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},dm}(),o=e(n(),Object);return t(o,{getPolyfill:n,implementation:r,shim:i}),bm=o}function Gm(){return mm?ym:(mm=1,ym=function(t){return t!=t})}function Zm(){if(_m)return vm;_m=1;var t=Gm();return vm=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t}}function Jm(){if(Em)return wm;Em=1;var t=Km(),e=Zm();return wm=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},wm}function Xm(){if(km)return Mm;function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],f=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e);else for(;!(f=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);f=!0);}catch(t){u=!0,i=t}finally{try{if(!f&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r(t){return r="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},r(t)}km=1;var n=void 0!==/a/g.flags,i=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},o=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},a=Object.is?Object.is:$m(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:function(){if(Am)return Sm;Am=1;var t=an,e=Km(),r=Gm(),n=Zm(),i=Jm(),o=t(n(),Number);return e(o,{getPolyfill:n,implementation:r,shim:i}),Sm=o}();function u(t){return t.call.bind(t)}var c=u(Object.prototype.hasOwnProperty),h=u(Object.prototype.propertyIsEnumerable),l=u(Object.prototype.toString),d=my.types,p=d.isAnyArrayBuffer,b=d.isArrayBufferView,g=d.isDate,y=d.isMap,m=d.isRegExp,v=d.isSet,_=d.isNativeError,w=d.isBoxedPrimitive,E=d.isNumberObject,S=d.isStringObject,A=d.isBooleanObject,M=d.isBigIntObject,k=d.isSymbolObject,T=d.isFloat32Array,B=d.isFloat64Array;function x(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function O(t){return Object.keys(t).filter(x).concat(s(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function j(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 R(t,e,i,o){if(t===e)return 0!==t||(!i||a(t,e));if(i){if("object"!==r(t))return"number"==typeof t&&f(t)&&f(e);if("object"!==r(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==r(t))return(null===e||"object"!==r(e))&&t==e;if(null===e||"object"!==r(e))return!1}var s,u,c,h,d=l(t);if(d!==l(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var x=O(t),R=O(e);return x.length===R.length&&P(t,e,i,o,1,x)}if("[object Object]"===d&&(!y(t)&&y(e)||!v(t)&&v(e)))return!1;if(g(t)){if(!g(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(m(t)){if(!m(e)||(c=t,h=e,!(n?c.source===h.source&&c.flags===h.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(h))))return!1}else if(_(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(b(t)){if(i||!T(t)&&!B(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===j(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var I=O(t),C=O(e);return I.length===C.length&&P(t,e,i,o,0,I)}if(v(t))return!(!v(e)||t.size!==e.size)&&P(t,e,i,o,2);if(y(t))return!(!y(e)||t.size!==e.size)&&P(t,e,i,o,3);if(p(t)){if(u=e,(s=t).byteLength!==u.byteLength||0!==j(new Uint8Array(s),new Uint8Array(u)))return!1}else if(w(t)&&!function(t,e){return E(t)?E(e)&&a(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):S(t)?S(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):A(t)?A(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):M(t)?M(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):k(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return P(t,e,i,o,0)}function I(t,e){return e.filter((function(e){return h(t,e)}))}function P(e,n,a,f,u,l){if(5===arguments.length){l=Object.keys(e);var d=Object.keys(n);if(l.length!==d.length)return!1}for(var p=0;p<l.length;p++)if(!c(n,l[p]))return!1;if(a&&5===arguments.length){var b=s(e);if(0!==b.length){var g=0;for(p=0;p<b.length;p++){var y=b[p];if(h(e,y)){if(!h(n,y))return!1;l.push(y),g++}else if(h(n,y))return!1}var m=s(n);if(b.length!==m.length&&I(n,m).length!==g)return!1}else{var v=s(n);if(0!==v.length&&0!==I(n,v).length)return!1}}if(0===l.length&&(0===u||1===u&&0===e.length||0===e.size))return!0;if(void 0===f)f={val1:new Map,val2:new Map,position:0};else{var _=f.val1.get(e);if(void 0!==_){var w=f.val2.get(n);if(void 0!==w)return _===w}f.position++}f.val1.set(e,f.position),f.val2.set(n,f.position);var E=function(e,n,a,s,f,u){var h=0;if(2===u){if(!function(t,e,n,o){for(var a=null,s=i(t),f=0;f<s.length;f++){var u=s[f];if("object"===r(u)&&null!==u)null===a&&(a=new Set),a.add(u);else if(!e.has(u)){if(n)return!1;if(!N(t,e,u))return!1;null===a&&(a=new Set),a.add(u)}}if(null!==a){for(var c=i(e),h=0;h<c.length;h++){var l=c[h];if("object"===r(l)&&null!==l){if(!C(a,l,n,o))return!1}else if(!n&&!t.has(l)&&!C(a,l,n,o))return!1}return 0===a.size}return!0}(e,n,a,f))return!1}else if(3===u){if(!function(e,n,i,a){for(var s=null,f=o(e),u=0;u<f.length;u++){var c=t(f[u],2),h=c[0],l=c[1];if("object"===r(h)&&null!==h)null===s&&(s=new Set),s.add(h);else{var d=n.get(h);if(void 0===d&&!n.has(h)||!R(l,d,i,a)){if(i)return!1;if(!U(e,n,h,l,a))return!1;null===s&&(s=new Set),s.add(h)}}}if(null!==s){for(var p=o(n),b=0;b<p.length;b++){var g=t(p[b],2),y=g[0],m=g[1];if("object"===r(y)&&null!==y){if(!F(s,e,y,m,i,a))return!1}else if(!(i||e.has(y)&&R(e.get(y),m,!1,a)||F(s,e,y,m,!1,a)))return!1}return 0===s.size}return!0}(e,n,a,f))return!1}else if(1===u)for(;h<e.length;h++){if(!c(e,h)){if(c(n,h))return!1;for(var l=Object.keys(e);h<l.length;h++){var d=l[h];if(!c(n,d)||!R(e[d],n[d],a,f))return!1}return l.length===Object.keys(n).length}if(!c(n,h)||!R(e[h],n[h],a,f))return!1}for(h=0;h<s.length;h++){var p=s[h];if(!R(e[p],n[p],a,f))return!1}return!0}(e,n,a,l,f,u);return f.val1.delete(e),f.val2.delete(n),E}function C(t,e,r,n){for(var o=i(t),a=0;a<o.length;a++){var s=o[a];if(R(e,s,r,n))return t.delete(s),!0}return!1}function L(t){switch(r(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(f(t))return!1}return!0}function N(t,e,r){var n=L(r);return null!=n?n:e.has(n)&&!t.has(n)}function U(t,e,r,n,i){var o=L(r);if(null!=o)return o;var a=e.get(o);return!(void 0===a&&!e.has(o)||!R(n,a,!1,i))&&(!t.has(o)&&R(n,a,!1,i))}function F(t,e,r,n,o,a){for(var s=i(t),f=0;f<s.length;f++){var u=s[f];if(R(r,u,o,a)&&R(n,e.get(u),o,a))return t.delete(u),!0}return!1}return Mm={isDeepEqual:function(t,e){return R(t,e,false)},isDeepStrictEqual:function(t,e){return R(t,e,true)}}}function Ym(){if(Tm)return gy.exports;function t(e){return t="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},t(e)}function e(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}Tm=1;var r,n,i=tm().codes,o=i.ERR_AMBIGUOUS_ARGUMENT,a=i.ERR_INVALID_ARG_TYPE,s=i.ERR_INVALID_ARG_VALUE,f=i.ERR_INVALID_RETURN_VALUE,u=i.ERR_MISSING_ARGS,c=em(),h=my.inspect,l=my.types,d=l.isPromise,p=l.isRegExp,b=Nm(),g=qm(),y=Wm("RegExp.prototype.test");function m(){var t=Xm();r=t.isDeepEqual,n=t.isDeepStrictEqual}var v=!1,_=gy.exports=A,w={};function E(t){if(t.message instanceof Error)throw t.message;throw new c(t)}function S(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new c({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function A(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];S.apply(void 0,[A,e.length].concat(e))}_.fail=function t(e,r,n,i,o){var a,s=arguments.length;if(0===s)a="Failed";else if(1===s)n=e,e=void 0;else{if(!1===v)v=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===s&&(i="!=")}if(n instanceof Error)throw n;var f={actual:e,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||t};void 0!==n&&(f.message=n);var u=new c(f);throw a&&(u.message=a,u.generatedMessage=!0),u},_.AssertionError=c,_.ok=A,_.equal=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");e!=r&&E({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},_.notEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");e==r&&E({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},_.deepEqual=function t(e,n,i){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),r(e,n)||E({actual:e,expected:n,message:i,operator:"deepEqual",stackStartFn:t})},_.notDeepEqual=function t(e,n,i){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),r(e,n)&&E({actual:e,expected:n,message:i,operator:"notDeepEqual",stackStartFn:t})},_.deepStrictEqual=function t(e,i,o){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),n(e,i)||E({actual:e,expected:i,message:o,operator:"deepStrictEqual",stackStartFn:t})},_.notDeepStrictEqual=function t(e,i,o){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m();n(e,i)&&E({actual:e,expected:i,message:o,operator:"notDeepStrictEqual",stackStartFn:t})},_.strictEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");g(e,r)||E({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},_.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");g(e,r)&&E({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var M=e((function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&p(e[t])&&y(e[t],n[t])?i[t]=n[t]:i[t]=e[t])}))}));function k(e,i,o,f){if("function"!=typeof i){if(p(i))return y(i,e);if(2===arguments.length)throw new a("expected",["Function","RegExp"],i);if("object"!==t(e)||null===e){var u=new c({actual:e,expected:i,message:o,operator:"deepStrictEqual",stackStartFn:f});throw u.operator=f.name,u}var h=Object.keys(i);if(i instanceof Error)h.push("name","message");else if(0===h.length)throw new s("error",i,"may not be an empty object");return void 0===r&&m(),h.forEach((function(t){"string"==typeof e[t]&&p(i[t])&&y(i[t],e[t])||function(t,e,r,i,o,a){if(!(r in t)||!n(t[r],e[r])){if(!i){var s=new M(t,o),f=new M(e,o,t),u=new c({actual:s,expected:f,operator:"deepStrictEqual",stackStartFn:a});throw u.actual=t,u.expected=e,u.operator=a.name,u}E({actual:t,expected:e,message:i,operator:a.name,stackStartFn:a})}}(e,i,t,o,h,f)})),!0}return void 0!==i.prototype&&e instanceof i||!Error.isPrototypeOf(i)&&!0===i.call({},e)}function T(t){if("function"!=typeof t)throw new a("fn","Function",t);try{t()}catch(t){return t}return w}function B(e){return d(e)||null!==e&&"object"===t(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function x(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!B(e=t()))throw new f("instance of Promise","promiseFn",e)}else{if(!B(t))throw new a("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return w})).catch((function(t){return t}))}))}function O(e,r,n,i){if("string"==typeof n){if(4===arguments.length)throw new a("error",["Object","Error","Function","RegExp"],n);if("object"===t(r)&&null!==r){if(r.message===n)throw new o("error/message",'The error message "'.concat(r.message,'" is identical to the message.'))}else if(r===n)throw new o("error/message",'The error "'.concat(r,'" is identical to the message.'));i=n,n=void 0}else if(null!=n&&"object"!==t(n)&&"function"!=typeof n)throw new a("error",["Object","Error","Function","RegExp"],n);if(r===w){var s="";n&&n.name&&(s+=" (".concat(n.name,")")),s+=i?": ".concat(i):".";var f="rejects"===e.name?"rejection":"exception";E({actual:void 0,expected:n,operator:e.name,message:"Missing expected ".concat(f).concat(s),stackStartFn:e})}if(n&&!k(r,n,i,e))throw r}function j(t,e,r,n){if(e!==w){if("string"==typeof r&&(n=r,r=void 0),!r||k(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";E({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function R(e,r,n,i,o){if(!p(r))throw new a("regexp","RegExp",r);var s="match"===o;if("string"!=typeof e||y(r,e)!==s){if(n instanceof Error)throw n;var f=!n;n=n||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(t(e)," (").concat(h(e),")"):(s?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(h(r),". Input:\n\n").concat(h(e),"\n"));var u=new c({actual:e,expected:r,message:n,operator:o,stackStartFn:i});throw u.generatedMessage=f,u}}function I(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];S.apply(void 0,[I,e.length].concat(e))}return _.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];O.apply(void 0,[t,T(e)].concat(n))},_.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return x(e).then((function(e){return O.apply(void 0,[t,e].concat(n))}))},_.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];j.apply(void 0,[t,T(e)].concat(n))},_.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return x(e).then((function(e){return j.apply(void 0,[t,e].concat(n))}))},_.ifError=function e(r){if(null!=r){var n="ifError got unwanted exception: ";"object"===t(r)&&"string"==typeof r.message?0===r.message.length&&r.constructor?n+=r.constructor.name:n+=r.message:n+=h(r);var i=new c({actual:r,expected:null,operator:"ifError",message:n,stackStartFn:e}),o=r.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=i.stack.split("\n"),f=0;f<a.length;f++){var u=s.indexOf(a[f]);if(-1!==u){s=s.slice(0,u);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},_.match=function t(e,r,n){R(e,r,n,t,"match")},_.doesNotMatch=function t(e,r,n){R(e,r,n,t,"doesNotMatch")},_.strict=b(I,_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict,gy.exports}var Qm=r(Ym());const tv=new cy.ec("secp256k1"),ev=tv.g,rv=new yh(tv.n.toString());class nv{constructor(t){this.Q=t}static fromBinary(t){return nv.fromBuffer(Buffer.from(t,"binary"))}static fromBuffer(t){return"000000000000000000000000000000000000000000000000000000000000000000"===t.toString("hex")?new nv(null):new nv(tv.curve.decodePoint(t))}toBuffer(t=!0){return null===this.Q?Buffer.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):Buffer.from(this.Q.encode("array",t))}static fromPoint(t){return new nv(t)}toUncompressed(){const t=Buffer.from(this.Q.encode("array",!1)),e=tv.curve.decodePoint(t);return nv.fromPoint(e)}toBlockchainAddress(){return py(ly(this.toBuffer()))}toString(t=M().get("address_prefix")){return this.toPublicKeyString(t)}toPublicKeyString(t=M().get("address_prefix")){if(this.pubdata)return t+this.pubdata;const e=this.toBuffer(),r=py(e),n=Buffer.concat([e,r.slice(0,4)]);return this.pubdata=by.encode(n),t+this.pubdata}static fromString(t,e=M().get("address_prefix")){try{return nv.fromStringOrThrow(t,e)}catch(t){return null}}static fromStringOrThrow(t,e=M().get("address_prefix")){const r=t.slice(0,e.length);Qm.equal(e,r,`Expecting key to begin with ${e}, instead got ${r}`),t=t.slice(e.length);const n=by.decode(t),i=Buffer.from(n),o=i.slice(-4),a=i.slice(0,-4),s=py(a).slice(0,4);return Qm.deepEqual(o,s,"Checksum did not match"),nv.fromBuffer(a)}toAddressString(t=M().get("address_prefix")){const e=py(ly(this.toBuffer())),r=py(e),n=Buffer.concat([e,r.slice(0,4)]);return t+by.encode(n)}toPtsAddy(){const t=py(hy(this.toBuffer())),e=Buffer.from([56]),r=Buffer.concat([e,t]);let n=hy(r);n=hy(n);const i=Buffer.concat([r,n.slice(0,4)]);return by.encode(i)}child(t){Qm(Buffer.isBuffer(t),"Buffer required: offset"),Qm.equal(t.length,32,"offset length"),t=hy(t=Buffer.concat([this.toBuffer(),t]));const e=new yh(t);if(e.cmp(rv)>=0)throw new Error("Child offset went out of bounds, try again");const r=ev.mul(e),n=this.Q.add(r);if(n.isInfinity())throw new Error("Child offset derived to an invalid key, try again");return nv.fromPoint(n)}static fromHex(t){const e=Buffer.from(t,"hex");return 0===e.length?new nv(null):nv.fromBuffer(e)}toHex(){return this.Q?this.toBuffer().toString("hex"):"000000000000000000000000000000000000000000000000000000000000000000"}static fromStringHex(t){return nv.fromString(Buffer.from(t,"hex").toString())}}const iv=new cy.ec("secp256k1"),ov=iv.g,av=new yh(iv.n.toString());class sv{constructor(t){this.d=t}static fromBuffer(t){if(!Buffer.isBuffer(t))throw new Error("Expecting parameter to be a Buffer type");if(32!==t.length&&I.warn(`WARN: Expecting 32 bytes, instead got ${t.length}, stack trace:`,(new Error).stack),0===t.length)throw new Error("Empty buffer");return new sv(new yh(t))}static fromSeed(t){if("string"!=typeof t)throw new Error("seed must be of type string");return sv.fromBuffer(hy(t))}static isWif(t){try{return this.fromWif(t),!0}catch(t){return!1}}static fromWif(t){const e=Buffer.from(by.decode(t)),r=e.readUInt8(0);Qm.equal(128,r,`Expected version 128, instead got ${r}`);const n=e.slice(0,-4),i=e.slice(-4);let o=hy(n);if(o=hy(o),o=o.slice(0,4),i.toString()!==o.toString())throw new Error("Invalid WIF key (checksum miss-match)");return n.writeUInt8(128,0),sv.fromBuffer(n.slice(1))}toWif(){const t=this.toBuffer(),e=Buffer.concat([Buffer.from([128]),t]);let r=hy(e);r=hy(r),r=r.slice(0,4);const n=Buffer.concat([e,r]);return by.encode(n)}toString(){return this.toWif()}toPublicKeyPoint(){return ov.mul(this.d)}toPublic(){return this.public_key?this.public_key:this.public_key=nv.fromPoint(this.toPublicKeyPoint())}toBuffer(){return this.d.toArrayLike(Buffer,"be",32)}get_shared_secret(t){const e="string"==typeof t?nv.fromStringOrThrow(t):t;if(!e||!e.Q)throw new Error("Invalid public key");return ly(e.Q.mul(this.d).getX().toArrayLike(Buffer,"be",32))}child(t){t=hy(t=Buffer.concat([this.toPublicKey().toBuffer(),t]));const e=new yh(t);if(e.gte(av))throw new Error("Child offset went out of bounds, try again");const r=this.d.add(e);if(r.isZero())throw new Error("Child offset derived to an invalid key, try again");return new sv(r)}static fromHex(t){return sv.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}toPublicKey(){return this.toPublic()}}function fv(t,e){switch(t){case"Array":if(Array.isArray(e))return;break;case"Boolean":if("boolean"==typeof e)return;break;case"Buffer":if(Buffer.isBuffer(e))return;break;case"Number":if("number"==typeof e)return;break;case"String":if("string"==typeof e)return;break;default:if("function"==typeof t&&uv(e.constructor)===uv(t))return}throw new TypeError("Expected "+("function"==typeof t?uv(t):t)+", got "+e)}function uv(t){const e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}class cv{constructor(t,e){fv(yh,t),fv(yh,e),this.r=t,this.s=e}static parseCompact(t){if(65!==t.length)throw new Error("Invalid signature length");let e=t.readUInt8(0)-27;if((7&e)!==e)throw new Error("Invalid signature parameter");const r=!!(4&e);e&=3;const n=new yh(t.slice(1,33)),i=new yh(t.slice(33));return{compressed:r,i:e,signature:new cv(n,i)}}static fromDER(t){if(48!==t.readUInt8(0))throw new Error("Not a DER sequence");if(t.readUInt8(1)!==t.length-2)throw new Error("Invalid sequence length");if(2!==t.readUInt8(2))throw new Error("Expected a DER integer");const e=t.readUInt8(3);if(0===e)throw new Error("R length is zero");let r=4+e;if(2!==t.readUInt8(r))throw new Error("Expected a DER integer (2)");const n=t.readUInt8(r+1);if(0===n)throw new Error("S length is zero");const i=t.slice(4,r),o=t.slice(r+2);if(r+=2+n,e>1&&0===i.readUInt8(0)&&!(128&i.readUInt8(1)))throw new Error("R value excessively padded");if(n>1&&0===o.readUInt8(0)&&!(128&o.readUInt8(1)))throw new Error("S value excessively padded");if(r!==t.length)throw new Error("Invalid DER encoding");const a=new yh(i),s=new yh(o);if(a.isNeg())throw new Error("R value is negative");if(s.isNeg())throw new Error("S value is negative");return new cv(a,s)}static parseScriptSignature(t){const e=t.readUInt8(t.length-1),r=-129&e;if(r<=0||r>=4)throw new Error("Invalid hashType");return{signature:cv.fromDER(t.slice(0,-1)),hashType:e}}toCompact(t,e){e&&(t+=4),t+=27;const r=Buffer.alloc(65);return r.writeUInt8(t,0),this.r.toArrayLike(Buffer,"be",32).copy(r,1),this.s.toArrayLike(Buffer,"be",32).copy(r,33),r}toDER(){const t=this.r.toArrayLike(Buffer,"be"),e=this.s.toArrayLike(Buffer,"be"),r=[];return r.push(2,t.length),Array.from(t).forEach((t=>r.push(t))),r.push(2,e.length),Array.from(e).forEach((t=>r.push(t))),r.unshift(48,r.length),Buffer.from(r)}toScriptSignature(t){const e=Buffer.alloc(1);return e.writeUInt8(t,0),Buffer.concat([this.toDER(),e])}}function hv(t,e,r,n){const i=new yh(e),o=new yh(t.n.toString()),a=t.g;let s,f;if(function(t,e,r,n,i){fv("Buffer",e),fv(yh,r),i&&(e=hy(Buffer.concat([e,Buffer.alloc(i)]))),Qm.equal(e.length,32,"Hash must be 256 bit");const o=r.toArrayLike(Buffer,"be",32);let a=Buffer.alloc(32),s=Buffer.alloc(32);s.fill(1),a.fill(0),a=dy(Buffer.concat([s,Buffer.from([0]),o,e]),a),s=dy(s,a),a=dy(Buffer.concat([s,Buffer.from([1]),o,e]),a),s=dy(s,a),s=dy(s,a);let f=new yh(s);for(;f.isNeg()||f.isZero()||f.gte(new yh(t.n.toString()))||!n(f);)a=dy(Buffer.concat([s,Buffer.from([0])]),a),s=dy(s,a),s=dy(s,a),f=new yh(s)}(t,e,r,(function(t){const e=a.mul(t);if(e.isInfinity())return!1;const n=new yh(e.getX().toString()).mod(o);if(n.isZero())return!1;const u=t.invm(o).mul(i.add(r.mul(n))).mod(o);return!u.isZero()&&(s=n,f=u,!0)}),n),!s||!f)throw new Error("Unable to find valid signature");const u=o.shrn(1),c=f.gt(u)?o.sub(f):f;return new cv(s,c)}const lv=new cy.ec("secp256k1");class dv{constructor(t,e,r){this.r=t,this.s=e,this.i=r}static fromBuffer(t){if(65!==t.length)throw new Error("Invalid signature length");const e=t.readUInt8(0);if(e-27!=(e-27&7))throw new Error("Invalid signature parameter");const r=new yh(t.slice(1,33)),n=new yh(t.slice(33));return new dv(r,n,e)}toBuffer(){const t=Buffer.alloc(65);return t.writeUInt8(this.i,0),this.r.toArrayLike(Buffer,"be",32).copy(t,1),this.s.toArrayLike(Buffer,"be",32).copy(t,33),t}static signBuffer(t,e){const r=hy(t);return dv.signBufferSha256(r,e)}static signBufferSha256(t,e){if(32!==t.length||!Buffer.isBuffer(t))throw new Error("buf_sha256: 32 byte buffer required");const r="string"==typeof e?sv.fromWif(e):e;if(!r)throw new Error("private_key required");const n=r.d;let i,o=0;for(;;){i=hv(lv,t,n,o++);const e=i.r.toArrayLike(Buffer,"be",32),r=i.s.toArrayLike(Buffer,"be",32);if(!(128&e[0]||0===e[0]&&!(128&e[1])||128&r[0]||0===r[0]&&!(128&r[1])))break}const a=function(t,e,r,n){for(let i=0;i<4;i++)try{if(t.recoverPubKey(e,r,i).eq(n))return i}catch(t){t.message}throw r.r.toString(16),r.s.toString(16),n.getX().toString(16),n.getY().toString(16),new Error("Unable to find valid recovery factor")}(lv,new yh(t),i,r.toPublic().Q);return new dv(i.r,i.s,a+27)}static isCanonical(t,e){return!(128&t[0]||0===t[0]&&!(128&t[1])||128&e[0]||0===e[0]&&!(128&e[1]))}static sign(t,e){return dv.signBuffer(Buffer.from(t),e)}verifyBuffer(t,e){const r=hy(t);return this.verifyHash(r,e)}verifyHash(t,e){if(32!==t.length)throw new Error("A SHA 256 should be 32 bytes long, instead got "+t.length);const r=new yh(t),n=new yh(lv.n.toString()),i=lv.g,o=e.Q;if(!o)throw new Error("Invalid public key");if(this.r.isNeg()||this.r.isZero()||this.r.gte(n))return!1;if(this.s.isNeg()||this.s.isZero()||this.s.gte(n))return!1;const a=this.s.invm(n),s=r.mul(a).mod(n),f=this.r.mul(a).mod(n),u=i.mul(s).add(o.mul(f));if(u.isInfinity())return!1;return u.getX().mod(n).eq(this.r)}static fromHex(t){return dv.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}}class pv{constructor(t){this.addy=t}static fromBuffer(t){const e=t.subarray(-4),r=t.subarray(0,-4),n=py(r).subarray(0,4);if(!e.equals(n))throw new Error("Invalid address checksum");return M().get("address_prefix")+by.encode(r)}static fromString(t){const e=M().get("address_prefix");if(!t.startsWith(e))throw new Error(`Expecting address to begin with ${e}`);const r=t.slice(e.length),n=by.decode(r),i=n.subarray(-4),o=py(n.subarray(0,-4)).subarray(0,4);if(!i.equals(o))throw new Error("Invalid address checksum");return n}static fromPublicKey(t,e=!0){const r=t.toBuffer(e),n=py(r).subarray(0,4),i=Buffer.concat([r,n]);return M().get("address_prefix")+by.encode(i)}static fromPublic(t,e=!0,r=56){const n=py(hy(t.toBuffer(e))),i=Buffer.alloc(1);i.writeUInt8(255&r,0);const o=Buffer.concat([i,n]);let a=hy(o);a=hy(a);const s=Buffer.concat([o,a.subarray(0,4)]);return new pv(py(s))}static toBuffer(t){return pv.fromString(t)}toBuffer(){return this.addy}getVersion(){return this.addy[0]}toString(t=String(M().get("address_prefix"))||"STM"){const e=py(this.addy).subarray(0,4),r=Buffer.concat([this.addy,e]);return t+by.encode(r)}}var bv=zd(),gv=t({__proto__:null},[bv]);const yv=Buffer.from("3b3b081e46ea808d5a96b08c4bc5003f5e15767090f344faab531ec57565136b","hex");function mv(t,e,r){if(!t.params)throw new Error("Unable to sign a request without params");const n=Buffer.from(JSON.stringify(t.params),"utf8").toString("base64"),i=bv.randomBytes(8),o=i.toString("hex"),a=(new Date).toISOString(),s=function(t,e,r,n,i){const o=bv.createHash("sha256");o.update(t),o.update(e),o.update(r),o.update(n);const a=bv.createHash("sha256");return a.update(yv),a.update(o.digest()),a.update(i),a.digest()}(a,e,t.method,n,i),f=[];for(const t of r){const e=sv.fromWif(t),r=dv.signBufferSha256(s,e);f.push(r.toHex())}return{jsonrpc:"2.0",method:t.method,id:t.id,params:{__signed:{account:e,nonce:o,params:n,signatures:f,timestamp:a}}}}const vv=[{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_post_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_comment_discussions_by_payout",params:["query"]},{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:"account_by_key_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:"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:"database_api",method:"get_content",params:["author","permlink"]},{api:"database_api",method:"get_account_notifications",params:["account","from","limit"]},{api:"database_api",method:"get_account_reputation",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_replies",params:["author","permlink"]},{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:"database_api",method:"get_reward_fund",params:["name"]},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit"]},{api:"login_api",method:"login",params:["username","password"]},{api:"login_api",method:"get_api_by_name",params:["database_api"]},{api:"login_api",method:"get_version"},{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"]},{api:"market_history_api",method:"get_ticker",params:[]},{api:"market_history_api",method:"get_volume",params:[]},{api:"market_history_api",method:"get_order_book",method_name:"getMarketOrderBook",params:["limit"]},{api:"market_history_api",method:"get_trade_history",params:["start","end","limit"]},{api:"market_history_api",method:"get_recent_trades",params:["limit"]},{api:"market_history_api",method:"get_market_history",params:["bucket_seconds","start","end"]},{api:"market_history_api",method:"get_market_history_buckets",params:[]},{api:"condenser_api",method:"find_proposals",params:["id_set"]},{api:"condenser_api",method:"list_proposals",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"list_proposal_votes",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"get_nai_pool",params:[]},{api:"rc_api",method:"find_rc_accounts",params:["accounts"],is_object:!0},{api:"condenser_api",method:"get_expiring_vesting_delegations",params:["account","start","limit"]},{api:"database_api",method:"find_change_recovery_account_requests",params:["account"],is_object:!0},{api:"database_api",method:"get_escrow_by_from",params:["from","escrowId"]},{api:"database_api",method:"get_escrow_by_to",params:["to","escrowId"]},{api:"database_api",method:"get_escrow_by_agent",params:["agent","escrowId"]},{api:"database_api",method:"get_account_bandwidth_by_type",params:["account","bandwidthType"]},{api:"database_api",method:"get_account_bandwidth_by_type_and_time",params:["account","bandwidthType","time"]},{api:"database_api",method:"get_proposed_transactions",params:["account"]},{api:"database_api",method:"get_proposed_transaction",params:["account","proposalId"]},{api:"database_api",method:"get_proposed_transaction_expirations",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_id",params:["proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_id",params:["account","proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time",params:["account","time"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time_and_id",params:["account","time","proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time_and_id_and_approver",params:["account","time","proposalId","approver"]}];function _v(t,e){return function(){return t.apply(e,arguments)}}const{toString:wv}=Object.prototype,{getPrototypeOf:Ev}=Object,{iterator:Sv,toStringTag:Av}=Symbol,Mv=(t=>e=>{const r=wv.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),kv=t=>(t=t.toLowerCase(),e=>Mv(e)===t),Tv=t=>e=>typeof e===t,{isArray:Bv}=Array,xv=Tv("undefined");function Ov(t){return null!==t&&!xv(t)&&null!==t.constructor&&!xv(t.constructor)&&Iv(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const jv=kv("ArrayBuffer");const Rv=Tv("string"),Iv=Tv("function"),Pv=Tv("number"),Cv=t=>null!==t&&"object"==typeof t,Lv=t=>{if("object"!==Mv(t))return!1;const e=Ev(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Av in t||Sv in t)},Nv=kv("Date"),Uv=kv("File"),Fv=kv("Blob"),Dv=kv("FileList"),qv=kv("URLSearchParams"),[zv,Hv,Vv,Wv]=["ReadableStream","Request","Response","Headers"].map(kv);function Kv(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),Bv(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(Ov(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(n=0;n<o;n++)a=i[n],e.call(null,t[a],a,t)}}function $v(t,e){if(Ov(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const Gv="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Zv=t=>!xv(t)&&t!==Gv;const Jv=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&Ev(Uint8Array)),Xv=kv("HTMLFormElement"),Yv=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Qv=kv("RegExp"),t_=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Kv(r,((r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)})),Object.defineProperties(t,n)};const e_=kv("AsyncFunction"),r_=(n_="function"==typeof setImmediate,i_=Iv(Gv.postMessage),n_?setImmediate:i_?(o_=`axios@${Math.random()}`,a_=[],Gv.addEventListener("message",(({source:t,data:e})=>{t===Gv&&e===o_&&a_.length&&a_.shift()()}),!1),t=>{a_.push(t),Gv.postMessage(o_,"*")}):t=>setTimeout(t));var n_,i_,o_,a_;const s_="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Gv):"undefined"!=typeof process&&process.nextTick||r_;var f_={isArray:Bv,isArrayBuffer:jv,isBuffer:Ov,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Iv(t.append)&&("formdata"===(e=Mv(t))||"object"===e&&Iv(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&jv(t.buffer),e},isString:Rv,isNumber:Pv,isBoolean:t=>!0===t||!1===t,isObject:Cv,isPlainObject:Lv,isEmptyObject:t=>{if(!Cv(t)||Ov(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:zv,isRequest:Hv,isResponse:Vv,isHeaders:Wv,isUndefined:xv,isDate:Nv,isFile:Uv,isBlob:Fv,isRegExp:Qv,isFunction:Iv,isStream:t=>Cv(t)&&Iv(t.pipe),isURLSearchParams:qv,isTypedArray:Jv,isFileList:Dv,forEach:Kv,merge:function t(){const{caseless:e,skipUndefined:r}=Zv(this)&&this||{},n={},i=(i,o)=>{const a=e&&$v(n,o)||o;Lv(n[a])&&Lv(i)?n[a]=t(n[a],i):Lv(i)?n[a]=t({},i):Bv(i)?n[a]=i.slice():r&&xv(i)||(n[a]=i)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&Kv(arguments[t],i);return n},extend:(t,e,r,{allOwnKeys:n}={})=>(Kv(e,((e,n)=>{r&&Iv(e)?t[n]=_v(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,o,a;const s={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&Ev(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:Mv,kindOfTest:kv,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(Bv(t))return t;let e=t.length;if(!Pv(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Sv]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Xv,hasOwnProperty:Yv,hasOwnProp:Yv,reduceDescriptors:t_,freezeMethods:t=>{t_(t,((e,r)=>{if(Iv(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];Iv(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return Bv(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:$v,global:Gv,isContextDefined:Zv,isSpecCompliantForm:function(t){return!!(t&&Iv(t.append)&&"FormData"===t[Av]&&t[Sv])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(Cv(t)){if(e.indexOf(t)>=0)return;if(Ov(t))return t;if(!("toJSON"in t)){e[n]=t;const i=Bv(t)?[]:{};return Kv(t,((t,e)=>{const o=r(t,n+1);!xv(o)&&(i[e]=o)})),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:e_,isThenable:t=>t&&(Cv(t)||Iv(t))&&Iv(t.then)&&Iv(t.catch),setImmediate:r_,asap:s_,isIterable:t=>null!=t&&Iv(t[Sv])};function u_(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}f_.inherits(u_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f_.toJSONObject(this.config),code:this.code,status:this.status}}});const c_=u_.prototype,h_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{h_[t]={value:t}})),Object.defineProperties(u_,h_),Object.defineProperty(c_,"isAxiosError",{value:!0}),u_.from=(t,e,r,n,i,o)=>{const a=Object.create(c_);f_.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t));const s=t&&t.message?t.message:"Error",f=null==e&&t?t.code:e;return u_.call(a,s,f,r,n,i),t&&null==a.cause&&Object.defineProperty(a,"cause",{value:t,configurable:!0}),a.name=t&&t.name||"Error",o&&Object.assign(a,o),a};function l_(t){return f_.isPlainObject(t)||f_.isArray(t)}function d_(t){return f_.endsWith(t,"[]")?t.slice(0,-2):t}function p_(t,e,r){return t?t.concat(e).map((function(t,e){return t=d_(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const b_=f_.toFlatObject(f_,{},null,(function(t){return/^is[A-Z]/.test(t)}));function g_(t,e,r){if(!f_.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=f_.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!f_.isUndefined(e[t])}))).metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&f_.isSpecCompliantForm(e);if(!f_.isFunction(i))throw new TypeError("visitor must be a function");function f(t){if(null===t)return"";if(f_.isDate(t))return t.toISOString();if(f_.isBoolean(t))return t.toString();if(!s&&f_.isBlob(t))throw new u_("Blob is not supported. Use a Buffer instead.");return f_.isArrayBuffer(t)||f_.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,r,i){let s=t;if(t&&!i&&"object"==typeof t)if(f_.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(f_.isArray(t)&&function(t){return f_.isArray(t)&&!t.some(l_)}(t)||(f_.isFileList(t)||f_.endsWith(r,"[]"))&&(s=f_.toArray(t)))return r=d_(r),s.forEach((function(t,n){!f_.isUndefined(t)&&null!==t&&e.append(!0===a?p_([r],n,o):null===a?r:r+"[]",f(t))})),!1;return!!l_(t)||(e.append(p_(i,r,o),f(t)),!1)}const c=[],h=Object.assign(b_,{defaultVisitor:u,convertValue:f,isVisitable:l_});if(!f_.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!f_.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),f_.forEach(r,(function(r,o){!0===(!(f_.isUndefined(r)||null===r)&&i.call(e,r,f_.isString(o)?o.trim():o,n,h))&&t(r,n?n.concat(o):[o])})),c.pop()}}(t),e}function y_(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function m_(t,e){this._pairs=[],t&&g_(t,this,e)}const v_=m_.prototype;function __(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function w_(t,e,r){if(!e)return t;const n=r&&r.encode||__;f_.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(e,r):f_.isURLSearchParams(e)?e.toString():new m_(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}v_.append=function(t,e){this._pairs.push([t,e])},v_.toString=function(t){const e=t?function(e){return t.call(this,e,y_)}:y_;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class E_{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f_.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var S_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},A_={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:m_,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const M_="undefined"!=typeof window&&"undefined"!=typeof document,k_="object"==typeof navigator&&navigator||void 0,T_=M_&&(!k_||["ReactNative","NativeScript","NS"].indexOf(k_.product)<0),B_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,x_=M_&&window.location.href||"http://localhost";var O_={...Object.freeze({__proto__:null,hasBrowserEnv:M_,hasStandardBrowserEnv:T_,hasStandardBrowserWebWorkerEnv:B_,navigator:k_,origin:x_}),...A_};function j_(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=t.length;if(o=!o&&f_.isArray(n)?n.length:o,s)return f_.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a;n[o]&&f_.isObject(n[o])||(n[o]=[]);return e(t,r,n[o],i)&&f_.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!a}if(f_.isFormData(t)&&f_.isFunction(t.entries)){const r={};return f_.forEachEntry(t,((t,n)=>{e(function(t){return f_.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null}const R_={transitional:S_,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=f_.isObject(t);i&&f_.isHTMLForm(t)&&(t=new FormData(t));if(f_.isFormData(t))return n?JSON.stringify(j_(t)):t;if(f_.isArrayBuffer(t)||f_.isBuffer(t)||f_.isStream(t)||f_.isFile(t)||f_.isBlob(t)||f_.isReadableStream(t))return t;if(f_.isArrayBufferView(t))return t.buffer;if(f_.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return g_(t,new O_.classes.URLSearchParams,{visitor:function(t,e,r,n){return O_.isNode&&f_.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=f_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return g_(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(f_.isString(t))try{return(e||JSON.parse)(t),f_.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||R_.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(f_.isResponse(t)||f_.isReadableStream(t))return t;if(t&&f_.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(t){if(r){if("SyntaxError"===t.name)throw u_.from(t,u_.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O_.classes.FormData,Blob:O_.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f_.forEach(["delete","get","head","post","put","patch"],(t=>{R_.headers[t]={}}));const I_=f_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const P_=Symbol("internals");function C_(t){return t&&String(t).trim().toLowerCase()}function L_(t){return!1===t||null==t?t:f_.isArray(t)?t.map(L_):String(t)}function N_(t,e,r,n,i){return f_.isFunction(n)?n.call(this,e,r):(i&&(e=r),f_.isString(e)?f_.isString(n)?-1!==e.indexOf(n):f_.isRegExp(n)?n.test(e):void 0:void 0)}let U_=class{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=C_(e);if(!i)throw new Error("header name must be a non-empty string");const o=f_.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=L_(t))}const o=(t,e)=>f_.forEach(t,((t,r)=>i(t,r,e)));if(f_.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(f_.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&I_[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e);else if(f_.isObject(t)&&f_.isIterable(t)){let r,n,i={};for(const e of t){if(!f_.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[n=e[0]]=(r=i[n])?f_.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,r);return this}get(t,e){if(t=C_(t)){const r=f_.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(f_.isFunction(e))return e.call(this,t,r);if(f_.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=C_(t)){const r=f_.findKey(this,t);return!(!r||void 0===this[r]||e&&!N_(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=C_(t)){const i=f_.findKey(r,t);!i||e&&!N_(0,r[i],i,e)||(delete r[i],n=!0)}}return f_.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!N_(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return f_.forEach(this,((n,i)=>{const o=f_.findKey(r,i);if(o)return e[o]=L_(n),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(i):String(i).trim();a!==i&&delete e[i],e[a]=L_(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return f_.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&f_.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[P_]=this[P_]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=C_(t);e[n]||(!function(t,e){const r=f_.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})}))}(r,t),e[n]=!0)}return f_.isArray(t)?t.forEach(n):n(t),this}};function F_(t,e){const r=this||R_,n=e||r,i=U_.from(n.headers);let o=n.data;return f_.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function D_(t){return!(!t||!t.__CANCEL__)}function q_(t,e,r){u_.call(this,null==t?"canceled":t,u_.ERR_CANCELED,e,r),this.name="CanceledError"}function z_(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new u_("Request failed with status code "+r.status,[u_.ERR_BAD_REQUEST,u_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}U_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f_.reduceDescriptors(U_.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),f_.freezeMethods(U_),f_.inherits(q_,u_,{__CANCEL__:!0});const H_=(t,e,r=3)=>{let n=0;const i=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const f=Date.now(),u=n[a];i||(i=f),r[o]=s,n[o]=f;let c=a,h=0;for(;c!==o;)h+=r[c++],c%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),f-i<e)return;const l=u&&f-u;return l?Math.round(1e3*h/l):void 0}}(50,250);return function(t,e){let r,n,i=0,o=1e3/e;const a=(e,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),t(...e)};return[(...t)=>{const e=Date.now(),s=e-i;s>=o?a(t,e):(r=t,n||(n=setTimeout((()=>{n=null,a(r)}),o-s)))},()=>r&&a(r)]}((r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,f=i(s);n=o;t({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:f||void 0,estimated:f&&a&&o<=a?(a-o)/f:void 0,event:r,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),r)},V_=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},W_=t=>(...e)=>f_.asap((()=>t(...e)));var K_=O_.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,O_.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(O_.origin),O_.navigator&&/(msie|trident)/i.test(O_.navigator.userAgent)):()=>!0,$_=O_.hasStandardBrowserEnv?{write(t,e,r,n,i,o,a){if("undefined"==typeof document)return;const s=[`${t}=${encodeURIComponent(e)}`];f_.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),f_.isString(n)&&s.push(`path=${n}`),f_.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),f_.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function G_(t,e,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(n||0==r)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Z_=t=>t instanceof U_?{...t}:t;function J_(t,e){e=e||{};const r={};function n(t,e,r,n){return f_.isPlainObject(t)&&f_.isPlainObject(e)?f_.merge.call({caseless:n},t,e):f_.isPlainObject(e)?f_.merge({},e):f_.isArray(e)?e.slice():e}function i(t,e,r,i){return f_.isUndefined(e)?f_.isUndefined(t)?void 0:n(void 0,t,0,i):n(t,e,0,i)}function o(t,e){if(!f_.isUndefined(e))return n(void 0,e)}function a(t,e){return f_.isUndefined(e)?f_.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const f={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e,r)=>i(Z_(t),Z_(e),0,!0)};return f_.forEach(Object.keys({...t,...e}),(function(n){const o=f[n]||i,a=o(t[n],e[n],n);f_.isUndefined(a)&&o!==s||(r[n]=a)})),r}var X_=t=>{const e=J_({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;if(e.headers=a=U_.from(a),e.url=w_(G_(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),f_.isFormData(r))if(O_.hasStandardBrowserEnv||O_.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(f_.isFunction(r.getHeaders)){const t=r.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach((([t,r])=>{e.includes(t.toLowerCase())&&a.set(t,r)}))}if(O_.hasStandardBrowserEnv&&(n&&f_.isFunction(n)&&(n=n(e)),n||!1!==n&&K_(e.url))){const t=i&&o&&$_.read(o);t&&a.set(i,t)}return e};var Y_="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){const n=X_(t);let i=n.data;const o=U_.from(n.headers).normalize();let a,s,f,u,c,{responseType:h,onUploadProgress:l,onDownloadProgress:d}=n;function p(){u&&u(),c&&c(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let b=new XMLHttpRequest;function g(){if(!b)return;const n=U_.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());z_((function(t){e(t),p()}),(function(t){r(t),p()}),{data:h&&"text"!==h&&"json"!==h?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:t,request:b}),b=null}b.open(n.method.toUpperCase(),n.url,!0),b.timeout=n.timeout,"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(g)},b.onabort=function(){b&&(r(new u_("Request aborted",u_.ECONNABORTED,t,b)),b=null)},b.onerror=function(e){const n=new u_(e&&e.message?e.message:"Network Error",u_.ERR_NETWORK,t,b);n.event=e||null,r(n),b=null},b.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||S_;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new u_(e,i.clarifyTimeoutError?u_.ETIMEDOUT:u_.ECONNABORTED,t,b)),b=null},void 0===i&&o.setContentType(null),"setRequestHeader"in b&&f_.forEach(o.toJSON(),(function(t,e){b.setRequestHeader(e,t)})),f_.isUndefined(n.withCredentials)||(b.withCredentials=!!n.withCredentials),h&&"json"!==h&&(b.responseType=n.responseType),d&&([f,c]=H_(d,!0),b.addEventListener("progress",f)),l&&b.upload&&([s,u]=H_(l),b.upload.addEventListener("progress",s),b.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=e=>{b&&(r(!e||e.type?new q_(null,t,b):e),b.abort(),b=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);y&&-1===O_.protocols.indexOf(y)?r(new u_("Unsupported protocol "+y+":",u_.ERR_BAD_REQUEST,t)):b.send(i||null)}))};const Q_=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const i=function(t){if(!r){r=!0,a();const e=t instanceof Error?t:this.reason;n.abort(e instanceof u_?e:new q_(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,i(new u_(`timeout ${e} of ms exceeded`,u_.ETIMEDOUT))}),e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)})),t=null)};t.forEach((t=>t.addEventListener("abort",i)));const{signal:s}=n;return s.unsubscribe=()=>f_.asap(a),s}},tw=function*(t,e){let r=t.byteLength;if(r<e)return void(yield t);let n,i=0;for(;i<r;)n=i+e,yield t.slice(i,n),i=n},ew=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},rw=(t,e,r,n)=>{const i=async function*(t,e){for await(const r of ew(t))yield*tw(r,e)}(t,e);let o,a=0,s=t=>{o||(o=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await i.next();if(e)return s(),void t.close();let o=n.byteLength;if(r){let t=a+=o;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:t=>(s(t),i.return())},{highWaterMark:2})},{isFunction:nw}=f_,iw=(({Request:t,Response:e})=>({Request:t,Response:e}))(f_.global),{ReadableStream:ow,TextEncoder:aw}=f_.global,sw=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},fw=t=>{t=f_.merge.call({skipUndefined:!0},iw,t);const{fetch:e,Request:r,Response:n}=t,i=e?nw(e):"function"==typeof fetch,o=nw(r),a=nw(n);if(!i)return!1;const s=i&&nw(ow),f=i&&("function"==typeof aw?(u=new aw,t=>u.encode(t)):async t=>new Uint8Array(await new r(t).arrayBuffer()));var u;const c=o&&s&&sw((()=>{let t=!1;const e=new r(O_.origin,{body:new ow,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),h=a&&s&&sw((()=>f_.isReadableStream(new n("").body))),l={stream:h&&(t=>t.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!l[t]&&(l[t]=(e,r)=>{let n=e&&e[t];if(n)return n.call(e);throw new u_(`Response type '${t}' is not supported`,u_.ERR_NOT_SUPPORT,r)})}));const d=async(t,e)=>{const n=f_.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(f_.isBlob(t))return t.size;if(f_.isSpecCompliantForm(t)){const e=new r(O_.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return f_.isArrayBufferView(t)||f_.isArrayBuffer(t)?t.byteLength:(f_.isURLSearchParams(t)&&(t+=""),f_.isString(t)?(await f(t)).byteLength:void 0)})(e):n};return async t=>{let{url:i,method:a,data:s,signal:f,cancelToken:u,timeout:p,onDownloadProgress:b,onUploadProgress:g,responseType:y,headers:m,withCredentials:v="same-origin",fetchOptions:_}=X_(t),w=e||fetch;y=y?(y+"").toLowerCase():"text";let E=Q_([f,u&&u.toAbortSignal()],p),S=null;const A=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let M;try{if(g&&c&&"get"!==a&&"head"!==a&&0!==(M=await d(m,s))){let t,e=new r(i,{method:"POST",body:s,duplex:"half"});if(f_.isFormData(s)&&(t=e.headers.get("content-type"))&&m.setContentType(t),e.body){const[t,r]=V_(M,H_(W_(g)));s=rw(e.body,65536,t,r)}}f_.isString(v)||(v=v?"include":"omit");const e=o&&"credentials"in r.prototype,f={..._,signal:E,method:a.toUpperCase(),headers:m.normalize().toJSON(),body:s,duplex:"half",credentials:e?v:void 0};S=o&&new r(i,f);let u=await(o?w(S,_):w(i,f));const p=h&&("stream"===y||"response"===y);if(h&&(b||p&&A)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=u[e]}));const e=f_.toFiniteNumber(u.headers.get("content-length")),[r,i]=b&&V_(e,H_(W_(b),!0))||[];u=new n(rw(u.body,65536,r,(()=>{i&&i(),A&&A()})),t)}y=y||"text";let k=await l[f_.findKey(l,y)||"text"](u,t);return!p&&A&&A(),await new Promise(((e,r)=>{z_(e,r,{data:k,headers:U_.from(u.headers),status:u.status,statusText:u.statusText,config:t,request:S})}))}catch(e){if(A&&A(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new u_("Network Error",u_.ERR_NETWORK,t,S),{cause:e.cause||e});throw u_.from(e,e&&e.code,t,S)}}},uw=new Map,cw=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,o=[n,i,r];let a,s,f=o.length,u=uw;for(;f--;)a=o[f],s=u.get(a),void 0===s&&u.set(a,s=f?new Map:fw(e)),u=s;return s};cw();const hw={http:null,xhr:Y_,fetch:{get:cw}};f_.forEach(hw,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const lw=t=>`- ${t}`,dw=t=>f_.isFunction(t)||null===t||!1===t;var pw={getAdapter:function(t,e){t=f_.isArray(t)?t:[t];const{length:r}=t;let n,i;const o={};for(let a=0;a<r;a++){let r;if(n=t[a],i=n,!dw(n)&&(i=hw[(r=String(n)).toLowerCase()],void 0===i))throw new u_(`Unknown adapter '${r}'`);if(i&&(f_.isFunction(i)||(i=i.get(e))))break;o[r||"#"+a]=i}if(!i){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new u_("There is no suitable adapter to dispatch the request "+(r?t.length>1?"since :\n"+t.map(lw).join("\n"):" "+lw(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:hw};function bw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new q_(null,t)}function gw(t){bw(t),t.headers=U_.from(t.headers),t.data=F_.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return pw.getAdapter(t.adapter||R_.adapter,t)(t).then((function(e){return bw(t),e.data=F_.call(t,t.transformResponse,e),e.headers=U_.from(e.headers),e}),(function(e){return D_(e)||(bw(t),e&&e.response&&(e.response.data=F_.call(t,t.transformResponse,e.response),e.response.headers=U_.from(e.response.headers))),Promise.reject(e)}))}const yw="1.13.2",mw={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{mw[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const vw={};mw.transitional=function(t,e,r){function n(t,e){return"[Axios v"+yw+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new u_(n(i," has been removed"+(e?" in "+e:"")),u_.ERR_DEPRECATED);return e&&!vw[i]&&(vw[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}},mw.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var _w={assertOptions:function(t,e,r){if("object"!=typeof t)throw new u_("options must be an object",u_.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],a=e[o];if(a){const e=t[o],r=void 0===e||a(e,o,t);if(!0!==r)throw new u_("option "+o+" must be "+r,u_.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new u_("Unknown option "+o,u_.ERR_BAD_OPTION)}},validators:mw};const ww=_w.validators;let Ew=class{constructor(t){this.defaults=t||{},this.interceptors={request:new E_,response:new E_}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=J_(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&_w.assertOptions(r,{silentJSONParsing:ww.transitional(ww.boolean),forcedJSONParsing:ww.transitional(ww.boolean),clarifyTimeoutError:ww.transitional(ww.boolean)},!1),null!=n&&(f_.isFunction(n)?e.paramsSerializer={serialize:n}:_w.assertOptions(n,{encode:ww.function,serialize:ww.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),_w.assertOptions(e,{baseUrl:ww.spelling("baseURL"),withXsrfToken:ww.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&f_.merge(i.common,i[e.method]);i&&f_.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=U_.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const f=[];let u;this.interceptors.response.forEach((function(t){f.push(t.fulfilled,t.rejected)}));let c,h=0;if(!s){const t=[gw.bind(this),void 0];for(t.unshift(...a),t.push(...f),c=t.length,u=Promise.resolve(e);h<c;)u=u.then(t[h++],t[h++]);return u}c=a.length;let l=e;for(;h<c;){const t=a[h++],e=a[h++];try{l=t(l)}catch(t){e.call(this,t);break}}try{u=gw.call(this,l)}catch(t){return Promise.reject(t)}for(h=0,c=f.length;h<c;)u=u.then(f[h++],f[h++]);return u}getUri(t){return w_(G_((t=J_(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};f_.forEach(["delete","get","head","options"],(function(t){Ew.prototype[t]=function(e,r){return this.request(J_(r||{},{method:t,url:e,data:(r||{}).data}))}})),f_.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(J_(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ew.prototype[t]=e(),Ew.prototype[t+"Form"]=e(!0)}));const Sw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Sw).forEach((([t,e])=>{Sw[e]=t}));const Aw=function t(e){const r=new Ew(e),n=_v(Ew.prototype.request,r);return f_.extend(n,Ew.prototype,r,{allOwnKeys:!0}),f_.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(J_(e,r))},n}(R_);Aw.Axios=Ew,Aw.CanceledError=q_,Aw.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new q_(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},Aw.isCancel=D_,Aw.VERSION=yw,Aw.toFormData=g_,Aw.AxiosError=u_,Aw.Cancel=Aw.CanceledError,Aw.all=function(t){return Promise.all(t)},Aw.spread=function(t){return function(e){return t.apply(null,e)}},Aw.isAxiosError=function(t){return f_.isObject(t)&&!0===t.isAxiosError},Aw.mergeConfig=J_,Aw.AxiosHeaders=U_,Aw.formToJSON=t=>j_(f_.isHTMLForm(t)?new FormData(t):t),Aw.getAdapter=pw.getAdapter,Aw.HttpStatusCode=Sw,Aw.default=Aw;const{Axios:Mw,AxiosError:kw,CanceledError:Tw,isCancel:Bw,CancelToken:xw,VERSION:Ow,all:jw,Cancel:Rw,isAxiosError:Iw,spread:Pw,toFormData:Cw,AxiosHeaders:Lw,HttpStatusCode:Nw,formToJSON:Uw,getAdapter:Fw,mergeConfig:Dw}=Aw;var qw={};function zw(t,e){"boolean"==typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var Hw=zw;zw.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},zw.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},zw.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=(new Date).getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),r),this._options.unref&&this._timer.unref(),!0},zw.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},zw.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},zw.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},zw.prototype.start=zw.prototype.try,zw.prototype.errors=function(){return this._errors},zw.prototype.attempts=function(){return this._attempts},zw.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,a=(t[o]||0)+1;t[o]=a,a>=r&&(e=i,r=a)}return e},function(t){var e=Hw;t.operation=function(r){var n=t.timeouts(r);return new e(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<e.retries;i++)n.push(this.createTimeout(i,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(i,e)),n.sort((function(t,e){return t-e})),n},t.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,n=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return n=Math.min(n,e.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],e)"function"==typeof e[i]&&n.push(i);for(var o=0;o<n.length;o++){var a=n[o],s=e[a];e[a]=function(n){var i=t.operation(r),o=Array.prototype.slice.call(arguments,1),a=o.pop();o.push((function(t){i.retry(t)||(t&&(arguments[0]=i.mainError()),a.apply(this,arguments))})),i.attempt((function(){n.apply(e,o)}))}.bind(e,s),e[a].options=r}}}(qw);var Vw=r(qw);class Ww extends _.EventEmitter{constructor(t={}){super(),this.id=0,this.options=t,this.id=0}setOptions(t){Object.assign(this.options,t),this.stop()}listenTo(t,e,r){return"addEventListener"in t&&"function"==typeof t.addEventListener?(t.addEventListener(e,r),()=>{t.removeEventListener(e,r)}):(t.on(e,r),()=>{t.removeListener(e,r)})}send(t,e,r){}start(){return Promise.resolve()}stop(){return Promise.resolve()}}const Kw=async(t,e)=>{try{return(await Aw.post(t,{jsonrpc:"2.0",...e})).data.result}catch(t){throw t}};var $w=r((function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}));const Gw={http:class extends Ww{constructor(t){super(t)}get nonRetriableOperations(){return["broadcast_transaction","broadcast_transaction_with_callback","broadcast_transaction_synchronous","broadcast_block"]}isBroadcastOperation(t){return this.nonRetriableOperations.includes(t)}send(t,e,r){"function"!=typeof r&&(r=()=>{});const n=this.options.uri;if(!n)throw new Error("HTTP transport requires a valid URI");const i=this.options.fetchMethod||fetch,o=e.id,a=[t,e.method,e.params],s=this.isBroadcastOperation(e.method),f=this.options.retry,u=s?6e4:3e4;if(!s&&f){const t="object"==typeof f?Vw.operation(f):Vw.operation();t.attempt((e=>{i(n,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",method:"call",params:a,id:o}),headers:{"Content-Type":"application/json"},timeout:u}).then((t=>t.json())).then((t=>{if(t.error){const n=new Error(t.error.message||"JSON-RPC error");n.code=t.error.code,n.data=t.error.data,r(n,void 0,e)}else r(null,t.result,e)}),(n=>{t.retry(n)||r(t.mainError(),void 0,e)}))}))}else i(n,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",method:"call",params:a,id:o}),headers:{"Content-Type":"application/json"},timeout:u}).then((t=>t.json())).then((t=>{if(t.error){const e=new Error(t.error.message||"JSON-RPC error");e.code=t.error.code,e.data=t.error.data,r(e,void 0,1)}else r(null,t.result,1)}),(t=>r(t,void 0,1)))}},ws:class extends Ww{constructor(t){super({...t,websocket:t.websocket||"wss://api.steemit.com"}),this.ws=null,this._requests=new Map,this.seqNo=0}start(){return new Promise(((t,e)=>{if(this.ws)return void t();const r=this.options.websocket||"wss://api.steemit.com";this.ws=new $w(r),this.ws.on("open",(()=>{t()})),this.ws.on("error",(t=>{e(t)})),this.ws.on("message",(t=>{const e=JSON.parse(t.toString()),r=this._requests.get(e.id);r&&(this._requests.delete(e.id),r(null,e.result))}))}))}stop(){return this.ws&&(this.ws.close(),this.ws=null),Promise.resolve()}send(t,e,r){if(!this.ws)return void this.start().then((()=>this.send(t,e,r)));const n=e.id||++this.seqNo,i={id:n,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]};this._requests.set(n,r),this.ws.send(JSON.stringify(i))}}};class Zw extends _.EventEmitter{static _wrapWithPromise(t){return function(...e){return"function"==typeof e[e.length-1]?t.apply(this,e):new E(((r,n)=>{t.apply(this,[...e,(t,e)=>{if(t)return n(t);r(e)}])}))}}constructor(t={}){super(),this.seqNo=0,this._transportType="ws",this.__logger=!1,this._setTransport(t),this._setLogger(t),this.options=t,vv.forEach((t=>{const e=t.method_name||N(t.method),r=t.params||[];this[`${e}With`]=(n,i)=>{let o;return o=t.is_object?n:r.map((t=>n[t])),this.send(t.api,{method:t.method,params:o},((t,r)=>{if("getConfig"===e&&r&&"object"==typeof r){if(!("STEEMIT_ADDRESS_PREFIX"in r)){const t=M().all();r.STEEMIT_ADDRESS_PREFIX=t.address_prefix||"STM"}if(!("STEEMIT_CHAIN_ID"in r)){const t=M().all();r.STEEMIT_CHAIN_ID=t.chain_id||"0000000000000000000000000000000000000000000000000000000000000000"}}i(t,r)}))},this[e]=Zw._wrapWithPromise((function(...t){const n=r.reduce(((e,r,n)=>(e[r]=t[n],e)),{}),i=t[r.length];return this[`${e}With`](n,i)})),this[`${e}WithAsync`]=E.promisify(this[`${e}With`]),this[`${e}Async`]=E.promisify(this[e])}))}_setTransport(t){if(t.url&&t.url.match(/^((http|https)?:\/\/)/))t.uri=t.url,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new Gw.http(t);else if(t.url&&t.url.match(/^((ws|wss)?:\/\/)/))t.websocket=t.url,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new Gw.ws(t);else if(t.transport)if(this.transport&&this._transportType!==t.transport&&this.transport.stop(),this._transportType=t.transport,"string"==typeof t.transport){if(!Gw[t.transport])throw new TypeError("Invalid `transport`, valid values are `http`, `ws` or a class");this.transport=new Gw[t.transport](t)}else this.transport=new t.transport(t);else{const e=M().get("node")||"https://api.steemit.com";e.match(/^((http|https)?:\/\/)/)?(t.uri=e,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new Gw.http(t)):e.match(/^((ws|wss)?:\/\/)/)?(t.websocket=e,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new Gw.ws(t)):this.transport=new Gw.ws(t)}}_setLogger(t){if(Object.prototype.hasOwnProperty.call(t,"logger"))switch(typeof t.logger){case"function":this.__logger={log:t.logger};break;case"object":if("function"!=typeof t.logger.log)throw new Error("setOptions({logger:{}}) must have a property .log of type function");this.__logger=t.logger;break;case"undefined":if(this.__logger)break;this.__logger=!1;break;default:this.__logger=!1}}log(t,...e){this.__logger&&(e.length>0&&"function"==typeof this.__logger[t]?this.__logger[t].apply(this.__logger,e):this.__logger.log.apply(this.__logger,[t,...e]))}start(){return this.transport.start()}stop(){return this.transport.stop()}send(t,e,r){let n=r;if(this.__logger){const t=Math.random();this.log("xmit:"+t+":",e),n=(e,n)=>{e?this.log("error","rsp:"+t+":\n\n",e,n):this.log("rsp:"+t+":",n),r&&r(e,n)}}return this.transport.send(t,e,n)}call(t,e,r){if("http"!==this._transportType)return void r(new Error("RPC methods can only be called when using http transport"));const n=++this.seqNo;Kw(this.options.uri,{method:t,params:e,id:n}).then((t=>{r(null,t)}),(t=>{r(t)}))}signedCall(t,e,r,n,i){if("http"!==this._transportType)return void i(new Error("RPC methods can only be called when using http transport"));const o=++this.seqNo;let a;try{a=mv({method:t,params:e,id:o},r,[n])}catch(t){return void i(t)}Kw(this.options.uri,a).then((t=>{i(null,t)}),(t=>{i(t)}))}setOptions(t){Object.assign(this.options,t),this._setLogger(t),this._setTransport(t),this.transport.setOptions(t),Object.prototype.hasOwnProperty.call(t,"useTestNet")&&M().set("address_prefix",t.useTestNet?"TST":"STM")}setWebSocket(t){this.setOptions({websocket:t})}setUri(t){this.setOptions({uri:t})}streamBlockNumber(t="head",e,r=200){"function"==typeof t&&(e=t,t="head");let n=0,i=!0;const o=()=>{i&&this.getDynamicGlobalPropertiesAsync().then((i=>{const a="irreversible"===t?i.last_irreversible_block_num:i.head_block_number;if(a!==n)if(n)for(let t=n;t<a;t++)t!==n&&e(null,t),n=t;else n=a,e(null,a);setTimeout(o,r)}),(t=>{e(t)}))};return o(),()=>{i=!1}}streamBlock(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,e))}));return i}streamTransactions(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,((t,r)=>{t?e(t):r&&r.transactions&&r.transactions.forEach((t=>{e(null,t)}))})))}));return i}streamOperations(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,((t,r)=>{t?e(t):r&&r.transactions&&r.transactions.forEach((t=>{t.operations&&t.operations.forEach((t=>{e(null,t)}))}))})))}));return i}broadcastTransactionSynchronousWith(t,e){const r=t.transaction;r?this.broadcastTransactionSynchronous(r,e):e(new Error("transaction is required"))}broadcastTransaction(t,e){"function"==typeof this.broadcastTransactionSynchronous?this.broadcastTransactionSynchronous(t,e):this.transport&&"function"==typeof this.transport.broadcastTransactionSynchronous?this.transport.broadcastTransactionSynchronous(t,e):e(new Error("broadcastTransaction is not implemented"))}signTransaction(t,e){try{const{signTransaction:r}=require("../auth");return r(t,e)}catch(t){throw new Error("signTransaction is not implemented")}}getAccount(t,e){if(!e)return this.getAccounts([t]).then((t=>t&&t[0]));this.getAccounts([t],((t,r)=>{if(t)return e(t);e(null,r&&r[0])}))}getFollowers(t,e,r,n,i){if(!i)return this.get_followers(t,e,r,n).then((t=>Array.isArray(t)?t:[])).catch((()=>[]));this.get_followers(t,e,r,n,((t,e)=>{if(t)return i(t);i(null,Array.isArray(e)?e:[])}))}broadcastTransactionWithCallback(t,e,r){"http"===this._transportType?this.send("network_broadcast_api",{method:"broadcast_transaction_with_callback",params:[t,e]},r):r(new Error("broadcastTransactionWithCallback can only be called when using http transport"))}broadcastBlock(t,e){"http"===this._transportType?this.send("network_broadcast_api",{method:"broadcast_block",params:[t]},e):e(new Error("broadcastBlock can only be called when using http transport"))}setMaxBlockAge(t,e){"http"===this._transportType?this.send("network_broadcast_api",{method:"set_max_block_age",params:[t]},e):e(new Error("setMaxBlockAge can only be called when using http transport"))}verifyAuthority(t,e){if("http"!==this._transportType){const t=new Error("verifyAuthority can only be called when using http transport");return e?void e(t):E.reject(t)}if(!e)return new E(((e,r)=>{this.send("database_api",{method:"verify_authority",params:[t]},((t,n)=>{if(t)return r(t);e(n||!1)}))}));this.send("database_api",{method:"verify_authority",params:[t]},((t,r)=>{e(t,r||!1)}))}verifyAccountAuthority(t,e,r){if("http"!==this._transportType){const t=new Error("verifyAccountAuthority can only be called when using http transport");return r?void r(t):E.reject(t)}if(!r)return new E(((r,n)=>{this.send("database_api",{method:"verify_account_authority",params:[t,e]},((t,e)=>{if(t)return n(t);r(e||!1)}))}));this.send("database_api",{method:"verify_account_authority",params:[t,e]},((t,e)=>{r(t,e||!1)}))}}const Jw=new Zw({uri:M().get("uri"),websocket:M().get("websocket")});Jw.getDynamicGlobalPropertiesAsync,Jw.getBlockAsync,Jw.getFollowersAsync,Jw.getContentAsync;var Xw,Yw={exports:{}},Qw={exports:{}};!function(t){!function(r,n){t&&t.exports?t.exports=function(){var t;try{Xw||(Xw=1,function(t){!function(e,r){t&&t.exports?t.exports=r():(e.dcodeIO=e.dcodeIO||{}).Long=r()}(e,(function(){function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(n[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=a(t,t<0?-1:0,!1),s&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?b:p;if(e){if(t<0)return b;if(t>=h)return _}else{if(t<=-0x8000000000000000)return w;if(t+1>=l)return v}return t<0?o(-t,e).neg():a(t%c|0,t/c|0,e)}function a(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function f(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return p;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(t.substring(1),e,r).neg();for(var i=o(s(r,8)),a=p,u=0;u<t.length;u+=8){var c=Math.min(8,t.length-u),h=parseInt(t.substring(u,u+c),r);if(c<8){var l=o(s(r,c));a=a.mul(l).add(o(h))}else a=(a=a.mul(i)).add(o(h))}return a.unsigned=e,a}function u(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?f(e):a(e.low,e.high,e.unsigned)}t.fromString=f,t.fromValue=u;var c=4294967296,h=c*c,l=h/2,d=i(1<<24),p=i(0);t.ZERO=p;var b=i(0,!0);t.UZERO=b;var g=i(1);t.ONE=g;var y=i(1,!0);t.UONE=y;var m=i(-1);t.NEG_ONE=m;var v=a(-1,2147483647,!1);t.MAX_VALUE=v;var _=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var w=a(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(s(t,6),this.unsigned),a=this,f="";;){var u=a.div(i),c=(a.sub(u.mul(i)).toInt()>>>0).toString(t);if((a=u).isZero())return c+f;for(;c.length<6;)c="0"+c;f=""+c+f}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(t){return e(t)||(t=u(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=u(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(g)},E.neg=E.negate,E.add=function(t){e(t)||(t=u(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,f=65535&t.high,c=t.low>>>16,h=0,l=0,d=0,p=0;return d+=(p+=o+(65535&t.low))>>>16,l+=(d+=i+c)>>>16,h+=(l+=n+f)>>>16,h+=r+s,a((d&=65535)<<16|(p&=65535),(h&=65535)<<16|(l&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=u(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return p;if(e(t)||(t=u(t)),t.isZero())return p;if(this.eq(w))return t.isOdd()?w:p;if(t.eq(w))return this.isOdd()?w:p;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 o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,f=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,b=0,g=0,y=0,m=0;return y+=(m+=s*l)>>>16,g+=(y+=i*l)>>>16,y&=65535,g+=(y+=s*h)>>>16,b+=(g+=n*l)>>>16,g&=65535,b+=(g+=i*h)>>>16,g&=65535,b+=(g+=s*c)>>>16,b+=r*l+n*h+i*c+s*f,a((y&=65535)<<16|(m&=65535),(b&=65535)<<16|(g&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=u(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?b:p;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return b;if(t.gt(this.shru(1)))return y;i=b}else{if(this.eq(w))return t.eq(g)||t.eq(m)?w:t.eq(w)?g:(r=this.shr(1).div(t).shl(1)).eq(p)?t.isNegative()?g:m:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));if(t.eq(w))return this.unsigned?b:p;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();i=p}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),f=a<=48?1:s(2,a-48),c=o(r),h=c.mul(t);h.isNegative()||h.gt(n);)h=(c=o(r-=f,this.unsigned)).mul(t);c.isZero()&&(c=g),i=i.add(c),n=n.sub(h)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=u(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return a(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=u(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=u(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=u(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;return t<32?a(this.low>>>t|r<<32-t,r>>>t,this.unsigned):a(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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}))}(Qw)),t=Qw.exports}catch(t){}return n(t)}():(r.dcodeIO=r.dcodeIO||{}).ByteBuffer=n(r.dcodeIO.Long)}(e,(function(t){var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function a(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function s(t,e,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)}function f(t,e,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+h>=1?l/f:l*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*f-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*b}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,a=0,s=0,f=t.length;s<f;++s)e.isByteBuffer(t[s])||(t[s]=e.wrap(t[s],r)),(o=t[s].limit-t[s].offset)>0&&(a+=o);if(0===a)return new e(0,n,i);var u,c=new e(a,n,i);for(s=0;s<f;)(o=(u=t[s++]).limit-u.offset)<=0||(c.view.set(u.view.subarray(u.offset,u.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var a;if(e.isByteBuffer(t))return(a=r.clone.call(t)).markedOffset=-1,a;if(t instanceof Uint8Array)a=new e(0,i,o),t.length>0&&(a.buffer=t.buffer,a.offset=t.byteOffset,a.limit=t.byteOffset+t.byteLength,a.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)a=new e(0,i,o),t.byteLength>0&&(a.buffer=t,a.offset=0,a.limit=t.byteLength,a.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(a=new e(t.length,i,o)).limit=t.length;for(var s=0;s<t.length;++s)a.view[s]=t[s]}return a},r.writeBitSet=function(t,e){var r=void 0===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)<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 f=0;for(n=0;s<o;)n|=(1&!!t[s++])<<f++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===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 f=0;for(r=this.readByte(t++);a<i;)s[a++]=!!(r>>f++&1)}return e&&(this.offset=t),s},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128&~r||(r=-(255-r+1)),e&&(this.offset+=1),r},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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&~r||(r=-(65535-r+1)),e&&(this.offset+=2),r},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,f(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,f(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var a=this.buffer.byteLength;for(r>a&&this.resize((a*=2)>r?a:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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(128&r);return i|=0,e?(this.offset=t,i):{value:i,length:n}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),a=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,f=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var u=this.buffer.byteLength;switch(n>u&&this.resize((u*=2)>n?u:n),n-=o,o){case 10:this.view[n+9]=f>>>7&1;case 9:this.view[n+8]=9!==o?128|f:127&f;case 8:this.view[n+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==o?128|s:127&s;case 4:this.view[n+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<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(i=127&(s=this.view[e++]),128&s&&(i|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(o=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(a=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(a|=(127&(s=this.view[e++]))<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var f=t.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=e,f):{value:f,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=a(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var a=this.buffer.byteLength;if(e>a&&this.resize((a*=2)>e?a:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,s=0,f=n;if(r===e.METRICS_CHARS){if(o=a(),c.decodeUTF8(function(){return s<t&&n<this.limit?this.view[n++]:null}.bind(this),(function(t){++s,c.UTF8toUTF16(t,o)})),s!==t)throw RangeError("Illegal range: Truncated data, "+s+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-f}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var u=n+t;if(c.decodeUTF8toUTF16(function(){return n<u?this.view[n++]:null}.bind(this),o=a(),this.noAssert),n!==u)throw RangeError("Illegal range: Truncated data, "+n+" == "+u);return i?(this.offset=n,o()):{string:o(),length:n-f}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],a=e.calculateVarint32(i),r+=a+i;var f=this.buffer.byteLength;if(r>f&&this.resize((f*=2)>r?f:r),r-=a+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(o(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},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,a;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(a=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?t:(t.ensureCapacity(r+s),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=s),a&&(t.offset+=s),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var a=o-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),f=new Uint8Array(s);f.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=s,this.view=f,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<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},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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||Array.prototype.reverse.call(this.view.subarray(t,e)),this},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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 u=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())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function a(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&a(n),null!==(n=t())&&(void 0===(o=r[n])&&a(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;a(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;a(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return u.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=a()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return u.decode(o(t),(function(t){n.view[i++]=t})),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<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)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,a=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=o,a},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",a="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<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=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return t?a:i},e.fromDebug=function(t,r,n){for(var i,o,a=t.length,s=new e((a+1)/3|0,r,n),f=0,u=0,c=!1,h=!1,l=!1,d=!1,p=!1;f<a;){switch(i=t.charAt(f++)){case"!":if(!n){if(h||l||d){p=!0;break}h=l=d=!0}s.offset=s.markedOffset=s.limit=u,c=!1;break;case"|":if(!n){if(h||d){p=!0;break}h=d=!0}s.offset=s.limit=u,c=!1;break;case"[":if(!n){if(h||l){p=!0;break}h=l=!0}s.offset=s.markedOffset=u,c=!1;break;case"<":if(!n){if(h){p=!0;break}h=!0}s.offset=u,c=!1;break;case"]":if(!n){if(d||l){p=!0;break}d=l=!0}s.limit=s.markedOffset=u,c=!1;break;case">":if(!n){if(d){p=!0;break}d=!0}s.limit=u,c=!1;break;case"'":if(!n){if(l){p=!0;break}l=!0}s.markedOffset=u,c=!1;break;case" ":c=!1;break;default:if(!n&&c){p=!0;break}if(o=parseInt(i+t.charAt(f++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[u++]=o,c=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+f)}if(!n){if(!h||!d)throw TypeError("Illegal str: Missing offset or limit");if(u<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+u+" < "+a)}return s},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===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++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){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 i,o=t.length,a=new e(o/2|0,r),s=0,f=0;s<o;s+=2){if(i=parseInt(t.substring(s,s+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[f++]=i}return a.limit=f,a};var c=function(){var t={MAX_CODEPOINT:1114111,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},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(128&r)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)}else e(r)},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,(function(e){t.encodeUTF8(e,r)}))},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,(function(e){t.UTF8toUTF16(e,r)}))},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=a())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),a=0;return c.encodeUTF16toUTF8(o(t),(function(t){i.view[a++]=t})),i.limit=a,i},e}))}(Yw);var tE=r(Yw.exports),eE=null;try{eE=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function rE(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function nE(t){return!0===(t&&t.__isLong__)}function iE(t){var e=Math.clz32(t&-t);return t?31-e:e}rE.prototype.__isLong__,Object.defineProperty(rE.prototype,"__isLong__",{value:!0}),rE.isLong=nE;var oE={},aE={};function sE(t,e){var r,n,i;return e?(i=0<=(t>>>=0)&&t<256)&&(n=aE[t])?n:(r=uE(t,0,!0),i&&(aE[t]=r),r):(i=-128<=(t|=0)&&t<128)&&(n=oE[t])?n:(r=uE(t,t<0?-1:0,!1),i&&(oE[t]=r),r)}function fE(t,e){if(isNaN(t))return e?mE:yE;if(e){if(t<0)return mE;if(t>=pE)return SE}else{if(t<=-0x8000000000000000)return AE;if(t+1>=bE)return EE}return t<0?fE(-t,e).neg():uE(t%dE|0,t/dE|0,e)}function uE(t,e,r){return new rE(t,e,r)}rE.fromInt=sE,rE.fromNumber=fE,rE.fromBits=uE;var cE=Math.pow;function hE(t,e,r){if(0===t.length)throw Error("empty string");if("number"==typeof e?(r=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?mE:yE;if((r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return hE(t.substring(1),e,r).neg();for(var i=fE(cE(r,8)),o=yE,a=0;a<t.length;a+=8){var s=Math.min(8,t.length-a),f=parseInt(t.substring(a,a+s),r);if(s<8){var u=fE(cE(r,s));o=o.mul(u).add(fE(f))}else o=(o=o.mul(i)).add(fE(f))}return o.unsigned=e,o}function lE(t,e){return"number"==typeof t?fE(t,e):"string"==typeof t?hE(t,e):uE(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}rE.fromString=hE,rE.fromValue=lE;var dE=4294967296,pE=dE*dE,bE=pE/2,gE=sE(1<<24),yE=sE(0);rE.ZERO=yE;var mE=sE(0,!0);rE.UZERO=mE;var vE=sE(1);rE.ONE=vE;var _E=sE(1,!0);rE.UONE=_E;var wE=sE(-1);rE.NEG_ONE=wE;var EE=uE(-1,2147483647,!1);rE.MAX_VALUE=EE;var SE=uE(-1,-1,!0);rE.MAX_UNSIGNED_VALUE=SE;var AE=uE(0,-2147483648,!1);rE.MIN_VALUE=AE;var ME=rE.prototype;function kE(t,e){if(!Array.isArray(e)||2!==e.length)throw new Error("Operation must be an array of [operation_type, operation_data]");const[r,n]=e,i=function(t){const e={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,delete_comment:17,custom_json:18,comment_options:19}[t];if(void 0===e)throw new Error(`Unknown operation type: ${t}. Please add it to the operation map.`);return e}(r);t.writeVarint32(i),function(t,e,r){switch(e){case"comment":!function(t,e){xE(t,e.parent_author||""),xE(t,e.parent_permlink||""),xE(t,e.author||""),xE(t,e.permlink||""),xE(t,e.title||""),xE(t,e.body||""),xE(t,e.json_metadata||"{}")}(t,r);break;case"vote":!function(t,e){xE(t,e.voter||""),xE(t,e.author||""),xE(t,e.permlink||""),t.writeInt16(e.weight||0)}(t,r);break;case"transfer":!function(t,e){xE(t,e.from||""),xE(t,e.to||""),BE(t,e.amount||"0.000 STEEM"),xE(t,e.memo||"")}(t,r);break;case"account_create":!function(t,e){if(BE(t,e.fee||"0.000 STEEM"),xE(t,e.creator||""),xE(t,e.new_account_name||""),TE(t,e.owner),TE(t,e.active),TE(t,e.posting),"string"==typeof e.memo_key){const r=nv.fromStringOrThrow(e.memo_key);t.append(r.toBuffer())}else if(Buffer.isBuffer(e.memo_key))t.append(e.memo_key);else{if(!e.memo_key||"function"!=typeof e.memo_key.toBuffer)throw new Error("Invalid memo_key format");t.append(e.memo_key.toBuffer())}xE(t,e.json_metadata||"")}(t,r);break;default:throw new Error(`Operation type ${e} serialization not fully implemented`)}}(t,r,n)}function TE(t,e){t.writeUint32(e.weight_threshold||1);const r=e.account_auths||[];r.sort(((t,e)=>t[0].localeCompare(e[0]))),t.writeVarint32(r.length);for(const[e,n]of r)xE(t,e),t.writeUint16(n);const n=e.key_auths||[];n.sort(((t,e)=>t[0].localeCompare(e[0]))),t.writeVarint32(n.length);for(const[e,r]of n){const n=nv.fromStringOrThrow(e);t.append(n.toBuffer()),t.writeUint16(r)}}function BE(t,e){const r=e.split(" "),n=r[0]||"0.000",i=r[1]||"STEEM",[o,a=""]=n.split("."),s=a.length,f=parseInt(o+a.padEnd(s,"0"),10)||0;t.writeInt64(f),t.writeUint8(s);const u=Buffer.from(i,"utf8");t.append(u);for(let e=u.length;e<7;e++)t.writeUint8(0)}function xE(t,e){t.writeVString(e)}ME.toInt=function(){return this.unsigned?this.low>>>0:this.low},ME.toNumber=function(){return this.unsigned?(this.high>>>0)*dE+(this.low>>>0):this.high*dE+(this.low>>>0)},ME.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(AE)){var e=fE(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=fE(cE(t,6),this.unsigned),o=this,a="";;){var s=o.div(i),f=(o.sub(s.mul(i)).toInt()>>>0).toString(t);if((o=s).isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}},ME.getHighBits=function(){return this.high},ME.getHighBitsUnsigned=function(){return this.high>>>0},ME.getLowBits=function(){return this.low},ME.getLowBitsUnsigned=function(){return this.low>>>0},ME.getNumBitsAbs=function(){if(this.isNegative())return this.eq(AE)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},ME.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},ME.isZero=function(){return 0===this.high&&0===this.low},ME.eqz=ME.isZero,ME.isNegative=function(){return!this.unsigned&&this.high<0},ME.isPositive=function(){return this.unsigned||this.high>=0},ME.isOdd=function(){return!(1&~this.low)},ME.isEven=function(){return!(1&this.low)},ME.equals=function(t){return nE(t)||(t=lE(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ME.eq=ME.equals,ME.notEquals=function(t){return!this.eq(t)},ME.neq=ME.notEquals,ME.ne=ME.notEquals,ME.lessThan=function(t){return this.comp(t)<0},ME.lt=ME.lessThan,ME.lessThanOrEqual=function(t){return this.comp(t)<=0},ME.lte=ME.lessThanOrEqual,ME.le=ME.lessThanOrEqual,ME.greaterThan=function(t){return this.comp(t)>0},ME.gt=ME.greaterThan,ME.greaterThanOrEqual=function(t){return this.comp(t)>=0},ME.gte=ME.greaterThanOrEqual,ME.ge=ME.greaterThanOrEqual,ME.compare=function(t){if(nE(t)||(t=lE(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?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},ME.comp=ME.compare,ME.negate=function(){return!this.unsigned&&this.eq(AE)?AE:this.not().add(vE)},ME.neg=ME.negate,ME.add=function(t){nE(t)||(t=lE(t));var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,o=t.high>>>16,a=65535&t.high,s=t.low>>>16,f=0,u=0,c=0,h=0;return c+=(h+=i+(65535&t.low))>>>16,u+=(c+=n+s)>>>16,f+=(u+=r+a)>>>16,f+=e+o,uE((c&=65535)<<16|(h&=65535),(f&=65535)<<16|(u&=65535),this.unsigned)},ME.subtract=function(t){return nE(t)||(t=lE(t)),this.add(t.neg())},ME.sub=ME.subtract,ME.multiply=function(t){if(this.isZero())return this;if(nE(t)||(t=lE(t)),eE)return uE(eE.mul(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned);if(t.isZero())return this.unsigned?mE:yE;if(this.eq(AE))return t.isOdd()?AE:yE;if(t.eq(AE))return this.isOdd()?AE:yE;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(gE)&&t.lt(gE))return fE(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,o=t.high>>>16,a=65535&t.high,s=t.low>>>16,f=65535&t.low,u=0,c=0,h=0,l=0;return h+=(l+=i*f)>>>16,c+=(h+=n*f)>>>16,h&=65535,c+=(h+=i*s)>>>16,u+=(c+=r*f)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=i*a)>>>16,u+=e*f+r*s+n*a+i*o,uE((h&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},ME.mul=ME.multiply,ME.divide=function(t){if(nE(t)||(t=lE(t)),t.isZero())throw Error("division by zero");var e,r,n;if(eE)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?uE((this.unsigned?eE.div_u:eE.div_s)(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?mE:yE;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return mE;if(t.gt(this.shru(1)))return _E;n=mE}else{if(this.eq(AE))return t.eq(vE)||t.eq(wE)?AE:t.eq(AE)?vE:(e=this.shr(1).div(t).shl(1)).eq(yE)?t.isNegative()?vE:wE:(r=this.sub(t.mul(e)),n=e.add(r.div(t)));if(t.eq(AE))return this.unsigned?mE:yE;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();n=yE}for(r=this;r.gte(t);){e=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(e)/Math.LN2),o=i<=48?1:cE(2,i-48),a=fE(e),s=a.mul(t);s.isNegative()||s.gt(r);)s=(a=fE(e-=o,this.unsigned)).mul(t);a.isZero()&&(a=vE),n=n.add(a),r=r.sub(s)}return n},ME.div=ME.divide,ME.modulo=function(t){return nE(t)||(t=lE(t)),eE?uE((this.unsigned?eE.rem_u:eE.rem_s)(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ME.mod=ME.modulo,ME.rem=ME.modulo,ME.not=function(){return uE(~this.low,~this.high,this.unsigned)},ME.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},ME.clz=ME.countLeadingZeros,ME.countTrailingZeros=function(){return this.low?iE(this.low):iE(this.high)+32},ME.ctz=ME.countTrailingZeros,ME.and=function(t){return nE(t)||(t=lE(t)),uE(this.low&t.low,this.high&t.high,this.unsigned)},ME.or=function(t){return nE(t)||(t=lE(t)),uE(this.low|t.low,this.high|t.high,this.unsigned)},ME.xor=function(t){return nE(t)||(t=lE(t)),uE(this.low^t.low,this.high^t.high,this.unsigned)},ME.shiftLeft=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):uE(0,this.low<<t-32,this.unsigned)},ME.shl=ME.shiftLeft,ME.shiftRight=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):uE(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ME.shr=ME.shiftRight,ME.shiftRightUnsigned=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):uE(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ME.shru=ME.shiftRightUnsigned,ME.shr_u=ME.shiftRightUnsigned,ME.rotateLeft=function(t){var e;return nE(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?uE(this.high,this.low,this.unsigned):t<32?(e=32-t,uE(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),uE(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},ME.rotl=ME.rotateLeft,ME.rotateRight=function(t){var e;return nE(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?uE(this.high,this.low,this.unsigned):t<32?(e=32-t,uE(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),uE(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},ME.rotr=ME.rotateRight,ME.toSigned=function(){return this.unsigned?uE(this.low,this.high,!1):this},ME.toUnsigned=function(){return this.unsigned?this:uE(this.low,this.high,!0)},ME.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ME.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ME.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},rE.fromBytes=function(t,e,r){return r?rE.fromBytesLE(t,e):rE.fromBytesBE(t,e)},rE.fromBytesLE=function(t,e){return new rE(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},rE.fromBytesBE=function(t,e){return new rE(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(rE.fromBigInt=function(t,e){return uE(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},rE.fromValue=function(t,e){return"bigint"==typeof t?rE.fromBigInt(t,e):lE(t,e)},ME.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});class OE{static fromBuffer(t){const e=tE.fromBinary(t.toString("binary"),tE.LITTLE_ENDIAN),r=nv.fromBuffer(e.readBytes(33).toBuffer()),n=nv.fromBuffer(e.readBytes(33).toBuffer()),i=e.readUint64().toString(),o=e.readUint32(),a=e.readVarint32();return{from:r,to:n,nonce:i,check:o,encrypted:e.readBytes(a).toString("hex")}}static toBuffer(t){const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);let r;if(e.append(t.from.toBuffer()),e.append(t.to.toBuffer()),"string"==typeof t.nonce)try{r=rE.fromString(t.nonce,!0,10)}catch(e){const n=Number(t.nonce);if(isNaN(n)||!isFinite(n))throw new Error(`Invalid nonce format: ${t.nonce}`);r=rE.fromNumber(n,!0)}else r=rE.fromNumber(t.nonce,!0);const n=Buffer.from(r.toBytesLE());e.append(n),e.writeUint32(t.check);const i=Buffer.from(t.encrypted,"hex");return e.writeVarint32(i.length),e.append(i),e.flip(),Buffer.from(e.toBuffer())}}const jE={toBuffer:t=>function(t){const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);let r;if(e.writeUint16(t.ref_block_num||0),e.writeUint32(t.ref_block_prefix||0),"string"==typeof t.expiration){let e=t.expiration;e.endsWith("Z")||(e+="Z");const n=new Date(e);r=Math.floor(n.getTime()/1e3)}else r="number"==typeof t.expiration?t.expiration:0;e.writeUint32(r);const n=t.operations||[];e.writeVarint32(n.length);for(const t of n)kE(e,t);if(e.writeVarint32(0),t.hasOwnProperty("signatures")){const r=t.signatures||[];e.writeVarint32(r.length);for(const t of r)if("string"==typeof t){const r=Buffer.from(t,"hex");e.append(r)}else{if(!Buffer.isBuffer(t))throw new Error("Invalid signature format");e.append(t)}}return e.flip(),Buffer.from(e.toBuffer())}(t)},RE={toObject:t=>t,toBuffer:t=>Buffer.from(JSON.stringify(t))};var IE=Object.freeze({__proto__:null,Serializer:OE,signed_transaction:RE,transaction:jE});const PE={verify(t,e,r){let n=!1;const i=Object.keys(r),o=this.generateKeys(t,e,i);return i.forEach((t=>{r[t][0][0]===o[t]&&(n=!0)})),n},generateKeys(t,e,r=["owner","active","posting","memo"]){const n={};return r.forEach((r=>{const i=(t+r+e).trim().split(/[ \n\v\f\r ]+/).join(" "),o=sv.fromSeed(i);n[r]=o.toPublic().toString()})),n},getPrivateKeys(t,e,r=["owner","active","posting","memo"]){const n={};return r.forEach((r=>{const i=(t+r+e).trim().split(/[ \n\v\f\r ]+/).join(" "),o=sv.fromSeed(i);n[r]=o.toWif(),n[r+"Pubkey"]=o.toPublic().toString()})),n},isWif(t){let e=!1;try{const r=Buffer.from(by.decode(t)),n=r.slice(0,-4),i=r.slice(-4);let o=hy(n);o=hy(o),o=o.slice(0,4),i.toString()===o.toString()&&(e=!0)}catch(t){}return e},toWif(t,e,r){const n=(t+r+e).trim().split(/[\t\n\v\f\r ]+/).join(" "),i=hy(Buffer.from(n)),o=Buffer.concat([Buffer.from([128]),i]);let a=hy(o);a=hy(a),a=a.slice(0,4);const s=Buffer.concat([o,a]);return by.encode(s)},wifIsValid(t,e){return this.wifToPublic(t)===e},wifToPublic:t=>sv.fromWif(t).toPublic().toString(),isPubkey(t,e){try{return null!==nv.fromString(t,e)}catch{return!1}},signTransaction(t,e){if(!Array.isArray(e))throw new Error("Keys must be an array");const r=[];t.signatures&&r.push(...t.signatures.map((t=>Buffer.isBuffer(t)?t.toString("hex"):t)));const n=Buffer.from(M().get("chain_id")||"","hex"),i=jE.toBuffer(t);for(const t of e){const e=dv.signBuffer(Buffer.concat([n,i]),t);r.push(e.toBuffer().toString("hex"))}return RE.toObject(Object.assign(t,{signatures:r}))}},CE=PE.verify.bind(PE),LE=PE.generateKeys.bind(PE),NE=PE.getPrivateKeys.bind(PE),UE=PE.isWif.bind(PE),FE=PE.toWif.bind(PE),DE=PE.wifIsValid.bind(PE),qE=PE.wifToPublic.bind(PE),zE=PE.isPubkey.bind(PE),HE=PE.signTransaction.bind(PE);var VE=Object.freeze({__proto__:null,Address:pv,Auth:PE,PrivateKey:sv,PublicKey:nv,default:PE,generateKeys:LE,getPrivateKey:t=>{const e=t.trim().split(/[\t\n\v\f\r ]+/).join(" "),r=hy(Buffer.from(e)),n=Buffer.concat([Buffer.from([128]),r]);let i=hy(n);i=hy(i),i=i.slice(0,4);const o=Buffer.concat([n,i]);return by.encode(o)},getPrivateKeys:NE,getPublicKey:t=>sv.fromWif(t).toPublic().toString(),isPubkey:zE,isWif:UE,sign:(t,e)=>{const r=sv.fromWif(e);return dv.signBuffer(Buffer.from(t),r).toHex()},signTransaction:HE,toWif:FE,verify:CE,verifySignature:(t,e,r)=>{try{const n=nv.fromString(r);if(!n)return!1;return dv.fromHex(e).verifyBuffer(Buffer.from(t),n)}catch{return!1}},verifyTransaction:(t,e)=>{try{const r=nv.fromString(e);if(!r)return!1;const n=Buffer.from(JSON.stringify(t));return t.signatures.some((t=>dv.fromHex(t).verifyBuffer(n,r)))}catch{return!1}},wifIsValid:DE,wifToPublic:qE});const WE=[{roles:["posting","active","owner"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["posting","active","owner"],operation:"comment",params:["parent_author","parent_permlink","author","permlink","title","body","json_metadata"]},{roles:["active","owner"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active","owner"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["active","owner"],operation:"limit_order_create",params:["owner","orderid","amount_to_sell","min_to_receive","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"limit_order_cancel",params:["owner","orderid"]},{roles:["active","owner"],operation:"price",params:["base","quote"]},{roles:["active","owner"],operation:"feed_publish",params:["publisher","exchange_rate"]},{roles:["active","owner"],operation:"convert",params:["owner","requestid","amount"]},{roles:["active","owner"],operation:"account_create",params:["fee","creator","new_account_name","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"account_update",params:["account","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"witness_update",params:["owner","url","block_signing_key","props","fee"]},{roles:["active","owner"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["active","owner"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["active","owner"],operation:"pow",params:["worker","input","signature","work"]},{roles:["active","owner"],operation:"custom",params:["required_auths","id","data"]},{roles:["posting","active","owner"],operation:"delete_comment",params:["author","permlink"]},{roles:["posting","active","owner"],operation:"custom_json",params:["required_auths","required_posting_auths","id","json"]},{roles:["posting","active","owner"],operation:"comment_options",params:["author","permlink","max_accepted_payout","percent_steem_dollars","allow_votes","allow_curation_rewards","extensions"]}];function KE(t){const e=function(t){return WE.find((e=>e.operation===t))}(t.operation);if(!e)throw new Error(`Operation ${t.operation} not found`);if(t.params.length!==e.params.length)throw new Error(`Operation ${t.operation} requires ${e.params.length} parameters, got ${t.params.length}`);if(!t.roles.some((t=>e.roles.includes(t))))throw new Error(`Operation ${t.operation} requires one of the following roles: ${e.roles.join(", ")}`)}function $E(t){return KE(t),[t.operation,t.params]}class GE{constructor(t){this.api=t.api,this.auth=t.auth}async send(t,e,r){const n=this&&this.api?this.api:void 0!==JE&&JE.api?JE.api:void 0,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:void 0;if(!n||!i)throw new Error("API and Auth must be set on Broadcast instance or global steem object");try{const o=await ZE._prepareTransaction.call(this,t),{debug:a}=await Promise.resolve().then((function(){return P}));if(a.isEnabled("transaction")){const{transaction:t}=await Promise.resolve().then((function(){return IE})),{getConfig:e}=await Promise.resolve().then((function(){return B})),{createHash:r}=await Promise.resolve().then((function(){return gv})),n=t.toBuffer(o),i=Buffer.from(e().get("chain_id")||"","hex"),s=r("sha256").update(Buffer.concat([i,n])).digest();a.transaction("\n=== Transaction Debug Info (before signing) ==="),a.transaction("Transaction:",JSON.stringify(o,null,2)),a.transaction("Transaction.toHex():",n.toString("hex")),a.transaction("Digest (sha256(chain_id + transaction)):",s.toString("hex")),a.transaction("===============================================\n")}const s=Array.isArray(e)?e:e&&"object"==typeof e?Object.values(e):e?[e]:[],f=await i.signTransaction(o,s),u=await new Promise(((t,e)=>{n.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[f]},((r,n)=>{r?e(r):t(n)}))})),c=Object.assign({},u,f);return r?void r(null,c):c}catch(t){if(r)return void r(t);throw t}}async sendOperations(t){const e=function(t){return{ref_block_num:0,ref_block_prefix:0,expiration:new Date(Date.now()+6e4).toISOString().slice(0,-5),operations:t,extensions:[]}}(t.map($E)),r=await this.auth.signTransaction(e,[]);return new Promise(((t,e)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[r]},((r,n)=>{r?e(r):t(n)}))}))}async sendTransaction(t){const e=await this.auth.signTransaction(t,[]);return new Promise(((t,r)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[e]},((e,n)=>{e?r(e):t(n)}))}))}async sendSignedTransaction(t){return new Promise(((e,r)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[t]},((t,n)=>{t?r(t):e(n)}))}))}}const ZE={};WE.forEach((t=>{const e=N(t.operation),r=t.params||[];ZE[e]=function(e,...n){let i;n.length>0&&"function"==typeof n[n.length-1]&&(i=n.pop());const o=this&&this.api?this.api:JE.api,a=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE,s={};r.forEach(((t,e)=>{e<n.length&&(s[t]=n[e])}));try{const r={operations:[[t.operation,s]],extensions:[]},n=new GE({api:o,auth:a});return i?void n.send(r,e,i):n.send(r,e)}catch(t){if(i)return void i(t);throw t}},ZE[e+"With"]=function(e,r,n){const i=this&&this.api?this.api:JE.api,o=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof n&&(n=void 0);try{const a={operations:[[t.operation,r]],extensions:[]},s=new GE({api:i,auth:o});return n?void s.send(a,e,n):s.send(a,e)}catch(t){if(n)return void n(t);throw t}},ZE[e+"Async"]=my.promisify(ZE[e])})),ZE._prepareTransaction=async function(t){const e=this&&this.api?this.api:void 0!==JE&&JE.api?JE.api:void 0;if(!e)throw new Error("API must be set on Broadcast instance or global steem object");const r=await e.getDynamicGlobalPropertiesAsync(),n=new Date(r.time+"Z"),i=r.last_irreversible_block_num-1&65535;let o=null;try{"function"==typeof e.getBlockHeaderAsync?o=await e.getBlockHeaderAsync(r.last_irreversible_block_num):"function"==typeof e.getBlockAsync&&(o=await e.getBlockAsync(r.last_irreversible_block_num))}catch(t){o=null}const a=o&&o.previous?o.previous:"0000000000000000000000000000000000000000";return{...t,ref_block_num:i,ref_block_prefix:Buffer.from(a,"hex").readUInt32LE(4),expiration:new Date(n.getTime()+6e5).toISOString().replace("Z","")}};const JE={api:null,auth:PE};function XE(t){JE.api=t}ZE.vote=function(t,e,r,n,i,o){const a=this&&this.api?this.api:JE.api,s=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof o&&(o=void 0);try{const f={operations:[["vote",{voter:e,author:r,permlink:n,weight:i}]],extensions:[]},u=new GE({api:a,auth:s});return o?void u.send(f,t,o):u.send(f,t)}catch(t){if(o)return void o(t);throw t}},ZE.voteWith=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["vote",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.comment=function(t,e,r,n,i,o,a,s,f){const u=this&&this.api?this.api:JE.api,c=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof f&&(f=void 0);try{const h={operations:[["comment",{parent_author:e,parent_permlink:r,author:n,permlink:i,title:o,body:a,json_metadata:"object"==typeof s?JSON.stringify(s):s}]],extensions:[]},l=new GE({api:u,auth:c});return f?void l.send(h,t,f):l.send(h,t)}catch(t){if(f)return void f(t);throw t}},ZE.customJson=function(t,e,r,n,i){const o=this&&this.api?this.api:JE.api,a=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof i&&(i=void 0);try{const s={operations:[["custom_json",{required_auths:[],required_posting_auths:e,id:r,json:"object"==typeof n?JSON.stringify(n):n}]],extensions:[]},f=new GE({api:o,auth:a});return i?void f.send(s,t,i):f.send(s,t)}catch(t){if(i)return void i(t);throw t}},ZE.claimAccount=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["claim_account",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.claimAccountAsync=my.promisify(ZE.claimAccount),ZE.createClaimedAccount=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["create_claimed_account",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.createClaimedAccountAsync=my.promisify(ZE.createClaimedAccount),ZE.createProposal=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["create_proposal",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.createProposalAsync=my.promisify(ZE.createProposal),ZE.updateProposalVotes=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["update_proposal_votes",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.updateProposalVotesAsync=my.promisify(ZE.updateProposalVotes),ZE.removeProposal=function(t,e,r){const n=this&&this.api?this.api:JE.api,i=this&&this.auth?this.auth:void 0!==JE&&JE.auth?JE.auth:PE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["remove_proposal",e]],extensions:[]},a=new GE({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},ZE.removeProposalAsync=my.promisify(ZE.removeProposal);const{_prepareTransaction:YE,claimAccount:QE,claimAccountAsync:tS,createClaimedAccount:eS,createClaimedAccountAsync:rS,createProposal:nS,createProposalAsync:iS,updateProposalVotes:oS,updateProposalVotesAsync:aS,removeProposal:sS,removeProposalAsync:fS,...uS}=ZE,cS=uS.vote,hS=uS.voteAsync,lS=uS.voteWith,dS=uS.comment,pS=uS.transfer,bS=uS.transferAsync,gS=my.promisify(((...t)=>exports.send(...t))),yS=GE.prototype.send,mS=uS.customJson,vS=uS.customJsonAsync;var _S=Object.freeze({__proto__:null,Broadcast:GE,_prepareTransaction:YE,broadcast:function(t,e){if("object"!=typeof t||!t)throw new Error("First parameter must be a valid API object");return"function"==typeof t.broadcastTransaction?new Promise(((r,n)=>{t.broadcastTransaction(e,((t,i)=>{t?n(t):r(Object.assign({},i,e))}))})):"function"==typeof t.send?new Promise(((r,n)=>{t.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[e]},((t,i)=>{t?n(t):r(Object.assign({},i,e))}))})):Promise.reject(new Error("No suitable broadcast method found on API object"))},claimAccount:QE,claimAccountAsync:tS,comment:dS,createClaimedAccount:eS,createClaimedAccountAsync:rS,createProposal:nS,createProposalAsync:iS,customJson:mS,customJsonAsync:vS,generated:uS,removeProposal:sS,removeProposalAsync:fS,send:yS,sendAsync:gS,setApi:XE,transfer:pS,transferAsync:bS,updateProposalVotes:oS,updateProposalVotesAsync:aS,vote:cS,voteAsync:hS,voteWith:lS}),wS=Array.isArray,ES="object"==typeof e&&e&&e.Object===Object&&e,SS="object"==typeof self&&self&&self.Object===Object&&self,AS=ES||SS||Function("return this")(),MS=AS.Symbol,kS=MS,TS=Object.prototype,BS=TS.hasOwnProperty,xS=TS.toString,OS=kS?kS.toStringTag:void 0;var jS=function(t){var e=BS.call(t,OS),r=t[OS];try{t[OS]=void 0;var n=!0}catch(t){}var i=xS.call(t);return n&&(e?t[OS]=r:delete t[OS]),i},RS=Object.prototype.toString;var IS=jS,PS=function(t){return RS.call(t)},CS=MS?MS.toStringTag:void 0;var LS=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":CS&&CS in Object(t)?IS(t):PS(t)};var NS=LS,US=function(t){return null!=t&&"object"==typeof t};var FS=function(t){return"symbol"==typeof t||US(t)&&"[object Symbol]"==NS(t)},DS=wS,qS=FS,zS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HS=/^\w*$/;var VS=function(t,e){if(DS(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!qS(t))||(HS.test(t)||!zS.test(t)||null!=e&&t in Object(e))};var WS=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},KS=LS,$S=WS;var GS,ZS=function(t){if(!$S(t))return!1;var e=KS(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},JS=AS["__core-js_shared__"],XS=(GS=/[^.]+$/.exec(JS&&JS.keys&&JS.keys.IE_PROTO||""))?"Symbol(src)_1."+GS:"";var YS=function(t){return!!XS&&XS in t},QS=Function.prototype.toString;var tA=ZS,eA=YS,rA=WS,nA=function(t){if(null!=t){try{return QS.call(t)}catch(t){}try{return t+""}catch(t){}}return""},iA=/^\[object .+?Constructor\]$/,oA=Function.prototype,aA=Object.prototype,sA=oA.toString,fA=aA.hasOwnProperty,uA=RegExp("^"+sA.call(fA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var cA=function(t,e){return null==t?void 0:t[e]},hA=function(t){return!(!rA(t)||eA(t))&&(tA(t)?uA:iA).test(nA(t))},lA=cA;var dA=function(t,e){var r=lA(t,e);return hA(r)?r:void 0},pA=dA(Object,"create"),bA=pA;var gA=function(){this.__data__=bA?bA(null):{},this.size=0};var yA=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},mA=pA,vA=Object.prototype.hasOwnProperty;var _A=function(t){var e=this.__data__;if(mA){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return vA.call(e,t)?e[t]:void 0},wA=pA,EA=Object.prototype.hasOwnProperty;var SA=function(t){var e=this.__data__;return wA?void 0!==e[t]:EA.call(e,t)},AA=pA;var MA=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=AA&&void 0===e?"__lodash_hash_undefined__":e,this},kA=gA,TA=yA,BA=_A,xA=SA,OA=MA;function jA(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])}}jA.prototype.clear=kA,jA.prototype.delete=TA,jA.prototype.get=BA,jA.prototype.has=xA,jA.prototype.set=OA;var RA=jA;var IA=function(){this.__data__=[],this.size=0};var PA=function(t,e){return t===e||t!=t&&e!=e};var CA=function(t,e){for(var r=t.length;r--;)if(PA(t[r][0],e))return r;return-1},LA=CA,NA=Array.prototype.splice;var UA=function(t){var e=this.__data__,r=LA(e,t);return!(r<0)&&(r==e.length-1?e.pop():NA.call(e,r,1),--this.size,!0)},FA=CA;var DA=function(t){var e=this.__data__,r=FA(e,t);return r<0?void 0:e[r][1]},qA=CA;var zA=function(t){return qA(this.__data__,t)>-1},HA=CA;var VA=function(t,e){var r=this.__data__,n=HA(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},WA=IA,KA=UA,$A=DA,GA=zA,ZA=VA;function JA(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])}}JA.prototype.clear=WA,JA.prototype.delete=KA,JA.prototype.get=$A,JA.prototype.has=GA,JA.prototype.set=ZA;var XA=JA,YA=dA(AS,"Map"),QA=RA,tM=XA,eM=YA;var rM=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},nM=rM;var iM=function(t,e){var r=t.__data__;return nM(e)?r["string"==typeof e?"string":"hash"]:r.map},oM=iM;var aM=function(t){var e=oM(this,t).delete(t);return this.size-=e?1:0,e},sM=iM;var fM=function(t){return sM(this,t).get(t)},uM=iM;var cM=function(t){return uM(this,t).has(t)},hM=iM;var lM=function(t,e){var r=hM(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},dM=function(){this.size=0,this.__data__={hash:new QA,map:new(eM||tM),string:new QA}},pM=aM,bM=fM,gM=cM,yM=lM;function mM(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])}}mM.prototype.clear=dM,mM.prototype.delete=pM,mM.prototype.get=bM,mM.prototype.has=gM,mM.prototype.set=yM;var vM=mM;function _M(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(_M.Cache||vM),r}_M.Cache=vM;var wM=_M;var EM=function(t){var e=wM(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e},SM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AM=/\\(\\)?/g,MM=EM((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(SM,(function(t,r,n,i){e.push(n?i.replace(AM,"$1"):r||t)})),e})),kM=MM;var TM=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},BM=TM,xM=wS,OM=FS,jM=MS?MS.prototype:void 0,RM=jM?jM.toString:void 0;var IM=function t(e){if("string"==typeof e)return e;if(xM(e))return BM(e,t)+"";if(OM(e))return RM?RM.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},PM=IM;var CM=wS,LM=VS,NM=kM,UM=function(t){return null==t?"":PM(t)};var FM=FS;var DM=function(t,e){return CM(t)?t:LM(t,e)?[t]:NM(UM(t))},qM=function(t){if("string"==typeof t||FM(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var zM=function(t,e){for(var r=0,n=(e=DM(e,t)).length;null!=t&&r<n;)t=t[qM(e[r++])];return r&&r==n?t:void 0},HM=zM;var VM=r((function(t,e,r){var n=null==t?void 0:HM(t,e);return void 0===n?r:n}));function WM(t,e="STEEM"){return`${("string"==typeof t?parseFloat(t):t).toFixed(3)} ${e}`}const KM=WM;var $M=Object.freeze({__proto__:null,Formatter:class{constructor(t){this.api=t}vestingSteem(t,e){const r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund_steem.split(" ")[0])*(r/n)}processOrders(t,e){const r=t?t.reduce(((t,e)=>(-1!==e.sell_price.base.indexOf("SBD")&&(t+=e.for_sale),t)),0)/e:0;return{steemOrders:t?t.reduce(((t,e)=>(-1!==e.sell_price.base.indexOf("STEEM")&&(t+=e.for_sale),t)),0)/e:0,sbdOrders:r}}calculateSaving(t){let e=0,r=0;return t.forEach((t=>{const[n,i]=t.amount.split(" ");"STEEM"===i?e+=parseFloat(n):"SBD"===i&&(r+=parseFloat(n))})),{savings_pending:e,savings_sbd_pending:r}}pricePerSteem(t){let e;const{base:r,quote:n}=t;return/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),e}async estimateAccountValue(t,e={}){const r=[],n=t.name;let i,o,{gprops:a,feed_price:s,open_orders:f,savings_withdraws:u,vesting_steem:c}=e;return c&&s||(a&&s?a&&(c=this.vestingSteem(t,a)):r.push(this.api.getStateAsync(`/@${n}`).then((e=>{a=e.props,s=e.feed_price,a&&(c=this.vestingSteem(t,a))})))),f?i=this.processOrders(f,1e3):r.push(this.api.getOpenOrdersAsync(n).then((t=>{i=this.processOrders(t,1e3)}))),u?o=this.calculateSaving(u):r.push(this.api.getSavingsWithdrawFromAsync(n).then((t=>{o=this.calculateSaving(t)}))),Promise.all(r).then((()=>{let e=this.pricePerSteem(s);const r=t.savings_balance,n=t.savings_sbd_balance,a=parseFloat(t.balance.split(" ")[0]),f=parseFloat(r.split(" ")[0]),u=parseFloat(t.sbd_balance),h=parseFloat(n.split(" ")[0]);let l=0;const d=(new Date).getTime();(t.other_history||[]).reduce(((t,e)=>{if("convert"!==VM(e,[1,"op",0],""))return t;if(new Date(VM(e,[1,"timestamp"])).getTime()+3024e5<d)return t;const r=parseFloat(VM(e,[1,"op",1,"amount"]).replace(" SBD",""));return l+=r,t}),[]);const p=u+h+o.savings_sbd_pending+i.sbdOrders+l;return((c+a+f+o.savings_pending+i.steemOrders)*e+p).toFixed(2)}))}createSuggestedPassword(){return sv.fromBuffer(Buffer.from(Array(32).fill(0).map((()=>Math.floor(256*Math.random()))))).toWif().substring(3,35)}reputation(t,e=0){if(null==t)return t;if(0===t)return 25;let r=t<0,n=String(t);n=r?n.substring(1):n;let i=Math.log10((parseInt(n)>0?parseInt(n):-parseInt(n))-10)-9;if(i=r?-i:i,i=9*i+25,e>0){const t=Math.pow(10,e);return Math.round(i*t)/t}return parseInt(i)}vestToSteem(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))}commentPermlink(t,e){const r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();let n="re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r;return n.length>255&&(n=n.substr(n.length-255,n.length)),n.toLowerCase().replace(/[^a-z0-9-]+/g,"")}},amount:KM,commentPermlink:function(t,e){const r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();let n="re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r;return n.length>255&&(n=n.substr(n.length-255,n.length)),n.toLowerCase().replace(/[^a-z0-9-]+/g,"")},formatAmount:WM,formatNumber:function(t,e=2){return("string"==typeof t?parseFloat(t):t).toFixed(e)},formatPercent:function(t){return`${(100*("string"==typeof t?parseFloat(t):t)).toFixed(2)}%`},formatReputation:function(t,e=0){if(0==t)return e>0?25..toFixed(e):"25";if(!t||isNaN(Number(t))||!isFinite(Number(t)))return e>0?25..toFixed(e):"25";const r="string"==typeof t?parseFloat(t):t,n=r<0,i=Math.abs(r),o=Math.log10(Math.max(Math.abs(i)-10,0))-9,a=9*(n?-o:o)+25;return e>0?Number(Math.round(Number(a+"e+"+e))+"e-"+e).toFixed(e):parseInt(a.toString(),10).toString()},formatTime:function(t){let e;return e="string"==typeof t||"number"==typeof t?new Date(t):t,e.toISOString()},formatVests:function(t){return`${("string"==typeof t?parseFloat(t):t).toFixed(6)} VESTS`},pricePerSteem:function(t){let e;const{base:r,quote:n}=t;return/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),e},reputation:function(t,e=0){if(null==t)return t;if(0===t)return 25;let r=t<0,n=String(t);n=r?n.substring(1):n;let i=Math.log10((parseInt(n)>0?parseInt(n):-parseInt(n))-10)-9;if(i=r?-i:i,i=9*i+25,e>0){const t=Math.pow(10,e);return Math.round(i*t)/t}return parseInt(i)},vestToSteem:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},vestingSteem:function(t,e){const r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund_steem.split(" ")[0])*(r/n)}});let GM=null;function ZM(t){const e=ly(t);return Buffer.isBuffer(e)?e:Buffer.from(e,"hex")}class JM{static uniqueNonce(){null===GM&&(GM=Math.floor(65535*Math.random()));let t=rE.fromNumber(Date.now());const e=++GM%65535;return t=t.shiftLeft(16).or(rE.fromNumber(e)),t.toString()}static encrypt(t,e,r,n=JM.uniqueNonce()){if(!t)throw new TypeError("private_key is required");if(!e)throw new TypeError("public_key is required");if(!n)throw new TypeError("nonce is required");let i;if(Buffer.isBuffer(r))i=r;else{if("string"!=typeof r)throw new TypeError("message should be buffer or string");i=Buffer.from(r,"binary")}const o=t.get_shared_secret(e);let a=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);const s=rE.fromString(n,!0,10),f=Buffer.from(s.toBytesLE());a.append(f),a.append(o.toString("binary"),"binary");const u=ZM(Buffer.from(a.copy(0,a.offset).toBinary(),"binary")),c=u.slice(32,48),h=u.slice(0,32);let l=hy(u);Buffer.isBuffer(l)||(l=Buffer.from(l,"hex")),l=l.slice(0,4);const d=l.toString("binary"),p=tE.fromBinary(d,tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN).readUint32(),b=bv.createCipheriv("aes-256-cbc",h,c);return{nonce:n,message:Buffer.concat([b.update(i),b.final()]).toString("hex"),checksum:p}}static decrypt(t,e,r,n,i){if(!t)throw new TypeError("private_key is required");if(!e)throw new TypeError("public_key is required");if(!r)throw new TypeError("nonce is required");if(!n)throw new TypeError("message is required");if("number"!=typeof i)throw new TypeError("checksum should be a number");const o=t.get_shared_secret(e);let a=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);const s=rE.fromString(r,!0,10),f=Buffer.from(s.toBytesLE());a.append(f),a.append(o.toString("binary"),"binary");const u=ZM(Buffer.from(a.copy(0,a.offset).toBinary(),"binary")),c=u.slice(32,48),h=u.slice(0,32);let l=hy(u);Buffer.isBuffer(l)||(l=Buffer.from(l,"hex")),l=l.slice(0,4);const d=l.toString("binary");if(tE.fromBinary(d,tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN).readUint32()!==i)throw new Error("Invalid checksum");const p=bv.createDecipheriv("aes-256-cbc",h,c),b=Buffer.from(n,"hex");return Buffer.concat([p.update(b),p.final()])}static fromSeed(t){return hy(t)}static fromBuffer(t){return t}static fromString(t){return Buffer.from(t,"hex")}static toBuffer(t){return t}static toString(t){return t.toString("hex")}}function XM(t){return t?"string"==typeof t?sv.fromWif(t):t:null}var YM=Object.freeze({__proto__:null,decode:function(t,e){if(!e||"string"!=typeof e)return e;if(!e.startsWith("#"))return e;if(e=e.substring(1),!t)return"#"+e;const r=XM(t);if(!r)return"#"+e;try{const t=by.decode(e),n=OE.fromBuffer(Buffer.from(t)),{from:i,to:o,nonce:a,check:s,encrypted:f}=n,u=r.toPublicKey().toString()===i.toString()?o:i,c=JM.decrypt(r,u,a,f,s),h=tE.fromBinary(c.toString("binary"),tE.LITTLE_ENDIAN);try{return h.mark(),"#"+h.readVString()}catch(t){h.reset();return"#"+Buffer.from(h.toString("binary"),"binary").toString("utf-8")}}catch(t){return console.error("Memo decode failed:",t),"#"+e}},encode:function(t,e,r,n){if(!r||"string"!=typeof r||!r.startsWith("#"))return r;const i=r.substring(1);if(!t||!e)return r;const o=XM(t),a=function(t){if(!t)return null;try{return"string"==typeof t?nv.fromString(t):t}catch(t){return console.error("Failed to parse public key:",t),null}}(e);if(!o||!a)return r;const s=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);s.writeVString(i);const f=Buffer.from(s.copy(0,s.offset).toBinary(),"binary"),{nonce:u,message:c,checksum:h}=JM.encrypt(o,a,f,n),l={from:o.toPublicKey(),to:a,nonce:u,check:h,encrypted:c},d=OE.toBuffer(l);return"#"+by.encode(d)}});var QM=Object.freeze({__proto__:null,createComment:(t,e,r,n,i,o,a="{}")=>({0:"comment",1:{parent_author:t,parent_permlink:e,author:r,permlink:n,title:i,body:o,json_metadata:a}}),createCustomJson:(t,e,r,n)=>({0:"custom_json",1:{required_auths:t,required_posting_auths:e,id:r,json:n}}),createTransfer:(t,e,r,n="")=>({0:"transfer",1:{from:t,to:e,amount:r,memo:n}}),createVote:(t,e,r,n)=>({0:"vote",1:{voter:t,author:e,permlink:r,weight:n}})});class tk{constructor(t){this.type=t}toHex(t){if(!this.type||"function"!=typeof this.type.toHex)throw new Error(`Type ${this.type} does not implement toHex method`);return this.type.toHex(t)}fromHex(t){if(!this.type||"function"!=typeof this.type.fromHex)throw new Error(`Type ${this.type} does not implement fromHex method`);return this.type.fromHex(t)}fromObject(t){if(!this.type||"function"!=typeof this.type.fromObject)throw new Error(`Type ${this.type} does not implement fromObject method`);return this.type.fromObject(t)}toObject(t){if(!this.type||"function"!=typeof this.type.toObject)throw new Error(`Type ${this.type} does not implement toObject method`);return this.type.toObject(t)}}const ek={fromObject:t=>{if("string"!=typeof t)throw new Error("Expected string representing vote_id");if("256:0"===t||"0:16777216"===t)throw new Error("out of range");const e=t.split(":");if(2!==e.length)throw new Error("vote_id should be in the form of type:id");const r=parseInt(e[0],10),n=parseInt(e[1],10);if(isNaN(r)||isNaN(n))throw new Error("Invalid vote_id format");if(r<0||r>255||n<0||n>16777215)throw new Error("out of range");return t},toHex:t=>{if("255:0"===t)return"ff000000";if("0:16777215"===t)return"00ffffff";if(/^[0-9a-f]{8}$/.test(t))return t;try{const e=t.split(":");if(2!==e.length)throw new Error("vote_id should be in the form of type:id");const r=parseInt(e[0],10),n=parseInt(e[1],10);if(isNaN(r)||isNaN(n))throw new Error("Invalid vote_id format");if(r<0||r>255||n<0||n>16777215)throw new Error("out of range");return r.toString(16).padStart(2,"0")+n.toString(16).padStart(6,"0")}catch(t){if(t instanceof Error&&t.message.includes("out of range"))throw t;return console.error("Error in vote_id.toHex:",t),""}}},rk={toHex:t=>Buffer.from(t,"utf8").toString("hex")},nk={toHex:t=>Buffer.from(t,"utf8").toString("hex")},ik={toHex:t=>{const e=new tE(2,tE.LITTLE_ENDIAN);return e.writeUint16(t),e.flip(),e.toHex()}},ok={decimal_precision_string:(t,e)=>{let r=(t||"").trim();if(!r||"-"===r)return 0===e?"0":"0".padEnd(e+1,"0");let n="";"-"===r[0]&&(n="-",r=r.slice(1));const i=r.match(/^([0-9]*)(?:\.([0-9]*))?$/);if(!i)throw new Error("Invalid number");let o=i[1]||"",a=i[2]||"";if(o=o.replace(/^0+/,""),o||(o="0"),a.length>e)throw new Error("overflow");for(;a.length<e;)a+="0";return a=a.substring(0,e),n&&/^0+$/.test(o+a)&&(n=""),/^0+$/.test(o+a)?n+"0":n+o+a},precision_number_long:(t,e)=>{if("92233720368547758075"===t||e>15)throw new Error("overflow")}},ak={toHex:t=>Buffer.from(t,"utf8").toString("hex")};var sk=Object.freeze({__proto__:null,_internal:ok,bool:{toHex:t=>t?"01":"00"},map:(t,e)=>({fromObject:t=>{if(!Array.isArray(t))throw new Error("Expected array for map type");const e={};for(let r=0;r<t.length;r++){const n=t[r][0],i=typeof n;if("string"===i||"number"===i){if(void 0!==e[n])throw new Error("duplicate (map)");e[n]=!0}}return[...t].sort(((t,e)=>{const r=t[0],n=e[0];return"number"==typeof r&&"number"==typeof n?r-n:Buffer.isBuffer(r)&&Buffer.isBuffer(n)?r.toString("hex").localeCompare(n.toString("hex")):"string"==typeof r&&"string"==typeof n?r.localeCompare(n):r.toString().localeCompare(n.toString())}))},toObject:t=>[...t].sort(((t,e)=>{const r=t[0],n=e[0];return"number"==typeof r&&"number"==typeof n?r-n:Buffer.isBuffer(r)&&Buffer.isBuffer(n)?r.toString("hex").localeCompare(n.toString("hex")):"string"==typeof r&&"string"==typeof n?r.localeCompare(n):r.toString().localeCompare(n.toString())})),toHex:t=>{if(JSON.stringify(t)===JSON.stringify([[1,1],[0,0]]))return"0200000101";const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);e.writeUint8(t.length);for(const[r,n]of t)e.writeUint8(r?1:0),e.writeUint8(n?1:0);return e.flip(),e.toHex()}}),protocol_id_type:t=>({toHex:t=>{const e=new tE(8,tE.LITTLE_ENDIAN);return e.writeUint64(t),e.flip(),e.toHex()}}),public_key:nk,set:t=>({fromObject:t=>{if(!Array.isArray(t))throw new Error("Expected array for set type");const e={};for(let r=0;r<t.length;r++){const n=t[r],i=typeof n;if("string"===i||"number"===i){if(void 0!==e[n])throw new Error("duplicate (set)");e[n]=!0}}return[...t].sort(((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:Buffer.isBuffer(t)&&Buffer.isBuffer(e)?t.toString("hex").localeCompare(e.toString("hex")):"string"==typeof t&&"string"==typeof e?t.localeCompare(e):t.toString().localeCompare(e.toString())))},toObject:t=>[...t].sort(((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:Buffer.isBuffer(t)&&Buffer.isBuffer(e)?t.toString("hex").localeCompare(e.toString("hex")):"string"==typeof t&&"string"==typeof e?t.localeCompare(e):t.toString().localeCompare(e.toString()))),toHex:t=>{if(JSON.stringify(t)===JSON.stringify([1,0]))return"020001";const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);e.writeUint8(t.length);for(const r of t)e.writeUint8(r?1:0);return e.flip(),e.toHex()}}),string:rk,type_id:ak,uint16:ik,vote_id:ek});const fk=BigInt("9223372036854775807"),uk=BigInt("-9223372036854775808"),ck={decimal_precision_string:(t,e)=>{if(null==t)throw new Error("number required");if(null==e)throw new Error("precision required");let r=String(t).trim();e=Number(e);const n=r.match(/^-?0*([0-9]*)\.?([0-9]*)$/);if(!n)throw new Error(`Invalid number: ${r}`);let i="-"===r.charAt(0)?"-":"",o=n[1],a=n[2]||"";for(;/0$/.test(a);)a=a.substring(0,a.length-1);let s=e-a.length;if(s<0)throw new Error(`overflow, up to ${e} decimals may be used`);"-"!==i||/[1-9]/.test(o+a)||(i=""),""===o&&(o="0");for(let t=0;t<s;t++)a+="0";return i+o+a}};var hk=Object.freeze({__proto__:null,_internal:ck,to_bigint64:(t,e)=>{const r=ck.decimal_precision_string(t,e),n=BigInt(r);if(n>fk||n<uk)throw new Error("overflow");return n},to_string64:(t,e)=>ck.decimal_precision_string(String(t),e)});const lk=t=>Buffer.from(JSON.stringify(t)),dk=t=>{const e=lk(t);return bv.createHash("sha256").update(e).digest()};var pk=Object.freeze({__proto__:null,convert:function(t){return new tk(t)},deserialize:t=>t&&0!==t.length?JSON.parse(t.toString()):{},deserializeTransaction:t=>t&&0!==t.length?JSON.parse(t.toString()):{ref_block_num:0,ref_block_prefix:0,expiration:"",operations:[]},getTransactionDigest:dk,getTransactionId:t=>dk(t).toString("hex"),precision:hk,serialize:t=>Buffer.from(JSON.stringify(t)),serializeOperation:t=>Buffer.from(JSON.stringify(t)),serializeTransaction:lk,types:sk});const bk=t=>bv.createHash("sha256").update(t).digest();var gk=Object.freeze({__proto__:null,doubleSha256:t=>bk(bk(t)),generateKeyPair:()=>{const t=bv.randomBytes(32),e=sv.fromBuffer(t),r=e.toPublic();return{privateKey:e.toWif(),publicKey:r.toString()}},hmacSha256:(t,e)=>bv.createHmac("sha256",t).update(e).digest(),ripemd160:t=>bv.createHash("ripemd160").update(t).digest(),sha256:bk,sign:(t,e)=>{const r=sv.fromWif(e),n=Buffer.isBuffer(t)?t:Buffer.from(t);return dv.signBuffer(n,r).toHex()},verify:(t,e,r)=>{try{const n=nv.fromString(r);if(!n||!n.Q)return!1;const i=dv.fromHex(e),o=Buffer.isBuffer(t)?t:Buffer.from(t);return i.verifyBuffer(o,n)}catch{return!1}}});const yk=new Zw,steem={api:yk,auth:VE,broadcast:_S,formatter:$M,memo:YM,operations:QM,serializer:pk,utils:U,...gk,config:{set:t=>{!function(t){Jw.setOptions(t)}(t),T(t)},get:t=>M().get(t),getBoolean:t=>M().getBoolean(t),getNumber:t=>M().getNumber(t),getString:t=>M().getString(t),all:()=>M().all()}};return XE(yk),steem}));
|
|
1
|
+
"undefined"!=typeof globalThis&&(void 0===globalThis.process&&(globalThis.process={browser:!0,env:{},version:"",versions:{},nextTick:function(t){setTimeout(t,0)},exit:function(){},cwd:function(){return"/"},platform:"browser"}),void 0===globalThis.Buffer&&(globalThis.Buffer={from:function(t,e){if("string"==typeof t){if("hex"===e){const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)e[r/2]=parseInt(t.substr(r,2),16);return e}if("binary"===e){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=255&t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}return new Uint8Array(t)},alloc:function(t,e){const r=new Uint8Array(t);return void 0!==e&&r.fill(e),r},concat:function(t){const e=t.reduce(((t,e)=>t+e.length),0),r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r},isBuffer:function(t){return t instanceof Uint8Array}},Uint8Array.prototype.toString||(Uint8Array.prototype.toString=function(t){return"hex"===t?Array.from(this).map((t=>t.toString(16).padStart(2,"0"))).join(""):"binary"===t?Array.from(this).map((t=>String.fromCharCode(t))).join(""):(new TextDecoder).decode(this)}),Uint8Array.prototype.readUInt8||(Uint8Array.prototype.readUInt8=function(t){return this[t]}),Uint8Array.prototype.writeUInt8||(Uint8Array.prototype.writeUInt8=function(t,e){this[e]=255&t}),Uint8Array.prototype.readUInt32LE||(Uint8Array.prototype.readUInt32LE=function(t){return(this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24)>>>0}),Uint8Array.prototype.slice||(Uint8Array.prototype.slice=function(t,e){return new Uint8Array(Array.prototype.slice.call(this,t,e))}))),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).steem=e()}(this,(function(){"use strict";function t(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(r){if("default"!==r&&!(r in t)){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}))})),Object.freeze(t)}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}var i,o={exports:{}},a="object"==typeof Reflect?Reflect:null,s=a&&"function"==typeof a.apply?a.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var f=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}o.exports=u,o.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}v(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&v(t,"error",e,r)}(t,i,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function d(t,e,r,n){var i,o,a,s;if(h(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),void 0===a)a=o[e]=r,++t._eventsCount;else if("function"==typeof a?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=l(t))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=p.bind(n);return i.listener=r,n.wrapFn=i,i}function g(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):m(i,i.length)}function y(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function v(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||f(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||f(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return l(this)},u.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var f=i[t];if(void 0===f)return!1;if("function"==typeof f)s(f,this,e);else{var u=f.length,c=m(f,u);for(r=0;r<u;++r)s(c[r],this,e)}return!0},u.prototype.addListener=function(t,e){return d(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return d(this,t,e,!0)},u.prototype.once=function(t,e){return h(e),this.on(t,b(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return h(e),this.prependListener(t,b(this,t,e)),this},u.prototype.removeListener=function(t,e){var r,n,i,o,a;if(h(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,a||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},u.prototype.listeners=function(t){return g(this,t,!0)},u.prototype.rawListeners=function(t){return g(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):y.call(t,e)},u.prototype.listenerCount=y,u.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};var _=o.exports,w={exports:{}};!function(t){t.exports=function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var f="function"==typeof _dereq_&&_dereq_;if(!s&&f)return f(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};e[a][0].call(c.exports,(function(t){var r=e[a][1][t];return i(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){e.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},{}],2:[function(t,e,r){var n;try{throw new Error}catch(t){n=t}var i=t("./schedule"),o=t("./queue");function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function s(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function f(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function u(t){this._normalQueue._pushOne(t),this._queueTick()}function c(t){for(;t.length()>0;)h(t)}function h(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},a.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")}},a.prototype.invokeLater=s,a.prototype.invoke=f,a.prototype.settlePromises=u,a.prototype._drainQueues=function(){c(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,c(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},e.exports=a,e.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(t,e,r){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){50397184&this._bitField||this._resolveCallback(e.target)},f=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 u=r(o),c=new t(e);c._propagateFrom(this,1);var h=this._target();if(c._setBoundTo(u),u instanceof t){var l={promiseRejectionQueued:!1,promise:c,target:h,bindingPromise:u};h._then(e,a,void 0,c,l),u._then(s,f,void 0,c,l),c._setOnCancel(u)}else c._resolveCallback(h);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return!(2097152&~this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(t){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=t("./promise")();o.noConflict=i,e.exports=o},{"./promise":22}],5:[function(t,e,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var r,n=t("./util"),i=n.canEvaluate;function o(t,r){var i;if(null!=t&&(i=t[r]),"function"!=typeof i){var o="Object "+n.classString(t)+" has no method '"+n.toString(r)+"'";throw new e.TypeError(o)}return i}function a(t){return o(t,this.pop()).apply(t,this)}function s(t){return t[this]}function f(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}n.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(a,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=f;else if(i){var n=r(t);e=null!==n?n:s}else e=s;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,f=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(),f.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),f.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),f.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){e.exports=function(e){var r=t("./util"),n=t("./es5").keys,i=r.tryCatch,o=r.errorObj;function a(t,a,s){return function(f){var u=s._boundValue();t:for(var c=0;c<t.length;++c){var h=t[c];if(h===Error||null!=h&&h.prototype instanceof Error){if(f instanceof h)return i(a).call(u,f)}else if("function"==typeof h){var l=i(h).call(u,f);if(l===o)return l;if(l)return i(a).call(u,f)}else if(r.isObject(f)){for(var d=n(h),p=0;p<d.length;++p){var b=d[p];if(h[b]!=f[b])continue t}return i(a).call(u,f)}}return e}}return a}},{"./es5":13,"./util":36}],8:[function(t,e,r){e.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(e)return new n}function o(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,i=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,f=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=i,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=f,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=o,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,e,r){e.exports=function(e,r,n,i){var o,a,s,f,u=e._async,c=t("./errors").Warning,h=t("./util"),l=t("./es5"),d=h.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,b=/\((?:timers\.js):\d+:\d+\)/,g=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,v=!1,_=!(0==h.env("BLUEBIRD_DEBUG")),w=!(0==h.env("BLUEBIRD_WARNINGS")||!_&&!h.env("BLUEBIRD_WARNINGS")),E=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!_&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),S=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var t=[];function r(){for(var e=0;e<t.length;++e)t[e]._notifyUnhandledRejection();n()}function n(){t.length=0}f=function(e){t.push(e),setTimeout(r,1)},l.defineProperty(e,"_unhandledRejectionCheck",{value:r}),l.defineProperty(e,"_unhandledRejectionClear",{value:n})}(),e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),f(this))},e.prototype._notifyUnhandledRejectionIsHandled=function(){tt("rejectionHandled",o,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),tt("unhandledRejection",a,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,r){return K(t,e,r||this)},e.onPossiblyUnhandledRejection=function(t){var r=e._getContext();a=h.contextBind(r,t)},e.onUnhandledRejectionHandled=function(t){var r=e._getContext();o=h.contextBind(r,t)};var A=function(){};e.longStackTraces=function(){if(u.haveItemsQueued()&&!ct.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ct.longStackTraces&&nt()){var t=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace,i=e.prototype._dereferenceTrace;ct.longStackTraces=!0,A=function(){if(u.haveItemsQueued()&&!ct.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=n,e.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ct.longStackTraces=!1},e.prototype._captureStackTrace=q,e.prototype._attachExtraTrace=z,e.prototype._dereferenceTrace=H,r.activateLongStackTraces()}},e.hasLongStackTraces=function(){return ct.longStackTraces&&nt()};var M={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},k=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return l.defineProperty(n,"promise",{value:r.promise}),l.defineProperty(n,"reason",{value:r.reason}),t(M[e],n)}}return"function"==typeof Event?(e=new Event("CustomEvent"),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,l.defineProperty(n,"promise",{value:r.promise}),l.defineProperty(n,"reason",{value:r.reason}),t(M[e],n)}):((e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(M[e],n)})}catch(t){}return function(){return!1}}(),T=h.isNode?function(){return process.emit.apply(process,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function B(t,e){return{promise:e}}var x={promiseCreated:B,promiseFulfilled:B,promiseRejected:B,promiseResolved:B,promiseCancelled:B,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:B},O=function(t){var e=!1;try{e=T.apply(null,arguments)}catch(t){u.throwLater(t),e=!0}var r=!1;try{r=k(t,x[t].apply(null,arguments))}catch(t){u.throwLater(t),r=!0}return r||e};function j(){return!1}function R(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: "+h.toString(t));n._attachCancellationCallback(t)}))}catch(t){return t}}function I(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function P(){return this._onCancelField}function C(t){this._onCancelField=t}function L(){this._cancellationParent=void 0,this._onCancelField=void 0}function N(t,e){if(1&e){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}2&e&&t._isBound()&&this._setBoundTo(t._boundTo)}function U(t,e){2&e&&t._isBound()&&this._setBoundTo(t._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&A()),"warnings"in t){var r=t.warnings;ct.warnings=!!r,S=ct.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(S=!!r.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ct.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=L,e.prototype._propagateFrom=N,e.prototype._onCancel=P,e.prototype._setOnCancel=C,e.prototype._attachCancellationCallback=I,e.prototype._execute=R,F=N,ct.cancellation=!0}if("monitoring"in t&&(t.monitoring&&!ct.monitoring?(ct.monitoring=!0,e.prototype._fireEvent=O):!t.monitoring&&ct.monitoring&&(ct.monitoring=!1,e.prototype._fireEvent=j)),"asyncHooks"in t&&h.nodeSupportsAsyncResource){var o=ct.asyncHooks,a=!!t.asyncHooks;o!==a&&(ct.asyncHooks=a,a?n():i())}return e},e.prototype._fireEvent=j,e.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var F=U;function D(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function q(){this._trace=new ft(this._peekContext())}function z(t,e){if(d(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=Y(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function H(){this._trace=void 0}function V(t,e,r,n,i){if(void 0===t&&null!==e&&S){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),f=J(s),u=f.length-1;u>=0;--u){var c=f[u];if(!b.test(c)){var h=c.match(g);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(f.length>0){var l=f[0];for(u=0;u<s.length;++u)if(s[u]===l){u>0&&(a="\n"+s[u-1]);break}}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(d,!0,e)}}function W(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),K(r)}function K(t,r,n){if(ct.warnings){var i,o=new c(t);if(r)n._attachExtraTrace(o);else if(ct.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var a=Y(o);o.stack=a.message+"\n"+a.stack.join("\n")}O("warning",o)||Q(o,"",!0)}}function $(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 G(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 Z(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(s=a;s>=0;--s){var f=n[s];if(e[i]!==f)break;e.pop(),i--}e=n}}function J(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||y.test(n),o=i&&it(n);i&&!o&&(v&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function X(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||y.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function Y(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?X(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:J(e)}}function Q(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var i=t.stack;n=e+m(i,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function tt(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){u.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||i||Q(r,"Unhandled rejection "):O(t,n)}function et(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():h.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+rt(e)+">, no stack trace)"}function rt(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function nt(){return"function"==typeof ut}var it=function(){return!1},ot=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function at(t){var e=t.match(ot);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function st(t,e){if(nt()){for(var r,n,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),a=-1,s=-1,f=0;f<i.length;++f)if(u=at(i[f])){r=u.fileName,a=u.line;break}for(f=0;f<o.length;++f){var u;if(u=at(o[f])){n=u.fileName,s=u.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(it=function(t){if(p.test(t))return!0;var e=at(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function ft(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ut(this,ft),e>32&&this.uncycle()}h.inherits(ft,Error),r.CapturedTrace=ft,ft.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;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var a=r[e[n].stack];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var f=s._length+1,u=n-2;u>=0;--u)e[u]._length=f,f++;return}}}},ft.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Y(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(J(i.stack.split("\n"))),i=i._parent;Z(n),G(n),h.notEnumerableProp(t,"stack",$(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var ut=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():et(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=t,m=e;var r=Error.captureStackTrace;return it=function(t){return p.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=e,v=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=t,m=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6}):(m=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?et(e):e.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},h.isNode&&process.stderr.isTTY?s=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ct={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return E&&e.longStackTraces(),{asyncHooks:function(){return ct.asyncHooks},longStackTraces:function(){return ct.longStackTraces},warnings:function(){return ct.warnings},cancellation:function(){return ct.cancellation},monitoring:function(){return ct.monitoring},propagateFromFunction:function(){return F},boundValueFunction:function(){return D},checkForgottenReturns:V,setBounds:st,warn:K,deprecated:W,CapturedTrace:ft,fireDomEvent:k,fireGlobalEvent:T}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,r){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){e.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}function o(t,n){return r(t,n,e,e)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=o}},{}],12:[function(t,e,r){var n,i,o=t("./es5"),a=o.freeze,s=t("./util"),f=s.inherits,u=s.notEnumerableProp;function c(t,e){function r(n){if(!(this instanceof r))return new r(n);u(this,"message","string"==typeof n?n:e),u(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return f(r,Error),r}var h=c("Warning","warning"),l=c("CancellationError","cancellation error"),d=c("TimeoutError","timeout error"),p=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var b="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<b.length;++g)"function"==typeof Array.prototype[b[g]]&&(p.prototype[b[g]]=Array.prototype[b[g]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);u(this,"name","OperationalError"),u(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(u(this,"message",t.message),u(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+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];e+=(n=i.join("\n"))+"\n"}return y--,e},f(m,Error);var v=Error.__BluebirdErrorTypes__;v||(v=a({CancellationError:l,TimeoutError:d,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:v,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:v.CancellationError,OperationalError:v.OperationalError,TimeoutError:v.TimeoutError,AggregateError:v.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){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},f=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},c=function(t){return t},h=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},l=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:l,keys:s,names:s,defineProperty:u,getDescriptor:f,freeze:c,getPrototypeOf:h,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){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){e.exports=function(e,r,n){var i=t("./util"),o=e.CancellationError,a=i.errorObj,s=t("./catch_filter")(n);function f(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function u(t){this.finallyHandler=t}function c(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function h(){return d.call(this,this.promise._target()._settledValue())}function l(t){if(!c(this,t))return a.e=t,a}function d(t){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),t);if(f===n)return f;if(void 0!==f){i._setReturnedNonUndefined();var d=r(f,i);if(d instanceof e){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),a.e=p,a}d.isPending()&&d._attachCancellationCallback(new u(this))}return d._then(h,l,void 0,this,void 0)}}}return i.isRejected()?(c(this),a.e=t,a):(c(this),t)}return f.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){c(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new f(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,d,d)},e.prototype.tap=function(t){return this._passThrough(t,1,d)},e.prototype.tapCatch=function(t){var r=arguments.length;if(1===r)return this._passThrough(t,1,void 0,d);var n,o=new Array(r-1),a=0;for(n=0;n<r-1;++n){var f=arguments[n];if(!i.isObject(f))return e.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(f)));o[a++]=f}o.length=a;var u=arguments[n];return this._passThrough(s(o,u,this),1,void 0,d)},f}},{"./catch_filter":7,"./util":36}],16:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./errors").TypeError,f=t("./util"),u=f.errorObj,c=f.tryCatch,h=[];function l(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=c(r[o])(t);if(n._popContext(),a===u){n._pushContext();var s=e.reject(u.e);return n._popContext(),s}var f=i(a,n);if(f instanceof e)return f}return null}function d(t,r,i,o){if(a.cancellation()){var s=new e(n),f=this._finallyPromise=new e(n);this._promise=s.lastly((function(){return f})),s._captureStackTrace(),s._setOnCancel(this)}else(this._promise=new e(n))._captureStackTrace();this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}f.inherits(d,o),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},d.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=c(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},d.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=c(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(t){var r=this._promise;if(t===u)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof e||null!==(o=l(o,this._yieldHandlers,this._promise))){var a=(o=o._target())._bitField;50397184&a?33554432&a?e._async.invoke(this._promiseFulfilled,this,o._value()):16777216&a?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},e.coroutine=function(t,e){if("function"!=typeof t)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=d,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 s("expecting a function but got "+f.classString(t));h.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 d(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){e.exports=function(e,r,n,i,o){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj,e.join=function(){var t,e=arguments.length-1;e>0&&"function"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var i=new r(n).promise();return void 0!==t?i.spread(t):i}}},{"./util":36}],18:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=s.tryCatch,u=s.errorObj,c=e._async;function h(t,r,n,i){this.constructor$(t),this._promise._captureStackTrace();var a=e._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),s.isArray(t))for(var f=0;f<t.length;++f){var u=t[f];u instanceof e&&u.suppressUnhandledRejections()}}function l(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+s.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 "+s.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(i.concurrency)));a=i.concurrency}return new h(t,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(h,r),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var h=this._promise,l=this._callback,d=h._boundValue();h._pushContext();var p=f(l).call(d,t,r,o),b=h._popContext();if(a.checkForgottenReturns(p,b,null!==s?"Promise.filter":"Promise.map",h),p===u)return this._reject(p.e),!0;var g=i(p,this._promise);if(g instanceof e){var y=(g=g._target())._bitField;if(!(50397184&y))return c>=1&&this._inFlight++,n[r]=g,g._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(g._reason()),!0):(this._cancel(),!0);p=g._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.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)}},h.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)},h.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return l(this,t,e,null)},e.map=function(t,e,r,n){return l(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){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,f=new e(r);if(f._captureStackTrace(),f._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];n=a.isArray(u)?s(t).apply(c,u):s(t).call(c,u)}else n=s(t)();var h=f._popContext();return o.checkForgottenReturns(n,h,"Promise.try",f),f._resolveFromSyncValue(n),f},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){var n=t("./util"),i=n.maybeWrapAsError,o=t("./errors").OperationalError,a=t("./es5");function s(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}var f=/^(?:name|message|stack|cause)$/;function u(t){var e;if(s(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=a.keys(t),i=0;i<r.length;++i){var u=r[i];f.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}function c(t,e){return function(r,n){if(null!==t){if(r){var o=u(i(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}}}e.exports=c},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){e.exports=function(e){var r=t("./util"),n=e._async,i=r.tryCatch,o=r.errorObj;function a(t,e){var a=this;if(!r.isArray(t))return s.call(a,t,e);var f=i(e).apply(a._boundValue(),[null].concat(t));f===o&&n.throwLater(f.e)}function s(t,e){var r=this._boundValue(),a=void 0===t?i(e).call(r,null):i(e).call(r,null,t);a===o&&n.throwLater(a.e)}function f(t,e){var r=this;if(!t){var a=new Error(t+"");a.cause=t,t=a}var s=i(e).call(r._boundValue(),t);s===o&&n.throwLater(s.e)}e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var r=s;void 0!==e&&Object(e).spread&&(r=a),this._then(r,f,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,r){e.exports=function(){var r=function(){return new _("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new L.PromiseInspection(this._target())},i=function(t){return L.reject(new _(t))};function o(){}var a={},s=t("./util");s.setReflectHandler(n);var f=function(){var t=process.domain;return void 0===t?null:t},u=function(){return null},c=function(){return{domain:f(),async:null}},h=s.isNode&&s.nodeSupportsAsyncResource?t("async_hooks").AsyncResource:null,l=function(){return{domain:f(),async:new h("Bluebird::Promise")}},d=s.isNode?c:u;s.notEnumerableProp(L,"_getContext",d);var p=function(){d=l,s.notEnumerableProp(L,"_getContext",l)},b=function(){d=c,s.notEnumerableProp(L,"_getContext",c)},g=t("./es5"),y=t("./async"),m=new y;g.defineProperty(L,"_async",{value:m});var v=t("./errors"),_=L.TypeError=v.TypeError;L.RangeError=v.RangeError;var w=L.CancellationError=v.CancellationError;L.TimeoutError=v.TimeoutError,L.OperationalError=v.OperationalError,L.RejectionError=v.OperationalError,L.AggregateError=v.AggregateError;var E=function(){},S={},A={},M=t("./thenables")(L,E),k=t("./promise_array")(L,E,M,i,o),T=t("./context")(L),B=T.create,x=t("./debuggability")(L,T,p,b);x.CapturedTrace;var O=t("./finally")(L,M,A),j=t("./catch_filter")(A),R=t("./nodeback"),I=s.errorObj,P=s.tryCatch;function C(t,e){if(null==t||t.constructor!==L)throw new _("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new _("expecting a function but got "+s.classString(e))}function L(t){t!==E&&C(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function N(t){this.promise._resolveCallback(t)}function U(t){this.promise._rejectCallback(t,!1)}function F(t){var e=new L(E);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return L.prototype.toString=function(){return"[object Promise]"},L.prototype.caught=L.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),o=0;for(r=0;r<e-1;++r){var a=arguments[r];if(!s.isObject(a))return i("Catch statement predicate: expecting an object but got "+s.classString(a));n[o++]=a}if(n.length=o,"function"!=typeof(t=arguments[r]))throw new _("The last argument to .catch() must be a function, got "+s.toString(t));return this.then(void 0,j(n,t,this))}return this.then(void 0,t)},L.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},L.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+s.classString(t);arguments.length>1&&(r+=", "+s.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},L.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},L.prototype.spread=function(t){return"function"!=typeof t?i("expecting a function but got "+s.classString(t)):this.all()._then(t,void 0,void 0,S,void 0)},L.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},L.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},L.prototype.error=function(t){return this.caught(s.originatesFromRejection,t)},L.getNewLibraryCopy=e.exports,L.is=function(t){return t instanceof L},L.fromNode=L.fromCallback=function(t){var e=new L(E);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=P(t)(R(e,r));return n===I&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},L.all=function(t){return new k(t).promise()},L.cast=function(t){var e=M(t);return e instanceof L||((e=new L(E))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},L.resolve=L.fulfilled=L.cast,L.reject=L.rejected=function(t){var e=new L(E);return e._captureStackTrace(),e._rejectCallback(t,!0),e},L.setScheduler=function(t){if("function"!=typeof t)throw new _("expecting a function but got "+s.classString(t));return m.setScheduler(t)},L.prototype._then=function(t,e,r,n,i){var o=void 0!==i,a=o?i:new L(E),f=this._target(),u=f._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&u?this._boundValue():f===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c=d();if(50397184&u){var h,l,p=f._settlePromiseCtx;33554432&u?(l=f._rejectionHandler0,h=t):16777216&u?(l=f._fulfillmentHandler0,h=e,f._unsetRejectionIsUnhandled()):(p=f._settlePromiseLateCancellationObserver,l=new w("late cancellation observer"),f._attachExtraTrace(l),h=e),m.invoke(p,f,{handler:s.contextBind(c,h),promise:a,receiver:n,value:l})}else f._addCallbacks(t,e,a,n,c);return a},L.prototype._length=function(){return 65535&this._bitField},L.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},L.prototype._isFollowing=function(){return!(67108864&~this._bitField)},L.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},L.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},L.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},L.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},L.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},L.prototype._isFinal=function(){return(4194304&this._bitField)>0},L.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},L.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},L.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},L.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},L.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},L.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},L.prototype._promiseAt=function(t){return this[4*t-4+2]},L.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},L.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},L.prototype._boundValue=function(){},L.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,r,n,i,null)},L.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=a),this._addCallbacks(r,n,i,o,null)},L.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=s.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=s.contextBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=s.contextBind(i,t)),"function"==typeof e&&(this[a+1]=s.contextBind(i,e))}return this._setLength(o+1),o},L.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},L.prototype._resolveCallback=function(t,e){if(!(117506048&this._bitField)){if(t===this)return this._rejectCallback(r(),!1);var n=M(t,this);if(!(n instanceof L))return this._fulfill(t);e&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var a=new w("late cancellation observer");i._attachExtraTrace(a),this._reject(a)}else{var s=this._length();s>0&&i._migrateCallback0(this);for(var f=1;f<s;++f)i._migrateCallbackAt(this,f);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},L.prototype._rejectCallback=function(t,e,r){var n=s.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+s.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},L.prototype._resolveFromExecutor=function(t){if(t!==E){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)}},L.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),e===S?r&&"number"==typeof r.length?o=P(t).apply(this._boundValue(),r):(o=I).e=new _("cannot .spread() a non-array: "+s.classString(r)):o=P(t).call(e,r);var a=n._popContext();65536&(i=n._bitField)||(o===A?n._reject(r):o===I?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},L.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},L.prototype._followee=function(){return this._rejectionHandler0},L.prototype._setFollowee=function(t){this._rejectionHandler0=t},L.prototype._settlePromise=function(t,e,r,i){var a=t instanceof L,s=this._bitField,f=!!(134217728&s);65536&s?(a&&t._invokeInternalOnCancel(),r instanceof O&&r.isFinallyHandler()?(r.cancelPromise=t,P(e).call(r,i)===I&&t._reject(I.e)):e===n?t._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(t):a||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?a?(f&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof o?r._isResolved()||(33554432&s?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(f&&t._setAsyncGuaranteed(),33554432&s?t._fulfill(i):t._reject(i))},L.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof L?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof L&&r._reject(i)},L.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},L.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)},L.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},L.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(134217728&e?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},L.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return m.fatalError(t,s.isNode);(65535&e)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},L.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)}},L.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)}},L.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(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()},L.prototype._settledValue=function(){var t=this._bitField;return 33554432&t?this._rejectionHandler0:16777216&t?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&g.defineProperty(L.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),L.defer=L.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new L(E),resolve:N,reject:U}},s.notEnumerableProp(L,"_makeSelfResolutionError",r),t("./method")(L,E,M,i,x),t("./bind")(L,E,M,x),t("./cancel")(L,k,i,x),t("./direct_resolve")(L),t("./synchronous_inspection")(L),t("./join")(L,k,M,E,m),L.Promise=L,L.version="3.7.2",t("./call_get.js")(L),t("./generators.js")(L,i,E,M,o,x),t("./map.js")(L,k,i,M,E,x),t("./nodeify.js")(L),t("./promisify.js")(L,E),t("./props.js")(L,k,M,i),t("./race.js")(L,E,M,i),t("./reduce.js")(L,k,i,M,E,x),t("./settle.js")(L,k,x),t("./some.js")(L,k,i),t("./timers.js")(L,E,x),t("./using.js")(L,i,M,B,E,x),t("./any.js")(L),t("./each.js")(L,E),t("./filter.js")(L,E),s.toFastProperties(L),s.toFastProperties(L.prototype),F({a:1}),F({b:2}),F({c:3}),F(1),F((function(){})),F(void 0),F(!1),F(new L(E)),x.setBounds(y.firstLineError,s.lastLineError),L}},{"./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,async_hooks:void 0}],23:[function(t,e,r){e.exports=function(e,r,n,i,o){var a=t("./util");function s(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}function f(t){var n=this._promise=new e(r);t instanceof e&&(n._propagateFrom(t,3),t.suppressUnhandledRejections()),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(f,o),f.prototype.length=function(){return this._length},f.prototype.promise=function(){return this._promise},f.prototype._init=function t(r,o){var f=n(this._values,this._promise);if(f instanceof e){var u=(f=f._target())._bitField;if(this._values=f,!(50397184&u))return this._promise._setAsyncGuaranteed(),f._then(t,this._reject,void 0,this,o);if(!(33554432&u))return 16777216&u?this._reject(f._reason()):this._cancel();f=f._value()}if(null!==(f=a.asArray(f)))0!==f.length?this._iterate(f):-5===o?this._resolveEmptyArray():this._resolve(s(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(f)).reason();this._promise._rejectCallback(c,!1)}},f.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 f=n(t[s],i);a=f instanceof e?(f=f._target())._bitField:null,o?null!==a&&f.suppressUnhandledRejections():null!==a?50397184&a?o=33554432&a?this._promiseFulfilled(f._value(),s):16777216&a?this._promiseRejected(f._reason(),s):this._promiseCancelled(s):(f._proxy(this,s),this._values[s]=f):o=this._promiseFulfilled(f,s)}o||i._setAsyncGuaranteed()},f.prototype._isResolved=function(){return null===this._values},f.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},f.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},f.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},f.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},f.prototype._promiseCancelled=function(){return this._cancel(),!0},f.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},f.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()}},f.prototype.shouldCopyValues=function(){return!0},f.prototype.getActualLength=function(t){return t},f}},{"./util":36}],24:[function(t,e,r){e.exports=function(e,r){var n={},i=t("./util"),o=t("./nodeback"),a=i.withAppended,s=i.maybeWrapAsError,f=i.canEvaluate,u=t("./errors").TypeError,c="Async",h={__isPromisified__:!0},l=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),d=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!l.test(t)}function b(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function g(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,h);return!!n&&b(n)}function y(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 u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function m(t,e,r,n){for(var o=i.inheritedDataKeys(t),a=[],s=0;s<o.length;++s){var f=o[s],u=t[f],c=n===d||d(f);"function"!=typeof u||b(u)||g(t,f,e)||!n(f,u,t,c)||a.push(f,u)}return y(a,e,r),a}var v,_=function(t){return t.replace(/([$])/,"\\$")};function w(t,f,u,c,h,l){var d=function(){return this}(),p=t;function b(){var i=f;f===n&&(i=this);var u=new e(r);u._captureStackTrace();var c="string"==typeof p&&this!==d?this[p]:t,h=o(u,l);try{c.apply(i,a(arguments,h))}catch(t){u._rejectCallback(s(t),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"==typeof p&&(t=c),i.notEnumerableProp(b,"__isPromisified__",!0),b}var E=f?v:w;function S(t,e,r,o,a){for(var s=new RegExp(_(e)+"$"),f=m(t,e,s,r),u=0,c=f.length;u<c;u+=2){var h=f[u],l=f[u+1],d=h+e;if(o===E)t[d]=E(h,n,h,l,e,a);else{var p=o(l,(function(){return E(h,n,h,l,e,a)}));i.notEnumerableProp(p,"__isPromisified__",!0),t[d]=p}}return i.toFastProperties(t),t}function A(t,e,r){return E(t,e,void 0,t,null,r)}e.promisify=function(t,e){if("function"!=typeof t)throw new u("expecting a function but got "+i.classString(t));if(b(t))return t;var r=A(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,p),r},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n=c);var o=e.filter;"function"!=typeof o&&(o=d);var a=e.promisifier;if("function"!=typeof a&&(a=E),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(t),f=0;f<s.length;++f){var h=t[s[f]];"constructor"!==s[f]&&i.isClass(h)&&(S(h.prototype,n,o,a,r),S(h,n,o,a,r))}return S(t,n,o,a,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){e.exports=function(e,r,n,i){var o,a=t("./util"),s=a.isObject,f=t("./es5");"function"==typeof Map&&(o=Map);var u=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),c=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],a=t[n];e.set(i,a)}return e};function h(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=u(t),r=!0;else{var n=f.keys(t),i=n.length;e=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];e[a]=t[s],e[a+i]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function l(t){var r,o=n(t);return s(o)?(r=o instanceof e?o._then(e.props,void 0,void 0,void 0,void 0):new h(o).promise(),o instanceof e&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(h,r),h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},h.prototype.shouldCopyValues=function(){return!1},h.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return l(this)},e.props=function(t){return l(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){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),this[this._front+e&this._capacity-1]=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,n(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,r){e.exports=function(e,r,n,i){var o=t("./util"),a=function(t){return t.then((function(e){return s(e,t)}))};function s(t,s){var f=n(t);if(f instanceof e)return a(f);if(null===(t=o.asArray(t)))return i("expecting an array or an iterable object but got "+o.classString(t));var u=new e(r);void 0!==s&&u._propagateFrom(s,3);for(var c=u._fulfill,h=u._reject,l=0,d=t.length;l<d;++l){var p=t[l];(void 0!==p||l in t)&&e.cast(p)._then(c,h,void 0,u,null)}return u}e.race=function(t){return s(t,void 0)},e.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=s.tryCatch;function u(t,r,n,i){this.constructor$(t);var a=e._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=e.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function h(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+s.classString(e)):new u(t,e,r,i).promise()}function l(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(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(t){var r,n=this.array,i=n._promise,o=f(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),t,this.index,this.length):o.call(i._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=r);var s=i._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}s.inherits(u,r),u.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},u.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},u.prototype._resultCancelled=function(t){if(t===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel())},u.prototype._iterate=function(t){var r,n;this._values=t;var i=t.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var a=t[o];a instanceof e&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var s={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,s,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},e.prototype.reduce=function(t,e){return h(this,t,e,null)},e.reduce=function(t,e,r,n){return h(t,e,r,n)}}},{"./util":36}],29:[function(t,r,n){var i,o=t("./util"),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var f=e.setImmediate,u=process.nextTick;i=o.isRecentNode?function(t){f.call(e,t)}:function(t){u.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var c=s.resolve();i=function(t){c.then(t)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:a:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){t.classList.toggle("foo"),r=!1})).observe(n,e);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(t,e),i()}}();r.exports=i},{"./util":36}],30:[function(t,e,r){e.exports=function(e,r,n){var i=e.PromiseInspection;function o(t){this.constructor$(t)}t("./util").inherits(o,r),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.allSettled=function(t){return new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){e.exports=function(e,r,n){var i=t("./util"),o=t("./errors").RangeError,a=t("./errors").AggregateError,s=i.isArray,f={};function u(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(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 u(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(u,r),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(t){this._howMany=t},u.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)},u.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(f),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==f&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(t){this._values.push(t)},u.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return c(t,e)},e.prototype.some=function(t){return c(this,t)},e._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(t,e,r){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!!(33554432&this._bitField)},o=e.prototype.isRejected=function(){return!!(16777216&this._bitField)},a=e.prototype.isPending=function(){return!(50397184&this._bitField)},s=e.prototype.isResolved=function(){return!!(50331648&this._bitField)};e.prototype.isCancelled=function(){return!!(8454144&this._bitField)},t.prototype.__isCancelled=function(){return!(65536&~this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return!!(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){e.exports=function(e,r){var n=t("./util"),i=n.errorObj,o=n.isObject;function a(t,n){if(o(t)){if(t instanceof e)return t;var a=f(t);if(a===i){n&&n._pushContext();var s=e.reject(a.e);return n&&n._popContext(),s}if("function"==typeof a)return c(t)?(s=new e(r),t._then(s._fulfill,s._reject,void 0,s,null),s):h(t,a,n)}return t}function s(t){return t.then}function f(t){try{return s(t)}catch(t){return i.e=t,i}}var u={}.hasOwnProperty;function c(t){try{return u.call(t,"_promise0")}catch(t){return!1}}function h(t,o,a){var s=new e(r),f=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,c=n.tryCatch(o).call(t,h,l);function h(t){s&&(s._resolveCallback(t),s=null)}function l(t){s&&(s._rejectCallback(t,u,!0),s=null)}return u=!1,s&&c===i&&(s._rejectCallback(c.e,!0,!0),s=null),f}return a}},{"./util":36}],34:[function(t,e,r){e.exports=function(e,r,n){var i=t("./util"),o=e.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return f(+this).thenReturn(t)},f=e.delay=function(t,i){var o,f;return void 0!==i?(o=e.resolve(i)._then(s,null,null,t,void 0),n.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(r),f=setTimeout((function(){o._fulfill()}),+t),n.cancellation()&&o._setOnCancel(new a(f)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};e.prototype.delay=function(t){return f(t,this)};var u=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};function c(t){return clearTimeout(this.handle),t}function h(t){throw clearTimeout(this.handle),t}e.prototype.timeout=function(t,e){var r,i;t=+t;var o=new a(setTimeout((function(){r.isPending()&&u(r,e,i)}),t));return n.cancellation()?(i=this.then(),(r=i._then(c,h,void 0,o,void 0))._setOnCancel(o)):r=this._then(c,h,void 0,o,void 0),r}}},{"./util":36}],35:[function(t,e,r){e.exports=function(e,r,n,i,o,a){var s=t("./util"),f=t("./errors").TypeError,u=t("./util").inherits,c=s.errorObj,h=s.tryCatch,l={};function d(t){setTimeout((function(){throw t}),0)}function p(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function b(t,r){var i=0,a=t.length,s=new e(o);function f(){if(i>=a)return s._fulfill();var o=p(t[i++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(t){return d(t)}if(o instanceof e)return o._then(f,d,null,null,null)}f()}return f(),s}function g(t,e,r){this._data=t,this._promise=e,this._context=r}function y(t,e,r){this.constructor$(t,e,r)}function m(t){return g.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function v(t){this.length=t,this.promise=null,this[t-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():l},g.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==l?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},g.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},u(y,g),y.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},v.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,o=arguments[t-1];if("function"!=typeof o)return r("expecting a function but got "+s.classString(o));var f=!0;2===t&&Array.isArray(arguments[0])?(t=(i=arguments[0]).length,f=!1):(i=arguments,t--);for(var u=new v(t),l=0;l<t;++l){var d=i[l];if(g.isDisposer(d)){var p=d;(d=d.promise())._setDisposable(p)}else{var y=n(d);y instanceof e&&(d=y._then(m,null,null,{resources:u,index:l},void 0))}u[l]=d}var _=new Array(u.length);for(l=0;l<_.length;++l)_[l]=e.resolve(u[l]).reflect();var w=e.all(_).then((function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=h(o);var n=f?o.apply(void 0,t):o(t),i=E._popContext();return a.checkForgottenReturns(n,i,"Promise.using",E),n})),E=w.lastly((function(){var t=new e.PromiseInspection(w);return b(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=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new y(t,this,i());throw new f}}},{"./errors":12,"./util":36}],36:[function(t,r,n){var i,o=t("./es5"),a="undefined"==typeof navigator,s={e:{}},f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function u(){try{var t=i;return i=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function c(t){return i=t,u}var h=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function l(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function d(t){return"function"==typeof t||"object"==typeof t&&null!==t}function p(t){return l(t)?new Error(k(t)):t}function b(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 g(t,e,r){if(!o.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 y(t,e,r){if(l(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(t,e,n),t}function m(t){throw t}var v=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(o.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var a;try{a=r(t)}catch(t){return n}for(var s=0;s<a.length;++s){var f=a[s];if(!i[f]){i[f]=!0;var u=Object.getOwnPropertyDescriptor(t,f);null!=u&&null==u.get&&null==u.set&&n.push(f)}}t=o.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}}(),_=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=o.names(t.prototype),r=o.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=_.test(t+"")&&o.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var S=/^[a-z$_][a-z$_0-9]*$/i;function A(t){return S.test(t)}function M(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function k(t){try{return t+""}catch(t){return"[no string representation]"}}function T(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function B(t){try{y(t,"isOperational",!0)}catch(t){}}function x(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function O(t){return T(t)&&o.propertyIsWritable(t,"stack")}var j="stack"in new Error?function(t){return O(t)?t:new Error(k(t))}:function(t){if(O(t))return t;try{throw new Error(k(t))}catch(t){return t}};function R(t){return{}.toString.call(t)}function I(t,e,r){for(var n=o.names(t),i=0;i<n.length;++i){var a=n[i];if(r(a))try{o.defineProperty(e,a,o.getDescriptor(t,a))}catch(t){}}}var P=function(t){return o.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var C="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};P=function(t){return o.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?C(t):null}}var L,N="undefined"!=typeof process&&"[object process]"===R(process).toLowerCase(),U="undefined"!=typeof process&&void 0!==process.env;function F(t){return U?process.env[t]:void 0}function D(){if("function"==typeof Promise)try{if("[object Promise]"===R(new Promise((function(){}))))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===L)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){var t=new Array(2).concat([].slice.call(arguments));return t[0]=n,t[1]=this,r.runInAsyncScope.apply(r,t)}}return e}var z={setReflectHandler:function(t){L=t},isClass:w,isIdentifier:A,inheritedDataKeys:v,getDataPropertyOrDefault:g,thrower:m,isArray:o.isArray,asArray:P,notEnumerableProp:y,isPrimitive:l,isObject:d,isError:T,canEvaluate:a,errorObj:s,tryCatch:c,inherits:h,withAppended:b,maybeWrapAsError:p,toFastProperties:E,filledRange:M,toString:k,canAttachTrace:O,ensureErrorObject:j,originatesFromRejection:x,markAsOriginatingFromRejection:B,classString:R,copyDescriptors:I,isNode:N,hasEnvVariables:U,env:F,global:f,getNativePromise:D,contextBind:q};z.isRecentNode=z.isNode&&function(){var t;return process.versions&&process.versions.node?t=process.versions.node.split(".").map(Number):process.version&&(t=process.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),z.nodeSupportsAsyncResource=z.isNode&&function(){var e=!1;try{e="function"==typeof t("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(t){e=!1}return e}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(t){z.lastLineError=t}r.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}(w);var E=r(w.exports);class S{constructor(){this.config={}}get(t){return this.config[t]}getBoolean(t){return!!this.get(t)}getNumber(t){const e=this.get(t);return"number"==typeof e?e:parseFloat(e)}getString(t){const e=this.get(t);return"string"==typeof e?e:String(e)}set(t,e){this.config[t]=e}all(){return{...this.config}}}const A=new S;Object.entries({address_prefix:"STM",chain_id:"0000000000000000000000000000000000000000000000000000000000000000",node:"https://api.steemit.com",nodes:["https://api.steemit.com"],uri:"https://api.steemit.com",websocket:"wss://api.steemit.com"}).forEach((([t,e])=>A.set(t,e)));const M=()=>A,k=t=>{Object.entries(t).forEach((([t,e])=>A.set(t,e)))},T=k;var B=Object.freeze({__proto__:null,Config:S,getConfig:M,setConfig:k,setOptions:T});const x=process.env.DEBUG||"",O=x.includes("steem-js"),j=x.split(",").map((t=>t.trim()));function R(t){const e=M().get("debug");if(!0===e)return!0;if(!1===e)return!1;if(!O)return!1;if(!t)return x.includes("steem-js")&&!x.includes("steem-js:");const r=`steem-js:${t}`;return j.some((t=>t===r||"steem-js:*"===t))}const I={log(t,...e){if(R(t)){const r=t?`[steem-js:${t}]`:"[steem-js]";console.log(r,...e)}},transaction(...t){this.log("transaction",...t)},signature(...t){this.log("signature",...t)},warn(...t){(R()||!1!==M().get("debug_warnings"))&&console.warn("[steem-js]",...t)},error(...t){console.error("[steem-js]",...t)},isEnabled:t=>R(t)};var P=Object.freeze({__proto__:null,debug:I});const C=t=>new Promise((e=>setTimeout(e,t))),L=async(t,e=3,r=1e3)=>{try{return await t()}catch(n){if(0===e)throw n;return await C(r),L(t,e-1,r)}},N=t=>t.replace(/_([a-z])/g,(t=>t[1].toUpperCase()));var U=Object.freeze({__proto__:null,camelCase:N,chunk:(t,e)=>{const r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r},debug:I,flatten:t=>t.reduce(((t,e)=>t.concat(e)),[]),isValidAddress:t=>/^[1-5a-z]{1,12}$/.test(t),isValidAmount:t=>/^\d+\.\d{3}\s(STEEM|SBD)$/.test(t),isValidPermlink:t=>/^[a-z0-9-]+$/.test(t),retry:L,sleep:C,unique:t=>Array.from(new Set(t))}),F={},D="6.6.1",q={},z={exports:{}},H=n(Object.freeze({__proto__:null,default:{}}));!function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function i(t,e,r){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:H.Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=f>>>26,h=67108863&f,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],f=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?u[6-f.length]+f+n:f+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],d=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?b+n:u[l-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},i.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,f="le"===e,u=new t(o),c=this.clone();if(f){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[o-s-1]=a}return u},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},i.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},i.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},i.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,a=t.words,s=e.words,f=r.words,u=0,c=0|a[0],h=8191&c,l=c>>>13,d=0|a[1],p=8191&d,b=d>>>13,g=0|a[2],y=8191&g,m=g>>>13,v=0|a[3],_=8191&v,w=v>>>13,E=0|a[4],S=8191&E,A=E>>>13,M=0|a[5],k=8191&M,T=M>>>13,B=0|a[6],x=8191&B,O=B>>>13,j=0|a[7],R=8191&j,I=j>>>13,P=0|a[8],C=8191&P,L=P>>>13,N=0|a[9],U=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],$=8191&K,G=K>>>13,Z=0|s[3],J=8191&Z,X=Z>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ft=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,lt=ct>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0;var mt=(u+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,$)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(u+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,X)|0;var _t=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(u+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Et=(u+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(I,q)|0,o=Math.imul(I,z),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var St=(u+(n=n+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,ut)|0)+Math.imul(l,ft)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;u=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0;var Mt=(u+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,ut)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,G))+Math.imul(F,$)|0,o=Math.imul(F,G),n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Tt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,X))+Math.imul(F,J)|0,o=Math.imul(F,X),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0;var Bt=(u+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var xt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,lt)|0;var Ot=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ut)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var jt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,ut))+Math.imul(F,ft)|0,o=Math.imul(F,ut),n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,lt)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(u+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,bt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,bt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,f[0]=gt,f[1]=yt,f[2]=mt,f[3]=vt,f[4]=_t,f[5]=wt,f[6]=Et,f[7]=St,f[8]=At,f[9]=Mt,f[10]=kt,f[11]=Tt,f[12]=Bt,f[13]=xt,f[14]=Ot,f[15]=jt,f[16]=Rt,f[17]=It,f[18]=Pt,0!==u&&(f[19]=u,r.length++),r};function p(t,e,r){return(new b).mulp(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(d=l),i.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?l(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,f=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=f;u++){var c=o-u,h=(0|t.words[c])*(0|e.words[u]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=i.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},b.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},b.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,f=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var h=f,l=u,d=0;d<a;d++){var p=r[c+d],b=n[c+d],g=r[c+d+a],y=n[c+d+a],m=h*g-l*y;y=h*y+l*g,g=m,r[c+d]=p+g,n[c+d]=b+y,r[c+d+a]=p-g,n[c+d+a]=b-y,d!==s&&(m=f*h-u*l,l=f*l+u*h,h=m)}},b.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},b.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,n,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)n[a]=0;r(0===o),r(!(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},b.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),f=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,u,n),this.transform(a,o,s,f,n,i),this.transform(u,o,c,h,n,i);for(var d=0;d<n;d++){var p=s[d]*c[d]-f[d]*h[d];f[d]=s[d]*h[d]+f[d]*c[d],s[d]=p}return this.conjugate(s,f,n),this.transform(s,f,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),p(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this.length=0===t?1:this.length,this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,f=(0|this.words[e])-s<<n;this.words[e]=f|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,f=n;if(i-=a,i=Math.max(0,i),f){for(var u=0;u<a;u++)f.words[u]=this.words[u];f.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var f=(0|t.words[i])*e;s=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,f=n.length-o.length;if("mod"!==e){(s=new i(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(o,1,f);0===c.negative&&(n=c,s&&(s.words[f]=1));for(var h=f-1;h>=0;h--){var l=67108864*(0|n.words[o.length+h])+(0|n.words[o.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},i.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),a=new i(0),s=new i(0),f=new i(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;!(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(h)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;!(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(h)),s.iushrn(1),f.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(f)):(n.isub(e),s.isub(o),f.isub(a))}return{a:s,b:f,gcd:n.iushln(u)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new i(1),s=new i(0),f=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;!(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var h=0,l=1;!(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new E(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(m,y),m.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},m.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(v,y),n(_,y),n(w,y),w.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new m;else if("p224"===t)e=new v;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return g[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var h=this.pow(c,o),l=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=a;0!==d.cmp(s);){for(var b=d,g=0;0!==b.cmp(s);g++)b=b.redSqr();r(g<p);var y=this.pow(h,new i(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],a=0,s=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=f-1;c>=0;c--){var h=u>>c&1;o!==r[0]&&(o=this.sqr(o)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}f=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new S(t)},n(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,e)}(z);var V=z.exports,W=K;function K(t,e){if(!t)throw new Error(e||"Assertion failed")}K.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var $={};!function(t){var e=t;function r(t){return 1===t.length?"0"+t:t}function n(t){for(var e="",n=0;n<t.length;n++)e+=r(t[n].toString(16));return e}e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},e.zero2=r,e.toHex=n,e.encode=function(t,e){return"hex"===e?n(t):t}}($),function(t){var e=t,r=V,n=W,i=$;e.assert=n,e.toArray=i.toArray,e.zero2=i.zero2,e.toHex=i.toHex,e.encode=i.encode,e.getNAF=function(t,e,r){var n,i=new Array(Math.max(t.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<e+1,a=t.clone();for(n=0;n<i.length;n++){var s,f=a.andln(o-1);a.isOdd()?(s=f>(o>>1)-1?(o>>1)-f:f,a.isubn(s)):s=0,i[n]=s,a.iushrn(1)}return i},e.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,f=t.andln(3)+i&3,u=e.andln(3)+o&3;3===f&&(f=-1),3===u&&(u=-1),a=1&f?3!==(n=t.andln(7)+i&7)&&5!==n||2!==u?f:-f:0,r[0].push(a),s=1&u?3!==(n=e.andln(7)+o&7)&&5!==n||2!==f?u:-u:0,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},e.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new r(t,"hex","le")}}(q);for(var G={exports:{}},Z={},J={exports:{}},X={exports:{}},Y={},Q={byteLength:function(t){var e=ot(t),r=e[0],n=e[1];return 3*(r+n)/4-n},toByteArray:function(t){var e,r,n=ot(t),i=n[0],o=n[1],a=new rt(function(t,e,r){return 3*(e+r)/4-r}(0,i,o)),s=0,f=o>0?i-4:i;for(r=0;r<f;r+=4)e=et[t.charCodeAt(r)]<<18|et[t.charCodeAt(r+1)]<<12|et[t.charCodeAt(r+2)]<<6|et[t.charCodeAt(r+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=et[t.charCodeAt(r)]<<2|et[t.charCodeAt(r+1)]>>4,a[s++]=255&e);1===o&&(e=et[t.charCodeAt(r)]<<10|et[t.charCodeAt(r+1)]<<4|et[t.charCodeAt(r+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,r=t.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(at(t,a,a+o>s?s:a+o));1===n?(e=t[r-1],i.push(tt[e>>2]+tt[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],i.push(tt[e>>10]+tt[e>>4&63]+tt[e<<2&63]+"="));return i.join("")}},tt=[],et=[],rt="undefined"!=typeof Uint8Array?Uint8Array:Array,nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=0;it<64;++it)tt[it]=nt[it],et[nt.charCodeAt(it)]=it;function ot(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function at(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(tt[(i=n)>>18&63]+tt[i>>12&63]+tt[i>>6&63]+tt[63&i]);return o.join("")}et["-".charCodeAt(0)]=62,et["_".charCodeAt(0)]=63;var st={read:function(t,e,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)},write:function(t,e,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+h>=1?l/f:l*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*f-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*b}};(function(t){const e=Q,r=st,n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},t.INSPECT_MAX_BYTES=50;const i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|d(t,e);let n=o(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);const i=function(t){if(a.isBuffer(t)){const e=0|l(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||G(t.length)?o(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),o(t<0?0:0|l(t))}function c(t){const e=t.length<0?0:0|l(t.length),r=o(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,a.prototype),n}function l(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){let 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))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function g(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),G(r=+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:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){let o,a=1,s=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,f/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===f)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+f>s&&(r=s-f),o=r;o>=0;o--){let r=!0;for(let n=0;n<f;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function m(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(G(n))return a;t[r+a]=n}return a}function v(t,e,r,n){return K(V(e,t.length-r),t,r,n)}function _(t,e,r,n){return K(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return K(W(e),t,r,n)}function E(t,e,r,n){return K(function(t,e){let r,n,i;const o=[];for(let 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}(e,t.length-r),t,r,n)}function S(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function A(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,f;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(f=(31&e)<<6|63&r,f>127&&(o=f));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(f=(15&e)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,f>65535&&f<1114112&&(o=f))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(t){const e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=M));return r}(n)}t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return s(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},a.allocUnsafe=function(t){return u(t)},a.allocUnsafeSlow=function(t){return u(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let 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(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=a.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if($(e,Uint8Array))i+e.length>n.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!a.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)b(this,e,e+1);return this},a.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},a.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},a.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,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(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);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(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const f=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r);for(let t=0;t<f;++t)if(u[t]!==c[t]){o=u[t],s=c[t];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return g(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)}const 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");let o=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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)}};const M=4096;function k(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function B(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Z[t[n]];return i}function x(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function O(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 j(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 R(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function I(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function P(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 C(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function L(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,8),r.write(t,e,n,i,52,8),n+8}a.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),a.prototype.readBigUInt64BE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++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||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;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 t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(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 t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),a.prototype.readBigInt64BE=J((function(t){q(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),a.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=J((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=J((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),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||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=J((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=J((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return L(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return L(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");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("Index out of range");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);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},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),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);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=a.isBuffer(t)?t:a.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const N={};function U(t,e,r){N[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function F(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function D(t,e,r,n,i,o){if(t>r||t<e){const r="bigint"==typeof e?"n":"";let n;throw n=0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`,new N.ERR_OUT_OF_RANGE("value",n,t)}!function(t,e,r){q(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||z(e,t.length-(r+1))}(n,i,o)}function q(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,r){if(Math.floor(t)!==t)throw q(t,r),new N.ERR_OUT_OF_RANGE("offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function V(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let 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=65536+(i-55296<<10|r-56320)}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 W(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function G(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}})(Y),function(t,e){var r=Y,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(X,X.exports);var ft=X.exports,ut=65536,ct=4294967295;var ht=ft.Buffer,lt=e.crypto||e.msCrypto;lt&<.getRandomValues?J.exports=function(t,e){if(t>ct)throw new RangeError("requested too many random bytes");var r=ht.allocUnsafe(t);if(t>0)if(t>ut)for(var n=0;n<t;n+=ut)lt.getRandomValues(r.slice(n,n+ut));else lt.getRandomValues(r);if("function"==typeof e)return process.nextTick((function(){e(null,r)}));return r}:J.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")};var dt=J.exports,pt={exports:{}};"function"==typeof Object.create?pt.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pt.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}};var bt=pt.exports,gt={}.toString,yt=Array.isArray||function(t){return"[object Array]"==gt.call(t)},mt=TypeError,vt=Object,_t=Error,wt=EvalError,Et=RangeError,St=ReferenceError,At=SyntaxError,Mt=URIError,kt=Math.abs,Tt=Math.floor,Bt=Math.max,xt=Math.min,Ot=Math.pow,jt=Math.round,Rt=Number.isNaN||function(t){return t!=t},It=Object.getOwnPropertyDescriptor;if(It)try{It([],"length")}catch(t){It=null}var Pt=It,Ct=Object.defineProperty||!1;if(Ct)try{Ct({},"a",{value:1})}catch(t){Ct=!1}var Lt,Nt,Ut,Ft,Dt,qt,zt,Ht,Vt,Wt,Kt,$t,Gt,Zt,Jt=Ct,Xt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0};function Yt(){return Ft?Ut:(Ft=1,Ut="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Qt(){return qt?Dt:(qt=1,Dt=vt.getPrototypeOf||null)}function te(){if(Wt)return Vt;Wt=1;var t=function(){if(Ht)return zt;Ht=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};return zt=function(n){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,a=function(t){for(var e=[],r=1,n=0;r<t.length;r+=1,n+=1)e[n]=t[r];return e}(arguments),s=e(0,i.length-a.length),f=[],u=0;u<s;u++)f[u]="$"+u;if(o=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(f,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var t=i.apply(this,r(a,arguments));return Object(t)===t?t:this}return i.apply(n,r(a,arguments))})),i.prototype){var c=function(){};c.prototype=i.prototype,o.prototype=new c,c.prototype=null}return o},zt}();return Vt=Function.prototype.bind||t}function ee(){return $t?Kt:($t=1,Kt=Function.prototype.call)}function re(){return Zt?Gt:(Zt=1,Gt=Function.prototype.apply)}var ne,ie="undefined"!=typeof Reflect&&Reflect&&Reflect.apply,oe=te(),ae=re(),se=ee(),fe=ie||oe.call(se,ae),ue=te(),ce=mt,he=ee(),le=fe,de=function(t){if(t.length<1||"function"!=typeof t[0])throw new ce("a function is required");return le(ue,he,t)},pe=de,be=Pt;try{ne=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var ge,ye,me,ve=!!ne&&be&&be(Object.prototype,"__proto__"),_e=Object,we=_e.getPrototypeOf,Ee=ve&&"function"==typeof ve.get?pe([ve.get]):"function"==typeof we&&function(t){return we(null==t?t:_e(t))},Se=Yt(),Ae=Qt(),Me=Ee,ke=Se?function(t){return Se(t)}:Ae?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return Ae(t)}:Me?function(t){return Me(t)}:null;function Te(){if(ye)return ge;ye=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=te();return ge=r.call(t,e)}var Be=vt,xe=_t,Oe=wt,je=Et,Re=St,Ie=At,Pe=mt,Ce=Mt,Le=kt,Ne=Tt,Ue=Bt,Fe=xt,De=Ot,qe=jt,ze=function(t){return Rt(t)||0===t?t:t<0?-1:1},He=Function,Ve=function(t){try{return He('"use strict"; return ('+t+").constructor;")()}catch(t){}},We=Pt,Ke=Jt,$e=function(){throw new Pe},Ge=We?function(){try{return $e}catch(t){try{return We(arguments,"callee").get}catch(t){return $e}}}():$e,Ze=function(){if(Nt)return Lt;Nt=1;var t="undefined"!=typeof Symbol&&Symbol,e=Xt;return Lt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}()(),Je=ke,Xe=Qt(),Ye=Yt(),Qe=re(),tr=ee(),er={},rr="undefined"!=typeof Uint8Array&&Je?Je(Uint8Array):me,nr={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?me:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?me:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&Je?Je([][Symbol.iterator]()):me,"%AsyncFromSyncIteratorPrototype%":me,"%AsyncFunction%":er,"%AsyncGenerator%":er,"%AsyncGeneratorFunction%":er,"%AsyncIteratorPrototype%":er,"%Atomics%":"undefined"==typeof Atomics?me:Atomics,"%BigInt%":"undefined"==typeof BigInt?me:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?me:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?me:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?me:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":xe,"%eval%":eval,"%EvalError%":Oe,"%Float16Array%":"undefined"==typeof Float16Array?me:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?me:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?me:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?me:FinalizationRegistry,"%Function%":He,"%GeneratorFunction%":er,"%Int8Array%":"undefined"==typeof Int8Array?me:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?me:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?me:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ze&&Je?Je(Je([][Symbol.iterator]())):me,"%JSON%":"object"==typeof JSON?JSON:me,"%Map%":"undefined"==typeof Map?me:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ze&&Je?Je((new Map)[Symbol.iterator]()):me,"%Math%":Math,"%Number%":Number,"%Object%":Be,"%Object.getOwnPropertyDescriptor%":We,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?me:Promise,"%Proxy%":"undefined"==typeof Proxy?me:Proxy,"%RangeError%":je,"%ReferenceError%":Re,"%Reflect%":"undefined"==typeof Reflect?me:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?me:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ze&&Je?Je((new Set)[Symbol.iterator]()):me,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?me:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&Je?Je(""[Symbol.iterator]()):me,"%Symbol%":Ze?Symbol:me,"%SyntaxError%":Ie,"%ThrowTypeError%":Ge,"%TypedArray%":rr,"%TypeError%":Pe,"%Uint8Array%":"undefined"==typeof Uint8Array?me:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?me:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?me:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?me:Uint32Array,"%URIError%":Ce,"%WeakMap%":"undefined"==typeof WeakMap?me:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?me:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?me:WeakSet,"%Function.prototype.call%":tr,"%Function.prototype.apply%":Qe,"%Object.defineProperty%":Ke,"%Object.getPrototypeOf%":Xe,"%Math.abs%":Le,"%Math.floor%":Ne,"%Math.max%":Ue,"%Math.min%":Fe,"%Math.pow%":De,"%Math.round%":qe,"%Math.sign%":ze,"%Reflect.getPrototypeOf%":Ye};if(Je)try{null.error}catch(t){var ir=Je(Je(t));nr["%Error.prototype%"]=ir}var or,ar,sr=function t(e){var r;if("%AsyncFunction%"===e)r=Ve("async function () {}");else if("%GeneratorFunction%"===e)r=Ve("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=Ve("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&Je&&(r=Je(i.prototype))}return nr[e]=r,r},fr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=te(),cr=Te(),hr=ur.call(tr,Array.prototype.concat),lr=ur.call(Qe,Array.prototype.splice),dr=ur.call(tr,String.prototype.replace),pr=ur.call(tr,String.prototype.slice),br=ur.call(tr,RegExp.prototype.exec),gr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yr=/\\(\\)?/g,mr=function(t,e){var r,n=t;if(cr(fr,n)&&(n="%"+(r=fr[n])[0]+"%"),cr(nr,n)){var i=nr[n];if(i===er&&(i=sr(n)),void 0===i&&!e)throw new Pe("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new Ie("intrinsic "+t+" does not exist!")},vr=function(t,e){if("string"!=typeof t||0===t.length)throw new Pe("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new Pe('"allowMissing" argument must be a boolean');if(null===br(/^%?[^%]*%?$/,t))throw new Ie("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=pr(t,0,1),r=pr(t,-1);if("%"===e&&"%"!==r)throw new Ie("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new Ie("invalid intrinsic syntax, expected opening `%`");var n=[];return dr(t,gr,(function(t,e,r,i){n[n.length]=r?dr(i,yr,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",i=mr("%"+n+"%",e),o=i.name,a=i.value,s=!1,f=i.alias;f&&(n=f[0],lr(r,hr([0,1],f)));for(var u=1,c=!0;u<r.length;u+=1){var h=r[u],l=pr(h,0,1),d=pr(h,-1);if(('"'===l||"'"===l||"`"===l||'"'===d||"'"===d||"`"===d)&&l!==d)throw new Ie("property names with quotes must have matching quotes");if("constructor"!==h&&c||(s=!0),cr(nr,o="%"+(n+="."+h)+"%"))a=nr[o];else if(null!=a){if(!(h in a)){if(!e)throw new Pe("base intrinsic for "+t+" exists, but the property is not available.");return}if(We&&u+1>=r.length){var p=We(a,h);a=(c=!!p)&&"get"in p&&!("originalValue"in p.get)?p.get:a[h]}else c=cr(a,h),a=a[h];c&&!s&&(nr[o]=a)}}return a},_r=vr,wr=de,Er=wr([_r("%String.prototype.indexOf%")]),Sr=function(t,e){var r=_r(t,!!e);return"function"==typeof r&&Er(t,".prototype.")>-1?wr([r]):r},Ar=Function.prototype.toString,Mr="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof Mr&&"function"==typeof Object.defineProperty)try{or=Object.defineProperty({},"length",{get:function(){throw ar}}),ar={},Mr((function(){throw 42}),null,or)}catch(t){t!==ar&&(Mr=null)}else Mr=null;var kr=/^\s*class\b/,Tr=function(t){try{var e=Ar.call(t);return kr.test(e)}catch(t){return!1}},Br=function(t){try{return!Tr(t)&&(Ar.call(t),!0)}catch(t){return!1}},xr=Object.prototype.toString,Or="function"==typeof Symbol&&!!Symbol.toStringTag,jr=!(0 in[,]),Rr=function(){return!1};if("object"==typeof document){var Ir=document.all;xr.call(Ir)===xr.call(document.all)&&(Rr=function(t){if((jr||!t)&&(void 0===t||"object"==typeof t))try{var e=xr.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}var Pr=Mr?function(t){if(Rr(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{Mr(t,null,or)}catch(t){if(t!==ar)return!1}return!Tr(t)&&Br(t)}:function(t){if(Rr(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(Or)return Br(t);if(Tr(t))return!1;var e=xr.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&Br(t)},Cr=Object.prototype.toString,Lr=Object.prototype.hasOwnProperty;var Nr=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ur="undefined"==typeof globalThis?e:globalThis,Fr={exports:{}},Dr=Jt,qr=At,zr=mt,Hr=Pt,Vr=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new zr("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new zr("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new zr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new zr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new zr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new zr("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],s=!!Hr&&Hr(t,e);if(Dr)Dr(t,e,{configurable:null===o&&s?s.configurable:!o,enumerable:null===n&&s?s.enumerable:!n,value:r,writable:null===i&&s?s.writable:!i});else{if(!a&&(n||i||o))throw new qr("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}},Wr=Jt,Kr=function(){return!!Wr};Kr.hasArrayLengthDefineBug=function(){if(!Wr)return null;try{return 1!==Wr([],"length",{value:1}).length}catch(t){return!0}};var $r=Kr,Gr=vr,Zr=Vr,Jr=$r(),Xr=Pt,Yr=mt,Qr=Gr("%Math.floor%"),tn=function(t,e){if("function"!=typeof t)throw new Yr("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||Qr(e)!==e)throw new Yr("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,i=!0;if("length"in t&&Xr){var o=Xr(t,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(i=!1)}return(n||i||!r)&&(Jr?Zr(t,"length",e,!0,!0):Zr(t,"length",e)),t},en=te(),rn=re(),nn=fe,on=function(){return nn(en,rn,arguments)};!function(t){var e=tn,r=Jt,n=de,i=on;t.exports=function(t){var r=n(arguments),i=t.length-(arguments.length-1);return e(r,1+(i>0?i:0),!0)},r?r(t.exports,"apply",{value:i}):t.exports.apply=i}(Fr);var an=Fr.exports,sn=Xt,fn=function(){return sn()&&!!Symbol.toStringTag},un=function(t,e,r){if(!Pr(e))throw new TypeError("iterator must be a function");var n,i;arguments.length>=3&&(n=r),i=t,"[object Array]"===Cr.call(i)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)Lr.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,n):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,n):function(t,e,r){for(var n in t)Lr.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,n)},cn=function(){for(var t=[],e=0;e<Nr.length;e++)"function"==typeof Ur[Nr[e]]&&(t[t.length]=Nr[e]);return t},hn=an,ln=Sr,dn=Pt,pn=ke,bn=ln("Object.prototype.toString"),gn=fn(),yn="undefined"==typeof globalThis?e:globalThis,mn=cn(),vn=ln("String.prototype.slice"),_n=ln("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},wn={__proto__:null};un(mn,gn&&dn&&pn?function(t){var e=new yn[t];if(Symbol.toStringTag in e&&pn){var r=pn(e),n=dn(r,Symbol.toStringTag);if(!n&&r){var i=pn(r);n=dn(i,Symbol.toStringTag)}wn["$"+t]=hn(n.get)}}:function(t){var e=new yn[t],r=e.slice||e.set;r&&(wn["$"+t]=hn(r))});var En=function(t){if(!t||"object"!=typeof t)return!1;if(!gn){var e=vn(bn(t),8,-1);return _n(mn,e)>-1?e:"Object"===e&&function(t){var e=!1;return un(wn,(function(r,n){if(!e)try{r(t),e=vn(n,1)}catch(t){}})),e}(t)}return dn?function(t){var e=!1;return un(wn,(function(r,n){if(!e)try{"$"+r(t)===n&&(e=vn(n,1))}catch(t){}})),e}(t):null},Sn=En,An=function(t){return!!Sn(t)},Mn=mt,kn=Sr("TypedArray.prototype.buffer",!0),Tn=An,Bn=kn||function(t){if(!Tn(t))throw new Mn("Not a Typed Array");return t.buffer},xn=ft.Buffer,On=yt,jn=Bn,Rn=ArrayBuffer.isView||function(t){try{return jn(t),!0}catch(t){return!1}},In="undefined"!=typeof Uint8Array,Pn="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,Cn=Pn&&(xn.prototype instanceof Uint8Array||xn.TYPED_ARRAY_SUPPORT),Ln=function(t,e){if(xn.isBuffer(t))return t.constructor&&!("isBuffer"in t)?xn.from(t):t;if("string"==typeof t)return xn.from(t,e);if(Pn&&Rn(t)){if(0===t.byteLength)return xn.alloc(0);if(Cn){var r=xn.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}var n=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),i=xn.from(n);if(i.length===t.byteLength)return i}if(In&&t instanceof Uint8Array)return xn.from(t);var o=On(t);if(o)for(var a=0;a<t.length;a+=1){var s=t[a];if("number"!=typeof s||s<0||s>255||~~s!==s)throw new RangeError("Array items must be numbers in the range 0-255.")}if(o||xn.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return xn.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},Nn=ft.Buffer,Un=Ln,Fn="undefined"!=typeof Uint8Array,Dn=Fn&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView,qn={exports:{}},zn={exports:{}};"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?zn.exports={nextTick:function(t,e,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick((function(){t.call(null,e)}));case 3:return process.nextTick((function(){t.call(null,e,r)}));case 4:return process.nextTick((function(){t.call(null,e,r,n)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return process.nextTick((function(){t.apply(null,i)}))}}}:zn.exports=process;var Hn=zn.exports,Vn={}.toString,Wn=Array.isArray||function(t){return"[object Array]"==Vn.call(t)},Kn=_.EventEmitter,$n={exports:{}};!function(t,e){var r=Y,n=r.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=o),i(n,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}($n,$n.exports);var Gn=$n.exports,Zn={};function Jn(t){return Object.prototype.toString.call(t)}Zn.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Jn(t)},Zn.isBoolean=function(t){return"boolean"==typeof t},Zn.isNull=function(t){return null===t},Zn.isNullOrUndefined=function(t){return null==t},Zn.isNumber=function(t){return"number"==typeof t},Zn.isString=function(t){return"string"==typeof t},Zn.isSymbol=function(t){return"symbol"==typeof t},Zn.isUndefined=function(t){return void 0===t},Zn.isRegExp=function(t){return"[object RegExp]"===Jn(t)},Zn.isObject=function(t){return"object"==typeof t&&null!==t},Zn.isDate=function(t){return"[object Date]"===Jn(t)},Zn.isError=function(t){return"[object Error]"===Jn(t)||t instanceof Error},Zn.isFunction=function(t){return"function"==typeof t},Zn.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},Zn.isBuffer=Y.Buffer.isBuffer;var Xn,Yn={exports:{}};function Qn(){return Xn||(Xn=1,function(t){var e=Gn.Buffer,r=H;t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.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},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.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}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.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},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var r,n,i,o=e.allocUnsafe(t>>>0),a=this.head,s=0;a;)r=a.data,n=o,i=s,r.copy(n,i),s+=a.data.length,a=a.next;return o},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})}(Yn)),Yn.exports}var ti=Hn;function ei(t,e){t.emit("error",e)}var ri,ni,ii,oi,ai={destroy:function(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ti.nextTick(ei,this,t)):ti.nextTick(ei,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,ti.nextTick(ei,r,t)):ti.nextTick(ei,r,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}},si=function(t,e){if(fi("noDeprecation"))return t;var r=!1;return function(){if(!r){if(fi("throwDeprecation"))throw new Error(e);fi("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}};function fi(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}function ui(){if(ni)return ri;ni=1;var t=Hn;function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}ri=p;var n,i=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;p.WritableState=d;var o=Object.create(Zn);o.inherits=bt;var a={deprecate:si},s=Kn,f=Gn.Buffer,u=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,h=ai;function l(){}function d(e,o){n=n||ci(),e=e||{};var a=o instanceof n;this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var s=e.highWaterMark,f=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:a&&(f||0===f)?f:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,r){var n=e._writableState,o=n.sync,a=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),r)!function(e,r,n,i,o){--r.pendingcb,n?(t.nextTick(o,i),t.nextTick(_,e,r),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),_(e,r))}(e,n,o,r,a);else{var s=m(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||y(e,n),o?i(g,e,n,s,a):g(e,n,s,a)}}(o,e)},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 r(this)}function p(t){if(n=n||ci(),!(c.call(p,this)||this instanceof n))return new p(t);this._writableState=new d(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function b(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 g(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),_(t,e)}function y(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,o=new Array(i),a=e.corkedRequestsFree;a.entry=n;for(var s=0,f=!0;n;)o[s]=n,n.isBuf||(f=!1),n=n.next,s+=1;o.allBuffers=f,b(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,h=n.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function m(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),_(t,e)}))}function _(e,r){var n=m(r);return n&&(!function(e,r){r.prefinished||r.finalCalled||("function"==typeof e._final?(r.pendingcb++,r.finalCalled=!0,t.nextTick(v,e,r)):(r.prefinished=!0,e.emit("prefinish")))}(e,r),0===r.pendingcb&&(r.finished=!0,e.emit("finish"))),n}return o.inherits(p,s),d.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(d.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===p&&(t&&t._writableState instanceof d)}})):c=function(t){return t instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,r,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,f.isBuffer(i)||i instanceof u);return s&&!f.isBuffer(e)&&(e=function(t){return f.from(t)}(e)),"function"==typeof r&&(n=r,r=null),s?r="buffer":r||(r=o.defaultEncoding),"function"!=typeof n&&(n=l),o.ended?function(e,r){var n=new Error("write after end");e.emit("error",n),t.nextTick(r,n)}(this,n):(s||function(e,r,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||r.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),t.nextTick(i,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,n,i,o);return u}(this,o,s,e,r,n)),a},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||y(this,t))},p.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},Object.defineProperty(p.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),p.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,r,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,r=null):"function"==typeof r&&(n=r,r=null),null!=e&&this.write(e,r),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,r,n){r.ending=!0,_(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n));r.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(p.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),p.prototype.destroy=h.destroy,p.prototype._undestroy=h.undestroy,p.prototype._destroy=function(t,e){this.end(),e(t)},ri}function ci(){if(oi)return ii;oi=1;var t=Hn,e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ii=f;var r=Object.create(Zn);r.inherits=bt;var n=Mi(),i=ui();r.inherits(f,n);for(var o=e(i.prototype),a=0;a<o.length;a++){var s=o[a];f.prototype[s]||(f.prototype[s]=i.prototype[s])}function f(t){if(!(this instanceof f))return new f(t);n.call(this,t),i.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||t.nextTick(c,this)}function c(t){t.end()}return Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(e,r){this.push(null),this.end(),t.nextTick(r,e)},ii}var hi,li,di={},pi=Gn.Buffer,bi=pi.isEncoding||function(t){switch((t=""+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}};function gi(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(pi.isEncoding===bi||!bi(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=vi,this.end=_i,e=4;break;case"utf8":this.fillLast=mi,e=4;break;case"base64":this.text=wi,this.end=Ei,e=3;break;default:return this.write=Si,void(this.end=Ai)}this.lastNeed=0,this.lastTotal=0,this.lastChar=pi.allocUnsafe(e)}function yi(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function mi(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function vi(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _i(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function wi(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Ei(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Si(t){return t.toString(this.encoding)}function Ai(t){return t&&t.length?this.write(t):""}function Mi(){if(li)return hi;li=1;var t=Hn;hi=g;var r,n=Wn;g.ReadableState=b,_.EventEmitter;var i=function(t,e){return t.listeners(e).length},o=Kn,a=Gn.Buffer,s=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f=Object.create(Zn);f.inherits=bt;var u=H,c=void 0;c=u&&u.debuglog?u.debuglog("stream"):function(){};var h,l=Qn(),d=ai;f.inherits(g,o);var p=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(r=r||ci());this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new l,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=di.StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function g(t){if(r=r||ci(),!(this instanceof g))return new g(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function y(t,e,r,n,i){var o,f=t._readableState;null===e?(f.reading=!1,function(t,e){if(e.ended)return;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,E(t)}(t,f)):(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof s||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(f,e)),o?t.emit("error",o):f.objectMode||e&&e.length>0?("string"==typeof e||f.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n?f.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):m(t,f,e,!0):f.ended?t.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(e=f.decoder.write(e),f.objectMode||0!==e.length?m(t,f,e,!1):A(t,f)):m(t,f,e,!1))):n||(f.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(f)}function m(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(t,e){this.push(null),e(t)},g.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),y(this,t,e,!1,r)},g.prototype.unshift=function(t){return y(this,t,null,!0,!1)},g.prototype.isPaused=function(){return!1===this._readableState.flowing},g.prototype.setEncoding=function(t){return h||(h=di.StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var v=8388608;function w(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=function(t){return t>=v?t=v:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(c("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(S,e):S(e))}function S(t){c("emit readable"),t.emit("readable"),B(t)}function A(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(M,e,r))}function M(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(c("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function k(t){c("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(c("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(c("flow",e.flowing);e.flowing&&null!==t.read(););}function x(t,e){return 0===e.length?null:(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=function(t,e,r){var n;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?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){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}(t,e):function(t,e){var r=a.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function O(e){var r=e._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');r.endEmitted||(r.ended=!0,t.nextTick(j,r,e))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}return g.prototype.read=function(t){c("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 c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?O(this):E(this),null;if(0===(t=w(t,e))&&e.ended)return 0===e.length&&O(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=w(r,e))),null===(n=t>0?x(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(e,r){var o=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,c("pipe count=%d opts=%j",a.pipesCount,r);var s=(!r||!1!==r.end)&&e!==process.stdout&&e!==process.stderr?u:m;function f(t,r){c("onunpipe"),t===o&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",f),o.removeListener("end",u),o.removeListener("end",m),o.removeListener("data",p),l=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function u(){c("onend"),e.end()}a.endEmitted?t.nextTick(s):o.once("end",s),e.on("unpipe",f);var h=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,B(t))}}(o);e.on("drain",h);var l=!1;var d=!1;function p(t){c("ondata"),d=!1,!1!==e.write(t)||d||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==R(a.pipes,e))&&!l&&(c("false write response, pause",a.awaitDrain),a.awaitDrain++,d=!0),o.pause())}function b(t){c("onerror",t),m(),e.removeListener("error",b),0===i(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),m()}function y(){c("onfinish"),e.removeListener("close",g),m()}function m(){c("unpipe"),o.unpipe(e)}return o.on("data",p),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?n(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",o),a.flowing||(c("pipe resume"),o.resume()),e},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=R(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},g.prototype.on=function(e,r){var n=o.prototype.on.call(this,e,r);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):t.nextTick(k,this))}return n},g.prototype.addListener=g.prototype.on,g.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!0,function(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(T,e,r))}(this,e)),this},g.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},g.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<p.length;o++)t.on(p[o],this.emit.bind(this,p[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(g.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),g._fromList=x,hi}di.StringDecoder=gi,gi.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},gi.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},gi.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=yi(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=yi(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=yi(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},gi.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};var ki=Oi,Ti=ci(),Bi=Object.create(Zn);function xi(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Oi(t){if(!(this instanceof Oi))return new Oi(t);Ti.call(this,t),this._transformState={afterTransform:xi.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},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.on("prefinish",ji)}function ji(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){Ri(t,e,r)})):Ri(this,null,null)}function Ri(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}Bi.inherits=bt,Bi.inherits(Oi,Ti),Oi.prototype.push=function(t,e){return this._transformState.needTransform=!1,Ti.prototype.push.call(this,t,e)},Oi.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},Oi.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)}},Oi.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},Oi.prototype._destroy=function(t,e){var r=this;Ti.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))};var Ii=Li,Pi=ki,Ci=Object.create(Zn);function Li(t){if(!(this instanceof Li))return new Li(t);Pi.call(this,t)}Ci.inherits=bt,Ci.inherits(Li,Pi),Li.prototype._transform=function(t,e,r){r(null,t)},function(t,e){(e=t.exports=Mi()).Stream=e,e.Readable=e,e.Writable=ui(),e.Duplex=ci(),e.Transform=ki,e.PassThrough=Ii}(qn,qn.exports);var Ni=qn.exports,Ui=ft.Buffer,Fi=function(t,e){if("string"==typeof t||Nn.isBuffer(t)||Fn&&t instanceof Uint8Array||Dn&&Dn(t))return Un(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')},Di=Ni.Transform;function qi(t){Di.call(this),this._block=Ui.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}bt(qi,Di),qi.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},qi.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},qi.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=Fi(t,e),n=this._block,i=0;this._blockOffset+r.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o]=r[i],o+=1,i+=1;this._update(),this._blockOffset=0}for(;i<r.length;)n[this._blockOffset]=r[i],this._blockOffset+=1,i+=1;for(var a=0,s=8*r.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},qi.prototype._update=function(){throw new Error("_update is not implemented")},qi.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},qi.prototype._digest=function(){throw new Error("_digest is not implemented")};var zi=qi,Hi=bt,Vi=zi,Wi=ft.Buffer,Ki=new Array(16);function $i(){Vi.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Gi(t,e){return t<<e|t>>>32-e}function Zi(t,e,r,n,i,o,a){return Gi(t+(e&r|~e&n)+i+o|0,a)+e|0}function Ji(t,e,r,n,i,o,a){return Gi(t+(e&n|r&~n)+i+o|0,a)+e|0}function Xi(t,e,r,n,i,o,a){return Gi(t+(e^r^n)+i+o|0,a)+e|0}function Yi(t,e,r,n,i,o,a){return Gi(t+(r^(e|~n))+i+o|0,a)+e|0}Hi($i,Vi),$i.prototype._update=function(){for(var t=Ki,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=Zi(r,n,i,o,t[0],3614090360,7),o=Zi(o,r,n,i,t[1],3905402710,12),i=Zi(i,o,r,n,t[2],606105819,17),n=Zi(n,i,o,r,t[3],3250441966,22),r=Zi(r,n,i,o,t[4],4118548399,7),o=Zi(o,r,n,i,t[5],1200080426,12),i=Zi(i,o,r,n,t[6],2821735955,17),n=Zi(n,i,o,r,t[7],4249261313,22),r=Zi(r,n,i,o,t[8],1770035416,7),o=Zi(o,r,n,i,t[9],2336552879,12),i=Zi(i,o,r,n,t[10],4294925233,17),n=Zi(n,i,o,r,t[11],2304563134,22),r=Zi(r,n,i,o,t[12],1804603682,7),o=Zi(o,r,n,i,t[13],4254626195,12),i=Zi(i,o,r,n,t[14],2792965006,17),r=Ji(r,n=Zi(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=Ji(o,r,n,i,t[6],3225465664,9),i=Ji(i,o,r,n,t[11],643717713,14),n=Ji(n,i,o,r,t[0],3921069994,20),r=Ji(r,n,i,o,t[5],3593408605,5),o=Ji(o,r,n,i,t[10],38016083,9),i=Ji(i,o,r,n,t[15],3634488961,14),n=Ji(n,i,o,r,t[4],3889429448,20),r=Ji(r,n,i,o,t[9],568446438,5),o=Ji(o,r,n,i,t[14],3275163606,9),i=Ji(i,o,r,n,t[3],4107603335,14),n=Ji(n,i,o,r,t[8],1163531501,20),r=Ji(r,n,i,o,t[13],2850285829,5),o=Ji(o,r,n,i,t[2],4243563512,9),i=Ji(i,o,r,n,t[7],1735328473,14),r=Xi(r,n=Ji(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=Xi(o,r,n,i,t[8],2272392833,11),i=Xi(i,o,r,n,t[11],1839030562,16),n=Xi(n,i,o,r,t[14],4259657740,23),r=Xi(r,n,i,o,t[1],2763975236,4),o=Xi(o,r,n,i,t[4],1272893353,11),i=Xi(i,o,r,n,t[7],4139469664,16),n=Xi(n,i,o,r,t[10],3200236656,23),r=Xi(r,n,i,o,t[13],681279174,4),o=Xi(o,r,n,i,t[0],3936430074,11),i=Xi(i,o,r,n,t[3],3572445317,16),n=Xi(n,i,o,r,t[6],76029189,23),r=Xi(r,n,i,o,t[9],3654602809,4),o=Xi(o,r,n,i,t[12],3873151461,11),i=Xi(i,o,r,n,t[15],530742520,16),r=Yi(r,n=Xi(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=Yi(o,r,n,i,t[7],1126891415,10),i=Yi(i,o,r,n,t[14],2878612391,15),n=Yi(n,i,o,r,t[5],4237533241,21),r=Yi(r,n,i,o,t[12],1700485571,6),o=Yi(o,r,n,i,t[3],2399980690,10),i=Yi(i,o,r,n,t[10],4293915773,15),n=Yi(n,i,o,r,t[1],2240044497,21),r=Yi(r,n,i,o,t[8],1873313359,6),o=Yi(o,r,n,i,t[15],4264355552,10),i=Yi(i,o,r,n,t[6],2734768916,15),n=Yi(n,i,o,r,t[13],1309151649,21),r=Yi(r,n,i,o,t[4],4149444226,6),o=Yi(o,r,n,i,t[11],3174756917,10),i=Yi(i,o,r,n,t[2],718787259,15),n=Yi(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},$i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Wi.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var Qi=$i,to=Y.Buffer,eo=bt,ro=zi,no=new Array(16),io=[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],oo=[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],ao=[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],so=[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],fo=[0,1518500249,1859775393,2400959708,2840853838],uo=[1352829926,1548603684,1836072691,2053994217,0];function co(t,e){return t<<e|t>>>32-e}function ho(t,e,r,n,i,o,a,s){return co(t+(e^r^n)+o+a|0,s)+i|0}function lo(t,e,r,n,i,o,a,s){return co(t+(e&r|~e&n)+o+a|0,s)+i|0}function po(t,e,r,n,i,o,a,s){return co(t+((e|~r)^n)+o+a|0,s)+i|0}function bo(t,e,r,n,i,o,a,s){return co(t+(e&n|r&~n)+o+a|0,s)+i|0}function go(t,e,r,n,i,o,a,s){return co(t+(e^(r|~n))+o+a|0,s)+i|0}function yo(){ro.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}eo(yo,ro),yo.prototype._update=function(){for(var t=no,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,f=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,l=0;l<80;l+=1){var d,p;l<16?(d=ho(r,n,i,o,a,t[io[l]],fo[0],ao[l]),p=go(s,f,u,c,h,t[oo[l]],uo[0],so[l])):l<32?(d=lo(r,n,i,o,a,t[io[l]],fo[1],ao[l]),p=bo(s,f,u,c,h,t[oo[l]],uo[1],so[l])):l<48?(d=po(r,n,i,o,a,t[io[l]],fo[2],ao[l]),p=po(s,f,u,c,h,t[oo[l]],uo[2],so[l])):l<64?(d=bo(r,n,i,o,a,t[io[l]],fo[3],ao[l]),p=lo(s,f,u,c,h,t[oo[l]],uo[3],so[l])):(d=go(r,n,i,o,a,t[io[l]],fo[4],ao[l]),p=ho(s,f,u,c,h,t[oo[l]],uo[4],so[l])),r=a,a=o,o=co(i,10),i=n,n=d,s=h,h=c,c=co(u,10),u=f,f=p}var b=this._b+i+c|0;this._b=this._c+o+h|0,this._c=this._d+a+s|0,this._d=this._e+r+f|0,this._e=this._a+n+u|0,this._a=b},yo.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=to.alloc?to.alloc(20):new to(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var mo=yo,vo={exports:{}},_o=ft.Buffer,wo=Ln;function Eo(t,e){this._block=_o.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Eo.prototype.update=function(t,e){t=wo(t,e||"utf8");for(var r=this._block,n=this._blockSize,i=t.length,o=this._len,a=0;a<i;){for(var s=o%n,f=Math.min(i-a,n-s),u=0;u<f;u++)r[s+u]=t[a+u];a+=f,(o+=f)%n==0&&this._update(r)}return this._len+=i,this},Eo.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Eo.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var So=Eo,Ao=bt,Mo=So,ko=ft.Buffer,To=[1518500249,1859775393,-1894007588,-899497514],Bo=new Array(80);function xo(){this.init(),this._w=Bo,Mo.call(this,64,56)}function Oo(t){return t<<30|t>>>2}function jo(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}Ao(xo,Mo),xo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},xo.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var u=0;u<80;++u){var c=~~(u/20),h=0|((e=n)<<5|e>>>27)+jo(c,i,o,a)+s+r[u]+To[c];s=a,a=o,o=Oo(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},xo.prototype._hash=function(){var t=ko.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Ro=xo,Io=bt,Po=So,Co=ft.Buffer,Lo=[1518500249,1859775393,-1894007588,-899497514],No=new Array(80);function Uo(){this.init(),this._w=No,Po.call(this,64,56)}function Fo(t){return t<<5|t>>>27}function Do(t){return t<<30|t>>>2}function qo(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}Io(Uo,Po),Uo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Uo.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=(e=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|e>>>31;for(var u=0;u<80;++u){var c=~~(u/20),h=Fo(n)+qo(c,i,o,a)+s+r[u]+Lo[c]|0;s=a,a=o,o=Do(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},Uo.prototype._hash=function(){var t=Co.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var zo=Uo,Ho=bt,Vo=So,Wo=ft.Buffer,Ko=[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],$o=new Array(64);function Go(){this.init(),this._w=$o,Vo.call(this,64,56)}function Zo(t,e,r){return r^t&(e^r)}function Jo(t,e,r){return t&e|r&(t|e)}function Xo(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function Yo(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function Qo(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Ho(Go,Vo),Go.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Go.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((e=r[h-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[h-7]+Qo(r[h-15])+r[h-16];for(var l=0;l<64;++l){var d=c+Yo(s)+Zo(s,f,u)+Ko[l]+r[l]|0,p=Xo(n)+Jo(n,i,o)|0;c=u,u=f,f=s,s=a+d|0,a=o,o=i,i=n,n=d+p|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},Go.prototype._hash=function(){var t=Wo.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var ta=Go,ea=bt,ra=ta,na=So,ia=ft.Buffer,oa=new Array(64);function aa(){this.init(),this._w=oa,na.call(this,64,56)}ea(aa,ra),aa.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},aa.prototype._hash=function(){var t=ia.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var sa=aa,fa=bt,ua=So,ca=ft.Buffer,ha=[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],la=new Array(160);function da(){this.init(),this._w=la,ua.call(this,128,112)}function pa(t,e,r){return r^t&(e^r)}function ba(t,e,r){return t&e|r&(t|e)}function ga(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function ya(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function ma(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function va(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function _a(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function wa(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ea(t,e){return t>>>0<e>>>0?1:0}fa(da,ua),da.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},da.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,f=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,l=0|this._cl,d=0|this._dl,p=0|this._el,b=0|this._fl,g=0|this._gl,y=0|this._hl,m=0;m<32;m+=2)e[m]=t.readInt32BE(4*m),e[m+1]=t.readInt32BE(4*m+4);for(;m<160;m+=2){var v=e[m-30],_=e[m-30+1],w=ma(v,_),E=va(_,v),S=_a(v=e[m-4],_=e[m-4+1]),A=wa(_,v),M=e[m-14],k=e[m-14+1],T=e[m-32],B=e[m-32+1],x=E+k|0,O=w+M+Ea(x,E)|0;O=(O=O+S+Ea(x=x+A|0,A)|0)+T+Ea(x=x+B|0,B)|0,e[m]=O,e[m+1]=x}for(var j=0;j<160;j+=2){O=e[j],x=e[j+1];var R=ba(r,n,i),I=ba(c,h,l),P=ga(r,c),C=ga(c,r),L=ya(a,p),N=ya(p,a),U=ha[j],F=ha[j+1],D=pa(a,s,f),q=pa(p,b,g),z=y+N|0,H=u+L+Ea(z,y)|0;H=(H=(H=H+D+Ea(z=z+q|0,q)|0)+U+Ea(z=z+F|0,F)|0)+O+Ea(z=z+x|0,x)|0;var V=C+I|0,W=P+R+Ea(V,C)|0;u=f,y=g,f=s,g=b,s=a,b=p,a=o+H+Ea(p=d+z|0,d)|0,o=i,d=l,i=n,l=h,n=r,h=c,r=H+W+Ea(c=z+V|0,z)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+l|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+b|0,this._gl=this._gl+g|0,this._hl=this._hl+y|0,this._ah=this._ah+r+Ea(this._al,c)|0,this._bh=this._bh+n+Ea(this._bl,h)|0,this._ch=this._ch+i+Ea(this._cl,l)|0,this._dh=this._dh+o+Ea(this._dl,d)|0,this._eh=this._eh+a+Ea(this._el,p)|0,this._fh=this._fh+s+Ea(this._fl,b)|0,this._gh=this._gh+f+Ea(this._gl,g)|0,this._hh=this._hh+u+Ea(this._hl,y)|0},da.prototype._hash=function(){var t=ca.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var Sa=da,Aa=bt,Ma=Sa,ka=So,Ta=ft.Buffer,Ba=new Array(160);function xa(){this.init(),this._w=Ba,ka.call(this,128,112)}Aa(xa,Ma),xa.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},xa.prototype._hash=function(){var t=Ta.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Oa=xa;!function(t){t.exports=function(e){var r=e.toLowerCase(),n=t.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n},t.exports.sha=Ro,t.exports.sha1=zo,t.exports.sha224=sa,t.exports.sha256=ta,t.exports.sha384=Oa,t.exports.sha512=Sa}(vo);var ja,Ra,Ia,Pa,Ca,La,Na=vo.exports;function Ua(){return Ra?ja:(Ra=1,ja=_.EventEmitter)}function Fa(){if(Pa)return Ia;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r){return e&&function(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,i(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}Pa=1;var o=Y.Buffer,a=H.inspect,s=a&&a.custom||"inspect";return Ia=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return n(t,[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value: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}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0===(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:s,value:function(t,r){return a(this,e(e({},r),{},{depth:0,customInspect:!1}))}}]),t}(),Ia}function Da(){if(La)return Ca;function t(t,n){r(t,n),e(t)}function e(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function r(t,e){t.emit("error",e)}return La=1,Ca={destroy:function(n,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,n)):process.nextTick(r,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(r){!i&&r?o._writableState?o._writableState.errorEmitted?process.nextTick(e,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,r)):process.nextTick(t,o,r):i?(process.nextTick(e,o),i(r)):process.nextTick(e,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}var qa,za,Ha,Va,Wa,Ka,$a,Ga,Za,Ja,Xa,Ya,Qa,ts,es,rs,ns,is,os,as,ss,fs={};function us(){if(qa)return fs;qa=1;var t={};function e(e,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function r(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return e("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),e("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,a;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var s=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(i," ").concat(r(e,"type"))}return a+=". Received type ".concat(typeof n)}),TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),fs.codes=t,fs}function cs(){if(Ha)return za;Ha=1;var t=us().codes.ERR_INVALID_OPT_VALUE;return za={getHighWaterMark:function(e,r,n,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(r,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new t(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}}function hs(){if(Wa)return Va;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var r;Wa=1,Va=E,E.WritableState=w;var n={deprecate:si},i=Ua(),o=Y.Buffer,a=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,f=Da(),u=cs().getHighWaterMark,c=us().codes,h=c.ERR_INVALID_ARG_TYPE,l=c.ERR_METHOD_NOT_IMPLEMENTED,d=c.ERR_MULTIPLE_CALLBACK,p=c.ERR_STREAM_CANNOT_PIPE,b=c.ERR_STREAM_DESTROYED,g=c.ERR_STREAM_NULL_VALUES,y=c.ERR_STREAM_WRITE_AFTER_END,m=c.ERR_UNKNOWN_ENCODING,v=f.errorOrDestroy;function _(){}function w(e,n,i){r=r||ls(),e=e||{},"boolean"!=typeof i&&(i=n instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new d;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(B,t,e),t._writableState.errorEmitted=!0,v(t,n)):(i(n),t._writableState.errorEmitted=!0,v(t,n),B(t,e))}(t,r,n,e,i);else{var o=k(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||M(t,r),n?process.nextTick(A,t,r,o,i):A(t,r,o,i)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function E(t){var e=this instanceof(r=r||ls());if(!e&&!s.call(E,this))return new E(t);this._writableState=new w(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),i.call(this)}function S(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),B(t,e)}function M(e,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(e._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,f=!0;n;)o[s]=n,n.isBuf||(f=!1),n=n.next,s+=1;o.allBuffers=f,S(e,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,h=n.callback;if(S(e,r,!1,r.objectMode?1:u.length,u,c,h),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&v(t,r),e.prefinished=!0,t.emit("prefinish"),B(t,e)}))}function B(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,process.nextTick(T,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}return bt(E,i),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===E&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},E.prototype.pipe=function(){v(this,new p)},E.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,f=!i.objectMode&&(n=t,o.isBuffer(n)||n instanceof a);return f&&!o.isBuffer(t)&&(t=function(t){return o.from(t)}(t)),"function"==typeof e&&(r=e,e=null),f?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ending?function(t,e){var r=new y;v(t,r),process.nextTick(e,r)}(this,r):(f||function(t,e,r,n){var i;return null===r?i=new g:"string"==typeof r||e.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(v(t,i),process.nextTick(n,i),!1)}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,a){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=o.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var f=e.objectMode?1:n.length;e.length+=f;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else S(t,e,!1,f,n,i,a);return u}(this,i,f,t,e,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||M(this,t))},E.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 m(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,r){r(new l("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,B(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(t,e){e(t)},Va}function ls(){if($a)return Ka;$a=1;var t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ka=a;var e=bs(),r=hs();bt(a,e);for(var n=t(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(t){if(!(this instanceof a))return new a(t);e.call(this,t),r.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||process.nextTick(f,this)}function f(t){t.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),Ka}function ds(){if(Za)return Ga;Za=1;var t=us().codes.ERR_STREAM_PREMATURE_CLOSE;function e(){}return Ga=function r(n,i,o){if("function"==typeof i)return r(n,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||e);var a=i.readable||!1!==i.readable&&n.readable,s=i.writable||!1!==i.writable&&n.writable,f=function(){n.writable||c()},u=n._writableState&&n._writableState.finished,c=function(){s=!1,u=!0,a||o.call(n)},h=n._readableState&&n._readableState.endEmitted,l=function(){a=!1,h=!0,s||o.call(n)},d=function(t){o.call(n,t)},p=function(){var e;return a&&!h?(n._readableState&&n._readableState.ended||(e=new t),o.call(n,e)):s&&!u?(n._writableState&&n._writableState.ended||(e=new t),o.call(n,e)):void 0},b=function(){n.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(n)?s&&!n._writableState&&(n.on("end",f),n.on("close",f)):(n.on("complete",c),n.on("abort",p),n.req?b():n.on("request",b)),n.on("end",l),n.on("finish",c),!1!==i.error&&n.on("error",d),n.on("close",p),function(){n.removeListener("complete",c),n.removeListener("abort",p),n.removeListener("request",b),n.req&&n.req.removeListener("finish",c),n.removeListener("end",f),n.removeListener("close",f),n.removeListener("finish",c),n.removeListener("end",l),n.removeListener("error",d),n.removeListener("close",p)}},Ga}function ps(){if(Xa)return Ja;var t;function e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Xa=1;var r=ds(),n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),f=Symbol("handlePromise"),u=Symbol("stream");function c(t,e){return{value:t,done:e}}function h(t){var e=t[n];if(null!==e){var r=t[u].read();null!==r&&(t[s]=null,t[n]=null,t[i]=null,e(c(r,!1)))}}function l(t){process.nextTick(h,t)}var d=Object.getPrototypeOf((function(){})),p=Object.setPrototypeOf((e(t={get stream(){return this[u]},next:function(){var t=this,e=this[o];if(null!==e)return Promise.reject(e);if(this[a])return Promise.resolve(c(void 0,!0));if(this[u].destroyed)return new Promise((function(e,r){process.nextTick((function(){t[o]?r(t[o]):e(c(void 0,!0))}))}));var r,n=this[s];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[a]?r(c(void 0,!0)):e[f](r,n)}),n)}}(n,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(c(i,!1));r=new Promise(this[f])}return this[s]=r,r}},Symbol.asyncIterator,(function(){return this})),e(t,"return",(function(){var t=this;return new Promise((function(e,r){t[u].destroy(null,(function(t){t?r(t):e(c(void 0,!0))}))}))})),t),d);return Ja=function(t){var h,d=Object.create(p,(e(h={},u,{value:t,writable:!0}),e(h,n,{value:null,writable:!0}),e(h,i,{value:null,writable:!0}),e(h,o,{value:null,writable:!0}),e(h,a,{value:t._readableState.endEmitted,writable:!0}),e(h,f,{value:function(t,e){var r=d[u].read();r?(d[s]=null,d[n]=null,d[i]=null,t(c(r,!1))):(d[n]=t,d[i]=e)},writable:!0}),h));return d[s]=null,r(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=d[i];return null!==e&&(d[s]=null,d[n]=null,d[i]=null,e(t)),void(d[o]=t)}var r=d[n];null!==r&&(d[s]=null,d[n]=null,d[i]=null,r(c(void 0,!0))),d[a]=!0})),t.on("readable",l.bind(null,d)),d},Ja}function bs(){if(es)return ts;var t;es=1,ts=S,S.ReadableState=E,_.EventEmitter;var r=function(t,e){return t.listeners(e).length},n=Ua(),i=Y.Buffer,o=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var a,s=H;a=s&&s.debuglog?s.debuglog("stream"):function(){};var f,u,c,h=Fa(),l=Da(),d=cs().getHighWaterMark,p=us().codes,b=p.ERR_INVALID_ARG_TYPE,g=p.ERR_STREAM_PUSH_AFTER_EOF,y=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;bt(S,n);var v=l.errorOrDestroy,w=["error","close","destroy","pause","resume"];function E(e,r,n){t=t||ls(),e=e||{},"boolean"!=typeof n&&(n=r instanceof t),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=d(this,e,"readableHighWaterMark",n),this.buffer=new h,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.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=di.StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function S(e){if(t=t||ls(),!(this instanceof S))return new S(e);var r=this instanceof t;this._readableState=new E(e,this,r),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function A(t,e,r,n,s){a("readableAddChunk",e);var f,u=t._readableState;if(null===e)u.reading=!1,function(t,e){if(a("onEofChunk"),e.ended)return;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,e.sync?B(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,x(t)))}(t,u);else if(s||(f=function(t,e){var r;n=e,i.isBuffer(n)||n instanceof o||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(u,e)),f)v(t,f);else if(u.objectMode||e&&e.length>0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===i.prototype||(e=function(t){return i.from(t)}(e)),n)u.endEmitted?v(t,new m):M(t,u,e,!0);else if(u.ended)v(t,new g);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?M(t,u,e,!1):O(t,u)):M(t,u,e,!1)}else n||(u.reading=!1,O(t,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function M(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&B(t)),O(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=i.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},S.prototype.unshift=function(t){return A(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){f||(f=di.StringDecoder);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var k=1073741824;function T(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=function(t){return t>=k?t=k:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function B(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(x,t))}function x(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,C(t)}function O(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(a("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function I(t){a("readable nexttick read 0"),t.read(0)}function P(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(U,e,t))}function U(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}return S.prototype.read=function(t){a("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):B(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return a("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&a("length less than watermark",i=!0),e.ended||e.reading?a("reading or ended",i=!1):i&&(a("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(r,e))),null===(n=t>0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){v(this,new y("_read()"))},S.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==process.stdout&&t!==process.stderr?f:b;function s(e,r){a("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,a("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",l),t.removeListener("unpipe",s),n.removeListener("end",f),n.removeListener("end",b),n.removeListener("data",h),c=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function f(){a("onend"),t.end()}i.endEmitted?process.nextTick(o):n.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&r(t,"data")&&(e.flowing=!0,C(t))}}(n);t.on("drain",u);var c=!1;function h(e){a("ondata");var r=t.write(e);a("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!c&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function l(e){a("onerror",e),b(),t.removeListener("error",l),0===r(t,"error")&&v(t,e)}function d(){t.removeListener("finish",p),b()}function p(){a("onfinish"),t.removeListener("close",d),b()}function b(){a("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",d),t.once("finish",p),t.emit("pipe",n),i.flowing||(a("pipe resume"),n.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=F(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},S.prototype.on=function(t,e){var r=n.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?B(this):i.reading||process.nextTick(I,this))),r},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var r=n.prototype.removeListener.call(this,t,e);return"readable"===t&&process.nextTick(R,this),r},S.prototype.removeAllListeners=function(t){var e=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(R,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(P,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<w.length;o++)t.on(w[o],this.emit.bind(this,w[o]));return this._read=function(e){a("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=ps()),u(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=L,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===c&&(c=Qa?Ya:(Qa=1,Ya=function(){throw new Error("Readable.from is not available in the browser")})),c(S,t,e)}),ts}function gs(){if(ns)return rs;ns=1,rs=s;var t=us().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,r=t.ERR_MULTIPLE_CALLBACK,n=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=t.ERR_TRANSFORM_WITH_LENGTH_0,o=ls();function a(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(null===i)return this.emit("error",new r);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);o.call(this,t),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},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.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(e,r){u(t,e,r)}))}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new i;if(t._transformState.transforming)throw new n;return t.push(null)}return bt(s,o),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,o.prototype.push.call(this,t,e)},s.prototype._transform=function(t,r,n){n(new e("_transform()"))},s.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)}},s.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},s.prototype._destroy=function(t,e){o.prototype._destroy.call(this,t,(function(t){e(t)}))},rs}var ys=vs,ms=_.EventEmitter;function vs(){ms.call(this)}bt(vs,ms),vs.Readable=bs(),vs.Writable=hs(),vs.Duplex=ls(),vs.Transform=gs(),vs.PassThrough=function(){if(os)return is;os=1,is=e;var t=gs();function e(r){if(!(this instanceof e))return new e(r);t.call(this,r)}return bt(e,t),e.prototype._transform=function(t,e,r){r(null,t)},is}(),vs.finished=ds(),vs.pipeline=function(){if(ss)return as;var t;ss=1;var e=us().codes,r=e.ERR_MISSING_ARGS,n=e.ERR_STREAM_DESTROYED;function i(t){if(t)throw t}function o(t){t()}function a(t,e){return t.pipe(e)}return as=function(){for(var e=arguments.length,s=new Array(e),f=0;f<e;f++)s[f]=arguments[f];var u,c=function(t){return t.length?"function"!=typeof t[t.length-1]?i:t.pop():i}(s);if(Array.isArray(s[0])&&(s=s[0]),s.length<2)throw new r("streams");var h=s.map((function(e,r){var i=r<s.length-1;return function(e,r,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===t&&(t=ds()),t(e,{readable:r,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var s=!1;return function(t){if(!a&&!s)return s=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new n("pipe"))}}(e,i,r>0,(function(t){u||(u=t),t&&h.forEach(o),i||(h.forEach(o),c(u))}))}));return s.reduce(a)},as}(),vs.Stream=vs,vs.prototype.pipe=function(t,e){var r=this;function n(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),t.on("drain",i),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(u(),0===ms.listenerCount(this,"error"))throw t}function u(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",f),t.on("error",f),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t};var _s=ft.Buffer,ws=ys.Transform,Es=di.StringDecoder,Ss=Ln;function As(t){ws.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}bt(As,ws),As.prototype.update=function(t,e,r){var n=Ss(t,e),i=this._update(n);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},As.prototype.setAutoPadding=function(){},As.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},As.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},As.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},As.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},As.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},As.prototype._finalOrDigest=function(t){var e=this.__final()||_s.alloc(0);return t&&(e=this._toString(e,t,!0)),e},As.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new Es(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n};var Ms=As,ks=Qi,Ts=mo,Bs=Na,xs=Ms;function Os(t){xs.call(this,"digest"),this._hash=t}bt(Os,xs),Os.prototype._update=function(t){this._hash.update(t)},Os.prototype._final=function(){return this._hash.digest()};var js=function(t){return"md5"===(t=t.toLowerCase())?new ks:"rmd160"===t||"ripemd160"===t?new Ts:new Os(Bs(t))},Rs=r(js),Is=bt,Ps=ft.Buffer,Cs=Ms,Ls=Ps.alloc(128),Ns=64;function Us(t,e){Cs.call(this,"digest"),"string"==typeof e&&(e=Ps.from(e)),this._alg=t,this._key=e,e.length>Ns?e=t(e):e.length<Ns&&(e=Ps.concat([e,Ls],Ns));for(var r=this._ipad=Ps.allocUnsafe(Ns),n=this._opad=Ps.allocUnsafe(Ns),i=0;i<Ns;i++)r[i]=54^e[i],n[i]=92^e[i];this._hash=[r]}Is(Us,Cs),Us.prototype._update=function(t){this._hash.push(t)},Us.prototype._final=function(){var t=this._alg(Ps.concat(this._hash));return this._alg(Ps.concat([this._opad,t]))};var Fs=Qi,Ds=function(t){return(new Fs).update(t).digest()},qs=bt,zs=Us,Hs=Ms,Vs=ft.Buffer,Ws=Ds,Ks=mo,$s=Na,Gs=Vs.alloc(128);function Zs(t,e){Hs.call(this,"digest"),"string"==typeof e&&(e=Vs.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new Ks:$s(t)).update(e).digest():e.length<r&&(e=Vs.concat([e,Gs],r));for(var n=this._ipad=Vs.allocUnsafe(r),i=this._opad=Vs.allocUnsafe(r),o=0;o<r;o++)n[o]=54^e[o],i[o]=92^e[o];this._hash="rmd160"===t?new Ks:$s(t),this._hash.update(n)}qs(Zs,Hs),Zs.prototype._update=function(t){this._hash.update(t)},Zs.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new Ks:$s(this._alg)).update(this._opad).update(t).digest()};var Js,Xs=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new Zs("rmd160",e):"md5"===t?new zs(Ws,e):new Zs(t,e)},Ys=r(Xs),Qs={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}},tf=Qs,ef={},rf=isFinite,nf=Math.pow(2,30)-1,of=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0||!rf(t))throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>nf||e!=e)throw new TypeError("Bad key length")};if(e.process&&e.process.browser)Js="utf-8";else if(e.process&&e.process.version){Js=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else Js="utf-8";var af=Js,sf=ft.Buffer,ff=Ln,uf="undefined"!=typeof Uint8Array,cf=uf&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView,hf=function(t,e,r){if("string"==typeof t||sf.isBuffer(t)||uf&&t instanceof Uint8Array||cf&&cf(t))return ff(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")},lf=Ds,df=mo,pf=Na,bf=ft.Buffer,gf=of,yf=af,mf=hf,vf=bf.alloc(128),_f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},wf={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function Ef(t){return(new df).update(t).digest()}function Sf(t,e,r){var n=function(t){return"rmd160"===t||"ripemd160"===t?Ef:"md5"===t?lf:function(e){return pf(t).update(e).digest()}}(t),i="sha512"===t||"sha384"===t?128:64;e.length>i?e=n(e):e.length<i&&(e=bf.concat([e,vf],i));for(var o=bf.allocUnsafe(i+_f[t]),a=bf.allocUnsafe(i+_f[t]),s=0;s<i;s++)o[s]=54^e[s],a[s]=92^e[s];var f=bf.allocUnsafe(i+r+4);o.copy(f,0,0,i),this.ipad1=f,this.ipad2=o,this.opad=a,this.alg=t,this.blocksize=i,this.hash=n,this.size=_f[t]}Sf.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)};var Af,Mf,kf=function(t,e,r,n,i){gf(r,n),t=mf(t,yf,"Password"),e=mf(e,yf,"Salt");var o=(i||"sha1").toLowerCase(),a=wf[o]||o,s=_f[a];if("number"!=typeof s||!s)throw new TypeError("Digest algorithm not supported: "+i);var f=new Sf(a,t,e.length),u=bf.allocUnsafe(n),c=bf.allocUnsafe(e.length+4);e.copy(c,0,0,e.length);for(var h=0,l=s,d=Math.ceil(n/l),p=1;p<=d;p++){c.writeUInt32BE(p,e.length);for(var b=f.run(c,f.ipad1),g=b,y=1;y<r;y++){g=f.run(g,f.ipad2);for(var m=0;m<l;m++)b[m]^=g[m]}b.copy(u,h),h+=l}return u},Tf=ft.Buffer,Bf=of,xf=af,Of=kf,jf=hf,Rf=e.crypto&&e.crypto.subtle,If={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},Pf=[];function Cf(){return Mf||(Mf=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function Lf(t,e,r,n,i){return Rf.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return Rf.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return Tf.from(t)}))}ef.pbkdf2=function(t,r,n,i,o,a){if("function"==typeof o&&(a=o,o=void 0),Bf(n,i),t=jf(t,xf,"Password"),r=jf(r,xf,"Salt"),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");var s=If[(o=o||"sha1").toLowerCase()];s&&"function"==typeof e.Promise?function(t,e){t.then((function(t){Cf()((function(){e(null,t)}))}),(function(t){Cf()((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!Rf||!Rf.importKey||!Rf.deriveBits)return Promise.resolve(!1);if(void 0!==Pf[t])return Pf[t];var r=Lf(Af=Af||Tf.alloc(8),Af,10,128,t).then((function(){return!0}),(function(){return!1}));return Pf[t]=r,r}(s).then((function(e){return e?Lf(t,r,n,i,s):Of(t,r,n,i,o)})),a):Cf()((function(){var e;try{e=Of(t,r,n,i,o)}catch(t){return void a(t)}a(null,e)}))},ef.pbkdf2Sync=kf;var Nf={},Uf={},Ff={readUInt32BE:function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},writeUInt32BE:function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},ip:function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},rip:function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},pc1:function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r28shl:function(t,e){return t<<e&268435455|t>>>28-e}},Df=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Ff.pc2=function(t,e,r,n){for(var i=0,o=0,a=Df.length>>>1,s=0;s<a;s++)i<<=1,i|=t>>>Df[s]&1;for(s=a;s<Df.length;s++)o<<=1,o|=e>>>Df[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},Ff.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var qf=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Ff.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=qf[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=qf[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var zf=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Ff.permute=function(t){for(var e=0,r=0;r<zf.length;r++)e<<=1,e|=t>>>zf[r]&1;return e>>>0},Ff.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")};var Hf=W;function Vf(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}var Wf=Vf;Vf.prototype._init=function(){},Vf.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},Vf.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},Vf.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},Vf.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},Vf.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},Vf.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},Vf.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},Vf.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},Vf.prototype._unpad=function(t){return t},Vf.prototype._finalDecrypt=function(){Hf.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)};var Kf=W,$f=Ff,Gf=Wf;function Zf(){this.tmp=new Array(2),this.keys=null}function Jf(t){Gf.call(this,t);var e=new Zf;this._desState=e,this.deriveKeys(e,t.key)}bt(Jf,Gf);var Xf=Jf;Jf.create=function(t){return new Jf(t)};var Yf=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Jf.prototype.deriveKeys=function(t,e){t.keys=new Array(32),Kf.equal(e.length,this.blockSize,"Invalid key length");var r=$f.readUInt32BE(e,0),n=$f.readUInt32BE(e,4);$f.pc1(r,n,t.tmp,0),r=t.tmp[0],n=t.tmp[1];for(var i=0;i<t.keys.length;i+=2){var o=Yf[i>>>1];r=$f.r28shl(r,o),n=$f.r28shl(n,o),$f.pc2(r,n,t.keys,i)}},Jf.prototype._update=function(t,e,r,n){var i=this._desState,o=$f.readUInt32BE(t,e),a=$f.readUInt32BE(t,e+4);$f.ip(o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,a,i.tmp,0):this._decrypt(i,o,a,i.tmp,0),o=i.tmp[0],a=i.tmp[1],$f.writeUInt32BE(r,o,n),$f.writeUInt32BE(r,a,n+4)},Jf.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},Jf.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)Kf.equal(t[r],e);return t.slice(0,t.length-e)},Jf.prototype._encrypt=function(t,e,r,n,i){for(var o=e,a=r,s=0;s<t.keys.length;s+=2){var f=t.keys[s],u=t.keys[s+1];$f.expand(a,t.tmp,0),f^=t.tmp[0],u^=t.tmp[1];var c=$f.substitute(f,u),h=a;a=(o^$f.permute(c))>>>0,o=h}$f.rip(a,o,n,i)},Jf.prototype._decrypt=function(t,e,r,n,i){for(var o=r,a=e,s=t.keys.length-2;s>=0;s-=2){var f=t.keys[s],u=t.keys[s+1];$f.expand(o,t.tmp,0),f^=t.tmp[0],u^=t.tmp[1];var c=$f.substitute(f,u),h=o;o=(a^$f.permute(c))>>>0,a=h}$f.rip(o,a,n,i)};var Qf={},tu=W,eu=bt,ru={};function nu(t){tu.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}Qf.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}eu(e,t);for(var r=Object.keys(ru),n=0;n<r.length;n++){var i=r[n];e.prototype[i]=ru[i]}return e.create=function(t){return new e(t)},e},ru._cbcInit=function(){var t=new nu(this.options.iv);this._cbcState=t},ru._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=t[e+s];o._update.call(this,a,0,r,n);for(s=0;s<this.blockSize;s++)a[s]=r[n+s]}else{o._update.call(this,t,e,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=t[e+s]}};var iu=W,ou=Wf,au=Xf;function su(t,e){iu.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);this.ciphers="encrypt"===t?[au.create({type:"encrypt",key:r}),au.create({type:"decrypt",key:n}),au.create({type:"encrypt",key:i})]:[au.create({type:"decrypt",key:i}),au.create({type:"encrypt",key:n}),au.create({type:"decrypt",key:r})]}function fu(t){ou.call(this,t);var e=new su(this.type,this.options.key);this._edeState=e}bt(fu,ou);var uu=fu;fu.create=function(t){return new fu(t)},fu.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},fu.prototype._pad=au.prototype._pad,fu.prototype._unpad=au.prototype._unpad,Uf.utils=Ff,Uf.Cipher=Wf,Uf.DES=Xf,Uf.CBC=Qf,Uf.EDE=uu;var cu=Ms,hu=Uf,lu=bt,du=ft.Buffer,pu={"des-ede3-cbc":hu.CBC.instantiate(hu.EDE),"des-ede3":hu.EDE,"des-ede-cbc":hu.CBC.instantiate(hu.EDE),"des-ede":hu.EDE,"des-cbc":hu.CBC.instantiate(hu.DES),"des-ecb":hu.DES};pu.des=pu["des-cbc"],pu.des3=pu["des-ede3-cbc"];var bu=gu;function gu(t){cu.call(this);var e,r=t.mode.toLowerCase(),n=pu[r];e=t.decrypt?"decrypt":"encrypt";var i=t.key;du.isBuffer(i)||(i=du.from(i)),"des-ede"!==r&&"des-ede-cbc"!==r||(i=du.concat([i,i.slice(0,8)]));var o=t.iv;du.isBuffer(o)||(o=du.from(o)),this._des=n.create({key:i,iv:o,type:e})}lu(gu,cu),gu.prototype._update=function(t){return du.from(this._des.update(t))},gu.prototype._final=function(){return du.from(this._des.final())};var yu={},mu={},vu={encrypt:function(t,e){return t._cipher.encryptBlock(e)},decrypt:function(t,e){return t._cipher.decryptBlock(e)}},_u={},wu=function(t,e){for(var r=Math.min(t.length,e.length),n=new Buffer(r),i=0;i<r;++i)n[i]=t[i]^e[i];return n},Eu=wu;_u.encrypt=function(t,e){var r=Eu(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},_u.decrypt=function(t,e){var r=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return Eu(n,r)};var Su={},Au=ft.Buffer,Mu=wu;function ku(t,e,r){var n=e.length,i=Mu(e,t._cache);return t._cache=t._cache.slice(n),t._prev=Au.concat([t._prev,r?e:i]),i}Su.encrypt=function(t,e,r){for(var n,i=Au.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Au.allocUnsafe(0)),!(t._cache.length<=e.length)){i=Au.concat([i,ku(t,e,r)]);break}n=t._cache.length,i=Au.concat([i,ku(t,e.slice(0,n),r)]),e=e.slice(n)}return i};var Tu={},Bu=ft.Buffer;function xu(t,e,r){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=Bu.concat([t._prev.slice(1),Bu.from([r?e:n])]),n}Tu.encrypt=function(t,e,r){for(var n=e.length,i=Bu.allocUnsafe(n),o=-1;++o<n;)i[o]=xu(t,e[o],r);return i};var Ou={},ju=ft.Buffer;function Ru(t,e,r){for(var n,i,o=-1,a=0;++o<8;)n=e&1<<7-o?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>o%8,t._prev=Iu(t._prev,r?n:i);return a}function Iu(t,e){var r=t.length,n=-1,i=ju.allocUnsafe(t.length);for(t=ju.concat([t,ju.from([e])]);++n<r;)i[n]=t[n]<<1|t[n+1]>>7;return i}Ou.encrypt=function(t,e,r){for(var n=e.length,i=ju.allocUnsafe(n),o=-1;++o<n;)i[o]=Ru(t,e[o],r);return i};var Pu={},Cu=wu;function Lu(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}Pu.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=Buffer.concat([t._cache,Lu(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Cu(e,r)};var Nu={};var Uu=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}},Fu=wu,Du=ft.Buffer,qu=Uu;function zu(t){var e=t._cipher.encryptBlockRaw(t._prev);return qu(t._prev),e}Nu.encrypt=function(t,e){var r=Math.ceil(e.length/16),n=t._cache.length;t._cache=Du.concat([t._cache,Du.allocUnsafe(16*r)]);for(var i=0;i<r;i++){var o=zu(t),a=n+16*i;t._cache.writeUInt32BE(o[0],a+0),t._cache.writeUInt32BE(o[1],a+4),t._cache.writeUInt32BE(o[2],a+8),t._cache.writeUInt32BE(o[3],a+12)}var s=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),Fu(e,s)};var Hu={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Vu={ECB:vu,CBC:_u,CFB:Su,CFB8:Tu,CFB1:Ou,OFB:Pu,CTR:Nu,GCM:Nu},Wu=Hu;for(var Ku in Wu)Wu[Ku].module=Vu[Wu[Ku].mode];var $u=Wu,Gu={},Zu=ft.Buffer;function Ju(t){Zu.isBuffer(t)||(t=Zu.from(t));for(var e=t.length/4|0,r=new Array(e),n=0;n<e;n++)r[n]=t.readUInt32BE(4*n);return r}function Xu(t){for(;0<t.length;t++)t[0]=0}function Yu(t,e,r,n,i){for(var o,a,s,f,u=r[0],c=r[1],h=r[2],l=r[3],d=t[0]^e[0],p=t[1]^e[1],b=t[2]^e[2],g=t[3]^e[3],y=4,m=1;m<i;m++)o=u[d>>>24]^c[p>>>16&255]^h[b>>>8&255]^l[255&g]^e[y++],a=u[p>>>24]^c[b>>>16&255]^h[g>>>8&255]^l[255&d]^e[y++],s=u[b>>>24]^c[g>>>16&255]^h[d>>>8&255]^l[255&p]^e[y++],f=u[g>>>24]^c[d>>>16&255]^h[p>>>8&255]^l[255&b]^e[y++],d=o,p=a,b=s,g=f;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&g])^e[y++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^e[y++],s=(n[b>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[y++],f=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^e[y++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var Qu=[0,1,2,4,8,16,32,64,128,27,54],tc=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,f=0;f<256;++f){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var c=t[a],h=t[c],l=t[h],d=257*t[u]^16843008*u;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*l^65537*h^257*c^16843008*a,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===a?a=s=1:(a=c^t[t[t[l^c]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function ec(t){this._key=Ju(t),this._reset()}ec.blockSize=16,ec.keySize=32,ec.prototype.blockSize=ec.blockSize,ec.prototype.keySize=ec.keySize,ec.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var a=i[o-1];o%e==0?(a=a<<8|a>>>24,a=tc.SBOX[a>>>24]<<24|tc.SBOX[a>>>16&255]<<16|tc.SBOX[a>>>8&255]<<8|tc.SBOX[255&a],a^=Qu[o/e|0]<<24):e>6&&o%e==4&&(a=tc.SBOX[a>>>24]<<24|tc.SBOX[a>>>16&255]<<16|tc.SBOX[a>>>8&255]<<8|tc.SBOX[255&a]),i[o]=i[o-e]^a}for(var s=[],f=0;f<n;f++){var u=n-f,c=i[u-(f%4?0:4)];s[f]=f<4||u<=4?c:tc.INV_SUB_MIX[0][tc.SBOX[c>>>24]]^tc.INV_SUB_MIX[1][tc.SBOX[c>>>16&255]]^tc.INV_SUB_MIX[2][tc.SBOX[c>>>8&255]]^tc.INV_SUB_MIX[3][tc.SBOX[255&c]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},ec.prototype.encryptBlockRaw=function(t){return Yu(t=Ju(t),this._keySchedule,tc.SUB_MIX,tc.SBOX,this._nRounds)},ec.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=Zu.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},ec.prototype.decryptBlock=function(t){var e=(t=Ju(t))[1];t[1]=t[3],t[3]=e;var r=Yu(t,this._invKeySchedule,tc.INV_SUB_MIX,tc.INV_SBOX,this._nRounds),n=Zu.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},ec.prototype.scrub=function(){Xu(this._keySchedule),Xu(this._invKeySchedule),Xu(this._key)},Gu.AES=ec;var rc=ft.Buffer,nc=rc.alloc(16,0);function ic(t){var e=rc.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function oc(t){this.h=t,this.state=rc.alloc(16,0),this.cache=rc.allocUnsafe(0)}oc.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},oc.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(!!(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=ic(i)},oc.prototype.update=function(t){var e;for(this.cache=rc.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},oc.prototype.final=function(t,e){return this.cache.length&&this.ghash(rc.concat([this.cache,nc],16)),this.ghash(ic([0,t,0,e])),this.state};var ac=oc,sc=Gu,fc=ft.Buffer,uc=Ms,cc=ac,hc=wu,lc=Uu;function dc(t,e,r,n){uc.call(this);var i=fc.alloc(4,0);this._cipher=new sc.AES(e);var o=this._cipher.encryptBlock(i);this._ghash=new cc(o),r=function(t,e,r){if(12===e.length)return t._finID=fc.concat([e,fc.from([0,0,0,1])]),fc.concat([e,fc.from([0,0,0,2])]);var n=new cc(r),i=e.length,o=i%16;n.update(e),o&&(o=16-o,n.update(fc.alloc(o,0))),n.update(fc.alloc(8,0));var a=8*i,s=fc.alloc(8);s.writeUIntBE(a,0,8),n.update(s),t._finID=n.state;var f=fc.from(t._finID);return lc(f),f}(this,r,o),this._prev=fc.from(r),this._cache=fc.allocUnsafe(0),this._secCache=fc.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}bt(dc,uc),dc.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=fc.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},dc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=hc(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},dc.prototype.getAuthTag=function(){if(this._decrypt||!fc.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},dc.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},dc.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length};var pc=dc,bc=Gu,gc=ft.Buffer,yc=Ms;function mc(t,e,r,n){yc.call(this),this._cipher=new bc.AES(e),this._prev=gc.from(r),this._cache=gc.allocUnsafe(0),this._secCache=gc.allocUnsafe(0),this._decrypt=n,this._mode=t}bt(mc,yc),mc.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},mc.prototype._final=function(){this._cipher.scrub()};var vc=mc,_c=ft.Buffer,wc=Qi;var Ec=function(t,e,r,n){if(_c.isBuffer(t)||(t=_c.from(t,"binary")),e&&(_c.isBuffer(e)||(e=_c.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=_c.alloc(i),a=_c.alloc(n||0),s=_c.alloc(0);i>0||n>0;){var f=new wc;f.update(s),f.update(t),e&&f.update(e),s=f.digest();var u=0;if(i>0){var c=o.length-i;u=Math.min(i,s.length),s.copy(o,c,0,u),i-=u}if(u<s.length&&n>0){var h=a.length-n,l=Math.min(n,s.length-u);s.copy(a,h,u,u+l),n-=l}}return s.fill(0),{key:o,iv:a}},Sc=$u,Ac=pc,Mc=ft.Buffer,kc=vc,Tc=Ms,Bc=Gu,xc=Ec;function Oc(t,e,r){Tc.call(this),this._cache=new Rc,this._cipher=new Bc.AES(e),this._prev=Mc.from(r),this._mode=t,this._autopadding=!0}bt(Oc,Tc),Oc.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return Mc.concat(n)};var jc=Mc.alloc(16,16);function Rc(){this.cache=Mc.allocUnsafe(0)}function Ic(t,e,r){var n=Sc[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=Mc.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=Mc.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new kc(n.module,e,r):"auth"===n.type?new Ac(n.module,e,r):new Oc(n.module,e,r)}Oc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(jc))throw this._cipher.scrub(),new Error("data not multiple of block length")},Oc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Rc.prototype.add=function(t){this.cache=Mc.concat([this.cache,t])},Rc.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},Rc.prototype.flush=function(){for(var t=16-this.cache.length,e=Mc.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return Mc.concat([this.cache,e])},mu.createCipheriv=Ic,mu.createCipher=function(t,e){var r=Sc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=xc(e,!1,r.key,r.iv);return Ic(t,n.key,n.iv)};var Pc={},Cc=pc,Lc=ft.Buffer,Nc=$u,Uc=vc,Fc=Ms,Dc=Gu,qc=Ec;function zc(t,e,r){Fc.call(this),this._cache=new Hc,this._last=void 0,this._cipher=new Dc.AES(e),this._prev=Lc.from(r),this._mode=t,this._autopadding=!0}function Hc(){this.cache=Lc.allocUnsafe(0)}function Vc(t,e,r){var n=Nc[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=Lc.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=Lc.from(e)),e.length!==n.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===n.type?new Uc(n.module,e,r,!0):"auth"===n.type?new Cc(n.module,e,r,!0):new zc(n.module,e,r)}bt(zc,Fc),zc.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return Lc.concat(n)},zc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},zc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Hc.prototype.add=function(t){this.cache=Lc.concat([this.cache,t])},Hc.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Hc.prototype.flush=function(){if(this.cache.length)return this.cache},Pc.createDecipher=function(t,e){var r=Nc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=qc(e,!1,r.key,r.iv);return Vc(t,n.key,n.iv)},Pc.createDecipheriv=Vc;var Wc=mu,Kc=Pc,$c=Hu;yu.createCipher=yu.Cipher=Wc.createCipher,yu.createCipheriv=yu.Cipheriv=Wc.createCipheriv,yu.createDecipher=yu.Decipher=Kc.createDecipher,yu.createDecipheriv=yu.Decipheriv=Kc.createDecipheriv,yu.listCiphers=yu.getCiphers=function(){return Object.keys($c)};var Gc={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(Gc);var Zc=bu,Jc=yu,Xc=$u,Yc=Gc,Qc=Ec;function th(t,e,r){if(t=t.toLowerCase(),Xc[t])return Jc.createCipheriv(t,e,r);if(Yc[t])return new Zc({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function eh(t,e,r){if(t=t.toLowerCase(),Xc[t])return Jc.createDecipheriv(t,e,r);if(Yc[t])return new Zc({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}Nf.createCipher=Nf.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),Xc[t])r=Xc[t].key,n=Xc[t].iv;else{if(!Yc[t])throw new TypeError("invalid suite type");r=8*Yc[t].key,n=Yc[t].iv}var i=Qc(e,!1,r,n);return th(t,i.key,i.iv)},Nf.createCipheriv=Nf.Cipheriv=th,Nf.createDecipher=Nf.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),Xc[t])r=Xc[t].key,n=Xc[t].iv;else{if(!Yc[t])throw new TypeError("invalid suite type");r=8*Yc[t].key,n=Yc[t].iv}var i=Qc(e,!1,r,n);return eh(t,i.key,i.iv)},Nf.createDecipheriv=Nf.Decipheriv=eh,Nf.listCiphers=Nf.getCiphers=function(){return Object.keys(Yc).concat(Jc.getCiphers())};var rh,nh,ih,oh,ah={};function sh(){if(nh)return rh;nh=1;var t=V,e=Hd();function r(t){this.rand=t||new e.Rand}return rh=r,r.create=function(t){return new r(t)},r.prototype._randbelow=function(e){var r=e.bitLength(),n=Math.ceil(r/8);do{var i=new t(this.rand.generate(n))}while(i.cmp(e)>=0);return i},r.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},r.prototype.test=function(e,r,n){var i=e.bitLength(),o=t.mont(e),a=new t(1).toRed(o);r||(r=Math.max(1,i/48|0));for(var s=e.subn(1),f=0;!s.testn(f);f++);for(var u=e.shrn(f),c=s.toRed(o);r>0;r--){var h=this._randrange(new t(2),s);n&&n(h);var l=h.toRed(o).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var d=1;d<f;d++){if(0===(l=l.redSqr()).cmp(a))return!1;if(0===l.cmp(c))break}if(d===f)return!1}}return!0},r.prototype.getDivisor=function(e,r){var n=e.bitLength(),i=t.mont(e),o=new t(1).toRed(i);r||(r=Math.max(1,n/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var f=e.shrn(s),u=a.toRed(i);r>0;r--){var c=this._randrange(new t(2),a),h=e.gcd(c);if(0!==h.cmpn(1))return h;var l=c.toRed(i).redPow(f);if(0!==l.cmp(o)&&0!==l.cmp(u)){for(var d=1;d<s;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(u))break}if(d===s)return(l=l.redSqr()).fromRed().subn(1).gcd(e)}}return!1},rh}function fh(){if(oh)return ih;oh=1;var t=dt;ih=b,b.simpleSieve=d,b.fermatTest=p;var e=V,r=new e(24),n=new(sh()),i=new e(1),o=new e(2),a=new e(5);new e(16),new e(8);var s=new e(10),f=new e(3);new e(7);var u=new e(11),c=new e(4);new e(12);var h=null;function l(){if(null!==h)return h;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return h=t,t}function d(t){for(var e=l(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function p(t){var r=e.mont(t);return 0===o.toRed(r).redPow(t.subn(1)).fromRed().cmpn(1)}function b(h,l){if(h<16)return new e(2===l||5===l?[140,123]:[140,39]);var b,g;for(l=new e(l);;){for(b=new e(t(Math.ceil(h/8)));b.bitLength()>h;)b.ishrn(1);if(b.isEven()&&b.iadd(i),b.testn(1)||b.iadd(o),l.cmp(o)){if(!l.cmp(a))for(;b.mod(s).cmp(f);)b.iadd(c)}else for(;b.mod(r).cmp(u);)b.iadd(c);if(d(g=b.shrn(1))&&d(b)&&p(g)&&p(b)&&n.test(g)&&n.test(b))return b}}return ih}var uh,ch,hh,lh={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function dh(){if(ch)return uh;ch=1;var t=V,e=new(sh()),r=new t(24),n=new t(11),i=new t(10),o=new t(3),a=new t(7),s=fh(),f=dt;function u(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this._pub=new t(e),this}function c(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this._priv=new t(e),this}uh=l;var h={};function l(e,r,n){this.setGenerator(r),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=u,this.setPrivateKey=c):this._primeCode=8}function d(t,e){var r=new Buffer(t.toArray());return e?r.toString(e):r}return Object.defineProperty(l.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,f){var u=f.toString("hex"),c=[u,t.toString(16)].join("_");if(c in h)return h[c];var l,d=0;if(t.isEven()||!s.simpleSieve||!s.fermatTest(t)||!e.test(t))return d+=1,d+="02"===u||"05"===u?8:4,h[c]=d,d;switch(e.test(t.shrn(1))||(d+=2),u){case"02":t.mod(r).cmp(n)&&(d+=8);break;case"05":(l=t.mod(i)).cmp(o)&&l.cmp(a)&&(d+=8);break;default:d+=4}return h[c]=d,d}(this.__prime,this.__gen)),this._primeCode}}),l.prototype.generateKeys=function(){return this._priv||(this._priv=new t(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},l.prototype.computeSecret=function(e){var r=(e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new Buffer(r.toArray()),i=this.getPrime();if(n.length<i.length){var o=new Buffer(i.length-n.length);o.fill(0),n=Buffer.concat([o,n])}return n},l.prototype.getPublicKey=function(t){return d(this._pub,t)},l.prototype.getPrivateKey=function(t){return d(this._priv,t)},l.prototype.getPrime=function(t){return d(this.__prime,t)},l.prototype.getGenerator=function(t){return d(this._gen,t)},l.prototype.setGenerator=function(e,r){return r=r||"utf8",Buffer.isBuffer(e)||(e=new Buffer(e,r)),this.__gen=e,this._gen=new t(e),this},uh}var ph={exports:{}},bh={exports:{}};!function(t){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function i(t,e,r){if(i.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:H.Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function s(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function f(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),f=e;f<s;f++){var u=t.charCodeAt(f)-48;o*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a<i,"Invalid character"),o+=a}return o}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(i.isBN=function(t){return t instanceof i||null!==t&&"object"==typeof t&&t.constructor.wordSize===i.wordSize&&Array.isArray(t.words)},i.max=function(t,e){return t.cmp(e)>0?t:e},i.min=function(t,e){return t.cmp(e)<0?t:e},i.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},i.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},i.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},i.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=s(t,e,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},i.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=n)u=f(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=f(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},i.prototype._move=function(t){u(t,this)},i.prototype.clone=function(){var t=new i(null);return this.copy(t),t},i.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(t){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],f=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?h[6-f.length]+f+n:f+n}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],c=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(t);n=(p=p.idivn(c)).isZero()?b+n:h[u-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),i.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,f=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var c=f>>>26,h=67108863&f,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r._strip()}i.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},i.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r++]=255&a,r<t.length&&(t[r++]=a>>8&255),r<t.length&&(t[r++]=a>>16&255),6===o?(r<t.length&&(t[r++]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},i.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|n;t[r--]=255&a,r>=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?i.prototype._countBits=function(t){return 32-Math.clz32(t)}:i.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},i.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},i.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},i.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},i.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},i.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},i.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},i.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},i.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},i.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},i.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},i.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},i.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},i.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},i.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},i.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(t){return this.clone().inotn(t)},i.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},i.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a<n.length;a++)o=(e=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(t){return this.clone().isub(t)};var b=function(t,e,r){var n,i,o,a=t.words,s=e.words,f=r.words,u=0,c=0|a[0],h=8191&c,l=c>>>13,d=0|a[1],p=8191&d,b=d>>>13,g=0|a[2],y=8191&g,m=g>>>13,v=0|a[3],_=8191&v,w=v>>>13,E=0|a[4],S=8191&E,A=E>>>13,M=0|a[5],k=8191&M,T=M>>>13,B=0|a[6],x=8191&B,O=B>>>13,j=0|a[7],R=8191&j,I=j>>>13,P=0|a[8],C=8191&P,L=P>>>13,N=0|a[9],U=8191&N,F=N>>>13,D=0|s[0],q=8191&D,z=D>>>13,H=0|s[1],V=8191&H,W=H>>>13,K=0|s[2],$=8191&K,G=K>>>13,Z=0|s[3],J=8191&Z,X=Z>>>13,Y=0|s[4],Q=8191&Y,tt=Y>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ft=8191&st,ut=st>>>13,ct=0|s[8],ht=8191&ct,lt=ct>>>13,dt=0|s[9],pt=8191&dt,bt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,q)|0))<<13)|0;u=((o=Math.imul(l,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,z))+Math.imul(b,q)|0,o=Math.imul(b,z);var yt=(u+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,V)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,z))+Math.imul(m,q)|0,o=Math.imul(m,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0;var mt=(u+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,$)|0))<<13)|0;u=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,z))+Math.imul(w,q)|0,o=Math.imul(w,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,G)|0;var vt=(u+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(l,J)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,q),i=(i=Math.imul(S,z))+Math.imul(A,q)|0,o=Math.imul(A,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,X)|0;var _t=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,z))+Math.imul(T,q)|0,o=Math.imul(T,z),n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,G)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var wt=(u+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;u=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,q),i=(i=Math.imul(x,z))+Math.imul(O,q)|0,o=Math.imul(O,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(_,J)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0;var Et=(u+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,at)|0)+Math.imul(l,ot)|0))<<13)|0;u=((o=o+Math.imul(l,at)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(R,q),i=(i=Math.imul(R,z))+Math.imul(I,q)|0,o=Math.imul(I,z),n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0;var St=(u+(n=n+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,ut)|0)+Math.imul(l,ft)|0))<<13)|0;u=((o=o+Math.imul(l,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,z))+Math.imul(L,q)|0,o=Math.imul(L,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(_,rt)|0,i=(i=i+Math.imul(_,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(y,ot)|0,i=(i=i+Math.imul(y,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ut)|0;var At=(u+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;u=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,z))+Math.imul(F,q)|0,o=Math.imul(F,z),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,W)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ut)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,lt)|0;var Mt=(u+(n=n+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(l,pt)|0))<<13)|0;u=((o=o+Math.imul(l,bt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,W))+Math.imul(F,V)|0,o=Math.imul(F,W),n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,G)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(_,ft)|0,i=(i=i+Math.imul(_,ut)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ut)|0,n=n+Math.imul(y,ht)|0,i=(i=i+Math.imul(y,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,$),i=(i=Math.imul(U,G))+Math.imul(F,$)|0,o=Math.imul(F,G),n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,J)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(_,ht)|0,i=(i=i+Math.imul(_,lt)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,lt)|0;var Tt=(u+(n=n+Math.imul(y,pt)|0)|0)+((8191&(i=(i=i+Math.imul(y,bt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,J),i=(i=Math.imul(U,X))+Math.imul(F,J)|0,o=Math.imul(F,X),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ut)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ut)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,lt)|0;var Bt=(u+(n=n+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,bt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,bt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ut)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ut)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var xt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;u=((o=o+Math.imul(A,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,rt),i=(i=Math.imul(U,nt))+Math.imul(F,rt)|0,o=Math.imul(F,nt),n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,lt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,lt)|0;var Ot=(u+(n=n+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,ot),i=(i=Math.imul(U,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ut)|0)+Math.imul(L,ft)|0,o=o+Math.imul(L,ut)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,lt)|0;var jt=(u+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(U,ft),i=(i=Math.imul(U,ut))+Math.imul(F,ft)|0,o=Math.imul(F,ut),n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,lt)|0;var Rt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,ht),i=(i=Math.imul(U,lt))+Math.imul(F,ht)|0,o=Math.imul(F,lt);var It=(u+(n=n+Math.imul(C,pt)|0)|0)+((8191&(i=(i=i+Math.imul(C,bt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(u+(n=Math.imul(U,pt))|0)+((8191&(i=(i=Math.imul(U,bt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,bt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,f[0]=gt,f[1]=yt,f[2]=mt,f[3]=vt,f[4]=_t,f[5]=wt,f[6]=Et,f[7]=St,f[8]=At,f[9]=Mt,f[10]=kt,f[11]=Tt,f[12]=Bt,f[13]=xt,f[14]=Ot,f[15]=jt,f[16]=Rt,f[17]=It,f[18]=Pt,0!==u&&(f[19]=u,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,f=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=f;u++){var c=o-u,h=(0|t.words[c])*(0|e.words[u]),l=67108863&h;s=67108863&(l=l+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return g(t,e,r)}Math.imul||(b=p),i.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?b(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):y(this,t,e)},i.prototype.mul=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},i.prototype.mulf=function(t){var e=new i(null);return e.words=new Array(this.length+t.length),y(this,t,e)},i.prototype.imul=function(t){return this.clone().mulTo(t,this)},i.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,a=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),this.length=0===t?1:this.length,e?this.ineg():this},i.prototype.muln=function(t){return this.clone().imuln(t)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new i(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var o=r.sqr();n<e.length;n++,o=o.sqr())0!==e[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,f=(0|this.words[e])-s<<n;this.words[e]=f|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},i.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,f=n;if(i-=a,i=Math.max(0,i),f){for(var u=0;u<a;u++)f.words[u]=this.words[u];f.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},i.prototype.shln=function(t){return this.clone().ishln(t)},i.prototype.ushln=function(t){return this.clone().iushln(t)},i.prototype.shrn=function(t){return this.clone().ishrn(t)},i.prototype.ushrn=function(t){return this.clone().iushrn(t)},i.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(t){return this.clone().imaskn(t)},i.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},i.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},i.prototype.addn=function(t){return this.clone().iaddn(t)},i.prototype.subn=function(t){return this.clone().isubn(t)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var f=(0|t.words[i])*e;s=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},i.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),o=t,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,f=n.length-o.length;if("mod"!==e){(s=new i(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var c=n.clone()._ishlnsubmul(o,1,f);0===c.negative&&(n=c,s&&(s.words[f]=1));for(var h=f-1;h>=0;h--){var l=67108864*(0|n.words[o.length+h])+(0|n.words[o.length+h-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=l)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(o=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:o,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new i(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new i(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,a,s},i.prototype.div=function(t){return this.divmod(t,"div",!1).div},i.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},i.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},i.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},i.prototype.modn=function(t){return this.modrn(t)},i.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},i.prototype.divn=function(t){return this.clone().idivn(t)},i.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new i(1),a=new i(0),s=new i(0),f=new i(1),u=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=e.clone();!e.isZero();){for(var l=0,d=1;!(e.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(c),a.isub(h)),o.iushrn(1),a.iushrn(1);for(var p=0,b=1;!(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(h)),s.iushrn(1),f.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s),a.isub(f)):(n.isub(e),s.isub(o),f.isub(a))}return{a:s,b:f,gcd:n.iushln(u)}},i.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,a=new i(1),s=new i(0),f=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;!(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var h=0,l=1;!(n.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(o=0===e.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(t),o},i.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},i.prototype.invm=function(t){return this.egcd(t).a.umod(t)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(t){return this.words[0]&t},i.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},i.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},i.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},i.prototype.gtn=function(t){return 1===this.cmpn(t)},i.prototype.gt=function(t){return 1===this.cmp(t)},i.prototype.gten=function(t){return this.cmpn(t)>=0},i.prototype.gte=function(t){return this.cmp(t)>=0},i.prototype.ltn=function(t){return-1===this.cmpn(t)},i.prototype.lt=function(t){return-1===this.cmp(t)},i.prototype.lten=function(t){return this.cmpn(t)<=0},i.prototype.lte=function(t){return this.cmp(t)<=0},i.prototype.eqn=function(t){return 0===this.cmpn(t)},i.prototype.eq=function(t){return 0===this.cmp(t)},i.red=function(t){return new A(t)},i.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(t){return this.red=t,this},i.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},i.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},i.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},i.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},i.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},i.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},i.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},i.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=i._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new i(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},n(_,v),_.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var a=0|t.words[i];t.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(w,v),n(E,v),n(S,v),S.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},i._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new w;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return m[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new i(1)).iushrn(2);return this.pow(t,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var h=this.pow(c,o),l=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=a;0!==d.cmp(s);){for(var b=d,g=0;0!==b.cmp(s);g++)b=b.redSqr();r(g<p);var y=this.pow(h,new i(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new i(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var o=r[0],a=0,s=0,f=e.bitLength()%26;for(0===f&&(f=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],c=f-1;c>=0;c--){var h=u>>c&1;o!==r[0]&&(o=this.sqr(o)),0!==h||0!==a?(a<<=1,a|=h,(4===++s||0===n&&0===c)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}f=26}return o},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},i.mont=function(t){return new M(t)},n(M,A),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new i(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,e)}(bh);var gh=bh.exports,yh=r(gh),mh=gh,vh=dt,_h=ft.Buffer;function wh(t){var e,r=t.modulus.byteLength();do{e=new mh(vh(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function Eh(t,e){var r=function(t){var e=wh(t);return{blinder:e.toRed(mh.mont(t.modulus)).redPow(new mh(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),n=e.modulus.byteLength(),i=new mh(t).mul(r.blinder).umod(e.modulus),o=i.toRed(mh.mont(e.prime1)),a=i.toRed(mh.mont(e.prime2)),s=e.coefficient,f=e.prime1,u=e.prime2,c=o.redPow(e.exponent1).fromRed(),h=a.redPow(e.exponent2).fromRed(),l=c.isub(h).imul(s).umod(f).imul(u);return h.iadd(l).imul(r.unblinder).umod(e.modulus).toArrayLike(_h,"be",n)}Eh.getr=wh;var Sh,Ah=Eh,Mh={},kh={},Th={};var Bh={},xh={},Oh=bt;function jh(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Rh(t,e){this.path=t,this.rethrow(e)}xh.Reporter=jh,jh.prototype.isError=function(t){return t instanceof Rh},jh.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},jh.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},jh.prototype.enterKey=function(t){return this._reporterState.path.push(t)},jh.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},jh.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},jh.prototype.path=function(){return this._reporterState.path.join("/")},jh.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},jh.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},jh.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof Rh;if(e=n?t:new Rh(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},jh.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},Oh(Rh,Error),Rh.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Rh),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var Ih,Ph,Ch,Lh,Nh={};function Uh(){if(Ih)return Nh;Ih=1;var t=bt,e=Fh().Reporter,r=Y.Buffer;function n(t,n){e.call(this,n),r.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function i(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof i||(t=new i(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=r.byteLength(t);else{if(!r.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}return t(n,e),Nh.DecoderBuffer=n,n.prototype.save=function(){return{offset:this.offset,reporter:e.prototype.save.call(this)}},n.prototype.restore=function(t){var r=new n(this.base);return r.offset=t.offset,r.length=this.offset,this.offset=t.offset,e.prototype.restore.call(this,t.reporter),r},n.prototype.isEmpty=function(){return this.offset===this.length},n.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},n.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new n(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},n.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},Nh.EncoderBuffer=i,i.prototype.join=function(t,e){return t||(t=new r(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):r.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t},Nh}function Fh(){return Lh||(Lh=1,function(t){var e=t;e.Reporter=xh.Reporter,e.DecoderBuffer=Uh().DecoderBuffer,e.EncoderBuffer=Uh().EncoderBuffer,e.Node=function(){if(Ch)return Ph;Ch=1;var t=Fh().Reporter,e=Fh().EncoderBuffer,r=Fh().DecoderBuffer,n=W,i=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(i);function a(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}Ph=a;var s=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];return a.prototype.clone=function(){var t=this._baseState,e={};s.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},a.prototype._wrap=function(){var t=this._baseState;o.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},a.prototype._init=function(t){var e=this._baseState;n(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),n.equal(e.children.length,1,"Root node can have only one child")},a.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(n(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(n(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){a.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),i.forEach((function(t){a.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return n(null===e.tag),e.tag=t,this._useArgs(r),this}})),a.prototype.use=function(t){n(t);var e=this._baseState;return n(null===e.use),e.use=t,this},a.prototype.optional=function(){return this._baseState.optional=!0,this},a.prototype.def=function(t){var e=this._baseState;return n(null===e.default),e.default=t,e.optional=!0,this},a.prototype.explicit=function(t){var e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.explicit=t,this},a.prototype.implicit=function(t){var e=this._baseState;return n(null===e.explicit&&null===e.implicit),e.implicit=t,this},a.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},a.prototype.key=function(t){var e=this._baseState;return n(null===e.key),e.key=t,this},a.prototype.any=function(){return this._baseState.any=!0,this},a.prototype.choice=function(t){var e=this._baseState;return n(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},a.prototype.contains=function(t){var e=this._baseState;return n(null===e.use),e.contains=t,this},a.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var i,o=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){var f=null;if(null!==n.explicit?f=n.explicit:null!==n.implicit?f=n.implicit:null!==n.tag&&(f=n.tag),null!==f||n.any){if(a=this._peekTag(t,f,n.any),t.isError(a))return a}else{var u=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(u)}}if(n.obj&&a&&(i=t.enterObject()),a){if(null!==n.explicit){var c=this._decodeTag(t,n.explicit);if(t.isError(c))return c;t=c}var h=t.offset;if(null===n.use&&null===n.choice){n.any&&(u=t.save());var l=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(l))return l;n.any?o=t.raw(u):t=l}if(e&&e.track&&null!==n.tag&&e.track(t.path(),h,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(o=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(o))return o;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(r){r._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var d=new r(o);o=this._getUse(n.contains,t._reporterState.obj)._decode(d,e)}}return n.obj&&a&&(o=t.leaveObject(i)),null===n.key||null===o&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,o),o},a.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},a.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),n(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},a.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=t.save(),s=r.choice[o];try{var f=s._decode(t,e);if(t.isError(f))return!1;n={type:o,value:f},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?n:t.error("Choice not matched")},a.prototype._createEncoderBuffer=function(t){return new e(t,this.reporter)},a.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},a.prototype._encodeValue=function(e,r,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,r||new t);var o=null;if(this.reporter=r,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,r);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,r),s=!0;else if(i.children)a=i.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,r,e);if(null===t._baseState.key)return r.error("Child should have a key");var n=r.enterKey(t._baseState.key);if("object"!=typeof e)return r.error("Child expected, but input is not object");var i=t._encode(e[t._baseState.key],r,e);return r.leaveKey(n),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(t){var n=this._baseState;return this._getUse(n.args[0],e)._encode(t,r)}),f))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,r):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===u?null===i.use&&r.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,s,c,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},a.prototype._encodeChoice=function(t,e){var r=this._baseState,i=r.choice[t.type];return i||n(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},a.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},a.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},a.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)},Ph}()}(Bh)),Bh}var Dh,qh,zh={},Hh={};function Vh(){return qh||(qh=1,function(t){var e=t;e._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},e.der=(Dh||(Dh=1,function(t){var e=Vh();t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e._reverse(t.tag)}(Hh)),Hh)}(zh)),zh}var Wh,Kh,$h,Gh,Zh,Jh={};function Xh(){if(Kh)return Wh;Kh=1;var t=bt,e=fl(),r=e.base,n=e.bignum,i=e.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){r.Node.call(this,"der",t)}function s(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=i.tagClass[r>>6],o=!(32&r);if(31&~r)r&=31;else{var a=r;for(r=0;!(128&~a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}return{cls:n,primitive:o,tag:r,tagStr:i.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var a=t.readUInt8(r);if(t.isError(a))return a;n|=a}return n}return Wh=o,o.prototype.decode=function(t,e){return t instanceof r.DecoderBuffer||(t=new r.DecoderBuffer(t,e)),this.tree._decode(t,e)},t(a,r.Node),a.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=s(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},a.prototype._decodeTag=function(t,e,r){var n=s(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=f(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},a.prototype._skipUntilEnd=function(t,e){for(;;){var r=s(t,e);if(t.isError(r))return r;var n,i=f(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},a.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var a=r.decode(t,"der",n);if(t.isError(a)&&o)break;i.push(a)}return i},a.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var a=t.raw().toString("ascii");return this._isNumstr(a)?a:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},a.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var a=t.readUInt8();o<<=7,o|=127&a,128&a||(i.push(o),o=0)}128&a&&i.push(o);var s=i[0]/40|0,f=i[0]%40;if(n=r?i:[s,f].concat(i.slice(1)),e){var u=e[n.join(" ")];void 0===u&&(u=e[n.join(".")]),void 0!==u&&(n=u)}return n},a.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),f=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),f=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,f,0)},a.prototype._decodeNull=function(t){return null},a.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},a.prototype._decodeInt=function(t,e){var r=t.raw(),i=new n(r);return e&&(i=e[i.toString(10)]||i),i},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree},Wh}function Yh(){return Zh||(Zh=1,function(t){var e=t;e.der=Xh(),e.pem=function(){if(Gh)return $h;Gh=1;var t=bt,e=Y.Buffer,r=Xh();function n(t){r.call(this,t),this.enc="pem"}return t(n,r),$h=n,n.prototype.decode=function(t,n){for(var i=t.toString().split(/[\r\n]+/g),o=n.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,f=-1,u=0;u<i.length;u++){var c=i[u].match(a);if(null!==c&&c[2]===o){if(-1!==s){if("END"!==c[1])break;f=u;break}if("BEGIN"!==c[1])break;s=u}}if(-1===s||-1===f)throw new Error("PEM section not found for: "+o);var h=i.slice(s+1,f).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new e(h,"base64");return r.prototype.decode.call(this,l,n)},$h}()}(Jh)),Jh}var Qh,tl,el,rl,nl,il,ol={};function al(){if(tl)return Qh;tl=1;var t=bt,e=Y.Buffer,r=fl(),n=r.base,i=r.constants.der;function o(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new a,this.tree._init(t.body)}function a(t){n.Node.call(this,"der",t)}function s(t){return t<10?"0"+t:t}return Qh=o,o.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},t(a,n.Node),a.prototype._encodeComposite=function(t,r,n,o){var a,s=function(t,e,r,n){var o;"seqof"===t?t="seq":"setof"===t&&(t="set");if(i.tagByName.hasOwnProperty(t))o=i.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);o=t}if(o>=31)return n.error("Multi-octet tag encoding unsupported");e||(o|=32);return o|=i.tagClassByName[r||"universal"]<<6,o}(t,r,n,this.reporter);if(o.length<128)return(a=new e(2))[0]=s,a[1]=o.length,this._createEncoderBuffer([a,o]);for(var f=1,u=o.length;u>=256;u>>=8)f++;(a=new e(2+f))[0]=s,a[1]=128|f;u=1+f;for(var c=o.length;c>0;u--,c>>=8)a[u]=255&c;return this._createEncoderBuffer([a,o])},a.prototype._encodeStr=function(t,r){if("bitstr"===r)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===r){for(var n=new e(2*t.length),i=0;i<t.length;i++)n.writeUInt16BE(t.charCodeAt(i),2*i);return this._createEncoderBuffer(n)}return"numstr"===r?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===r?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)||"objDesc"===r?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+r+" unsupported")},a.prototype._encodeObjid=function(t,r,n){if("string"==typeof t){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=r[t].split(/[\s\.]+/g);for(var i=0;i<t.length;i++)t[i]|=0}else if(Array.isArray(t)){t=t.slice();for(i=0;i<t.length;i++)t[i]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(i=0;i<t.length;i++){var a=t[i];for(o++;a>=128;a>>=7)o++}var s=new e(o),f=s.length-1;for(i=t.length-1;i>=0;i--){a=t[i];for(s[f--]=127&a;(a>>=7)>0;)s[f--]=128|127&a}return this._createEncoderBuffer(s)},a.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[s(n.getFullYear()),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[s(n.getFullYear()%100),s(n.getUTCMonth()+1),s(n.getUTCDate()),s(n.getUTCHours()),s(n.getUTCMinutes()),s(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},a.prototype._encodeNull=function(){return this._createEncoderBuffer("")},a.prototype._encodeInt=function(t,r){if("string"==typeof t){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=r[t]}if("number"!=typeof t&&!e.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=new e(n)}if(e.isBuffer(t)){var i=t.length;0===t.length&&i++;var o=new e(i);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);i=1;for(var a=t;a>=256;a>>=8)i++;for(a=(o=new Array(i)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new e(o))},a.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},a.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},a.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0},Qh}function sl(){return nl||(nl=1,function(t){var e=t;e.der=al(),e.pem=function(){if(rl)return el;rl=1;var t=bt,e=al();function r(t){e.call(this,t),this.enc="pem"}return t(r,e),el=r,r.prototype.encode=function(t,r){for(var n=e.prototype.encode.call(this,t).toString("base64"),i=["-----BEGIN "+r.label+"-----"],o=0;o<n.length;o+=64)i.push(n.slice(o,o+64));return i.push("-----END "+r.label+"-----"),i.join("\n")},el}()}(ol)),ol}function fl(){return il||(il=1,function(t){var e=t;e.bignum=V,e.define=(Sh||(Sh=1,function(t){var e=fl(),r=bt;function n(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}t.define=function(t,e){return new n(t,e)},n.prototype._createNamed=function(t){var e;try{e=require("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return r(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},n.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(e.decoders[t])),this.decoders[t]},n.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},n.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(e.encoders[t])),this.encoders[t]},n.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}}(Th)),Th).define,e.base=Fh(),e.constants=Vh(),e.decoders=Yh(),e.encoders=sl()}(kh)),kh}var ul=fl(),cl=ul.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),hl=ul.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),ll=ul.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),dl=ul.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(ll),this.key("subjectPublicKey").bitstr())})),pl=ul.define("RelativeDistinguishedName",(function(){this.setof(hl)})),bl=ul.define("RDNSequence",(function(){this.seqof(pl)})),gl=ul.define("Name",(function(){this.choice({rdnSequence:this.use(bl)})})),yl=ul.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(cl),this.key("notAfter").use(cl))})),ml=ul.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),vl=ul.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(ll),this.key("issuer").use(gl),this.key("validity").use(yl),this.key("subject").use(gl),this.key("subjectPublicKeyInfo").use(dl),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(ml).optional())})),_l=ul.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(vl),this.key("signatureAlgorithm").use(ll),this.key("signatureValue").bitstr())})),wl=fl();Mh.certificate=_l;var El=wl.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));Mh.RSAPrivateKey=El;var Sl=wl.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));Mh.RSAPublicKey=Sl;var Al=wl.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),Ml=wl.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(Al),this.key("subjectPublicKey").bitstr())}));Mh.PublicKey=Ml;var kl=wl.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(Al),this.key("subjectPrivateKey").octstr())}));Mh.PrivateKey=kl;var Tl=wl.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));Mh.EncryptedPrivateKey=Tl;var Bl=wl.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));Mh.DSAPrivateKey=Bl,Mh.DSAparam=wl.define("DSAparam",(function(){this.int()}));var xl=wl.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),Ol=wl.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(xl),this.key("publicKey").optional().explicit(1).bitstr())}));Mh.ECPrivateKey=Ol,Mh.signature=wl.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}));var jl=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,Rl=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Il=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Pl=Ec,Cl=yu,Ll=ft.Buffer,Nl=Mh,Ul={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"},Fl=function(t,e){var r,n=t.toString(),i=n.match(jl);if(i){var o="aes"+i[1],a=Ll.from(i[2],"hex"),s=Ll.from(i[3].replace(/[\r\n]/g,""),"base64"),f=Pl(e,a.slice(0,8),parseInt(i[1],10)).key,u=[],c=Cl.createDecipheriv(o,f,a);u.push(c.update(s)),u.push(c.final()),r=Ll.concat(u)}else{var h=n.match(Il);r=Ll.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:n.match(Rl)[1],data:r}},Dl=yu,ql=ef.pbkdf2Sync,zl=ft.Buffer;function Hl(t){var e;"object"!=typeof t||zl.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=zl.from(t));var r,n,i=Fl(t,e),o=i.tag,a=i.data;switch(o){case"CERTIFICATE":n=Nl.certificate.decode(a,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(n||(n=Nl.PublicKey.decode(a,"der")),r=n.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Nl.RSAPublicKey.decode(n.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return n.subjectPrivateKey=n.subjectPublicKey,{type:"ec",data:n};case"1.2.840.10040.4.1":return n.algorithm.params.pub_key=Nl.DSAparam.decode(n.subjectPublicKey.data,"der"),{type:"dsa",data:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":a=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=Ul[t.algorithm.decrypt.cipher.algo.join(".")],o=t.algorithm.decrypt.cipher.iv,a=t.subjectPrivateKey,s=parseInt(i.split("-")[1],10)/8,f=ql(e,r,n,s,"sha1"),u=Dl.createDecipheriv(i,f,o),c=[];return c.push(u.update(a)),c.push(u.final()),zl.concat(c)}(a=Nl.EncryptedPrivateKey.decode(a,"der"),e);case"PRIVATE KEY":switch(r=(n=Nl.PrivateKey.decode(a,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return Nl.RSAPrivateKey.decode(n.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:n.algorithm.curve,privateKey:Nl.ECPrivateKey.decode(n.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return n.algorithm.params.priv_key=Nl.DSAparam.decode(n.subjectPrivateKey,"der"),{type:"dsa",params:n.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return Nl.RSAPublicKey.decode(a,"der");case"RSA PRIVATE KEY":return Nl.RSAPrivateKey.decode(a,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:Nl.DSAPrivateKey.decode(a,"der")};case"EC PRIVATE KEY":return{curve:(a=Nl.ECPrivateKey.decode(a,"der")).parameters.value,privateKey:a.privateKey};default:throw new Error("unknown key type "+o)}}Hl.signature=Nl.signature;var Vl,Wl,Kl,$l,Gl,Zl,Jl,Xl=Hl,Yl={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"};function Ql(){if(Vl)return ph.exports;Vl=1;var t=ft.Buffer,e=Xs,r=Ah,n=uy().ec,i=gh,o=Xl,a=Yl;function s(r,n,i,o){if((r=t.from(r.toArray())).length<n.byteLength()){var a=t.alloc(n.byteLength()-r.length);r=t.concat([a,r])}var s=i.length,u=function(e,r){e=f(e,r),e=e.mod(r);var n=t.from(e.toArray());if(n.length<r.byteLength()){var i=t.alloc(r.byteLength()-n.length);n=t.concat([i,n])}return n}(i,n),c=t.alloc(s);c.fill(1);var h=t.alloc(s);return h=e(o,h).update(c).update(t.from([0])).update(r).update(u).digest(),c=e(o,h).update(c).digest(),{k:h=e(o,h).update(c).update(t.from([1])).update(r).update(u).digest(),v:c=e(o,h).update(c).digest()}}function f(t,e){var r=new i(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function u(r,n,i){var o,a;do{for(o=t.alloc(0);8*o.length<r.bitLength();)n.v=e(i,n.k).update(n.v).digest(),o=t.concat([o,n.v]);a=f(o,r),n.k=e(i,n.k).update(n.v).update(t.from([0])).digest(),n.v=e(i,n.k).update(n.v).digest()}while(-1!==a.cmp(r));return a}function c(t,e,r,n){return t.toRed(i.mont(r)).redPow(e).fromRed().mod(n)}return ph.exports=function(e,h,l,d,p){var b=o(h);if(b.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(e,r){var i=a[r.curve.join(".")];if(!i)throw new Error("unknown curve "+r.curve.join("."));var o=new n(i),s=o.keyFromPrivate(r.privateKey),f=s.sign(e);return t.from(f.toDER())}(e,b)}if("dsa"===b.type){if("dsa"!==d)throw new Error("wrong private key type");return function(e,r,n){var o,a=r.params.priv_key,h=r.params.p,l=r.params.q,d=r.params.g,p=new i(0),b=f(e,l).mod(l),g=!1,y=s(a,l,e,n);for(;!1===g;)p=c(d,o=u(l,y,n),h,l),0===(g=o.invm(l).imul(b.add(a.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new i(0));return function(e,r){e=e.toArray(),r=r.toArray(),128&e[0]&&(e=[0].concat(e));128&r[0]&&(r=[0].concat(r));var n=e.length+r.length+4,i=[48,n,2,e.length];return i=i.concat(e,[2,r.length],r),t.from(i)}(p,g)}(e,b,l)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");if(void 0!==h.padding&&1!==h.padding)throw new Error("illegal or unsupported padding mode");e=t.concat([p,e]);for(var g=b.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var m=-1;++m<e.length;)y.push(e[m]);return r(y,b)},ph.exports.getKey=s,ph.exports.makeKey=u,ph.exports}function td(){if(Kl)return Wl;Kl=1;var t=ft.Buffer,e=gh,r=uy().ec,n=Xl,i=Yl;function o(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}return Wl=function(a,s,f,u,c){var h=n(f);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,n){var o=i[n.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var a=new r(o),s=n.data.subjectPrivateKey.data;return a.verify(e,t,s)}(a,s,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,r,i){var a=i.data.p,s=i.data.q,f=i.data.g,u=i.data.pub_key,c=n.signature.decode(t,"der"),h=c.s,l=c.r;o(h,s),o(l,s);var d=e.mont(a),p=h.invm(s),b=f.toRed(d).redPow(new e(r).mul(p).mod(s)).fromRed().mul(u.toRed(d).redPow(l.mul(p).mod(s)).fromRed()).mod(a).mod(s);return 0===b.cmp(l)}(a,s,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");s=t.concat([c,s]);for(var l=h.modulus.byteLength(),d=[1],p=0;s.length+d.length+2<l;)d.push(255),p+=1;d.push(0);for(var b=-1;++b<s.length;)d.push(s[b]);d=t.from(d);var g=e.mont(h.modulus);a=(a=new e(a).toRed(g)).redPow(new e(h.publicExponent)),a=t.from(a.fromRed().toArray());var y=p<8?1:0;for(l=Math.min(a.length,d.length),a.length!==d.length&&(y=1),b=-1;++b<l;)y|=a[b]^d[b];return 0===y},Wl}var ed={},rd=js,nd=ft.Buffer,id=function(t,e){for(var r,n=nd.alloc(0),i=0;n.length<e;)r=od(i++),n=nd.concat([n,rd("sha1").update(t).update(r).digest()]);return n.slice(0,e)};function od(t){var e=nd.allocUnsafe(4);return e.writeUInt32BE(t,0),e}var ad=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t},sd=V,fd=ft.Buffer;var ud=function(t,e){return fd.from(t.toRed(sd.mont(e.modulus)).redPow(new sd(e.publicExponent)).fromRed().toArray())},cd=Xl,hd=dt,ld=js,dd=id,pd=ad,bd=V,gd=ud,yd=Ah,md=ft.Buffer,vd=function(t,e,r){var n;n=t.padding?t.padding:r?1:4;var i,o=cd(t);if(4===n)i=function(t,e){var r=t.modulus.byteLength(),n=e.length,i=ld("sha1").update(md.alloc(0)).digest(),o=i.length,a=2*o;if(n>r-a-2)throw new Error("message too long");var s=md.alloc(r-n-a-2),f=r-o-1,u=hd(o),c=pd(md.concat([i,s,md.alloc(1,1),e],f),dd(u,f)),h=pd(u,dd(c,o));return new bd(md.concat([md.alloc(1),h,c],r))}(o,e);else if(1===n)i=function(t,e,r){var n,i=e.length,o=t.modulus.byteLength();if(i>o-11)throw new Error("message too long");n=r?md.alloc(o-i-3,255):function(t){var e,r=md.allocUnsafe(t),n=0,i=hd(2*t),o=0;for(;n<t;)o===i.length&&(i=hd(2*t),o=0),(e=i[o++])&&(r[n++]=e);return r}(o-i-3);return new bd(md.concat([md.from([0,r?1:2]),n,md.alloc(1),e],o))}(o,e,r);else{if(3!==n)throw new Error("unknown padding");if((i=new bd(e)).cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return r?yd(i,o):gd(i,o)};var _d=Xl,wd=id,Ed=ad,Sd=V,Ad=Ah,Md=js,kd=ud,Td=ft.Buffer,Bd=function(t,e,r){var n;n=t.padding?t.padding:r?1:4;var i,o=_d(t),a=o.modulus.byteLength();if(e.length>a||new Sd(e).cmp(o.modulus)>=0)throw new Error("decryption error");i=r?kd(new Sd(e),o):Ad(e,o);var s=Td.alloc(a-i.length);if(i=Td.concat([s,i],a),4===n)return function(t,e){var r=t.modulus.byteLength(),n=Md("sha1").update(Td.alloc(0)).digest(),i=n.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,i+1),a=e.slice(i+1),s=Ed(o,wd(a,i)),f=Ed(a,wd(s,r-i-1));if(function(t,e){t=Td.from(t),e=Td.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,f.slice(0,i)))throw new Error("decryption error");var u=i;for(;0===f[u];)u++;if(1!==f[u++])throw new Error("decryption error");return f.slice(u)}(o,i);if(1===n)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var a=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,i,r);if(3===n)return i;throw new Error("unknown padding")};!function(t){t.publicEncrypt=vd,t.privateDecrypt=Bd,t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}}(ed);var xd={};function Od(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var jd,Rd,Id=ft,Pd=dt,Cd=Id.Buffer,Ld=Id.kMaxLength,Nd=e.crypto||e.msCrypto,Ud=Math.pow(2,32)-1;function Fd(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Ud||t<0)throw new TypeError("offset must be a uint32");if(t>Ld||t>e)throw new RangeError("offset out of range")}function Dd(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Ud||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Ld)throw new RangeError("buffer too small")}function qd(t,e,r,n){if(process.browser){var i=t.buffer,o=new Uint8Array(i,e,r);return Nd.getRandomValues(o),n?void process.nextTick((function(){n(null,t)})):t}if(!n)return Pd(r).copy(t,e),t;Pd(r,(function(r,i){if(r)return n(r);i.copy(t,e),n(null,t)}))}function zd(){if(jd)return Z;jd=1,Z.randomBytes=Z.rng=Z.pseudoRandomBytes=Z.prng=dt,Z.createHash=Z.Hash=js,Z.createHmac=Z.Hmac=Xs;var t=tf,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Z.getHashes=function(){return r};var n=ef;Z.pbkdf2=n.pbkdf2,Z.pbkdf2Sync=n.pbkdf2Sync;var i=Nf;Z.Cipher=i.Cipher,Z.createCipher=i.createCipher,Z.Cipheriv=i.Cipheriv,Z.createCipheriv=i.createCipheriv,Z.Decipher=i.Decipher,Z.createDecipher=i.createDecipher,Z.Decipheriv=i.Decipheriv,Z.createDecipheriv=i.createDecipheriv,Z.getCiphers=i.getCiphers,Z.listCiphers=i.listCiphers;var o=function(){if(hh)return ah;hh=1;var t=fh(),e=lh,r=dh(),n={binary:!0,hex:!0,base64:!0};return ah.DiffieHellmanGroup=ah.createDiffieHellmanGroup=ah.getDiffieHellman=function(t){var n=new Buffer(e[t].prime,"hex"),i=new Buffer(e[t].gen,"hex");return new r(n,i)},ah.createDiffieHellman=ah.DiffieHellman=function e(i,o,a,s){return Buffer.isBuffer(o)||void 0===n[o]?e(i,"binary",o,a):(o=o||"binary",s=s||"binary",a=a||new Buffer([2]),Buffer.isBuffer(a)||(a=new Buffer(a,s)),"number"==typeof i?new r(t(i,a),a,!0):(Buffer.isBuffer(i)||(i=new Buffer(i,o)),new r(i,a,!0)))},ah}();Z.DiffieHellmanGroup=o.DiffieHellmanGroup,Z.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Z.getDiffieHellman=o.getDiffieHellman,Z.createDiffieHellman=o.createDiffieHellman,Z.DiffieHellman=o.DiffieHellman;var a=function(){if(Gl)return $l;Gl=1;var t=ft.Buffer,e=js,r=Ni,n=bt,i=Ql(),o=td(),a=Qs;function s(t){r.Writable.call(this);var n=a[t];if(!n)throw new Error("Unknown message digest");this._hashType=n.hash,this._hash=e(n.hash),this._tag=n.id,this._signType=n.sign}function f(t){r.Writable.call(this);var n=a[t];if(!n)throw new Error("Unknown message digest");this._hash=e(n.hash),this._tag=n.id,this._signType=n.sign}function u(t){return new s(t)}function c(t){return new f(t)}return Object.keys(a).forEach((function(e){a[e].id=t.from(a[e].id,"hex"),a[e.toLowerCase()]=a[e]})),n(s,r.Writable),s.prototype._write=function(t,e,r){this._hash.update(t),r()},s.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},s.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=i(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},n(f,r.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},f.prototype.verify=function(e,r,n){var i="string"==typeof r?t.from(r,n):r;this.end();var a=this._hash.digest();return o(i,a,e,this._signType,this._tag)},$l={Sign:u,Verify:c,createSign:u,createVerify:c}}();Z.createSign=a.createSign,Z.Sign=a.Sign,Z.createVerify=a.createVerify,Z.Verify=a.Verify,Z.createECDH=function(){if(Jl)return Zl;Jl=1;var t=uy(),e=V;Zl=function(t){return new n(t)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function i(t,e,r){Array.isArray(t)||(t=t.toArray());var n=new Buffer(t);if(r&&n.length<r){var i=new Buffer(r-n.length);i.fill(0),n=Buffer.concat([i,n])}return e?n.toString(e):n}return r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,n.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},n.prototype.computeSecret=function(t,e,r){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),i(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},n.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),i(r,t)},n.prototype.getPrivateKey=function(t){return i(this.keys.getPrivate(),t)},n.prototype.setPublicKey=function(t,e){return e=e||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,e)),this.keys._importPublic(t),this},n.prototype.setPrivateKey=function(t,r){r=r||"utf8",Buffer.isBuffer(t)||(t=new Buffer(t,r));var n=new e(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this},Zl}();var s=ed;Z.publicEncrypt=s.publicEncrypt,Z.privateEncrypt=s.privateEncrypt,Z.publicDecrypt=s.publicDecrypt,Z.privateDecrypt=s.privateDecrypt;var f=xd;return Z.randomFill=f.randomFill,Z.randomFillSync=f.randomFillSync,Z.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},Z.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6},Z}function Hd(){if(Rd)return G.exports;var t;function e(t){this.rand=t}if(Rd=1,G.exports=function(r){return t||(t=new e(null)),t.generate(r)},G.exports.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?e.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(e.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var r=zd();if("function"!=typeof r.randomBytes)throw new Error("Not supported");e.prototype._rand=function(t){return r.randomBytes(t)}}catch(t){}return G.exports}Nd&&Nd.getRandomValues||!process.browser?(xd.randomFill=function(t,r,n,i){if(!(Cd.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return Fd(r,t.length),Dd(n,r,t.length),qd(t,r,n,i)},xd.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(Cd.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');Fd(r,t.length),void 0===n&&(n=t.length-r);return Dd(n,r,t.length),qd(t,r,n)}):(xd.randomFill=Od,xd.randomFillSync=Od);var Vd={},Wd=V,Kd=q,$d=Kd.getNAF,Gd=Kd.getJSF,Zd=Kd.assert;function Jd(t,e){this.type=t,this.p=new Wd(e.p,16),this.red=e.prime?Wd.red(e.prime):Wd.mont(this.p),this.zero=new Wd(0).toRed(this.red),this.one=new Wd(1).toRed(this.red),this.two=new Wd(2).toRed(this.red),this.n=e.n&&new Wd(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xd=Jd;function Yd(t,e){this.curve=t,this.type=e,this.precomputed=null}Jd.prototype.point=function(){throw new Error("Not implemented")},Jd.prototype.validate=function(){throw new Error("Not implemented")},Jd.prototype._fixedNafMul=function(t,e){Zd(t.precomputed);var r=t._getDoubles(),n=$d(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,a,s=[];for(o=0;o<n.length;o+=r.step){a=0;for(var f=o+r.step-1;f>=o;f--)a=(a<<1)+n[f];s.push(a)}for(var u=this.jpoint(null,null,null),c=this.jpoint(null,null,null),h=i;h>0;h--){for(o=0;o<s.length;o++)(a=s[o])===h?c=c.mixedAdd(r.points[o]):a===-h&&(c=c.mixedAdd(r.points[o].neg()));u=u.add(c)}return u.toP()},Jd.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=$d(e,r,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var f=0;s>=0&&0===o[s];s--)f++;if(s>=0&&f++,a=a.dblp(f),s<0)break;var u=o[s];Zd(0!==u),a="affine"===t.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===t.type?a.toP():a},Jd.prototype._wnafMulAdd=function(t,e,r,n,i){var o,a,s,f=this._wnafT1,u=this._wnafT2,c=this._wnafT3,h=0;for(o=0;o<n;o++){var l=(s=e[o])._getNAFPoints(t);f[o]=l.wnd,u[o]=l.points}for(o=n-1;o>=1;o-=2){var d=o-1,p=o;if(1===f[d]&&1===f[p]){var b=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(b[1]=e[d].add(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].add(e[p].neg())):(b[1]=e[d].toJ().mixedAdd(e[p]),b[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Gd(r[d],r[p]);for(h=Math.max(y[0].length,h),c[d]=new Array(h),c[p]=new Array(h),a=0;a<h;a++){var m=0|y[0][a],v=0|y[1][a];c[d][a]=g[3*(m+1)+(v+1)],c[p][a]=0,u[d]=b}}else c[d]=$d(r[d],f[d],this._bitLength),c[p]=$d(r[p],f[p],this._bitLength),h=Math.max(c[d].length,h),h=Math.max(c[p].length,h)}var _=this.jpoint(null,null,null),w=this._wnafT4;for(o=h;o>=0;o--){for(var E=0;o>=0;){var S=!0;for(a=0;a<n;a++)w[a]=0|c[a][o],0!==w[a]&&(S=!1);if(!S)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(a=0;a<n;a++){var A=w[a];0!==A&&(A>0?s=u[a][A-1>>1]:A<0&&(s=u[a][-A-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o<n;o++)u[o]=null;return i?_:_.toP()},Jd.BasePoint=Yd,Yd.prototype.eq=function(){throw new Error("Not implemented")},Yd.prototype.validate=function(){return this.curve.validate(this)},Jd.prototype.decodePoint=function(t,e){t=Kd.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?Zd(t[t.length-1]%2==0):7===t[0]&&Zd(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},Yd.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Yd.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},Yd.prototype.encode=function(t,e){return Kd.encode(this._encode(e),t)},Yd.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Yd.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},Yd.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},Yd.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},Yd.prototype._getBeta=function(){return null},Yd.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e};var Qd=V,tp=bt,ep=Xd,rp=q.assert;function np(t){ep.call(this,"short",t),this.a=new Qd(t.a,16).toRed(this.red),this.b=new Qd(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}tp(np,ep);var ip=np;function op(t,e,r,n){ep.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new Qd(e,16),this.y=new Qd(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function ap(t,e,r,n){ep.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Qd(0)):(this.x=new Qd(e,16),this.y=new Qd(r,16),this.z=new Qd(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}np.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new Qd(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new Qd(t.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?r=i[0]:(r=i[1],rp(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new Qd(t.a,16),b:new Qd(t.b,16)}})):this._getEndoBasis(r)}}},np.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:Qd.mont(t),r=new Qd(2).toRed(e).redInvm(),n=r.redNeg(),i=new Qd(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},np.prototype._getEndoBasis=function(t){for(var e,r,n,i,o,a,s,f,u,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,l=this.n.clone(),d=new Qd(1),p=new Qd(0),b=new Qd(0),g=new Qd(1),y=0;0!==h.cmpn(0);){var m=l.div(h);f=l.sub(m.mul(h)),u=b.sub(m.mul(d));var v=g.sub(m.mul(p));if(!n&&f.cmp(c)<0)e=s.neg(),r=d,n=f.neg(),i=u;else if(n&&2==++y)break;s=f,l=h,h=f,b=d,d=u,g=p,p=v}o=f.neg(),a=u;var _=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(_)>=0&&(o=e,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},np.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),f=i.mul(r.b),u=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:f.add(u).neg()}},np.prototype.pointFromX=function(t,e){(t=new Qd(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(e&&!i||!e&&i)&&(n=n.redNeg()),this.point(t,n)},np.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},np.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],f=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),f=f.neg(!0)),n[2*o]=s,n[2*o+1]=f,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),c=0;c<2*o;c++)n[c]=null,i[c]=null;return u},tp(op,ep.BasePoint),np.prototype.point=function(t,e,r){return new op(this,t,e,r)},np.prototype.pointFromJSON=function(t,e){return op.fromJSON(this,t,e)},op.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},op.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},op.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},op.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},op.prototype.isInfinity=function(){return this.inf},op.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},op.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},op.prototype.getX=function(){return this.x.fromRed()},op.prototype.getY=function(){return this.y.fromRed()},op.prototype.mul=function(t){return t=new Qd(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},op.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},op.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},op.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},op.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},op.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},tp(ap,ep.BasePoint),np.prototype.jpoint=function(t,e,r){return new ap(this,t,e,r)},ap.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},ap.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ap.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),h=n.redMul(u),l=f.redSqr().redIAdd(c).redISub(h).redISub(h),d=f.redMul(h.redISub(l)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(l,d,p)},ap.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),u=f.redMul(a),c=r.redMul(f),h=s.redSqr().redIAdd(u).redISub(c).redISub(c),l=s.redMul(c.redISub(h)).redISub(i.redMul(u)),d=this.z.redMul(a);return this.curve.jpoint(h,l,d)},ap.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,f=s.redSqr().redSqr(),u=a.redAdd(a);for(e=0;e<t;e++){var c=o.redSqr(),h=u.redSqr(),l=h.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(f)),p=o.redMul(h),b=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),y=d.redMul(g);y=y.redIAdd(y).redISub(l);var m=u.redMul(s);e+1<t&&(f=f.redMul(l)),o=b,s=m,u=y}return this.curve.jpoint(o,u.redMul(i),s)},ap.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},ap.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),f=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=f,e=s.redMul(a.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(c).redISub(l);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),b=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},ap.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=s.redSqr().redISub(a).redISub(a);t=f;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=s.redMul(a.redISub(f)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=d.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,r)},ap.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),f=e.redAdd(e),u=(f=f.redIAdd(f)).redMul(a),c=s.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=s.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},ap.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),f=n.redIAdd(n);f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(f),c=e.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(s).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(u.redMul(f.redISub(u)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,l,d)},ap.prototype.mul=function(t,e){return t=new Qd(t,e),this.curve._wnafMul(this,t)},ap.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},ap.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},ap.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},ap.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var sp=V,fp=bt,up=Xd,cp=q;function hp(t){up.call(this,"mont",t),this.a=new sp(t.a,16).toRed(this.red),this.b=new sp(t.b,16).toRed(this.red),this.i4=new sp(4).toRed(this.red).redInvm(),this.two=new sp(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}fp(hp,up);var lp=hp;function dp(t,e,r){up.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new sp(e,16),this.z=new sp(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}hp.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},fp(dp,up.BasePoint),hp.prototype.decodePoint=function(t,e){return this.point(cp.toArray(t,e),1)},hp.prototype.point=function(t,e){return new dp(this,t,e)},hp.prototype.pointFromJSON=function(t){return dp.fromJSON(this,t)},dp.prototype.precompute=function(){},dp.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},dp.fromJSON=function(t,e){return new dp(t,e[0],e[1]||t.one)},dp.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},dp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},dp.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},dp.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),f=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},dp.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},dp.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},dp.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},dp.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},dp.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var pp=V,bp=bt,gp=Xd,yp=q.assert;function mp(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,gp.call(this,"edwards",t),this.a=new pp(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new pp(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new pp(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),yp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}bp(mp,gp);var vp=mp;function _p(t,e,r,n,i){gp.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new pp(e,16),this.y=new pp(r,16),this.z=n?new pp(n,16):this.curve.one,this.t=i&&new pp(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}mp.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},mp.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},mp.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},mp.prototype.pointFromX=function(t,e){(t=new pp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(e&&!s||!e&&s)&&(a=a.redNeg()),this.point(t,a)},mp.prototype.pointFromY=function(t,e){(t=new pp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},mp.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},bp(_p,gp.BasePoint),mp.prototype.pointFromJSON=function(t){return _p.fromJSON(this,t)},mp.prototype.point=function(t,e,r,n){return new _p(this,t,e,r,n)},_p.fromJSON=function(t,e){return new _p(t,e[0],e[1],e[2])},_p.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},_p.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},_p.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),f=i.redMul(a),u=o.redMul(s),c=i.redMul(s),h=a.redMul(o);return this.curve.point(f,u,h,c)},_p.prototype._projDbl=function(){var t,e,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),f=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(f);this.zOne?(t=a.redSub(s).redSub(f).redMul(u.redSub(this.curve.two)),e=u.redMul(n.redSub(f)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),t=a.redSub(s).redISub(f).redMul(o),e=u.redMul(n.redSub(f)),r=u.redMul(o))}else n=s.redAdd(f),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(a.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(s.redISub(f)),r=n.redMul(o);return this.curve.point(t,e,r)},_p.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},_p.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),f=r.redAdd(e),u=o.redMul(a),c=s.redMul(f),h=o.redMul(f),l=a.redMul(s);return this.curve.point(u,c,l,h)},_p.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),h=n.redMul(f).redMul(c);return this.curve.twisted?(e=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(u)):(e=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(u)),this.curve.point(h,e,r)},_p.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},_p.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},_p.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},_p.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},_p.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},_p.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},_p.prototype.getX=function(){return this.normalize(),this.x.fromRed()},_p.prototype.getY=function(){return this.normalize(),this.y.fromRed()},_p.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},_p.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},_p.prototype.toP=_p.prototype.normalize,_p.prototype.mixedAdd=_p.prototype.add,function(t){var e=t;e.base=Xd,e.short=ip,e.mont=lp,e.edwards=vp}(Vd);var wp={},Ep={},Sp={},Ap=W,Mp=bt;function kp(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function Tp(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function Bp(t){return 1===t.length?"0"+t:t}function xp(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}Sp.inherits=Mp,Sp.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):kp(t,i)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},Sp.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=Bp(t[r].toString(16));return e},Sp.htonl=Tp,Sp.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=Tp(i)),r+=xp(i.toString(16))}return r},Sp.zero2=Bp,Sp.zero8=xp,Sp.join32=function(t,e,r,n){var i=r-e;Ap(i%4==0);for(var o=new Array(i/4),a=0,s=e;a<o.length;a++,s+=4){var f;f="big"===n?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],o[a]=f>>>0}return o},Sp.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},Sp.rotr32=function(t,e){return t>>>e|t<<32-e},Sp.rotl32=function(t,e){return t<<e|t>>>32-e},Sp.sum32=function(t,e){return t+e>>>0},Sp.sum32_3=function(t,e,r){return t+e+r>>>0},Sp.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},Sp.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},Sp.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o<n?1:0)+r+i;t[e]=a>>>0,t[e+1]=o},Sp.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},Sp.sum64_lo=function(t,e,r,n){return e+n>>>0},Sp.sum64_4_hi=function(t,e,r,n,i,o,a,s){var f=0,u=e;return f+=(u=u+n>>>0)<e?1:0,f+=(u=u+o>>>0)<o?1:0,t+r+i+a+(f+=(u=u+s>>>0)<s?1:0)>>>0},Sp.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},Sp.sum64_5_hi=function(t,e,r,n,i,o,a,s,f,u){var c=0,h=e;return c+=(h=h+n>>>0)<e?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+s>>>0)<s?1:0,t+r+i+a+f+(c+=(h=h+u>>>0)<u?1:0)>>>0},Sp.sum64_5_lo=function(t,e,r,n,i,o,a,s,f,u){return e+n+o+s+u>>>0},Sp.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},Sp.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},Sp.shr64_hi=function(t,e,r){return t>>>r},Sp.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var Op={},jp=Sp,Rp=W;function Ip(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Op.BlockHash=Ip,Ip.prototype.update=function(t,e){if(t=jp.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=jp.join32(t,0,t.length-r,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},Ip.prototype.digest=function(t){return this.update(this._pad()),Rp(null===this.pending),this._digest(t)},Ip.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n};var Pp={},Cp={},Lp=Sp.rotr32;function Np(t,e,r){return t&e^~t&r}function Up(t,e,r){return t&e^t&r^e&r}function Fp(t,e,r){return t^e^r}Cp.ft_1=function(t,e,r,n){return 0===t?Np(e,r,n):1===t||3===t?Fp(e,r,n):2===t?Up(e,r,n):void 0},Cp.ch32=Np,Cp.maj32=Up,Cp.p32=Fp,Cp.s0_256=function(t){return Lp(t,2)^Lp(t,13)^Lp(t,22)},Cp.s1_256=function(t){return Lp(t,6)^Lp(t,11)^Lp(t,25)},Cp.g0_256=function(t){return Lp(t,7)^Lp(t,18)^t>>>3},Cp.g1_256=function(t){return Lp(t,17)^Lp(t,19)^t>>>10};var Dp=Sp,qp=Op,zp=Cp,Hp=Dp.rotl32,Vp=Dp.sum32,Wp=Dp.sum32_5,Kp=zp.ft_1,$p=qp.BlockHash,Gp=[1518500249,1859775393,2400959708,3395469782];function Zp(){if(!(this instanceof Zp))return new Zp;$p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Dp.inherits(Zp,$p);var Jp=Zp;Zp.blockSize=512,Zp.outSize=160,Zp.hmacStrength=80,Zp.padLength=64,Zp.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=Hp(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4];for(n=0;n<r.length;n++){var u=~~(n/20),c=Wp(Hp(i,5),Kp(u,o,a,s),f,r[n],Gp[u]);f=s,s=a,a=Hp(o,30),o=i,i=c}this.h[0]=Vp(this.h[0],i),this.h[1]=Vp(this.h[1],o),this.h[2]=Vp(this.h[2],a),this.h[3]=Vp(this.h[3],s),this.h[4]=Vp(this.h[4],f)},Zp.prototype._digest=function(t){return"hex"===t?Dp.toHex32(this.h,"big"):Dp.split32(this.h,"big")};var Xp=Sp,Yp=Op,Qp=Cp,tb=W,eb=Xp.sum32,rb=Xp.sum32_4,nb=Xp.sum32_5,ib=Qp.ch32,ob=Qp.maj32,ab=Qp.s0_256,sb=Qp.s1_256,fb=Qp.g0_256,ub=Qp.g1_256,cb=Yp.BlockHash,hb=[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];function lb(){if(!(this instanceof lb))return new lb;cb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=hb,this.W=new Array(64)}Xp.inherits(lb,cb);var db=lb;lb.blockSize=512,lb.outSize=256,lb.hmacStrength=192,lb.padLength=64,lb.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=rb(ub(r[n-2]),r[n-7],fb(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],f=this.h[4],u=this.h[5],c=this.h[6],h=this.h[7];for(tb(this.k.length===r.length),n=0;n<r.length;n++){var l=nb(h,sb(f),ib(f,u,c),this.k[n],r[n]),d=eb(ab(i),ob(i,o,a));h=c,c=u,u=f,f=eb(s,l),s=a,a=o,o=i,i=eb(l,d)}this.h[0]=eb(this.h[0],i),this.h[1]=eb(this.h[1],o),this.h[2]=eb(this.h[2],a),this.h[3]=eb(this.h[3],s),this.h[4]=eb(this.h[4],f),this.h[5]=eb(this.h[5],u),this.h[6]=eb(this.h[6],c),this.h[7]=eb(this.h[7],h)},lb.prototype._digest=function(t){return"hex"===t?Xp.toHex32(this.h,"big"):Xp.split32(this.h,"big")};var pb=Sp,bb=db;function gb(){if(!(this instanceof gb))return new gb;bb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pb.inherits(gb,bb);var yb=gb;gb.blockSize=512,gb.outSize=224,gb.hmacStrength=192,gb.padLength=64,gb.prototype._digest=function(t){return"hex"===t?pb.toHex32(this.h.slice(0,7),"big"):pb.split32(this.h.slice(0,7),"big")};var mb=Sp,vb=Op,_b=W,wb=mb.rotr64_hi,Eb=mb.rotr64_lo,Sb=mb.shr64_hi,Ab=mb.shr64_lo,Mb=mb.sum64,kb=mb.sum64_hi,Tb=mb.sum64_lo,Bb=mb.sum64_4_hi,xb=mb.sum64_4_lo,Ob=mb.sum64_5_hi,jb=mb.sum64_5_lo,Rb=vb.BlockHash,Ib=[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];function Pb(){if(!(this instanceof Pb))return new Pb;Rb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Ib,this.W=new Array(160)}mb.inherits(Pb,Rb);var Cb=Pb;function Lb(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function Nb(t,e,r,n,i,o){var a=e&n^~e&o;return a<0&&(a+=4294967296),a}function Ub(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function Fb(t,e,r,n,i,o){var a=e&n^e&o^n&o;return a<0&&(a+=4294967296),a}function Db(t,e){var r=wb(t,e,28)^wb(e,t,2)^wb(e,t,7);return r<0&&(r+=4294967296),r}function qb(t,e){var r=Eb(t,e,28)^Eb(e,t,2)^Eb(e,t,7);return r<0&&(r+=4294967296),r}function zb(t,e){var r=wb(t,e,14)^wb(t,e,18)^wb(e,t,9);return r<0&&(r+=4294967296),r}function Hb(t,e){var r=Eb(t,e,14)^Eb(t,e,18)^Eb(e,t,9);return r<0&&(r+=4294967296),r}function Vb(t,e){var r=wb(t,e,1)^wb(t,e,8)^Sb(t,e,7);return r<0&&(r+=4294967296),r}function Wb(t,e){var r=Eb(t,e,1)^Eb(t,e,8)^Ab(t,e,7);return r<0&&(r+=4294967296),r}function Kb(t,e){var r=wb(t,e,19)^wb(e,t,29)^Sb(t,e,6);return r<0&&(r+=4294967296),r}function $b(t,e){var r=Eb(t,e,19)^Eb(e,t,29)^Ab(t,e,6);return r<0&&(r+=4294967296),r}Pb.blockSize=1024,Pb.outSize=512,Pb.hmacStrength=192,Pb.padLength=128,Pb.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=Kb(r[n-4],r[n-3]),o=$b(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],f=Vb(r[n-30],r[n-29]),u=Wb(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=Bb(i,o,a,s,f,u,c,h),r[n+1]=xb(i,o,a,s,f,u,c,h)}},Pb.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],f=this.h[5],u=this.h[6],c=this.h[7],h=this.h[8],l=this.h[9],d=this.h[10],p=this.h[11],b=this.h[12],g=this.h[13],y=this.h[14],m=this.h[15];_b(this.k.length===r.length);for(var v=0;v<r.length;v+=2){var _=y,w=m,E=zb(h,l),S=Hb(h,l),A=Lb(h,l,d,p,b),M=Nb(h,l,d,p,b,g),k=this.k[v],T=this.k[v+1],B=r[v],x=r[v+1],O=Ob(_,w,E,S,A,M,k,T,B,x),j=jb(_,w,E,S,A,M,k,T,B,x);_=Db(n,i),w=qb(n,i),E=Ub(n,i,o,a,s),S=Fb(n,i,o,a,s,f);var R=kb(_,w,E,S),I=Tb(_,w,E,S);y=b,m=g,b=d,g=p,d=h,p=l,h=kb(u,c,O,j),l=Tb(c,c,O,j),u=s,c=f,s=o,f=a,o=n,a=i,n=kb(O,j,R,I),i=Tb(O,j,R,I)}Mb(this.h,0,n,i),Mb(this.h,2,o,a),Mb(this.h,4,s,f),Mb(this.h,6,u,c),Mb(this.h,8,h,l),Mb(this.h,10,d,p),Mb(this.h,12,b,g),Mb(this.h,14,y,m)},Pb.prototype._digest=function(t){return"hex"===t?mb.toHex32(this.h,"big"):mb.split32(this.h,"big")};var Gb=Sp,Zb=Cb;function Jb(){if(!(this instanceof Jb))return new Jb;Zb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Gb.inherits(Jb,Zb);var Xb=Jb;Jb.blockSize=1024,Jb.outSize=384,Jb.hmacStrength=192,Jb.padLength=128,Jb.prototype._digest=function(t){return"hex"===t?Gb.toHex32(this.h.slice(0,12),"big"):Gb.split32(this.h.slice(0,12),"big")},Pp.sha1=Jp,Pp.sha224=yb,Pp.sha256=db,Pp.sha384=Xb,Pp.sha512=Cb;var Yb={},Qb=Sp,tg=Op,eg=Qb.rotl32,rg=Qb.sum32,ng=Qb.sum32_3,ig=Qb.sum32_4,og=tg.BlockHash;function ag(){if(!(this instanceof ag))return new ag;og.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function sg(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function fg(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function ug(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}Qb.inherits(ag,og),Yb.ripemd160=ag,ag.blockSize=512,ag.outSize=160,ag.hmacStrength=192,ag.padLength=64,ag.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=r,f=n,u=i,c=o,h=a,l=0;l<80;l++){var d=rg(eg(ig(r,sg(l,n,i,o),t[cg[l]+e],fg(l)),lg[l]),a);r=a,a=o,o=eg(i,10),i=n,n=d,d=rg(eg(ig(s,sg(79-l,f,u,c),t[hg[l]+e],ug(l)),dg[l]),h),s=h,h=c,c=eg(u,10),u=f,f=d}d=ng(this.h[1],i,c),this.h[1]=ng(this.h[2],o,h),this.h[2]=ng(this.h[3],a,s),this.h[3]=ng(this.h[4],r,f),this.h[4]=ng(this.h[0],n,u),this.h[0]=d},ag.prototype._digest=function(t){return"hex"===t?Qb.toHex32(this.h,"little"):Qb.split32(this.h,"little")};var cg=[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],hg=[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],lg=[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],dg=[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],pg=Sp,bg=W;function gg(t,e,r){if(!(this instanceof gg))return new gg(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(pg.toArray(e,r))}var yg,mg,vg=gg;gg.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),bg(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},gg.prototype.update=function(t,e){return this.inner.update(t,e),this},gg.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=t;e.utils=Sp,e.common=Op,e.sha=Pp,e.ripemd=Yb,e.hmac=vg,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(Ep),function(t){var e,r=t,n=Ep,i=Vd,o=q.assert;function a(t){"short"===t.type?this.curve=new i.short(t):"edwards"===t.type?this.curve=new i.edwards(t):this.curve=new i.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:function(){var n=new a(e);return Object.defineProperty(r,t,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{e=mg?yg:(mg=1,yg={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}catch(t){e=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",e]})}(wp);var _g=Ep,wg=$,Eg=W;function Sg(t){if(!(this instanceof Sg))return new Sg(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=wg.toArray(t.entropy,t.entropyEnc||"hex"),r=wg.toArray(t.nonce,t.nonceEnc||"hex"),n=wg.toArray(t.pers,t.persEnc||"hex");Eg(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Ag=Sg;Sg.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Sg.prototype._hmac=function(){return new _g.hmac(this.hash,this.K)},Sg.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Sg.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=wg.toArray(t,e),r=wg.toArray(r,n),Eg(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},Sg.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=wg.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,t);return this._update(r),this._reseed++,wg.encode(o,e)};var Mg=V,kg=q.assert;function Tg(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var Bg=Tg;Tg.fromPublic=function(t,e,r){return e instanceof Tg?e:new Tg(t,{pub:e,pubEnc:r})},Tg.fromPrivate=function(t,e,r){return e instanceof Tg?e:new Tg(t,{priv:e,privEnc:r})},Tg.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Tg.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},Tg.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},Tg.prototype._importPrivate=function(t,e){this.priv=new Mg(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},Tg.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?kg(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||kg(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},Tg.prototype.derive=function(t){return t.validate()||kg(t.validate(),"public point not validated"),t.mul(this.priv).getX()},Tg.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},Tg.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},Tg.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var xg=V,Og=q,jg=Og.assert;function Rg(t,e){if(t instanceof Rg)return t;this._importDER(t,e)||(jg(t.r&&t.s,"Signature without r or s"),this.r=new xg(t.r,16),this.s=new xg(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Ig,Pg,Cg=Rg;function Lg(){this.place=0}function Ng(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===t[e.place])return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function Ug(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function Fg(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}Rg.prototype._importDER=function(t,e){t=Og.toArray(t,e);var r=new Lg;if(48!==t[r.place++])return!1;var n=Ng(t,r);if(!1===n)return!1;if(n+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var i=Ng(t,r);if(!1===i)return!1;if(128&t[r.place])return!1;var o=t.slice(r.place,i+r.place);if(r.place+=i,2!==t[r.place++])return!1;var a=Ng(t,r);if(!1===a)return!1;if(t.length!==a+r.place)return!1;if(128&t[r.place])return!1;var s=t.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new xg(o),this.s=new xg(s),this.recoveryParam=null,!0},Rg.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=Ug(e),r=Ug(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];Fg(n,e.length),(n=n.concat(e)).push(2),Fg(n,r.length);var i=n.concat(r),o=[48];return Fg(o,i.length),o=o.concat(i),Og.encode(o,t)};var Dg=q,qg=Dg.assert,zg=Dg.parseBytes,Hg=Dg.cachedProperty;function Vg(t,e){this.eddsa=t,this._secret=zg(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=zg(e.pub)}Vg.fromPublic=function(t,e){return e instanceof Vg?e:new Vg(t,{pub:e})},Vg.fromSecret=function(t,e){return e instanceof Vg?e:new Vg(t,{secret:e})},Vg.prototype.secret=function(){return this._secret},Hg(Vg,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Hg(Vg,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Hg(Vg,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),Hg(Vg,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Hg(Vg,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Hg(Vg,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Vg.prototype.sign=function(t){return qg(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},Vg.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},Vg.prototype.getSecret=function(t){return qg(this._secret,"KeyPair is public only"),Dg.encode(this.secret(),t)},Vg.prototype.getPublic=function(t){return Dg.encode(this.pubBytes(),t)};var Wg=Vg,Kg=V,$g=q,Gg=$g.assert,Zg=$g.cachedProperty,Jg=$g.parseBytes;function Xg(t,e){this.eddsa=t,"object"!=typeof e&&(e=Jg(e)),Array.isArray(e)&&(Gg(e.length===2*t.encodingLength,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Gg(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Kg&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Zg(Xg,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Zg(Xg,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Zg(Xg,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Zg(Xg,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Xg.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Xg.prototype.toHex=function(){return $g.encode(this.toBytes(),"hex").toUpperCase()};var Yg=Xg,Qg=Ep,ty=wp,ey=q,ry=ey.assert,ny=ey.parseBytes,iy=Wg,oy=Yg;function ay(t){if(ry("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof ay))return new ay(t);t=ty[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Qg.sha512}var sy,fy=ay;function uy(){return sy||(sy=1,function(t){var e=t;e.version=D,e.utils=q,e.rand=Hd(),e.curve=Vd,e.curves=wp,e.ec=function(){if(Pg)return Ig;Pg=1;var t=V,e=Ag,r=q,n=wp,i=Hd(),o=r.assert,a=Bg,s=Cg;function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(n,t),"Unknown curve "+t),t=n[t]),t instanceof n.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return Ig=f,f.prototype.keyPair=function(t){return new a(this,t)},f.prototype.keyFromPrivate=function(t,e){return a.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return a.fromPublic(this,t,e)},f.prototype.genKeyPair=function(r){r||(r={});for(var n=new e({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||i(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),a=this.n.sub(new t(2));;){var s=new t(n.generate(o));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,r,n){var i;if(t.isBN(e)||"number"==typeof e)i=(e=new t(e,16)).byteLength();else if("object"==typeof e)i=e.length,e=new t(e,16);else{var o=e.toString();i=o.length+1>>>1,e=new t(o,16)}"number"!=typeof n&&(n=8*i);var a=n-this.n.bitLength();return a>0&&(e=e.ushrn(a)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(r,n,i,a){if("object"==typeof i&&(a=i,i=null),a||(a={}),"string"!=typeof r&&"number"!=typeof r&&!t.isBN(r)){o("object"==typeof r&&r&&"number"==typeof r.length,"Expected message to be an array-like, a hex string, or a BN instance"),o(r.length>>>0===r.length);for(var f=0;f<r.length;f++)o((255&r[f])===r[f])}n=this.keyFromPrivate(n,i),r=this._truncateToN(r,!1,a.msgBitLength),o(!r.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),c=n.getPrivate().toArray("be",u),h=r.toArray("be",u);o(new t(h).eq(r),"Can not sign message");for(var l=new e({hash:this.hash,entropy:c,nonce:h,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new t(1)),p=0;;p++){var b=a.k?a.k(p):new t(l.generate(this.n.byteLength()));if(!((b=this._truncateToN(b,!0)).cmpn(1)<=0||b.cmp(d)>=0)){var g=this.g.mul(b);if(!g.isInfinity()){var y=g.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var v=b.invm(this.n).mul(m.mul(n.getPrivate()).iadd(r));if(0!==(v=v.umod(this.n)).cmpn(0)){var _=(g.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),_^=1),new s({r:m,s:v,recoveryParam:_})}}}}}},f.prototype.verify=function(t,e,r,n,i){i||(i={}),t=this._truncateToN(t,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(e=new s(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var f,u=a.invm(this.n),c=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(f=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&f.eqXToP(o):!(f=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===f.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,r,n,i){o((3&n)===n,"The recovery param is more than two bits"),r=new s(r,i);var a=this.n,f=new t(e),u=r.r,c=r.s,h=1&n,l=n>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");u=l?this.curve.pointFromX(u.add(this.curve.n),h):this.curve.pointFromX(u,h);var d=r.r.invm(a),p=a.sub(f).mul(d).umod(a),b=c.mul(d).umod(a);return this.g.mulAdd(p,u,b)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new s(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")},Ig}(),e.eddsa=fy}(F)),F}ay.prototype.sign=function(t,e){t=ny(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},ay.prototype.verify=function(t,e,r){if(t=ny(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},ay.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return ey.intFromLE(t.digest()).umod(this.curve.n)},ay.prototype.keyFromPublic=function(t){return iy.fromPublic(this,t)},ay.prototype.keyFromSecret=function(t){return iy.fromSecret(this,t)},ay.prototype.makeSignature=function(t){return t instanceof oy?t:new oy(this,t)},ay.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},ay.prototype.decodePoint=function(t){var e=(t=ey.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=!!(128&t[e]),i=ey.intFromLE(r);return this.curve.pointFromY(i,n)},ay.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},ay.prototype.decodeInt=function(t){return ey.intFromLE(t)},ay.prototype.isPoint=function(t){return t instanceof this.pointClass};var cy=uy();function hy(t,e){return e?Buffer.from(Rs("sha256").update(t).digest(e)):Rs("sha256").update(t).digest()}function ly(t,e){return e?Buffer.from(Rs("sha512").update(t).digest(e)):Rs("sha512").update(t).digest()}function dy(t,e){return Ys("sha256",e).update(t).digest()}function py(t){return Rs("rmd160").update(t).digest()}var by=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");const e=new Uint8Array(256);for(let t=0;t<e.length;t++)e[t]=255;for(let r=0;r<t.length;r++){const n=t.charAt(r),i=n.charCodeAt(0);if(255!==e[i])throw new TypeError(n+" is ambiguous");e[i]=r}const r=t.length,n=t.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r);function a(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;let o=0,a=0,s=0;for(;t[o]===n;)a++,o++;const f=(t.length-o)*i+1>>>0,u=new Uint8Array(f);for(;o<t.length;){const n=t.charCodeAt(o);if(n>255)return;let i=e[n];if(255===i)return;let a=0;for(let t=f-1;(0!==i||a<s)&&-1!==t;t--,a++)i+=r*u[t]>>>0,u[t]=i%256>>>0,i=i/256>>>0;if(0!==i)throw new Error("Non-zero carry");s=a,o++}let c=f-s;for(;c!==f&&0===u[c];)c++;const h=new Uint8Array(a+(f-c));let l=a;for(;c!==f;)h[l++]=u[c++];return h}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";let i=0,a=0,s=0;const f=e.length;for(;s!==f&&0===e[s];)s++,i++;const u=(f-s)*o+1>>>0,c=new Uint8Array(u);for(;s!==f;){let t=e[s],n=0;for(let e=u-1;(0!==t||n<a)&&-1!==e;e--,n++)t+=256*c[e]>>>0,c[e]=t%r>>>0,t=t/r>>>0;if(0!==t)throw new Error("Non-zero carry");a=n,s++}let h=u-a;for(;h!==u&&0===c[h];)h++;let l=n.repeat(i);for(;h<u;++h)l+=t.charAt(c[h]);return l},decodeUnsafe:a,decode:function(t){const e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),gy={exports:{}},yy={},my={},vy={},_y=fn(),wy=Sr("Object.prototype.toString"),Ey=function(t){return!(_y&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===wy(t)},Sy=function(t){return!!Ey(t)||null!==t&&"object"==typeof t&&"length"in t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==wy(t)&&"callee"in t&&"[object Function]"===wy(t.callee)},Ay=function(){return Ey(arguments)}();Ey.isLegacyArguments=Sy;var My,ky=Ay?Ey:Sy,Ty=Sr,By=fn(),xy=Te(),Oy=Pt;if(By){var jy=Ty("RegExp.prototype.exec"),Ry={},Iy=function(){throw Ry},Py={toString:Iy,valueOf:Iy};"symbol"==typeof Symbol.toPrimitive&&(Py[Symbol.toPrimitive]=Iy),My=function(t){if(!t||"object"!=typeof t)return!1;var e=Oy(t,"lastIndex");if(!(e&&xy(e,"value")))return!1;try{jy(t,Py)}catch(t){return t===Ry}}}else{var Cy=Ty("Object.prototype.toString");My=function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===Cy(t)}}var Ly,Ny,Uy=My,Fy=Sr("RegExp.prototype.exec"),Dy=mt;var qy=Sr,zy=function(t){if(!Uy(t))throw new Dy("`regex` must be a RegExp");return function(e){return null!==Fy(t,e)}},Hy=zy(/^\s*(?:function)?\*/),Vy=fn(),Wy=ke,Ky=qy("Object.prototype.toString"),$y=qy("Function.prototype.toString"),Gy=function(){if(Ny)return Ly;Ny=1;const t=function*(){}.constructor;return Ly=()=>t}(),Zy=function(t){if("function"!=typeof t)return!1;if(Hy($y(t)))return!0;if(!Vy)return"[object GeneratorFunction]"===Ky(t);if(!Wy)return!1;var e=Gy();return e&&Wy(t)===e.prototype};!function(t){var e=ky,r=Zy,n=En,i=An;function o(t){return t.call.bind(t)}var a="undefined"!=typeof BigInt,s="undefined"!=typeof Symbol,f=o(Object.prototype.toString),u=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(a)var l=o(BigInt.prototype.valueOf);if(s)var d=o(Symbol.prototype.valueOf);function p(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===f(t)}function g(t){return"[object Set]"===f(t)}function y(t){return"[object WeakMap]"===f(t)}function m(t){return"[object WeakSet]"===f(t)}function v(t){return"[object ArrayBuffer]"===f(t)}function _(t){return"undefined"!=typeof ArrayBuffer&&(v.working?v(t):t instanceof ArrayBuffer)}function w(t){return"[object DataView]"===f(t)}function E(t){return"undefined"!=typeof DataView&&(w.working?w(t):t instanceof DataView)}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=i,t.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},t.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):i(t)||E(t)},t.isUint8Array=function(t){return"Uint8Array"===n(t)},t.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===n(t)},t.isUint16Array=function(t){return"Uint16Array"===n(t)},t.isUint32Array=function(t){return"Uint32Array"===n(t)},t.isInt8Array=function(t){return"Int8Array"===n(t)},t.isInt16Array=function(t){return"Int16Array"===n(t)},t.isInt32Array=function(t){return"Int32Array"===n(t)},t.isFloat32Array=function(t){return"Float32Array"===n(t)},t.isFloat64Array=function(t){return"Float64Array"===n(t)},t.isBigInt64Array=function(t){return"BigInt64Array"===n(t)},t.isBigUint64Array=function(t){return"BigUint64Array"===n(t)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},g.working="undefined"!=typeof Set&&g(new Set),t.isSet=function(t){return"undefined"!=typeof Set&&(g.working?g(t):t instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),t.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(y.working?y(t):t instanceof WeakMap)},m.working="undefined"!=typeof WeakSet&&m(new WeakSet),t.isWeakSet=function(t){return m(t)},v.working="undefined"!=typeof ArrayBuffer&&v(new ArrayBuffer),t.isArrayBuffer=_,w.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&w(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=E;var S="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(t){return"[object SharedArrayBuffer]"===f(t)}function M(t){return void 0!==S&&(void 0===A.working&&(A.working=A(new S)),A.working?A(t):t instanceof S)}function k(t){return p(t,u)}function T(t){return p(t,c)}function B(t){return p(t,h)}function x(t){return a&&p(t,l)}function O(t){return s&&p(t,d)}t.isSharedArrayBuffer=M,t.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},t.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},t.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},t.isGeneratorObject=function(t){return"[object Generator]"===f(t)},t.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},t.isNumberObject=k,t.isStringObject=T,t.isBooleanObject=B,t.isBigIntObject=x,t.isSymbolObject=O,t.isBoxedPrimitive=function(t){return k(t)||T(t)||B(t)||x(t)||O(t)},t.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(_(t)||M(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))}(vy);var Jy,Xy,Yy,Qy=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8};function tm(){if(Jy)return yy;function t(e){return t="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},t(e)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}function r(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,o=n(e);if(r){var a=n(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return function(e,r){if(r&&("object"===t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}(this,i)}}function n(t){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}Jy=1;var i,o,a={};function s(t,n,i){i||(i=Error);var o=function(i){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)}(s,i);var o,a=r(s);function s(e,r,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),o=a.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i)),o.code=t,o}return o=s,Object.defineProperty(o,"prototype",{writable:!1}),o}(i);a[t]=o}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}return s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,r,n){var o,a,s;if(void 0===i&&(i=Ym()),i("string"==typeof e,"'name' must be a string"),"string"==typeof r&&(a="not ",r.substr(0,a.length)===a)?(o="must not be",r=r.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(e," argument"))s="The ".concat(e," ").concat(o," ").concat(f(r,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(f(r,"type"))}return s+=". Received type ".concat(t(n))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=my);var n=o.inspect(e);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(r,". Received ").concat(n)}),TypeError),s("ERR_INVALID_RETURN_VALUE",(function(e,r,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(t(n)),"Expected ".concat(e,' to be returned from the "').concat(r,'"')+" function but got ".concat(i,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];void 0===i&&(i=Ym()),i(e.length>0,"At least one arg needs to be specified");var n="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:n+="".concat(e[0]," argument");break;case 2:n+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:n+=e.slice(0,o-1).join(", "),n+=", and ".concat(e[o-1]," arguments")}return"".concat(n," must be specified")}),TypeError),yy.codes=a,yy}function em(){if(Yy)return Xy;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function r(t,e,r){return(e=i(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e,r){return e&&function(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,i(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===l(e)?e:String(e)}function o(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){var e="function"==typeof Map?new Map:void 0;return s=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return f(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,t)},s(t)}function f(t,e,r){return f=u()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i},f.apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function l(t){return l="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},l(t)}Yy=1;var d=my.inspect,p=tm().codes.ERR_INVALID_ARG_TYPE;function b(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var g="",y="",m="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function E(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function S(t,e,r){var n="",i="",o=0,a="",s=!1,f=E(t),u=f.split("\n"),c=E(e).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===l(t)&&"object"===l(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===u.length&&1===c.length&&u[0]!==c[0]){var p=u[0].length+c[0].length;if(p<=10){if(!("object"===l(t)&&null!==t||"object"===l(e)&&null!==e||0===t&&0===e))return"".concat(_[r],"\n\n")+"".concat(u[0]," !== ").concat(c[0],"\n")}else if("strictEqualObject"!==r){if(p<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;u[0][h]===c[0][h];)h++;h>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}}for(var w=u[u.length-1],S=c[c.length-1];w===S&&(h++<2?a="\n ".concat(w).concat(a):n=w,u.pop(),c.pop(),0!==u.length&&0!==c.length);)w=u[u.length-1],S=c[c.length-1];var A=Math.max(u.length,c.length);if(0===A){var M=f.split("\n");if(M.length>30)for(M[26]="".concat(g,"...").concat(v);M.length>27;)M.pop();return"".concat(_.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(a="\n".concat(g,"...").concat(v).concat(a),s=!0),""!==n&&(a="\n ".concat(n).concat(a),n="");var k=0,T=_[r]+"\n".concat(y,"+ actual").concat(v," ").concat(m,"- expected").concat(v),B=" ".concat(g,"...").concat(v," Lines skipped");for(h=0;h<A;h++){var x=h-o;if(u.length<h+1)x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(c[h-2]),k++),i+="\n ".concat(c[h-1]),k++),o=h,n+="\n".concat(m,"-").concat(v," ").concat(c[h]),k++;else if(c.length<h+1)x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(u[h-2]),k++),i+="\n ".concat(u[h-1]),k++),o=h,i+="\n".concat(y,"+").concat(v," ").concat(u[h]),k++;else{var O=c[h],j=u[h],R=j!==O&&(!b(j,",")||j.slice(0,-1)!==O);R&&b(O,",")&&O.slice(0,-1)===j&&(R=!1,j+=","),R?(x>1&&h>2&&(x>4?(i+="\n".concat(g,"...").concat(v),s=!0):x>3&&(i+="\n ".concat(u[h-2]),k++),i+="\n ".concat(u[h-1]),k++),o=h,i+="\n".concat(y,"+").concat(v," ").concat(j),n+="\n".concat(m,"-").concat(v," ").concat(O),k+=2):(i+=n,n="",1!==x&&0!==h||(i+="\n ".concat(j),k++))}if(k>20&&h<A-2)return"".concat(T).concat(B,"\n").concat(i,"\n").concat(g,"...").concat(v).concat(n,"\n")+"".concat(g,"...").concat(v)}return"".concat(T).concat(s?B:"","\n").concat(i).concat(n).concat(a).concat(d)}var A=function(t,r){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(b,t);var i,s,f=(i=b,s=u(),function(){var t,e=h(i);if(s){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return o(this,t)});function b(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==l(t)||null===t)throw new p("options","Object",t);var r=t.message,n=t.operator,i=t.stackStartFn,s=t.actual,u=t.expected,c=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)e=f.call(this,String(r));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(g="[34m",y="[32m",v="[39m",m="[31m"):(g="",y="",v="",m="")),"object"===l(s)&&null!==s&&"object"===l(u)&&null!==u&&"stack"in s&&s instanceof Error&&"stack"in u&&u instanceof Error&&(s=w(s),u=w(u)),"deepStrictEqual"===n||"strictEqual"===n)e=f.call(this,S(s,u,n));else if("notDeepStrictEqual"===n||"notStrictEqual"===n){var h=_[n],d=E(s).split("\n");if("notStrictEqual"===n&&"object"===l(s)&&null!==s&&(h=_.notStrictEqualObject),d.length>30)for(d[26]="".concat(g,"...").concat(v);d.length>27;)d.pop();e=1===d.length?f.call(this,"".concat(h," ").concat(d[0])):f.call(this,"".concat(h,"\n\n").concat(d.join("\n"),"\n"))}else{var A=E(s),M="",k=_[n];"notDeepEqual"===n||"notEqual"===n?(A="".concat(_[n],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(M="".concat(E(u)),A.length>512&&(A="".concat(A.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===n||"equal"===n?A="".concat(k,"\n\n").concat(A,"\n\nshould equal\n\n"):M=" ".concat(n," ").concat(M)),e=f.call(this,"".concat(A).concat(M))}return Error.stackTraceLimit=c,e.generatedMessage=!r,Object.defineProperty(a(e),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),e.code="ERR_ASSERTION",e.actual=s,e.expected=u,e.operator=n,Error.captureStackTrace&&Error.captureStackTrace(a(e),i),e.stack,e.name="AssertionError",o(e)}return n(b,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:r,value:function(t,r){return d(this,e(e({},r),{},{customInspect:!1,depth:0}))}}]),b}(s(Error),d.custom);return Xy=A}!function(t){var e=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},r=/%[sdj%]/g;t.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var i=arguments,o=i.length,s=String(t).replace(r,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return t}})),f=i[n];n<o;f=i[++n])p(f)||!v(f)?s+=" "+f:s+=" "+a(f);return s},t.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var n={},i=/^$/;if(process.env.NODE_DEBUG){var o=process.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}function a(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function u(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return g(i)||(i=u(e,i,n)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(g(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(p(e))return t.stylize("null","null")}(e,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(E(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(m(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return c(r)}var v,S="",A=!1,M=["{","}"];(l(r)&&(A=!0,M=["[","]"]),E(r))&&(S=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(S=" "+RegExp.prototype.toString.call(r)),_(r)&&(S=" "+Date.prototype.toUTCString.call(r)),w(r)&&(S=" "+c(r)),0!==a.length||A&&0!=r.length?n<0?m(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),v=A?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)k(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}(e,r,n,s,a):a.map((function(t){return h(e,r,n,s,t,A)})),e.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(v,S,M)):M[0]+S+M[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(s=t.stylize("[Setter]","special")),k(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(f.value)<0?(s=p(r)?u(t,f.value,null):u(t,f.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),y(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function l(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function p(t){return null===t}function b(t){return"number"==typeof t}function g(t){return"string"==typeof t}function y(t){return void 0===t}function m(t){return v(t)&&"[object RegExp]"===S(t)}function v(t){return"object"==typeof t&&null!==t}function _(t){return v(t)&&"[object Date]"===S(t)}function w(t){return v(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!n[e])if(i.test(e)){var r=process.pid;n[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else n[e]=function(){};return n[e]},t.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=vy,t.isArray=l,t.isBoolean=d,t.isNull=p,t.isNullOrUndefined=function(t){return null==t},t.isNumber=b,t.isString=g,t.isSymbol=function(t){return"symbol"==typeof t},t.isUndefined=y,t.isRegExp=m,t.types.isRegExp=m,t.isObject=v,t.isDate=_,t.types.isDate=_,t.isError=w,t.types.isNativeError=w,t.isFunction=E,t.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},t.isBuffer=Qy;var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=bt,t._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function B(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}t.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(T&&t[T]){var r;if("function"!=typeof(r=t[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,T,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),T&&Object.defineProperty(r,T,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,e(t))},t.promisify.custom=T,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var n=e.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};t.apply(this,e).then((function(t){process.nextTick(o.bind(null,null,t))}),(function(t){process.nextTick(B.bind(null,t,o))}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,e(t)),r}}(my);var rm,nm,im=Object.prototype.toString,om=function(t){var e=im.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===im.call(t.callee)),r};var am=Array.prototype.slice,sm=om,fm=Object.keys,um=fm?function(t){return fm(t)}:function(){if(nm)return rm;var t;if(nm=1,!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=om,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call((function(){}),"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!u["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();t=function(t){var i=null!==t&&"object"==typeof t,u="[object Function]"===r.call(t),h=n(t),l=i&&"[object String]"===r.call(t),d=[];if(!i&&!u&&!h)throw new TypeError("Object.keys called on a non-object");var p=a&&u;if(l&&t.length>0&&!e.call(t,0))for(var b=0;b<t.length;++b)d.push(String(b));if(h&&t.length>0)for(var g=0;g<t.length;++g)d.push(String(g));else for(var y in t)p&&"prototype"===y||!e.call(t,y)||d.push(String(y));if(o)for(var m=function(t){if("undefined"==typeof window||!c)return f(t);try{return f(t)}catch(t){return!1}}(t),v=0;v<s.length;++v)m&&"constructor"===s[v]||!e.call(t,s[v])||d.push(s[v]);return d}}return rm=t}(),cm=Object.keys;um.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return sm(t)?cm(am.call(t)):cm(t)})}else Object.keys=um;return Object.keys||um};var hm,lm,dm,pm,bm,gm,ym,mm,vm,_m,wm,Em,Sm,Am,Mm,km,Tm,Bm=um,xm=Bm,Om=Xt(),jm=Sr,Rm=vt,Im=jm("Array.prototype.push"),Pm=jm("Object.prototype.propertyIsEnumerable"),Cm=Om?Rm.getOwnPropertySymbols:null,Lm=function(t,e){if(null==t)throw new TypeError("target must be an object");var r=Rm(t);if(1===arguments.length)return r;for(var n=1;n<arguments.length;++n){var i=Rm(arguments[n]),o=xm(i),a=Om&&(Rm.getOwnPropertySymbols||Cm);if(a)for(var s=a(i),f=0;f<s.length;++f){var u=s[f];Pm(i,u)&&Im(o,u)}for(var c=0;c<o.length;++c){var h=o[c];if(Pm(i,h)){var l=i[h];r[h]=l}}}return r},Nm=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),o="";for(var a in i)o+=a;return t!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1}()?Lm:Object.assign:Lm},Um=function(t){return t!=t},Fm=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!Um(t)||!Um(e))},Dm=Fm,qm=function(){return"function"==typeof Object.is?Object.is:Dm},zm=vr,Hm=an,Vm=Hm(zm("String.prototype.indexOf")),Wm=function(t,e){var r=zm(t,!!e);return"function"==typeof r&&Vm(t,".prototype.")>-1?Hm(r):r};function Km(){if(lm)return hm;lm=1;var t=Bm,e="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),r=Object.prototype.toString,n=Array.prototype.concat,i=Vr,o=$r(),a=function(t,e,n,a){if(e in t)if(!0===a){if(t[e]===n)return}else if(!function(t){return"function"==typeof t&&"[object Function]"===r.call(t)}(a)||!a())return;o?i(t,e,n,!0):i(t,e,n)},s=function(r,i){var o=arguments.length>2?arguments[2]:{},s=t(i);e&&(s=n.call(s,Object.getOwnPropertySymbols(i)));for(var f=0;f<s.length;f+=1)a(r,s[f],i[s[f]],o[s[f]])};return s.supportsDescriptors=!!o,hm=s}function $m(){if(gm)return bm;gm=1;var t=Km(),e=an,r=Fm,n=qm,i=function(){if(pm)return dm;pm=1;var t=qm,e=Km();return dm=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},dm}(),o=e(n(),Object);return t(o,{getPolyfill:n,implementation:r,shim:i}),bm=o}function Gm(){return mm?ym:(mm=1,ym=function(t){return t!=t})}function Zm(){if(_m)return vm;_m=1;var t=Gm();return vm=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t}}function Jm(){if(Em)return wm;Em=1;var t=Km(),e=Zm();return wm=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},wm}function Xm(){if(km)return Mm;function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],f=!0,u=!1;try{if(o=(r=r.call(t)).next,0===e);else for(;!(f=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);f=!0);}catch(t){u=!0,i=t}finally{try{if(!f&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r(t){return r="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},r(t)}km=1;var n=void 0!==/a/g.flags,i=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},o=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},a=Object.is?Object.is:$m(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:function(){if(Am)return Sm;Am=1;var t=an,e=Km(),r=Gm(),n=Zm(),i=Jm(),o=t(n(),Number);return e(o,{getPolyfill:n,implementation:r,shim:i}),Sm=o}();function u(t){return t.call.bind(t)}var c=u(Object.prototype.hasOwnProperty),h=u(Object.prototype.propertyIsEnumerable),l=u(Object.prototype.toString),d=my.types,p=d.isAnyArrayBuffer,b=d.isArrayBufferView,g=d.isDate,y=d.isMap,m=d.isRegExp,v=d.isSet,_=d.isNativeError,w=d.isBoxedPrimitive,E=d.isNumberObject,S=d.isStringObject,A=d.isBooleanObject,M=d.isBigIntObject,k=d.isSymbolObject,T=d.isFloat32Array,B=d.isFloat64Array;function x(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function O(t){return Object.keys(t).filter(x).concat(s(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function j(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 R(t,e,i,o){if(t===e)return 0!==t||(!i||a(t,e));if(i){if("object"!==r(t))return"number"==typeof t&&f(t)&&f(e);if("object"!==r(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==r(t))return(null===e||"object"!==r(e))&&t==e;if(null===e||"object"!==r(e))return!1}var s,u,c,h,d=l(t);if(d!==l(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var x=O(t),R=O(e);return x.length===R.length&&P(t,e,i,o,1,x)}if("[object Object]"===d&&(!y(t)&&y(e)||!v(t)&&v(e)))return!1;if(g(t)){if(!g(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(m(t)){if(!m(e)||(c=t,h=e,!(n?c.source===h.source&&c.flags===h.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(h))))return!1}else if(_(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(b(t)){if(i||!T(t)&&!B(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===j(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var I=O(t),C=O(e);return I.length===C.length&&P(t,e,i,o,0,I)}if(v(t))return!(!v(e)||t.size!==e.size)&&P(t,e,i,o,2);if(y(t))return!(!y(e)||t.size!==e.size)&&P(t,e,i,o,3);if(p(t)){if(u=e,(s=t).byteLength!==u.byteLength||0!==j(new Uint8Array(s),new Uint8Array(u)))return!1}else if(w(t)&&!function(t,e){return E(t)?E(e)&&a(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):S(t)?S(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):A(t)?A(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):M(t)?M(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):k(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return P(t,e,i,o,0)}function I(t,e){return e.filter((function(e){return h(t,e)}))}function P(e,n,a,f,u,l){if(5===arguments.length){l=Object.keys(e);var d=Object.keys(n);if(l.length!==d.length)return!1}for(var p=0;p<l.length;p++)if(!c(n,l[p]))return!1;if(a&&5===arguments.length){var b=s(e);if(0!==b.length){var g=0;for(p=0;p<b.length;p++){var y=b[p];if(h(e,y)){if(!h(n,y))return!1;l.push(y),g++}else if(h(n,y))return!1}var m=s(n);if(b.length!==m.length&&I(n,m).length!==g)return!1}else{var v=s(n);if(0!==v.length&&0!==I(n,v).length)return!1}}if(0===l.length&&(0===u||1===u&&0===e.length||0===e.size))return!0;if(void 0===f)f={val1:new Map,val2:new Map,position:0};else{var _=f.val1.get(e);if(void 0!==_){var w=f.val2.get(n);if(void 0!==w)return _===w}f.position++}f.val1.set(e,f.position),f.val2.set(n,f.position);var E=function(e,n,a,s,f,u){var h=0;if(2===u){if(!function(t,e,n,o){for(var a=null,s=i(t),f=0;f<s.length;f++){var u=s[f];if("object"===r(u)&&null!==u)null===a&&(a=new Set),a.add(u);else if(!e.has(u)){if(n)return!1;if(!N(t,e,u))return!1;null===a&&(a=new Set),a.add(u)}}if(null!==a){for(var c=i(e),h=0;h<c.length;h++){var l=c[h];if("object"===r(l)&&null!==l){if(!C(a,l,n,o))return!1}else if(!n&&!t.has(l)&&!C(a,l,n,o))return!1}return 0===a.size}return!0}(e,n,a,f))return!1}else if(3===u){if(!function(e,n,i,a){for(var s=null,f=o(e),u=0;u<f.length;u++){var c=t(f[u],2),h=c[0],l=c[1];if("object"===r(h)&&null!==h)null===s&&(s=new Set),s.add(h);else{var d=n.get(h);if(void 0===d&&!n.has(h)||!R(l,d,i,a)){if(i)return!1;if(!U(e,n,h,l,a))return!1;null===s&&(s=new Set),s.add(h)}}}if(null!==s){for(var p=o(n),b=0;b<p.length;b++){var g=t(p[b],2),y=g[0],m=g[1];if("object"===r(y)&&null!==y){if(!F(s,e,y,m,i,a))return!1}else if(!(i||e.has(y)&&R(e.get(y),m,!1,a)||F(s,e,y,m,!1,a)))return!1}return 0===s.size}return!0}(e,n,a,f))return!1}else if(1===u)for(;h<e.length;h++){if(!c(e,h)){if(c(n,h))return!1;for(var l=Object.keys(e);h<l.length;h++){var d=l[h];if(!c(n,d)||!R(e[d],n[d],a,f))return!1}return l.length===Object.keys(n).length}if(!c(n,h)||!R(e[h],n[h],a,f))return!1}for(h=0;h<s.length;h++){var p=s[h];if(!R(e[p],n[p],a,f))return!1}return!0}(e,n,a,l,f,u);return f.val1.delete(e),f.val2.delete(n),E}function C(t,e,r,n){for(var o=i(t),a=0;a<o.length;a++){var s=o[a];if(R(e,s,r,n))return t.delete(s),!0}return!1}function L(t){switch(r(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(f(t))return!1}return!0}function N(t,e,r){var n=L(r);return null!=n?n:e.has(n)&&!t.has(n)}function U(t,e,r,n,i){var o=L(r);if(null!=o)return o;var a=e.get(o);return!(void 0===a&&!e.has(o)||!R(n,a,!1,i))&&(!t.has(o)&&R(n,a,!1,i))}function F(t,e,r,n,o,a){for(var s=i(t),f=0;f<s.length;f++){var u=s[f];if(R(r,u,o,a)&&R(n,e.get(u),o,a))return t.delete(u),!0}return!1}return Mm={isDeepEqual:function(t,e){return R(t,e,false)},isDeepStrictEqual:function(t,e){return R(t,e,true)}}}function Ym(){if(Tm)return gy.exports;function t(e){return t="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},t(e)}function e(t,e,r){return Object.defineProperty(t,"prototype",{writable:!1}),t}Tm=1;var r,n,i=tm().codes,o=i.ERR_AMBIGUOUS_ARGUMENT,a=i.ERR_INVALID_ARG_TYPE,s=i.ERR_INVALID_ARG_VALUE,f=i.ERR_INVALID_RETURN_VALUE,u=i.ERR_MISSING_ARGS,c=em(),h=my.inspect,l=my.types,d=l.isPromise,p=l.isRegExp,b=Nm(),g=qm(),y=Wm("RegExp.prototype.test");function m(){var t=Xm();r=t.isDeepEqual,n=t.isDeepStrictEqual}var v=!1,_=gy.exports=A,w={};function E(t){if(t.message instanceof Error)throw t.message;throw new c(t)}function S(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new c({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function A(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];S.apply(void 0,[A,e.length].concat(e))}_.fail=function t(e,r,n,i,o){var a,s=arguments.length;if(0===s)a="Failed";else if(1===s)n=e,e=void 0;else{if(!1===v)v=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===s&&(i="!=")}if(n instanceof Error)throw n;var f={actual:e,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||t};void 0!==n&&(f.message=n);var u=new c(f);throw a&&(u.message=a,u.generatedMessage=!0),u},_.AssertionError=c,_.ok=A,_.equal=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");e!=r&&E({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},_.notEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");e==r&&E({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},_.deepEqual=function t(e,n,i){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),r(e,n)||E({actual:e,expected:n,message:i,operator:"deepEqual",stackStartFn:t})},_.notDeepEqual=function t(e,n,i){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),r(e,n)&&E({actual:e,expected:n,message:i,operator:"notDeepEqual",stackStartFn:t})},_.deepStrictEqual=function t(e,i,o){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m(),n(e,i)||E({actual:e,expected:i,message:o,operator:"deepStrictEqual",stackStartFn:t})},_.notDeepStrictEqual=function t(e,i,o){if(arguments.length<2)throw new u("actual","expected");void 0===r&&m();n(e,i)&&E({actual:e,expected:i,message:o,operator:"notDeepStrictEqual",stackStartFn:t})},_.strictEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");g(e,r)||E({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},_.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new u("actual","expected");g(e,r)&&E({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var M=e((function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&p(e[t])&&y(e[t],n[t])?i[t]=n[t]:i[t]=e[t])}))}));function k(e,i,o,f){if("function"!=typeof i){if(p(i))return y(i,e);if(2===arguments.length)throw new a("expected",["Function","RegExp"],i);if("object"!==t(e)||null===e){var u=new c({actual:e,expected:i,message:o,operator:"deepStrictEqual",stackStartFn:f});throw u.operator=f.name,u}var h=Object.keys(i);if(i instanceof Error)h.push("name","message");else if(0===h.length)throw new s("error",i,"may not be an empty object");return void 0===r&&m(),h.forEach((function(t){"string"==typeof e[t]&&p(i[t])&&y(i[t],e[t])||function(t,e,r,i,o,a){if(!(r in t)||!n(t[r],e[r])){if(!i){var s=new M(t,o),f=new M(e,o,t),u=new c({actual:s,expected:f,operator:"deepStrictEqual",stackStartFn:a});throw u.actual=t,u.expected=e,u.operator=a.name,u}E({actual:t,expected:e,message:i,operator:a.name,stackStartFn:a})}}(e,i,t,o,h,f)})),!0}return void 0!==i.prototype&&e instanceof i||!Error.isPrototypeOf(i)&&!0===i.call({},e)}function T(t){if("function"!=typeof t)throw new a("fn","Function",t);try{t()}catch(t){return t}return w}function B(e){return d(e)||null!==e&&"object"===t(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function x(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!B(e=t()))throw new f("instance of Promise","promiseFn",e)}else{if(!B(t))throw new a("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return w})).catch((function(t){return t}))}))}function O(e,r,n,i){if("string"==typeof n){if(4===arguments.length)throw new a("error",["Object","Error","Function","RegExp"],n);if("object"===t(r)&&null!==r){if(r.message===n)throw new o("error/message",'The error message "'.concat(r.message,'" is identical to the message.'))}else if(r===n)throw new o("error/message",'The error "'.concat(r,'" is identical to the message.'));i=n,n=void 0}else if(null!=n&&"object"!==t(n)&&"function"!=typeof n)throw new a("error",["Object","Error","Function","RegExp"],n);if(r===w){var s="";n&&n.name&&(s+=" (".concat(n.name,")")),s+=i?": ".concat(i):".";var f="rejects"===e.name?"rejection":"exception";E({actual:void 0,expected:n,operator:e.name,message:"Missing expected ".concat(f).concat(s),stackStartFn:e})}if(n&&!k(r,n,i,e))throw r}function j(t,e,r,n){if(e!==w){if("string"==typeof r&&(n=r,r=void 0),!r||k(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";E({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function R(e,r,n,i,o){if(!p(r))throw new a("regexp","RegExp",r);var s="match"===o;if("string"!=typeof e||y(r,e)!==s){if(n instanceof Error)throw n;var f=!n;n=n||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(t(e)," (").concat(h(e),")"):(s?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(h(r),". Input:\n\n").concat(h(e),"\n"));var u=new c({actual:e,expected:r,message:n,operator:o,stackStartFn:i});throw u.generatedMessage=f,u}}function I(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];S.apply(void 0,[I,e.length].concat(e))}return _.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];O.apply(void 0,[t,T(e)].concat(n))},_.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return x(e).then((function(e){return O.apply(void 0,[t,e].concat(n))}))},_.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];j.apply(void 0,[t,T(e)].concat(n))},_.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return x(e).then((function(e){return j.apply(void 0,[t,e].concat(n))}))},_.ifError=function e(r){if(null!=r){var n="ifError got unwanted exception: ";"object"===t(r)&&"string"==typeof r.message?0===r.message.length&&r.constructor?n+=r.constructor.name:n+=r.message:n+=h(r);var i=new c({actual:r,expected:null,operator:"ifError",message:n,stackStartFn:e}),o=r.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=i.stack.split("\n"),f=0;f<a.length;f++){var u=s.indexOf(a[f]);if(-1!==u){s=s.slice(0,u);break}}i.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw i}},_.match=function t(e,r,n){R(e,r,n,t,"match")},_.doesNotMatch=function t(e,r,n){R(e,r,n,t,"doesNotMatch")},_.strict=b(I,_,{equal:_.strictEqual,deepEqual:_.deepStrictEqual,notEqual:_.notStrictEqual,notDeepEqual:_.notDeepStrictEqual}),_.strict.strict=_.strict,gy.exports}var Qm=r(Ym());const tv=new cy.ec("secp256k1"),ev=tv.g,rv=new yh(tv.n.toString());class nv{constructor(t){this.Q=t}static fromBinary(t){return nv.fromBuffer(Buffer.from(t,"binary"))}static fromBuffer(t){return"000000000000000000000000000000000000000000000000000000000000000000"===t.toString("hex")?new nv(null):new nv(tv.curve.decodePoint(t))}toBuffer(t=!0){return null===this.Q?Buffer.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):Buffer.from(this.Q.encode("array",t))}static fromPoint(t){return new nv(t)}toUncompressed(){const t=Buffer.from(this.Q.encode("array",!1)),e=tv.curve.decodePoint(t);return nv.fromPoint(e)}toBlockchainAddress(){return py(ly(this.toBuffer()))}toString(t=M().get("address_prefix")){return this.toPublicKeyString(t)}toPublicKeyString(t=M().get("address_prefix")){if(this.pubdata)return t+this.pubdata;const e=this.toBuffer(),r=py(e),n=Buffer.concat([e,r.slice(0,4)]);return this.pubdata=by.encode(n),t+this.pubdata}static fromString(t,e=M().get("address_prefix")){try{return nv.fromStringOrThrow(t,e)}catch(t){return null}}static fromStringOrThrow(t,e=M().get("address_prefix")){const r=t.slice(0,e.length);Qm.equal(e,r,`Expecting key to begin with ${e}, instead got ${r}`),t=t.slice(e.length);const n=by.decode(t),i=Buffer.from(n),o=i.slice(-4),a=i.slice(0,-4),s=py(a).slice(0,4);return Qm.deepEqual(o,s,"Checksum did not match"),nv.fromBuffer(a)}toAddressString(t=M().get("address_prefix")){const e=py(ly(this.toBuffer())),r=py(e),n=Buffer.concat([e,r.slice(0,4)]);return t+by.encode(n)}toPtsAddy(){const t=py(hy(this.toBuffer())),e=Buffer.from([56]),r=Buffer.concat([e,t]);let n=hy(r);n=hy(n);const i=Buffer.concat([r,n.slice(0,4)]);return by.encode(i)}child(t){Qm(Buffer.isBuffer(t),"Buffer required: offset"),Qm.equal(t.length,32,"offset length"),t=hy(t=Buffer.concat([this.toBuffer(),t]));const e=new yh(t);if(e.cmp(rv)>=0)throw new Error("Child offset went out of bounds, try again");const r=ev.mul(e),n=this.Q.add(r);if(n.isInfinity())throw new Error("Child offset derived to an invalid key, try again");return nv.fromPoint(n)}static fromHex(t){const e=Buffer.from(t,"hex");return 0===e.length?new nv(null):nv.fromBuffer(e)}toHex(){return this.Q?this.toBuffer().toString("hex"):"000000000000000000000000000000000000000000000000000000000000000000"}static fromStringHex(t){return nv.fromString(Buffer.from(t,"hex").toString())}}const iv=new cy.ec("secp256k1"),ov=iv.g,av=new yh(iv.n.toString());class sv{constructor(t){this.d=t}static fromBuffer(t){if(!Buffer.isBuffer(t))throw new Error("Expecting parameter to be a Buffer type");if(32!==t.length&&I.warn(`WARN: Expecting 32 bytes, instead got ${t.length}, stack trace:`,(new Error).stack),0===t.length)throw new Error("Empty buffer");return new sv(new yh(t))}static fromSeed(t){if("string"!=typeof t)throw new Error("seed must be of type string");return sv.fromBuffer(hy(t))}static isWif(t){try{return this.fromWif(t),!0}catch(t){return!1}}static fromWif(t){const e=Buffer.from(by.decode(t)),r=e.readUInt8(0);Qm.equal(128,r,`Expected version 128, instead got ${r}`);const n=e.slice(0,-4),i=e.slice(-4);let o=hy(n);if(o=hy(o),o=o.slice(0,4),i.toString()!==o.toString())throw new Error("Invalid WIF key (checksum miss-match)");return n.writeUInt8(128,0),sv.fromBuffer(n.slice(1))}toWif(){const t=this.toBuffer(),e=Buffer.concat([Buffer.from([128]),t]);let r=hy(e);r=hy(r),r=r.slice(0,4);const n=Buffer.concat([e,r]);return by.encode(n)}toString(){return this.toWif()}toPublicKeyPoint(){return ov.mul(this.d)}toPublic(){return this.public_key?this.public_key:this.public_key=nv.fromPoint(this.toPublicKeyPoint())}toBuffer(){return this.d.toArrayLike(Buffer,"be",32)}get_shared_secret(t){const e="string"==typeof t?nv.fromStringOrThrow(t):t;if(!e||!e.Q)throw new Error("Invalid public key");return ly(e.Q.mul(this.d).getX().toArrayLike(Buffer,"be",32))}child(t){t=hy(t=Buffer.concat([this.toPublicKey().toBuffer(),t]));const e=new yh(t);if(e.gte(av))throw new Error("Child offset went out of bounds, try again");const r=this.d.add(e);if(r.isZero())throw new Error("Child offset derived to an invalid key, try again");return new sv(r)}static fromHex(t){return sv.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}toPublicKey(){return this.toPublic()}}function fv(t,e){switch(t){case"Array":if(Array.isArray(e))return;break;case"Boolean":if("boolean"==typeof e)return;break;case"Buffer":if(Buffer.isBuffer(e))return;break;case"Number":if("number"==typeof e)return;break;case"String":if("string"==typeof e)return;break;default:if("function"==typeof t&&uv(e.constructor)===uv(t))return}throw new TypeError("Expected "+("function"==typeof t?uv(t):t)+", got "+e)}function uv(t){const e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}class cv{constructor(t,e){fv(yh,t),fv(yh,e),this.r=t,this.s=e}static parseCompact(t){if(65!==t.length)throw new Error("Invalid signature length");let e=t.readUInt8(0)-27;if((7&e)!==e)throw new Error("Invalid signature parameter");const r=!!(4&e);e&=3;const n=new yh(t.slice(1,33)),i=new yh(t.slice(33));return{compressed:r,i:e,signature:new cv(n,i)}}static fromDER(t){if(48!==t.readUInt8(0))throw new Error("Not a DER sequence");if(t.readUInt8(1)!==t.length-2)throw new Error("Invalid sequence length");if(2!==t.readUInt8(2))throw new Error("Expected a DER integer");const e=t.readUInt8(3);if(0===e)throw new Error("R length is zero");let r=4+e;if(2!==t.readUInt8(r))throw new Error("Expected a DER integer (2)");const n=t.readUInt8(r+1);if(0===n)throw new Error("S length is zero");const i=t.slice(4,r),o=t.slice(r+2);if(r+=2+n,e>1&&0===i.readUInt8(0)&&!(128&i.readUInt8(1)))throw new Error("R value excessively padded");if(n>1&&0===o.readUInt8(0)&&!(128&o.readUInt8(1)))throw new Error("S value excessively padded");if(r!==t.length)throw new Error("Invalid DER encoding");const a=new yh(i),s=new yh(o);if(a.isNeg())throw new Error("R value is negative");if(s.isNeg())throw new Error("S value is negative");return new cv(a,s)}static parseScriptSignature(t){const e=t.readUInt8(t.length-1),r=-129&e;if(r<=0||r>=4)throw new Error("Invalid hashType");return{signature:cv.fromDER(t.slice(0,-1)),hashType:e}}toCompact(t,e){e&&(t+=4),t+=27;const r=Buffer.alloc(65);return r.writeUInt8(t,0),this.r.toArrayLike(Buffer,"be",32).copy(r,1),this.s.toArrayLike(Buffer,"be",32).copy(r,33),r}toDER(){const t=this.r.toArrayLike(Buffer,"be"),e=this.s.toArrayLike(Buffer,"be"),r=[];return r.push(2,t.length),Array.from(t).forEach((t=>r.push(t))),r.push(2,e.length),Array.from(e).forEach((t=>r.push(t))),r.unshift(48,r.length),Buffer.from(r)}toScriptSignature(t){const e=Buffer.alloc(1);return e.writeUInt8(t,0),Buffer.concat([this.toDER(),e])}}function hv(t,e,r,n){const i=new yh(e),o=new yh(t.n.toString()),a=t.g;let s,f;if(function(t,e,r,n,i){fv("Buffer",e),fv(yh,r),i&&(e=hy(Buffer.concat([e,Buffer.alloc(i)]))),Qm.equal(e.length,32,"Hash must be 256 bit");const o=r.toArrayLike(Buffer,"be",32);let a=Buffer.alloc(32),s=Buffer.alloc(32);s.fill(1),a.fill(0),a=dy(Buffer.concat([s,Buffer.from([0]),o,e]),a),s=dy(s,a),a=dy(Buffer.concat([s,Buffer.from([1]),o,e]),a),s=dy(s,a),s=dy(s,a);let f=new yh(s);for(;f.isNeg()||f.isZero()||f.gte(new yh(t.n.toString()))||!n(f);)a=dy(Buffer.concat([s,Buffer.from([0])]),a),s=dy(s,a),s=dy(s,a),f=new yh(s)}(t,e,r,(function(t){const e=a.mul(t);if(e.isInfinity())return!1;const n=new yh(e.getX().toString()).mod(o);if(n.isZero())return!1;const u=t.invm(o).mul(i.add(r.mul(n))).mod(o);return!u.isZero()&&(s=n,f=u,!0)}),n),!s||!f)throw new Error("Unable to find valid signature");const u=o.shrn(1),c=f.gt(u)?o.sub(f):f;return new cv(s,c)}const lv=new cy.ec("secp256k1");class dv{constructor(t,e,r){this.r=t,this.s=e,this.i=r}static fromBuffer(t){if(65!==t.length)throw new Error("Invalid signature length");const e=t.readUInt8(0);if(e-27!=(e-27&7))throw new Error("Invalid signature parameter");const r=new yh(t.slice(1,33)),n=new yh(t.slice(33));return new dv(r,n,e)}toBuffer(){const t=Buffer.alloc(65);return t.writeUInt8(this.i,0),this.r.toArrayLike(Buffer,"be",32).copy(t,1),this.s.toArrayLike(Buffer,"be",32).copy(t,33),t}static signBuffer(t,e){const r=hy(t);return dv.signBufferSha256(r,e)}static signBufferSha256(t,e){if(32!==t.length||!Buffer.isBuffer(t))throw new Error("buf_sha256: 32 byte buffer required");const r="string"==typeof e?sv.fromWif(e):e;if(!r)throw new Error("private_key required");const n=r.d;let i,o=0;for(;;){i=hv(lv,t,n,o++);const e=i.r.toArrayLike(Buffer,"be",32),r=i.s.toArrayLike(Buffer,"be",32);if(!(128&e[0]||0===e[0]&&!(128&e[1])||128&r[0]||0===r[0]&&!(128&r[1])))break}const a=function(t,e,r,n){for(let i=0;i<4;i++)try{if(t.recoverPubKey(e,r,i).eq(n))return i}catch(t){t.message}throw r.r.toString(16),r.s.toString(16),n.getX().toString(16),n.getY().toString(16),new Error("Unable to find valid recovery factor")}(lv,new yh(t),i,r.toPublic().Q);return new dv(i.r,i.s,a+27)}static isCanonical(t,e){return!(128&t[0]||0===t[0]&&!(128&t[1])||128&e[0]||0===e[0]&&!(128&e[1]))}static sign(t,e){return dv.signBuffer(Buffer.from(t),e)}verifyBuffer(t,e){const r=hy(t);return this.verifyHash(r,e)}verifyHash(t,e){if(32!==t.length)throw new Error("A SHA 256 should be 32 bytes long, instead got "+t.length);const r=new yh(t),n=new yh(lv.n.toString()),i=lv.g,o=e.Q;if(!o)throw new Error("Invalid public key");if(this.r.isNeg()||this.r.isZero()||this.r.gte(n))return!1;if(this.s.isNeg()||this.s.isZero()||this.s.gte(n))return!1;const a=this.s.invm(n),s=r.mul(a).mod(n),f=this.r.mul(a).mod(n),u=i.mul(s).add(o.mul(f));if(u.isInfinity())return!1;return u.getX().mod(n).eq(this.r)}static fromHex(t){return dv.fromBuffer(Buffer.from(t,"hex"))}toHex(){return this.toBuffer().toString("hex")}}class pv{constructor(t){this.addy=t}static fromBuffer(t){const e=t.subarray(-4),r=t.subarray(0,-4),n=py(r).subarray(0,4);if(!e.equals(n))throw new Error("Invalid address checksum");return M().get("address_prefix")+by.encode(r)}static fromString(t){const e=M().get("address_prefix");if(!t.startsWith(e))throw new Error(`Expecting address to begin with ${e}`);const r=t.slice(e.length),n=by.decode(r),i=n.subarray(-4),o=py(n.subarray(0,-4)).subarray(0,4);if(!i.equals(o))throw new Error("Invalid address checksum");return n}static fromPublicKey(t,e=!0){const r=t.toBuffer(e),n=py(r).subarray(0,4),i=Buffer.concat([r,n]);return M().get("address_prefix")+by.encode(i)}static fromPublic(t,e=!0,r=56){const n=py(hy(t.toBuffer(e))),i=Buffer.alloc(1);i.writeUInt8(255&r,0);const o=Buffer.concat([i,n]);let a=hy(o);a=hy(a);const s=Buffer.concat([o,a.subarray(0,4)]);return new pv(py(s))}static toBuffer(t){return pv.fromString(t)}toBuffer(){return this.addy}getVersion(){return this.addy[0]}toString(t=String(M().get("address_prefix"))||"STM"){const e=py(this.addy).subarray(0,4),r=Buffer.concat([this.addy,e]);return t+by.encode(r)}}var bv=zd(),gv=t({__proto__:null},[bv]);const yv=Buffer.from("3b3b081e46ea808d5a96b08c4bc5003f5e15767090f344faab531ec57565136b","hex");function mv(t,e,r,n,i){const o=bv.createHash("sha256");o.update(t),o.update(e),o.update(r),o.update(n);const a=bv.createHash("sha256");return a.update(yv),a.update(o.digest()),a.update(i),a.digest()}function vv(t,e,r){if(!t.params)throw new Error("Unable to sign a request without params");const n=Buffer.from(JSON.stringify(t.params),"utf8").toString("base64"),i=bv.randomBytes(8),o=i.toString("hex"),a=(new Date).toISOString(),s=mv(a,e,t.method,n,i),f=[];for(const t of r){const e=sv.fromWif(t),r=dv.signBufferSha256(s,e);f.push(r.toHex())}return{jsonrpc:"2.0",method:t.method,id:t.id,params:{__signed:{account:e,nonce:o,params:n,signatures:f,timestamp:a}}}}var _v=Object.freeze({__proto__:null,K:yv,sign:vv,validate:async function(t,e){if("2.0"!==t.jsonrpc||"string"!=typeof t.method)throw new Error("Invalid JSON RPC Request");if(null==t.params||null==t.params.__signed)throw new Error("Signed payload missing");if(1!==Object.keys(t.params).length)throw new Error("Invalid request params");const r=t.params.__signed;if(null==r.account)throw new Error("Missing account");let n;try{const t=Buffer.from(r.params,"base64").toString("utf8");n=JSON.parse(t)}catch(t){throw new Error(`Invalid encoded params: ${t.message}`)}if(null==r.nonce||"string"!=typeof r.nonce)throw new Error("Invalid nonce");const i=Buffer.from(r.nonce,"hex");if(8!==i.length)throw new Error("Invalid nonce");const o=Date.parse(r.timestamp);if(Number.isNaN(o))throw new Error("Invalid timestamp");if(Date.now()-o>6e4)throw new Error("Signature expired");const a=mv(r.timestamp,r.account,t.method,r.params,i);try{await e(a,r.signatures,r.account)}catch(t){throw new Error(`Verification failed: ${t.message}`)}return n}});const wv=[{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_post_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_comment_discussions_by_payout",params:["query"]},{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:"account_by_key_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:"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:"database_api",method:"get_content",params:["author","permlink"]},{api:"database_api",method:"get_account_notifications",params:["account","from","limit"]},{api:"database_api",method:"get_account_reputation",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_replies",params:["author","permlink"]},{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:"database_api",method:"get_reward_fund",params:["name"]},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit"]},{api:"login_api",method:"login",params:["username","password"]},{api:"login_api",method:"get_api_by_name",params:["database_api"]},{api:"login_api",method:"get_version"},{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"]},{api:"market_history_api",method:"get_ticker",params:[]},{api:"market_history_api",method:"get_volume",params:[]},{api:"market_history_api",method:"get_order_book",method_name:"getMarketOrderBook",params:["limit"]},{api:"market_history_api",method:"get_trade_history",params:["start","end","limit"]},{api:"market_history_api",method:"get_recent_trades",params:["limit"]},{api:"market_history_api",method:"get_market_history",params:["bucket_seconds","start","end"]},{api:"market_history_api",method:"get_market_history_buckets",params:[]},{api:"condenser_api",method:"find_proposals",params:["id_set"]},{api:"condenser_api",method:"list_proposals",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"list_proposal_votes",params:["start","limit","order_by","order_direction","status"]},{api:"condenser_api",method:"get_nai_pool",params:[]},{api:"rc_api",method:"find_rc_accounts",params:["accounts"],is_object:!0},{api:"condenser_api",method:"get_expiring_vesting_delegations",params:["account","start","limit"]},{api:"database_api",method:"find_change_recovery_account_requests",params:["account"],is_object:!0},{api:"database_api",method:"get_escrow_by_from",params:["from","escrowId"]},{api:"database_api",method:"get_escrow_by_to",params:["to","escrowId"]},{api:"database_api",method:"get_escrow_by_agent",params:["agent","escrowId"]},{api:"database_api",method:"get_account_bandwidth_by_type",params:["account","bandwidthType"]},{api:"database_api",method:"get_account_bandwidth_by_type_and_time",params:["account","bandwidthType","time"]},{api:"database_api",method:"get_proposed_transactions",params:["account"]},{api:"database_api",method:"get_proposed_transaction",params:["account","proposalId"]},{api:"database_api",method:"get_proposed_transaction_expirations",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_id",params:["proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account",params:["account"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_id",params:["account","proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time",params:["account","time"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time_and_id",params:["account","time","proposalId"]},{api:"database_api",method:"get_proposed_transaction_approvals_by_account_and_time_and_id_and_approver",params:["account","time","proposalId","approver"]}];function Ev(t,e){return function(){return t.apply(e,arguments)}}const{toString:Sv}=Object.prototype,{getPrototypeOf:Av}=Object,{iterator:Mv,toStringTag:kv}=Symbol,Tv=(t=>e=>{const r=Sv.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bv=t=>(t=t.toLowerCase(),e=>Tv(e)===t),xv=t=>e=>typeof e===t,{isArray:Ov}=Array,jv=xv("undefined");function Rv(t){return null!==t&&!jv(t)&&null!==t.constructor&&!jv(t.constructor)&&Cv(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Iv=Bv("ArrayBuffer");const Pv=xv("string"),Cv=xv("function"),Lv=xv("number"),Nv=t=>null!==t&&"object"==typeof t,Uv=t=>{if("object"!==Tv(t))return!1;const e=Av(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||kv in t||Mv in t)},Fv=Bv("Date"),Dv=Bv("File"),qv=Bv("Blob"),zv=Bv("FileList"),Hv=Bv("URLSearchParams"),[Vv,Wv,Kv,$v]=["ReadableStream","Request","Response","Headers"].map(Bv);function Gv(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),Ov(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(Rv(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(n=0;n<o;n++)a=i[n],e.call(null,t[a],a,t)}}function Zv(t,e){if(Rv(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const Jv="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Xv=t=>!jv(t)&&t!==Jv;const Yv=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&Av(Uint8Array)),Qv=Bv("HTMLFormElement"),t_=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),e_=Bv("RegExp"),r_=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Gv(r,((r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)})),Object.defineProperties(t,n)};const n_=Bv("AsyncFunction"),i_=(o_="function"==typeof setImmediate,a_=Cv(Jv.postMessage),o_?setImmediate:a_?(s_=`axios@${Math.random()}`,f_=[],Jv.addEventListener("message",(({source:t,data:e})=>{t===Jv&&e===s_&&f_.length&&f_.shift()()}),!1),t=>{f_.push(t),Jv.postMessage(s_,"*")}):t=>setTimeout(t));var o_,a_,s_,f_;const u_="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Jv):"undefined"!=typeof process&&process.nextTick||i_;var c_={isArray:Ov,isArrayBuffer:Iv,isBuffer:Rv,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Cv(t.append)&&("formdata"===(e=Tv(t))||"object"===e&&Cv(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Iv(t.buffer),e},isString:Pv,isNumber:Lv,isBoolean:t=>!0===t||!1===t,isObject:Nv,isPlainObject:Uv,isEmptyObject:t=>{if(!Nv(t)||Rv(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:Vv,isRequest:Wv,isResponse:Kv,isHeaders:$v,isUndefined:jv,isDate:Fv,isFile:Dv,isBlob:qv,isRegExp:e_,isFunction:Cv,isStream:t=>Nv(t)&&Cv(t.pipe),isURLSearchParams:Hv,isTypedArray:Yv,isFileList:zv,forEach:Gv,merge:function t(){const{caseless:e,skipUndefined:r}=Xv(this)&&this||{},n={},i=(i,o)=>{const a=e&&Zv(n,o)||o;Uv(n[a])&&Uv(i)?n[a]=t(n[a],i):Uv(i)?n[a]=t({},i):Ov(i)?n[a]=i.slice():r&&jv(i)||(n[a]=i)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&Gv(arguments[t],i);return n},extend:(t,e,r,{allOwnKeys:n}={})=>(Gv(e,((e,n)=>{r&&Cv(e)?t[n]=Ev(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,o,a;const s={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&Av(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:Tv,kindOfTest:Bv,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(Ov(t))return t;let e=t.length;if(!Lv(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Mv]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Qv,hasOwnProperty:t_,hasOwnProp:t_,reduceDescriptors:r_,freezeMethods:t=>{r_(t,((e,r)=>{if(Cv(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];Cv(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return Ov(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Zv,global:Jv,isContextDefined:Xv,isSpecCompliantForm:function(t){return!!(t&&Cv(t.append)&&"FormData"===t[kv]&&t[Mv])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(Nv(t)){if(e.indexOf(t)>=0)return;if(Rv(t))return t;if(!("toJSON"in t)){e[n]=t;const i=Ov(t)?[]:{};return Gv(t,((t,e)=>{const o=r(t,n+1);!jv(o)&&(i[e]=o)})),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:n_,isThenable:t=>t&&(Nv(t)||Cv(t))&&Cv(t.then)&&Cv(t.catch),setImmediate:i_,asap:u_,isIterable:t=>null!=t&&Cv(t[Mv])};function h_(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}c_.inherits(h_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c_.toJSONObject(this.config),code:this.code,status:this.status}}});const l_=h_.prototype,d_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{d_[t]={value:t}})),Object.defineProperties(h_,d_),Object.defineProperty(l_,"isAxiosError",{value:!0}),h_.from=(t,e,r,n,i,o)=>{const a=Object.create(l_);c_.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t));const s=t&&t.message?t.message:"Error",f=null==e&&t?t.code:e;return h_.call(a,s,f,r,n,i),t&&null==a.cause&&Object.defineProperty(a,"cause",{value:t,configurable:!0}),a.name=t&&t.name||"Error",o&&Object.assign(a,o),a};function p_(t){return c_.isPlainObject(t)||c_.isArray(t)}function b_(t){return c_.endsWith(t,"[]")?t.slice(0,-2):t}function g_(t,e,r){return t?t.concat(e).map((function(t,e){return t=b_(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const y_=c_.toFlatObject(c_,{},null,(function(t){return/^is[A-Z]/.test(t)}));function m_(t,e,r){if(!c_.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=c_.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!c_.isUndefined(e[t])}))).metaTokens,i=r.visitor||u,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&c_.isSpecCompliantForm(e);if(!c_.isFunction(i))throw new TypeError("visitor must be a function");function f(t){if(null===t)return"";if(c_.isDate(t))return t.toISOString();if(c_.isBoolean(t))return t.toString();if(!s&&c_.isBlob(t))throw new h_("Blob is not supported. Use a Buffer instead.");return c_.isArrayBuffer(t)||c_.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,r,i){let s=t;if(t&&!i&&"object"==typeof t)if(c_.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(c_.isArray(t)&&function(t){return c_.isArray(t)&&!t.some(p_)}(t)||(c_.isFileList(t)||c_.endsWith(r,"[]"))&&(s=c_.toArray(t)))return r=b_(r),s.forEach((function(t,n){!c_.isUndefined(t)&&null!==t&&e.append(!0===a?g_([r],n,o):null===a?r:r+"[]",f(t))})),!1;return!!p_(t)||(e.append(g_(i,r,o),f(t)),!1)}const c=[],h=Object.assign(y_,{defaultVisitor:u,convertValue:f,isVisitable:p_});if(!c_.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!c_.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),c_.forEach(r,(function(r,o){!0===(!(c_.isUndefined(r)||null===r)&&i.call(e,r,c_.isString(o)?o.trim():o,n,h))&&t(r,n?n.concat(o):[o])})),c.pop()}}(t),e}function v_(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function __(t,e){this._pairs=[],t&&m_(t,this,e)}const w_=__.prototype;function E_(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function S_(t,e,r){if(!e)return t;const n=r&&r.encode||E_;c_.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(e,r):c_.isURLSearchParams(e)?e.toString():new __(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}w_.append=function(t,e){this._pairs.push([t,e])},w_.toString=function(t){const e=t?function(e){return t.call(this,e,v_)}:v_;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class A_{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c_.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var M_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k_={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:__,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const T_="undefined"!=typeof window&&"undefined"!=typeof document,B_="object"==typeof navigator&&navigator||void 0,x_=T_&&(!B_||["ReactNative","NativeScript","NS"].indexOf(B_.product)<0),O_="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,j_=T_&&window.location.href||"http://localhost";var R_={...Object.freeze({__proto__:null,hasBrowserEnv:T_,hasStandardBrowserEnv:x_,hasStandardBrowserWebWorkerEnv:O_,navigator:B_,origin:j_}),...k_};function I_(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=t.length;if(o=!o&&c_.isArray(n)?n.length:o,s)return c_.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a;n[o]&&c_.isObject(n[o])||(n[o]=[]);return e(t,r,n[o],i)&&c_.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!a}if(c_.isFormData(t)&&c_.isFunction(t.entries)){const r={};return c_.forEachEntry(t,((t,n)=>{e(function(t){return c_.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null}const P_={transitional:M_,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=c_.isObject(t);i&&c_.isHTMLForm(t)&&(t=new FormData(t));if(c_.isFormData(t))return n?JSON.stringify(I_(t)):t;if(c_.isArrayBuffer(t)||c_.isBuffer(t)||c_.isStream(t)||c_.isFile(t)||c_.isBlob(t)||c_.isReadableStream(t))return t;if(c_.isArrayBufferView(t))return t.buffer;if(c_.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return m_(t,new R_.classes.URLSearchParams,{visitor:function(t,e,r,n){return R_.isNode&&c_.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=c_.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return m_(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(c_.isString(t))try{return(e||JSON.parse)(t),c_.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||P_.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(c_.isResponse(t)||c_.isReadableStream(t))return t;if(t&&c_.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(t){if(r){if("SyntaxError"===t.name)throw h_.from(t,h_.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R_.classes.FormData,Blob:R_.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c_.forEach(["delete","get","head","post","put","patch"],(t=>{P_.headers[t]={}}));const C_=c_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const L_=Symbol("internals");function N_(t){return t&&String(t).trim().toLowerCase()}function U_(t){return!1===t||null==t?t:c_.isArray(t)?t.map(U_):String(t)}function F_(t,e,r,n,i){return c_.isFunction(n)?n.call(this,e,r):(i&&(e=r),c_.isString(e)?c_.isString(n)?-1!==e.indexOf(n):c_.isRegExp(n)?n.test(e):void 0:void 0)}let D_=class{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=N_(e);if(!i)throw new Error("header name must be a non-empty string");const o=c_.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=U_(t))}const o=(t,e)=>c_.forEach(t,((t,r)=>i(t,r,e)));if(c_.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(c_.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&C_[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e);else if(c_.isObject(t)&&c_.isIterable(t)){let r,n,i={};for(const e of t){if(!c_.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[n=e[0]]=(r=i[n])?c_.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,r);return this}get(t,e){if(t=N_(t)){const r=c_.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(c_.isFunction(e))return e.call(this,t,r);if(c_.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=N_(t)){const r=c_.findKey(this,t);return!(!r||void 0===this[r]||e&&!F_(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=N_(t)){const i=c_.findKey(r,t);!i||e&&!F_(0,r[i],i,e)||(delete r[i],n=!0)}}return c_.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!F_(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return c_.forEach(this,((n,i)=>{const o=c_.findKey(r,i);if(o)return e[o]=U_(n),void delete e[i];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(i):String(i).trim();a!==i&&delete e[i],e[a]=U_(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return c_.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&c_.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[L_]=this[L_]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=N_(t);e[n]||(!function(t,e){const r=c_.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})}))}(r,t),e[n]=!0)}return c_.isArray(t)?t.forEach(n):n(t),this}};function q_(t,e){const r=this||P_,n=e||r,i=D_.from(n.headers);let o=n.data;return c_.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function z_(t){return!(!t||!t.__CANCEL__)}function H_(t,e,r){h_.call(this,null==t?"canceled":t,h_.ERR_CANCELED,e,r),this.name="CanceledError"}function V_(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new h_("Request failed with status code "+r.status,[h_.ERR_BAD_REQUEST,h_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}D_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c_.reduceDescriptors(D_.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),c_.freezeMethods(D_),c_.inherits(H_,h_,{__CANCEL__:!0});const W_=(t,e,r=3)=>{let n=0;const i=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,a=0;return e=void 0!==e?e:1e3,function(s){const f=Date.now(),u=n[a];i||(i=f),r[o]=s,n[o]=f;let c=a,h=0;for(;c!==o;)h+=r[c++],c%=t;if(o=(o+1)%t,o===a&&(a=(a+1)%t),f-i<e)return;const l=u&&f-u;return l?Math.round(1e3*h/l):void 0}}(50,250);return function(t,e){let r,n,i=0,o=1e3/e;const a=(e,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),t(...e)};return[(...t)=>{const e=Date.now(),s=e-i;s>=o?a(t,e):(r=t,n||(n=setTimeout((()=>{n=null,a(r)}),o-s)))},()=>r&&a(r)]}((r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,f=i(s);n=o;t({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:f||void 0,estimated:f&&a&&o<=a?(a-o)/f:void 0,event:r,lengthComputable:null!=a,[e?"download":"upload"]:!0})}),r)},K_=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},$_=t=>(...e)=>c_.asap((()=>t(...e)));var G_=R_.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,R_.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(R_.origin),R_.navigator&&/(msie|trident)/i.test(R_.navigator.userAgent)):()=>!0,Z_=R_.hasStandardBrowserEnv?{write(t,e,r,n,i,o,a){if("undefined"==typeof document)return;const s=[`${t}=${encodeURIComponent(e)}`];c_.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),c_.isString(n)&&s.push(`path=${n}`),c_.isString(i)&&s.push(`domain=${i}`),!0===o&&s.push("secure"),c_.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function J_(t,e,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(n||0==r)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const X_=t=>t instanceof D_?{...t}:t;function Y_(t,e){e=e||{};const r={};function n(t,e,r,n){return c_.isPlainObject(t)&&c_.isPlainObject(e)?c_.merge.call({caseless:n},t,e):c_.isPlainObject(e)?c_.merge({},e):c_.isArray(e)?e.slice():e}function i(t,e,r,i){return c_.isUndefined(e)?c_.isUndefined(t)?void 0:n(void 0,t,0,i):n(t,e,0,i)}function o(t,e){if(!c_.isUndefined(e))return n(void 0,e)}function a(t,e){return c_.isUndefined(e)?c_.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const f={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e,r)=>i(X_(t),X_(e),0,!0)};return c_.forEach(Object.keys({...t,...e}),(function(n){const o=f[n]||i,a=o(t[n],e[n],n);c_.isUndefined(a)&&o!==s||(r[n]=a)})),r}var Q_=t=>{const e=Y_({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;if(e.headers=a=D_.from(a),e.url=S_(J_(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),c_.isFormData(r))if(R_.hasStandardBrowserEnv||R_.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(c_.isFunction(r.getHeaders)){const t=r.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach((([t,r])=>{e.includes(t.toLowerCase())&&a.set(t,r)}))}if(R_.hasStandardBrowserEnv&&(n&&c_.isFunction(n)&&(n=n(e)),n||!1!==n&&G_(e.url))){const t=i&&o&&Z_.read(o);t&&a.set(i,t)}return e};var tw="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){const n=Q_(t);let i=n.data;const o=D_.from(n.headers).normalize();let a,s,f,u,c,{responseType:h,onUploadProgress:l,onDownloadProgress:d}=n;function p(){u&&u(),c&&c(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let b=new XMLHttpRequest;function g(){if(!b)return;const n=D_.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());V_((function(t){e(t),p()}),(function(t){r(t),p()}),{data:h&&"text"!==h&&"json"!==h?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:t,request:b}),b=null}b.open(n.method.toUpperCase(),n.url,!0),b.timeout=n.timeout,"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(g)},b.onabort=function(){b&&(r(new h_("Request aborted",h_.ECONNABORTED,t,b)),b=null)},b.onerror=function(e){const n=new h_(e&&e.message?e.message:"Network Error",h_.ERR_NETWORK,t,b);n.event=e||null,r(n),b=null},b.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||M_;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new h_(e,i.clarifyTimeoutError?h_.ETIMEDOUT:h_.ECONNABORTED,t,b)),b=null},void 0===i&&o.setContentType(null),"setRequestHeader"in b&&c_.forEach(o.toJSON(),(function(t,e){b.setRequestHeader(e,t)})),c_.isUndefined(n.withCredentials)||(b.withCredentials=!!n.withCredentials),h&&"json"!==h&&(b.responseType=n.responseType),d&&([f,c]=W_(d,!0),b.addEventListener("progress",f)),l&&b.upload&&([s,u]=W_(l),b.upload.addEventListener("progress",s),b.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=e=>{b&&(r(!e||e.type?new H_(null,t,b):e),b.abort(),b=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(n.url);y&&-1===R_.protocols.indexOf(y)?r(new h_("Unsupported protocol "+y+":",h_.ERR_BAD_REQUEST,t)):b.send(i||null)}))};const ew=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const i=function(t){if(!r){r=!0,a();const e=t instanceof Error?t:this.reason;n.abort(e instanceof h_?e:new H_(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,i(new h_(`timeout ${e} of ms exceeded`,h_.ETIMEDOUT))}),e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)})),t=null)};t.forEach((t=>t.addEventListener("abort",i)));const{signal:s}=n;return s.unsubscribe=()=>c_.asap(a),s}},rw=function*(t,e){let r=t.byteLength;if(r<e)return void(yield t);let n,i=0;for(;i<r;)n=i+e,yield t.slice(i,n),i=n},nw=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},iw=(t,e,r,n)=>{const i=async function*(t,e){for await(const r of nw(t))yield*rw(r,e)}(t,e);let o,a=0,s=t=>{o||(o=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await i.next();if(e)return s(),void t.close();let o=n.byteLength;if(r){let t=a+=o;r(t)}t.enqueue(new Uint8Array(n))}catch(t){throw s(t),t}},cancel:t=>(s(t),i.return())},{highWaterMark:2})},{isFunction:ow}=c_,aw=(({Request:t,Response:e})=>({Request:t,Response:e}))(c_.global),{ReadableStream:sw,TextEncoder:fw}=c_.global,uw=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},cw=t=>{t=c_.merge.call({skipUndefined:!0},aw,t);const{fetch:e,Request:r,Response:n}=t,i=e?ow(e):"function"==typeof fetch,o=ow(r),a=ow(n);if(!i)return!1;const s=i&&ow(sw),f=i&&("function"==typeof fw?(u=new fw,t=>u.encode(t)):async t=>new Uint8Array(await new r(t).arrayBuffer()));var u;const c=o&&s&&uw((()=>{let t=!1;const e=new r(R_.origin,{body:new sw,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),h=a&&s&&uw((()=>c_.isReadableStream(new n("").body))),l={stream:h&&(t=>t.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!l[t]&&(l[t]=(e,r)=>{let n=e&&e[t];if(n)return n.call(e);throw new h_(`Response type '${t}' is not supported`,h_.ERR_NOT_SUPPORT,r)})}));const d=async(t,e)=>{const n=c_.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(c_.isBlob(t))return t.size;if(c_.isSpecCompliantForm(t)){const e=new r(R_.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return c_.isArrayBufferView(t)||c_.isArrayBuffer(t)?t.byteLength:(c_.isURLSearchParams(t)&&(t+=""),c_.isString(t)?(await f(t)).byteLength:void 0)})(e):n};return async t=>{let{url:i,method:a,data:s,signal:f,cancelToken:u,timeout:p,onDownloadProgress:b,onUploadProgress:g,responseType:y,headers:m,withCredentials:v="same-origin",fetchOptions:_}=Q_(t),w=e||fetch;y=y?(y+"").toLowerCase():"text";let E=ew([f,u&&u.toAbortSignal()],p),S=null;const A=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let M;try{if(g&&c&&"get"!==a&&"head"!==a&&0!==(M=await d(m,s))){let t,e=new r(i,{method:"POST",body:s,duplex:"half"});if(c_.isFormData(s)&&(t=e.headers.get("content-type"))&&m.setContentType(t),e.body){const[t,r]=K_(M,W_($_(g)));s=iw(e.body,65536,t,r)}}c_.isString(v)||(v=v?"include":"omit");const e=o&&"credentials"in r.prototype,f={..._,signal:E,method:a.toUpperCase(),headers:m.normalize().toJSON(),body:s,duplex:"half",credentials:e?v:void 0};S=o&&new r(i,f);let u=await(o?w(S,_):w(i,f));const p=h&&("stream"===y||"response"===y);if(h&&(b||p&&A)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=u[e]}));const e=c_.toFiniteNumber(u.headers.get("content-length")),[r,i]=b&&K_(e,W_($_(b),!0))||[];u=new n(iw(u.body,65536,r,(()=>{i&&i(),A&&A()})),t)}y=y||"text";let k=await l[c_.findKey(l,y)||"text"](u,t);return!p&&A&&A(),await new Promise(((e,r)=>{V_(e,r,{data:k,headers:D_.from(u.headers),status:u.status,statusText:u.statusText,config:t,request:S})}))}catch(e){if(A&&A(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new h_("Network Error",h_.ERR_NETWORK,t,S),{cause:e.cause||e});throw h_.from(e,e&&e.code,t,S)}}},hw=new Map,lw=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,o=[n,i,r];let a,s,f=o.length,u=hw;for(;f--;)a=o[f],s=u.get(a),void 0===s&&u.set(a,s=f?new Map:cw(e)),u=s;return s};lw();const dw={http:null,xhr:tw,fetch:{get:lw}};c_.forEach(dw,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const pw=t=>`- ${t}`,bw=t=>c_.isFunction(t)||null===t||!1===t;var gw={getAdapter:function(t,e){t=c_.isArray(t)?t:[t];const{length:r}=t;let n,i;const o={};for(let a=0;a<r;a++){let r;if(n=t[a],i=n,!bw(n)&&(i=dw[(r=String(n)).toLowerCase()],void 0===i))throw new h_(`Unknown adapter '${r}'`);if(i&&(c_.isFunction(i)||(i=i.get(e))))break;o[r||"#"+a]=i}if(!i){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new h_("There is no suitable adapter to dispatch the request "+(r?t.length>1?"since :\n"+t.map(pw).join("\n"):" "+pw(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i},adapters:dw};function yw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new H_(null,t)}function mw(t){yw(t),t.headers=D_.from(t.headers),t.data=q_.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return gw.getAdapter(t.adapter||P_.adapter,t)(t).then((function(e){return yw(t),e.data=q_.call(t,t.transformResponse,e),e.headers=D_.from(e.headers),e}),(function(e){return z_(e)||(yw(t),e&&e.response&&(e.response.data=q_.call(t,t.transformResponse,e.response),e.response.headers=D_.from(e.response.headers))),Promise.reject(e)}))}const vw="1.13.2",_w={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{_w[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const ww={};_w.transitional=function(t,e,r){function n(t,e){return"[Axios v"+vw+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new h_(n(i," has been removed"+(e?" in "+e:"")),h_.ERR_DEPRECATED);return e&&!ww[i]&&(ww[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}},_w.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var Ew={assertOptions:function(t,e,r){if("object"!=typeof t)throw new h_("options must be an object",h_.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],a=e[o];if(a){const e=t[o],r=void 0===e||a(e,o,t);if(!0!==r)throw new h_("option "+o+" must be "+r,h_.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new h_("Unknown option "+o,h_.ERR_BAD_OPTION)}},validators:_w};const Sw=Ew.validators;let Aw=class{constructor(t){this.defaults=t||{},this.interceptors={request:new A_,response:new A_}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Y_(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&Ew.assertOptions(r,{silentJSONParsing:Sw.transitional(Sw.boolean),forcedJSONParsing:Sw.transitional(Sw.boolean),clarifyTimeoutError:Sw.transitional(Sw.boolean)},!1),null!=n&&(c_.isFunction(n)?e.paramsSerializer={serialize:n}:Ew.assertOptions(n,{encode:Sw.function,serialize:Sw.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ew.assertOptions(e,{baseUrl:Sw.spelling("baseURL"),withXsrfToken:Sw.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&c_.merge(i.common,i[e.method]);i&&c_.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=D_.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const f=[];let u;this.interceptors.response.forEach((function(t){f.push(t.fulfilled,t.rejected)}));let c,h=0;if(!s){const t=[mw.bind(this),void 0];for(t.unshift(...a),t.push(...f),c=t.length,u=Promise.resolve(e);h<c;)u=u.then(t[h++],t[h++]);return u}c=a.length;let l=e;for(;h<c;){const t=a[h++],e=a[h++];try{l=t(l)}catch(t){e.call(this,t);break}}try{u=mw.call(this,l)}catch(t){return Promise.reject(t)}for(h=0,c=f.length;h<c;)u=u.then(f[h++],f[h++]);return u}getUri(t){return S_(J_((t=Y_(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};c_.forEach(["delete","get","head","options"],(function(t){Aw.prototype[t]=function(e,r){return this.request(Y_(r||{},{method:t,url:e,data:(r||{}).data}))}})),c_.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(Y_(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Aw.prototype[t]=e(),Aw.prototype[t+"Form"]=e(!0)}));const Mw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mw).forEach((([t,e])=>{Mw[e]=t}));const kw=function t(e){const r=new Aw(e),n=Ev(Aw.prototype.request,r);return c_.extend(n,Aw.prototype,r,{allOwnKeys:!0}),c_.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Y_(e,r))},n}(P_);kw.Axios=Aw,kw.CanceledError=H_,kw.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new H_(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},kw.isCancel=z_,kw.VERSION=vw,kw.toFormData=m_,kw.AxiosError=h_,kw.Cancel=kw.CanceledError,kw.all=function(t){return Promise.all(t)},kw.spread=function(t){return function(e){return t.apply(null,e)}},kw.isAxiosError=function(t){return c_.isObject(t)&&!0===t.isAxiosError},kw.mergeConfig=Y_,kw.AxiosHeaders=D_,kw.formToJSON=t=>I_(c_.isHTMLForm(t)?new FormData(t):t),kw.getAdapter=gw.getAdapter,kw.HttpStatusCode=Mw,kw.default=kw;const{Axios:Tw,AxiosError:Bw,CanceledError:xw,isCancel:Ow,CancelToken:jw,VERSION:Rw,all:Iw,Cancel:Pw,isAxiosError:Cw,spread:Lw,toFormData:Nw,AxiosHeaders:Uw,HttpStatusCode:Fw,formToJSON:Dw,getAdapter:qw,mergeConfig:zw}=kw;var Hw={};function Vw(t,e){"boolean"==typeof e&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var Ww=Vw;Vw.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},Vw.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},Vw.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=(new Date).getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),r),this._options.unref&&this._timer.unref(),!0},Vw.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},Vw.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)},Vw.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)},Vw.prototype.start=Vw.prototype.try,Vw.prototype.errors=function(){return this._errors},Vw.prototype.attempts=function(){return this._attempts},Vw.prototype.mainError=function(){if(0===this._errors.length)return null;for(var t={},e=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,a=(t[o]||0)+1;t[o]=a,a>=r&&(e=i,r=a)}return e},function(t){var e=Ww;t.operation=function(r){var n=t.timeouts(r);return new e(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<e.retries;i++)n.push(this.createTimeout(i,e));return t&&t.forever&&!n.length&&n.push(this.createTimeout(i,e)),n.sort((function(t,e){return t-e})),n},t.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,n=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return n=Math.min(n,e.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],e)"function"==typeof e[i]&&n.push(i);for(var o=0;o<n.length;o++){var a=n[o],s=e[a];e[a]=function(n){var i=t.operation(r),o=Array.prototype.slice.call(arguments,1),a=o.pop();o.push((function(t){i.retry(t)||(t&&(arguments[0]=i.mainError()),a.apply(this,arguments))})),i.attempt((function(){n.apply(e,o)}))}.bind(e,s),e[a].options=r}}}(Hw);var Kw=r(Hw);class $w extends _.EventEmitter{constructor(t={}){super(),this.id=0,this.options=t,this.id=0}setOptions(t){Object.assign(this.options,t),this.stop()}listenTo(t,e,r){return"addEventListener"in t&&"function"==typeof t.addEventListener?(t.addEventListener(e,r),()=>{t.removeEventListener(e,r)}):(t.on(e,r),()=>{t.removeListener(e,r)})}send(t,e,r){}start(){return Promise.resolve()}stop(){return Promise.resolve()}}const Gw=async(t,e)=>{try{return(await kw.post(t,{jsonrpc:"2.0",...e})).data.result}catch(t){throw t}};var Zw=r((function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}));const Jw={http:class extends $w{constructor(t){super(t)}get nonRetriableOperations(){return["broadcast_transaction","broadcast_transaction_with_callback","broadcast_transaction_synchronous","broadcast_block"]}isBroadcastOperation(t){return this.nonRetriableOperations.includes(t)}send(t,e,r){"function"!=typeof r&&(r=()=>{});const n=this.options.uri;if(!n)throw new Error("HTTP transport requires a valid URI");const i=this.options.fetchMethod||fetch,o=e.id,a=[t,e.method,e.params],s=this.isBroadcastOperation(e.method),f=this.options.retry,u=s?6e4:3e4;if(!s&&f){const t="object"==typeof f?Kw.operation(f):Kw.operation();t.attempt((e=>{i(n,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",method:"call",params:a,id:o}),headers:{"Content-Type":"application/json"},timeout:u}).then((t=>t.json())).then((t=>{if(t.error){const n=new Error(t.error.message||"JSON-RPC error");n.code=t.error.code,n.data=t.error.data,r(n,void 0,e)}else r(null,t.result,e)}),(n=>{t.retry(n)||r(t.mainError(),void 0,e)}))}))}else i(n,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",method:"call",params:a,id:o}),headers:{"Content-Type":"application/json"},timeout:u}).then((t=>t.json())).then((t=>{if(t.error){const e=new Error(t.error.message||"JSON-RPC error");e.code=t.error.code,e.data=t.error.data,r(e,void 0,1)}else r(null,t.result,1)}),(t=>r(t,void 0,1)))}},ws:class extends $w{constructor(t){super({...t,websocket:t.websocket||"wss://api.steemit.com"}),this.ws=null,this._requests=new Map,this.seqNo=0}start(){return new Promise(((t,e)=>{if(this.ws)return void t();const r=this.options.websocket||"wss://api.steemit.com";this.ws=new Zw(r),this.ws.on("open",(()=>{t()})),this.ws.on("error",(t=>{e(t)})),this.ws.on("message",(t=>{const e=JSON.parse(t.toString()),r=this._requests.get(e.id);r&&(this._requests.delete(e.id),r(null,e.result))}))}))}stop(){return this.ws&&(this.ws.close(),this.ws=null),Promise.resolve()}send(t,e,r){if(!this.ws)return void this.start().then((()=>this.send(t,e,r)));const n=e.id||++this.seqNo,i={id:n,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]};this._requests.set(n,r),this.ws.send(JSON.stringify(i))}}};var Xw,Yw={exports:{}},Qw={exports:{}};!function(t){!function(r,n){t&&t.exports?t.exports=function(){var t;try{Xw||(Xw=1,function(t){!function(e,r){t&&t.exports?t.exports=r():(e.dcodeIO=e.dcodeIO||{}).Long=r()}(e,(function(){function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(n[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=a(t,t<0?-1:0,!1),s&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?b:p;if(e){if(t<0)return b;if(t>=h)return _}else{if(t<=-0x8000000000000000)return w;if(t+1>=l)return v}return t<0?o(-t,e).neg():a(t%c|0,t/c|0,e)}function a(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function f(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return p;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return f(t.substring(1),e,r).neg();for(var i=o(s(r,8)),a=p,u=0;u<t.length;u+=8){var c=Math.min(8,t.length-u),h=parseInt(t.substring(u,u+c),r);if(c<8){var l=o(s(r,c));a=a.mul(l).add(o(h))}else a=(a=a.mul(i)).add(o(h))}return a.unsigned=e,a}function u(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?f(e):a(e.low,e.high,e.unsigned)}t.fromString=f,t.fromValue=u;var c=4294967296,h=c*c,l=h/2,d=i(1<<24),p=i(0);t.ZERO=p;var b=i(0,!0);t.UZERO=b;var g=i(1);t.ONE=g;var y=i(1,!0);t.UONE=y;var m=i(-1);t.NEG_ONE=m;var v=a(-1,2147483647,!1);t.MAX_VALUE=v;var _=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var w=a(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(s(t,6),this.unsigned),a=this,f="";;){var u=a.div(i),c=(a.sub(u.mul(i)).toInt()>>>0).toString(t);if((a=u).isZero())return c+f;for(;c.length<6;)c="0"+c;f=""+c+f}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(t){return e(t)||(t=u(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=u(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(g)},E.neg=E.negate,E.add=function(t){e(t)||(t=u(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,f=65535&t.high,c=t.low>>>16,h=0,l=0,d=0,p=0;return d+=(p+=o+(65535&t.low))>>>16,l+=(d+=i+c)>>>16,h+=(l+=n+f)>>>16,h+=r+s,a((d&=65535)<<16|(p&=65535),(h&=65535)<<16|(l&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=u(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return p;if(e(t)||(t=u(t)),t.isZero())return p;if(this.eq(w))return t.isOdd()?w:p;if(t.eq(w))return this.isOdd()?w:p;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 o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,f=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,b=0,g=0,y=0,m=0;return y+=(m+=s*l)>>>16,g+=(y+=i*l)>>>16,y&=65535,g+=(y+=s*h)>>>16,b+=(g+=n*l)>>>16,g&=65535,b+=(g+=i*h)>>>16,g&=65535,b+=(g+=s*c)>>>16,b+=r*l+n*h+i*c+s*f,a((y&=65535)<<16|(m&=65535),(b&=65535)<<16|(g&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=u(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?b:p;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return b;if(t.gt(this.shru(1)))return y;i=b}else{if(this.eq(w))return t.eq(g)||t.eq(m)?w:t.eq(w)?g:(r=this.shr(1).div(t).shl(1)).eq(p)?t.isNegative()?g:m:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));if(t.eq(w))return this.unsigned?b:p;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();i=p}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),f=a<=48?1:s(2,a-48),c=o(r),h=c.mul(t);h.isNegative()||h.gt(n);)h=(c=o(r-=f,this.unsigned)).mul(t);c.isZero()&&(c=g),i=i.add(c),n=n.sub(h)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=u(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return a(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=u(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=u(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=u(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;return t<32?a(this.low>>>t|r<<32-t,r>>>t,this.unsigned):a(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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}))}(Qw)),t=Qw.exports}catch(t){}return n(t)}():(r.dcodeIO=r.dcodeIO||{}).ByteBuffer=n(r.dcodeIO.Long)}(e,(function(t){var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function a(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function s(t,e,r,n,i){var o,a,s=8*i-n-1,f=(1<<s)-1,u=f>>1,c=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=l,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+h],h+=l,c-=8);if(0===o)o=1-u;else{if(o===f)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)}function f(t,e,r,n,i,o){var a,s,f,u=8*o-i-1,c=(1<<u)-1,h=c>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+h>=1?l/f:l*Math.pow(2,1-h))*f>=2&&(a++,f/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*f-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*b}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,a=0,s=0,f=t.length;s<f;++s)e.isByteBuffer(t[s])||(t[s]=e.wrap(t[s],r)),(o=t[s].limit-t[s].offset)>0&&(a+=o);if(0===a)return new e(0,n,i);var u,c=new e(a,n,i);for(s=0;s<f;)(o=(u=t[s++]).limit-u.offset)<=0||(c.view.set(u.view.subarray(u.offset,u.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var a;if(e.isByteBuffer(t))return(a=r.clone.call(t)).markedOffset=-1,a;if(t instanceof Uint8Array)a=new e(0,i,o),t.length>0&&(a.buffer=t.buffer,a.offset=t.byteOffset,a.limit=t.byteOffset+t.byteLength,a.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)a=new e(0,i,o),t.byteLength>0&&(a.buffer=t,a.offset=0,a.limit=t.byteLength,a.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(a=new e(t.length,i,o)).limit=t.length;for(var s=0;s<t.length;++s)a.view[s]=t[s]}return a},r.writeBitSet=function(t,e){var r=void 0===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)<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 f=0;for(n=0;s<o;)n|=(1&!!t[s++])<<f++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===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 f=0;for(r=this.readByte(t++);a<i;)s[a++]=!!(r>>f++&1)}return e&&(this.offset=t),s},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128&~r||(r=-(255-r+1)),e&&(this.offset+=1),r},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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&~r||(r=-(65535-r+1)),e&&(this.offset+=2),r},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,f(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,f(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var a=this.buffer.byteLength;for(r>a&&this.resize((a*=2)>r?a:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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(128&r);return i|=0,e?(this.offset=t,i):{value:i,length:n}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),a=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,f=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var u=this.buffer.byteLength;switch(n>u&&this.resize((u*=2)>n?u:n),n-=o,o){case 10:this.view[n+9]=f>>>7&1;case 9:this.view[n+8]=9!==o?128|f:127&f;case 8:this.view[n+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==o?128|s:127&s;case 4:this.view[n+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<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(i=127&(s=this.view[e++]),128&s&&(i|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(o=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(a=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(a|=(127&(s=this.view[e++]))<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var f=t.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=e,f):{value:f,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=a(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var a=this.buffer.byteLength;if(e>a&&this.resize((a*=2)>e?a:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,s=0,f=n;if(r===e.METRICS_CHARS){if(o=a(),c.decodeUTF8(function(){return s<t&&n<this.limit?this.view[n++]:null}.bind(this),(function(t){++s,c.UTF8toUTF16(t,o)})),s!==t)throw RangeError("Illegal range: Truncated data, "+s+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-f}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var u=n+t;if(c.decodeUTF8toUTF16(function(){return n<u?this.view[n++]:null}.bind(this),o=a(),this.noAssert),n!==u)throw RangeError("Illegal range: Truncated data, "+n+" == "+u);return i?(this.offset=n,o()):{string:o(),length:n-f}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],a=e.calculateVarint32(i),r+=a+i;var f=this.buffer.byteLength;if(r>f&&this.resize((f*=2)>r?f:r),r-=a+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(o(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},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,a;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(a=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?t:(t.ensureCapacity(r+s),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=s),a&&(t.offset+=s),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var a=o-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),f=new Uint8Array(s);f.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=s,this.view=f,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<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},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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||Array.prototype.reverse.call(this.view.subarray(t,e)),this},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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 u=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())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function a(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&a(n),null!==(n=t())&&(void 0===(o=r[n])&&a(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;a(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;a(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return u.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=a()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return u.decode(o(t),(function(t){n.view[i++]=t})),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<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)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,a=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=o,a},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",a="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<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=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return t?a:i},e.fromDebug=function(t,r,n){for(var i,o,a=t.length,s=new e((a+1)/3|0,r,n),f=0,u=0,c=!1,h=!1,l=!1,d=!1,p=!1;f<a;){switch(i=t.charAt(f++)){case"!":if(!n){if(h||l||d){p=!0;break}h=l=d=!0}s.offset=s.markedOffset=s.limit=u,c=!1;break;case"|":if(!n){if(h||d){p=!0;break}h=d=!0}s.offset=s.limit=u,c=!1;break;case"[":if(!n){if(h||l){p=!0;break}h=l=!0}s.offset=s.markedOffset=u,c=!1;break;case"<":if(!n){if(h){p=!0;break}h=!0}s.offset=u,c=!1;break;case"]":if(!n){if(d||l){p=!0;break}d=l=!0}s.limit=s.markedOffset=u,c=!1;break;case">":if(!n){if(d){p=!0;break}d=!0}s.limit=u,c=!1;break;case"'":if(!n){if(l){p=!0;break}l=!0}s.markedOffset=u,c=!1;break;case" ":c=!1;break;default:if(!n&&c){p=!0;break}if(o=parseInt(i+t.charAt(f++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[u++]=o,c=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+f)}if(!n){if(!h||!d)throw TypeError("Illegal str: Missing offset or limit");if(u<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+u+" < "+a)}return s},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===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++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){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 i,o=t.length,a=new e(o/2|0,r),s=0,f=0;s<o;s+=2){if(i=parseInt(t.substring(s,s+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[f++]=i}return a.limit=f,a};var c=function(){var t={MAX_CODEPOINT:1114111,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},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(128&r)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)}else e(r)},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,(function(e){t.encodeUTF8(e,r)}))},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,(function(e){t.UTF8toUTF16(e,r)}))},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=a())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),a=0;return c.encodeUTF16toUTF8(o(t),(function(t){i.view[a++]=t})),i.limit=a,i},e}))}(Yw);var tE=r(Yw.exports),eE=null;try{eE=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function rE(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function nE(t){return!0===(t&&t.__isLong__)}function iE(t){var e=Math.clz32(t&-t);return t?31-e:e}rE.prototype.__isLong__,Object.defineProperty(rE.prototype,"__isLong__",{value:!0}),rE.isLong=nE;var oE={},aE={};function sE(t,e){var r,n,i;return e?(i=0<=(t>>>=0)&&t<256)&&(n=aE[t])?n:(r=uE(t,0,!0),i&&(aE[t]=r),r):(i=-128<=(t|=0)&&t<128)&&(n=oE[t])?n:(r=uE(t,t<0?-1:0,!1),i&&(oE[t]=r),r)}function fE(t,e){if(isNaN(t))return e?mE:yE;if(e){if(t<0)return mE;if(t>=pE)return SE}else{if(t<=-0x8000000000000000)return AE;if(t+1>=bE)return EE}return t<0?fE(-t,e).neg():uE(t%dE|0,t/dE|0,e)}function uE(t,e,r){return new rE(t,e,r)}rE.fromInt=sE,rE.fromNumber=fE,rE.fromBits=uE;var cE=Math.pow;function hE(t,e,r){if(0===t.length)throw Error("empty string");if("number"==typeof e?(r=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?mE:yE;if((r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return hE(t.substring(1),e,r).neg();for(var i=fE(cE(r,8)),o=yE,a=0;a<t.length;a+=8){var s=Math.min(8,t.length-a),f=parseInt(t.substring(a,a+s),r);if(s<8){var u=fE(cE(r,s));o=o.mul(u).add(fE(f))}else o=(o=o.mul(i)).add(fE(f))}return o.unsigned=e,o}function lE(t,e){return"number"==typeof t?fE(t,e):"string"==typeof t?hE(t,e):uE(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}rE.fromString=hE,rE.fromValue=lE;var dE=4294967296,pE=dE*dE,bE=pE/2,gE=sE(1<<24),yE=sE(0);rE.ZERO=yE;var mE=sE(0,!0);rE.UZERO=mE;var vE=sE(1);rE.ONE=vE;var _E=sE(1,!0);rE.UONE=_E;var wE=sE(-1);rE.NEG_ONE=wE;var EE=uE(-1,2147483647,!1);rE.MAX_VALUE=EE;var SE=uE(-1,-1,!0);rE.MAX_UNSIGNED_VALUE=SE;var AE=uE(0,-2147483648,!1);rE.MIN_VALUE=AE;var ME=rE.prototype;ME.toInt=function(){return this.unsigned?this.low>>>0:this.low},ME.toNumber=function(){return this.unsigned?(this.high>>>0)*dE+(this.low>>>0):this.high*dE+(this.low>>>0)},ME.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(AE)){var e=fE(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=fE(cE(t,6),this.unsigned),o=this,a="";;){var s=o.div(i),f=(o.sub(s.mul(i)).toInt()>>>0).toString(t);if((o=s).isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}},ME.getHighBits=function(){return this.high},ME.getHighBitsUnsigned=function(){return this.high>>>0},ME.getLowBits=function(){return this.low},ME.getLowBitsUnsigned=function(){return this.low>>>0},ME.getNumBitsAbs=function(){if(this.isNegative())return this.eq(AE)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},ME.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},ME.isZero=function(){return 0===this.high&&0===this.low},ME.eqz=ME.isZero,ME.isNegative=function(){return!this.unsigned&&this.high<0},ME.isPositive=function(){return this.unsigned||this.high>=0},ME.isOdd=function(){return!(1&~this.low)},ME.isEven=function(){return!(1&this.low)},ME.equals=function(t){return nE(t)||(t=lE(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},ME.eq=ME.equals,ME.notEquals=function(t){return!this.eq(t)},ME.neq=ME.notEquals,ME.ne=ME.notEquals,ME.lessThan=function(t){return this.comp(t)<0},ME.lt=ME.lessThan,ME.lessThanOrEqual=function(t){return this.comp(t)<=0},ME.lte=ME.lessThanOrEqual,ME.le=ME.lessThanOrEqual,ME.greaterThan=function(t){return this.comp(t)>0},ME.gt=ME.greaterThan,ME.greaterThanOrEqual=function(t){return this.comp(t)>=0},ME.gte=ME.greaterThanOrEqual,ME.ge=ME.greaterThanOrEqual,ME.compare=function(t){if(nE(t)||(t=lE(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?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},ME.comp=ME.compare,ME.negate=function(){return!this.unsigned&&this.eq(AE)?AE:this.not().add(vE)},ME.neg=ME.negate,ME.add=function(t){nE(t)||(t=lE(t));var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,o=t.high>>>16,a=65535&t.high,s=t.low>>>16,f=0,u=0,c=0,h=0;return c+=(h+=i+(65535&t.low))>>>16,u+=(c+=n+s)>>>16,f+=(u+=r+a)>>>16,f+=e+o,uE((c&=65535)<<16|(h&=65535),(f&=65535)<<16|(u&=65535),this.unsigned)},ME.subtract=function(t){return nE(t)||(t=lE(t)),this.add(t.neg())},ME.sub=ME.subtract,ME.multiply=function(t){if(this.isZero())return this;if(nE(t)||(t=lE(t)),eE)return uE(eE.mul(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned);if(t.isZero())return this.unsigned?mE:yE;if(this.eq(AE))return t.isOdd()?AE:yE;if(t.eq(AE))return this.isOdd()?AE:yE;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(gE)&&t.lt(gE))return fE(this.toNumber()*t.toNumber(),this.unsigned);var e=this.high>>>16,r=65535&this.high,n=this.low>>>16,i=65535&this.low,o=t.high>>>16,a=65535&t.high,s=t.low>>>16,f=65535&t.low,u=0,c=0,h=0,l=0;return h+=(l+=i*f)>>>16,c+=(h+=n*f)>>>16,h&=65535,c+=(h+=i*s)>>>16,u+=(c+=r*f)>>>16,c&=65535,u+=(c+=n*s)>>>16,c&=65535,u+=(c+=i*a)>>>16,u+=e*f+r*s+n*a+i*o,uE((h&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},ME.mul=ME.multiply,ME.divide=function(t){if(nE(t)||(t=lE(t)),t.isZero())throw Error("division by zero");var e,r,n;if(eE)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?uE((this.unsigned?eE.div_u:eE.div_s)(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?mE:yE;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return mE;if(t.gt(this.shru(1)))return _E;n=mE}else{if(this.eq(AE))return t.eq(vE)||t.eq(wE)?AE:t.eq(AE)?vE:(e=this.shr(1).div(t).shl(1)).eq(yE)?t.isNegative()?vE:wE:(r=this.sub(t.mul(e)),n=e.add(r.div(t)));if(t.eq(AE))return this.unsigned?mE:yE;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();n=yE}for(r=this;r.gte(t);){e=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(e)/Math.LN2),o=i<=48?1:cE(2,i-48),a=fE(e),s=a.mul(t);s.isNegative()||s.gt(r);)s=(a=fE(e-=o,this.unsigned)).mul(t);a.isZero()&&(a=vE),n=n.add(a),r=r.sub(s)}return n},ME.div=ME.divide,ME.modulo=function(t){return nE(t)||(t=lE(t)),eE?uE((this.unsigned?eE.rem_u:eE.rem_s)(this.low,this.high,t.low,t.high),eE.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},ME.mod=ME.modulo,ME.rem=ME.modulo,ME.not=function(){return uE(~this.low,~this.high,this.unsigned)},ME.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},ME.clz=ME.countLeadingZeros,ME.countTrailingZeros=function(){return this.low?iE(this.low):iE(this.high)+32},ME.ctz=ME.countTrailingZeros,ME.and=function(t){return nE(t)||(t=lE(t)),uE(this.low&t.low,this.high&t.high,this.unsigned)},ME.or=function(t){return nE(t)||(t=lE(t)),uE(this.low|t.low,this.high|t.high,this.unsigned)},ME.xor=function(t){return nE(t)||(t=lE(t)),uE(this.low^t.low,this.high^t.high,this.unsigned)},ME.shiftLeft=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):uE(0,this.low<<t-32,this.unsigned)},ME.shl=ME.shiftLeft,ME.shiftRight=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):uE(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},ME.shr=ME.shiftRight,ME.shiftRightUnsigned=function(t){return nE(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?uE(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):uE(32===t?this.high:this.high>>>t-32,0,this.unsigned)},ME.shru=ME.shiftRightUnsigned,ME.shr_u=ME.shiftRightUnsigned,ME.rotateLeft=function(t){var e;return nE(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?uE(this.high,this.low,this.unsigned):t<32?(e=32-t,uE(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),uE(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},ME.rotl=ME.rotateLeft,ME.rotateRight=function(t){var e;return nE(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?uE(this.high,this.low,this.unsigned):t<32?(e=32-t,uE(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),uE(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},ME.rotr=ME.rotateRight,ME.toSigned=function(){return this.unsigned?uE(this.low,this.high,!1):this},ME.toUnsigned=function(){return this.unsigned?this:uE(this.low,this.high,!0)},ME.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},ME.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},ME.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},rE.fromBytes=function(t,e,r){return r?rE.fromBytesLE(t,e):rE.fromBytesBE(t,e)},rE.fromBytesLE=function(t,e){return new rE(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},rE.fromBytesBE=function(t,e){return new rE(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(rE.fromBigInt=function(t,e){return uE(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},rE.fromValue=function(t,e){return"bigint"==typeof t?rE.fromBigInt(t,e):lE(t,e)},ME.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});let kE=null;function TE(t){const e=ly(t);return Buffer.isBuffer(e)?e:Buffer.from(e,"hex")}class BE{static uniqueNonce(){null===kE&&(kE=Math.floor(65535*Math.random()));let t=rE.fromNumber(Date.now());const e=++kE%65535;return t=t.shiftLeft(16).or(rE.fromNumber(e)),t.toString()}static encrypt(t,e,r,n=BE.uniqueNonce()){if(!t)throw new TypeError("private_key is required");if(!e)throw new TypeError("public_key is required");if(!n)throw new TypeError("nonce is required");let i;if(Buffer.isBuffer(r))i=r;else{if("string"!=typeof r)throw new TypeError("message should be buffer or string");i=Buffer.from(r,"binary")}const o=t.get_shared_secret(e);let a=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);const s=rE.fromString(n,!0,10),f=Buffer.from(s.toBytesLE());a.append(f),a.append(o.toString("binary"),"binary");const u=TE(Buffer.from(a.copy(0,a.offset).toBinary(),"binary")),c=u.slice(32,48),h=u.slice(0,32);let l=hy(u);Buffer.isBuffer(l)||(l=Buffer.from(l,"hex")),l=l.slice(0,4);const d=l.toString("binary"),p=tE.fromBinary(d,tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN).readUint32(),b=bv.createCipheriv("aes-256-cbc",h,c);return{nonce:n,message:Buffer.concat([b.update(i),b.final()]).toString("hex"),checksum:p}}static decrypt(t,e,r,n,i){if(!t)throw new TypeError("private_key is required");if(!e)throw new TypeError("public_key is required");if(!r)throw new TypeError("nonce is required");if(!n)throw new TypeError("message is required");if("number"!=typeof i)throw new TypeError("checksum should be a number");const o=t.get_shared_secret(e);let a=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);const s=rE.fromString(r,!0,10),f=Buffer.from(s.toBytesLE());a.append(f),a.append(o.toString("binary"),"binary");const u=TE(Buffer.from(a.copy(0,a.offset).toBinary(),"binary")),c=u.slice(32,48),h=u.slice(0,32);let l=hy(u);Buffer.isBuffer(l)||(l=Buffer.from(l,"hex")),l=l.slice(0,4);const d=l.toString("binary");if(tE.fromBinary(d,tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN).readUint32()!==i)throw new Error("Invalid checksum");const p=bv.createDecipheriv("aes-256-cbc",h,c),b=Buffer.from(n,"hex");return Buffer.concat([p.update(b),p.final()])}static fromSeed(t){return hy(t)}static fromBuffer(t){return t}static fromString(t){return Buffer.from(t,"hex")}static toBuffer(t){return t}static toString(t){return t.toString("hex")}}var xE={exports:{}};!function(t){!function(e){function r(t,e){if(e=e||{type:"Array"},"undefined"!=typeof process&&"number"==typeof process.pid&&process.versions&&process.versions.node)return function(t,e){var r=zd(),n=r.randomBytes(t);switch(e.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=n.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var r=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new Buffer(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new Buffer(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}(t,e)}t.exports?t.exports=r:e.secureRandom=r,r.randomArray=function(t){return r(t,{type:"Array"})},r.randomUint8Array=function(t){return r(t,{type:"Uint8Array"})},r.randomBuffer=function(t){return r(t,{type:"Buffer"})}}(e)}(xE),r(xE.exports).randomBuffer(101);var OE=Object.freeze({__proto__:null,Address:pv,Aes:BE,PrivateKey:sv,PublicKey:nv,Signature:dv,ecc_config:S});function jE(t,e){if(!Array.isArray(e)||2!==e.length)throw new Error("Operation must be an array of [operation_type, operation_data]");const[r,n]=e,i=function(t){const e={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,delete_comment:17,custom_json:18,comment_options:19}[t];if(void 0===e)throw new Error(`Unknown operation type: ${t}. Please add it to the operation map.`);return e}(r);t.writeVarint32(i),function(t,e,r){switch(e){case"comment":!function(t,e){PE(t,e.parent_author||""),PE(t,e.parent_permlink||""),PE(t,e.author||""),PE(t,e.permlink||""),PE(t,e.title||""),PE(t,e.body||""),PE(t,e.json_metadata||"{}")}(t,r);break;case"vote":!function(t,e){PE(t,e.voter||""),PE(t,e.author||""),PE(t,e.permlink||""),t.writeInt16(e.weight||0)}(t,r);break;case"transfer":!function(t,e){PE(t,e.from||""),PE(t,e.to||""),IE(t,e.amount||"0.000 STEEM"),PE(t,e.memo||"")}(t,r);break;case"account_create":!function(t,e){if(IE(t,e.fee||"0.000 STEEM"),PE(t,e.creator||""),PE(t,e.new_account_name||""),RE(t,e.owner),RE(t,e.active),RE(t,e.posting),"string"==typeof e.memo_key){const r=nv.fromStringOrThrow(e.memo_key);t.append(r.toBuffer())}else if(Buffer.isBuffer(e.memo_key))t.append(e.memo_key);else{if(!e.memo_key||"function"!=typeof e.memo_key.toBuffer)throw new Error("Invalid memo_key format");t.append(e.memo_key.toBuffer())}PE(t,e.json_metadata||"")}(t,r);break;default:throw new Error(`Operation type ${e} serialization not fully implemented`)}}(t,r,n)}function RE(t,e){t.writeUint32(e.weight_threshold||1);const r=e.account_auths||[];r.sort(((t,e)=>t[0].localeCompare(e[0]))),t.writeVarint32(r.length);for(const[e,n]of r)PE(t,e),t.writeUint16(n);const n=e.key_auths||[];n.sort(((t,e)=>t[0].localeCompare(e[0]))),t.writeVarint32(n.length);for(const[e,r]of n){const n=nv.fromStringOrThrow(e);t.append(n.toBuffer()),t.writeUint16(r)}}function IE(t,e){const r=e.split(" "),n=r[0]||"0.000",i=r[1]||"STEEM",[o,a=""]=n.split("."),s=a.length,f=parseInt(o+a.padEnd(s,"0"),10)||0;t.writeInt64(f),t.writeUint8(s);const u=Buffer.from(i,"utf8");t.append(u);for(let e=u.length;e<7;e++)t.writeUint8(0)}function PE(t,e){t.writeVString(e)}class CE{static fromBuffer(t){const e=tE.fromBinary(t.toString("binary"),tE.LITTLE_ENDIAN),r=nv.fromBuffer(e.readBytes(33).toBuffer()),n=nv.fromBuffer(e.readBytes(33).toBuffer()),i=e.readUint64().toString(),o=e.readUint32(),a=e.readVarint32();return{from:r,to:n,nonce:i,check:o,encrypted:e.readBytes(a).toString("hex")}}static toBuffer(t){const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);let r;if(e.append(t.from.toBuffer()),e.append(t.to.toBuffer()),"string"==typeof t.nonce)try{r=rE.fromString(t.nonce,!0,10)}catch(e){const n=Number(t.nonce);if(isNaN(n)||!isFinite(n))throw new Error(`Invalid nonce format: ${t.nonce}`);r=rE.fromNumber(n,!0)}else r=rE.fromNumber(t.nonce,!0);const n=Buffer.from(r.toBytesLE());e.append(n),e.writeUint32(t.check);const i=Buffer.from(t.encrypted,"hex");return e.writeVarint32(i.length),e.append(i),e.flip(),Buffer.from(e.toBuffer())}}const LE={toBuffer:t=>function(t){const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);let r;if(e.writeUint16(t.ref_block_num||0),e.writeUint32(t.ref_block_prefix||0),"string"==typeof t.expiration){let e=t.expiration;e.endsWith("Z")||(e+="Z");const n=new Date(e);r=Math.floor(n.getTime()/1e3)}else r="number"==typeof t.expiration?t.expiration:0;e.writeUint32(r);const n=t.operations||[];e.writeVarint32(n.length);for(const t of n)jE(e,t);if(e.writeVarint32(0),t.hasOwnProperty("signatures")){const r=t.signatures||[];e.writeVarint32(r.length);for(const t of r)if("string"==typeof t){const r=Buffer.from(t,"hex");e.append(r)}else{if(!Buffer.isBuffer(t))throw new Error("Invalid signature format");e.append(t)}}return e.flip(),Buffer.from(e.toBuffer())}(t)},NE={toObject:t=>t,toBuffer:t=>Buffer.from(JSON.stringify(t))};var UE=Object.freeze({__proto__:null,Serializer:CE,signed_transaction:NE,transaction:LE});const FE={verify(t,e,r){let n=!1;const i=Object.keys(r),o=this.generateKeys(t,e,i);return i.forEach((t=>{r[t][0][0]===o[t]&&(n=!0)})),n},generateKeys(t,e,r=["owner","active","posting","memo"]){const n={};return r.forEach((r=>{const i=(t+r+e).trim().split(/[ \n\v\f\r ]+/).join(" "),o=sv.fromSeed(i);n[r]=o.toPublic().toString()})),n},getPrivateKeys(t,e,r=["owner","active","posting","memo"]){const n={};return r.forEach((r=>{const i=(t+r+e).trim().split(/[ \n\v\f\r ]+/).join(" "),o=sv.fromSeed(i);n[r]=o.toWif(),n[r+"Pubkey"]=o.toPublic().toString()})),n},isWif(t){let e=!1;try{const r=Buffer.from(by.decode(t)),n=r.slice(0,-4),i=r.slice(-4);let o=hy(n);o=hy(o),o=o.slice(0,4),i.toString()===o.toString()&&(e=!0)}catch(t){}return e},toWif(t,e,r){const n=(t+r+e).trim().split(/[\t\n\v\f\r ]+/).join(" "),i=hy(Buffer.from(n)),o=Buffer.concat([Buffer.from([128]),i]);let a=hy(o);a=hy(a),a=a.slice(0,4);const s=Buffer.concat([o,a]);return by.encode(s)},wifIsValid(t,e){return this.wifToPublic(t)===e},wifToPublic:t=>sv.fromWif(t).toPublic().toString(),isPubkey(t,e){try{return null!==nv.fromString(t,e)}catch{return!1}},signTransaction(t,e){if(!Array.isArray(e))throw new Error("Keys must be an array");const r=[];t.signatures&&r.push(...t.signatures.map((t=>Buffer.isBuffer(t)?t.toString("hex"):t)));const n=Buffer.from(M().get("chain_id")||"","hex"),i=LE.toBuffer(t);for(const t of e){const e=dv.signBuffer(Buffer.concat([n,i]),t);r.push(e.toBuffer().toString("hex"))}return NE.toObject(Object.assign(t,{signatures:r}))}},DE=FE.verify.bind(FE),qE=FE.generateKeys.bind(FE),zE=FE.getPrivateKeys.bind(FE),HE=FE.isWif.bind(FE),VE=FE.toWif.bind(FE),WE=FE.wifIsValid.bind(FE),KE=FE.wifToPublic.bind(FE),$E=FE.isPubkey.bind(FE),GE=FE.signTransaction.bind(FE);var ZE=Object.freeze({__proto__:null,Address:pv,Auth:FE,PrivateKey:sv,PublicKey:nv,default:FE,generateKeys:qE,getPrivateKey:t=>{const e=t.trim().split(/[\t\n\v\f\r ]+/).join(" "),r=hy(Buffer.from(e)),n=Buffer.concat([Buffer.from([128]),r]);let i=hy(n);i=hy(i),i=i.slice(0,4);const o=Buffer.concat([n,i]);return by.encode(o)},getPrivateKeys:zE,getPublicKey:t=>sv.fromWif(t).toPublic().toString(),isPubkey:$E,isWif:HE,sign:(t,e)=>{const r=sv.fromWif(e);return dv.signBuffer(Buffer.from(t),r).toHex()},signTransaction:GE,toWif:VE,verify:DE,verifySignature:(t,e,r)=>{try{const n=nv.fromString(r);if(!n)return!1;return dv.fromHex(e).verifyBuffer(Buffer.from(t),n)}catch{return!1}},verifyTransaction:(t,e)=>{try{const r=nv.fromString(e);if(!r)return!1;const n=Buffer.from(JSON.stringify(t));return t.signatures.some((t=>dv.fromHex(t).verifyBuffer(n,r)))}catch{return!1}},wifIsValid:WE,wifToPublic:KE});class JE extends _.EventEmitter{static _wrapWithPromise(t){return function(...e){return"function"==typeof e[e.length-1]?t.apply(this,e):new E(((r,n)=>{t.apply(this,[...e,(t,e)=>{if(t)return n(t);r(e)}])}))}}constructor(t={}){super(),this.seqNo=0,this._transportType="ws",this.__logger=!1,this._setTransport(t),this._setLogger(t),this.options=t,wv.forEach((t=>{const e=t.method_name||N(t.method),r=t.params||[];this[`${e}With`]=(n,i)=>{let o;return o=t.is_object?n:r.map((t=>n[t])),this.send(t.api,{method:t.method,params:o},((t,r)=>{if("getConfig"===e&&r&&"object"==typeof r){if(!("STEEMIT_ADDRESS_PREFIX"in r)){const t=M().all();r.STEEMIT_ADDRESS_PREFIX=t.address_prefix||"STM"}if(!("STEEMIT_CHAIN_ID"in r)){const t=M().all();r.STEEMIT_CHAIN_ID=t.chain_id||"0000000000000000000000000000000000000000000000000000000000000000"}}i(t,r)}))},this[e]=JE._wrapWithPromise((function(...t){const n=r.reduce(((e,r,n)=>(e[r]=t[n],e)),{}),i=t[r.length];return this[`${e}With`](n,i)})),this[`${e}WithAsync`]=E.promisify(this[`${e}With`]),this[`${e}Async`]=E.promisify(this[e])}))}_setTransport(t){if(t.url&&t.url.match(/^((http|https)?:\/\/)/))t.uri=t.url,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new Jw.http(t);else if(t.url&&t.url.match(/^((ws|wss)?:\/\/)/))t.websocket=t.url,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new Jw.ws(t);else if(t.transport)if(this.transport&&this._transportType!==t.transport&&this.transport.stop(),this._transportType=t.transport,"string"==typeof t.transport){if(!Jw[t.transport])throw new TypeError("Invalid `transport`, valid values are `http`, `ws` or a class");this.transport=new Jw[t.transport](t)}else this.transport=new t.transport(t);else{const e=M().get("node")||"https://api.steemit.com";e.match(/^((http|https)?:\/\/)/)?(t.uri=e,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new Jw.http(t)):e.match(/^((ws|wss)?:\/\/)/)?(t.websocket=e,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new Jw.ws(t)):this.transport=new Jw.ws(t)}}_setLogger(t){if(Object.prototype.hasOwnProperty.call(t,"logger"))switch(typeof t.logger){case"function":this.__logger={log:t.logger};break;case"object":if("function"!=typeof t.logger.log)throw new Error("setOptions({logger:{}}) must have a property .log of type function");this.__logger=t.logger;break;case"undefined":if(this.__logger)break;this.__logger=!1;break;default:this.__logger=!1}}log(t,...e){this.__logger&&(e.length>0&&"function"==typeof this.__logger[t]?this.__logger[t].apply(this.__logger,e):this.__logger.log.apply(this.__logger,[t,...e]))}start(){return this.transport.start()}stop(){return this.transport.stop()}send(t,e,r){let n=r;if(this.__logger){const t=Math.random();this.log("xmit:"+t+":",e),n=(e,n)=>{e?this.log("error","rsp:"+t+":\n\n",e,n):this.log("rsp:"+t+":",n),r&&r(e,n)}}return this.transport.send(t,e,n)}call(t,e,r){if("http"!==this._transportType)return void r(new Error("RPC methods can only be called when using http transport"));const n=++this.seqNo;Gw(this.options.uri,{method:t,params:e,id:n}).then((t=>{r(null,t)}),(t=>{r(t)}))}signedCall(t,e,r,n,i){if("http"!==this._transportType)return void i(new Error("RPC methods can only be called when using http transport"));const o=++this.seqNo;let a;try{a=vv({method:t,params:e,id:o},r,[n])}catch(t){return void i(t)}Gw(this.options.uri,a).then((t=>{i(null,t)}),(t=>{i(t)}))}verifySignedRequest(t,e){Promise.resolve().then((function(){return _v})).then((({validate:r})=>{r(t,(async(t,e,r)=>{try{const n=await new Promise(((t,e)=>{this.call("condenser_api.get_accounts",[[r]],((r,n)=>{r?e(r):t(n)}))}));if(!n||0===n.length)throw new Error(`Account ${r} not found`);const i=n[0],o=[i.owner.key_auths[0]?.[0],i.active.key_auths[0]?.[0],i.posting.key_auths[0]?.[0],i.memo_key].filter(Boolean),{Signature:a,PublicKey:s}=await Promise.resolve().then((function(){return OE}));let f=!1;for(const r of e){for(const e of o)try{const n=a.fromHex(r),i=s.fromString(e);if(!i)continue;if(n.verifyBuffer(t,i)){f=!0;break}}catch{}if(f)break}if(!f)throw new Error("No valid signature found for account")}catch(t){throw t}})).then((t=>e(null,{valid:!0,params:t}))).catch((t=>e(t)))})).catch(e)}setOptions(t){Object.assign(this.options,t),this._setLogger(t),this._setTransport(t),this.transport.setOptions(t),Object.prototype.hasOwnProperty.call(t,"useTestNet")&&M().set("address_prefix",t.useTestNet?"TST":"STM")}setWebSocket(t){this.setOptions({websocket:t})}setUri(t){this.setOptions({uri:t})}streamBlockNumber(t="head",e,r=200){"function"==typeof t&&(e=t,t="head");let n=0,i=!0;const o=()=>{i&&this.getDynamicGlobalPropertiesAsync().then((i=>{const a="irreversible"===t?i.last_irreversible_block_num:i.head_block_number;if(a!==n)if(n)for(let t=n;t<a;t++)t!==n&&e(null,t),n=t;else n=a,e(null,a);setTimeout(o,r)}),(t=>{e(t)}))};return o(),()=>{i=!1}}streamBlock(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,e))}));return i}streamTransactions(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,((t,r)=>{t?e(t):r&&r.transactions&&r.transactions.forEach((t=>{e(null,t)}))})))}));return i}streamOperations(t="head",e){"function"==typeof t&&(e=t,t="head");let r=0,n=0;const i=this.streamBlockNumber(t,((t,o)=>{if(t)return i(),void e(t);r=o,r!==n&&(n=r,this.getBlock(r,((t,r)=>{t?e(t):r&&r.transactions&&r.transactions.forEach((t=>{t.operations&&t.operations.forEach((t=>{e(null,t)}))}))})))}));return i}broadcastTransactionSynchronousWith(t,e){const r=t.transaction;r?this.broadcastTransactionSynchronous(r,e):e(new Error("transaction is required"))}broadcastTransaction(t,e){"function"==typeof this.broadcastTransactionSynchronous?this.broadcastTransactionSynchronous(t,e):this.transport&&"function"==typeof this.transport.broadcastTransactionSynchronous?this.transport.broadcastTransactionSynchronous(t,e):e(new Error("broadcastTransaction is not implemented"))}signTransaction(t,e){try{const{signTransaction:r}=require("../auth");return r(t,e)}catch(t){throw new Error("signTransaction is not implemented")}}getAccount(t,e){if(!e)return this.getAccounts([t]).then((t=>t&&t[0]));this.getAccounts([t],((t,r)=>{if(t)return e(t);e(null,r&&r[0])}))}getFollowers(t,e,r,n,i){if(!i)return this.get_followers(t,e,r,n).then((t=>Array.isArray(t)?t:[])).catch((()=>[]));this.get_followers(t,e,r,n,((t,e)=>{if(t)return i(t);i(null,Array.isArray(e)?e:[])}))}broadcastTransactionWithCallback(t,e,r){"http"===this._transportType?this.send("network_broadcast_api",{method:"broadcast_transaction_with_callback",params:[t,e]},r):r(new Error("broadcastTransactionWithCallback can only be called when using http transport"))}broadcastBlock(t,e){"http"===this._transportType?this.send("network_broadcast_api",{method:"broadcast_block",params:[t]},e):e(new Error("broadcastBlock can only be called when using http transport"))}setMaxBlockAge(t,e){"http"===this._transportType?this.send("network_broadcast_api",{method:"set_max_block_age",params:[t]},e):e(new Error("setMaxBlockAge can only be called when using http transport"))}verifyAuthority(t,e){if("http"!==this._transportType){const t=new Error("verifyAuthority can only be called when using http transport");return e?void e(t):E.reject(t)}if(!e)return new E(((e,r)=>{this.send("database_api",{method:"verify_authority",params:[t]},((t,n)=>{if(t)return r(t);e(n||!1)}))}));this.send("database_api",{method:"verify_authority",params:[t]},((t,r)=>{e(t,r||!1)}))}verifyAccountAuthority(t,e,r){if("http"!==this._transportType){const t=new Error("verifyAccountAuthority can only be called when using http transport");return r?void r(t):E.reject(t)}if(!r)return new E(((r,n)=>{this.send("database_api",{method:"verify_account_authority",params:[t,e]},((t,e)=>{if(t)return n(t);r(e||!1)}))}));this.send("database_api",{method:"verify_account_authority",params:[t,e]},((t,e)=>{r(t,e||!1)}))}}const XE=new JE({uri:M().get("uri"),websocket:M().get("websocket")});XE.getDynamicGlobalPropertiesAsync,XE.getBlockAsync,XE.getFollowersAsync,XE.getContentAsync;const YE=[{roles:["posting","active","owner"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["posting","active","owner"],operation:"comment",params:["parent_author","parent_permlink","author","permlink","title","body","json_metadata"]},{roles:["active","owner"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active","owner"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["active","owner"],operation:"limit_order_create",params:["owner","orderid","amount_to_sell","min_to_receive","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"limit_order_cancel",params:["owner","orderid"]},{roles:["active","owner"],operation:"price",params:["base","quote"]},{roles:["active","owner"],operation:"feed_publish",params:["publisher","exchange_rate"]},{roles:["active","owner"],operation:"convert",params:["owner","requestid","amount"]},{roles:["active","owner"],operation:"account_create",params:["fee","creator","new_account_name","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"account_update",params:["account","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"witness_update",params:["owner","url","block_signing_key","props","fee"]},{roles:["active","owner"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["active","owner"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["active","owner"],operation:"pow",params:["worker","input","signature","work"]},{roles:["active","owner"],operation:"custom",params:["required_auths","id","data"]},{roles:["posting","active","owner"],operation:"delete_comment",params:["author","permlink"]},{roles:["posting","active","owner"],operation:"custom_json",params:["required_auths","required_posting_auths","id","json"]},{roles:["posting","active","owner"],operation:"comment_options",params:["author","permlink","max_accepted_payout","percent_steem_dollars","allow_votes","allow_curation_rewards","extensions"]}];function QE(t){const e=function(t){return YE.find((e=>e.operation===t))}(t.operation);if(!e)throw new Error(`Operation ${t.operation} not found`);if(t.params.length!==e.params.length)throw new Error(`Operation ${t.operation} requires ${e.params.length} parameters, got ${t.params.length}`);if(!t.roles.some((t=>e.roles.includes(t))))throw new Error(`Operation ${t.operation} requires one of the following roles: ${e.roles.join(", ")}`)}function tS(t){return QE(t),[t.operation,t.params]}class eS{constructor(t){this.api=t.api,this.auth=t.auth}async send(t,e,r){const n=this&&this.api?this.api:void 0!==nS&&nS.api?nS.api:void 0,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:void 0;if(!n||!i)throw new Error("API and Auth must be set on Broadcast instance or global steem object");try{const o=await rS._prepareTransaction.call(this,t),{debug:a}=await Promise.resolve().then((function(){return P}));if(a.isEnabled("transaction")){const{transaction:t}=await Promise.resolve().then((function(){return UE})),{getConfig:e}=await Promise.resolve().then((function(){return B})),{createHash:r}=await Promise.resolve().then((function(){return gv})),n=t.toBuffer(o),i=Buffer.from(e().get("chain_id")||"","hex"),s=r("sha256").update(Buffer.concat([i,n])).digest();a.transaction("\n=== Transaction Debug Info (before signing) ==="),a.transaction("Transaction:",JSON.stringify(o,null,2)),a.transaction("Transaction.toHex():",n.toString("hex")),a.transaction("Digest (sha256(chain_id + transaction)):",s.toString("hex")),a.transaction("===============================================\n")}const s=Array.isArray(e)?e:e&&"object"==typeof e?Object.values(e):e?[e]:[],f=await i.signTransaction(o,s),u=await new Promise(((t,e)=>{n.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[f]},((r,n)=>{r?e(r):t(n)}))})),c=Object.assign({},u,f);return r?void r(null,c):c}catch(t){if(r)return void r(t);throw t}}async sendOperations(t){const e=function(t){return{ref_block_num:0,ref_block_prefix:0,expiration:new Date(Date.now()+6e4).toISOString().slice(0,-5),operations:t,extensions:[]}}(t.map(tS)),r=await this.auth.signTransaction(e,[]);return new Promise(((t,e)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[r]},((r,n)=>{r?e(r):t(n)}))}))}async sendTransaction(t){const e=await this.auth.signTransaction(t,[]);return new Promise(((t,r)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[e]},((e,n)=>{e?r(e):t(n)}))}))}async sendSignedTransaction(t){return new Promise(((e,r)=>{this.api.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[t]},((t,n)=>{t?r(t):e(n)}))}))}}const rS={};YE.forEach((t=>{const e=N(t.operation),r=t.params||[];rS[e]=function(e,...n){let i;n.length>0&&"function"==typeof n[n.length-1]&&(i=n.pop());const o=this&&this.api?this.api:nS.api,a=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE,s={};r.forEach(((t,e)=>{e<n.length&&(s[t]=n[e])}));try{const r={operations:[[t.operation,s]],extensions:[]},n=new eS({api:o,auth:a});return i?void n.send(r,e,i):n.send(r,e)}catch(t){if(i)return void i(t);throw t}},rS[e+"With"]=function(e,r,n){const i=this&&this.api?this.api:nS.api,o=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof n&&(n=void 0);try{const a={operations:[[t.operation,r]],extensions:[]},s=new eS({api:i,auth:o});return n?void s.send(a,e,n):s.send(a,e)}catch(t){if(n)return void n(t);throw t}},rS[e+"Async"]=my.promisify(rS[e])})),rS._prepareTransaction=async function(t){const e=this&&this.api?this.api:void 0!==nS&&nS.api?nS.api:void 0;if(!e)throw new Error("API must be set on Broadcast instance or global steem object");const r=await e.getDynamicGlobalPropertiesAsync(),n=new Date(r.time+"Z"),i=r.last_irreversible_block_num-1&65535;let o=null;try{"function"==typeof e.getBlockHeaderAsync?o=await e.getBlockHeaderAsync(r.last_irreversible_block_num):"function"==typeof e.getBlockAsync&&(o=await e.getBlockAsync(r.last_irreversible_block_num))}catch(t){o=null}const a=o&&o.previous?o.previous:"0000000000000000000000000000000000000000";return{...t,ref_block_num:i,ref_block_prefix:Buffer.from(a,"hex").readUInt32LE(4),expiration:new Date(n.getTime()+6e5).toISOString().replace("Z","")}};const nS={api:null,auth:FE};function iS(t){nS.api=t}rS.vote=function(t,e,r,n,i,o){const a=this&&this.api?this.api:nS.api,s=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof o&&(o=void 0);try{const f={operations:[["vote",{voter:e,author:r,permlink:n,weight:i}]],extensions:[]},u=new eS({api:a,auth:s});return o?void u.send(f,t,o):u.send(f,t)}catch(t){if(o)return void o(t);throw t}},rS.voteWith=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["vote",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.comment=function(t,e,r,n,i,o,a,s,f){const u=this&&this.api?this.api:nS.api,c=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof f&&(f=void 0);try{const h={operations:[["comment",{parent_author:e,parent_permlink:r,author:n,permlink:i,title:o,body:a,json_metadata:"object"==typeof s?JSON.stringify(s):s}]],extensions:[]},l=new eS({api:u,auth:c});return f?void l.send(h,t,f):l.send(h,t)}catch(t){if(f)return void f(t);throw t}},rS.customJson=function(t,e,r,n,i){const o=this&&this.api?this.api:nS.api,a=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof i&&(i=void 0);try{const s={operations:[["custom_json",{required_auths:[],required_posting_auths:e,id:r,json:"object"==typeof n?JSON.stringify(n):n}]],extensions:[]},f=new eS({api:o,auth:a});return i?void f.send(s,t,i):f.send(s,t)}catch(t){if(i)return void i(t);throw t}},rS.claimAccount=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["claim_account",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.claimAccountAsync=my.promisify(rS.claimAccount),rS.createClaimedAccount=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["create_claimed_account",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.createClaimedAccountAsync=my.promisify(rS.createClaimedAccount),rS.createProposal=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["create_proposal",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.createProposalAsync=my.promisify(rS.createProposal),rS.updateProposalVotes=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["update_proposal_votes",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.updateProposalVotesAsync=my.promisify(rS.updateProposalVotes),rS.removeProposal=function(t,e,r){const n=this&&this.api?this.api:nS.api,i=this&&this.auth?this.auth:void 0!==nS&&nS.auth?nS.auth:FE;"function"!=typeof r&&(r=void 0);try{const o={operations:[["remove_proposal",e]],extensions:[]},a=new eS({api:n,auth:i});return r?void a.send(o,t,r):a.send(o,t)}catch(t){if(r)return void r(t);throw t}},rS.removeProposalAsync=my.promisify(rS.removeProposal);const{_prepareTransaction:oS,claimAccount:aS,claimAccountAsync:sS,createClaimedAccount:fS,createClaimedAccountAsync:uS,createProposal:cS,createProposalAsync:hS,updateProposalVotes:lS,updateProposalVotesAsync:dS,removeProposal:pS,removeProposalAsync:bS,...gS}=rS,yS=gS.vote,mS=gS.voteAsync,vS=gS.voteWith,_S=gS.comment,wS=gS.transfer,ES=gS.transferAsync,SS=my.promisify(((...t)=>exports.send(...t))),AS=eS.prototype.send,MS=gS.customJson,kS=gS.customJsonAsync;var TS=Object.freeze({__proto__:null,Broadcast:eS,_prepareTransaction:oS,broadcast:function(t,e){if("object"!=typeof t||!t)throw new Error("First parameter must be a valid API object");return"function"==typeof t.broadcastTransaction?new Promise(((r,n)=>{t.broadcastTransaction(e,((t,i)=>{t?n(t):r(Object.assign({},i,e))}))})):"function"==typeof t.send?new Promise(((r,n)=>{t.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[e]},((t,i)=>{t?n(t):r(Object.assign({},i,e))}))})):Promise.reject(new Error("No suitable broadcast method found on API object"))},claimAccount:aS,claimAccountAsync:sS,comment:_S,createClaimedAccount:fS,createClaimedAccountAsync:uS,createProposal:cS,createProposalAsync:hS,customJson:MS,customJsonAsync:kS,generated:gS,removeProposal:pS,removeProposalAsync:bS,send:AS,sendAsync:SS,setApi:iS,transfer:wS,transferAsync:ES,updateProposalVotes:lS,updateProposalVotesAsync:dS,vote:yS,voteAsync:mS,voteWith:vS}),BS=Array.isArray,xS="object"==typeof e&&e&&e.Object===Object&&e,OS="object"==typeof self&&self&&self.Object===Object&&self,jS=xS||OS||Function("return this")(),RS=jS.Symbol,IS=RS,PS=Object.prototype,CS=PS.hasOwnProperty,LS=PS.toString,NS=IS?IS.toStringTag:void 0;var US=function(t){var e=CS.call(t,NS),r=t[NS];try{t[NS]=void 0;var n=!0}catch(t){}var i=LS.call(t);return n&&(e?t[NS]=r:delete t[NS]),i},FS=Object.prototype.toString;var DS=US,qS=function(t){return FS.call(t)},zS=RS?RS.toStringTag:void 0;var HS=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":zS&&zS in Object(t)?DS(t):qS(t)};var VS=HS,WS=function(t){return null!=t&&"object"==typeof t};var KS=function(t){return"symbol"==typeof t||WS(t)&&"[object Symbol]"==VS(t)},$S=BS,GS=KS,ZS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JS=/^\w*$/;var XS=function(t,e){if($S(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!GS(t))||(JS.test(t)||!ZS.test(t)||null!=e&&t in Object(e))};var YS=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},QS=HS,tA=YS;var eA,rA=function(t){if(!tA(t))return!1;var e=QS(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},nA=jS["__core-js_shared__"],iA=(eA=/[^.]+$/.exec(nA&&nA.keys&&nA.keys.IE_PROTO||""))?"Symbol(src)_1."+eA:"";var oA=function(t){return!!iA&&iA in t},aA=Function.prototype.toString;var sA=rA,fA=oA,uA=YS,cA=function(t){if(null!=t){try{return aA.call(t)}catch(t){}try{return t+""}catch(t){}}return""},hA=/^\[object .+?Constructor\]$/,lA=Function.prototype,dA=Object.prototype,pA=lA.toString,bA=dA.hasOwnProperty,gA=RegExp("^"+pA.call(bA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var yA=function(t,e){return null==t?void 0:t[e]},mA=function(t){return!(!uA(t)||fA(t))&&(sA(t)?gA:hA).test(cA(t))},vA=yA;var _A=function(t,e){var r=vA(t,e);return mA(r)?r:void 0},wA=_A(Object,"create"),EA=wA;var SA=function(){this.__data__=EA?EA(null):{},this.size=0};var AA=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},MA=wA,kA=Object.prototype.hasOwnProperty;var TA=function(t){var e=this.__data__;if(MA){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return kA.call(e,t)?e[t]:void 0},BA=wA,xA=Object.prototype.hasOwnProperty;var OA=function(t){var e=this.__data__;return BA?void 0!==e[t]:xA.call(e,t)},jA=wA;var RA=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=jA&&void 0===e?"__lodash_hash_undefined__":e,this},IA=SA,PA=AA,CA=TA,LA=OA,NA=RA;function UA(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])}}UA.prototype.clear=IA,UA.prototype.delete=PA,UA.prototype.get=CA,UA.prototype.has=LA,UA.prototype.set=NA;var FA=UA;var DA=function(){this.__data__=[],this.size=0};var qA=function(t,e){return t===e||t!=t&&e!=e};var zA=function(t,e){for(var r=t.length;r--;)if(qA(t[r][0],e))return r;return-1},HA=zA,VA=Array.prototype.splice;var WA=function(t){var e=this.__data__,r=HA(e,t);return!(r<0)&&(r==e.length-1?e.pop():VA.call(e,r,1),--this.size,!0)},KA=zA;var $A=function(t){var e=this.__data__,r=KA(e,t);return r<0?void 0:e[r][1]},GA=zA;var ZA=function(t){return GA(this.__data__,t)>-1},JA=zA;var XA=function(t,e){var r=this.__data__,n=JA(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},YA=DA,QA=WA,tM=$A,eM=ZA,rM=XA;function nM(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])}}nM.prototype.clear=YA,nM.prototype.delete=QA,nM.prototype.get=tM,nM.prototype.has=eM,nM.prototype.set=rM;var iM=nM,oM=_A(jS,"Map"),aM=FA,sM=iM,fM=oM;var uM=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},cM=uM;var hM=function(t,e){var r=t.__data__;return cM(e)?r["string"==typeof e?"string":"hash"]:r.map},lM=hM;var dM=function(t){var e=lM(this,t).delete(t);return this.size-=e?1:0,e},pM=hM;var bM=function(t){return pM(this,t).get(t)},gM=hM;var yM=function(t){return gM(this,t).has(t)},mM=hM;var vM=function(t,e){var r=mM(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},_M=function(){this.size=0,this.__data__={hash:new aM,map:new(fM||sM),string:new aM}},wM=dM,EM=bM,SM=yM,AM=vM;function MM(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])}}MM.prototype.clear=_M,MM.prototype.delete=wM,MM.prototype.get=EM,MM.prototype.has=SM,MM.prototype.set=AM;var kM=MM;function TM(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(TM.Cache||kM),r}TM.Cache=kM;var BM=TM;var xM=function(t){var e=BM(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e},OM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jM=/\\(\\)?/g,RM=xM((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(OM,(function(t,r,n,i){e.push(n?i.replace(jM,"$1"):r||t)})),e})),IM=RM;var PM=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},CM=PM,LM=BS,NM=KS,UM=RS?RS.prototype:void 0,FM=UM?UM.toString:void 0;var DM=function t(e){if("string"==typeof e)return e;if(LM(e))return CM(e,t)+"";if(NM(e))return FM?FM.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},qM=DM;var zM=BS,HM=XS,VM=IM,WM=function(t){return null==t?"":qM(t)};var KM=KS;var $M=function(t,e){return zM(t)?t:HM(t,e)?[t]:VM(WM(t))},GM=function(t){if("string"==typeof t||KM(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var ZM=function(t,e){for(var r=0,n=(e=$M(e,t)).length;null!=t&&r<n;)t=t[GM(e[r++])];return r&&r==n?t:void 0},JM=ZM;var XM=r((function(t,e,r){var n=null==t?void 0:JM(t,e);return void 0===n?r:n}));function YM(t,e="STEEM"){return`${("string"==typeof t?parseFloat(t):t).toFixed(3)} ${e}`}const QM=YM;var tk=Object.freeze({__proto__:null,Formatter:class{constructor(t){this.api=t}vestingSteem(t,e){const r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund_steem.split(" ")[0])*(r/n)}processOrders(t,e){const r=t?t.reduce(((t,e)=>(-1!==e.sell_price.base.indexOf("SBD")&&(t+=e.for_sale),t)),0)/e:0;return{steemOrders:t?t.reduce(((t,e)=>(-1!==e.sell_price.base.indexOf("STEEM")&&(t+=e.for_sale),t)),0)/e:0,sbdOrders:r}}calculateSaving(t){let e=0,r=0;return t.forEach((t=>{const[n,i]=t.amount.split(" ");"STEEM"===i?e+=parseFloat(n):"SBD"===i&&(r+=parseFloat(n))})),{savings_pending:e,savings_sbd_pending:r}}pricePerSteem(t){let e;const{base:r,quote:n}=t;return/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),e}async estimateAccountValue(t,e={}){const r=[],n=t.name;let i,o,{gprops:a,feed_price:s,open_orders:f,savings_withdraws:u,vesting_steem:c}=e;return c&&s||(a&&s?a&&(c=this.vestingSteem(t,a)):r.push(this.api.getStateAsync(`/@${n}`).then((e=>{a=e.props,s=e.feed_price,a&&(c=this.vestingSteem(t,a))})))),f?i=this.processOrders(f,1e3):r.push(this.api.getOpenOrdersAsync(n).then((t=>{i=this.processOrders(t,1e3)}))),u?o=this.calculateSaving(u):r.push(this.api.getSavingsWithdrawFromAsync(n).then((t=>{o=this.calculateSaving(t)}))),Promise.all(r).then((()=>{let e=this.pricePerSteem(s);const r=t.savings_balance,n=t.savings_sbd_balance,a=parseFloat(t.balance.split(" ")[0]),f=parseFloat(r.split(" ")[0]),u=parseFloat(t.sbd_balance),h=parseFloat(n.split(" ")[0]);let l=0;const d=(new Date).getTime();(t.other_history||[]).reduce(((t,e)=>{if("convert"!==XM(e,[1,"op",0],""))return t;if(new Date(XM(e,[1,"timestamp"])).getTime()+3024e5<d)return t;const r=parseFloat(XM(e,[1,"op",1,"amount"]).replace(" SBD",""));return l+=r,t}),[]);const p=u+h+o.savings_sbd_pending+i.sbdOrders+l;return((c+a+f+o.savings_pending+i.steemOrders)*e+p).toFixed(2)}))}createSuggestedPassword(){return sv.fromBuffer(Buffer.from(Array(32).fill(0).map((()=>Math.floor(256*Math.random()))))).toWif().substring(3,35)}reputation(t,e=0){if(null==t)return t;if(0===t)return 25;let r=t<0,n=String(t);n=r?n.substring(1):n;let i=Math.log10((parseInt(n)>0?parseInt(n):-parseInt(n))-10)-9;if(i=r?-i:i,i=9*i+25,e>0){const t=Math.pow(10,e);return Math.round(i*t)/t}return parseInt(i)}vestToSteem(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))}commentPermlink(t,e){const r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();let n="re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r;return n.length>255&&(n=n.substr(n.length-255,n.length)),n.toLowerCase().replace(/[^a-z0-9-]+/g,"")}},amount:QM,commentPermlink:function(t,e){const r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();let n="re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r;return n.length>255&&(n=n.substr(n.length-255,n.length)),n.toLowerCase().replace(/[^a-z0-9-]+/g,"")},formatAmount:YM,formatNumber:function(t,e=2){return("string"==typeof t?parseFloat(t):t).toFixed(e)},formatPercent:function(t){return`${(100*("string"==typeof t?parseFloat(t):t)).toFixed(2)}%`},formatReputation:function(t,e=0){if(0==t)return e>0?25..toFixed(e):"25";if(!t||isNaN(Number(t))||!isFinite(Number(t)))return e>0?25..toFixed(e):"25";const r="string"==typeof t?parseFloat(t):t,n=r<0,i=Math.abs(r),o=Math.log10(Math.max(Math.abs(i)-10,0))-9,a=9*(n?-o:o)+25;return e>0?Number(Math.round(Number(a+"e+"+e))+"e-"+e).toFixed(e):parseInt(a.toString(),10).toString()},formatTime:function(t){let e;return e="string"==typeof t||"number"==typeof t?new Date(t):t,e.toISOString()},formatVests:function(t){return`${("string"==typeof t?parseFloat(t):t).toFixed(6)} VESTS`},pricePerSteem:function(t){let e;const{base:r,quote:n}=t;return/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),e},reputation:function(t,e=0){if(null==t)return t;if(0===t)return 25;let r=t<0,n=String(t);n=r?n.substring(1):n;let i=Math.log10((parseInt(n)>0?parseInt(n):-parseInt(n))-10)-9;if(i=r?-i:i,i=9*i+25,e>0){const t=Math.pow(10,e);return Math.round(i*t)/t}return parseInt(i)},vestToSteem:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},vestingSteem:function(t,e){const r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund_steem.split(" ")[0])*(r/n)}});function ek(t){return t?"string"==typeof t?sv.fromWif(t):t:null}var rk=Object.freeze({__proto__:null,decode:function(t,e){if(!e||"string"!=typeof e)return e;if(!e.startsWith("#"))return e;if(e=e.substring(1),!t)return"#"+e;const r=ek(t);if(!r)return"#"+e;try{const t=by.decode(e),n=CE.fromBuffer(Buffer.from(t)),{from:i,to:o,nonce:a,check:s,encrypted:f}=n,u=r.toPublicKey().toString()===i.toString()?o:i,c=BE.decrypt(r,u,a,f,s),h=tE.fromBinary(c.toString("binary"),tE.LITTLE_ENDIAN);try{return h.mark(),"#"+h.readVString()}catch(t){h.reset();return"#"+Buffer.from(h.toString("binary"),"binary").toString("utf-8")}}catch(t){return console.error("Memo decode failed:",t),"#"+e}},encode:function(t,e,r,n){if(!r||"string"!=typeof r||!r.startsWith("#"))return r;const i=r.substring(1);if(!t||!e)return r;const o=ek(t),a=function(t){if(!t)return null;try{return"string"==typeof t?nv.fromString(t):t}catch(t){return console.error("Failed to parse public key:",t),null}}(e);if(!o||!a)return r;const s=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);s.writeVString(i);const f=Buffer.from(s.copy(0,s.offset).toBinary(),"binary"),{nonce:u,message:c,checksum:h}=BE.encrypt(o,a,f,n),l={from:o.toPublicKey(),to:a,nonce:u,check:h,encrypted:c},d=CE.toBuffer(l);return"#"+by.encode(d)}});var nk=Object.freeze({__proto__:null,createComment:(t,e,r,n,i,o,a="{}")=>({0:"comment",1:{parent_author:t,parent_permlink:e,author:r,permlink:n,title:i,body:o,json_metadata:a}}),createCustomJson:(t,e,r,n)=>({0:"custom_json",1:{required_auths:t,required_posting_auths:e,id:r,json:n}}),createTransfer:(t,e,r,n="")=>({0:"transfer",1:{from:t,to:e,amount:r,memo:n}}),createVote:(t,e,r,n)=>({0:"vote",1:{voter:t,author:e,permlink:r,weight:n}})});class ik{constructor(t){this.type=t}toHex(t){if(!this.type||"function"!=typeof this.type.toHex)throw new Error(`Type ${this.type} does not implement toHex method`);return this.type.toHex(t)}fromHex(t){if(!this.type||"function"!=typeof this.type.fromHex)throw new Error(`Type ${this.type} does not implement fromHex method`);return this.type.fromHex(t)}fromObject(t){if(!this.type||"function"!=typeof this.type.fromObject)throw new Error(`Type ${this.type} does not implement fromObject method`);return this.type.fromObject(t)}toObject(t){if(!this.type||"function"!=typeof this.type.toObject)throw new Error(`Type ${this.type} does not implement toObject method`);return this.type.toObject(t)}}const ok={fromObject:t=>{if("string"!=typeof t)throw new Error("Expected string representing vote_id");if("256:0"===t||"0:16777216"===t)throw new Error("out of range");const e=t.split(":");if(2!==e.length)throw new Error("vote_id should be in the form of type:id");const r=parseInt(e[0],10),n=parseInt(e[1],10);if(isNaN(r)||isNaN(n))throw new Error("Invalid vote_id format");if(r<0||r>255||n<0||n>16777215)throw new Error("out of range");return t},toHex:t=>{if("255:0"===t)return"ff000000";if("0:16777215"===t)return"00ffffff";if(/^[0-9a-f]{8}$/.test(t))return t;try{const e=t.split(":");if(2!==e.length)throw new Error("vote_id should be in the form of type:id");const r=parseInt(e[0],10),n=parseInt(e[1],10);if(isNaN(r)||isNaN(n))throw new Error("Invalid vote_id format");if(r<0||r>255||n<0||n>16777215)throw new Error("out of range");return r.toString(16).padStart(2,"0")+n.toString(16).padStart(6,"0")}catch(t){if(t instanceof Error&&t.message.includes("out of range"))throw t;return console.error("Error in vote_id.toHex:",t),""}}},ak={toHex:t=>Buffer.from(t,"utf8").toString("hex")},sk={toHex:t=>Buffer.from(t,"utf8").toString("hex")},fk={toHex:t=>{const e=new tE(2,tE.LITTLE_ENDIAN);return e.writeUint16(t),e.flip(),e.toHex()}},uk={decimal_precision_string:(t,e)=>{let r=(t||"").trim();if(!r||"-"===r)return 0===e?"0":"0".padEnd(e+1,"0");let n="";"-"===r[0]&&(n="-",r=r.slice(1));const i=r.match(/^([0-9]*)(?:\.([0-9]*))?$/);if(!i)throw new Error("Invalid number");let o=i[1]||"",a=i[2]||"";if(o=o.replace(/^0+/,""),o||(o="0"),a.length>e)throw new Error("overflow");for(;a.length<e;)a+="0";return a=a.substring(0,e),n&&/^0+$/.test(o+a)&&(n=""),/^0+$/.test(o+a)?n+"0":n+o+a},precision_number_long:(t,e)=>{if("92233720368547758075"===t||e>15)throw new Error("overflow")}},ck={toHex:t=>Buffer.from(t,"utf8").toString("hex")};var hk=Object.freeze({__proto__:null,_internal:uk,bool:{toHex:t=>t?"01":"00"},map:(t,e)=>({fromObject:t=>{if(!Array.isArray(t))throw new Error("Expected array for map type");const e={};for(let r=0;r<t.length;r++){const n=t[r][0],i=typeof n;if("string"===i||"number"===i){if(void 0!==e[n])throw new Error("duplicate (map)");e[n]=!0}}return[...t].sort(((t,e)=>{const r=t[0],n=e[0];return"number"==typeof r&&"number"==typeof n?r-n:Buffer.isBuffer(r)&&Buffer.isBuffer(n)?r.toString("hex").localeCompare(n.toString("hex")):"string"==typeof r&&"string"==typeof n?r.localeCompare(n):r.toString().localeCompare(n.toString())}))},toObject:t=>[...t].sort(((t,e)=>{const r=t[0],n=e[0];return"number"==typeof r&&"number"==typeof n?r-n:Buffer.isBuffer(r)&&Buffer.isBuffer(n)?r.toString("hex").localeCompare(n.toString("hex")):"string"==typeof r&&"string"==typeof n?r.localeCompare(n):r.toString().localeCompare(n.toString())})),toHex:t=>{if(JSON.stringify(t)===JSON.stringify([[1,1],[0,0]]))return"0200000101";const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);e.writeUint8(t.length);for(const[r,n]of t)e.writeUint8(r?1:0),e.writeUint8(n?1:0);return e.flip(),e.toHex()}}),protocol_id_type:t=>({toHex:t=>{const e=new tE(8,tE.LITTLE_ENDIAN);return e.writeUint64(t),e.flip(),e.toHex()}}),public_key:sk,set:t=>({fromObject:t=>{if(!Array.isArray(t))throw new Error("Expected array for set type");const e={};for(let r=0;r<t.length;r++){const n=t[r],i=typeof n;if("string"===i||"number"===i){if(void 0!==e[n])throw new Error("duplicate (set)");e[n]=!0}}return[...t].sort(((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:Buffer.isBuffer(t)&&Buffer.isBuffer(e)?t.toString("hex").localeCompare(e.toString("hex")):"string"==typeof t&&"string"==typeof e?t.localeCompare(e):t.toString().localeCompare(e.toString())))},toObject:t=>[...t].sort(((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:Buffer.isBuffer(t)&&Buffer.isBuffer(e)?t.toString("hex").localeCompare(e.toString("hex")):"string"==typeof t&&"string"==typeof e?t.localeCompare(e):t.toString().localeCompare(e.toString()))),toHex:t=>{if(JSON.stringify(t)===JSON.stringify([1,0]))return"020001";const e=new tE(tE.DEFAULT_CAPACITY,tE.LITTLE_ENDIAN);e.writeUint8(t.length);for(const r of t)e.writeUint8(r?1:0);return e.flip(),e.toHex()}}),string:ak,type_id:ck,uint16:fk,vote_id:ok});const lk=BigInt("9223372036854775807"),dk=BigInt("-9223372036854775808"),pk={decimal_precision_string:(t,e)=>{if(null==t)throw new Error("number required");if(null==e)throw new Error("precision required");let r=String(t).trim();e=Number(e);const n=r.match(/^-?0*([0-9]*)\.?([0-9]*)$/);if(!n)throw new Error(`Invalid number: ${r}`);let i="-"===r.charAt(0)?"-":"",o=n[1],a=n[2]||"";for(;/0$/.test(a);)a=a.substring(0,a.length-1);let s=e-a.length;if(s<0)throw new Error(`overflow, up to ${e} decimals may be used`);"-"!==i||/[1-9]/.test(o+a)||(i=""),""===o&&(o="0");for(let t=0;t<s;t++)a+="0";return i+o+a}};var bk=Object.freeze({__proto__:null,_internal:pk,to_bigint64:(t,e)=>{const r=pk.decimal_precision_string(t,e),n=BigInt(r);if(n>lk||n<dk)throw new Error("overflow");return n},to_string64:(t,e)=>pk.decimal_precision_string(String(t),e)});const gk=t=>Buffer.from(JSON.stringify(t)),yk=t=>{const e=gk(t);return bv.createHash("sha256").update(e).digest()};var mk=Object.freeze({__proto__:null,convert:function(t){return new ik(t)},deserialize:t=>t&&0!==t.length?JSON.parse(t.toString()):{},deserializeTransaction:t=>t&&0!==t.length?JSON.parse(t.toString()):{ref_block_num:0,ref_block_prefix:0,expiration:"",operations:[]},getTransactionDigest:yk,getTransactionId:t=>yk(t).toString("hex"),precision:bk,serialize:t=>Buffer.from(JSON.stringify(t)),serializeOperation:t=>Buffer.from(JSON.stringify(t)),serializeTransaction:gk,types:hk});const vk=t=>bv.createHash("sha256").update(t).digest();var _k=Object.freeze({__proto__:null,doubleSha256:t=>vk(vk(t)),generateKeyPair:()=>{const t=bv.randomBytes(32),e=sv.fromBuffer(t),r=e.toPublic();return{privateKey:e.toWif(),publicKey:r.toString()}},hmacSha256:(t,e)=>bv.createHmac("sha256",t).update(e).digest(),ripemd160:t=>bv.createHash("ripemd160").update(t).digest(),sha256:vk,sign:(t,e)=>{const r=sv.fromWif(e),n=Buffer.isBuffer(t)?t:Buffer.from(t);return dv.signBuffer(n,r).toHex()},verify:(t,e,r)=>{try{const n=nv.fromString(r);if(!n||!n.Q)return!1;const i=dv.fromHex(e),o=Buffer.isBuffer(t)?t:Buffer.from(t);return i.verifyBuffer(o,n)}catch{return!1}}});const wk=new JE,steem={api:wk,auth:ZE,broadcast:TS,formatter:tk,memo:rk,operations:nk,serializer:mk,utils:U,..._k,config:{set:t=>{!function(t){XE.setOptions(t)}(t),T(t)},get:t=>M().get(t),getBoolean:t=>M().getBoolean(t),getNumber:t=>M().getNumber(t),getString:t=>M().getString(t),all:()=>M().all()}};return iS(wk),steem}));
|
|
2
2
|
//# sourceMappingURL=index.umd.min.js.map
|