Skip to content

Instantly share code, notes, and snippets.

@kalepail
Created December 11, 2019 17:49
Show Gist options
  • Save kalepail/523e0a201bdc0c62d014ed3b97d2162e to your computer and use it in GitHub Desktop.
Save kalepail/523e0a201bdc0c62d014ed3b97d2162e to your computer and use it in GitHub Desktop.
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=492)}([function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return s})),r.d(t,"__decorate",(function(){return a})),r.d(t,"__param",(function(){return u})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return l})),r.d(t,"__generator",(function(){return f})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return d})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return v})),r.d(t,"__await",(function(){return g})),r.d(t,"__asyncGenerator",(function(){return m})),r.d(t,"__asyncDelegator",(function(){return w})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return b})),r.d(t,"__importStar",(function(){return E})),r.d(t,"__importDefault",(function(){return S}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function a(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function a(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new r((function(t){t(e.value)})).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function h(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function m(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof g?Promise.resolve(r.value.v).then(u,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function b(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(230),o=r(231),i=r(122);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),o=(e=a(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|p(t.length);return 0===(e=a(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?a(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return q(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function w(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function _(e,t,r,n){return z(q(t,e.length-r),e,r,n)}function b(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return b(e,t,r,n)}function S(e,t,r,n){return z(K(t),e,r,n)}function A(e,t,r,n){return z(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var s=e[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r),f=0;f<a;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function P(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=F(e[i]);return o}function C(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function U(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,i){return i||U(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return i||U(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||N(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);N(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);N(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=u.isBuffer(e)?e:q(new u(e,n).toString()),a=s.length;for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function K(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(5))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(22)).config((function(e){e.typedef("AccountId",e.lookup("PublicKey")),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2}),e.struct("AssetAlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AssetAlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AssetAlphaNum4"),alphaNum12:e.lookup("AssetAlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,datum:3}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4}),e.const("MASK_ACCOUNT_FLAGS",7),e.union("AccountEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("AccountEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),20)],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1}),e.const("MASK_TRUSTLINE_FLAGS",1),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("Asset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["datum","data"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.enum("EnvelopeType",{envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4}),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32")}}),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("Asset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["datum","data"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData")}}),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errDatum:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.struct("Auth",[["unused",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeer:4,peer:5,getTxSet:6,txSet:7,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeer",e.void()],["peer","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["transaction","transaction"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),transaction:e.lookup("TransactionEnvelope"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("PublicKey"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOption:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageDatum:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("AccountId")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("AccountId")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.struct("ChangeTrustOp",[["line",e.lookup("Asset")],["limit",e.lookup("Int64")]]),e.union("AllowTrustOpAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AllowTrustOpAsset")],["authorize",e.bool()]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOption","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageDatum","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("AccountId"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("AccountId"))],["body",e.lookup("OperationBody")]]),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.const("MAX_OPS_PER_TX",100),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("Transaction",[["sourceAccount",e.lookup("AccountId")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"]],arms:{tx:e.lookup("Transaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.struct("TransactionEnvelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffer:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimOfferAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveNoIssuer","noIssuer"]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")},defaultArm:e.void()}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffer:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimOfferAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendNoIssuer","noIssuer"]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")},defaultArm:e.void()}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"]],arms:{offer:e.lookup("OfferEntry")},defaultArm:e.void()}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimOfferAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"]],arms:{success:e.lookup("ManageOfferSuccessResult")},defaultArm:e.void()}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"]],arms:{success:e.lookup("ManageOfferSuccessResult")},defaultArm:e.void()}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigner:-2,setOptionsBadFlag:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntry:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"]],arms:{sourceAccountBalance:e.lookup("Int64")},defaultArm:e.void()}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)},defaultArm:e.void()}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentry:-4,opExceededWorkLimit:-5}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOption","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageDatum","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"]],arms:{tr:e.lookup("OperationResultTr")},defaultArm:e.void()}),e.enum("TransactionResultCode",{txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11}),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)},defaultArm:e.void()}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]])}));t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);r(218).polyfill();var o=r(77).version;t.version=o,n.__exportStar(r(219),t),n.__exportStar(r(117),t),n.__exportStar(r(34),t);var i=r(74);t.Config=i.Config;var s=r(409);t.Server=s.Server;var a=r(473);t.FederationServer=a.FederationServer,t.FEDERATION_RESPONSE_MAX_SIZE=a.FEDERATION_RESPONSE_MAX_SIZE;var u=r(211);t.StellarTomlResolver=u.StellarTomlResolver,t.STELLAR_TOML_MAX_SIZE=u.STELLAR_TOML_MAX_SIZE;var c=r(110);t.HorizonAxiosClient=c.default,t.SERVER_TIME_MAP=c.SERVER_TIME_MAP,t.getCurrentServerTime=c.getCurrentServerTime,n.__exportStar(r(477),t),n.__exportStar(r(47),t),t.default=e.exports},function(e,t,r){var n;!function(o){"use strict";var i,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,u=Math.ceil,c=Math.floor,l="[BigNumber Error] ",f=l+"Number primitive has more than 15 significant digits: ",h=1e14,p=14,d=9007199254740991,y=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],v=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function w(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=p-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function _(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function b(e,t,r,n){if(e<t||e>r||e!==c(e))throw Error(l+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function E(e){var t=e.c.length-1;return m(e.e/p)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function A(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(i=function e(t){var r,n,o,i,O,x,k,T,P,R=z.prototype={constructor:z,toString:null,valueOf:null},C=new z(1),I=20,N=4,j=-7,M=21,U=-1e7,B=1e7,L=!1,D=1,F=0,q={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},K="0123456789abcdefghijklmnopqrstuvwxyz";function z(e,t){var r,i,a,u,l,h,y,v,g=this;if(!(g instanceof z))return new z(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<U?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(u=0,l=e;l>=10;l/=10,u++);return void(u>B?g.c=g.e=null:(g.e=u,g.c=[e]))}v=String(e)}else{if(!s.test(v=String(e)))return o(g,v,h);g.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(u=v.indexOf("."))>-1&&(v=v.replace(".","")),(l=v.search(/e/i))>0?(u<0&&(u=l),u+=+v.slice(l+1),v=v.substring(0,l)):u<0&&(u=v.length)}else{if(b(t,2,K.length,"Base"),10==t)return Q(g=new z(e),I+g.e+1,N);if(v=String(e),h="number"==typeof e){if(0*e!=0)return o(g,v,h,t);if(g.s=1/e<0?(v=v.slice(1),-1):1,z.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else g.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(r=K.slice(0,t),u=l=0,y=v.length;l<y;l++)if(r.indexOf(i=v.charAt(l))<0){if("."==i){if(l>u){u=y;continue}}else if(!a&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){a=!0,l=-1,u=0;continue}return o(g,String(e),h,t)}h=!1,(u=(v=n(v,t,10,g.s)).indexOf("."))>-1?v=v.replace(".",""):u=v.length}for(l=0;48===v.charCodeAt(l);l++);for(y=v.length;48===v.charCodeAt(--y););if(v=v.slice(l,++y)){if(y-=l,h&&z.DEBUG&&y>15&&(e>d||e!==c(e)))throw Error(f+g.s*e);if((u=u-l-1)>B)g.c=g.e=null;else if(u<U)g.c=[g.e=0];else{if(g.e=u,g.c=[],l=(u+1)%p,u<0&&(l+=p),l<y){for(l&&g.c.push(+v.slice(0,l)),y-=p;l<y;)g.c.push(+v.slice(l,l+=p));l=p-(v=v.slice(l)).length}else l-=y;for(;l--;v+="0");g.c.push(+v)}}else g.c=[g.e=0]}function H(e,t,r,n){var o,i,s,a,u;if(null==r?r=N:b(r,0,8),!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)u=w(e.c),u=1==n||2==n&&(s<=j||s>=M)?S(u,s):A(u,s,"0");else if(i=(e=Q(new z(e),t,r)).e,a=(u=w(e.c)).length,1==n||2==n&&(t<=i||i<=j)){for(;a<t;u+="0",a++);u=S(u,i)}else if(t-=s,u=A(u,i,"0"),i+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-a)>0)for(i+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function V(e,t){for(var r,n=1,o=new z(e[0]);n<e.length;n++){if(!(r=new z(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function X(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*p-1)>B?e.c=e.e=null:r<U?e.c=[e.e=0]:(e.e=r,e.c=t),e}function Q(e,t,r,n){var o,i,s,a,l,f,d,v=e.c,g=y;if(v){e:{for(o=1,a=v[0];a>=10;a/=10,o++);if((i=t-o)<0)i+=p,s=t,d=(l=v[f=0])/g[o-s-1]%10|0;else if((f=u((i+1)/p))>=v.length){if(!n)break e;for(;v.length<=f;v.push(0));l=d=0,o=1,s=(i%=p)-p+1}else{for(l=a=v[f],o=1;a>=10;a/=10,o++);d=(s=(i%=p)-p+o)<0?0:l/g[o-s-1]%10|0}if(n=n||t<0||null!=v[f+1]||(s<0?l:l%g[o-s-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(i>0?s>0?l/g[o-s]:0:v[f-1])%10&1||r==(e.s<0?8:7)),t<1||!v[0])return v.length=0,n?(t-=e.e+1,v[0]=g[(p-t%p)%p],e.e=-t||0):v[0]=e.e=0,e;if(0==i?(v.length=f,a=1,f--):(v.length=f+1,a=g[p-i],v[f]=s>0?c(l/g[o-s]%g[s])*a:0),n)for(;;){if(0==f){for(i=1,s=v[0];s>=10;s/=10,i++);for(s=v[0]+=a,a=1;s>=10;s/=10,a++);i!=a&&(e.e++,v[0]==h&&(v[0]=1));break}if(v[f]+=a,v[f]!=h)break;v[f--]=0,a=1}for(i=v.length;0===v[--i];v.pop());}e.e>B?e.c=e.e=null:e.e<U&&(e.c=[e.e=0])}return e}function G(e){var t,r=e.e;return null===r?e.toString():(t=w(e.c),t=r<=j||r>=M?S(t,r):A(t,r,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(l+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(r=e[t],0,g,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(r=e[t],0,8,t),N=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(b(r[0],-g,0,t),b(r[1],0,g,t),j=r[0],M=r[1]):(b(r,-g,g,t),j=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)b(r[0],-g,-1,t),b(r[1],1,g,t),U=r[0],B=r[1];else{if(b(r,-g,g,t),!r)throw Error(l+t+" cannot be zero: "+r);U=-(B=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(l+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw L=!r,Error(l+"crypto unavailable");L=r}else L=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(r=e[t],0,9,t),D=r),e.hasOwnProperty(t="POW_PRECISION")&&(b(r=e[t],0,g,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(l+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(l+t+" invalid: "+r);K=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:N,EXPONENTIAL_AT:[j,M],RANGE:[U,B],CRYPTO:L,MODULO_MODE:D,POW_PRECISION:F,FORMAT:q,ALPHABET:K}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-g&&o<=g&&o===c(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%p)<1&&(t+=p),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=h||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(l+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return V(arguments,R.lt)},z.minimum=z.min=function(){return V(arguments,R.gt)},z.random=(i=9007199254740992*Math.random()&2097151?function(){return c(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,a=0,f=[],h=new z(C);if(null==e?e=I:b(e,0,g),o=u(e/p),L)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(s=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(f.push(s%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw L=!1,Error(l+"crypto unavailable");for(t=crypto.randomBytes(o*=7);a<o;)(s=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(f.push(s%1e14),a+=7);a=o/7}if(!L)for(;a<o;)(s=i())<9e15&&(f[a++]=s%1e14);for(o=f[--a],e%=p,o&&e&&(s=y[p-e],f[a]=c(o/s)*s);0===f[a];f.pop(),a--);if(a<0)f=[n=0];else{for(n=-1;0===f[0];f.splice(0,1),n-=p);for(a=1,s=f[0];s>=10;s/=10,a++);a<p&&(n-=p-a)}return h.e=n,h.c=f,h}),z.sum=function(){for(var e=1,t=arguments,r=new z(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){function e(e,t,r,n){for(var o,i,s=[0],a=0,u=e.length;a<u;){for(i=s.length;i--;s[i]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),o=0;o<s.length;o++)s[o]>r-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(t,n,o,i,s){var a,u,c,l,f,h,p,d,y=t.indexOf("."),v=I,g=N;for(y>=0&&(l=F,F=0,t=t.replace(".",""),h=(d=new z(n)).pow(t.length-y),F=l,d.c=e(A(w(h.c),h.e,"0"),10,o,"0123456789"),d.e=d.c.length),c=l=(p=e(t,n,o,s?(a=K,"0123456789"):(a="0123456789",K))).length;0==p[--l];p.pop());if(!p[0])return a.charAt(0);if(y<0?--c:(h.c=p,h.e=c,h.s=i,p=(h=r(h,d,v,g,o)).c,f=h.r,c=h.e),y=p[u=c+v+1],l=o/2,f=f||u<0||null!=p[u+1],f=g<4?(null!=y||f)&&(0==g||g==(h.s<0?3:2)):y>l||y==l&&(4==g||f||6==g&&1&p[u-1]||g==(h.s<0?8:7)),u<1||!p[0])t=f?A(a.charAt(1),-v,a.charAt(0)):a.charAt(0);else{if(p.length=u,f)for(--o;++p[--u]>o;)p[u]=0,u||(++c,p=[1].concat(p));for(l=p.length;!p[--l];);for(y=0,t="";y<=l;t+=a.charAt(p[y++]));t=A(t,c,a.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,u=e.length,c=t%v,l=t/v|0;for(e=e.slice();u--;)a=((o=c*(i=e[u]%v)+(n=l*i+(s=e[u]/v|0)*c)%v*v+a)/r|0)+(n/v|0)+l*s,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,s,a){var u,l,f,d,y,v,g,w,_,b,E,S,A,O,x,k,T,P=n.s==o.s?1:-1,R=n.c,C=o.c;if(!(R&&R[0]&&C&&C[0]))return new z(n.s&&o.s&&(R?!C||R[0]!=C[0]:C)?R&&0==R[0]||!C?0*P:P/0:NaN);for(_=(w=new z(P)).c=[],P=i+(l=n.e-o.e)+1,a||(a=h,l=m(n.e/p)-m(o.e/p),P=P/p|0),f=0;C[f]==(R[f]||0);f++);if(C[f]>(R[f]||0)&&l--,P<0)_.push(1),d=!0;else{for(O=R.length,k=C.length,f=0,P+=2,(y=c(a/(C[0]+1)))>1&&(C=e(C,y,a),R=e(R,y,a),k=C.length,O=R.length),A=k,E=(b=R.slice(0,k)).length;E<k;b[E++]=0);T=C.slice(),T=[0].concat(T),x=C[0],C[1]>=a/2&&x++;do{if(y=0,(u=t(C,b,k,E))<0){if(S=b[0],k!=E&&(S=S*a+(b[1]||0)),(y=c(S/x))>1)for(y>=a&&(y=a-1),g=(v=e(C,y,a)).length,E=b.length;1==t(v,b,g,E);)y--,r(v,k<g?T:C,g,a),g=v.length,u=1;else 0==y&&(u=y=1),g=(v=C.slice()).length;if(g<E&&(v=[0].concat(v)),r(b,v,E,a),E=b.length,-1==u)for(;t(C,b,k,E)<1;)y++,r(b,k<E?T:C,E,a),E=b.length}else 0===u&&(y++,b=[0]);_[f++]=y,b[0]?b[E++]=R[A]||0:(b=[R[A]],E=1)}while((A++<O||null!=b[0])&&P--);d=null!=b[0],_[0]||_.splice(0,1)}if(a==h){for(f=1,P=_[0];P>=10;P/=10,f++);Q(w,i+(w.e=f+l*p-1)+1,s,d)}else w.e=l,w.r=+d;return w}}(),O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,k=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(P,"");if(T.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(O,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(x,"$1").replace(k,"0.$1")),t!=i))return new z(i,o);if(z.DEBUG)throw Error(l+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},R.absoluteValue=R.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},R.comparedTo=function(e,t){return _(this,new z(e,t))},R.decimalPlaces=R.dp=function(e,t){var r,n,o,i=this;if(null!=e)return b(e,0,g),null==t?t=N:b(t,0,8),Q(new z(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-m(this.e/p))*p,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},R.dividedBy=R.div=function(e,t){return r(this,new z(e,t),I,N)},R.dividedToIntegerBy=R.idiv=function(e,t){return r(this,new z(e,t),0,1)},R.exponentiatedBy=R.pow=function(e,t){var r,n,o,i,s,a,f,h,d=this;if((e=new z(e)).c&&!e.isInteger())throw Error(l+"Exponent not an integer: "+G(e));if(null!=t&&(t=new z(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return h=new z(Math.pow(+G(d),s?2-E(e):+G(e))),t?h.mod(t):h;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(n=!a&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return i=d.s<0&&E(e)?-0:0,d.e>-1&&(i=1/i),new z(a?1/i:i);F&&(i=u(F/p+2))}for(s?(r=new z(.5),a&&(e.s=1),f=E(e)):f=(o=Math.abs(+G(e)))%2,h=new z(C);;){if(f){if(!(h=h.times(d)).c)break;i?h.c.length>i&&(h.c.length=i):n&&(h=h.mod(t))}if(o){if(0===(o=c(o/2)))break;f=o%2}else if(Q(e=e.times(r),e.e+1,1),e.e>14)f=E(e);else{if(0===(o=+G(e)))break;f=o%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):n&&(d=d.mod(t))}return n?h:(a&&(h=C.div(h)),t?h.mod(t):i?Q(h,F,N,void 0):h)},R.integerValue=function(e){var t=new z(this);return null==e?e=N:b(e,0,8),Q(t,t.e+1,e)},R.isEqualTo=R.eq=function(e,t){return 0===_(this,new z(e,t))},R.isFinite=function(){return!!this.c},R.isGreaterThan=R.gt=function(e,t){return _(this,new z(e,t))>0},R.isGreaterThanOrEqualTo=R.gte=function(e,t){return 1===(t=_(this,new z(e,t)))||0===t},R.isInteger=function(){return!!this.c&&m(this.e/p)>this.c.length-2},R.isLessThan=R.lt=function(e,t){return _(this,new z(e,t))<0},R.isLessThanOrEqualTo=R.lte=function(e,t){return-1===(t=_(this,new z(e,t)))||0===t},R.isNaN=function(){return!this.s},R.isNegative=function(){return this.s<0},R.isPositive=function(){return this.s>0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/p,c=e.e/p,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new z(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new z(l[0]?s:3==N?-0:0)}if(u=m(u),c=m(c),l=l.slice(),a=u-c){for((i=a<0)?(a=-a,o=l):(c=u,o=f),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=h-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=h}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?X(e,l,c):(e.s=3==N?-1:1,e.c=[e.e=0],e)},R.modulo=R.mod=function(e,t){var n,o,i=this;return e=new z(e,t),!i.c||!e.s||e.c&&!e.c[0]?new z(NaN):!e.c||i.c&&!i.c[0]?new z(i):(9==D?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,D),(e=i.minus(n.times(e))).c[0]||1!=D||(e.s=i.s),e)},R.multipliedBy=R.times=function(e,t){var r,n,o,i,s,a,u,c,l,f,d,y,g,w,_,b=this,E=b.c,S=(e=new z(e,t)).c;if(!(E&&S&&E[0]&&S[0]))return!b.s||!e.s||E&&!E[0]&&!S||S&&!S[0]&&!E?e.c=e.e=e.s=null:(e.s*=b.s,E&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=m(b.e/p)+m(e.e/p),e.s*=b.s,(u=E.length)<(f=S.length)&&(g=E,E=S,S=g,o=u,u=f,f=o),o=u+f,g=[];o--;g.push(0));for(w=h,_=v,o=f;--o>=0;){for(r=0,d=S[o]%_,y=S[o]/_|0,i=o+(s=u);i>o;)r=((c=d*(c=E[--s]%_)+(a=y*c+(l=E[s]/_|0)*d)%_*_+g[i]+r)/w|0)+(a/_|0)+y*l,g[i--]=c%w;g[i]=r}return r?++n:g.splice(0,1),X(e,g,n)},R.negated=function(){var e=new z(this);return e.s=-e.s||null,e},R.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new z(e,t)).s,!o||!t)return new z(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/p,s=e.e/p,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new z(o/0);if(!a[0]||!u[0])return u[0]?e:new z(a[0]?n:0*o)}if(i=m(i),s=m(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/h|0,a[t]=h===a[t]?0:a[t]%h;return o&&(a=[o].concat(a),++s),X(e,a,s)},R.precision=R.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return b(e,1,g),null==t?t=N:b(t,0,8),Q(new z(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*p+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},R.shiftedBy=function(e){return b(e,-d,d),this.times("1e"+e)},R.squareRoot=R.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,u=s.s,c=s.e,l=I+4,f=new z("0.5");if(1!==u||!a||!a[0])return new z(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+G(s)))||u==1/0?(((t=w(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=m((c+1)/2)-(c<0||c%2),n=new z(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new z(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),w(i.c).slice(0,u)===(t=w(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Q(n,n.e+I+2,1),e=!n.times(n).eq(s));break}if(!o&&(Q(i,i.e+I+2,0),i.times(i).eq(s))){n=i;break}l+=4,u+=4,o=1}return Q(n,n.e+I+1,N,e)},R.toExponential=function(e,t){return null!=e&&(b(e,0,g),e++),H(this,e,t,1)},R.toFixed=function(e,t){return null!=e&&(b(e,0,g),e=e+this.e+1),H(this,e,t)},R.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=q;else if("object"!=typeof r)throw Error(l+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",f=s[0],h=s[1],p=o.s<0,d=p?f.slice(1):f,y=d.length;if(u&&(i=a,a=u,u=i,y-=i),a>0&&y>0){for(i=y%a||a,f=d.substr(0,i);i<y;i+=a)f+=c+d.substr(i,a);u>0&&(f+=c+d.slice(i)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},R.toFraction=function(e){var t,n,o,i,s,a,u,c,f,h,d,v,g=this,m=g.c;if(null!=e&&(!(u=new z(e)).isInteger()&&(u.c||1!==u.s)||u.lt(C)))throw Error(l+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+G(u));if(!m)return new z(g);for(t=new z(C),f=n=new z(C),o=c=new z(C),v=w(m),s=t.e=v.length-g.e-1,t.c[0]=y[(a=s%p)<0?p+a:a],e=!e||u.comparedTo(t)>0?s>0?t:f:u,a=B,B=1/0,u=new z(v),c.c[0]=0;h=r(u,t,0,1),1!=(i=n.plus(h.times(o))).comparedTo(e);)n=o,o=i,f=c.plus(h.times(i=f)),c=i,t=u.minus(h.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),c=c.plus(i.times(f)),n=n.plus(i.times(o)),c.s=f.s=g.s,d=r(f,o,s*=2,N).minus(g).abs().comparedTo(r(c,n,s,N).minus(g).abs())<1?[f,o]:[c,n],B=a,d},R.toNumber=function(){return+G(this)},R.toPrecision=function(e,t){return null!=e&&b(e,1,g),H(this,e,t,2)},R.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=j||i>=M?S(w(r.c),i):A(w(r.c),i,"0"):10===e?t=A(w((r=Q(new z(r),I+i+1,N)).c),r.e,"0"):(b(e,2,K.length,"Base"),t=n(A(w(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},R.valueOf=R.toJSON=function(){return G(this)},R._isBigNumber=!0,a&&(R[Symbol.toStringTag]="BigNumber",R[Symbol.for("nodejs.util.inspect.custom")]=R.valueOf),null!=t&&z.set(t),z}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e,u),(0,o.default)(e)&&(0,n.default)(e.prototype,c)};var n=s(r(239)),o=s(r(60)),i=r(252);function s(e){return e&&e.__esModule?e:{default:e}}var a=Math.pow(2,16),u={toXDR:function(e){var t=new i.Cursor(a);this.write(e,t);var r=t.tell();return t.rewind(),t.slice(r).buffer()},fromXDR:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw",n=void 0;switch(r){case"raw":n=t;break;case"hex":n=e.from(t,"hex");break;case"base64":n=e.from(t,"base64");break;default:throw new Error("Invalid format "+r+', must be "raw", "hex", "base64"')}var o=new i.Cursor(n),s=this.read(o);return s}},c={toXDR:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(0),i=o.__importDefault(r(418)),s=o.__importDefault(r(41)),a=o.__importDefault(r(419)),u=r(34),c=o.__importDefault(r(110)),l=r(77).version,f=["transaction"],h=e;n=h.EventSource?h.EventSource:i.default?r(436):h.window.EventSource;var p=function(){function e(e){this.url=e,this.filter=[],this.originalSegments=this.url.segment()||[]}return e.prototype.call=function(){var e=this;return this.checkFilter(),this._sendNormalRequest(this.url).then((function(t){return e._parseResponse(t)}))},e.prototype.stream=function(e){var t,r,o=this;void 0===e&&(e={}),this.checkFilter(),this.url.setQuery("X-Client-Name","js-stellar-sdk"),this.url.setQuery("X-Client-Version",l);var i=function(){r=setTimeout((function(){t&&t.close(),t=s()}),e.reconnectTimeout||15e3)},s=function(){try{t=new n(o.url.toString())}catch(t){e.onerror&&e.onerror(t)}if(i(),t){var s=function(t){var n=t.data?o._parseRecord(JSON.parse(t.data)):t;n.paging_token&&o.url.setQuery("cursor",n.paging_token),clearTimeout(r),i(),void 0!==e.onmessage&&e.onmessage(n)},a=function(t){e.onerror&&e.onerror(t)};t.addEventListener?(t.addEventListener("message",s.bind(o)),t.addEventListener("error",a.bind(o))):(t.onmessage=s.bind(o),t.onerror=a.bind(o))}return t};return s(),function(){clearTimeout(r),t&&t.close()}},e.prototype.cursor=function(e){return this.url.setQuery("cursor",e),this},e.prototype.limit=function(e){return this.url.setQuery("limit",e.toString()),this},e.prototype.order=function(e){return this.url.setQuery("order",e),this},e.prototype.join=function(e){return this.url.setQuery("join",e),this},e.prototype.checkFilter=function(){if(this.filter.length>=2)throw new u.BadRequestError("Too many filters specified",this.filter);if(1===this.filter.length){var e=this.originalSegments.concat(this.filter[0]);this.url.segment(e)}},e.prototype._requestFnForLink=function(e){var t=this;return function(r){return void 0===r&&(r={}),o.__awaiter(t,void 0,void 0,(function(){var t,n,i;return o.__generator(this,(function(o){switch(o.label){case 0:return e.templated?(n=a.default(e.href),t=s.default(n.expand(r))):t=s.default(e.href),[4,this._sendNormalRequest(t)];case 1:return i=o.sent(),[2,this._parseResponse(i)]}}))}))}},e.prototype._parseRecord=function(e){var t=this;if(!e._links)return e;for(var r=function(r){var i=e._links[r],s=!1;if(void 0!==e[r]&&(e[r+"_attr"]=e[r],s=!0),s&&f.indexOf(r)>=0){var a=n._parseRecord(e[r]);e[r]=function(){return o.__awaiter(t,void 0,void 0,(function(){return o.__generator(this,(function(e){return[2,a]}))}))}}else e[r]=n._requestFnForLink(i)},n=this,i=0,s=Object.keys(e._links);i<s.length;i++){r(s[i])}return e},e.prototype._sendNormalRequest=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){return""===(t=e).authority()&&(t=t.authority(this.url.authority())),""===t.protocol()&&(t=t.protocol(this.url.protocol())),t.setQuery("c",String(Math.random())),[2,c.default.get(t.toString()).then((function(e){return e.data})).catch(this._handleNetworkError)]}))}))},e.prototype._parseResponse=function(e){return e._embedded&&e._embedded.records?this._toCollectionPage(e):this._parseRecord(e)},e.prototype._toCollectionPage=function(e){for(var t=this,r=0;r<e._embedded.records.length;r+=1)e._embedded.records[r]=this._parseRecord(e._embedded.records[r]);return{records:e._embedded.records,next:function(){return o.__awaiter(t,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){switch(r.label){case 0:return[4,this._sendNormalRequest(s.default(e._links.next.href))];case 1:return t=r.sent(),[2,this._toCollectionPage(t)]}}))}))},prev:function(){return o.__awaiter(t,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){switch(r.label){case 0:return[4,this._sendNormalRequest(s.default(e._links.prev.href))];case 1:return t=r.sent(),[2,this._toCollectionPage(t)]}}))}))}}},e.prototype._handleNetworkError=function(e){return o.__awaiter(this,void 0,void 0,(function(){return o.__generator(this,(function(t){if(!(e.response&&e.response.status&&e.response.statusText))return[2,Promise.reject(new Error(e.message))];switch(e.response.status){case 404:return[2,Promise.reject(new u.NotFoundError(e.response.statusText,e.response.data))];default:return[2,Promise.reject(new u.NetworkError(e.response.statusText,e.response.data))]}return[2]}))}))},e}();t.CallBuilder=p}).call(this,r(5))},function(e,t){e.exports=function(e){return void 0===e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.StrKey=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.decodeCheck=p,t.encodeCheck=d;var o=l(r(127)),i=l(r(493)),s=l(r(9)),a=l(r(128)),u=l(r(20)),c=r(126);function l(e){return e&&e.__esModule?e:{default:e}}var f={ed25519PublicKey:48,ed25519SecretSeed:144,preAuthTx:152,sha256Hash:184};t.StrKey=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"encodeEd25519PublicKey",value:function(e){return d("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return p("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return h("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return d("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return p("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return h("ed25519SecretSeed",e)}},{key:"encodePreAuthTx",value:function(e){return d("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return p("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return d("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return p("sha256Hash",e)}}]),e}();function h(e,t){if(t&&56!==t.length)return!1;try{if(32!==p(e,t).length)return!1}catch(e){return!1}return!0}function p(t,r){if(!(0,u.default)(r))throw new TypeError("encoded argument must be of type String");var n=o.default.decode(r),i=n[0],a=n.slice(0,-2),l=a.slice(1),h=n.slice(-2);if(r!==o.default.encode(n))throw new Error("invalid encoded string");var p=f[t];if((0,s.default)(p))throw new Error(t+' is not a valid version byte name. expected one of "accountId" or "seed"');if(i!==p)throw new Error("invalid version byte. expected "+p+", got "+i);var d=y(a);if(!(0,c.verifyChecksum)(d,h))throw new Error("invalid checksum");return e.from(l)}function d(t,r){if((0,a.default)(r)||(0,s.default)(r))throw new Error("cannot encode null data");var n=f[t];if((0,s.default)(n))throw new Error(t+' is not a valid version byte name. expected one of "ed25519PublicKey", "ed25519SecretSeed", "preAuthTx", "sha256Hash"');r=e.from(r);var i=e.from([n]),u=e.concat([i,r]),c=y(u),l=e.concat([u,c]);return o.default.encode(l)}function y(t){var r=e.alloc(2);return r.writeUInt16LE(i.default.crc16xmodem(t),0),r}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";var n=r(192),o=r(421),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return a(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,o=arguments.length;n<o;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){var n=r(120),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Keypair=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=f(r(18)),i=r(61),s=r(125),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(237)),u=r(11),c=f(r(2)),l=r(48);function f(e){return e&&e.__esModule?e:{default:e}}t.Keypair=function(){function t(r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"ed25519"!==r.type)throw new Error("Invalid keys type");if(this.type=r.type,r.secretKey){if(r.secretKey=e.from(r.secretKey),32!==r.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=r.secretKey,this._publicKey=(0,s.generate)(r.secretKey),this._secretKey=e.concat([r.secretKey,this._publicKey]),r.publicKey&&!this._publicKey.equals(e.from(r.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=e.from(r.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid")}return n(t,[{key:"xdrAccountId",value:function(){return new c.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new c.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return u.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return u.StrKey.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return(0,s.sign)(e,this._secretKey)}},{key:"verify",value:function(e,t){return(0,s.verify)(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new c.default.DecoratedSignature({hint:r,signature:t})}}],[{key:"fromSecret",value:function(e){var t=u.StrKey.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromBase58Seed",value:function(e){var t=a.decodeBase58Check("seed",e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e){if(console.warn("Global `Network.current()` is deprecated. Please pass explicit argument instead, e.g. `Keypair.master(Networks.PUBLIC)` (see https://git.io/fj9fG for more info)."),null===i.Network.current())throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");e=i.Network.current().networkPassphrase()}return this.fromRawEd25519Seed((0,l.hash)(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=u.StrKey.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=o.default.randomBytes(32);return this.fromRawEd25519Seed(e)}}]),t}()}).call(this,r(1).Buffer)},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new d(e,t)),1!==c.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),a=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,o){var i,s=0;for(i=0;i<o;i++)s|=e[t+i]^r[n+i];return(1&s-1>>>8)-1}function v(e,t,r,n){return y(e,t,r,n,16)}function g(e,t,r,n){return y(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,b=i,E=s,S=a,A=u,O=c,x=l,k=f,T=h,P=p,R=d,C=y,I=v,N=g,j=m,M=w,U=_,B=0;B<20;B+=2)b^=(o=(N^=(o=(P^=(o=(O^=(o=b+N|0)<<7|o>>>25)+b|0)<<9|o>>>23)+O|0)<<13|o>>>19)+P|0)<<18|o>>>14,x^=(o=(E^=(o=(j^=(o=(R^=(o=x+E|0)<<7|o>>>25)+x|0)<<9|o>>>23)+R|0)<<13|o>>>19)+j|0)<<18|o>>>14,C^=(o=(k^=(o=(S^=(o=(M^=(o=C+k|0)<<7|o>>>25)+C|0)<<9|o>>>23)+M|0)<<13|o>>>19)+S|0)<<18|o>>>14,U^=(o=(I^=(o=(T^=(o=(A^=(o=U+I|0)<<7|o>>>25)+U|0)<<9|o>>>23)+A|0)<<13|o>>>19)+T|0)<<18|o>>>14,b^=(o=(A^=(o=(S^=(o=(E^=(o=b+A|0)<<7|o>>>25)+b|0)<<9|o>>>23)+E|0)<<13|o>>>19)+S|0)<<18|o>>>14,x^=(o=(O^=(o=(T^=(o=(k^=(o=x+O|0)<<7|o>>>25)+x|0)<<9|o>>>23)+k|0)<<13|o>>>19)+T|0)<<18|o>>>14,C^=(o=(R^=(o=(P^=(o=(I^=(o=C+R|0)<<7|o>>>25)+C|0)<<9|o>>>23)+I|0)<<13|o>>>19)+P|0)<<18|o>>>14,U^=(o=(M^=(o=(j^=(o=(N^=(o=U+M|0)<<7|o>>>25)+U|0)<<9|o>>>23)+N|0)<<13|o>>>19)+j|0)<<18|o>>>14;b=b+i|0,E=E+s|0,S=S+a|0,A=A+u|0,O=O+c|0,x=x+l|0,k=k+f|0,T=T+h|0,P=P+p|0,R=R+d|0,C=C+y|0,I=I+v|0,N=N+g|0,j=j+m|0,M=M+w|0,U=U+_|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=O>>>0&255,e[17]=O>>>8&255,e[18]=O>>>16&255,e[19]=O>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=k>>>0&255,e[25]=k>>>8&255,e[26]=k>>>16&255,e[27]=k>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=P>>>0&255,e[33]=P>>>8&255,e[34]=P>>>16&255,e[35]=P>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=I>>>0&255,e[45]=I>>>8&255,e[46]=I>>>16&255,e[47]=I>>>24&255,e[48]=N>>>0&255,e[49]=N>>>8&255,e[50]=N>>>16&255,e[51]=N>>>24&255,e[52]=j>>>0&255,e[53]=j>>>8&255,e[54]=j>>>16&255,e[55]=j>>>24&255,e[56]=M>>>0&255,e[57]=M>>>8&255,e[58]=M>>>16&255,e[59]=M>>>24&255,e[60]=U>>>0&255,e[61]=U>>>8&255,e[62]=U>>>16&255,e[63]=U>>>24&255}(e,t,r,n)}function w(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,b=0;b<20;b+=2)i^=(o=(g^=(o=(p^=(o=(c^=(o=i+g|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+p|0)<<18|o>>>14,l^=(o=(s^=(o=(m^=(o=(d^=(o=l+s|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+m|0)<<18|o>>>14,y^=(o=(f^=(o=(a^=(o=(w^=(o=y+f|0)<<7|o>>>25)+y|0)<<9|o>>>23)+w|0)<<13|o>>>19)+a|0)<<18|o>>>14,_^=(o=(v^=(o=(h^=(o=(u^=(o=_+v|0)<<7|o>>>25)+_|0)<<9|o>>>23)+u|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(u^=(o=(a^=(o=(s^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,l^=(o=(c^=(o=(h^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+h|0)<<18|o>>>14,y^=(o=(d^=(o=(p^=(o=(v^=(o=y+d|0)<<7|o>>>25)+y|0)<<9|o>>>23)+v|0)<<13|o>>>19)+p|0)<<18|o>>>14,_^=(o=(w^=(o=(m^=(o=(g^=(o=_+w|0)<<7|o>>>25)+_|0)<<9|o>>>23)+g|0)<<13|o>>>19)+m|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,r,n,o,i,s){var a,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(m(l,c,s,_),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(o>0)for(m(l,c,s,_),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function E(e,t,r,n,o){var i,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(m(u,a,o,_),s=0;s<64;s++)e[t+s]=u[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(m(u,a,o,_),s=0;s<r;s++)e[t+s]=u[s];return 0}function S(e,t,r,n,o){var i=new Uint8Array(32);w(i,n,o,_);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return E(e,t,r,s,i)}function A(e,t,r,n,o,i,s){var a=new Uint8Array(32);w(a,i,s,_);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return b(e,t,r,n,o,u,a)}var O=function(e){var t,r,n,o,i,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function x(e,t,r,n,o,i){var s=new O(i);return s.update(r,n,o),s.finish(e,t),0}function k(e,t,r,n,o,i){var s=new Uint8Array(16);return x(s,0,r,n,o,i),v(e,t,s,0)}function T(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),x(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function P(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(S(s,0,32,n,o),0!==k(t,16,t,32,r-32,s))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function R(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function C(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function I(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function N(e,r){var n,o,i,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(C(a),C(a),C(a),o=0;o<2;o++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,I(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function j(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return N(r,e),N(n,t),g(r,0,n,0)}function M(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function U(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function B(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function D(e,t,r){var n,o,i=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,p=0,d=0,y=0,v=0,g=0,m=0,w=0,_=0,b=0,E=0,S=0,A=0,O=0,x=0,k=0,T=0,P=0,R=0,C=0,I=0,N=0,j=0,M=0,U=r[0],B=r[1],L=r[2],D=r[3],F=r[4],q=r[5],K=r[6],z=r[7],H=r[8],V=r[9],X=r[10],Q=r[11],G=r[12],W=r[13],Y=r[14],$=r[15];i+=(n=t[0])*U,s+=n*B,a+=n*L,u+=n*D,c+=n*F,l+=n*q,f+=n*K,h+=n*z,p+=n*H,d+=n*V,y+=n*X,v+=n*Q,g+=n*G,m+=n*W,w+=n*Y,_+=n*$,s+=(n=t[1])*U,a+=n*B,u+=n*L,c+=n*D,l+=n*F,f+=n*q,h+=n*K,p+=n*z,d+=n*H,y+=n*V,v+=n*X,g+=n*Q,m+=n*G,w+=n*W,_+=n*Y,b+=n*$,a+=(n=t[2])*U,u+=n*B,c+=n*L,l+=n*D,f+=n*F,h+=n*q,p+=n*K,d+=n*z,y+=n*H,v+=n*V,g+=n*X,m+=n*Q,w+=n*G,_+=n*W,b+=n*Y,E+=n*$,u+=(n=t[3])*U,c+=n*B,l+=n*L,f+=n*D,h+=n*F,p+=n*q,d+=n*K,y+=n*z,v+=n*H,g+=n*V,m+=n*X,w+=n*Q,_+=n*G,b+=n*W,E+=n*Y,S+=n*$,c+=(n=t[4])*U,l+=n*B,f+=n*L,h+=n*D,p+=n*F,d+=n*q,y+=n*K,v+=n*z,g+=n*H,m+=n*V,w+=n*X,_+=n*Q,b+=n*G,E+=n*W,S+=n*Y,A+=n*$,l+=(n=t[5])*U,f+=n*B,h+=n*L,p+=n*D,d+=n*F,y+=n*q,v+=n*K,g+=n*z,m+=n*H,w+=n*V,_+=n*X,b+=n*Q,E+=n*G,S+=n*W,A+=n*Y,O+=n*$,f+=(n=t[6])*U,h+=n*B,p+=n*L,d+=n*D,y+=n*F,v+=n*q,g+=n*K,m+=n*z,w+=n*H,_+=n*V,b+=n*X,E+=n*Q,S+=n*G,A+=n*W,O+=n*Y,x+=n*$,h+=(n=t[7])*U,p+=n*B,d+=n*L,y+=n*D,v+=n*F,g+=n*q,m+=n*K,w+=n*z,_+=n*H,b+=n*V,E+=n*X,S+=n*Q,A+=n*G,O+=n*W,x+=n*Y,k+=n*$,p+=(n=t[8])*U,d+=n*B,y+=n*L,v+=n*D,g+=n*F,m+=n*q,w+=n*K,_+=n*z,b+=n*H,E+=n*V,S+=n*X,A+=n*Q,O+=n*G,x+=n*W,k+=n*Y,T+=n*$,d+=(n=t[9])*U,y+=n*B,v+=n*L,g+=n*D,m+=n*F,w+=n*q,_+=n*K,b+=n*z,E+=n*H,S+=n*V,A+=n*X,O+=n*Q,x+=n*G,k+=n*W,T+=n*Y,P+=n*$,y+=(n=t[10])*U,v+=n*B,g+=n*L,m+=n*D,w+=n*F,_+=n*q,b+=n*K,E+=n*z,S+=n*H,A+=n*V,O+=n*X,x+=n*Q,k+=n*G,T+=n*W,P+=n*Y,R+=n*$,v+=(n=t[11])*U,g+=n*B,m+=n*L,w+=n*D,_+=n*F,b+=n*q,E+=n*K,S+=n*z,A+=n*H,O+=n*V,x+=n*X,k+=n*Q,T+=n*G,P+=n*W,R+=n*Y,C+=n*$,g+=(n=t[12])*U,m+=n*B,w+=n*L,_+=n*D,b+=n*F,E+=n*q,S+=n*K,A+=n*z,O+=n*H,x+=n*V,k+=n*X,T+=n*Q,P+=n*G,R+=n*W,C+=n*Y,I+=n*$,m+=(n=t[13])*U,w+=n*B,_+=n*L,b+=n*D,E+=n*F,S+=n*q,A+=n*K,O+=n*z,x+=n*H,k+=n*V,T+=n*X,P+=n*Q,R+=n*G,C+=n*W,I+=n*Y,N+=n*$,w+=(n=t[14])*U,_+=n*B,b+=n*L,E+=n*D,S+=n*F,A+=n*q,O+=n*K,x+=n*z,k+=n*H,T+=n*V,P+=n*X,R+=n*Q,C+=n*G,I+=n*W,N+=n*Y,j+=n*$,_+=(n=t[15])*U,s+=38*(E+=n*L),a+=38*(S+=n*D),u+=38*(A+=n*F),c+=38*(O+=n*q),l+=38*(x+=n*K),f+=38*(k+=n*z),h+=38*(T+=n*H),p+=38*(P+=n*V),d+=38*(R+=n*X),y+=38*(C+=n*Q),v+=38*(I+=n*G),g+=38*(N+=n*W),m+=38*(j+=n*Y),w+=38*(M+=n*$),i=(n=(i+=38*(b+=n*B))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),_=(n=_+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=y,e[11]=v,e[12]=g,e[13]=m,e[14]=w,e[15]=_}function F(e,t){D(e,t,t)}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)F(o,o),2!==n&&4!==n&&D(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(e,r,n){var o,i,s=new Uint8Array(32),a=new Float64Array(80),c=t(),l=t(),f=t(),h=t(),p=t(),d=t();for(i=0;i<31;i++)s[i]=r[i];for(s[31]=127&r[31]|64,s[0]&=248,U(a,n),i=0;i<16;i++)l[i]=a[i],h[i]=c[i]=f[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)I(c,l,o=s[i>>>3]>>>(7&i)&1),I(f,h,o),B(p,c,f),L(c,c,f),B(f,l,h),L(l,l,h),F(h,p),F(d,c),D(c,f,c),D(f,l,p),B(p,c,f),L(c,c,f),F(l,c),L(f,h,d),D(c,f,u),B(c,c,h),D(f,f,c),D(c,h,d),D(h,l,a),F(l,p),I(c,l,o),I(f,h,o);for(i=0;i<16;i++)a[i+16]=c[i],a[i+32]=f[i],a[i+48]=l[i],a[i+64]=h[i];var y=a.subarray(32),v=a.subarray(16);return q(y,y),D(v,v,y),N(e,v),0}function z(e,t){return K(e,t,i)}function H(e,t){return n(t,32),z(e,t)}function V(e,t,r){var n=new Uint8Array(32);return K(n,r,t),w(e,o,n,_)}O.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,u,c,l,f,h,p,d,y,v,g,m,w,_,b,E=this.fin?0:2048,S=this.h[0],A=this.h[1],O=this.h[2],x=this.h[3],k=this.h[4],T=this.h[5],P=this.h[6],R=this.h[7],C=this.h[8],I=this.h[9],N=this.r[0],j=this.r[1],M=this.r[2],U=this.r[3],B=this.r[4],L=this.r[5],D=this.r[6],F=this.r[7],q=this.r[8],K=this.r[9];r>=16;)h=f=0,h+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*N,h+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*K),h+=(O+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*q),h+=(x+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(k+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*D))>>>13,h&=8191,h+=(T+=a>>>1&8191)*(5*L),h+=(P+=8191&(a>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),h+=(R+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*U),h+=(C+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*M),p=f+=(h+=(I+=l>>>5|E)*(5*j))>>>13,p+=S*j,p+=A*N,p+=O*(5*K),p+=x*(5*q),f=(p+=k*(5*F))>>>13,p&=8191,p+=T*(5*D),p+=P*(5*L),p+=R*(5*B),p+=C*(5*U),f+=(p+=I*(5*M))>>>13,p&=8191,d=f,d+=S*M,d+=A*j,d+=O*N,d+=x*(5*K),f=(d+=k*(5*q))>>>13,d&=8191,d+=T*(5*F),d+=P*(5*D),d+=R*(5*L),d+=C*(5*B),y=f+=(d+=I*(5*U))>>>13,y+=S*U,y+=A*M,y+=O*j,y+=x*N,f=(y+=k*(5*K))>>>13,y&=8191,y+=T*(5*q),y+=P*(5*F),y+=R*(5*D),y+=C*(5*L),v=f+=(y+=I*(5*B))>>>13,v+=S*B,v+=A*U,v+=O*M,v+=x*j,f=(v+=k*N)>>>13,v&=8191,v+=T*(5*K),v+=P*(5*q),v+=R*(5*F),v+=C*(5*D),g=f+=(v+=I*(5*L))>>>13,g+=S*L,g+=A*B,g+=O*U,g+=x*M,f=(g+=k*j)>>>13,g&=8191,g+=T*N,g+=P*(5*K),g+=R*(5*q),g+=C*(5*F),m=f+=(g+=I*(5*D))>>>13,m+=S*D,m+=A*L,m+=O*B,m+=x*U,f=(m+=k*M)>>>13,m&=8191,m+=T*j,m+=P*N,m+=R*(5*K),m+=C*(5*q),w=f+=(m+=I*(5*F))>>>13,w+=S*F,w+=A*D,w+=O*L,w+=x*B,f=(w+=k*U)>>>13,w&=8191,w+=T*M,w+=P*j,w+=R*N,w+=C*(5*K),_=f+=(w+=I*(5*q))>>>13,_+=S*q,_+=A*F,_+=O*D,_+=x*L,f=(_+=k*B)>>>13,_&=8191,_+=T*U,_+=P*M,_+=R*j,_+=C*N,b=f+=(_+=I*(5*K))>>>13,b+=S*K,b+=A*q,b+=O*F,b+=x*D,f=(b+=k*L)>>>13,b&=8191,b+=T*B,b+=P*U,b+=R*M,b+=C*j,S=h=8191&(f=(f=((f+=(b+=I*N)>>>13)<<2)+f|0)+(h&=8191)|0),A=p+=f>>>=13,O=d&=8191,x=y&=8191,k=v&=8191,T=g&=8191,P=m&=8191,R=w&=8191,C=_&=8191,I=b&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=A,this.h[2]=O,this.h[3]=x,this.h[4]=k,this.h[5]=T,this.h[6]=P,this.h[7]=R,this.h[8]=C,this.h[9]=I},O.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},O.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var X=T,Q=P;var G=[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 W(e,t,r,n){for(var o,i,s,a,u,c,l,f,h,p,d,y,v,g,m,w,_,b,E,S,A,O,x,k,T,P,R=new Int32Array(16),C=new Int32Array(16),I=e[0],N=e[1],j=e[2],M=e[3],U=e[4],B=e[5],L=e[6],D=e[7],F=t[0],q=t[1],K=t[2],z=t[3],H=t[4],V=t[5],X=t[6],Q=t[7],W=0;n>=128;){for(E=0;E<16;E++)S=8*E+W,R[E]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],C[E]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(E=0;E<80;E++)if(o=I,i=N,s=j,a=M,u=U,c=B,l=L,D,h=F,p=q,d=K,y=z,v=H,g=V,m=X,Q,x=65535&(O=Q),k=O>>>16,T=65535&(A=D),P=A>>>16,x+=65535&(O=(H>>>14|U<<18)^(H>>>18|U<<14)^(U>>>9|H<<23)),k+=O>>>16,T+=65535&(A=(U>>>14|H<<18)^(U>>>18|H<<14)^(H>>>9|U<<23)),P+=A>>>16,x+=65535&(O=H&V^~H&X),k+=O>>>16,T+=65535&(A=U&B^~U&L),P+=A>>>16,A=G[2*E],x+=65535&(O=G[2*E+1]),k+=O>>>16,T+=65535&A,P+=A>>>16,A=R[E%16],k+=(O=C[E%16])>>>16,T+=65535&A,P+=A>>>16,T+=(k+=(x+=65535&O)>>>16)>>>16,x=65535&(O=b=65535&x|k<<16),k=O>>>16,T=65535&(A=_=65535&T|(P+=T>>>16)<<16),P=A>>>16,x+=65535&(O=(F>>>28|I<<4)^(I>>>2|F<<30)^(I>>>7|F<<25)),k+=O>>>16,T+=65535&(A=(I>>>28|F<<4)^(F>>>2|I<<30)^(F>>>7|I<<25)),P+=A>>>16,k+=(O=F&q^F&K^q&K)>>>16,T+=65535&(A=I&N^I&j^N&j),P+=A>>>16,f=65535&(T+=(k+=(x+=65535&O)>>>16)>>>16)|(P+=T>>>16)<<16,w=65535&x|k<<16,x=65535&(O=y),k=O>>>16,T=65535&(A=a),P=A>>>16,k+=(O=b)>>>16,T+=65535&(A=_),P+=A>>>16,N=o,j=i,M=s,U=a=65535&(T+=(k+=(x+=65535&O)>>>16)>>>16)|(P+=T>>>16)<<16,B=u,L=c,D=l,I=f,q=h,K=p,z=d,H=y=65535&x|k<<16,V=v,X=g,Q=m,F=w,E%16==15)for(S=0;S<16;S++)A=R[S],x=65535&(O=C[S]),k=O>>>16,T=65535&A,P=A>>>16,A=R[(S+9)%16],x+=65535&(O=C[(S+9)%16]),k+=O>>>16,T+=65535&A,P+=A>>>16,_=R[(S+1)%16],x+=65535&(O=((b=C[(S+1)%16])>>>1|_<<31)^(b>>>8|_<<24)^(b>>>7|_<<25)),k+=O>>>16,T+=65535&(A=(_>>>1|b<<31)^(_>>>8|b<<24)^_>>>7),P+=A>>>16,_=R[(S+14)%16],k+=(O=((b=C[(S+14)%16])>>>19|_<<13)^(_>>>29|b<<3)^(b>>>6|_<<26))>>>16,T+=65535&(A=(_>>>19|b<<13)^(b>>>29|_<<3)^_>>>6),P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,R[S]=65535&T|P<<16,C[S]=65535&x|k<<16;x=65535&(O=F),k=O>>>16,T=65535&(A=I),P=A>>>16,A=e[0],k+=(O=t[0])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[0]=I=65535&T|P<<16,t[0]=F=65535&x|k<<16,x=65535&(O=q),k=O>>>16,T=65535&(A=N),P=A>>>16,A=e[1],k+=(O=t[1])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[1]=N=65535&T|P<<16,t[1]=q=65535&x|k<<16,x=65535&(O=K),k=O>>>16,T=65535&(A=j),P=A>>>16,A=e[2],k+=(O=t[2])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[2]=j=65535&T|P<<16,t[2]=K=65535&x|k<<16,x=65535&(O=z),k=O>>>16,T=65535&(A=M),P=A>>>16,A=e[3],k+=(O=t[3])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[3]=M=65535&T|P<<16,t[3]=z=65535&x|k<<16,x=65535&(O=H),k=O>>>16,T=65535&(A=U),P=A>>>16,A=e[4],k+=(O=t[4])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[4]=U=65535&T|P<<16,t[4]=H=65535&x|k<<16,x=65535&(O=V),k=O>>>16,T=65535&(A=B),P=A>>>16,A=e[5],k+=(O=t[5])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[5]=B=65535&T|P<<16,t[5]=V=65535&x|k<<16,x=65535&(O=X),k=O>>>16,T=65535&(A=L),P=A>>>16,A=e[6],k+=(O=t[6])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[6]=L=65535&T|P<<16,t[6]=X=65535&x|k<<16,x=65535&(O=Q),k=O>>>16,T=65535&(A=D),P=A>>>16,A=e[7],k+=(O=t[7])>>>16,T+=65535&A,P+=A>>>16,P+=(T+=(k+=(x+=65535&O)>>>16)>>>16)>>>16,e[7]=D=65535&T|P<<16,t[7]=Q=65535&x|k<<16,W+=128,n-=128}return n}function Y(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,W(o,i,t,r),r%=128,n=0;n<r;n++)s[n]=t[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,d(s,r-8,a/536870912|0,a<<3),W(o,i,s,r),n=0;n<8;n++)d(e,8*n,o[n],i[n]);return 0}function $(e,r){var n=t(),o=t(),i=t(),s=t(),a=t(),u=t(),c=t(),f=t(),h=t();L(n,e[1],e[0]),L(h,r[1],r[0]),D(n,n,h),B(o,e[0],e[1]),B(h,r[0],r[1]),D(o,o,h),D(i,e[3],r[3]),D(i,i,l),D(s,e[2],r[2]),B(s,s,s),L(a,o,n),L(u,s,i),B(c,s,i),B(f,o,n),D(e[0],a,u),D(e[1],f,c),D(e[2],c,u),D(e[3],a,f)}function Z(e,t,r){var n;for(n=0;n<4;n++)I(e[n],t[n],r)}function J(e,r){var n=t(),o=t(),i=t();q(i,r[2]),D(n,r[0],i),D(o,r[1],i),N(e,o),e[31]^=M(n)<<7}function ee(e,t,r){var n,o;for(R(e[0],s),R(e[1],a),R(e[2],a),R(e[3],s),o=255;o>=0;--o)Z(e,t,n=r[o/8|0]>>(7&o)&1),$(t,e),$(e,e),Z(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];R(n[0],f),R(n[1],h),R(n[2],a),D(n[3],f,h),ee(e,n,r)}function re(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),Y(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),J(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*ne[o-(n-32)],r=t[o]+128>>8,t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*ne[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*ne[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ie(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,o){var i,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];Y(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=a[32+i];for(Y(c,e.subarray(32),n+32),ie(c),te(f,c),J(e,f),i=32;i<64;i++)e[i]=o[i];for(Y(u,e,n+64),ie(u),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=c[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=u[i]*a[s];return oe(e.subarray(32),l),h}function ae(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),h=t();return R(e[2],a),U(e[1],r),F(i,e[1]),D(u,i,c),L(i,i,e[2]),B(u,e[2],u),F(l,u),F(f,l),D(h,f,l),D(n,h,i),D(n,n,u),function(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)F(o,o),1!==n&&D(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}(n,n),D(n,n,i),D(n,n,u),D(n,n,u),D(e[0],n,u),F(o,e[0]),D(o,o,u),j(o,i)&&D(e[0],e[0],p),F(o,e[0]),D(o,o,u),j(o,i)?-1:(M(e[0])===r[31]>>7&&L(e[0],s,e[0]),D(e[3],e[0],e[1]),0)}function ue(e,r,n,o){var i,s=new Uint8Array(32),a=new Uint8Array(64),u=[t(),t(),t(),t()],c=[t(),t(),t(),t()];if(-1,n<64)return-1;if(ae(c,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(Y(a,e,n),ie(a),ee(u,c,a),te(c,r.subarray(32)),$(u,c),J(s,u),n-=64,g(r,0,s,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var ce=32,le=24,fe=32,he=32,pe=le;function de(e,t){if(e.length!==ce)throw new Error("bad key size");if(t.length!==le)throw new Error("bad nonce size")}function ye(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ve(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:A,crypto_stream:S,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:E,crypto_onetimeauth:x,crypto_onetimeauth_verify:k,crypto_verify_16:v,crypto_verify_32:g,crypto_secretbox:T,crypto_secretbox_open:P,crypto_scalarmult:K,crypto_scalarmult_base:z,crypto_box_beforenm:V,crypto_box_afternm:X,crypto_box:function(e,t,r,n,o,i){var s=new Uint8Array(32);return V(s,o,i),X(e,t,r,n,s)},crypto_box_open:function(e,t,r,n,o,i){var s=new Uint8Array(32);return V(s,o,i),Q(e,t,r,n,s)},crypto_box_keypair:H,crypto_hash:Y,crypto_sign:se,crypto_sign_keypair:re,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:ce,crypto_secretbox_NONCEBYTES:le,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:fe,crypto_box_SECRETKEYBYTES:he,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:pe,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){ye(e,t,r),de(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return T(o,n,n.length,t,r),o.subarray(16)},e.secretbox.open=function(e,t,r){ye(e,t,r),de(r,t);for(var n=new Uint8Array(16+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+16]=e[i];return n.length<32?null:0!==P(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=ce,e.secretbox.nonceLength=le,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(ye(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,e,t),r},e.scalarMult.base=function(e){if(ye(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return z(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){ye(e,t),function(e,t){if(e.length!==fe)throw new Error("bad public key size");if(t.length!==he)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return V(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(he);return H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(ye(e),e.length!==he)throw new Error("bad secret key size");var t=new Uint8Array(fe);return z(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=fe,e.box.secretKeyLength=he,e.box.sharedKeyLength=32,e.box.nonceLength=pe,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(ye(e,t),64!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(64+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(ye(e,t),32!==t.length)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(64),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(ye(e,t,r),64!==t.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,o=new Uint8Array(64+e.length),i=new Uint8Array(64+e.length);for(n=0;n<64;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+64]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(ye(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return re(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){ye(e);var t=new Uint8Array(64);return Y(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return ye(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];ve(o)}))}else(t=r(236))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];ve(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},function(e,t,r){"use strict";const n=r(489),o=r(490),i=r(491);function s(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function a(e,t){return t.decode?o(e):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function c(e){const t=(e=u(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function l(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":return(e,t,r)=>{const n="string"==typeof t&&t.split("").indexOf(",")>-1?t.split(","):t;r[e]=n};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",parseNumbers:!1,parseBooleans:!1},t)),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){let[e,s]=i(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:a(s,t),r(a(e,t),s,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=l(r[e],t);else n[e]=l(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=c,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";const r=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const o=r.length;return void 0===n||e.skipNull&&null===n?r:null===n?[...r,[s(t,e),"[",o,"]"].join("")]:[...r,[s(t,e),"[",s(o,e),"]=",s(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n?r:null===n?[...r,[s(t,e),"[]"].join("")]:[...r,[s(t,e),"[]=",s(n,e)].join("")];case"comma":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[s(t,e),"=",s(n,e)].join("")]:[[r,s(n,e)].join(",")];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n?r:null===n?[...r,s(t,e)]:[...r,[s(t,e),"=",s(n,e)].join("")]}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),n=Object.assign({},e);if(t.skipNull)for(const e of Object.keys(n))void 0!==n[e]&&null!==n[e]||delete n[e];const o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const o=e[n];return void 0===o?"":null===o?s(n,t):Array.isArray(o)?o.reduce(r(n),[]).join("&"):s(n,t)+"="+s(o,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>({url:u(e).split("?")[0]||"",query:f(c(e),t)})},function(e,t,r){var n=r(21),o=r(6),i=r(14),s="[object String]";e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&n(e)==s}},function(e,t,r){var n=r(36),o=r(223),i=r(224),s="[object Null]",a="[object Undefined]",u=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:u&&u in Object(e)?o(e):i(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(129);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(105);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){var n=r(163)("wks"),o=r(103),i=r(25).Symbol,s="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=n},function(e,t,r){var n=r(1),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(60),o=r(81);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(241),o=r(244);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){e.exports=r(321)},function(e,t,r){var n=r(30),o=r(160);e.exports=r(32)?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){var n=r(53),o=r(330),i=r(331),s=Object.defineProperty;t.f=r(32)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){e.exports=!r(72)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n;/*! bignumber.js v4.1.0 https://github.com/MikeMcl/bignumber.js/LICENCE */!function(o){"use strict";var i,s=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c=" not a boolean or binary digit",l="rounding mode",f="number type has more than 15 significant digits",h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",p=1e14,d=14,y=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function w(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=d-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function b(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function E(e,t,r){return(e=k(e))>=t&&e<=r}function S(e){return"[object Array]"==Object.prototype.toString.call(e)}function A(e,t,r){for(var n,o,i=[0],s=0,a=e.length;s<a;){for(o=i.length;o--;i[o]*=t);for(i[n=0]+=h.indexOf(e.charAt(s++));n<i.length;n++)i[n]>r-1&&(null==i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function O(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}function k(e){return(e=parseFloat(e))<0?a(e):u(e)}(i=function e(t){var r,n,o,i,T,P,R,C,I=0,N=Q.prototype,j=new Q(1),M=20,U=4,B=-7,L=21,D=-1e7,F=1e7,q=!0,K=$,z=!1,H=1,V=0,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};function Q(e,t){var r,o,i,a,c,l,p=this;if(!(p instanceof Q))return q&&J(26,"constructor call without new",e),new Q(e,t);if(null!=t&&K(t,2,64,I,"base")){if(l=e+"",10==(t|=0))return ee(p=new Q(e instanceof Q?e:l),M+p.e+1,U);if((a="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(r="["+h.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"").test(l))return n(p,l,a,t);a?(p.s=1/e<0?(l=l.slice(1),-1):1,q&&l.replace(/^0\.0*|\./,"").length>15&&J(I,f,e),a=!1):p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=G(l,10,t,p.s)}else{if(e instanceof Q)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(I=0);if((a="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,i=e;i>=10;i/=10,o++);return p.e=o,p.c=[e],void(I=0)}l=e+""}else{if(!s.test(l=e+""))return n(p,l,a);p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((o=l.indexOf("."))>-1&&(l=l.replace(".","")),(i=l.search(/e/i))>0?(o<0&&(o=i),o+=+l.slice(i+1),l=l.substring(0,i)):o<0&&(o=l.length),i=0;48===l.charCodeAt(i);i++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(i,c+1))if(c=l.length,a&&q&&c>15&&(e>y||e!==u(e))&&J(I,f,p.s*e),(o=o-i-1)>F)p.c=p.e=null;else if(o<D)p.c=[p.e=0];else{if(p.e=o,p.c=[],i=(o+1)%d,o<0&&(i+=d),i<c){for(i&&p.c.push(+l.slice(0,i)),c-=d;i<c;)p.c.push(+l.slice(i,i+=d));l=l.slice(i),i=d-l.length}else i-=c;for(;i--;l+="0");p.c.push(+l)}else p.c=[p.e=0];I=0}function G(e,t,n,o){var i,s,a,u,c,l,f,p=e.indexOf("."),d=M,y=U;for(n<37&&(e=e.toLowerCase()),p>=0&&(a=V,V=0,e=e.replace(".",""),c=(f=new Q(n)).pow(e.length-p),V=a,f.c=A(x(_(c.c),c.e),10,t),f.e=f.c.length),s=a=(l=A(e,n,t)).length;0==l[--a];l.pop());if(!l[0])return"0";if(p<0?--s:(c.c=l,c.e=s,c.s=o,l=(c=r(c,f,d,y,t)).c,u=c.r,s=c.e),p=l[i=s+d+1],a=t/2,u=u||i<0||null!=l[i+1],u=y<4?(null!=p||u)&&(0==y||y==(c.s<0?3:2)):p>a||p==a&&(4==y||u||6==y&&1&l[i-1]||y==(c.s<0?8:7)),i<1||!l[0])e=u?x("1",-d):"0";else{if(l.length=i,u)for(--t;++l[--i]>t;)l[i]=0,i||(++s,l=[1].concat(l));for(a=l.length;!l[--a];);for(p=0,e="";p<=a;e+=h.charAt(l[p++]));e=x(e,s)}return e}function W(e,t,r,n){var o,i,s,a,u;if(r=null!=r&&K(r,0,8,n,l)?0|r:U,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)u=_(e.c),u=19==n||24==n&&s<=B?O(u,s):x(u,s);else if(i=(e=ee(new Q(e),t,r)).e,a=(u=_(e.c)).length,19==n||24==n&&(t<=i||i<=B)){for(;a<t;u+="0",a++);u=O(u,i)}else if(t-=s,u=x(u,i),i+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-a)>0)for(i+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function Y(e,t){var r,n,o=0;for(S(e[0])&&(e=e[0]),r=new Q(e[0]);++o<e.length;){if(!(n=new Q(e[o])).s){r=n;break}t.call(r,n)&&(r=n)}return r}function $(e,t,r,n,o){return(e<t||e>r||e!=k(e))&&J(n,(o||"decimal places")+(e<t||e>r?" out of range":" not an integer"),e),!0}function Z(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*d-1)>F?e.c=e.e=null:r<D?e.c=[e.e=0]:(e.e=r,e.c=t),e}function J(e,t,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+r);throw n.name="BigNumber Error",I=0,n}function ee(e,t,r,n){var o,i,s,c,l,f,h,y=e.c,g=v;if(y){e:{for(o=1,c=y[0];c>=10;c/=10,o++);if((i=t-o)<0)i+=d,s=t,h=(l=y[f=0])/g[o-s-1]%10|0;else if((f=a((i+1)/d))>=y.length){if(!n)break e;for(;y.length<=f;y.push(0));l=h=0,o=1,s=(i%=d)-d+1}else{for(l=c=y[f],o=1;c>=10;c/=10,o++);h=(s=(i%=d)-d+o)<0?0:l/g[o-s-1]%10|0}if(n=n||t<0||null!=y[f+1]||(s<0?l:l%g[o-s-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(i>0?s>0?l/g[o-s]:0:y[f-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=g[(d-t%d)%d],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=f,c=1,f--):(y.length=f+1,c=g[d-i],y[f]=s>0?u(l/g[o-s]%g[s])*c:0),n)for(;;){if(0==f){for(i=1,s=y[0];s>=10;s/=10,i++);for(s=y[0]+=c,c=1;s>=10;s/=10,c++);i!=c&&(e.e++,y[0]==p&&(y[0]=1));break}if(y[f]+=c,y[f]!=p)break;y[f--]=0,c=1}for(i=y.length;0===y[--i];y.pop());}e.e>F?e.c=e.e=null:e.e<D&&(e.c=[e.e=0])}return e}return Q.another=e,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.EUCLID=9,Q.config=Q.set=function(){var e,t,r=0,n={},o=arguments,i=o[0],s=i&&"object"==typeof i?function(){if(i.hasOwnProperty(t))return null!=(e=i[t])}:function(){if(o.length>r)return null!=(e=o[r++])};return s(t="DECIMAL_PLACES")&&K(e,0,m,2,t)&&(M=0|e),n[t]=M,s(t="ROUNDING_MODE")&&K(e,0,8,2,t)&&(U=0|e),n[t]=U,s(t="EXPONENTIAL_AT")&&(S(e)?K(e[0],-m,0,2,t)&&K(e[1],0,m,2,t)&&(B=0|e[0],L=0|e[1]):K(e,-m,m,2,t)&&(B=-(L=0|(e<0?-e:e)))),n[t]=[B,L],s(t="RANGE")&&(S(e)?K(e[0],-m,-1,2,t)&&K(e[1],1,m,2,t)&&(D=0|e[0],F=0|e[1]):K(e,-m,m,2,t)&&(0|e?D=-(F=0|(e<0?-e:e)):q&&J(2,t+" cannot be zero",e))),n[t]=[D,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(I=0,K=(q=!!e)?$:E):q&&J(2,t+c,e)),n[t]=q,s(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?z=!0:q?J(2,"crypto unavailable",e?void 0:crypto):z=!1:z=!1:q&&J(2,t+c,e)),n[t]=z,s(t="MODULO_MODE")&&K(e,0,9,2,t)&&(H=0|e),n[t]=H,s(t="POW_PRECISION")&&K(e,0,m,2,t)&&(V=0|e),n[t]=V,s(t="FORMAT")&&("object"==typeof e?X=e:q&&J(2,t+" not an object",e)),n[t]=X,n},Q.max=function(){return Y(arguments,N.lt)},Q.min=function(){return Y(arguments,N.gt)},Q.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,s,c=0,l=[],f=new Q(j);if(e=null!=e&&K(e,0,m,14)?0|e:M,i=a(e/d),z)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(s=131072*t[c]+(t[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(l.push(s%1e14),c+=2);c=i/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=7);c<i;)(s=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(l.push(s%1e14),c+=7);c=i/7}else z=!1,q&&J(14,"crypto unavailable",crypto);if(!z)for(;c<i;)(s=o())<9e15&&(l[c++]=s%1e14);for(i=l[--c],e%=d,i&&e&&(s=v[d-e],l[c]=u(i/s)*s);0===l[c];l.pop(),c--);if(c<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=d);for(c=1,s=l[0];s>=10;s/=10,c++);c<d&&(n-=d-c)}return f.e=n,f.c=l,f}),r=function(){function e(e,t,r){var n,o,i,s,a=0,u=e.length,c=t%g,l=t/g|0;for(e=e.slice();u--;)a=((o=c*(i=e[u]%g)+(n=l*i+(s=e[u]/g|0)*c)%g*g+a)/r|0)+(n/g|0)+l*s,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,s,a){var c,l,f,h,y,v,g,m,_,b,E,S,A,O,x,k,T,P=n.s==o.s?1:-1,R=n.c,C=o.c;if(!(R&&R[0]&&C&&C[0]))return new Q(n.s&&o.s&&(R?!C||R[0]!=C[0]:C)?R&&0==R[0]||!C?0*P:P/0:NaN);for(_=(m=new Q(P)).c=[],P=i+(l=n.e-o.e)+1,a||(a=p,l=w(n.e/d)-w(o.e/d),P=P/d|0),f=0;C[f]==(R[f]||0);f++);if(C[f]>(R[f]||0)&&l--,P<0)_.push(1),h=!0;else{for(O=R.length,k=C.length,f=0,P+=2,(y=u(a/(C[0]+1)))>1&&(C=e(C,y,a),R=e(R,y,a),k=C.length,O=R.length),A=k,E=(b=R.slice(0,k)).length;E<k;b[E++]=0);T=C.slice(),T=[0].concat(T),x=C[0],C[1]>=a/2&&x++;do{if(y=0,(c=t(C,b,k,E))<0){if(S=b[0],k!=E&&(S=S*a+(b[1]||0)),(y=u(S/x))>1)for(y>=a&&(y=a-1),g=(v=e(C,y,a)).length,E=b.length;1==t(v,b,g,E);)y--,r(v,k<g?T:C,g,a),g=v.length,c=1;else 0==y&&(c=y=1),g=(v=C.slice()).length;if(g<E&&(v=[0].concat(v)),r(b,v,E,a),E=b.length,-1==c)for(;t(C,b,k,E)<1;)y++,r(b,k<E?T:C,E,a),E=b.length}else 0===c&&(y++,b=[0]);_[f++]=y,b[0]?b[E++]=R[A]||0:(b=[R[A]],E=1)}while((A++<O||null!=b[0])&&P--);h=null!=b[0],_[0]||_.splice(0,1)}if(a==p){for(f=1,P=_[0];P>=10;P/=10,f++);ee(m,i+(m.e=f+l*d-1)+1,s,h)}else m.e=l,m.r=+h;return m}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,s=r?t:t.replace(C,"");if(R.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,s=s.replace(T,"$1").replace(P,"0.$1")),t!=s))return new Q(s,o);q&&J(I,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,I=0},N.absoluteValue=N.abs=function(){var e=new Q(this);return e.s<0&&(e.s=1),e},N.ceil=function(){return ee(new Q(this),this.e+1,2)},N.comparedTo=N.cmp=function(e,t){return I=1,b(this,new Q(e,t))},N.decimalPlaces=N.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-w(this.e/d))*d,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},N.dividedBy=N.div=function(e,t){return I=3,r(this,new Q(e,t),M,U)},N.dividedToIntegerBy=N.divToInt=function(e,t){return I=4,r(this,new Q(e,t),0,1)},N.equals=N.eq=function(e,t){return I=5,0===b(this,new Q(e,t))},N.floor=function(){return ee(new Q(this),this.e+1,3)},N.greaterThan=N.gt=function(e,t){return I=6,b(this,new Q(e,t))>0},N.greaterThanOrEqualTo=N.gte=function(e,t){return I=7,1===(t=b(this,new Q(e,t)))||0===t},N.isFinite=function(){return!!this.c},N.isInteger=N.isInt=function(){return!!this.c&&w(this.e/d)>this.c.length-2},N.isNaN=function(){return!this.s},N.isNegative=N.isNeg=function(){return this.s<0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.lessThan=N.lt=function(e,t){return I=8,b(this,new Q(e,t))<0},N.lessThanOrEqualTo=N.lte=function(e,t){return I=9,-1===(t=b(this,new Q(e,t)))||0===t},N.minus=N.sub=function(e,t){var r,n,o,i,s=this,a=s.s;if(I=10,t=(e=new Q(e,t)).s,!a||!t)return new Q(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/d,c=e.e/d,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new Q(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new Q(l[0]?s:3==U?-0:0)}if(u=w(u),c=w(c),l=l.slice(),a=u-c){for((i=a<0)?(a=-a,o=l):(c=u,o=f),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=p-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=p}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?Z(e,l,c):(e.s=3==U?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var n,o,i=this;return I=11,e=new Q(e,t),!i.c||!e.s||e.c&&!e.c[0]?new Q(NaN):!e.c||i.c&&!i.c[0]?new Q(i):(9==H?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,H),i.minus(n.times(e)))},N.negated=N.neg=function(){var e=new Q(this);return e.s=-e.s||null,e},N.plus=N.add=function(e,t){var r,n=this,o=n.s;if(I=12,t=(e=new Q(e,t)).s,!o||!t)return new Q(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/d,s=e.e/d,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new Q(o/0);if(!a[0]||!u[0])return u[0]?e:new Q(a[0]?n:0*o)}if(i=w(i),s=w(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/p|0,a[t]=p===a[t]?0:a[t]%p;return o&&(a=[o].concat(a),++s),Z(e,a,s)},N.precision=N.sd=function(e){var t,r,n=this,o=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(q&&J(13,"argument"+c,e),e!=!!e&&(e=null)),!o)return null;if(t=(r=o.length-1)*d+1,r=o[r]){for(;r%10==0;r/=10,t--);for(r=o[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},N.round=function(e,t){var r=new Q(this);return(null==e||K(e,0,m,15))&&ee(r,~~e+this.e+1,null!=t&&K(t,0,8,15,l)?0|t:U),r},N.shift=function(e){var t=this;return K(e,-y,y,16,"argument")?t.times("1e"+k(e)):new Q(t.c&&t.c[0]&&(e<-y||e>y)?t.s*(e<0?0:1/0):t)},N.squareRoot=N.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,u=s.s,c=s.e,l=M+4,f=new Q("0.5");if(1!==u||!a||!a[0])return new Q(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=_(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=w((c+1)/2)-(c<0||c%2),n=new Q(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new Q(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),_(i.c).slice(0,u)===(t=_(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(ee(n,n.e+M+2,1),e=!n.times(n).eq(s));break}if(!o&&(ee(i,i.e+M+2,0),i.times(i).eq(s))){n=i;break}l+=4,u+=4,o=1}return ee(n,n.e+M+1,U,e)},N.times=N.mul=function(e,t){var r,n,o,i,s,a,u,c,l,f,h,y,v,m,_,b=this,E=b.c,S=(I=17,e=new Q(e,t)).c;if(!(E&&S&&E[0]&&S[0]))return!b.s||!e.s||E&&!E[0]&&!S||S&&!S[0]&&!E?e.c=e.e=e.s=null:(e.s*=b.s,E&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=w(b.e/d)+w(e.e/d),e.s*=b.s,(u=E.length)<(f=S.length)&&(v=E,E=S,S=v,o=u,u=f,f=o),o=u+f,v=[];o--;v.push(0));for(m=p,_=g,o=f;--o>=0;){for(r=0,h=S[o]%_,y=S[o]/_|0,i=o+(s=u);i>o;)r=((c=h*(c=E[--s]%_)+(a=y*c+(l=E[s]/_|0)*h)%_*_+v[i]+r)/m|0)+(a/_|0)+y*l,v[i--]=c%m;v[i]=r}return r?++n:v.splice(0,1),Z(e,v,n)},N.toDigits=function(e,t){var r=new Q(this);return e=null!=e&&K(e,1,m,18,"precision")?0|e:null,t=null!=t&&K(t,0,8,18,l)?0|t:U,e?ee(r,e,t):r},N.toExponential=function(e,t){return W(this,null!=e&&K(e,0,m,19)?1+~~e:null,t,19)},N.toFixed=function(e,t){return W(this,null!=e&&K(e,0,m,20)?~~e+this.e+1:null,t,20)},N.toFormat=function(e,t){var r=W(this,null!=e&&K(e,0,m,21)?~~e+this.e+1:null,t,21);if(this.c){var n,o=r.split("."),i=+X.groupSize,s=+X.secondaryGroupSize,a=X.groupSeparator,u=o[0],c=o[1],l=this.s<0,f=l?u.slice(1):u,h=f.length;if(s&&(n=i,i=s,s=n,h-=n),i>0&&h>0){for(n=h%i||i,u=f.substr(0,n);n<h;n+=i)u+=a+f.substr(n,i);s>0&&(u+=a+f.slice(n)),l&&(u="-"+u)}r=c?u+X.decimalSeparator+((s=+X.fractionGroupSize)?c.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):c):u}return r},N.toFraction=function(e){var t,n,o,i,s,a,u,c,l,f=q,h=this,p=h.c,y=new Q(j),g=n=new Q(j),m=u=new Q(j);if(null!=e&&(q=!1,a=new Q(e),q=f,(f=a.isInt())&&!a.lt(j)||(q&&J(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&a.c&&ee(a,a.e+1,1).gte(j)?a:null)),!p)return h.toString();for(l=_(p),i=y.e=l.length-h.e-1,y.c[0]=v[(s=i%d)<0?d+s:s],e=!e||a.cmp(y)>0?i>0?y:g:a,s=F,F=1/0,a=new Q(l),u.c[0]=0;c=r(a,y,0,1),1!=(o=n.plus(c.times(m))).cmp(e);)n=m,m=o,g=u.plus(c.times(o=g)),u=o,y=a.minus(c.times(o=y)),a=o;return o=r(e.minus(n),m,0,1),u=u.plus(o.times(g)),n=n.plus(o.times(m)),u.s=g.s=h.s,t=r(g,m,i*=2,U).minus(h).abs().cmp(r(u,n,i,U).minus(h).abs())<1?[g.toString(),m.toString()]:[u.toString(),n.toString()],F=s,t},N.toNumber=function(){return+this},N.toPower=N.pow=function(e,t){var r,n,o,i=u(e<0?-e:+e),s=this;if(null!=t&&(I=23,t=new Q(t)),!K(e,-y,y,23,"exponent")&&(!isFinite(e)||i>y&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new Q(t?r%t:r);for(t?e>1&&s.gt(j)&&s.isInt()&&t.gt(j)&&t.isInt()?s=s.mod(t):(o=t,t=null):V&&(r=a(V/d+2)),n=new Q(j);;){if(i%2){if(!(n=n.times(s)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(i=u(i/2)))break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):t&&(s=s.mod(t))}return t?n:(e<0&&(n=j.div(n)),o?n.mod(o):r?ee(n,V,U):n)},N.toPrecision=function(e,t){return W(this,null!=e&&K(e,1,m,24,"precision")?0|e:null,t,24)},N.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=_(r.c),t=null!=e&&K(e,2,64,25,"base")?G(x(t,o),0|e,10,n):o<=B||o>=L?O(t,o):x(t,o),n<0&&r.c[0]&&(t="-"+t)),t},N.truncated=N.trunc=function(){return ee(new Q(this),this.e+1,1)},N.valueOf=N.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=_(t.c),e=r<=B||r>=L?O(e,r):x(e,r),t.s<0?"-"+e:e)},N.isBigNumber=!0,null!=t&&Q.config(t),Q}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r)||this).__proto__=i,o.constructor=t,o.response=n,o}return n.__extends(t,e),t.prototype.getResponse=function(){return this.response},t}(Error);t.NetworkError=o;var i=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="NotFoundError",o}return n.__extends(t,e),t}(o);t.NotFoundError=i;var s=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="BadRequestError",o}return n.__extends(t,e),t}(o);t.BadRequestError=s;var a=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="BadResponseError",o}return n.__extends(t,e),t}(o);t.BadResponseError=a;var u=function(e){function t(r){var n=this,o=this.constructor.prototype;return(n=e.call(this,r)||this).__proto__=o,n.constructor=t,n.name="InvalidSep10ChallengeError",n}return n.__extends(t,e),t}(Error);t.InvalidSep10ChallengeError=u},function(e,t,r){var n=r(118),o=r(227),i=r(26);e.exports=function(e){return i(e)?n(e,!0):o(e)}},function(e,t,r){var n=r(13).Symbol;e.exports=n},function(e,t,r){var n=r(24).Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,s=this._len,a=0;a<i;){for(var u=s%o,c=Math.min(i-a,o-u),l=0;l<c;l++)r[u+l]=e[a+l];a+=c,(s+=c)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Int=void 0;var n=i(r(49)),o=i(r(7));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=s.MIN_VALUE&&e<=s.MAX_VALUE))}};s.MAX_VALUE=Math.pow(2,31)-1,s.MIN_VALUE=-Math.pow(2,31),(0,o.default)(s)},function(e,t,r){var n=r(130),o=r(84);e.exports=function(e,t,r,i){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var c=t[a],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),s?o(r,c,l):n(r,c,l)}return r}},function(e,t,r){var n=r(118),o=r(136),i=r(26);e.exports=function(e){return i(e)?n(e):o(e)}},function(e,t,r){var n,o,i;
/*!
* URI.js - Mutating URLs
*
* Version: 1.19.2
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(s,a){"use strict";e.exports?e.exports=a(r(189),r(190),r(191)):(o=[r(189),r(190),r(191)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.2";var s=i.prototype,a=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function f(e,t){var r,n,o={};if("RegExp"===c(t))o=null;else if(l(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--)}return e}function h(e,t){var r,n;if(l(t)){for(r=0,n=t.length;r<n;r++)if(!h(e,t[r]))return!1;return!0}var o=c(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function p(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function d(e){return e.replace(/^\/+|\/+$/g,"")}function y(e){return escape(e)}function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=v,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=v,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var g,m={encode:"encode",decode:"decode"},w=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch(e){return r}}};for(g in m)i[g+"PathSegment"]=w("pathname",m[g]),i[g+"UrnPathSegment"]=w("urnpath",m[g]);var _=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var s=(n+"").split(e),a=0,u=s.length;a<u;a++)s[a]=o(s[a]);return s.join(e)}};function b(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function E(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}i.decodePath=_("/","decodePathSegment"),i.decodeUrnPath=_(":","decodeUrnPathSegment"),i.recodePath=_("/","encodePathSegment","decode"),i.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),i.encodeReserved=w("reserved","encode"),i.parse=function(e,t){var r;return t||(t={preventInvalidHostname:i.preventInvalidHostname}),(r=e.indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3)?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),u=e.indexOf(":",s+1);-1!==u&&(-1===a||u<a)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(o)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var r,n=e.indexOf("/"),o=e.lastIndexOf("@",n>-1?n:e.length-1);return o>-1&&(-1===n||o<n)?(r=e.substring(0,o).split(":"),t.username=r[0]?i.decode(r[0]):null,r.shift(),t.password=r[0]?i.decode(r.join(":")):null,e=e.substring(o+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,s={},u=e.split("&"),c=u.length,l=0;l<c;l++)r=u[l].split("="),n=i.decodeQuery(r.shift(),t),o=r.length?i.decodeQuery(r.join("="),t):null,a.call(s,n)?("string"!=typeof s[n]&&null!==s[n]||(s[n]=[s[n]]),s[n].push(o)):s[n]=o;return s},i.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,r){var n,o,s,u,c="";for(o in e)if(a.call(e,o))if(l(e[o]))for(n={},s=0,u=e[o].length;s<u;s++)void 0!==e[o][s]&&void 0===n[e[o][s]+""]&&(c+="&"+i.buildQueryParameter(o,e[o][s],r),!0!==t&&(n[e[o][s]+""]=!0));else void 0!==e[o]&&(c+="&"+i.buildQueryParameter(o,e[o],r));return c.substring(1)},i.buildQueryParameter=function(e,t,r){return i.encodeQuery(e,r)+(null!==t?"="+i.encodeQuery(t,r):"")},i.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)a.call(t,n)&&i.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),l(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},i.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)a.call(t,n)&&i.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},i.removeQuery=function(e,t,r){var n,o,s;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===c(t))for(s in e)t.test(s)&&(e[s]=void 0);else if("object"==typeof t)for(s in t)a.call(t,s)&&i.removeQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===c(r)?!l(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||l(r)&&1!==r.length?l(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},i.hasQuery=function(e,t,r,n){switch(c(t)){case"String":break;case"RegExp":for(var o in e)if(a.call(e,o)&&t.test(o)&&(void 0===r||i.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var s in t)if(a.call(t,s)&&!i.hasQuery(e,s,t[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(l(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!l(e[t])&&(n?h:p)(e[t],r);case"RegExp":return l(e[t])?!!n&&h(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return l(e[t])?!!n&&h(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);e.push(o);for(var s=o.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&t.push(s[a]),s[a]&&r++}if(!t.length||!r)return new i("");var u=new i("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},i.withinString=function(e,t,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,s=r.trim||i.findUri.trim,a=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(e);if(!c)break;var l=c.index;if(r.ignoreHtml){var f=e.slice(Math.max(l-3,0),l);if(f&&u.test(f))continue}for(var h=l+e.slice(l).search(o),p=e.slice(l,h),d=-1;;){var y=a.exec(p);if(!y)break;var v=y.index+y[0].length;d=Math.max(d,v)}if(!((p=d>-1?p.slice(0,d)+p.slice(d).replace(s,""):p.replace(s,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var g=t(p,l,h=l+p.length,e);void 0!==g?(g=String(g),e=e.slice(0,l)+g+e.slice(h),n.lastIndex=l+g.length):n.lastIndex=h}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=h(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new i(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=b("protocol"),s.username=b("username"),s.password=b("password"),s.hostname=b("hostname"),s.port=b("port"),s.query=E("query","?"),s.fragment=E("fragment","#"),s.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var s=n?e._parts:e;for(r in s)"query"!==r&&a.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,n=!1,o=!1,s=!1,a=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),a=(s=!(t=n||o))&&r&&r.has(this._parts.hostname),u=s&&i.idn_expression.test(this._parts.hostname),c=s&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var S=s.protocol,A=s.port,O=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return S.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),A.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return O.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),s=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+u(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(r=o.substring(s+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var a,c=this.suffix();if(c)a=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return a&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),s=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(l(t)){s=[];for(var a=0,u=t.length;a<u;a++)(t[a].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(d(t[a])))}else(t||"string"==typeof t)&&(t=d(t),""===s[s.length-1]?s[s.length-1]=t:s.push(t));else t?s[e]=d(t):s.splice(e,1);return i&&s.unshift(""),this.path(s.join(n),r)},s.segmentCoded=function(e,t,r){var n,o,s;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(l(n=this.segment(e,t,r)))for(o=0,s=n.length;o<s;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(l(t))for(o=0,s=t.length;o<s;o++)t[o]=i.encode(t[o]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,r)};var x=s.query;return s.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):x.call(this,e,t)},s.setQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)a.call(e,o)&&(n[o]=e[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},s.addQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,e,void 0===t?null:t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},s.removeQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,e,t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},s.hasQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,e,t,r)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},s.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},s.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},s.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,s="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(s=r.substring(1).match(/^(\.\.\/)+/)||"")&&(s=s[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=s+r.substring(1)),this._parts.path=r,this.build(!e),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},s.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},s.unicode=function(){var e=i.encode,t=i.decode;i.encode=v,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},s.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,s=t._parts.query.split("&"),a=s.length;o<a;o++){var u=(s[o]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(t.hash(),!0)},s.absoluteTo=function(e){var t,r,n,o=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=s[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},s.relativeTo=function(e){var t,r,n,o,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=a._parts,r=e._parts,o=a.path(),s=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==r.hostname||t.port!==r.port)return a.build();if(t.hostname=null,t.port=null,o===s)return t.path="",a.build();if(!(n=i.commonPath(o,s)))return a.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(n.length)||"./",a.build()},s.equals=function(e){var t,r,n,o,s,u=this.clone(),c=new i(e),f={};if(u.normalize(),c.normalize(),u.toString()===c.toString())return!0;if(n=u.query(),o=c.query(),u.query(""),c.query(""),u.toString()!==c.toString())return!1;if(n.length!==o.length)return!1;for(s in t=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),t)if(a.call(t,s)){if(l(t[s])){if(!p(t[s],r[s]))return!1}else if(t[s]!==r[s])return!1;f[s]=!0}for(s in r)if(a.call(r,s)&&!f[s])return!1;return!0},s.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},s.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},s.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i}))},function(e,t,r){"use strict";var n=r(76),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=r(56);i.inherits=r(10);var s=r(204),a=r(207);i.inherits(f,s);for(var u=o(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(e){e.end()}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(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){(function(t){!function(t,r){"use strict";e.exports?e.exports=r():t.nacl?t.nacl.util=r():(t.nacl={},t.nacl.util=r())}(this,(function(){"use strict";var e={};function r(e){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t<r.length;t++)n[t]=r.charCodeAt(t);return n},e.encodeUTF8=function(e){var t,r=[];for(t=0;t<e.length;t++)r.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(r.join("")))},"undefined"==typeof atob?void 0!==t.from?(e.encodeBase64=function(e){return t.from(e).toString("base64")},e.decodeBase64=function(e){return r(e),new Uint8Array(Array.prototype.slice.call(t.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new t(e).toString("base64")},e.decodeBase64=function(e){return r(e),new Uint8Array(Array.prototype.slice.call(new t(e,"base64"),0))}):(e.encodeBase64=function(e){var t,r=[],n=e.length;for(t=0;t<n;t++)r.push(String.fromCharCode(e[t]));return btoa(r.join(""))},e.decodeBase64=function(e){r(e);var t,n=atob(e),o=new Uint8Array(n.length);for(t=0;t<n.length;t++)o[t]=n.charCodeAt(t);return o}),e}))}).call(this,r(1).Buffer)},function(e,t,r){var n=r(222),o=r(14),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},function(e,t,r){(function(e){var n=r(13),o=r(225),i=t&&!t.nodeType&&t,s=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===i?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||o;e.exports=u}).call(this,r(46)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StrKey=t.Networks=t.Network=t.Account=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=t.Operation=t.Asset=t.BASE_FEE=t.TimeoutInfinite=t.TransactionBuilder=t.Transaction=t.Hyper=t.UnsignedHyper=t.Keypair=t.FastSigning=t.verify=t.sign=t.hash=t.xdr=void 0;var n=r(48);Object.defineProperty(t,"hash",{enumerable:!0,get:function(){return n.hash}});var o=r(125);Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(t,"FastSigning",{enumerable:!0,get:function(){return o.FastSigning}});var i=r(15);Object.defineProperty(t,"Keypair",{enumerable:!0,get:function(){return i.Keypair}});var s=r(22);Object.defineProperty(t,"UnsignedHyper",{enumerable:!0,get:function(){return s.UnsignedHyper}}),Object.defineProperty(t,"Hyper",{enumerable:!0,get:function(){return s.Hyper}});var a=r(173);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return a.Transaction}});var u=r(407);Object.defineProperty(t,"TransactionBuilder",{enumerable:!0,get:function(){return u.TransactionBuilder}}),Object.defineProperty(t,"TimeoutInfinite",{enumerable:!0,get:function(){return u.TimeoutInfinite}}),Object.defineProperty(t,"BASE_FEE",{enumerable:!0,get:function(){return u.BASE_FEE}});var c=r(178);Object.defineProperty(t,"Asset",{enumerable:!0,get:function(){return c.Asset}});var l=r(174);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return l.Operation}}),Object.defineProperty(t,"AuthRequiredFlag",{enumerable:!0,get:function(){return l.AuthRequiredFlag}}),Object.defineProperty(t,"AuthRevocableFlag",{enumerable:!0,get:function(){return l.AuthRevocableFlag}}),Object.defineProperty(t,"AuthImmutableFlag",{enumerable:!0,get:function(){return l.AuthImmutableFlag}});var f=r(109);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var h=r(408);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return h.Account}});var p=r(61);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return p.Network}}),Object.defineProperty(t,"Networks",{enumerable:!0,get:function(){return p.Networks}});var d=r(11);Object.defineProperty(t,"StrKey",{enumerable:!0,get:function(){return d.StrKey}});var y,v=r(2),g=(y=v)&&y.__esModule?y:{default:y};t.xdr=g.default,t.default=e.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash=function(e){var t=new n.sha256;return t.update(e,"utf8"),t.digest()};var n=r(121)},function(e,t,r){var n=r(21),o=r(14),i="[object Number]";e.exports=function(e){return"number"==typeof e||o(e)&&n(e)==i}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(296),o=r(87),i=r(297),s=r(298),a=r(299),u=r(21),c=r(132),l=c(n),f=c(o),h=c(i),p=c(s),d=c(a),y=u;(n&&"[object DataView]"!=y(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||s&&"[object Set]"!=y(new s)||a&&"[object WeakMap]"!=y(new a))&&(y=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return t}),e.exports=y},function(e,t){var r=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(31);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports={}},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(1).Buffer)},function(e,t){e.exports=function(e){return e}},function(e,t,r){var n=r(226),o=r(82),i=r(83),s=i&&i.isTypedArray,a=s?o(s):n;e.exports=a},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(21),o=r(17),i="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";e.exports=function(e){if(!o(e))return!1;var t=n(e);return t==s||t==a||t==i||t==u}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=t.Networks=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(48);var i=t.Networks={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015"},s=null;t.Network=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._networkPassphrase=t}return n(e,[{key:"networkPassphrase",value:function(){return this._networkPassphrase}},{key:"networkId",value:function(){return(0,o.hash)(this.networkPassphrase())}}],[{key:"usePublicNetwork",value:function(){this.use(new e(i.PUBLIC))}},{key:"useTestNetwork",value:function(){this.use(new e(i.TESTNET))}},{key:"use",value:function(e){console.warn("Global class `Network` is deprecated. Please pass explicit argument instead, e.g. `new Transaction(envelope, Networks.PUBLIC)` (see https://git.io/fj9fG for more info)."),s=e}},{key:"current",value:function(){return s}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePadding=function(e){switch(e%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}},t.slicePadding=function(e,t){var r=e.slice(t);if(!0!==(0,i.default)(r.buffer(),(function(e){return 0===e})))throw new Error("XDR Read Error: invalid padding")};var n,o=r(85),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){var n=r(64),o=r(268),i=r(269),s=r(270),a=r(271),u=r(272);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},function(e,t,r){var n=r(263),o=r(264),i=r(265),s=r(266),a=r(267);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,r){var n=r(50);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},function(e,t,r){var n=r(27)(Object,"create");e.exports=n},function(e,t,r){var n=r(281);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},function(e,t,r){var n=r(21),o=r(14),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&n(e)==i}},function(e,t,r){var n=r(68),o=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedInt=void 0;var n=i(r(49)),o=i(r(7));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=s.MIN_VALUE&&e<=s.MAX_VALUE))}};s.MAX_VALUE=Math.pow(2,32)-1,s.MIN_VALUE=0,(0,o.default)(s)},function(e,t,r){var n=r(329);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(372),o=4;e.exports=function(e){return n(e,o)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0).__importDefault(r(73)),o={allowHttp:!1,timeout:0},i=n.default(o),s=function(){function e(){}return e.setAllowHttp=function(e){i.allowHttp=e},e.setTimeout=function(e){i.timeout=e},e.isAllowHttp=function(){return i.allowHttp},e.getTimeout=function(){return i.timeout},e.setDefault=function(){i=Object.assign({},o)},e}();t.Config=s},function(e,t,r){"use strict";var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var o,i,s,a;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,e))}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=f.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):y(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.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},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=y(u,c);for(r=0;r<c;++r)i(l[r],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,o,i,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,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[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,o)}));default:for(i=new Array(a-1),s=0;s<i.length;)i[s++]=arguments[s];return t.nextTick((function(){e.apply(null,i)}))}}}:e.exports=t}).call(this,r(16))},function(e){e.exports=JSON.parse('{"_from":"stellar-sdk@^3.3.0","_id":"stellar-sdk@3.3.0","_inBundle":false,"_integrity":"sha512-RCVjuI+SfAhExUOpKbn4i7aNvydRZaIQve25wYr5YTWIiL9ULsEY7puG92CNA7u7PLwo94lLwaHeRwRuMSVtSw==","_location":"/stellar-sdk","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"stellar-sdk@^3.3.0","name":"stellar-sdk","escapedName":"stellar-sdk","rawSpec":"^3.3.0","saveSpec":null,"fetchSpec":"^3.3.0"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/stellar-sdk/-/stellar-sdk-3.3.0.tgz","_shasum":"829fcf9be82dddfc153c35b066fe09c8d93ddea3","_spec":"stellar-sdk@^3.3.0","_where":"/Users/tylervanderhoeven/Desktop/webpack-boilerplate","author":{"name":"Stellar Development Foundation","email":"hello@stellar.org"},"bugs":{"url":"https://github.com/stellar/js-stellar-sdk/issues"},"bundleDependencies":false,"dependencies":{"@types/eventsource":"^1.1.2","@types/node":">= 8","@types/randombytes":"^2.0.0","@types/urijs":"^1.19.2","axios":"^0.19.0","bignumber.js":"^4.0.0","detect-node":"^2.0.4","es6-promise":"^4.2.4","eventsource":"^1.0.7","lodash":"^4.17.11","randombytes":"^2.1.0","stellar-base":"^2.1.2","toml":"^2.3.0","tslib":"^1.10.0","urijs":"^1.19.1","utility-types":"^3.7.0"},"deprecated":false,"description":"stellar-sdk is a library for working with the Stellar Horizon server.","devDependencies":{"@kollavarsham/gulp-coveralls":"0.2.8","@stellar/prettier-config":"^1.0.1","@stellar/tsconfig":"^1.0.1","@stellar/tslint-config":"^1.0.3","@types/detect-node":"^2.0.0","@types/lodash":"^4.14.130","axios-mock-adapter":"^1.16.0","babel-cli":"^6.26.0","babel-core":"~6.26.3","babel-eslint":"^10.0.1","babel-istanbul":"^0.12.2","babel-loader":"^7.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-preset-es2015":"^6.24.1","babel-register":"^6.26.0","body-parser":"^1.12.2","chai":"^2.2.0","chai-as-promised":"^5.2.0","clear":"^0.1.0","coveralls":"3.0.2","del":"^5.1.0","dtslint":"^0.6.0","eslint":"^5.12.1","eslint-config-airbnb-base":"^13.1.0","eslint-config-prettier":"^3.6.0","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prefer-import":"^0.0.1","eslint-plugin-prettier":"^3.0.1","ghooks":"^0.3.0","gulp":"4.0.0","gulp-babel":"^6.1.3","gulp-eslint":"^5.0.0","gulp-insert":"^0.5.0","gulp-istanbul":"^1.1.3","gulp-load-plugins":"1.5.0","gulp-mocha":"6.0.0","gulp-plumber":"^1.0.0","gulp-rename":"~1.2.0","gulp-tslint":"^8.1.4","husky":"^1.3.1","isparta":"^4.1.1","istanbul":"^0.4.5","jsdoc":"3.5.5","json-loader":"^0.5.1","karma":"4.3.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chrome-launcher":"^3.1.0","karma-commonjs":"^1.0.0","karma-firefox-launcher":"^1.2.0","karma-mocha":"1.3.0","karma-phantomjs-launcher":"^1.0.4","karma-sauce-launcher":"2.0.2","karma-sinon":"^1.0.4","karma-sinon-chai":"2.0.2","karma-webpack":"3.0.5","lint-staged":"7.3.0","minami":"^1.1.1","mocha":"5.2.0","prettier":"^1.17.1","sinon":"^1.14.1","sinon-chai":"^2.7.0","terser-webpack-plugin":"^1.3.0","ts-loader":"^5.0.0","tslint":"^5.16.0","typescript":"^3.4.5","webpack":"^4.33.0","webpack-cli":"^3.3.3","webpack-stream":"^5.2.1"},"engines":{"node":">=10.16.3"},"homepage":"https://github.com/stellar/js-stellar-sdk","husky":{"hooks":{"pre-commit":"lint-staged"}},"keywords":["stellar"],"license":"Apache-2.0","lint-staged":{"lib/*.{js,json}":["prettier --write","git add"],"lib/*.js":["eslint --fix --max-warnings 0","git add"],"**/*.ts":["prettier --write","tslint --fix","git add"]},"main":"./lib/index.js","name":"stellar-sdk","prettier":"@stellar/prettier-config","repository":{"type":"git","url":"git+https://github.com/stellar/js-stellar-sdk.git"},"scripts":{"build:docs":"gulp build:docs","docs":"yarn build:docs && jsdoc -c .jsdoc.json","dtslint":"dtslint test/types","postversion":"git push && git push --tags","prepare":"gulp build","prettier-all":"prettier --write **/*.{js,ts}","preversion":"gulp test","test":"babel-node ./node_modules/.bin/gulp test","version":"gulp build"},"types":"./lib/index.d.ts","version":"3.3.0"}')},function(e,t,r){var n=r(221)();e.exports=n},function(e,t,r){var n=r(57);e.exports=function(e){return"function"==typeof e?e:n}},function(e,t){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?r:t)&&("number"==o||"symbol"!=o&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){var r=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(120),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===o&&n.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,r(46)(e))},function(e,t,r){var n=r(131);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},function(e,t,r){var n=r(256),o=r(257),i=r(138),s=r(6),a=r(134);e.exports=function(e,t,r){var u=s(e)?n:o;return r&&a(e,t,r)&&(t=void 0),u(e,i(t,3))}},function(e,t,r){var n=r(258),o=r(260)(n);e.exports=o},function(e,t,r){var n=r(27)(r(13),"Map");e.exports=n},function(e,t,r){var n=r(273),o=r(280),i=r(282),s=r(283),a=r(284);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,r){var n=r(285),o=r(14);e.exports=function e(t,r,i,s,a){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,s,e,a))}},function(e,t){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},function(e,t,r){var n=r(295),o=r(143),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),n(s(e),(function(t){return i.call(e,t)})))}:o;e.exports=a},function(e,t,r){var n=r(6),o=r(68),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,r){var n=r(94);e.exports=function(e){return null==e?"":n(e)}},function(e,t,r){var n=r(36),o=r(95),i=r(6),s=r(68),a=1/0,u=n?n.prototype:void 0,c=u?u.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-a?"-0":r}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(157),o=r(158),i=r(332),s=r(29),a=r(55),u=r(333),c=r(104),l=r(340),f=r(23)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,r,d,y,v,g){u(r,t,d);var m,w,_,b=function(e){if(!h&&e in O)return O[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},E=t+" Iterator",S="values"==y,A=!1,O=e.prototype,x=O[f]||O["@@iterator"]||y&&O[y],k=x||b(y),T=y?S?b("entries"):k:void 0,P="Array"==t&&O.entries||x;if(P&&(_=l(P.call(new e)))!==Object.prototype&&_.next&&(c(_,E,!0),n||"function"==typeof _[f]||s(_,f,p)),S&&x&&"values"!==x.name&&(A=!0,k=function(){return x.call(this)}),n&&!g||!h&&!A&&O[f]||s(O,f,k),a[t]=k,a[E]=p,y)if(m={values:S?k:b("values"),keys:v?k:b("keys"),entries:T},g)for(w in m)w in O||i(O,w,m[w]);else o(o.P+o.F*(h||A),t,m);return m}},function(e,t,r){var n=r(162),o=r(97);e.exports=function(e){return n(o(e))}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(96),o=Math.min;e.exports=function(e){return e>0?o(n(e),9007199254740991):0}},function(e,t,r){var n=r(163)("keys"),o=r(103);e.exports=function(e){return n[e]||(n[e]=o(e))}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(30).f,o=r(54),i=r(23)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reference=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.config=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=new w(t);e(r),r.resolve()}return t};var o=a(r(9)),i=a(r(28)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(129));function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.Reference=function(){function e(){l(this,e)}return n(e,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),e}(),h=function(e){function t(e){l(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name=e,r}return c(t,e),n(t,[{key:"resolve",value:function(e){return e.definitions[this.name].resolve(e)}}]),t}(f),p=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l(this,t);var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.childReference=e,o.length=r,o.variable=n,o}return c(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference,r=this.length;return t instanceof f&&(t=t.resolve(e)),r instanceof f&&(r=r.resolve(e)),this.variable?new s.VarArray(t,r):new s.Array(t,r)}}]),t}(f),d=function(e){function t(e){l(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.childReference=e,r.name=e.name,r}return c(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference;return t instanceof f&&(t=t.resolve(e)),new s.Option(t)}}]),t}(f),y=function(e){function t(e,r){l(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.sizedType=e,n.length=r,n}return c(t,e),n(t,[{key:"resolve",value:function(e){var t=this.length;return t instanceof f&&(t=t.resolve(e)),new this.sizedType(t)}}]),t}(f),v=function(){function e(t,r,n){l(this,e),this.constructor=t,this.name=r,this.config=n}return n(e,[{key:"resolve",value:function(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}]),e}();function g(e,t,r){return r instanceof f&&(r=r.resolve(e)),e.results[t]=r,r}function m(e,t,r){return e.results[t]=r,r}var w=function(){function e(t){l(this,e),this._destination=t,this._definitions={}}return n(e,[{key:"enum",value:function(e,t){var r=new v(s.Enum.create,e,t);this.define(e,r)}},{key:"struct",value:function(e,t){var r=new v(s.Struct.create,e,t);this.define(e,r)}},{key:"union",value:function(e,t){var r=new v(s.Union.create,e,t);this.define(e,r)}},{key:"typedef",value:function(e,t){var r=new v(g,e,t);this.define(e,r)}},{key:"const",value:function(e,t){var r=new v(m,e,t);this.define(e,r)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(e){return new y(s.String,e)}},{key:"opaque",value:function(e){return new y(s.Opaque,e)}},{key:"varOpaque",value:function(e){return new y(s.VarOpaque,e)}},{key:"array",value:function(e,t){return new p(e,t)}},{key:"varArray",value:function(e,t){return new p(e,t,!0)}},{key:"option",value:function(e){return new d(e)}},{key:"define",value:function(e,t){if(!(0,o.default)(this._destination[e]))throw new Error("XDRTypes Error:"+e+" is already defined");this._definitions[e]=t}},{key:"lookup",value:function(e){return new h(e)}},{key:"resolve",value:function(){var e=this;(0,i.default)(this._definitions,(function(t){t.resolve({definitions:e._definitions,results:e._destination})}))}}]),e}()},function(e,t){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return r.test(e)}},function(e,t,r){var n=r(137)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(140);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Memo=t.MemoReturn=t.MemoHash=t.MemoText=t.MemoID=t.MemoNone=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(9)),i=l(r(20)),s=l(r(73)),a=r(22),u=l(r(33)),c=l(r(2));function l(e){return e&&e.__esModule?e:{default:e}}var f=t.MemoNone="none",h=t.MemoID="id",p=t.MemoText="text",d=t.MemoHash="hash",y=t.MemoReturn="return",v=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._type=r,this._value=n,this._type){case f:break;case h:t._validateIdValue(n);break;case p:t._validateTextValue(n);break;case d:case y:t._validateHashValue(n),(0,i.default)(n)&&(this._value=e.from(n,"hex"));break;default:throw new Error("Invalid memo type")}}return n(t,[{key:"toXDRObject",value:function(){switch(this._type){case f:return c.default.Memo.memoNone();case h:return c.default.Memo.memoId(a.UnsignedHyper.fromString(this._value));case p:return c.default.Memo.memoText(this._value);case d:return c.default.Memo.memoHash(this._value);case y:return c.default.Memo.memoReturn(this._value);default:return null}}},{key:"type",get:function(){return(0,s.default)(this._type)},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case f:return null;case h:case p:return(0,s.default)(this._value);case d:case y:return e.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}}],[{key:"_validateIdValue",value:function(e){var t=new Error("Expects a int64 as a string. Got "+e);if(!(0,i.default)(e))throw t;var r=void 0;try{r=new u.default(e)}catch(e){throw t}if(!r.isFinite())throw t;if(r.isNaN())throw t}},{key:"_validateTextValue",value:function(e){if(!c.default.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(t){var r=new Error("Expects a 32 byte hash value or hex encoded string. Got "+t);if(null===t||(0,o.default)(t))throw r;var n=void 0;if((0,i.default)(t)){if(!/^[0-9A-Fa-f]{64}$/g.test(t))throw r;n=e.from(t,"hex")}else{if(!e.isBuffer(t))throw r;n=e.from(t)}if(!n.length||32!==n.length)throw r}},{key:"none",value:function(){return new t(f)}},{key:"text",value:function(e){return new t(p,e)}},{key:"id",value:function(e){return new t(h,e)}},{key:"hash",value:function(e){return new t(d,e)}},{key:"return",value:function(e){return new t(y,e)}},{key:"fromXDRObject",value:function(e){switch(e.arm()){case"id":return t.id(e.value().toString());case"text":return t.text(e.value());case"hash":return t.hash(e.value());case"retHash":return t.return(e.value())}if(void 0===e.value())return t.none();throw new Error("Unknown type")}}]),t}();t.Memo=v}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=n.__importDefault(r(111)),i=n.__importDefault(r(41)),s=r(77).version;t.SERVER_TIME_MAP={};var a=o.default.create({headers:{"X-Client-Name":"js-stellar-sdk","X-Client-Version":s}});function u(e){return Math.floor(e/1e3)}a.interceptors.response.use((function(e){var r=i.default(e.config.url).hostname(),n=u(Date.parse(e.headers.Date)),o=u((new Date).getTime());return isNaN(n)||(t.SERVER_TIME_MAP[r]={serverTime:n,localTimeRecorded:o}),e})),t.default=a,t.getCurrentServerTime=function(e){var r=t.SERVER_TIME_MAP[e];if(!r||!r.localTimeRecorded||!r.serverTime)return null;var n=r.serverTime,o=r.localTimeRecorded,i=u((new Date).getTime());return i-o>300?null:i-o+n}},function(e,t,r){e.exports=r(420)},function(e,t,r){"use strict";var n=r(441),o=r(442);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=w,t.resolve=function(e,t){return w(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?w(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=w(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(443);function w(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var w=e=c.join(a);if(w=w.trim(),!r&&1===e.split("#").length){var _=u.exec(w);if(_)return this.path=w,this.href=w,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var b=s.exec(w);if(b){var E=(b=b[0]).toLowerCase();this.protocol=E,w=w.substr(b.length)}if(r||b||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===w.substr(0,2);!S||b&&v[b]||(w=w.substr(2),this.slashes=!0)}if(!v[b]&&(S||b&&!g[b])){for(var A,O,x=-1,k=0;k<h.length;k++){-1!==(T=w.indexOf(h[k]))&&(-1===x||T<x)&&(x=T)}-1!==(O=-1===x?w.lastIndexOf("@"):w.lastIndexOf("@",x))&&(A=w.slice(0,O),w=w.slice(O+1),this.auth=decodeURIComponent(A)),x=-1;for(k=0;k<f.length;k++){var T;-1!==(T=w.indexOf(f[k]))&&(-1===x||T<x)&&(x=T)}-1===x&&(x=w.length),this.host=w.slice(0,x),w=w.slice(x),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var R=this.hostname.split(/\./),C=(k=0,R.length);k<C;k++){var I=R[k];if(I&&!I.match(p)){for(var N="",j=0,M=I.length;j<M;j++)I.charCodeAt(j)>127?N+="x":N+=I[j];if(!N.match(p)){var U=R.slice(0,k),B=R.slice(k+1),L=I.match(d);L&&(U.push(L[1]),B.unshift(L[2])),B.length&&(w="/"+B.join(".")+w),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!y[E])for(k=0,C=l.length;k<C;k++){var q=l[k];if(-1!==w.indexOf(q)){var K=encodeURIComponent(q);K===q&&(K=escape(q)),w=w.split(q).join(K)}}var z=w.indexOf("#");-1!==z&&(this.hash=w.substr(z),w=w.slice(0,z));var H=w.indexOf("?");if(-1!==H?(this.search=w.substr(H),this.query=w.substr(H+1),t&&(this.query=m.parse(this.query)),w=w.slice(0,H)):t&&(this.search="",this.query={}),w&&(this.pathname=w),g[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var V=this.search||"";this.path=D+V}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,s="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(w(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var p=f[h];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||v[e.protocol])r.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var y=r.pathname||"",m=r.search||"";r.path=y+m}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var w=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=_||w||r.host&&e.pathname,E=b,S=r.pathname&&r.pathname.split("/")||[],A=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===S[0]?S[0]=r.host:S.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),b=b&&(""===d[0]||""===S[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,S=d;else if(d.length)S||(S=[]),S.pop(),S=S.concat(d),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(A)r.hostname=r.host=S.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var O=S.slice(-1)[0],x=(r.host||e.host||S.length>1)&&("."===O||".."===O)||""===O,k=0,T=S.length;T>=0;T--)"."===(O=S[T])?S.splice(T,1):".."===O?(S.splice(T,1),k++):k&&(S.splice(T,1),k--);if(!b&&!E)for(;k--;k)S.unshift("..");!b||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),x&&"/"!==S.join("/").substr(-1)&&S.push("");var P,R=""===S[0]||S[0]&&"/"===S[0].charAt(0);A&&(r.hostname=r.host=R?"":S.length?S.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(b=b||r.host&&S.length)&&!R&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n=r(1),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){var n=r(17),o=r(479),i=r(154),s="Expected a function",a=Math.max,u=Math.min;e.exports=function(e,t,r){var c,l,f,h,p,d,y=0,v=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError(s);function w(t){var r=c,n=l;return c=l=void 0,y=t,h=e.apply(n,r)}function _(e){var r=e-d;return void 0===d||r>=t||r<0||g&&e-y>=f}function b(){var e=o();if(_(e))return E(e);p=setTimeout(b,function(e){var r=t-(e-d);return g?u(r,f-(e-y)):r}(e))}function E(e){return p=void 0,m&&c?w(e):(c=l=void 0,h)}function S(){var e=o(),r=_(e);if(c=arguments,l=this,d=e,r){if(void 0===p)return function(e){return y=e,p=setTimeout(b,t),v?w(e):h}(d);if(g)return clearTimeout(p),p=setTimeout(b,t),w(d)}return void 0===p&&(p=setTimeout(b,t)),h}return t=i(t)||0,n(r)&&(v=!!r.leading,f=(g="maxWait"in r)?a(i(r.maxWait)||0,t):f,m="trailing"in r?!!r.trailing:m),S.cancel=function(){void 0!==p&&clearTimeout(p),y=0,c=d=l=p=void 0},S.flush=function(){return void 0===p?h:E(o())},S}},function(e,t,r){var n=r(89);e.exports=function(e,t){return n(e,t)}},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0).__importDefault(r(220)),o=r(47),i=function(){function e(e){var t=this;this._baseAccount=new o.Account(e.account_id,e.sequence),n.default(e,(function(e,r){t[r]=e}))}return e.prototype.accountId=function(){return this._baseAccount.accountId()},e.prototype.sequenceNumber=function(){return this._baseAccount.sequenceNumber()},e.prototype.incrementSequenceNumber=function(){this._baseAccount.incrementSequenceNumber(),this.sequence=this._baseAccount.sequenceNumber()},e}();t.AccountResponse=i},function(e,t,r){var n=r(119),o=r(44),i=r(6),s=r(45),a=r(80),u=r(58),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),f=!r&&!l&&s(e),h=!r&&!l&&!f&&u(e),p=r||l||f||h,d=p?n(e.length,String):[],y=d.length;for(var v in e)!t&&!c.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||a(v,y))||d.push(v);return d}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(5))},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(229),t.sha1=r(232),t.sha224=r(233),t.sha256=r(123),t.sha384=r(234),t.sha512=r(124)},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n=r(10),o=r(37),i=r(24).Buffer,s=[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],a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.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},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,y=0|this._g,v=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+p(r[g-15])+r[g-16];for(var m=0;m<64;++m){var w=v+h(u)+c(u,d,y)+s[m]+r[m]|0,_=f(n)+l(n,o,i)|0;v=y,y=d,d=u,u=a+w|0,a=i,i=o,o=n,n=w+_|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=v+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(10),o=r(37),i=r(24).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,a=0|this._eh,u=0|this._fh,m=0|this._gh,w=0|this._hh,_=0|this._al,b=0|this._bl,E=0|this._cl,S=0|this._dl,A=0|this._el,O=0|this._fl,x=0|this._gl,k=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var P=t[T-30],R=t[T-30+1],C=p(P,R),I=d(R,P),N=y(P=t[T-4],R=t[T-4+1]),j=v(R,P),M=t[T-14],U=t[T-14+1],B=t[T-32],L=t[T-32+1],D=I+U|0,F=C+M+g(D,I)|0;F=(F=F+N+g(D=D+j|0,j)|0)+B+g(D=D+L|0,L)|0,t[T]=F,t[T+1]=D}for(var q=0;q<160;q+=2){F=t[q],D=t[q+1];var K=l(r,n,o),z=l(_,b,E),H=f(r,_),V=f(_,r),X=h(a,A),Q=h(A,a),G=s[q],W=s[q+1],Y=c(a,u,m),$=c(A,O,x),Z=k+Q|0,J=w+X+g(Z,k)|0;J=(J=(J=J+Y+g(Z=Z+$|0,$)|0)+G+g(Z=Z+W|0,W)|0)+F+g(Z=Z+D|0,D)|0;var ee=V+z|0,te=H+K+g(ee,V)|0;w=m,k=x,m=u,x=O,u=a,O=A,a=i+J+g(A=S+Z|0,S)|0,i=o,S=E,o=n,E=b,n=r,b=_,r=J+te+g(_=Z+ee|0,Z)|0}this._al=this._al+_|0,this._bl=this._bl+b|0,this._cl=this._cl+E|0,this._dl=this._dl+S|0,this._el=this._el+A|0,this._fl=this._fl+O|0,this._gl=this._gl+x|0,this._hl=this._hl+k|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,b)|0,this._ch=this._ch+o+g(this._cl,E)|0,this._dh=this._dh+i+g(this._dl,S)|0,this._eh=this._eh+a+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,O)|0,this._gh=this._gh+m+g(this._gl,x)|0,this._hh=this._hh+w+g(this._hl,k)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.sign=function(e,t){return n.sign(e,t)},t.verify=function(e,t,r){return n.verify(e,t,r)},t.generate=function(e){return n.generate(e)};var n={};t.FastSigning="undefined"==typeof window?function(){var t=void 0;try{t=r(235)}catch(e){return o()}return n.generate=function(r){var n=e.alloc(t.crypto_sign_PUBLICKEYBYTES),o=e.alloc(t.crypto_sign_SECRETKEYBYTES);return t.crypto_sign_seed_keypair(n,o,r),n},n.sign=function(r,n){r=e.from(r);var o=e.alloc(t.crypto_sign_BYTES);return t.crypto_sign_detached(o,r,n),o},n.verify=function(r,n,o){r=e.from(r);try{return t.crypto_sign_verify_detached(n,r,o)}catch(e){return!1}},!0}():o();function o(){var t=r(18);return n.generate=function(r){var n=new Uint8Array(r),o=t.sign.keyPair.fromSeed(n);return e.from(o.publicKey)},n.sign=function(r,n){r=e.from(r),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data);var o=t.sign.detached(r,n);return e.from(o)},n.verify=function(r,n,o){return r=e.from(r),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),o=new Uint8Array(o.toJSON().data),t.sign.detached.verify(r,n,o)},!1}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyChecksum=function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}},function(e,t,r){"use strict";var n=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},o={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};o.charmap=n(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};i.charmap=n(i.alphabet,i.charmap);var s={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function u(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}s.charmap=n(s.alphabet,s.charmap),a.prototype.charmap=o.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},u.prototype.alphabet=o.alphabet,u.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},u.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new u(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=u,t.charmap=n,t.crockford=i,t.rfc4648=o,t.base32hex=s},function(e,t){e.exports=function(e){return null===e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(38);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(311);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(70);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var s=r(312);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var a=r(313);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var u=r(314);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(315);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(150);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var f=r(317);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var h=r(318);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var p=r(319);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var d=r(320);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var y=r(323);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var v=r(324);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var g=r(155);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var m=r(325);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var w=r(358);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}})}));var _=r(361);Object.keys(_).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return _[e]}})}))},function(e,t,r){var n=r(84),o=r(50),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var s=e[t];i.call(e,t)&&o(s,r)&&(void 0!==r||t in e)||n(e,t,r)}},function(e,t,r){var n=r(27),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t){var r=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,r){var n=r(245),o=r(134);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,s)}return t}))}},function(e,t,r){var n=r(50),o=r(26),i=r(80),s=r(17);e.exports=function(e,t,r){if(!s(r))return!1;var a=typeof t;return!!("number"==a?o(r)&&i(t,r.length):"string"==a&&t in r)&&n(r[t],e)}},function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r<i;u=n[++r])y(u)||!_(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),o=!0}return r.apply(this,arguments)}};var i,s={};function a(e,r){var n={seen:[],stylize:c};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),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&S(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return g(o)||(o=l(e,o,n)),o}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return f(r)}var c,_="",A=!1,O=["{","}"];(p(r)&&(A=!0,O=["[","]"]),S(r))&&(_=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(_=" "+RegExp.prototype.toString.call(r)),b(r)&&(_=" "+Date.prototype.toUTCString.call(r)),E(r)&&(_=" "+f(r)),0!==s.length||A&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=A?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)T(t,String(s))?i.push(h(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,r,n,o,!0))})),i}(e,r,n,a,s):s.map((function(t){return h(e,r,n,a,t,A)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,O)):O[0]+_+O[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),T(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=y(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function g(e){return"string"==typeof e}function m(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===A(e)}function _(e){return"object"==typeof e&&null!==e}function b(e){return _(e)&&"[object Date]"===A(e)}function E(e){return _(e)&&("[object Error]"===A(e)||e instanceof Error)}function S(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(m(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},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.isArray=p,t.isBoolean=d,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=w,t.isObject=_,t.isDate=b,t.isError=E,t.isFunction=S,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(254);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",k(),t.format.apply(t,arguments))},t.inherits=r(255),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=P,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,s=function(){return o.apply(i,arguments)};t.apply(this,r).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(R,t,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(16))},function(e,t,r){var n=r(59),o=r(259),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},function(e,t){e.exports=function(e,t){return function(r){return e(t(r))}}},function(e,t,r){var n=r(261),o=r(301),i=r(57),s=r(6),a=r(309);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):n(e):a(e)}},function(e,t,r){var n=r(286),o=r(289),i=r(290),s=1,a=2;e.exports=function(e,t,r,u,c,l){var f=r&s,h=e.length,p=t.length;if(h!=p&&!(f&&p>h))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var y=-1,v=!0,g=r&a?new n:void 0;for(l.set(e,t),l.set(t,e);++y<h;){var m=e[y],w=t[y];if(u)var _=f?u(w,m,y,t,e,l):u(m,w,y,e,t,l);if(void 0!==_){if(_)continue;v=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(m===e||c(m,e,r,u,l)))return g.push(t)}))){v=!1;break}}else if(m!==w&&!c(m,w,r,u,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},function(e,t,r){var n=r(13).Uint8Array;e.exports=n},function(e,t,r){var n=r(142),o=r(91),i=r(40);e.exports=function(e){return n(e,i,o)}},function(e,t,r){var n=r(90),o=r(6);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,r){var n=r(17);e.exports=function(e){return e==e&&!n(e)}},function(e,t){e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},function(e,t,r){var n=r(147),o=r(69);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},function(e,t,r){var n=r(6),o=r(92),i=r(303),s=r(93);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(s(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,r){var n,o,i;
/**
* @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/Long.js for details
*/o=[],void 0===(i="function"==typeof(n=function(){"use strict";function e(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(e){return!0===(e&&e.__isLong__)};var t={},r={};e.fromInt=function(n,o){var i,s;return o?0<=(n>>>=0)&&n<256&&(s=r[n])?s:(i=new e(n,(0|n)<0?-1:0,!0),0<=n&&n<256&&(r[n]=i),i):-128<=(n|=0)&&n<128&&(s=t[n])?s:(i=new e(n,n<0?-1:0,!1),-128<=n&&n<128&&(t[n]=i),i)},e.fromNumber=function(t,r){return r=!!r,isNaN(t)||!isFinite(t)?e.ZERO:!r&&t<=-i?e.MIN_VALUE:!r&&t+1>=i?e.MAX_VALUE:r&&t>=o?e.MAX_UNSIGNED_VALUE:t<0?e.fromNumber(-t,r).negate():new e(t%n|0,t/n|0,r)},e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromString=function(t,r,n){if(0===t.length)throw Error("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r&&(n=r,r=!1),(n=n||10)<2||36<n)throw Error("radix out of range: "+n);var o;if((o=t.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+t);if(0===o)return e.fromString(t.substring(1),r,n).negate();for(var i=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.multiply(l).add(e.fromNumber(c))}else s=(s=s.multiply(i)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromValue=function(t){return t instanceof e?t:"number"==typeof t?e.fromNumber(t):"string"==typeof t?e.fromString(t):new e(t.low,t.high,t.unsigned)};var n=4294967296,o=n*n,i=o/2,s=e.fromInt(1<<24);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*n+(this.low>>>0):this.high*n+(this.low>>>0)},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix out of range: "+t);if(this.isZero())return"0";var r;if(this.isNegative()){if(this.equals(e.MIN_VALUE)){var n=e.fromNumber(t),o=this.divide(n);return r=o.multiply(n).subtract(this),o.toString(t)+r.toInt().toString(t)}return"-"+this.negate().toString(t)}var i=e.fromNumber(Math.pow(t,6),this.unsigned);r=this;for(var s="";;){var a=r.divide(i),u=(r.subtract(a.multiply(i)).toInt()>>>0).toString(t);if((r=a).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&0==(t&1<<r);r--);return 0!=this.high?r+33:r+1},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(e){return!this.equals(e)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(e){return this.compare(e)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(e){return this.compare(e)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.equals(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.subtract(t).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,h=0;return f+=(h+=i+(65535&t.low))>>>16,h&=65535,l+=(f+=o+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|h,c<<16|l,this.unsigned)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().multiply(t.negate()):this.negate().multiply(t).negate();if(t.isNegative())return this.multiply(t.negate()).negate();if(this.lessThan(s)&&t.lessThan(s))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,h=0,p=0,d=0;return p+=(d+=i*l)>>>16,d&=65535,h+=(p+=o*l)>>>16,p&=65535,h+=(p+=i*c)>>>16,p&=65535,f+=(h+=n*l)>>>16,h&=65535,f+=(h+=o*c)>>>16,h&=65535,f+=(h+=i*u)>>>16,h&=65535,f+=r*l+n*c+o*u+i*a,f&=65535,e.fromBits(p<<16|d,f<<16|h,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,n,o;if(this.equals(e.MIN_VALUE))return t.equals(e.ONE)||t.equals(e.NEG_ONE)?e.MIN_VALUE:t.equals(e.MIN_VALUE)?e.ONE:(r=this.shiftRight(1).divide(t).shiftLeft(1)).equals(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(n=this.subtract(t.multiply(r)),o=r.add(n.divide(t)));if(t.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().divide(t.negate()):this.negate().divide(t).negate();if(t.isNegative())return this.divide(t.negate()).negate();for(o=e.ZERO,n=this;n.greaterThanOrEqual(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(r)/Math.LN2),s=i<=48?1:Math.pow(2,i-48),a=e.fromNumber(r),u=a.multiply(t);u.isNegative()||u.greaterThan(n);)r-=s,u=(a=e.fromNumber(r,this.unsigned)).multiply(t);a.isZero()&&(a=e.ONE),o=o.add(a),n=n.subtract(u)}return o},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.subtract(this.divide(t).multiply(t))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bool=void 0;var n=s(r(316)),o=r(38),i=s(r(7));function s(e){return e&&e.__esModule?e:{default:e}}var a=t.Bool={read:function(e){var t=o.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var r=e?1:0;return o.Int.write(r,t)},isValid:function(e){return(0,n.default)(e)}};(0,i.default)(a)},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},function(e,t,r){var n=r(119),o=r(79),i=r(153),s=9007199254740991,a=4294967295,u=Math.min;e.exports=function(e,t){if((e=i(e))<1||e>s)return[];var r=a,c=u(e,a);t=o(t),e-=a;for(var l=n(c,t);++r<e;)t(r);return l}},function(e,t,r){var n=r(322);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t,r){var n=r(17),o=r(68),i=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var r=u.test(e);return r||c.test(e)?l(e.slice(2),r?2:8):a.test(e)?i:+e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=void 0;var n=i(r(9)),o=i(r(7));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Void={read:function(){},write:function(e){if(!(0,n.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},function(e,t,r){r(326),r(327),r(341),r(344),e.exports=r(52).Map},function(e,t){e.exports=!0},function(e,t,r){var n=r(25),o=r(52),i=r(71),s=r(29),a=r(54),u=function(e,t,r){var c,l,f,h=e&u.F,p=e&u.G,d=e&u.S,y=e&u.P,v=e&u.B,g=e&u.W,m=p?o:o[t]||(o[t]={}),w=m.prototype,_=p?n:d?n[t]:(n[t]||{}).prototype;for(c in p&&(r=t),r)(l=!h&&_&&void 0!==_[c])&&a(m,c)||(f=l?_[c]:r[c],m[c]=p&&"function"!=typeof _[c]?r[c]:v&&l?i(f,n):g&&_[c]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((m.virtual||(m.virtual={}))[c]=f,e&u.R&&w&&!w[c]&&s(w,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,r){var n=r(31),o=r(25).document,i=n(o)&&n(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(53),o=r(334),i=r(164),s=r(102)("IE_PROTO"),a=function(){},u=function(){var e,t=r(159)("iframe"),n=i.length;for(t.style.display="none",r(339).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[i[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(a.prototype=n(e),r=new a,a.prototype=null,r[s]=e):r=u(),void 0===t?r:o(r,t)}},function(e,t,r){var n=r(100);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(52),o=r(25),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:r(157)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(97);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(29);e.exports=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:n(e,o,t[o]);return e}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(71),o=r(346),i=r(347),s=r(53),a=r(101),u=r(348),c={},l={};(t=e.exports=function(e,t,r,f,h){var p,d,y,v,g=h?function(){return e}:u(e),m=n(r,f,t?2:1),w=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(p=a(e.length);p>w;w++)if((v=t?m(s(d=e[w])[0],d[1]):m(e[w]))===c||v===l)return v}else for(y=g.call(e);!(d=y.next()).done;)if((v=o(y,m,d.value,t))===c||v===l)return v}).BREAK=c,t.RETURN=l},function(e,t,r){var n=r(103)("meta"),o=r(31),i=r(54),s=r(30).f,a=0,u=Object.isExtensible||function(){return!0},c=!r(72)((function(){return u(Object.preventExtensions({}))})),l=function(e){s(e,n,{value:{i:"O"+ ++a,w:{}}})},f=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[n].i},getWeak:function(e,t){if(!i(e,n)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[n].w},onFreeze:function(e){return c&&f.NEED&&u(e)&&!i(e,n)&&l(e),e}}},function(e,t,r){var n=r(31);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){var n=r(95),o=r(138),i=r(359),s=r(6);e.exports=function(e,t){return(s(e)?n:i)(e,o(t,3))}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=d(r(172)),i=d(r(28)),s=d(r(20)),a=d(r(2)),u=r(48),c=r(11),l=r(174),f=r(61),h=r(109),p=r(15);function d(e){return e&&e.__esModule?e:{default:e}}t.Transaction=function(){function t(r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof r){var i=e.from(r,"base64");r=a.default.TransactionEnvelope.fromXDR(i)}"string"!=typeof n&&console.warn("Global `Network.current()` is deprecated. Please pass explicit argument instead, e.g. `new Transaction(envelope, Networks.PUBLIC)` (see https://git.io/fj9fG for more info)."),this._networkPassphrase=n,this.tx=r.tx(),this.source=c.StrKey.encodeEd25519PublicKey(r.tx().sourceAccount().ed25519()),this.fee=this.tx.fee(),this._memo=this.tx.memo(),this.sequence=this.tx.seqNum().toString();var s=this.tx.timeBounds();s&&(this.timeBounds={minTime:s.minTime().toString(),maxTime:s.maxTime().toString()});var u=this.tx.operations()||[];this.operations=(0,o.default)(u,(function(e){return l.Operation.fromXDRObject(e)}));var f=r.signatures()||[];this.signatures=(0,o.default)(f,(function(e){return e}))}return n(t,[{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];(0,i.default)(n,(function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!r||"string"!=typeof r)throw new Error("Invalid signature");if(!t||"string"!=typeof t)throw new Error("Invalid publicKey");var n=void 0,o=void 0,i=e.from(r,"base64");try{o=(n=p.Keypair.fromPublicKey(t)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!n.verify(this.hash(),i))throw new Error("Invalid signature");this.signatures.push(new a.default.DecoratedSignature({hint:o,signature:i}))}},{key:"signHashX",value:function(t){if((0,s.default)(t)&&(t=e.from(t,"hex")),t.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var r=t,n=(0,u.hash)(t),o=n.slice(n.length-4);this.signatures.push(new a.default.DecoratedSignature({hint:o,signature:r}))}},{key:"hash",value:function(){return(0,u.hash)(this.signatureBase())}},{key:"signatureBase",value:function(){return e.concat([(0,u.hash)(this.networkPassphrase),a.default.EnvelopeType.envelopeTypeTx().toXDR(),this.tx.toXDR()])}},{key:"toEnvelope",value:function(){var e=this.tx,t=this.signatures;return new a.default.TransactionEnvelope({tx:e,signatures:t})}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}},{key:"networkPassphrase",get:function(){if(this._networkPassphrase)return this._networkPassphrase;if(console.warn("Global `Network.current()` is deprecated. Please pass explicit argument instead, e.g. `new Transaction(envelope, Networks.PUBLIC)` (see https://git.io/fj9fG for more info)."),null===f.Network.current())throw new Error("No network selected. Please pass a network argument, e.g. `new Transaction(envelope, Networks.PUBLIC)`.");return f.Network.current().networkPassphrase()},set:function(e){this._networkPassphrase=e}},{key:"memo",get:function(){return h.Memo.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}}]),t}()}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(22),i=g(r(33)),s=g(r(175)),a=g(r(9)),u=g(r(20)),c=g(r(49)),l=g(r(370)),f=r(371),h=r(178),p=r(11),d=r(15),y=g(r(2)),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(392));function g(e){return e&&e.__esModule?e:{default:e}}t.AuthRequiredFlag=1,t.AuthRevocableFlag=2,t.AuthImmutableFlag=4;var m=t.Operation=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"setSourceAccount",value:function(e,t){if(t.source){if(!p.StrKey.isValidEd25519PublicKey(t.source))throw new Error("Source address is invalid");e.sourceAccount=d.Keypair.fromPublicKey(t.source).xdrAccountId()}}},{key:"fromXDRObject",value:function(e){function t(e){return p.StrKey.encodeEd25519PublicKey(e.ed25519())}var r={};e.sourceAccount()&&(r.source=t(e.sourceAccount()));var n=e.body().value(),o=e.body().switch().name;switch(o){case"createAccount":r.type="createAccount",r.destination=t(n.destination()),r.startingBalance=this._fromXDRAmount(n.startingBalance());break;case"payment":r.type="payment",r.destination=t(n.destination()),r.asset=h.Asset.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount());break;case"pathPaymentStrictReceive":r.type="pathPaymentStrictReceive",r.sendAsset=h.Asset.fromOperation(n.sendAsset()),r.sendMax=this._fromXDRAmount(n.sendMax()),r.destination=t(n.destination()),r.destAsset=h.Asset.fromOperation(n.destAsset()),r.destAmount=this._fromXDRAmount(n.destAmount()),r.path=[];var i=n.path();Object.keys(i).forEach((function(e){r.path.push(h.Asset.fromOperation(i[e]))}));break;case"pathPaymentStrictSend":r.type="pathPaymentStrictSend",r.sendAsset=h.Asset.fromOperation(n.sendAsset()),r.sendAmount=this._fromXDRAmount(n.sendAmount()),r.destination=t(n.destination()),r.destAsset=h.Asset.fromOperation(n.destAsset()),r.destMin=this._fromXDRAmount(n.destMin()),r.path=[];var a=n.path();Object.keys(a).forEach((function(e){r.path.push(h.Asset.fromOperation(a[e]))}));break;case"changeTrust":r.type="changeTrust",r.line=h.Asset.fromOperation(n.line()),r.limit=this._fromXDRAmount(n.limit());break;case"allowTrust":r.type="allowTrust",r.trustor=t(n.trustor()),r.assetCode=n.asset().value().toString(),r.assetCode=(0,s.default)(r.assetCode,"\0"),r.authorize=n.authorize();break;case"setOption":if(r.type="setOptions",n.inflationDest()&&(r.inflationDest=t(n.inflationDest())),r.clearFlags=n.clearFlags(),r.setFlags=n.setFlags(),r.masterWeight=n.masterWeight(),r.lowThreshold=n.lowThreshold(),r.medThreshold=n.medThreshold(),r.highThreshold=n.highThreshold(),r.homeDomain=void 0!==n.homeDomain()?n.homeDomain().toString("ascii"):void 0,n.signer()){var u={},c=n.signer().key().arm();"ed25519"===c?u.ed25519PublicKey=t(n.signer().key()):"preAuthTx"===c?u.preAuthTx=n.signer().key().preAuthTx():"hashX"===c&&(u.sha256Hash=n.signer().key().hashX()),u.weight=n.signer().weight(),r.signer=u}break;case"manageOffer":case"manageSellOffer":r.type="manageSellOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"manageBuyOffer":r.type="manageBuyOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.buyAmount=this._fromXDRAmount(n.buyAmount()),r.price=this._fromXDRPrice(n.price()),r.offerId=n.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":r.type="createPassiveSellOffer",r.selling=h.Asset.fromOperation(n.selling()),r.buying=h.Asset.fromOperation(n.buying()),r.amount=this._fromXDRAmount(n.amount()),r.price=this._fromXDRPrice(n.price());break;case"accountMerge":r.type="accountMerge",r.destination=t(n);break;case"manageDatum":r.type="manageData",r.name=n.dataName().toString("ascii"),r.value=n.dataValue();break;case"inflation":r.type="inflation";break;case"bumpSequence":r.type="bumpSequence",r.bumpTo=n.bumpTo().toString();break;default:throw new Error("Unknown operation: "+o)}return r}},{key:"isValidAmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,u.default)(e))return!1;var r=void 0;try{r=new i.default(e)}catch(e){return!1}return(!(!t&&r.isZero()||r.isNegative()||r.times(1e7).greaterThan(new i.default("9223372036854775807").toString())||r.decimalPlaces()>7||r.isNaN()||!r.isFinite()))}},{key:"constructAmountRequirementsError",value:function(e){return e+" argument must be of type String, represent a positive number and have at most 7 digits after the decimal"}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!(0,a.default)(t))switch((0,u.default)(t)&&(t=parseFloat(t)),!0){case!(0,c.default)(t)||!(0,l.default)(t)||t%1!=0:throw new Error(e+" value is invalid");case t<0:throw new Error(e+" value must be unsigned");case!r||r&&r(t,e):return t;default:throw new Error(e+" value is invalid")}}},{key:"_toXDRAmount",value:function(e){var t=new i.default(e).mul(1e7);return o.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new i.default(e).div(1e7).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new i.default(e.n()).div(new i.default(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t=void 0;if(e.n&&e.d)t=new y.default.Price(e);else{e=new i.default(e);var r=(0,f.best_r)(e);t=new y.default.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}]),e}();m.accountMerge=v.accountMerge,m.allowTrust=v.allowTrust,m.bumpSequence=v.bumpSequence,m.changeTrust=v.changeTrust,m.createAccount=v.createAccount,m.createPassiveSellOffer=v.createPassiveSellOffer,m.inflation=v.inflation,m.manageData=v.manageData,m.manageSellOffer=v.manageSellOffer,m.manageBuyOffer=v.manageBuyOffer,m.pathPayment=v.pathPayment,m.pathPaymentStrictReceive=v.pathPaymentStrictReceive,m.pathPaymentStrictSend=v.pathPaymentStrictSend,m.payment=v.payment,m.setOptions=v.setOptions,m.manageOffer=v.manageOffer,m.createPassiveOffer=v.createPassiveOffer},function(e,t,r){var n=r(94),o=r(176),i=r(363),s=r(177),a=r(93),u=/\s+$/;e.exports=function(e,t,r){if((e=a(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=s(e),l=i(c,s(t))+1;return o(c,0,l).join("")}},function(e,t,r){var n=r(362);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},function(e,t,r){var n=r(368),o=r(106),i=r(369);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Asset=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(73)),i=l(r(184)),s=l(r(175)),a=l(r(2)),u=r(15),c=r(11);function l(e){return e&&e.__esModule?e:{default:e}}t.Asset=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!c.StrKey.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");this.code=t,this.issuer=r}return n(e,[{key:"toXDRObject",value:function(){if(this.isNative())return a.default.Asset.assetTypeNative();var e=void 0,t=void 0;this.code.length<=4?(e=a.default.AssetAlphaNum4,t="assetTypeCreditAlphanum4"):(e=a.default.AssetAlphaNum12,t="assetTypeCreditAlphanum12");var r=this.code.length<=4?4:12,n=new e({assetCode:(0,i.default)(this.code,r,"\0"),issuer:u.Keypair.fromPublicKey(this.issuer).xdrAccountId()});return new a.default.Asset(t,n)}},{key:"getCode",value:function(){return(0,o.default)(this.code)}},{key:"getIssuer",value:function(){return(0,o.default)(this.issuer)}},{key:"getAssetType",value:function(){return this.isNative()?"native":this.code.length>=1&&this.code.length<=4?"credit_alphanum4":this.code.length>=5&&this.code.length<=12?"credit_alphanum12":null}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":this.getCode()+":"+this.getIssuer()}}],[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t=void 0,r=void 0;switch(e.switch()){case a.default.AssetType.assetTypeNative():return this.native();case a.default.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case a.default.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=c.StrKey.encodeEd25519PublicKey(t.issuer().ed25519()),new this((0,s.default)(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: "+e.switch().name)}}}]),e}()},function(e,t,r){(function(e){var n=r(13),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===o?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}).call(this,r(46)(e))},function(e,t){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},function(e,t,r){var n=r(90),o=r(107),i=r(91),s=r(143),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:s;e.exports=a},function(e,t,r){var n=r(108);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},function(e,t,r){var n=r(383),o=r(107),i=r(59);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},function(e,t,r){var n=r(388),o=r(185),i=r(153),s=r(93);e.exports=function(e,t,r){e=s(e);var a=(t=i(t))?o(e):0;return t&&a<t?e+n(t-a,r):e}},function(e,t,r){var n=r(390),o=r(106),i=r(391);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!a.StrKey.isValidEd25519PublicKey(e.destination):throw new Error("destination is invalid");case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax),t.destination=s.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.default.PathPaymentStrictReceiveOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n},s=r(15),a=r(11)},function(e,t,r){var n=r(84),o=r(50);e.exports=function(e,t,r){(void 0===r||o(e[t],r))&&(void 0!==r||t in e)||n(e,t,r)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.4.0 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=36,l=1,f=26,h=38,p=700,d=72,y=128,v="-",g=/^xn--/,m=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=c-l,E=Math.floor,S=String.fromCharCode;function A(e){throw new RangeError(_[e])}function O(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+O((e=e.replace(w,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function T(e){return O(e,(function(e){var t="";return e>65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)})).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,r){var n=0;for(e=r?E(e/p):e>>1,e+=E(e/t);e>b*f>>1;n+=c)e=E(e/b);return E(n+(b+1)*e/(e+h))}function C(e){var t,r,n,o,i,s,a,h,p,g,m,w=[],_=e.length,b=0,S=y,O=d;for((r=e.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&A("not-basic"),w.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<_;){for(i=b,s=1,a=c;o>=_&&A("invalid-input"),((h=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:c)>=c||h>E((u-b)/s))&&A("overflow"),b+=h*s,!(h<(p=a<=O?l:a>=O+f?f:a-O));a+=c)s>E(u/(g=c-p))&&A("overflow"),s*=g;O=R(b-i,t=w.length+1,0==i),E(b/t)>u-S&&A("overflow"),S+=E(b/t),b%=t,w.splice(b++,0,S)}return T(w)}function I(e){var t,r,n,o,i,s,a,h,p,g,m,w,_,b,O,x=[];for(w=(e=k(e)).length,t=y,r=0,i=d,s=0;s<w;++s)(m=e[s])<128&&x.push(S(m));for(n=o=x.length,o&&x.push(v);n<w;){for(a=u,s=0;s<w;++s)(m=e[s])>=t&&m<a&&(a=m);for(a-t>E((u-r)/(_=n+1))&&A("overflow"),r+=(a-t)*_,t=a,s=0;s<w;++s)if((m=e[s])<t&&++r>u&&A("overflow"),m==t){for(h=r,p=c;!(h<(g=p<=i?l:p>=i+f?f:p-i));p+=c)O=h-g,b=c-g,x.push(S(P(g+O%b,0))),h=E(O/b);x.push(S(P(h,0))),i=R(r,_,n==o),r=0,++n}++r,++t}return x.join("")}a={version:"1.3.2",ucs2:{decode:k,encode:T},decode:C,encode:I,toASCII:function(e){return x(e,(function(e){return m.test(e)?"xn--"+I(e):e}))},toUnicode:function(e){return x(e,(function(e){return g.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return a}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(46)(e),r(5))},function(e,t,r){var n,o;
/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.2
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(i,s){"use strict";e.exports?e.exports=s():void 0===(o="function"==typeof(n=s)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var s=0;s<i;s++){r=n[s].split("");for(var a=0;a<3&&("0"===r[0]&&r.length>1);a++)r.splice(0,1);n[s]=r.join("")}var u=-1,c=0,l=0,f=-1,h=!1;for(s=0;s<i;s++)h?"0"===n[s]?l+=1:(h=!1,l>c&&(u=f,c=l)):"0"===n[s]&&(h=!0,f=s,l=1);l>c&&(u=f,c=l),c>1&&n.splice(u,c,""),o=n.length;var p="";for(""===n[0]&&(p=":"),s=0;s<o&&(p+=n[s],s!==o-1);s++)p+=":";return""===n[o-1]&&(p+=":"),p},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},function(e,t,r){var n,o;
/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.2
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(i,s){"use strict";e.exports?e.exports=s():void 0===(o="function"==typeof(n=s)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(12);function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var n=r(12),o=r(426),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:(void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?a=r(196):"undefined"!=typeof XMLHttpRequest&&(a=r(196)),a),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){u.headers[e]=n.merge(i)})),e.exports=u}).call(this,r(16))},function(e,t,r){"use strict";var n=r(12),o=r(427),i=r(193),s=r(429),a=r(430),u=r(197);e.exports=function(e){return new Promise((function(t,c){var l=e.data,f=e.headers;n.isFormData(l)&&delete f["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",d=e.auth.password||"";f.Authorization="Basic "+btoa(p+":"+d)}if(h.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,c,n),h=null}},h.onabort=function(){h&&(c(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){c(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var y=r(431),v=(e.withCredentials||a(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;v&&(f[e.xsrfHeaderName]=v)}if("setRequestHeader"in h&&n.forEach(f,(function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete f[t]:h.setRequestHeader(t,e)})),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),c(e),h=null)})),void 0===l&&(l=null),h.send(l)}))}},function(e,t,r){"use strict";var n=r(428);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(["headers","auth","proxy"],(function(o){n.isObject(t[o])?r[o]=n.deepMerge(e[o],t[o]):void 0!==t[o]?r[o]=t[o]:n.isObject(e[o])?r[o]=n.deepMerge(e[o]):void 0!==e[o]&&(r[o]=e[o])})),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){(function(e){var n=r(447),o=r(202),i=r(456),s=r(457),a=r(112),u=t;u.request=function(t,r){t="string"==typeof t?a.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||o,u=t.hostname||t.host,c=t.port,l=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(c?":"+c:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new n(t);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(e){t.fetch=a(e.fetch)&&a(e.ReadableStream),t.writableStream=a(e.WritableStream),t.abortController=a(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var r;function n(){if(void 0!==r)return r;if(e.XMLHttpRequest){r=new e.XMLHttpRequest;try{r.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,s=i&&a(e.ArrayBuffer.prototype.slice);function a(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&s&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&a(n().overrideMimeType),t.vbArray=a(e.VBArray),r=null}).call(this,r(5))},function(e,t,r){(function(e,n,o){var i=r(201),s=r(10),a=r(203),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,r,s,u){var c=this;if(a.Readable.call(c),c._mode=s,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===s){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var l=new WritableStream({write:function(e){return new Promise((function(t,r){c._destroyed?r():c.push(new n(e))?t():c._resumeFetch=t}))},close:function(){o.clearTimeout(u),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){o.clearTimeout(u),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!c._destroyed){if(t.done)return o.clearTimeout(u),void c.push(null);c.push(new n(t.value)),e()}})).catch((function(e){o.clearTimeout(u),c._destroyed||c.emit("error",e)}))}()}else{if(c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var h=c.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};s(c,a.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new o.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new n(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new n(i.length),a=0;a<i.length;a++)s[a]=255&i.charCodeAt(a);e.push(s)}else e.push(i,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;r=t.response,e.push(new n(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break;e.push(new n(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break;var c=new o.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new n(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,r(16),r(1).Buffer,r(5))},function(e,t,r){(t=e.exports=r(204)).Stream=t,t.Readable=t,t.Writable=r(207),t.Duplex=r(42),t.Transform=r(210),t.PassThrough=r(454)},function(e,t,r){"use strict";(function(t,n){var o=r(76);e.exports=w;var i,s=r(122);w.ReadableState=m;r(75).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=r(205),c=r(113).Buffer,l=t.Uint8Array||function(){};var f=r(56);f.inherits=r(10);var h=r(448),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,y=r(449),v=r(206);f.inherits(w,u);var g=["error","close","destroy","pause","resume"];function m(e,t){e=e||{};var n=t instanceof(i=i||r(42));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(209).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function w(e){if(i=i||r(42),!(this instanceof w))return new w(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function _(e,t,r,n,o){var i,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,A(e)}(e,s)):(o||(i=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,t)),i?e.emit("error",i):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?b(e,s,t,!1):x(e,s)):b(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function b(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),x(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=v.destroy,w.prototype._undestroy=v.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},w.prototype.unshift=function(e){return _(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return d||(d=r(209).StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var E=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function A(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(O,e):O(e))}function O(e){p("emit readable"),e.emit("readable"),R(e)}function x(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function T(e){p("readable nexttick read 0"),e.read(0)}function P(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,o=r.data;e-=o.length;for(;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0===(e-=s)){s===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++n}return t.length-=n,o}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,o=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,s),0===(e-=s)){s===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++o}return t.length-=o,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):A(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",o=!0),t.ended||t.reading?p("reading or ended",o=!1):o&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:w;function c(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",g),e.removeListener("finish",m),e.removeListener("drain",f),e.removeListener("error",v),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",w),r.removeListener("data",y),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(u):r.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",f);var h=!1;var d=!1;function y(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==j(i.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function v(t){p("onerror",t),w(),e.removeListener("error",v),0===a(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",m),w()}function m(){p("onfinish"),e.removeListener("close",g),w()}function w(){p("unpipe"),r.unpipe(e)}return r.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",g),e.once("finish",m),e.emit("pipe",r),i.flowing||(p("pipe resume"),r.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,r);return this}var s=j(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},w.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&A(this):o.nextTick(T,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(P,e,t))}(this,e)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(p("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(p("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){p("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=C}).call(this,r(5),r(16))},function(e,t,r){e.exports=r(75).EventEmitter},function(e,t,r){"use strict";var n=r(76);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),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.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){"use strict";(function(t,n,o){var i=r(76);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=m;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:i.nextTick;m.WritableState=g;var c=r(56);c.inherits=r(10);var l={deprecate:r(452)},f=r(205),h=r(113).Buffer,p=o.Uint8Array||function(){};var d,y=r(206);function v(){}function g(e,t){a=a||r(42),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(c||0===c)?c:l,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 f=!1===e.decodeStrings;this.decodeStrings=!f,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,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,o);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||b(e,r),n?u(_,e,r,s,o):_(e,r,s,o)}}(t,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 s(this)}function m(e){if(a=a||r(42),!(d.call(m,this)||this instanceof a))return new m(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function w(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function _(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function b(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),i=t.corkedRequestsFree;i.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,w(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(w(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=E(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(m,f),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===m&&(e&&e._writableState instanceof g)}})):d=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=v),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(n,s),o=!1),o}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,o,i){if(!r){var s=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,a,n,o,i);return u}(this,o,a,e,t,r)),s},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},m.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(16),r(208).setImmediate,r(5))},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(451),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){"use strict";var n=r(453).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.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 i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=s(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if((o=s(t[n]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if((o=s(t[n]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";e.exports=s;var n=r(42),o=r(56);function i(e,t){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!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=r(10),o.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=n.__importDefault(r(111)),i=n.__importDefault(r(474)),s=r(74);t.STELLAR_TOML_MAX_SIZE=102400;var a=function(){function e(){}return e.resolve=function(e,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var a,u,c;return n.__generator(this,(function(n){return a=void 0===r.allowHttp?s.Config.isAllowHttp():r.allowHttp,u=void 0===r.timeout?s.Config.getTimeout():r.timeout,c=a?"http":"https",[2,o.default.get(c+"://"+e+"/.well-known/stellar.toml",{maxContentLength:t.STELLAR_TOML_MAX_SIZE,timeout:u}).then((function(e){try{var t=i.default.parse(e.data);return Promise.resolve(t)}catch(e){return Promise.reject(new Error("stellar.toml is invalid - Parsing error on line "+e.line+", column "+e.column+": "+e.message))}})).catch((function(e){throw e.message.match(/^maxContentLength size/)?new Error("stellar.toml file exceeds allowed size of "+t.STELLAR_TOML_MAX_SIZE):e}))]}))}))},e}();t.StellarTomlResolver=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatusCodes=t.DBNotReset=t.DBWrongPassword=t.NoDBPathGiven=t.FirmwareOrAppUpdateRequired=t.LedgerAPI5xx=t.LedgerAPI4xx=t.GenuineCheckFailed=t.PairingFailed=t.SyncError=t.FeeTooHigh=t.FeeRequired=t.FeeNotLoaded=t.CantScanQRCode=t.ETHAddressNonEIP=t.WrongAppForCurrency=t.WrongDeviceForAccount=t.WebsocketConnectionFailed=t.WebsocketConnectionError=t.DeviceShouldStayInApp=t.TransportWebUSBGestureRequired=t.TransportInterfaceNotAvailable=t.TransportOpenUserCancelled=t.UserRefusedOnDevice=t.UserRefusedAllowManager=t.UserRefusedFirmwareUpdate=t.UserRefusedAddress=t.UserRefusedDeviceNameChange=t.UpdateYourApp=t.UnavailableTezosOriginatedAccountSend=t.UnavailableTezosOriginatedAccountReceive=t.RecipientRequired=t.MCUNotGenuineToDashboard=t.UnexpectedBootloader=t.TimeoutTagged=t.RecommendUndelegation=t.RecommendSubAccountsToEmpty=t.PasswordIncorrectError=t.PasswordsDontMatchError=t.GasLessThanEstimate=t.NotSupportedLegacyAddress=t.NotEnoughGas=t.NoAccessToCamera=t.NotEnoughBalanceBecauseDestinationNotCreated=t.NotEnoughSpendableBalance=t.NotEnoughBalanceInParentAccount=t.NotEnoughBalanceToDelegate=t.NotEnoughBalance=t.NoAddressesFound=t.NetworkDown=t.ManagerUninstallBTCDep=t.ManagerNotEnoughSpaceError=t.ManagerFirmwareNotEnoughSpaceError=t.ManagerDeviceLockedError=t.ManagerAppDepUninstallRequired=t.ManagerAppDepInstallRequired=t.ManagerAppRelyOnBTCError=t.ManagerAppAlreadyInstalledError=t.LedgerAPINotAvailable=t.LedgerAPIErrorWithMessage=t.LedgerAPIError=t.UnknownMCU=t.LatestMCUInstalledError=t.InvalidAddressBecauseDestinationIsAlsoSource=t.InvalidAddress=t.InvalidXRPTag=t.HardResetFail=t.FeeEstimationFailed=t.EthAppPleaseEnableContractData=t.EnpointConfigError=t.DisconnectedDeviceDuringOperation=t.DisconnectedDevice=t.DeviceSocketNoBulkStatus=t.DeviceSocketFail=t.DeviceNameInvalid=t.DeviceHalted=t.DeviceInOSUExpected=t.DeviceOnDashboardUnexpected=t.DeviceOnDashboardExpected=t.DeviceNotGenuineError=t.DeviceGenuineSocketEarlyClose=t.DeviceAppVerifyNotSupported=t.CurrencyNotSupported=t.CashAddrNotSupported=t.CantOpenDevice=t.BtcUnmatchedApp=t.BluetoothRequired=t.AmountRequired=t.AccountNotSupported=t.AccountNameRequiredError=t.addCustomErrorDeserializer=t.createCustomErrorClass=t.deserializeError=t.serializeError=void 0,t.TransportError=o,t.getAltStatusMessage=s,t.TransportStatusError=a;var n=r(487);t.serializeError=n.serializeError,t.deserializeError=n.deserializeError,t.createCustomErrorClass=n.createCustomErrorClass,t.addCustomErrorDeserializer=n.addCustomErrorDeserializer;t.AccountNameRequiredError=(0,n.createCustomErrorClass)("AccountNameRequired"),t.AccountNotSupported=(0,n.createCustomErrorClass)("AccountNotSupported"),t.AmountRequired=(0,n.createCustomErrorClass)("AmountRequired"),t.BluetoothRequired=(0,n.createCustomErrorClass)("BluetoothRequired"),t.BtcUnmatchedApp=(0,n.createCustomErrorClass)("BtcUnmatchedApp"),t.CantOpenDevice=(0,n.createCustomErrorClass)("CantOpenDevice"),t.CashAddrNotSupported=(0,n.createCustomErrorClass)("CashAddrNotSupported"),t.CurrencyNotSupported=(0,n.createCustomErrorClass)("CurrencyNotSupported"),t.DeviceAppVerifyNotSupported=(0,n.createCustomErrorClass)("DeviceAppVerifyNotSupported"),t.DeviceGenuineSocketEarlyClose=(0,n.createCustomErrorClass)("DeviceGenuineSocketEarlyClose"),t.DeviceNotGenuineError=(0,n.createCustomErrorClass)("DeviceNotGenuine"),t.DeviceOnDashboardExpected=(0,n.createCustomErrorClass)("DeviceOnDashboardExpected"),t.DeviceOnDashboardUnexpected=(0,n.createCustomErrorClass)("DeviceOnDashboardUnexpected"),t.DeviceInOSUExpected=(0,n.createCustomErrorClass)("DeviceInOSUExpected"),t.DeviceHalted=(0,n.createCustomErrorClass)("DeviceHalted"),t.DeviceNameInvalid=(0,n.createCustomErrorClass)("DeviceNameInvalid"),t.DeviceSocketFail=(0,n.createCustomErrorClass)("DeviceSocketFail"),t.DeviceSocketNoBulkStatus=(0,n.createCustomErrorClass)("DeviceSocketNoBulkStatus"),t.DisconnectedDevice=(0,n.createCustomErrorClass)("DisconnectedDevice"),t.DisconnectedDeviceDuringOperation=(0,n.createCustomErrorClass)("DisconnectedDeviceDuringOperation"),t.EnpointConfigError=(0,n.createCustomErrorClass)("EnpointConfig"),t.EthAppPleaseEnableContractData=(0,n.createCustomErrorClass)("EthAppPleaseEnableContractData"),t.FeeEstimationFailed=(0,n.createCustomErrorClass)("FeeEstimationFailed"),t.HardResetFail=(0,n.createCustomErrorClass)("HardResetFail"),t.InvalidXRPTag=(0,n.createCustomErrorClass)("InvalidXRPTag"),t.InvalidAddress=(0,n.createCustomErrorClass)("InvalidAddress"),t.InvalidAddressBecauseDestinationIsAlsoSource=(0,n.createCustomErrorClass)("InvalidAddressBecauseDestinationIsAlsoSource"),t.LatestMCUInstalledError=(0,n.createCustomErrorClass)("LatestMCUInstalledError"),t.UnknownMCU=(0,n.createCustomErrorClass)("UnknownMCU"),t.LedgerAPIError=(0,n.createCustomErrorClass)("LedgerAPIError"),t.LedgerAPIErrorWithMessage=(0,n.createCustomErrorClass)("LedgerAPIErrorWithMessage"),t.LedgerAPINotAvailable=(0,n.createCustomErrorClass)("LedgerAPINotAvailable"),t.ManagerAppAlreadyInstalledError=(0,n.createCustomErrorClass)("ManagerAppAlreadyInstalled"),t.ManagerAppRelyOnBTCError=(0,n.createCustomErrorClass)("ManagerAppRelyOnBTC"),t.ManagerAppDepInstallRequired=(0,n.createCustomErrorClass)("ManagerAppDepInstallRequired"),t.ManagerAppDepUninstallRequired=(0,n.createCustomErrorClass)("ManagerAppDepUninstallRequired"),t.ManagerDeviceLockedError=(0,n.createCustomErrorClass)("ManagerDeviceLocked"),t.ManagerFirmwareNotEnoughSpaceError=(0,n.createCustomErrorClass)("ManagerFirmwareNotEnoughSpace"),t.ManagerNotEnoughSpaceError=(0,n.createCustomErrorClass)("ManagerNotEnoughSpace"),t.ManagerUninstallBTCDep=(0,n.createCustomErrorClass)("ManagerUninstallBTCDep"),t.NetworkDown=(0,n.createCustomErrorClass)("NetworkDown"),t.NoAddressesFound=(0,n.createCustomErrorClass)("NoAddressesFound"),t.NotEnoughBalance=(0,n.createCustomErrorClass)("NotEnoughBalance"),t.NotEnoughBalanceToDelegate=(0,n.createCustomErrorClass)("NotEnoughBalanceToDelegate"),t.NotEnoughBalanceInParentAccount=(0,n.createCustomErrorClass)("NotEnoughBalanceInParentAccount"),t.NotEnoughSpendableBalance=(0,n.createCustomErrorClass)("NotEnoughSpendableBalance"),t.NotEnoughBalanceBecauseDestinationNotCreated=(0,n.createCustomErrorClass)("NotEnoughBalanceBecauseDestinationNotCreated"),t.NoAccessToCamera=(0,n.createCustomErrorClass)("NoAccessToCamera"),t.NotEnoughGas=(0,n.createCustomErrorClass)("NotEnoughGas"),t.NotSupportedLegacyAddress=(0,n.createCustomErrorClass)("NotSupportedLegacyAddress"),t.GasLessThanEstimate=(0,n.createCustomErrorClass)("GasLessThanEstimate"),t.PasswordsDontMatchError=(0,n.createCustomErrorClass)("PasswordsDontMatch"),t.PasswordIncorrectError=(0,n.createCustomErrorClass)("PasswordIncorrect"),t.RecommendSubAccountsToEmpty=(0,n.createCustomErrorClass)("RecommendSubAccountsToEmpty"),t.RecommendUndelegation=(0,n.createCustomErrorClass)("RecommendUndelegation"),t.TimeoutTagged=(0,n.createCustomErrorClass)("TimeoutTagged"),t.UnexpectedBootloader=(0,n.createCustomErrorClass)("UnexpectedBootloader"),t.MCUNotGenuineToDashboard=(0,n.createCustomErrorClass)("MCUNotGenuineToDashboard"),t.RecipientRequired=(0,n.createCustomErrorClass)("RecipientRequired"),t.UnavailableTezosOriginatedAccountReceive=(0,n.createCustomErrorClass)("UnavailableTezosOriginatedAccountReceive"),t.UnavailableTezosOriginatedAccountSend=(0,n.createCustomErrorClass)("UnavailableTezosOriginatedAccountSend"),t.UpdateYourApp=(0,n.createCustomErrorClass)("UpdateYourApp"),t.UserRefusedDeviceNameChange=(0,n.createCustomErrorClass)("UserRefusedDeviceNameChange"),t.UserRefusedAddress=(0,n.createCustomErrorClass)("UserRefusedAddress"),t.UserRefusedFirmwareUpdate=(0,n.createCustomErrorClass)("UserRefusedFirmwareUpdate"),t.UserRefusedAllowManager=(0,n.createCustomErrorClass)("UserRefusedAllowManager"),t.UserRefusedOnDevice=(0,n.createCustomErrorClass)("UserRefusedOnDevice"),t.TransportOpenUserCancelled=(0,n.createCustomErrorClass)("TransportOpenUserCancelled"),t.TransportInterfaceNotAvailable=(0,n.createCustomErrorClass)("TransportInterfaceNotAvailable"),t.TransportWebUSBGestureRequired=(0,n.createCustomErrorClass)("TransportWebUSBGestureRequired"),t.DeviceShouldStayInApp=(0,n.createCustomErrorClass)("DeviceShouldStayInApp"),t.WebsocketConnectionError=(0,n.createCustomErrorClass)("WebsocketConnectionError"),t.WebsocketConnectionFailed=(0,n.createCustomErrorClass)("WebsocketConnectionFailed"),t.WrongDeviceForAccount=(0,n.createCustomErrorClass)("WrongDeviceForAccount"),t.WrongAppForCurrency=(0,n.createCustomErrorClass)("WrongAppForCurrency"),t.ETHAddressNonEIP=(0,n.createCustomErrorClass)("ETHAddressNonEIP"),t.CantScanQRCode=(0,n.createCustomErrorClass)("CantScanQRCode"),t.FeeNotLoaded=(0,n.createCustomErrorClass)("FeeNotLoaded"),t.FeeRequired=(0,n.createCustomErrorClass)("FeeRequired"),t.FeeTooHigh=(0,n.createCustomErrorClass)("FeeTooHigh"),t.SyncError=(0,n.createCustomErrorClass)("SyncError"),t.PairingFailed=(0,n.createCustomErrorClass)("PairingFailed"),t.GenuineCheckFailed=(0,n.createCustomErrorClass)("GenuineCheckFailed"),t.LedgerAPI4xx=(0,n.createCustomErrorClass)("LedgerAPI4xx"),t.LedgerAPI5xx=(0,n.createCustomErrorClass)("LedgerAPI5xx"),t.FirmwareOrAppUpdateRequired=(0,n.createCustomErrorClass)("FirmwareOrAppUpdateRequired"),t.NoDBPathGiven=(0,n.createCustomErrorClass)("NoDBPathGiven"),t.DBWrongPassword=(0,n.createCustomErrorClass)("DBWrongPassword"),t.DBNotReset=(0,n.createCustomErrorClass)("DBNotReset");function o(e,t){this.name="TransportError",this.message=e,this.stack=(new Error).stack,this.id=t}o.prototype=new Error,(0,n.addCustomErrorDeserializer)("TransportError",(function(e){return new o(e.message,e.id)}));var i=t.StatusCodes={PIN_REMAINING_ATTEMPTS:25536,INCORRECT_LENGTH:26368,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,SECURITY_STATUS_NOT_SATISFIED:27010,CONDITIONS_OF_USE_NOT_SATISFIED:27013,INCORRECT_DATA:27264,NOT_ENOUGH_MEMORY_SPACE:27268,REFERENCED_DATA_NOT_FOUND:27272,FILE_ALREADY_EXISTS:27273,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,CLA_NOT_SUPPORTED:28160,TECHNICAL_PROBLEM:28416,OK:36864,MEMORY_PROBLEM:37440,NO_EF_SELECTED:37888,INVALID_OFFSET:37890,FILE_NOT_FOUND:37892,INCONSISTENT_FILE:37896,ALGORITHM_NOT_SUPPORTED:38020,INVALID_KCV:38021,CODE_NOT_INITIALIZED:38914,ACCESS_CONDITION_NOT_FULFILLED:38916,CONTRADICTION_SECRET_CODE_STATUS:38920,CONTRADICTION_INVALIDATION:38928,CODE_BLOCKED:38976,MAX_VALUE_REACHED:38992,GP_AUTH_FAILED:25344,LICENSING:28482,HALTED:28586};function s(e){switch(e){case 26368:return"Incorrect length";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received"}if(28416<=e&&e<=28671)return"Internal error, please report"}function a(e){this.name="TransportStatusError";var t=Object.keys(i).find((function(t){return i[t]===e}))||"UNKNOWN_ERROR",r=s(e)||t,n=e.toString(16);this.message="Ledger device: "+r+" (0x"+n+")",this.stack=(new Error).stack,this.statusCode=e,this.statusText=t}a.prototype=new Error,(0,n.addCustomErrorDeserializer)("TransportStatusError",(function(e){return new a(e.statusCode)}))},function(e,t,r){var n=r(480);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(482);var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"l0v";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.transport=e,e.decorateAppAPIMethods(this,["getAppConfiguration","getPublicKey","signTransaction","signHash"],r)}return n(t,[{key:"getAppConfiguration",value:function(){return this.transport.send(224,6,0,0).then((function(e){var t=1===e[0]||e[1]<2;return{version:e[1]+"."+e[2]+"."+e[3],multiOpsEnabled:t}}))}},{key:"getPublicKey",value:function(t,r,n){var i=this;(0,o.checkStellarBip32Path)(t);var s=[],a=void 0,u=(0,o.splitPath)(t),c=new e(1+4*u.length);c[0]=u.length,u.forEach((function(e,t){c.writeUInt32BE(e,1+4*t)}));var l=e.from("via lumina","ascii");s.push(e.concat([c,l]));var f=!1;return(0,o.foreach)(s,(function(t){return i.transport.send(224,f?16:2,r?1:0,n?1:0,t,[36864,28162]).then((function(t){28162===e.from(t.slice(t.length-2)).readUInt16BE(0)&&(f=!0,s.push(e.alloc(0))),a=t}))})).then((function(){var e=0,t=a.slice(e,e+32);e+=32;var n=(0,o.encodeEd25519PublicKey)(t);if(r){var i=a.slice(e,e+64);if(!(0,o.verifyEd25519Signature)(l,i,t))throw new Error("Bad signature. Keypair is invalid. Please report this.")}return{publicKey:n,raw:t}}))}},{key:"signTransaction",value:function(t,r){var n=this;if((0,o.checkStellarBip32Path)(t),r.length>1540)throw new Error("Transaction too large: max = 1540; actual = "+r.length);var i=[],s=void 0,a=(0,o.splitPath)(t),u=1+4*a.length,c=e.alloc(u);c[0]=a.length,a.forEach((function(e,t){c.writeUInt32BE(e,1+4*t)}));var l=150-u;if(r.length<=l)i.push(e.concat([c,r]));else{var f=e.alloc(l),h=0;for(r.copy(f,0,h,l),i.push(e.concat([c,f])),h+=l;h<r.length;){var p=r.length-h;l=p<150?p:150,f=e.alloc(l),r.copy(f,0,h,h+l),h+=l,i.push(f)}}var d=!1;return(0,o.foreach)(i,(function(t,r){return n.transport.send(224,d?16:4,0===r?0:128,r===i.length-1?0:128,t,[36864,27013,27684,27685,28162]).then((function(t){28162===e.from(t.slice(t.length-2)).readUInt16BE(0)&&(d=!0,i.push(e.alloc(0))),s=t}))})).then((function(){var i=e.from(s.slice(s.length-2)).readUInt16BE(0);if(36864===i)return{signature:e.from(s.slice(0,s.length-2))};if(27684===i)return n.signHash_private(t,(0,o.hash)(r));if(27685===i)return n.signHash_private(t,(0,o.hash)(r));throw new Error("Transaction approval request was rejected")}))}},{key:"signHash",value:function(e,t){return(0,o.checkStellarBip32Path)(e),this.signHash_private(e,t)}},{key:"signHash_private",value:function(t,r){var n=this,i=[],s=void 0,a=(0,o.splitPath)(t),u=e.alloc(1+4*a.length);u[0]=a.length,a.forEach((function(e,t){u.writeUInt32BE(e,1+4*t)})),i.push(e.concat([u,r]));var c=!1;return(0,o.foreach)(i,(function(t){return n.transport.send(224,c?16:8,0,0,t,[36864,27013,27750,27904,28162]).then((function(t){28162===e.from(t.slice(t.length-2)).readUInt16BE(0)&&(c=!0,i.push(e.alloc(0))),s=t}))})).then((function(){var t=e.from(s.slice(s.length-2)).readUInt16BE(0);if(36864===t)return{signature:e.from(s.slice(0,s.length-2))};throw 27013===t?new Error("Transaction approval request was rejected"):27904===t?new Error("Hash signing is not supported"):new Error("Hash signing not allowed. Have you enabled it in the app settings?")}))}}]),t}();t.default=i}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(483),a=r(486),u=(n=a)&&n.__esModule?n:{default:n},c=r(488),l=r(212);function f(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,r){return function n(o,i){try{var s=t[o](i),a=s.value}catch(e){return void r(e)}if(!s.done)return Promise.resolve(a).then((function(e){n("next",e)}),(function(e){n("throw",e)}));e(a)}("next")}))}}var h=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},p=function(e){return e.replace(/-/g,"+").replace(/_/g,"/")+"==".substring(0,3*e.length%4)};function d(t,r,n,o){var i=function(t,r){for(var n=e.alloc(t.length),o=0;o<t.length;o++)n[o]=t[o]^r[o%r.length];return n}(t,n),a=e.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),u={version:"U2F_V2",keyHandle:h(i.toString("base64")),challenge:h(a.toString("base64")),appId:location.origin};return(0,c.log)("apdu","=> "+t.toString("hex")),(0,s.sign)(u,r/1e3).then((function(t){var r=t.signatureData;if("string"==typeof r){var n=e.from(p(r),"base64"),i=void 0;return i=o?n.slice(5):n,(0,c.log)("apdu","<= "+i.toString("hex")),i}throw t}))}var y=[];var v=function(t){var r,n;function s(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return e.unwrap=!0,y.push(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,t),i(s,null,[{key:"open",value:(r=f(regeneratorRuntime.mark((function e(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1],regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new s);case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})}]),i(s,[{key:"exchange",value:(n=f(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,d(t,this.exchangeTimeout,this.scrambleKey,this.unwrap);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),"object"!==o(e.t0.metaData)){e.next=14;break}throw 5===e.t0.metaData.code&&(y.forEach((function(e){return e.emit("disconnect")})),y=[]),r=e.t0,n="Failed to sign with Ledger device: U2F "+e.t0.metaData.type,i="U2F_"+e.t0.metaData.code,s=void 0,(s=new l.TransportError(n,i)).originalError=r,s;case 14:throw e.t0;case 15:case"end":return e.stop()}var r,n,i,s}),e,this,[[0,6]])}))),function(e){return n.apply(this,arguments)})},{key:"setScrambleKey",value:function(t){this.scrambleKey=e.from(t,"ascii")}},{key:"setUnwrap",value:function(e){this.unwrap=e}},{key:"close",value:function(){return Promise.resolve()}}]),s}(u.default);v.isSupported=s.isSupported,v.list=function(){return(0,s.isSupported)().then((function(e){return e?[null]:[]}))},v.listen=function(e){var t=!1;return(0,s.isSupported)().then((function(r){t||(r?(e.next({type:"add",descriptor:null}),e.complete()):e.error(new l.TransportError("U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension. Also make sure you're on an HTTPS connection","U2FNotSupported")))})),{unsubscribe:function(){t=!0}}},t.default=v}).call(this,r(1).Buffer)},function(e,t,r){(function(t){e.exports=
/*!
* Fast "async" scrypt implementation in JavaScript.
* Copyright (c) 2013-2016 Dmitry Chestnykh | BSD License
* https://github.com/dchest/scrypt-async-js
*/
function(e,r,n,o,i,s,a,u){"use strict";function c(e){var t=[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],r=1779033703,n=3144134277,o=1013904242,i=2773480762,s=1359893119,a=2600822924,u=528734635,c=1541459225,l=new Array(64);function f(e){for(var f=0,h=e.length;h>=64;){var p,d,y,v,g,m=r,w=n,_=o,b=i,E=s,S=a,A=u,O=c;for(d=0;d<16;d++)y=f+4*d,l[d]=(255&e[y])<<24|(255&e[y+1])<<16|(255&e[y+2])<<8|255&e[y+3];for(d=16;d<64;d++)v=((p=l[d-2])>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,g=((p=l[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,l[d]=(v+l[d-7]|0)+(g+l[d-16]|0)|0;for(d=0;d<64;d++)v=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&S^~E&A)|0)+(O+(t[d]+l[d]|0)|0)|0,g=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&w^m&_^w&_)|0,O=A,A=S,S=E,E=b+v|0,b=_,_=w,w=m,m=v+g|0;r=r+m|0,n=n+w|0,o=o+_|0,i=i+b|0,s=s+E|0,a=a+S|0,u=u+A|0,c=c+O|0,f+=64,h-=64}}f(e);var h,p=e.length%64,d=e.length/536870912|0,y=e.length<<3,v=p<56?56:120,g=e.slice(e.length-p,e.length);for(g.push(128),h=p+1;h<v;h++)g.push(0);return g.push(d>>>24&255),g.push(d>>>16&255),g.push(d>>>8&255),g.push(d>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function l(e,t,r){e.length>64&&(e=c(e.push?e:Array.prototype.slice.call(e,0)));var n,o=64+t.length+4,i=new Array(o),s=new Array(64),a=[];for(n=0;n<64;n++)i[n]=54;for(n=0;n<e.length;n++)i[n]^=e[n];for(n=0;n<t.length;n++)i[64+n]=t[n];for(n=o-4;n<o;n++)i[n]=0;for(n=0;n<64;n++)s[n]=92;for(n=0;n<e.length;n++)s[n]^=e[n];function u(){for(var e=o-1;e>=o-4;e--){if(i[e]++,i[e]<=255)return;i[e]=0}}for(;r>=32;)u(),a=a.concat(c(s.concat(c(i)))),r-=32;return r>0&&(u(),a=a.concat(c(s.concat(c(i))).slice(0,r))),a}function f(e,t,r,n){var o,i,s=e[0]^t[r++],a=e[1]^t[r++],u=e[2]^t[r++],c=e[3]^t[r++],l=e[4]^t[r++],f=e[5]^t[r++],h=e[6]^t[r++],p=e[7]^t[r++],d=e[8]^t[r++],y=e[9]^t[r++],v=e[10]^t[r++],g=e[11]^t[r++],m=e[12]^t[r++],w=e[13]^t[r++],_=e[14]^t[r++],b=e[15]^t[r++],E=s,S=a,A=u,O=c,x=l,k=f,T=h,P=p,R=d,C=y,I=v,N=g,j=m,M=w,U=_,B=b;for(i=0;i<8;i+=2)E^=(o=(j^=(o=(R^=(o=(x^=(o=E+j)<<7|o>>>25)+E)<<9|o>>>23)+x)<<13|o>>>19)+R)<<18|o>>>14,k^=(o=(S^=(o=(M^=(o=(C^=(o=k+S)<<7|o>>>25)+k)<<9|o>>>23)+C)<<13|o>>>19)+M)<<18|o>>>14,I^=(o=(T^=(o=(A^=(o=(U^=(o=I+T)<<7|o>>>25)+I)<<9|o>>>23)+U)<<13|o>>>19)+A)<<18|o>>>14,B^=(o=(N^=(o=(P^=(o=(O^=(o=B+N)<<7|o>>>25)+B)<<9|o>>>23)+O)<<13|o>>>19)+P)<<18|o>>>14,E^=(o=(O^=(o=(A^=(o=(S^=(o=E+O)<<7|o>>>25)+E)<<9|o>>>23)+S)<<13|o>>>19)+A)<<18|o>>>14,k^=(o=(x^=(o=(P^=(o=(T^=(o=k+x)<<7|o>>>25)+k)<<9|o>>>23)+T)<<13|o>>>19)+P)<<18|o>>>14,I^=(o=(C^=(o=(R^=(o=(N^=(o=I+C)<<7|o>>>25)+I)<<9|o>>>23)+N)<<13|o>>>19)+R)<<18|o>>>14,B^=(o=(U^=(o=(M^=(o=(j^=(o=B+U)<<7|o>>>25)+B)<<9|o>>>23)+j)<<13|o>>>19)+M)<<18|o>>>14;t[n++]=e[0]=E+s|0,t[n++]=e[1]=S+a|0,t[n++]=e[2]=A+u|0,t[n++]=e[3]=O+c|0,t[n++]=e[4]=x+l|0,t[n++]=e[5]=k+f|0,t[n++]=e[6]=T+h|0,t[n++]=e[7]=P+p|0,t[n++]=e[8]=R+d|0,t[n++]=e[9]=C+y|0,t[n++]=e[10]=I+v|0,t[n++]=e[11]=N+g|0,t[n++]=e[12]=j+m|0,t[n++]=e[13]=M+w|0,t[n++]=e[14]=U+_|0,t[n++]=e[15]=B+b|0}function h(e,t,r,n,o){for(;o--;)e[t++]=r[n++]}function p(e,t,r,n,o){for(;o--;)e[t++]^=r[n++]}function d(e,t,r,n,o){h(e,0,t,r+16*(2*o-1),16);for(var i=0;i<2*o;i+=2)f(e,t,r+16*i,n+8*i),f(e,t,r+16*i+16,n+8*i+16*o)}function y(e,t,r){return e[t+16*(2*r-1)]}function v(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<128)t.push(n);else if(n<2048)t.push(192|n>>6),t.push(128|63&n);else if(n<55296)t.push(224|n>>12),t.push(128|n>>6&63),t.push(128|63&n);else{if(r>=e.length-1)throw new Error("invalid string");r++,n=(1023&n)<<10,n|=1023&e.charCodeAt(r),n+=65536,t.push(240|n>>18),t.push(128|n>>12&63),t.push(128|n>>6&63),t.push(128|63&n)}}return t}var g=1;if("object"==typeof n){if(arguments.length>4)throw new Error("scrypt: incorrect number of arguments");var m=n;if(a=o,void 0===(n=m.logN)){if(void 0===m.N)throw new Error("scrypt: missing N parameter");if(m.N<2||m.N>-1>>>0)throw new Error("scrypt: N is out of range");if(0!=(m.N&m.N-1))throw new Error("scrypt: N is not a power of 2");n=Math.log(m.N)/Math.LN2}g=m.p||1,o=m.r,i=m.dkLen||32,s=m.interruptStep||0,u=m.encoding}if(g<1)throw new Error("scrypt: invalid p");if(o<=0)throw new Error("scrypt: invalid r");if(n<1||n>31)throw new Error("scrypt: logN must be between 1 and 31");var w,_,b,E,S=1<<n>>>0;if(o*g>=1<<30||o>(-1>>>0)/128/g||o>(-1>>>0)/256||S>(-1>>>0)/128/o)throw new Error("scrypt: parameters are too large");"string"==typeof e&&(e=v(e)),"string"==typeof r&&(r=v(r)),"undefined"!=typeof Int32Array?(w=new Int32Array(64*o),_=new Int32Array(32*S*o),E=new Int32Array(16)):(w=[],_=[],E=new Array(16)),b=l(e,r,128*g*o);var A=0,O=32*o;function x(e){for(var t=0;t<32*o;t++){var r=e+4*t;w[A+t]=(255&b[r+3])<<24|(255&b[r+2])<<16|(255&b[r+1])<<8|(255&b[r+0])<<0}}function k(e,t){for(var r=e;r<t;r+=2)h(_,r*(32*o),w,A,32*o),d(E,w,A,O,o),h(_,(r+1)*(32*o),w,O,32*o),d(E,w,O,A,o)}function T(e,t){for(var r=e;r<t;r+=2){var n=y(w,A,o)&S-1;p(w,A,_,n*(32*o),32*o),d(E,w,A,O,o),n=y(w,O,o)&S-1,p(w,O,_,n*(32*o),32*o),d(E,w,O,A,o)}}function P(e){for(var t=0;t<32*o;t++){var r=w[A+t];b[e+4*t+0]=r>>>0&255,b[e+4*t+1]=r>>>8&255,b[e+4*t+2]=r>>>16&255,b[e+4*t+3]=r>>>24&255}}var R=void 0!==t?t:setTimeout;function C(e,t,r,n,o){!function i(){R((function(){n(e,e+r<t?e+r:t),(e+=r)<t?i():o()}))}()}function I(t){var r=l(e,b,i);return"base64"===t?function(e){for(var t,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),n=e.length,o=[],i=0;i<n;)t=((i<n?e[i++]:0)<<16)+((i<n?e[i++]:0)<<8)+(i<n?e[i++]:0),o.push(r[t>>>18&63]),o.push(r[t>>>12&63]),o.push(r[t>>>6&63]),o.push(r[t>>>0&63]);return n%3>0&&(o[o.length-1]="=",n%3==1&&(o[o.length-2]="=")),o.join("")}(r):"hex"===t?function(e){for(var t="0123456789abcdef".split(""),r=e.length,n=[],o=0;o<r;o++)n.push(t[e[o]>>>4&15]),n.push(t[e[o]>>>0&15]);return n.join("")}(r):"binary"===t?new Uint8Array(r):r}"function"==typeof s&&(u=a,a=s,s=1e3),s<=0?function(){for(var e=0;e<g;e++)x(128*e*o),k(0,S),T(0,S),P(128*e*o);a(I(u))}():function e(t){x(128*t*o),C(0,S,2*s,k,(function(){C(0,S,2*s,T,(function(){P(128*t*o),t+1<g?R((function(){e(t+1)})):a(I(u))}))}))}(0)}}).call(this,r(208).setImmediate)},function(e,t,r){var n=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new k(n||[]);return i._invoke=function(e,t,r){var n=l;return function(o,i){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var s=r.delegate;if(s){var a=A(s,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var u=c(e,t,r);if("normal"===u.type){if(n=r.done?p:f,u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(e,r,s),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function y(){}function v(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,i)&&(m=_);var b=g.prototype=y.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,s){var a=c(e[r],e,o);if("throw"!==a.type){var u=a.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,i,s)}),(function(e){t("throw",e,i,s)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,s)}))}s(a.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function A(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=c(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return s.next=s}}return{next:P}}function P(){return{value:t,done:!0}}return v.prototype=b.constructor=g,g.constructor=v,g[a]=v.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},E(S.prototype),S.prototype[s]=function(){return this},e.AsyncIterator=S,e.async=function(t,r,n,o){var i=new S(u(t,r,n,o));return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(b),b[a]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){(function(t,r){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,s=void 0,a=function(e,t){d[o]=e,d[o+1]=t,2===(o+=2)&&(s?s(y):_())},u="undefined"!=typeof window?window:void 0,c=u||{},l=c.MutationObserver||c.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(y,1)}}var d=new Array(1e3);function y(){for(var e=0;e<o;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;o=0}var v,g,m,w,_=void 0;function b(e,t){var r=this,n=new this.constructor(A);void 0===n[S]&&B(n);var o=r._state;if(o){var i=arguments[o-1];a((function(){return M(o,n,i,r._result)}))}else N(r,n,e,t);return n}function E(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return P(t,e),t}f?_=function(){return t.nextTick(y)}:l?(g=0,m=new l(y),w=document.createTextNode(""),m.observe(w,{characterData:!0}),_=function(){w.data=g=++g%2}):h?((v=new MessageChannel).port1.onmessage=y,_=function(){return v.port2.postMessage(0)}):_=void 0===u?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(y)}:p()}catch(e){return p()}}():p();var S=Math.random().toString(36).substring(2);function A(){}var O=void 0,x=1,k=2;function T(t,r,n){r.constructor===t.constructor&&n===b&&r.constructor.resolve===E?function(e,t){t._state===x?C(e,t._result):t._state===k?I(e,t._result):N(t,void 0,(function(t){return P(e,t)}),(function(t){return I(e,t)}))}(t,r):void 0===n?C(t,r):e(n)?function(e,t,r){a((function(e){var n=!1,o=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(r,t,(function(r){n||(n=!0,t!==r?P(e,r):C(e,r))}),(function(t){n||(n=!0,I(e,t))}),e._label);!n&&o&&(n=!0,I(e,o))}),e)}(t,r,n):C(t,r)}function P(e,t){if(e===t)I(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(n=t),null===n||"object"!==o&&"function"!==o)C(e,t);else{var r=void 0;try{r=t.then}catch(t){return void I(e,t)}T(e,t,r)}var n,o}function R(e){e._onerror&&e._onerror(e._result),j(e)}function C(e,t){e._state===O&&(e._result=t,e._state=x,0!==e._subscribers.length&&a(j,e))}function I(e,t){e._state===O&&(e._state=k,e._result=t,a(R,e))}function N(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+x]=r,o[i+k]=n,0===i&&e._state&&a(j,e)}function j(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)n=t[s],o=t[s+r],n?M(r,n,o,i):o(i);e._subscribers.length=0}}function M(t,r,n,o){var i=e(n),s=void 0,a=void 0,u=!0;if(i){try{s=n(o)}catch(e){u=!1,a=e}if(r===s)return void I(r,new TypeError("A promises callback cannot return that same promise."))}else s=o;r._state!==O||(i&&u?P(r,s):!1===u?I(r,a):t===x?C(r,s):t===k&&I(r,s))}var U=0;function B(e){e[S]=U++,e._state=void 0,e._result=void 0,e._subscribers=[]}var L=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[S]||B(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?C(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&C(this.promise,this._result))):I(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===E){var o=void 0,i=void 0,s=!1;try{o=e.then}catch(e){s=!0,i=e}if(o===b&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===D){var a=new r(A);s?I(a,i):T(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===O&&(this._remaining--,e===k?I(n,r):this._result[t]=r),0===this._remaining&&C(n,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;N(e,void 0,(function(e){return r._settledAt(x,t,e)}),(function(e){return r._settledAt(k,t,e)}))},e}(),D=function(){function t(e){this[S]=U++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){P(e,t)}),(function(t){I(e,t)}))}catch(t){I(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return D.prototype.then=b,D.all=function(e){return new L(this,e).promise},D.race=function(e){var t=this;return n(e)?new t((function(r,n){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},D.resolve=E,D.reject=function(e){var t=new this(A);return I(t,e),t},D._setScheduler=function(e){s=e},D._setAsap=function(e){a=e},D._asap=a,D.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=D},D.Promise=D,D},e.exports=n()}).call(this,r(16),r(5))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){!function(e){e.createAccount="create_account",e.payment="payment",e.pathPayment="path_payment",e.createPassiveOffer="create_passive_offer",e.manageOffer="manage_offer",e.setOptions="set_options",e.changeTrust="change_trust",e.allowTrust="allow_trust",e.accountMerge="account_merge",e.inflation="inflation",e.manageData="manage_data",e.bumpSequence="bump_sequence"}(e.OperationResponseType||(e.OperationResponseType={})),function(e){e[e.createAccount=0]="createAccount",e[e.payment=1]="payment",e[e.pathPayment=2]="pathPayment",e[e.createPassiveOffer=3]="createPassiveOffer",e[e.manageOffer=4]="manageOffer",e[e.setOptions=5]="setOptions",e[e.changeTrust=6]="changeTrust",e[e.allowTrust=7]="allowTrust",e[e.accountMerge=8]="accountMerge",e[e.inflation=9]="inflation",e[e.manageData=10]="manageData",e[e.bumpSequence=11]="bumpSequence"}(e.OperationResponseTypeI||(e.OperationResponseTypeI={})),function(e){e.TX_FAILED="tx_failed",e.TX_BAD_SEQ="tx_bad_seq",e.TX_BAD_AUTH="tx_bad_auth",e.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra"}(e.TransactionFailedResultCodes||(e.TransactionFailedResultCodes={}))}(t.Horizon||(t.Horizon={}))},function(e,t,r){var n=r(78),o=r(79),i=r(35);e.exports=function(e,t){return null==e?e:n(e,o(t),i)}},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),s=n(t),a=s.length;a--;){var u=s[e?a:++o];if(!1===r(i[u],u,i))break}return t}}},function(e,t,r){var n=r(21),o=r(14),i="[object Arguments]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t,r){var n=r(36),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var o=s.call(e);return n&&(t?e[a]=r:delete e[a]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,r){var n=r(21),o=r(81),i=r(14),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[n(e)]}},function(e,t,r){var n=r(17),o=r(59),i=r(228),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&r.push(a);return r}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},function(e,t,r){var n=r(10),o=r(37),i=r(24).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var h=0;h<80;++h){var p=~~(h/20),d=0|((t=n)<<5|t>>>27)+l(p,o,i,a)+u+r[h]+s[p];u=a,a=i,i=c(o),o=n,n=d}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),s=n[0],a=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===a&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],s=0,a=r-o;s<a;s+=16383)i.push(l(e,s,s+16383>a?a:s+16383));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],o[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var o,i,s=[],a=t;a<r;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},function(e,t,r){var n=r(10),o=r(37),i=r(24).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,o.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var p=0;p<80;++p){var d=~~(p/20),y=c(n)+f(d,o,i,a)+u+r[p]+s[d]|0;u=a,a=i,i=l(o),o=n,n=y}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(10),o=r(123),i=r(37),s=r(24).Buffer,a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}n(u,o),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var n=r(10),o=r(124),i=r(37),s=r(24).Buffer,a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}n(u,o),u.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},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t){},function(e,t){},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58Check=function(t,r){var a=o.default.decode(r),c=a[0],l=a.slice(0,a.length-4),f=l.slice(1),h=a.slice(a.length-4),p=u[t];if((0,n.default)(p))throw new Error(t+' is not a valid version byte name. expected one of "accountId", "seed", or "none"');if(c!==p)throw new Error("invalid version byte. expected "+p+", got "+c);var d=function(e){var t=(0,i.hash)(e);return(0,i.hash)(t).slice(0,4)}(l);if(!(0,s.verifyChecksum)(d,h))throw new Error("invalid checksum");if("accountId"===t&&37!==a.length)throw new Error("Decoded address length is invalid. Expected 37, got "+a.length);return e.from(f)};var n=a(r(9)),o=a(r(238)),i=r(48),s=r(126);function a(e){return e&&e.__esModule?e:{default:e}}var u={accountId:0,none:1,seed:33}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";for(var n="gsphnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCr65jkm8oFqi1tuvAxyz",o={},i=0;i<n.length;++i)o[n.charAt(i)]=i;var s=58;e.exports={decode:function(e){if(0===e.length)return[];var t,r,n=[0];for(t=0;t<e.length;++t){var i=e[t];if(!(i in o))throw new Error("Non-base58 character");for(r=0;r<n.length;++r)n[r]*=s;n[0]+=o[i];var a=0;for(r=0;r<n.length;++r)n[r]+=a,a=n[r]>>8,n[r]&=255;for(;a;)n.push(255&a),a>>=8}for(t=0;"g"===e[t]&&t<e.length-1;++t)n.push(0);return n.reverse()}}},function(e,t,r){e.exports=r(240)},function(e,t,r){var n=r(39),o=r(133),i=r(35),s=o((function(e,t){n(t,i(t),e)}));e.exports=s},function(e,t,r){var n=r(60),o=r(242),i=r(17),s=r(132),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?h:a).test(s(e))}},function(e,t,r){var n,o=r(243),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},function(e,t,r){var n=r(13)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(57),o=r(246),i=r(248);e.exports=function(e,t){return i(o(e,t,n),e+"")}},function(e,t,r){var n=r(247),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=o(i.length-t,0),u=Array(a);++s<a;)u[s]=i[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=i[s];return c[t]=r(u),n(e,this,c)}}},function(e,t){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},function(e,t,r){var n=r(249),o=r(251)(n);e.exports=o},function(e,t,r){var n=r(250),o=r(131),i=r(57),s=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=s},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var r=800,n=16,o=Date.now;e.exports=function(e){var t=0,i=0;return function(){var s=o(),a=n-(s-i);if(i=s,a>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(253),s=(n=i)&&n.__esModule?n:{default:n},a=r(62);t.Cursor=function(t){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),o(r,[{key:"writeBufferPadded",value:function(t){var n=(0,a.calculatePadding)(t.length),o=e.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(o))}}]),r}(s.default)}).call(this,r(1).Buffer)},function(e,t,r){(function(t){var n=function(e){if(!(this instanceof n))return new n(e);e instanceof t||(e=new t(e)),this._setBuffer(e),this.rewind()};n.prototype._setBuffer=function(e){this._buffer=e,this.length=e.length},n.prototype.buffer=function(){return this._buffer},n.prototype.tap=function(e){return e(this),this},n.prototype.clone=function(e){var t=new this.constructor(this.buffer());return t.seek(0===arguments.length?this.tell():e),t},n.prototype.tell=function(){return this._index},n.prototype.seek=function(e,t){return 1==arguments.length&&(t=e,e="="),"+"==e?this._index+=t:"-"==e?this._index-=t:this._index=t,this},n.prototype.rewind=function(){return this.seek(0)},n.prototype.eof=function(){return this.tell()==this.buffer().length},n.prototype.write=function(e,t,r){return this.seek("+",this.buffer().write(e,this.tell(),t,r))},n.prototype.fill=function(e,t){return 1==arguments.length&&(t=this.buffer().length-this.tell()),this.buffer().fill(e,this.tell(),this.tell()+t),this.seek("+",t),this},n.prototype.slice=function(e){0===arguments.length&&(e=this.length-this.tell());var t=new this.constructor(this.buffer().slice(this.tell(),this.tell()+e));return this.seek("+",e),t},n.prototype.copyFrom=function(e){var r=e instanceof t?e:e.buffer();return r.copy(this.buffer(),this.tell(),0,r.length),this.seek("+",r.length),this},n.prototype.concat=function(e){for(var r in e)e[r]instanceof n&&(e[r]=e[r].buffer());e.unshift(this.buffer());var o=t.concat(e);return this._setBuffer(o),this},n.prototype.toString=function(e,t){0===arguments.length?(e="utf8",t=this.buffer().length-this.tell()):1===arguments.length&&(t=this.buffer().length-this.tell());var r=this.buffer().toString(e,this.tell(),this.tell()+t);return this.seek("+",t),r},[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){n.prototype[t]=function(){var r=this.buffer()[t](this.tell());return this.seek("+",e[0]),r}}))})),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){n.prototype[t]=function(r){return r=this.buffer()[t](r,this.tell()),this.seek("+",e[0]),this}}))})),n.extend=function(e,t){var n=this;for(var o in 1===arguments.length&&(t=e,e=null),t=t||{},e=e||function(t){if(!(this instanceof e))return new e(t);n.call(this,t)},r(135).inherits(e,n),e.extend=n.extend,e.define=n.define,t)e.define(o,t[o]);return e},n.define=function(e,t){var r=this.prototype[e];this.prototype[e]=r&&function(){return this.__super=r,t.apply(this,arguments)}||t},e.exports=n}).call(this,r(1).Buffer)},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}},function(e,t,r){var n=r(86);e.exports=function(e,t){var r=!0;return n(e,(function(e,n,o){return r=!!t(e,n,o)})),r}},function(e,t,r){var n=r(78),o=r(40);e.exports=function(e,t){return e&&n(e,t,o)}},function(e,t,r){var n=r(137)(Object.keys,Object);e.exports=n},function(e,t,r){var n=r(26);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&!1!==o(a[s],s,a););return r}}},function(e,t,r){var n=r(262),o=r(300),i=r(145);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},function(e,t,r){var n=r(63),o=r(89),i=1,s=2;e.exports=function(e,t,r,a){var u=r.length,c=u,l=!a;if(null==e)return!c;for(e=Object(e);u--;){var f=r[u];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<c;){var h=(f=r[u])[0],p=e[h],d=f[1];if(l&&f[2]){if(void 0===p&&!(h in e))return!1}else{var y=new n;if(a)var v=a(p,d,h,e,t,y);if(!(void 0===v?o(d,p,i|s,a,y):v))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(65),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},function(e,t,r){var n=r(65);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(65);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(65);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(64);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(64),o=r(87),i=r(88),s=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<s-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(274),o=r(64),i=r(87);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(e,t,r){var n=r(275),o=r(276),i=r(277),s=r(278),a=r(279);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=a,e.exports=u},function(e,t,r){var n=r(66);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,r){var n=r(66),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===o?void 0:r}return i.call(t,e)?t[e]:void 0}},function(e,t,r){var n=r(66),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},function(e,t,r){var n=r(66),o="__lodash_hash_undefined__";e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?o:t,this}},function(e,t,r){var n=r(67);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,r){var n=r(67);e.exports=function(e){return n(this,e).get(e)}},function(e,t,r){var n=r(67);e.exports=function(e){return n(this,e).has(e)}},function(e,t,r){var n=r(67);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},function(e,t,r){var n=r(63),o=r(139),i=r(291),s=r(294),a=r(51),u=r(6),c=r(45),l=r(58),f=1,h="[object Arguments]",p="[object Array]",d="[object Object]",y=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,v,g,m){var w=u(e),_=u(t),b=w?p:a(e),E=_?p:a(t),S=(b=b==h?d:b)==d,A=(E=E==h?d:E)==d,O=b==E;if(O&&c(e)){if(!c(t))return!1;w=!0,S=!1}if(O&&!S)return m||(m=new n),w||l(e)?o(e,t,r,v,g,m):i(e,t,b,r,v,g,m);if(!(r&f)){var x=S&&y.call(e,"__wrapped__"),k=A&&y.call(t,"__wrapped__");if(x||k){var T=x?e.value():e,P=k?t.value():t;return m||(m=new n),g(T,P,r,v,m)}}return!!O&&(m||(m=new n),s(e,t,r,v,g,m))}},function(e,t,r){var n=r(88),o=r(287),i=r(288);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=o,s.prototype.has=i,e.exports=s},function(e,t){var r="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,r),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,r){var n=r(36),o=r(140),i=r(50),s=r(139),a=r(292),u=r(293),c=1,l=2,f="[object Boolean]",h="[object Date]",p="[object Error]",d="[object Map]",y="[object Number]",v="[object RegExp]",g="[object Set]",m="[object String]",w="[object Symbol]",_="[object ArrayBuffer]",b="[object DataView]",E=n?n.prototype:void 0,S=E?E.valueOf:void 0;e.exports=function(e,t,r,n,E,A,O){switch(r){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!A(new o(e),new o(t)));case f:case h:case y:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case v:case m:return e==t+"";case d:var x=a;case g:var k=n&c;if(x||(x=u),e.size!=t.size&&!k)return!1;var T=O.get(e);if(T)return T==t;n|=l,O.set(e,t);var P=s(x(e),x(t),n,E,A,O);return O.delete(e),P;case w:if(S)return S.call(e)==S.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},function(e,t,r){var n=r(141),o=1,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,s,a,u){var c=r&o,l=n(e),f=l.length;if(f!=n(t).length&&!c)return!1;for(var h=f;h--;){var p=l[h];if(!(c?p in t:i.call(t,p)))return!1}var d=u.get(e);if(d&&u.get(t))return d==t;var y=!0;u.set(e,t),u.set(t,e);for(var v=c;++h<f;){var g=e[p=l[h]],m=t[p];if(s)var w=c?s(m,g,p,t,e,u):s(g,m,p,e,t,u);if(!(void 0===w?g===m||a(g,m,r,s,u):w)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var _=e.constructor,b=t.constructor;_!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(y=!1)}return u.delete(e),u.delete(t),y}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}},function(e,t,r){var n=r(27)(r(13),"DataView");e.exports=n},function(e,t,r){var n=r(27)(r(13),"Promise");e.exports=n},function(e,t,r){var n=r(27)(r(13),"Set");e.exports=n},function(e,t,r){var n=r(27)(r(13),"WeakMap");e.exports=n},function(e,t,r){var n=r(144),o=r(40);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,n(s)]}return t}},function(e,t,r){var n=r(89),o=r(302),i=r(306),s=r(92),a=r(144),u=r(145),c=r(69),l=1,f=2;e.exports=function(e,t){return s(e)&&a(t)?u(c(e),t):function(r){var s=o(r,e);return void 0===s&&s===t?i(r,e):n(t,s,l|f)}}},function(e,t,r){var n=r(146);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},function(e,t,r){var n=r(304),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=s},function(e,t,r){var n=r(305),o=500;e.exports=function(e){var t=n(e,(function(e){return r.size===o&&r.clear(),e})),r=t.cache;return t}},function(e,t,r){var n=r(88),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},function(e,t,r){var n=r(307),o=r(308);e.exports=function(e,t){return null!=e&&o(e,t,n)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,r){var n=r(147),o=r(44),i=r(6),s=r(80),a=r(81),u=r(69);e.exports=function(e,t,r){for(var c=-1,l=(t=n(t,e)).length,f=!1;++c<l;){var h=u(t[c]);if(!(f=null!=e&&r(e,h)))break;e=e[h]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&a(l)&&s(h,l)&&(i(e)||o(e))}},function(e,t,r){var n=r(148),o=r(310),i=r(92),s=r(69);e.exports=function(e){return i(e)?n(s(e)):o(e)}},function(e,t,r){var n=r(146);e.exports=function(e){return function(t){return n(t,e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hyper=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(n):void 0},i=a(r(149)),s=a(r(7));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.Hyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!1))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a Hyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^-?\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!1);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!1);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,s.default)(u),u.MAX_VALUE=new u(i.default.MAX_VALUE.low,i.default.MAX_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedHyper=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var s=o.get;return void 0!==s?s.call(n):void 0},i=a(r(149)),s=a(r(7));function a(e){return e&&e.__esModule?e:{default:e}}var u=t.UnsignedHyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not an UnsignedHyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!0);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!0);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,s.default)(u),u.MAX_VALUE=new u(i.default.MAX_UNSIGNED_VALUE.low,i.default.MAX_UNSIGNED_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float=void 0;var n=i(r(49)),o=i(r(7));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Double=void 0;var n=i(r(49)),o=i(r(7));function i(e){return e&&e.__esModule?e:{default:e}}var s=t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(s)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quadruple=void 0;var n,o=r(7),i=(n=o)&&n.__esModule?n:{default:n};var s=t.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,i.default)(s)},function(e,t,r){var n=r(21),o=r(14),i="[object Boolean]";e.exports=function(e){return!0===e||!1===e||o(e)&&n(e)==i}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.String=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(20)),i=l(r(6)),s=r(38),a=r(70),u=r(62),c=l(r(7));function l(e){return e&&e.__esModule?e:{default:e}}var f=t.String=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.UnsignedInt.MAX_VALUE;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._maxLength=e}return n(t,[{key:"read",value:function(e){var t=s.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length String,max allowed is "+this._maxLength);var r=(0,u.calculatePadding)(t),n=e.slice(t);return(0,u.slicePadding)(e,r),n.buffer()}},{key:"readString",value:function(e){return this.read(e).toString("utf8")}},{key:"write",value:function(t,r){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,max allows is "+this._maxLength);var n=void 0;n=(0,o.default)(t)?e.from(t,"utf8"):e.from(t),s.Int.write(n.length,r),r.writeBufferPadded(n)}},{key:"isValid",value:function(t){var r=void 0;if((0,o.default)(t))r=e.from(t,"utf8");else{if(!(0,i.default)(t)&&!e.isBuffer(t))return!1;r=e.from(t)}return r.length<=this._maxLength}}]),t}();(0,c.default)(f.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Opaque=void 0;var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(62),s=r(7),a=(n=s)&&n.__esModule?n:{default:n};var u=t.Opaque=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._length=e,this._padding=(0,i.calculatePadding)(e)}return o(t,[{key:"read",value:function(e){var t=e.slice(this._length);return(0,i.slicePadding)(e,this._padding),t.buffer()}},{key:"write",value:function(e,t){if(e.length!==this._length)throw new Error("XDR Write Error: Got "+e.length+" bytes, expected "+this._length);t.writeBufferPadded(e)}},{key:"isValid",value:function(t){return e.isBuffer(t)&&t.length===this._length}}]),t}();(0,a.default)(u.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.VarOpaque=void 0;var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(38),s=r(70),a=r(62),u=r(7),c=(n=u)&&n.__esModule?n:{default:n};var l=t.VarOpaque=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.UnsignedInt.MAX_VALUE;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._maxLength=e}return o(t,[{key:"read",value:function(e){var t=i.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length VarOpaque,max allowed is "+this._maxLength);var r=(0,a.calculatePadding)(t),n=e.slice(t);return(0,a.slicePadding)(e,r),n.buffer()}},{key:"write",value:function(e,t){if(e.length>this._maxLength)throw new Error("XDR Write Error: Got "+e.length+" bytes,max allows is "+this._maxLength);i.Int.write(e.length,t),t.writeBufferPadded(e)}},{key:"isValid",value:function(t){return e.isBuffer(t)&&t.length<=this._maxLength}}]),t}();(0,c.default)(l.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Array=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r(85)),i=c(r(28)),s=c(r(152)),a=c(r(6)),u=c(r(7));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Array=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t,this._length=r}return n(e,[{key:"read",value:function(e){var t=this;return(0,s.default)(this._length,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,a.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length!==this._length)throw new Error("XDR Write Error: Got array of size "+e.length+",expected "+this._length);(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,a.default)(e)&&(e.length===this._length&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,u.default)(l.prototype)},function(e,t,r){var n=r(151),o=r(86),i=r(79),s=r(6);e.exports=function(e,t){return(s(e)?n:o)(e,i(t))}},function(e,t,r){var n=r(154),o=1/0,i=17976931348623157e292;e.exports=function(e){return e?(e=n(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VarArray=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=f(r(85)),i=f(r(28)),s=f(r(152)),a=f(r(6)),u=r(70),c=r(38),l=f(r(7));function f(e){return e&&e.__esModule?e:{default:e}}var h=t.VarArray=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.UnsignedInt.MAX_VALUE;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t,this._maxLength=r}return n(e,[{key:"read",value:function(e){var t=this,r=c.Int.read(e);if(r>this._maxLength)throw new Error("XDR Read Error: Saw "+r+" length VarArray,max allowed is "+this._maxLength);return(0,s.default)(r,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,a.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+e.length+",max allowed is "+this._maxLength);c.Int.write(e.length,t),(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,a.default)(e)&&(!(e.length>this._maxLength)&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,l.default)(h.prototype)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r(128)),i=u(r(9)),s=r(150),a=u(r(7));function u(e){return e&&e.__esModule?e:{default:e}}var c=t.Option=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t}return n(e,[{key:"read",value:function(e){if(s.Bool.read(e))return this._childType.read(e)}},{key:"write",value:function(e,t){var r=!((0,o.default)(e)||(0,i.default)(e));s.Bool.write(r,t),r&&this._childType.write(e,t)}},{key:"isValid",value:function(e){return!!(0,o.default)(e)||(!!(0,i.default)(e)||this._childType.isValid(e))}}]),e}();(0,a.default)(c.prototype)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enum=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r(156)),i=c(r(28)),s=c(r(356)),a=r(38),u=c(r(7));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.Enum=function(){function e(t,r){l(this,e),this.name=t,this.value=r}return n(e,null,[{key:"read",value:function(e){var t=a.Int.read(e);if(!this._byValue.has(t))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+t);return this._byValue.get(t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: Unknown "+e+" is not a "+this.enumName);a.Int.write(e.value,t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,s.default)(this._members)}},{key:"fromName",value:function(e){var t=this._members[e];if(!t)throw new Error(e+" is not a member of "+this.enumName);return t}},{key:"fromValue",value:function(e){var t=this._byValue.get(e);if(!t)throw new Error(e+" is not a value of any member of "+this.enumName);return t}},{key:"create",value:function(t,r,n){var s=function(e){function t(){return l(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return s.enumName=r,t.results[r]=s,s._members={},s._byValue=new o.default,(0,i.default)(n,(function(e,t){var r=new s(t,e);s._members[t]=r,s._byValue.set(e,r),s[t]=function(){return r}})),s}}]),e}();(0,u.default)(f)},function(e,t){},function(e,t,r){"use strict";var n=r(328)(!0);r(98)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(96),o=r(97);e.exports=function(e){return function(t,r){var i,s,a=String(o(t)),u=n(r),c=a.length;return u<0||u>=c?e?"":void 0:(i=a.charCodeAt(u))<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):i:e?a.slice(u,u+2):s-56320+(i-55296<<10)+65536}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){e.exports=!r(32)&&!r(72)((function(){return 7!=Object.defineProperty(r(159)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(31);e.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){e.exports=r(29)},function(e,t,r){"use strict";var n=r(161),o=r(160),i=r(104),s={};r(29)(s,r(23)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(s,{next:o(1,r)}),i(e,t+" Iterator")}},function(e,t,r){var n=r(30),o=r(53),i=r(335);e.exports=r(32)?Object.defineProperties:function(e,t){o(e);for(var r,s=i(t),a=s.length,u=0;a>u;)n.f(e,r=s[u++],t[r]);return e}},function(e,t,r){var n=r(336),o=r(164);e.exports=Object.keys||function(e){return n(e,o)}},function(e,t,r){var n=r(54),o=r(99),i=r(337)(!1),s=r(102)("IE_PROTO");e.exports=function(e,t){var r,a=o(e),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;t.length>u;)n(a,r=t[u++])&&(~i(c,r)||c.push(r));return c}},function(e,t,r){var n=r(99),o=r(101),i=r(338);e.exports=function(e){return function(t,r,s){var a,u=n(t),c=o(u.length),l=i(s,c);if(e&&r!=r){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},function(e,t,r){var n=r(96),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=n(e))<0?o(e+t,0):i(e,t)}},function(e,t,r){var n=r(25).document;e.exports=n&&n.documentElement},function(e,t,r){var n=r(54),o=r(165),i=r(102)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,r){r(342);for(var n=r(25),o=r(29),i=r(55),s=r(23)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<a.length;u++){var c=a[u],l=n[c],f=l&&l.prototype;f&&!f[s]&&o(f,s,c),i[c]=i.Array}},function(e,t,r){"use strict";var n=r(343),o=r(166),i=r(55),s=r(99);e.exports=r(98)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t,r){"use strict";var n=r(345),o=r(171);e.exports=r(351)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=n.getEntry(o(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(o(this,"Map"),0===e?0:e,t)}},n,!0)},function(e,t,r){"use strict";var n=r(30).f,o=r(161),i=r(167),s=r(71),a=r(168),u=r(169),c=r(98),l=r(166),f=r(350),h=r(32),p=r(170).fastKey,d=r(171),y=h?"_s":"size",v=function(e,t){var r,n=p(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,c){var l=e((function(e,n){a(e,l,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[y]=0,null!=n&&u(n,r,e[c],e)}));return i(l.prototype,{clear:function(){for(var e=d(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[y]=0},delete:function(e){var r=d(this,t),n=v(r,e);if(n){var o=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=o),o&&(o.p=i),r._f==n&&(r._f=o),r._l==n&&(r._l=i),r[y]--}return!!n},forEach:function(e){d(this,t);for(var r,n=s(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!v(d(this,t),e)}}),h&&n(l.prototype,"size",{get:function(){return d(this,t)[y]}}),l},def:function(e,t,r){var n,o,i=v(e,t);return i?i.v=r:(e._l=i={i:o=p(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=i),n&&(n.n=i),e[y]++,"F"!==o&&(e._i[o]=i)),e},getEntry:v,setStrong:function(e,t,r){c(e,t,(function(e,r){this._t=d(e,t),this._k=r,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?l(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,l(1))}),r?"entries":"values",!r,!0),f(t)}}},function(e,t,r){var n=r(53);e.exports=function(e,t,r,o){try{return o?t(n(r)[0],r[1]):t(r)}catch(t){var i=e.return;throw void 0!==i&&n(i.call(e)),t}}},function(e,t,r){var n=r(55),o=r(23)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||i[o]===e)}},function(e,t,r){var n=r(349),o=r(23)("iterator"),i=r(55);e.exports=r(52).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){var n=r(100),o=r(23)("toStringTag"),i="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:i?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){"use strict";var n=r(25),o=r(52),i=r(30),s=r(32),a=r(23)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:n[e];s&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(25),o=r(158),i=r(170),s=r(72),a=r(29),u=r(167),c=r(169),l=r(168),f=r(31),h=r(104),p=r(30).f,d=r(352)(0),y=r(32);e.exports=function(e,t,r,v,g,m){var w=n[e],_=w,b=g?"set":"add",E=_&&_.prototype,S={};return y&&"function"==typeof _&&(m||E.forEach&&!s((function(){(new _).entries().next()})))?(_=t((function(t,r){l(t,_,e,"_c"),t._c=new w,null!=r&&c(r,g,t[b],t)})),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(e){var t="add"==e||"set"==e;e in E&&(!m||"clear"!=e)&&a(_.prototype,e,(function(r,n){if(l(this,_,e),!t&&m&&!f(r))return"get"==e&&void 0;var o=this._c[e](0===r?0:r,n);return t?this:o}))})),m||p(_.prototype,"size",{get:function(){return this._c.size}})):(_=v.getConstructor(t,e,g,b),u(_.prototype,r),i.NEED=!0),h(_,e),S[e]=_,o(o.G+o.W+o.F,S),m||v.setStrong(_,e,g),_}},function(e,t,r){var n=r(71),o=r(162),i=r(165),s=r(101),a=r(353);e.exports=function(e,t){var r=1==e,u=2==e,c=3==e,l=4==e,f=6==e,h=5==e||f,p=t||a;return function(t,a,d){for(var y,v,g=i(t),m=o(g),w=n(a,d,3),_=s(m.length),b=0,E=r?p(t,_):u?p(t,0):void 0;_>b;b++)if((h||b in m)&&(v=w(y=m[b],b,g),e))if(r)E[b]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return b;case 2:E.push(y)}else if(l)return!1;return f?-1:c||l?l:E}}},function(e,t,r){var n=r(354);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){var n=r(31),o=r(355),i=r(23)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){var n=r(100);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(357),o=r(40);e.exports=function(e){return null==e?[]:n(e,o(e))}},function(e,t,r){var n=r(95);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(28)),s=f(r(172)),a=f(r(9)),u=f(r(360)),c=r(105),l=f(r(7));function f(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=t.Struct=function(){function e(t){h(this,e),this._attributes=t||{}}return o(e,null,[{key:"read",value:function(e){var t=(0,s.default)(this._fields,(function(t){var r=n(t,2);return[r[0],r[1].read(e)]}));return new this((0,u.default)(t))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.structName);(0,i.default)(this._fields,(function(r){var o=n(r,2),i=o[0],s=o[1],a=e._attributes[i];s.write(a,t)}))}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var s=function(e){function t(){return h(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return s.structName=r,t.results[r]=s,s._fields=o.map((function(e){var r=n(e,2),o=r[0],i=r[1];return i instanceof c.Reference&&(i=i.resolve(t)),[o,i]})),(0,i.default)(s._fields,(function(e){var t=n(e,1)[0];s.prototype[t]=function(e){return function(t){return(0,a.default)(t)||(this._attributes[e]=t),this._attributes[e]}}(t)})),s}}]),e}();(0,l.default)(p)},function(e,t,r){var n=r(86),o=r(26);e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},function(e,t){e.exports=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Union=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=h(r(156)),s=h(r(28)),a=h(r(9)),u=h(r(20)),c=r(155),l=r(105),f=h(r(7));function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.Union=function(){function e(t,r){p(this,e),this.set(t,r)}return o(e,[{key:"set",value:function(e,t){(0,u.default)(e)&&(e=this.constructor._switchOn.fromName(e)),this._switch=e,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=t}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._arm;if(this._arm!==c.Void&&this._arm!==e)throw new Error(e+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(e){if(this._switches.has(e))return this._switches.get(e);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+e)}},{key:"armTypeForArm",value:function(e){return e===c.Void?c.Void:this._arms[e]}},{key:"read",value:function(e){var t=this._switchOn.read(e),r=this.armForSwitch(t),n=this.armTypeForArm(r);return new this(t,(0,a.default)(n)?r.read(e):n.read(e))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.unionName);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var f=function(e){function t(){return p(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);f.unionName=r,t.results[r]=f,o.switchOn instanceof l.Reference?f._switchOn=o.switchOn.resolve(t):f._switchOn=o.switchOn,f._switches=new i.default,f._arms={},(0,s.default)(o.arms,(function(e,r){e instanceof l.Reference&&(e=e.resolve(t)),f._arms[r]=e}));var h=o.defaultArm;return h instanceof l.Reference&&(h=h.resolve(t)),f._defaultArm=h,(0,s.default)(o.switches,(function(e){var t=n(e,2),r=t[0],o=t[1];(0,u.default)(r)&&(r=f._switchOn.fromName(r)),f._switches.set(r,o)})),(0,a.default)(f._switchOn.values)||(0,s.default)(f._switchOn.values(),(function(e){f[e.name]=function(t){return new f(e,t)},f.prototype[e.name]=function(t){return this.set(e,t)}})),(0,s.default)(f._arms,(function(e,t){e!==c.Void&&(f.prototype[t]=function(){return this.get(t)})})),f}}]),e}();(0,f.default)(d)},function(e,t){e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}},function(e,t,r){var n=r(364);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},function(e,t,r){var n=r(365),o=r(366),i=r(367);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},function(e,t){e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,s,a].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,s,a,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,r){var n=r(13).isFinite;e.exports=function(e){return"number"==typeof e&&n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.best_r=function(e){var t=new s.default(e),r=void 0,o=void 0,i=[[new s.default(0),new s.default(1)],[new s.default(1),new s.default(0)]],u=2;for(;!t.gt(a);){r=t.floor(),o=t.sub(r);var c=r.mul(i[u-1][0]).add(i[u-2][0]),l=r.mul(i[u-1][1]).add(i[u-2][1]);if(c.gt(a)||l.gt(a))break;if(i.push([c,l]),o.eq(0))break;t=new s.default(1).div(o),u+=1}var f=n(i[i.length-1],2),h=f[0],p=f[1];if(h.isZero()||p.isZero())throw new Error("Couldn't find approximation");return[h.toNumber(),p.toNumber()]};var o,i=r(33),s=(o=i)&&o.__esModule?o:{default:o};var a=2147483647},function(e,t,r){var n=r(63),o=r(151),i=r(130),s=r(373),a=r(374),u=r(179),c=r(180),l=r(375),f=r(376),h=r(141),p=r(377),d=r(51),y=r(378),v=r(379),g=r(183),m=r(6),w=r(45),_=r(384),b=r(17),E=r(386),S=r(40),A=1,O=2,x=4,k="[object Arguments]",T="[object Function]",P="[object GeneratorFunction]",R="[object Object]",C={};C[k]=C["[object Array]"]=C["[object ArrayBuffer]"]=C["[object DataView]"]=C["[object Boolean]"]=C["[object Date]"]=C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Map]"]=C["[object Number]"]=C[R]=C["[object RegExp]"]=C["[object Set]"]=C["[object String]"]=C["[object Symbol]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C["[object Error]"]=C[T]=C["[object WeakMap]"]=!1,e.exports=function e(t,r,I,N,j,M){var U,B=r&A,L=r&O,D=r&x;if(I&&(U=j?I(t,N,j,M):I(t)),void 0!==U)return U;if(!b(t))return t;var F=m(t);if(F){if(U=y(t),!B)return c(t,U)}else{var q=d(t),K=q==T||q==P;if(w(t))return u(t,B);if(q==R||q==k||K&&!j){if(U=L||K?{}:g(t),!B)return L?f(t,a(U,t)):l(t,s(U,t))}else{if(!C[q])return j?t:{};U=v(t,q,B)}}M||(M=new n);var z=M.get(t);if(z)return z;M.set(t,U),E(t)?t.forEach((function(n){U.add(e(n,r,I,n,t,M))})):_(t)&&t.forEach((function(n,o){U.set(o,e(n,r,I,o,t,M))}));var H=D?L?p:h:L?keysIn:S,V=F?void 0:H(t);return o(V||t,(function(n,o){V&&(n=t[o=n]),i(U,o,e(n,r,I,o,t,M))})),U}},function(e,t,r){var n=r(39),o=r(40);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(39),o=r(35);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(39),o=r(91);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(39),o=r(181);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(142),o=r(181),i=r(35);e.exports=function(e){return n(e,i,o)}},function(e,t){var r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},function(e,t,r){var n=r(108),o=r(380),i=r(381),s=r(382),a=r(182),u="[object Boolean]",c="[object Date]",l="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",d="[object String]",y="[object Symbol]",v="[object ArrayBuffer]",g="[object DataView]",m="[object Float32Array]",w="[object Float64Array]",_="[object Int8Array]",b="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",A="[object Uint8ClampedArray]",O="[object Uint16Array]",x="[object Uint32Array]";e.exports=function(e,t,r){var k=e.constructor;switch(t){case v:return n(e);case u:case c:return new k(+e);case g:return o(e,r);case m:case w:case _:case b:case E:case S:case A:case O:case x:return a(e,r);case l:return new k;case f:case d:return new k(e);case h:return i(e);case p:return new k;case y:return s(e)}}},function(e,t,r){var n=r(108);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},function(e,t){var r=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,r){var n=r(36),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,r){var n=r(17),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},function(e,t,r){var n=r(385),o=r(82),i=r(83),s=i&&i.isMap,a=s?o(s):n;e.exports=a},function(e,t,r){var n=r(51),o=r(14),i="[object Map]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t,r){var n=r(387),o=r(82),i=r(83),s=i&&i.isSet,a=s?o(s):n;e.exports=a},function(e,t,r){var n=r(51),o=r(14),i="[object Set]";e.exports=function(e){return o(e)&&n(e)==i}},function(e,t,r){var n=r(389),o=r(94),i=r(176),s=r(106),a=r(185),u=r(177),c=Math.ceil;e.exports=function(e,t){var r=(t=void 0===t?" ":o(t)).length;if(r<2)return r?n(t,e):t;var l=n(t,c(e/a(t)));return s(t)?i(u(l),0,e).join(""):l.slice(0,e)}},function(e,t){var r=9007199254740991,n=Math.floor;e.exports=function(e,t){var o="";if(!e||t<1||t>r)return o;do{t%2&&(o+=e),(t=n(t/2))&&(e+=e)}while(t);return o}},function(e,t,r){var n=r(148)("length");e.exports=n},function(e,t){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,s,a].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,s,a,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPassiveSellOffer=t.manageSellOffer=t.setOptions=t.payment=t.pathPaymentStrictSend=t.pathPaymentStrictReceive=t.pathPayment=t.manageBuyOffer=t.manageData=t.inflation=t.createAccount=t.changeTrust=t.bumpSequence=t.allowTrust=t.accountMerge=void 0;var n=r(393);Object.defineProperty(t,"accountMerge",{enumerable:!0,get:function(){return n.accountMerge}});var o=r(394);Object.defineProperty(t,"allowTrust",{enumerable:!0,get:function(){return o.allowTrust}});var i=r(395);Object.defineProperty(t,"bumpSequence",{enumerable:!0,get:function(){return i.bumpSequence}});var s=r(396);Object.defineProperty(t,"changeTrust",{enumerable:!0,get:function(){return s.changeTrust}});var a=r(397);Object.defineProperty(t,"createAccount",{enumerable:!0,get:function(){return a.createAccount}});var u=r(398);Object.defineProperty(t,"inflation",{enumerable:!0,get:function(){return u.inflation}});var c=r(399);Object.defineProperty(t,"manageData",{enumerable:!0,get:function(){return c.manageData}});var l=r(400);Object.defineProperty(t,"manageBuyOffer",{enumerable:!0,get:function(){return l.manageBuyOffer}});var f=r(401);Object.defineProperty(t,"pathPayment",{enumerable:!0,get:function(){return f.pathPayment}});var h=r(186);Object.defineProperty(t,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return h.pathPaymentStrictReceive}});var p=r(402);Object.defineProperty(t,"pathPaymentStrictSend",{enumerable:!0,get:function(){return p.pathPaymentStrictSend}});var d=r(403);Object.defineProperty(t,"payment",{enumerable:!0,get:function(){return d.payment}});var y=r(404);Object.defineProperty(t,"setOptions",{enumerable:!0,get:function(){return y.setOptions}}),t.manageOffer=function(e){return console.log("[Operation] Operation.manageOffer has been renamed to Operation.manageSellOffer! The old name is deprecated and will be removed in a later version!"),v.manageSellOffer.call(this,e)},t.createPassiveOffer=function(e){return console.log("[Operation] Operation.createPassiveOffer has been renamed to Operation.createPassiveSellOffer! The old name is deprecated and will be removed in a later version!"),g.createPassiveSellOffer.call(this,e)};var v=r(405),g=r(406);t.manageSellOffer=v.manageSellOffer,t.createPassiveSellOffer=g.createPassiveSellOffer},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountMerge=function(e){var t={};if(!a.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");return t.body=i.default.OperationBody.accountMerge(s.Keypair.fromPublicKey(e.destination).xdrAccountId()),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n},s=r(15),a=r(11)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowTrust=function(e){if(!s.StrKey.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=i.Keypair.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=(0,n.default)(e.assetCode,4,"\0");t.asset=o.default.AllowTrustOpAsset.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var a=(0,n.default)(e.assetCode,12,"\0");t.asset=o.default.AllowTrustOpAsset.assetTypeCreditAlphanum12(a)}t.authorize=e.authorize;var u=new o.default.AllowTrustOp(t),c={};return c.body=o.default.OperationBody.allowTrust(u),this.setSourceAccount(c,e),new o.default.Operation(c)};var n=a(r(184)),o=a(r(2)),i=r(15),s=r(11);function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bumpSequence=function(e){var t={};if(!(0,i.default)(e.bumpTo))throw new Error("bumpTo must be a string");try{new o.default(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new s.default.BumpSequenceOp(t),a={};return a.body=s.default.OperationBody.bumpSequence(r),this.setSourceAccount(a,e),new s.default.Operation(a)};var n=r(22),o=a(r(33)),i=a(r(20)),s=a(r(2));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeTrust=function(e){var t={};if(t.line=e.asset.toXDRObject(),!(0,n.default)(e.limit)&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=o.Hyper.fromString(new i.default(u).toString());e.source&&(t.source=e.source.masterKeypair);var r=new s.default.ChangeTrustOp(t),a={};return a.body=s.default.OperationBody.changeTrust(r),this.setSourceAccount(a,e),new s.default.Operation(a)};var n=a(r(9)),o=r(22),i=a(r(33)),s=a(r(2));function a(e){return e&&e.__esModule?e:{default:e}}var u="9223372036854775807"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAccount=function(e){if(!a.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=s.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.default.CreateAccountOp(t),n={};return n.body=i.default.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n},s=r(15),a=r(11)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.inflation(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.manageData=function(t){var r={};if(!((0,n.default)(t.name)&&t.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(r.dataName=t.name,!(0,n.default)(t.value)&&!e.isBuffer(t.value)&&null!==t.value)throw new Error("value must be a string, Buffer or null");(0,n.default)(t.value)?r.dataValue=e.from(t.value):r.dataValue=t.value;if(null!==r.dataValue&&r.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var i=new o.default.ManageDataOp(r),s={};return s.body=o.default.OperationBody.manageDatum(i),this.setSourceAccount(s,t),new o.default.Operation(s)};var n=i(r(20)),o=i(r(2));function i(e){return e&&e.__esModule?e:{default:e}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageBuyOfferOp(t),s={};return s.body=i.default.OperationBody.manageBuyOffer(r),this.setSourceAccount(s,e),new i.default.Operation(s)};var n=s(r(9)),o=r(22),i=s(r(2));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pathPayment=function(e){return console.log("[Operation] Operation.pathPayment has been renamed to Operation.pathPaymentStrictReceive - The old name is deprecated and will be removed in a later version!"),n.pathPaymentStrictReceive.call(this,e)};var n=r(186)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!a.StrKey.isValidEd25519PublicKey(e.destination):throw new Error("destination is invalid");case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount),t.destination=s.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.default.PathPaymentStrictSendOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n},s=r(15),a=r(11)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.payment=function(e){if(!a.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};t.destination=s.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new i.default.PaymentOp(t),n={};return n.body=i.default.OperationBody.payment(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(2),i=(n=o)&&n.__esModule?n:{default:n},s=r(15),a=r(11)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.setOptions=function(t){var r={};if(t.inflationDest){if(!a.StrKey.isValidEd25519PublicKey(t.inflationDest))throw new Error("inflationDest is invalid");r.inflationDest=s.Keypair.fromPublicKey(t.inflationDest).xdrAccountId()}if(r.clearFlags=this._checkUnsignedIntValue("clearFlags",t.clearFlags),r.setFlags=this._checkUnsignedIntValue("setFlags",t.setFlags),r.masterWeight=this._checkUnsignedIntValue("masterWeight",t.masterWeight,c),r.lowThreshold=this._checkUnsignedIntValue("lowThreshold",t.lowThreshold,c),r.medThreshold=this._checkUnsignedIntValue("medThreshold",t.medThreshold,c),r.highThreshold=this._checkUnsignedIntValue("highThreshold",t.highThreshold,c),!(0,n.default)(t.homeDomain)&&!(0,o.default)(t.homeDomain))throw new TypeError("homeDomain argument must be of type String");if(r.homeDomain=t.homeDomain,t.signer){var u=this._checkUnsignedIntValue("signer.weight",t.signer.weight,c),l=void 0,f=0;if(t.signer.ed25519PublicKey){if(!a.StrKey.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var h=a.StrKey.decodeEd25519PublicKey(t.signer.ed25519PublicKey);l=new i.default.SignerKey.signerKeyTypeEd25519(h),f+=1}if(t.signer.preAuthTx){if((0,o.default)(t.signer.preAuthTx)&&(t.signer.preAuthTx=e.from(t.signer.preAuthTx,"hex")),!e.isBuffer(t.signer.preAuthTx)||32!==t.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");l=new i.default.SignerKey.signerKeyTypePreAuthTx(t.signer.preAuthTx),f+=1}if(t.signer.sha256Hash){if((0,o.default)(t.signer.sha256Hash)&&(t.signer.sha256Hash=e.from(t.signer.sha256Hash,"hex")),!e.isBuffer(t.signer.sha256Hash)||32!==t.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");l=new i.default.SignerKey.signerKeyTypeHashX(t.signer.sha256Hash),f+=1}if(1!==f)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");r.signer=new i.default.Signer({key:l,weight:u})}var p=new i.default.SetOptionsOp(r),d={};return d.body=i.default.OperationBody.setOption(p),this.setSourceAccount(d,t),new i.default.Operation(d)};var n=u(r(9)),o=u(r(20)),i=u(r(2)),s=r(15),a=r(11);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(e>=0&&e<=255)return!0;throw new Error(t+" value must be between 0 and 255")}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageSellOfferOp(t),s={};return s.body=i.default.OperationBody.manageSellOffer(r),this.setSourceAccount(s,e),new i.default.Operation(s)};var n=s(r(9)),o=r(22),i=s(r(2));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new o.default.CreatePassiveSellOfferOp(t),i={};return i.body=o.default.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(i,e),new o.default.Operation(i)};var n=i(r(9)),o=i(r(2));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBuilder=t.TimeoutInfinite=t.BASE_FEE=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.isValidDate=d;var o=r(22),i=h(r(33)),s=h(r(73)),a=h(r(9)),u=h(r(2)),c=r(15),l=r(173),f=r(109);r(61);function h(e){return e&&e.__esModule?e:{default:e}}var p=t.BASE_FEE=100;t.TimeoutInfinite=0,t.TransactionBuilder=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("must specify source account for the transaction");if((0,a.default)(r.fee))throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=(0,a.default)(r.fee)?p:r.fee,this.timebounds=(0,s.default)(r.timebounds)||null,this.memo=r.memo||f.Memo.none(),this.timeoutSet=!1,this.networkPassphrase=r.networkPassphrase||null}return n(e,[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!=this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(this.timeoutSet=!0,e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}return this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"build",value:function(){if((null===this.timebounds||null!==this.timebounds&&0===this.timebounds.maxTime)&&!this.timeoutSet)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");var e=new i.default(this.source.sequenceNumber()).add(1),t={sourceAccount:c.Keypair.fromPublicKey(this.source.accountId()).xdrAccountId(),fee:this.baseFee*this.operations.length,seqNum:u.default.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null,ext:new u.default.TransactionExt(0)};this.timebounds&&(d(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),d(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=o.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=o.UnsignedHyper.fromString(this.timebounds.maxTime.toString()),t.timeBounds=new u.default.TimeBounds(this.timebounds));var r=new u.default.Transaction(t);r.operations(this.operations);var n=new u.default.TransactionEnvelope({tx:r}),s=new l.Transaction(n,this.networkPassphrase);return this.source.incrementSequenceNumber(),s}}]),e}();function d(e){return e instanceof Date&&!isNaN(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(33)),i=a(r(20)),s=r(11);function a(e){return e&&e.__esModule?e:{default:e}}t.Account=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!s.StrKey.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if(!(0,i.default)(r))throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new o.default(r)}return n(e,[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.add(1)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=n.__importDefault(r(410)),i=n.__importDefault(r(411)),s=n.__importDefault(r(412)),a=r(47),u=n.__importDefault(r(41)),c=r(8),l=r(74),f=r(34),h=r(458),p=r(117),d=r(459),y=r(460),v=r(461),g=r(462),m=r(463),w=r(464),_=r(465),b=r(466),E=r(467),S=r(468),A=r(469),O=r(470),x=r(471),k=r(472),T=n.__importStar(r(110));t.SUBMIT_TRANSACTION_TIMEOUT=6e4;var P=1e7;function R(e){return new o.default(e).div(P).toString()}var C=function(){function e(e,t){void 0===t&&(t={}),this.serverURL=u.default(e);var r=void 0===t.allowHttp?l.Config.isAllowHttp():t.allowHttp,n={};if(t.appName&&(n["X-App-Name"]=t.appName),t.appVersion&&(n["X-App-Version"]=t.appVersion),i.default(n)||T.default.interceptors.request.use((function(e){return e.headers=s.default(n,e.headers),e})),"https"!==this.serverURL.protocol()&&!r)throw new Error("Cannot connect to insecure horizon server")}return e.prototype.fetchTimebounds=function(e,t){return void 0===t&&(t=!1),n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return(r=T.getCurrentServerTime(this.serverURL.hostname()))?[2,{minTime:0,maxTime:r+e}]:t?[2,{minTime:0,maxTime:Math.floor((new Date).getTime()/1e3)+e}]:[4,T.default.get(u.default(this.serverURL).toString())];case 1:return n.sent(),[4,this.fetchTimebounds(e,!0)];case 2:return[2,n.sent()]}}))}))},e.prototype.fetchBaseFee=function(){return n.__awaiter(this,void 0,void 0,(function(){var e;return n.__generator(this,(function(t){switch(t.label){case 0:return[4,this.feeStats()];case 1:return e=t.sent(),[2,parseInt(e.last_ledger_base_fee,10)||100]}}))}))},e.prototype.feeStats=function(){return n.__awaiter(this,void 0,void 0,(function(){var e;return n.__generator(this,(function(t){return(e=new c.CallBuilder(u.default(this.serverURL))).filter.push(["fee_stats"]),[2,e.call()]}))}))},e.prototype.submitTransaction=function(e){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){return r=encodeURIComponent(e.toEnvelope().toXDR().toString("base64")),[2,T.default.post(u.default(this.serverURL).segment("transactions").toString(),"tx="+r,{timeout:t.SUBMIT_TRANSACTION_TIMEOUT}).then((function(e){if(!e.data.result_xdr)return e.data;var t,r,n=a.xdr.TransactionResult.fromXDR(e.data.result_xdr,"base64").result().value();return n.length&&(t=n.map((function(e,t){if("manageBuyOffer"!==e.value().switch().name&&"manageSellOffer"!==e.value().switch().name)return null;r=!0;var n,i=new o.default(0),s=new o.default(0),u=e.value().value().success(),c=u.offersClaimed().map((function(e){var t=new o.default(e.amountBought().toString()),r=new o.default(e.amountSold().toString());i=i.add(r),s=s.add(t);var n=a.Asset.fromOperation(e.assetSold()),u=a.Asset.fromOperation(e.assetBought()),c={type:n.getAssetType(),assetCode:n.getCode(),issuer:n.getIssuer()},l={type:u.getAssetType(),assetCode:u.getCode(),issuer:u.getIssuer()};return{sellerId:a.StrKey.encodeEd25519PublicKey(e.sellerId().ed25519()),offerId:e.offerId().toString(),assetSold:c,amountSold:R(r),assetBought:l,amountBought:R(t)}})),l=u.offer().switch().name;if("function"==typeof u.offer().value&&u.offer().value()){var f=u.offer().value();n={offerId:f.offerId().toString(),selling:{},buying:{},amount:R(f.amount().toString()),price:{n:f.price().n(),d:f.price().d()}};var h=a.Asset.fromOperation(f.selling());n.selling={type:h.getAssetType(),assetCode:h.getCode(),issuer:h.getIssuer()};var p=a.Asset.fromOperation(f.buying());n.buying={type:p.getAssetType(),assetCode:p.getCode(),issuer:p.getIssuer()}}return{offersClaimed:c,effect:l,operationIndex:t,currentOffer:n,amountBought:R(i),amountSold:R(s),isFullyOpen:!c.length&&"manageOfferDeleted"!==l,wasPartiallyFilled:!!c.length&&"manageOfferDeleted"!==l,wasImmediatelyFilled:!!c.length&&"manageOfferDeleted"===l,wasImmediatelyDeleted:!c.length&&"manageOfferDeleted"===l}})).filter((function(e){return!!e}))),Object.assign({},e.data,{offerResults:r?t:void 0})})).catch((function(e){return e instanceof Error?Promise.reject(e):Promise.reject(new f.BadResponseError("Transaction submission failed. Server responded: "+e.status+" "+e.statusText,e.data))}))]}))}))},e.prototype.accounts=function(){return new h.AccountCallBuilder(u.default(this.serverURL))},e.prototype.ledgers=function(){return new g.LedgerCallBuilder(u.default(this.serverURL))},e.prototype.transactions=function(){return new k.TransactionCallBuilder(u.default(this.serverURL))},e.prototype.offers=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new(m.OfferCallBuilder.bind.apply(m.OfferCallBuilder,n.__spreadArrays([void 0,u.default(this.serverURL),e],t)))},e.prototype.orderbook=function(e,t){return new _.OrderbookCallBuilder(u.default(this.serverURL),e,t)},e.prototype.trades=function(){return new x.TradesCallBuilder(u.default(this.serverURL))},e.prototype.operations=function(){return new w.OperationCallBuilder(u.default(this.serverURL))},e.prototype.paths=function(e,t,r,n){return console.warn("`Server#paths` is deprecated. Please use `Server#strictReceivePaths`."),new b.PathCallBuilder(u.default(this.serverURL),e,t,r,n)},e.prototype.strictReceivePaths=function(e,t,r){return new S.StrictReceivePathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.strictSendPaths=function(e,t,r){return new A.StrictSendPathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.payments=function(){return new E.PaymentCallBuilder(u.default(this.serverURL))},e.prototype.effects=function(){return new y.EffectCallBuilder(u.default(this.serverURL))},e.prototype.friendbot=function(e){return new v.FriendbotBuilder(u.default(this.serverURL),e)},e.prototype.assets=function(){return new d.AssetsCallBuilder(u.default(this.serverURL))},e.prototype.loadAccount=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:return[4,this.accounts().accountId(e).call()];case 1:return t=r.sent(),[2,new p.AccountResponse(t)]}}))}))},e.prototype.tradeAggregation=function(e,t,r,n,o,i){return new O.TradeAggregationCallBuilder(u.default(this.serverURL),e,t,r,n,o,i)},e}();t.Server=C},function(e,t,r){var n;/*! bignumber.js v4.1.0 https://github.com/MikeMcl/bignumber.js/LICENCE */!function(o){"use strict";var i,s=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c=" not a boolean or binary digit",l="rounding mode",f="number type has more than 15 significant digits",h="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",p=1e14,d=14,y=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function w(e){var t=0|e;return e>0||e===t?t:t-1}function _(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=d-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function b(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function E(e,t,r){return(e=k(e))>=t&&e<=r}function S(e){return"[object Array]"==Object.prototype.toString.call(e)}function A(e,t,r){for(var n,o,i=[0],s=0,a=e.length;s<a;){for(o=i.length;o--;i[o]*=t);for(i[n=0]+=h.indexOf(e.charAt(s++));n<i.length;n++)i[n]>r-1&&(null==i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function O(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}function k(e){return(e=parseFloat(e))<0?a(e):u(e)}(i=function e(t){var r,n,o,i,T,P,R,C,I=0,N=Q.prototype,j=new Q(1),M=20,U=4,B=-7,L=21,D=-1e7,F=1e7,q=!0,K=$,z=!1,H=1,V=0,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};function Q(e,t){var r,o,i,a,c,l,p=this;if(!(p instanceof Q))return q&&J(26,"constructor call without new",e),new Q(e,t);if(null!=t&&K(t,2,64,I,"base")){if(l=e+"",10==(t|=0))return ee(p=new Q(e instanceof Q?e:l),M+p.e+1,U);if((a="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(r="["+h.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"").test(l))return n(p,l,a,t);a?(p.s=1/e<0?(l=l.slice(1),-1):1,q&&l.replace(/^0\.0*|\./,"").length>15&&J(I,f,e),a=!1):p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1,l=G(l,10,t,p.s)}else{if(e instanceof Q)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(I=0);if((a="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,i=e;i>=10;i/=10,o++);return p.e=o,p.c=[e],void(I=0)}l=e+""}else{if(!s.test(l=e+""))return n(p,l,a);p.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1}}for((o=l.indexOf("."))>-1&&(l=l.replace(".","")),(i=l.search(/e/i))>0?(o<0&&(o=i),o+=+l.slice(i+1),l=l.substring(0,i)):o<0&&(o=l.length),i=0;48===l.charCodeAt(i);i++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(i,c+1))if(c=l.length,a&&q&&c>15&&(e>y||e!==u(e))&&J(I,f,p.s*e),(o=o-i-1)>F)p.c=p.e=null;else if(o<D)p.c=[p.e=0];else{if(p.e=o,p.c=[],i=(o+1)%d,o<0&&(i+=d),i<c){for(i&&p.c.push(+l.slice(0,i)),c-=d;i<c;)p.c.push(+l.slice(i,i+=d));l=l.slice(i),i=d-l.length}else i-=c;for(;i--;l+="0");p.c.push(+l)}else p.c=[p.e=0];I=0}function G(e,t,n,o){var i,s,a,u,c,l,f,p=e.indexOf("."),d=M,y=U;for(n<37&&(e=e.toLowerCase()),p>=0&&(a=V,V=0,e=e.replace(".",""),c=(f=new Q(n)).pow(e.length-p),V=a,f.c=A(x(_(c.c),c.e),10,t),f.e=f.c.length),s=a=(l=A(e,n,t)).length;0==l[--a];l.pop());if(!l[0])return"0";if(p<0?--s:(c.c=l,c.e=s,c.s=o,l=(c=r(c,f,d,y,t)).c,u=c.r,s=c.e),p=l[i=s+d+1],a=t/2,u=u||i<0||null!=l[i+1],u=y<4?(null!=p||u)&&(0==y||y==(c.s<0?3:2)):p>a||p==a&&(4==y||u||6==y&&1&l[i-1]||y==(c.s<0?8:7)),i<1||!l[0])e=u?x("1",-d):"0";else{if(l.length=i,u)for(--t;++l[--i]>t;)l[i]=0,i||(++s,l=[1].concat(l));for(a=l.length;!l[--a];);for(p=0,e="";p<=a;e+=h.charAt(l[p++]));e=x(e,s)}return e}function W(e,t,r,n){var o,i,s,a,u;if(r=null!=r&&K(r,0,8,n,l)?0|r:U,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)u=_(e.c),u=19==n||24==n&&s<=B?O(u,s):x(u,s);else if(i=(e=ee(new Q(e),t,r)).e,a=(u=_(e.c)).length,19==n||24==n&&(t<=i||i<=B)){for(;a<t;u+="0",a++);u=O(u,i)}else if(t-=s,u=x(u,i),i+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-a)>0)for(i+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function Y(e,t){var r,n,o=0;for(S(e[0])&&(e=e[0]),r=new Q(e[0]);++o<e.length;){if(!(n=new Q(e[o])).s){r=n;break}t.call(r,n)&&(r=n)}return r}function $(e,t,r,n,o){return(e<t||e>r||e!=k(e))&&J(n,(o||"decimal places")+(e<t||e>r?" out of range":" not an integer"),e),!0}function Z(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*d-1)>F?e.c=e.e=null:r<D?e.c=[e.e=0]:(e.e=r,e.c=t),e}function J(e,t,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+r);throw n.name="BigNumber Error",I=0,n}function ee(e,t,r,n){var o,i,s,c,l,f,h,y=e.c,g=v;if(y){e:{for(o=1,c=y[0];c>=10;c/=10,o++);if((i=t-o)<0)i+=d,s=t,h=(l=y[f=0])/g[o-s-1]%10|0;else if((f=a((i+1)/d))>=y.length){if(!n)break e;for(;y.length<=f;y.push(0));l=h=0,o=1,s=(i%=d)-d+1}else{for(l=c=y[f],o=1;c>=10;c/=10,o++);h=(s=(i%=d)-d+o)<0?0:l/g[o-s-1]%10|0}if(n=n||t<0||null!=y[f+1]||(s<0?l:l%g[o-s-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(i>0?s>0?l/g[o-s]:0:y[f-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=g[(d-t%d)%d],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=f,c=1,f--):(y.length=f+1,c=g[d-i],y[f]=s>0?u(l/g[o-s]%g[s])*c:0),n)for(;;){if(0==f){for(i=1,s=y[0];s>=10;s/=10,i++);for(s=y[0]+=c,c=1;s>=10;s/=10,c++);i!=c&&(e.e++,y[0]==p&&(y[0]=1));break}if(y[f]+=c,y[f]!=p)break;y[f--]=0,c=1}for(i=y.length;0===y[--i];y.pop());}e.e>F?e.c=e.e=null:e.e<D&&(e.c=[e.e=0])}return e}return Q.another=e,Q.ROUND_UP=0,Q.ROUND_DOWN=1,Q.ROUND_CEIL=2,Q.ROUND_FLOOR=3,Q.ROUND_HALF_UP=4,Q.ROUND_HALF_DOWN=5,Q.ROUND_HALF_EVEN=6,Q.ROUND_HALF_CEIL=7,Q.ROUND_HALF_FLOOR=8,Q.EUCLID=9,Q.config=Q.set=function(){var e,t,r=0,n={},o=arguments,i=o[0],s=i&&"object"==typeof i?function(){if(i.hasOwnProperty(t))return null!=(e=i[t])}:function(){if(o.length>r)return null!=(e=o[r++])};return s(t="DECIMAL_PLACES")&&K(e,0,m,2,t)&&(M=0|e),n[t]=M,s(t="ROUNDING_MODE")&&K(e,0,8,2,t)&&(U=0|e),n[t]=U,s(t="EXPONENTIAL_AT")&&(S(e)?K(e[0],-m,0,2,t)&&K(e[1],0,m,2,t)&&(B=0|e[0],L=0|e[1]):K(e,-m,m,2,t)&&(B=-(L=0|(e<0?-e:e)))),n[t]=[B,L],s(t="RANGE")&&(S(e)?K(e[0],-m,-1,2,t)&&K(e[1],1,m,2,t)&&(D=0|e[0],F=0|e[1]):K(e,-m,m,2,t)&&(0|e?D=-(F=0|(e<0?-e:e)):q&&J(2,t+" cannot be zero",e))),n[t]=[D,F],s(t="ERRORS")&&(e===!!e||1===e||0===e?(I=0,K=(q=!!e)?$:E):q&&J(2,t+c,e)),n[t]=q,s(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?z=!0:q?J(2,"crypto unavailable",e?void 0:crypto):z=!1:z=!1:q&&J(2,t+c,e)),n[t]=z,s(t="MODULO_MODE")&&K(e,0,9,2,t)&&(H=0|e),n[t]=H,s(t="POW_PRECISION")&&K(e,0,m,2,t)&&(V=0|e),n[t]=V,s(t="FORMAT")&&("object"==typeof e?X=e:q&&J(2,t+" not an object",e)),n[t]=X,n},Q.max=function(){return Y(arguments,N.lt)},Q.min=function(){return Y(arguments,N.gt)},Q.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,s,c=0,l=[],f=new Q(j);if(e=null!=e&&K(e,0,m,14)?0|e:M,i=a(e/d),z)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(s=131072*t[c]+(t[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(l.push(s%1e14),c+=2);c=i/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=7);c<i;)(s=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(l.push(s%1e14),c+=7);c=i/7}else z=!1,q&&J(14,"crypto unavailable",crypto);if(!z)for(;c<i;)(s=o())<9e15&&(l[c++]=s%1e14);for(i=l[--c],e%=d,i&&e&&(s=v[d-e],l[c]=u(i/s)*s);0===l[c];l.pop(),c--);if(c<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=d);for(c=1,s=l[0];s>=10;s/=10,c++);c<d&&(n-=d-c)}return f.e=n,f.c=l,f}),r=function(){function e(e,t,r){var n,o,i,s,a=0,u=e.length,c=t%g,l=t/g|0;for(e=e.slice();u--;)a=((o=c*(i=e[u]%g)+(n=l*i+(s=e[u]/g|0)*c)%g*g+a)/r|0)+(n/g|0)+l*s,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,s,a){var c,l,f,h,y,v,g,m,_,b,E,S,A,O,x,k,T,P=n.s==o.s?1:-1,R=n.c,C=o.c;if(!(R&&R[0]&&C&&C[0]))return new Q(n.s&&o.s&&(R?!C||R[0]!=C[0]:C)?R&&0==R[0]||!C?0*P:P/0:NaN);for(_=(m=new Q(P)).c=[],P=i+(l=n.e-o.e)+1,a||(a=p,l=w(n.e/d)-w(o.e/d),P=P/d|0),f=0;C[f]==(R[f]||0);f++);if(C[f]>(R[f]||0)&&l--,P<0)_.push(1),h=!0;else{for(O=R.length,k=C.length,f=0,P+=2,(y=u(a/(C[0]+1)))>1&&(C=e(C,y,a),R=e(R,y,a),k=C.length,O=R.length),A=k,E=(b=R.slice(0,k)).length;E<k;b[E++]=0);T=C.slice(),T=[0].concat(T),x=C[0],C[1]>=a/2&&x++;do{if(y=0,(c=t(C,b,k,E))<0){if(S=b[0],k!=E&&(S=S*a+(b[1]||0)),(y=u(S/x))>1)for(y>=a&&(y=a-1),g=(v=e(C,y,a)).length,E=b.length;1==t(v,b,g,E);)y--,r(v,k<g?T:C,g,a),g=v.length,c=1;else 0==y&&(c=y=1),g=(v=C.slice()).length;if(g<E&&(v=[0].concat(v)),r(b,v,E,a),E=b.length,-1==c)for(;t(C,b,k,E)<1;)y++,r(b,k<E?T:C,E,a),E=b.length}else 0===c&&(y++,b=[0]);_[f++]=y,b[0]?b[E++]=R[A]||0:(b=[R[A]],E=1)}while((A++<O||null!=b[0])&&P--);h=null!=b[0],_[0]||_.splice(0,1)}if(a==p){for(f=1,P=_[0];P>=10;P/=10,f++);ee(m,i+(m.e=f+l*d-1)+1,s,h)}else m.e=l,m.r=+h;return m}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,s=r?t:t.replace(C,"");if(R.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,s=s.replace(T,"$1").replace(P,"0.$1")),t!=s))return new Q(s,o);q&&J(I,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,I=0},N.absoluteValue=N.abs=function(){var e=new Q(this);return e.s<0&&(e.s=1),e},N.ceil=function(){return ee(new Q(this),this.e+1,2)},N.comparedTo=N.cmp=function(e,t){return I=1,b(this,new Q(e,t))},N.decimalPlaces=N.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-w(this.e/d))*d,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},N.dividedBy=N.div=function(e,t){return I=3,r(this,new Q(e,t),M,U)},N.dividedToIntegerBy=N.divToInt=function(e,t){return I=4,r(this,new Q(e,t),0,1)},N.equals=N.eq=function(e,t){return I=5,0===b(this,new Q(e,t))},N.floor=function(){return ee(new Q(this),this.e+1,3)},N.greaterThan=N.gt=function(e,t){return I=6,b(this,new Q(e,t))>0},N.greaterThanOrEqualTo=N.gte=function(e,t){return I=7,1===(t=b(this,new Q(e,t)))||0===t},N.isFinite=function(){return!!this.c},N.isInteger=N.isInt=function(){return!!this.c&&w(this.e/d)>this.c.length-2},N.isNaN=function(){return!this.s},N.isNegative=N.isNeg=function(){return this.s<0},N.isZero=function(){return!!this.c&&0==this.c[0]},N.lessThan=N.lt=function(e,t){return I=8,b(this,new Q(e,t))<0},N.lessThanOrEqualTo=N.lte=function(e,t){return I=9,-1===(t=b(this,new Q(e,t)))||0===t},N.minus=N.sub=function(e,t){var r,n,o,i,s=this,a=s.s;if(I=10,t=(e=new Q(e,t)).s,!a||!t)return new Q(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/d,c=e.e/d,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new Q(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new Q(l[0]?s:3==U?-0:0)}if(u=w(u),c=w(c),l=l.slice(),a=u-c){for((i=a<0)?(a=-a,o=l):(c=u,o=f),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=p-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=p}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?Z(e,l,c):(e.s=3==U?-1:1,e.c=[e.e=0],e)},N.modulo=N.mod=function(e,t){var n,o,i=this;return I=11,e=new Q(e,t),!i.c||!e.s||e.c&&!e.c[0]?new Q(NaN):!e.c||i.c&&!i.c[0]?new Q(i):(9==H?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,H),i.minus(n.times(e)))},N.negated=N.neg=function(){var e=new Q(this);return e.s=-e.s||null,e},N.plus=N.add=function(e,t){var r,n=this,o=n.s;if(I=12,t=(e=new Q(e,t)).s,!o||!t)return new Q(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/d,s=e.e/d,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new Q(o/0);if(!a[0]||!u[0])return u[0]?e:new Q(a[0]?n:0*o)}if(i=w(i),s=w(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/p|0,a[t]=p===a[t]?0:a[t]%p;return o&&(a=[o].concat(a),++s),Z(e,a,s)},N.precision=N.sd=function(e){var t,r,n=this,o=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(q&&J(13,"argument"+c,e),e!=!!e&&(e=null)),!o)return null;if(t=(r=o.length-1)*d+1,r=o[r]){for(;r%10==0;r/=10,t--);for(r=o[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},N.round=function(e,t){var r=new Q(this);return(null==e||K(e,0,m,15))&&ee(r,~~e+this.e+1,null!=t&&K(t,0,8,15,l)?0|t:U),r},N.shift=function(e){var t=this;return K(e,-y,y,16,"argument")?t.times("1e"+k(e)):new Q(t.c&&t.c[0]&&(e<-y||e>y)?t.s*(e<0?0:1/0):t)},N.squareRoot=N.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,u=s.s,c=s.e,l=M+4,f=new Q("0.5");if(1!==u||!a||!a[0])return new Q(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=_(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=w((c+1)/2)-(c<0||c%2),n=new Q(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new Q(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),_(i.c).slice(0,u)===(t=_(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(ee(n,n.e+M+2,1),e=!n.times(n).eq(s));break}if(!o&&(ee(i,i.e+M+2,0),i.times(i).eq(s))){n=i;break}l+=4,u+=4,o=1}return ee(n,n.e+M+1,U,e)},N.times=N.mul=function(e,t){var r,n,o,i,s,a,u,c,l,f,h,y,v,m,_,b=this,E=b.c,S=(I=17,e=new Q(e,t)).c;if(!(E&&S&&E[0]&&S[0]))return!b.s||!e.s||E&&!E[0]&&!S||S&&!S[0]&&!E?e.c=e.e=e.s=null:(e.s*=b.s,E&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=w(b.e/d)+w(e.e/d),e.s*=b.s,(u=E.length)<(f=S.length)&&(v=E,E=S,S=v,o=u,u=f,f=o),o=u+f,v=[];o--;v.push(0));for(m=p,_=g,o=f;--o>=0;){for(r=0,h=S[o]%_,y=S[o]/_|0,i=o+(s=u);i>o;)r=((c=h*(c=E[--s]%_)+(a=y*c+(l=E[s]/_|0)*h)%_*_+v[i]+r)/m|0)+(a/_|0)+y*l,v[i--]=c%m;v[i]=r}return r?++n:v.splice(0,1),Z(e,v,n)},N.toDigits=function(e,t){var r=new Q(this);return e=null!=e&&K(e,1,m,18,"precision")?0|e:null,t=null!=t&&K(t,0,8,18,l)?0|t:U,e?ee(r,e,t):r},N.toExponential=function(e,t){return W(this,null!=e&&K(e,0,m,19)?1+~~e:null,t,19)},N.toFixed=function(e,t){return W(this,null!=e&&K(e,0,m,20)?~~e+this.e+1:null,t,20)},N.toFormat=function(e,t){var r=W(this,null!=e&&K(e,0,m,21)?~~e+this.e+1:null,t,21);if(this.c){var n,o=r.split("."),i=+X.groupSize,s=+X.secondaryGroupSize,a=X.groupSeparator,u=o[0],c=o[1],l=this.s<0,f=l?u.slice(1):u,h=f.length;if(s&&(n=i,i=s,s=n,h-=n),i>0&&h>0){for(n=h%i||i,u=f.substr(0,n);n<h;n+=i)u+=a+f.substr(n,i);s>0&&(u+=a+f.slice(n)),l&&(u="-"+u)}r=c?u+X.decimalSeparator+((s=+X.fractionGroupSize)?c.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+X.fractionGroupSeparator):c):u}return r},N.toFraction=function(e){var t,n,o,i,s,a,u,c,l,f=q,h=this,p=h.c,y=new Q(j),g=n=new Q(j),m=u=new Q(j);if(null!=e&&(q=!1,a=new Q(e),q=f,(f=a.isInt())&&!a.lt(j)||(q&&J(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&a.c&&ee(a,a.e+1,1).gte(j)?a:null)),!p)return h.toString();for(l=_(p),i=y.e=l.length-h.e-1,y.c[0]=v[(s=i%d)<0?d+s:s],e=!e||a.cmp(y)>0?i>0?y:g:a,s=F,F=1/0,a=new Q(l),u.c[0]=0;c=r(a,y,0,1),1!=(o=n.plus(c.times(m))).cmp(e);)n=m,m=o,g=u.plus(c.times(o=g)),u=o,y=a.minus(c.times(o=y)),a=o;return o=r(e.minus(n),m,0,1),u=u.plus(o.times(g)),n=n.plus(o.times(m)),u.s=g.s=h.s,t=r(g,m,i*=2,U).minus(h).abs().cmp(r(u,n,i,U).minus(h).abs())<1?[g.toString(),m.toString()]:[u.toString(),n.toString()],F=s,t},N.toNumber=function(){return+this},N.toPower=N.pow=function(e,t){var r,n,o,i=u(e<0?-e:+e),s=this;if(null!=t&&(I=23,t=new Q(t)),!K(e,-y,y,23,"exponent")&&(!isFinite(e)||i>y&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new Q(t?r%t:r);for(t?e>1&&s.gt(j)&&s.isInt()&&t.gt(j)&&t.isInt()?s=s.mod(t):(o=t,t=null):V&&(r=a(V/d+2)),n=new Q(j);;){if(i%2){if(!(n=n.times(s)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(i=u(i/2)))break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):t&&(s=s.mod(t))}return t?n:(e<0&&(n=j.div(n)),o?n.mod(o):r?ee(n,V,U):n)},N.toPrecision=function(e,t){return W(this,null!=e&&K(e,1,m,24,"precision")?0|e:null,t,24)},N.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=_(r.c),t=null!=e&&K(e,2,64,25,"base")?G(x(t,o),0|e,10,n):o<=B||o>=L?O(t,o):x(t,o),n<0&&r.c[0]&&(t="-"+t)),t},N.truncated=N.trunc=function(){return ee(new Q(this),this.e+1,1)},N.valueOf=N.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=_(t.c),e=r<=B||r>=L?O(e,r):x(e,r),t.s<0?"-"+e:e)},N.isBigNumber=!0,null!=t&&Q.config(t),Q}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n=r(136),o=r(51),i=r(44),s=r(6),a=r(26),u=r(45),c=r(59),l=r(58),f="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if(t==f||t==h)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(p.call(e,r))return!1;return!0}},function(e,t,r){var n=r(413),o=r(133)((function(e,t,r){n(e,t,r)}));e.exports=o},function(e,t,r){var n=r(63),o=r(187),i=r(78),s=r(414),a=r(17),u=r(35),c=r(188);e.exports=function e(t,r,l,f,h){t!==r&&i(r,(function(i,u){if(h||(h=new n),a(i))s(t,r,u,l,e,f,h);else{var p=f?f(c(t,u),i,u+"",t,r,h):void 0;void 0===p&&(p=i),o(t,u,p)}}),u)}},function(e,t,r){var n=r(187),o=r(179),i=r(182),s=r(180),a=r(183),u=r(44),c=r(6),l=r(415),f=r(45),h=r(60),p=r(17),d=r(416),y=r(58),v=r(188),g=r(417);e.exports=function(e,t,r,m,w,_,b){var E=v(e,r),S=v(t,r),A=b.get(S);if(A)n(e,r,A);else{var O=_?_(E,S,r+"",e,t,b):void 0,x=void 0===O;if(x){var k=c(S),T=!k&&f(S),P=!k&&!T&&y(S);O=S,k||T||P?c(E)?O=E:l(E)?O=s(E):T?(x=!1,O=o(S,!0)):P?(x=!1,O=i(S,!0)):O=[]:d(S)||u(S)?(O=E,u(E)?O=g(E):p(E)&&!h(E)||(O=a(S))):x=!1}x&&(b.set(S,O),w(O,S,m,_,b),b.delete(S)),n(e,r,O)}}},function(e,t,r){var n=r(26),o=r(14);e.exports=function(e){return o(e)&&n(e)}},function(e,t,r){var n=r(21),o=r(107),i=r(14),s="[object Object]",a=Function.prototype,u=Object.prototype,c=a.toString,l=u.hasOwnProperty,f=c.call(Object);e.exports=function(e){if(!i(e)||n(e)!=s)return!1;var t=o(e);if(null===t)return!0;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==f}},function(e,t,r){var n=r(39),o=r(35);e.exports=function(e){return n(e,o(e))}},function(e,t){e.exports=!1},function(e,t,r){var n,o,i;
/*!
* URI.js - Mutating URLs
* URI Template Support - http://tools.ietf.org/html/rfc6570
*
* Version: 1.19.2
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(s,a){"use strict";e.exports?e.exports=a(r(41)):(o=[r(41)],void 0===(i="function"==typeof(n=a)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t){"use strict";var r=t&&t.URITemplate,n=Object.prototype.hasOwnProperty;function o(e){return o._cache[e]?o._cache[e]:this instanceof o?(this.expression=e,o._cache[e]=this,this):new o(e)}function i(e){this.data=e,this.cache={}}var s=o.prototype,a={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return o._cache={},o.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,o.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/,o.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/,o.LITERAL_PATTERN=/[<>{}"`^| \\]/,o.expand=function(e,t,r){var n,i,s,u=a[e.operator],c=u.named?"Named":"Unnamed",l=e.variables,f=[];for(s=0;i=l[s];s++){if(0===(n=t.get(i.name)).type&&r&&r.strict)throw new Error('Missing expansion value for variable "'+i.name+'"');if(n.val.length){if(n.type>1&&i.maxlength)throw new Error('Invalid expression: Prefix modifier not applicable to variable "'+i.name+'"');f.push(o["expand"+c](n,u,i.explode,i.explode&&u.separator||",",i.maxlength,i.name))}else n.type&&f.push("")}return f.length?u.prefix+f.join(u.separator):""},o.expandNamed=function(t,r,n,o,i,s){var a,u,c,l="",f=r.encode,h=r.empty_name_separator,p=!t[f].length,d=2===t.type?"":e[f](s);for(u=0,c=t.val.length;u<c;u++)i?(a=e[f](t.val[u][1].substring(0,i)),2===t.type&&(d=e[f](t.val[u][0].substring(0,i)))):p?(a=e[f](t.val[u][1]),2===t.type?(d=e[f](t.val[u][0]),t[f].push([d,a])):t[f].push([void 0,a])):(a=t[f][u][1],2===t.type&&(d=t[f][u][0])),l&&(l+=o),n?l+=d+(h||a?"=":"")+a:(u||(l+=e[f](s)+(h||a?"=":"")),2===t.type&&(l+=d+","),l+=a);return l},o.expandUnnamed=function(t,r,n,o,i){var s,a,u,c="",l=r.encode,f=r.empty_name_separator,h=!t[l].length;for(a=0,u=t.val.length;a<u;a++)i?s=e[l](t.val[a][1].substring(0,i)):h?(s=e[l](t.val[a][1]),t[l].push([2===t.type?e[l](t.val[a][0]):void 0,s])):s=t[l][a][1],c&&(c+=o),2===t.type&&(c+=i?e[l](t.val[a][0].substring(0,i)):t[l][a][0],c+=n?f||s?"=":"":","),c+=s;return c},o.noConflict=function(){return t.URITemplate===o&&(t.URITemplate=r),o},s.expand=function(e,t){var r="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var n=0,s=this.parts.length;n<s;n++)r+="string"==typeof this.parts[n]?this.parts[n]:o.expand(this.parts[n],e,t);return r},s.parse=function(){var e,t,r,n=this.expression,i=o.EXPRESSION_PATTERN,s=o.VARIABLE_PATTERN,u=o.VARIABLE_NAME_PATTERN,c=o.LITERAL_PATTERN,l=[],f=0,h=function(e){if(e.match(c))throw new Error('Invalid Literal "'+e+'"');return e};for(i.lastIndex=0;;){if(null===(t=i.exec(n))){l.push(h(n.substring(f)));break}if(l.push(h(n.substring(f,t.index))),f=t.index+t[0].length,!a[t[1]])throw new Error('Unknown Operator "'+t[1]+'" in "'+t[0]+'"');if(!t[3])throw new Error('Unclosed Expression "'+t[0]+'"');for(var p=0,d=(e=t[2].split(",")).length;p<d;p++){if(null===(r=e[p].match(s)))throw new Error('Invalid Variable "'+e[p]+'" in "'+t[0]+'"');if(r[1].match(u))throw new Error('Invalid Variable Name "'+r[1]+'" in "'+t[0]+'"');e[p]={name:r[1],explode:!!r[3],maxlength:r[4]&&parseInt(r[4],10)}}if(!e.length)throw new Error('Expression Missing Variable(s) "'+t[0]+'"');l.push({expression:t[0],operator:t[1],variables:e})}return l.length||l.push(h(n)),this.parts=l,this},i.prototype.get=function(e){var t,r,o,i=this.data,s={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=s,null==(o="[object Function]"===String(Object.prototype.toString.call(i))?i(e):"[object Function]"===String(Object.prototype.toString.call(i[e]))?i[e](e):i[e]))return s;if("[object Array]"===String(Object.prototype.toString.call(o))){for(t=0,r=o.length;t<r;t++)void 0!==o[t]&&null!==o[t]&&s.val.push([void 0,String(o[t])]);s.val.length&&(s.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(o))){for(t in o)n.call(o,t)&&void 0!==o[t]&&null!==o[t]&&s.val.push([t,String(o[t])]);s.val.length&&(s.type=2)}else s.type=1,s.val.push([void 0,String(o)]);return s},e.expand=function(t,r){var n=new o(t).expand(r);return new e(n)},o}))},function(e,t,r){"use strict";var n=r(12),o=r(192),i=r(422),s=r(198);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(195));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(199),u.CancelToken=r(434),u.isCancel=r(194),u.all=function(e){return Promise.all(e)},u.spread=r(435),e.exports=u,e.exports.default=u},function(e,t){
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){"use strict";var n=r(12),o=r(193),i=r(423),s=r(424),a=r(198);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[s,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},u.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=u},function(e,t,r){"use strict";var n=r(12);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,r){"use strict";var n=r(12),o=r(425),i=r(194),s=r(195),a=r(432),u=r(433);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!a(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(197);e.exports=function(e,t,r){var o=r.config.validateStatus;!o||o(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},function(e,t,r){"use strict";var n=r(12),o=["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"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},function(e,t,r){"use strict";var n=r(12);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(12);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(199);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){(function(t,n){var o=r(437),i=r(112).parse,s=r(75),a=r(446),u=r(200),c=r(135),l=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],f=[239,187,191],h=58,p=32,d=10,y=13;function v(e,r){var s=v.CONNECTING;Object.defineProperty(this,"readyState",{get:function(){return s}}),Object.defineProperty(this,"url",{get:function(){return e}});var c,w=this;function _(t){s!==v.CLOSED&&(s=v.CONNECTING,k("error",new g("error",{message:t})),O&&(e=O,O=null),setTimeout((function(){s===v.CONNECTING&&x()}),w.reconnectInterval))}w.reconnectInterval=1e3;var b="";r&&r.headers&&r.headers["Last-Event-ID"]&&(b=r.headers["Last-Event-ID"],delete r.headers["Last-Event-ID"]);var E=!1,S="",A="",O=null;function x(){var o=i(e),p="https:"===o.protocol;if(o.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},b&&(o.headers["Last-Event-ID"]=b),r&&r.headers)for(var m in r.headers){var S=r.headers[m];S&&(o.headers[m]=S)}if(o.rejectUnauthorized=!(r&&!r.rejectUnauthorized),r&&r.proxy){var A=i(r.proxy);p="https:"===A.protocol,o.protocol=p?"https:":"http:",o.path=e,o.headers.Host=o.host,o.hostname=A.hostname,o.host=A.host,o.port=A.port}if(r&&r.https)for(var P in r.https)if(-1!==l.indexOf(P)){var R=r.https[P];void 0!==R&&(o[P]=R)}r&&void 0!==r.withCredentials&&(o.withCredentials=r.withCredentials),(c=(p?a:u).request(o,(function(r){if(500===r.statusCode||502===r.statusCode||503===r.statusCode||504===r.statusCode)return k("error",new g("error",{status:r.statusCode,message:r.statusMessage})),void _();if(301===r.statusCode||307===r.statusCode)return r.headers.location?(307===r.statusCode&&(O=e),e=r.headers.location,void t.nextTick(x)):void k("error",new g("error",{status:r.statusCode,message:r.statusMessage}));if(200!==r.statusCode)return k("error",new g("error",{status:r.statusCode,message:r.statusMessage})),w.close();s=v.OPEN,r.on("close",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),_()})),r.on("end",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),_()})),k("open",new g("open"));var o,i=!0;r.on("data",(function(e){o=o?n.concat([o,e]):e,i&&function(e){return f.every((function(t,r){return e[r]===t}))}(o)&&(o=o.slice(f.length)),i=!1;for(var t=0,r=o.length;t<r;){E&&(o[t]===d&&++t,E=!1);for(var s,a=-1,u=-1,c=t;a<0&&c<r;++c)(s=o[c])===h?u<0&&(u=c-t):s===y?(E=!0,a=c-t):s===d&&(a=c-t);if(a<0)break;T(o,t,u,a),t+=a+1}t===r?o=void 0:t>0&&(o=o.slice(t))}))}))).on("error",(function(e){_(e.message)})),c.setNoDelay&&c.setNoDelay(!0),c.end()}function k(){w.listeners(arguments[0]).length>0&&w.emit.apply(w,arguments)}function T(t,r,n,i){if(0===i){if(S.length>0){var s=A||"message";k(s,new m(s,{data:S.slice(0,-1),lastEventId:b,origin:o(e)})),S=""}A=void 0}else if(n>0){var a=n<0,u=0,c=t.slice(r,r+(a?i:n)).toString();r+=u=a?i:t[r+n+1]!==p?n+1:n+2;var l=i-u,f=t.slice(r,r+l).toString();if("data"===c)S+=f+"\n";else if("event"===c)A=f;else if("id"===c)b=f;else if("retry"===c){var h=parseInt(f,10);Number.isNaN(h)||(w.reconnectInterval=h)}}}x(),this._close=function(){s!==v.CLOSED&&(s=v.CLOSED,c.abort&&c.abort(),c.xhr&&c.xhr.abort&&c.xhr.abort())}}function g(e,t){if(Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)for(var r in t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}function m(e,t){for(var r in Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}e.exports=v,c.inherits(v,s.EventEmitter),v.prototype.constructor=v,["open","error","message"].forEach((function(e){Object.defineProperty(v.prototype,"on"+e,{get:function(){var t=this.listeners(e)[0];return t?t._listener?t._listener:t:void 0},set:function(t){this.removeAllListeners(e),this.addEventListener(e,t)}})})),Object.defineProperty(v,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(v,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(v,"CLOSED",{enumerable:!0,value:2}),v.prototype.CONNECTING=0,v.prototype.OPEN=1,v.prototype.CLOSED=2,v.prototype.close=function(){this._close()},v.prototype.addEventListener=function(e,t){"function"==typeof t&&(t._listener=t,this.on(e,t))},v.prototype.dispatchEvent=function(e){if(!e.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(e.type,e.detail)},v.prototype.removeEventListener=function(e,t){"function"==typeof t&&(t._listener=void 0,this.removeListener(e,t))}}).call(this,r(16),r(1).Buffer)},function(e,t,r){"use strict";var n=r(438);function o(e){return"string"==typeof e&&(e=n(e)),e.protocol&&e.hostname?(e.protocol+"//"+e.host).toLowerCase():"null"}o.same=function(e,t){return o(e)===o(t)},e.exports=o},function(e,t,r){"use strict";(function(t){var n=r(439),o=r(440),i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(a,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function f(e){var r,n=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},s=typeof(e=e||n);if("blob:"===e.protocol)o=new p(unescape(e.pathname),{});else if("string"===s)for(r in o=new p(e,{}),l)delete o[r];else if("object"===s){for(r in e)r in l||(o[r]=e[r]);void 0===o.slashes&&(o.slashes=i.test(e.href))}return o}function h(e){e=u(e);var t=s.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function p(e,t,r){if(e=u(e),!(this instanceof p))return new p(e,t,r);var i,s,a,l,d,y,v=c.slice(),g=typeof t,m=this,w=0;for("object"!==g&&"string"!==g&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),t=f(t),i=!(s=h(e||"")).protocol&&!s.slashes,m.slashes=s.slashes||i&&t.slashes,m.protocol=s.protocol||t.protocol||"",e=s.rest,s.slashes||(v[3]=[/(.*)/,"pathname"]);w<v.length;w++)"function"!=typeof(l=v[w])?(a=l[0],y=l[1],a!=a?m[y]=e:"string"==typeof a?~(d=e.indexOf(a))&&("number"==typeof l[2]?(m[y]=e.slice(0,d),e=e.slice(d+l[2])):(m[y]=e.slice(d),e=e.slice(0,d))):(d=a.exec(e))&&(m[y]=d[1],e=e.slice(0,d.index)),m[y]=m[y]||i&&l[3]&&t[y]||"",l[4]&&(m[y]=m[y].toLowerCase())):e=l(e);r&&(m.query=r(m.query)),i&&t.slashes&&"/"!==m.pathname.charAt(0)&&(""!==m.pathname||""!==t.pathname)&&(m.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(m.pathname,t.pathname)),n(m.port,m.protocol)||(m.host=m.hostname,m.port=""),m.username=m.password="",m.auth&&(l=m.auth.split(":"),m.username=l[0]||"",m.password=l[1]||""),m.origin=m.protocol&&m.host&&"file:"!==m.protocol?m.protocol+"//"+m.host:"null",m.href=m.toString()}p.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";i[e]=t.charAt(0)!==s?s+t:t}else i[e]=t;break;default:i[e]=t}for(var a=0;a<c.length;a++){var u=c[a];u[4]&&(i[u[1]]=i[u[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var i=n+(r.slashes?"//":"");return r.username&&(i+=r.username,r.password&&(i+=":"+r.password),i+="@"),i+=r.host+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},p.extractProtocol=h,p.location=f,p.trimLeft=u,p.qs=o,e.exports=p}).call(this,r(5))},function(e,t,r){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,r){"use strict";var n,o=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,s=[];for(i in"string"!=typeof t&&(t="?"),e)if(o.call(e,i)){if((r=e[i])||null!==r&&r!==n&&!isNaN(r)||(r=""),i=encodeURIComponent(i),r=encodeURIComponent(r),null===i||null===r)continue;s.push(i+"="+r)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,n={};t=r.exec(e);){var o=i(t[1]),s=i(t[2]);null===o||null===s||o in n||(n[o]=s)}return n}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=36,l=1,f=26,h=38,p=700,d=72,y=128,v="-",g=/^xn--/,m=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=c-l,E=Math.floor,S=String.fromCharCode;function A(e){throw new RangeError(_[e])}function O(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function x(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+O((e=e.replace(w,".")).split("."),t).join(".")}function k(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function T(e){return O(e,(function(e){var t="";return e>65535&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)})).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,r){var n=0;for(e=r?E(e/p):e>>1,e+=E(e/t);e>b*f>>1;n+=c)e=E(e/b);return E(n+(b+1)*e/(e+h))}function C(e){var t,r,n,o,i,s,a,h,p,g,m,w=[],_=e.length,b=0,S=y,O=d;for((r=e.lastIndexOf(v))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&A("not-basic"),w.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<_;){for(i=b,s=1,a=c;o>=_&&A("invalid-input"),((h=(m=e.charCodeAt(o++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:c)>=c||h>E((u-b)/s))&&A("overflow"),b+=h*s,!(h<(p=a<=O?l:a>=O+f?f:a-O));a+=c)s>E(u/(g=c-p))&&A("overflow"),s*=g;O=R(b-i,t=w.length+1,0==i),E(b/t)>u-S&&A("overflow"),S+=E(b/t),b%=t,w.splice(b++,0,S)}return T(w)}function I(e){var t,r,n,o,i,s,a,h,p,g,m,w,_,b,O,x=[];for(w=(e=k(e)).length,t=y,r=0,i=d,s=0;s<w;++s)(m=e[s])<128&&x.push(S(m));for(n=o=x.length,o&&x.push(v);n<w;){for(a=u,s=0;s<w;++s)(m=e[s])>=t&&m<a&&(a=m);for(a-t>E((u-r)/(_=n+1))&&A("overflow"),r+=(a-t)*_,t=a,s=0;s<w;++s)if((m=e[s])<t&&++r>u&&A("overflow"),m==t){for(h=r,p=c;!(h<(g=p<=i?l:p>=i+f?f:p-i));p+=c)O=h-g,b=c-g,x.push(S(P(g+O%b,0))),h=E(O/b);x.push(S(P(h,0))),i=R(r,_,n==o),r=0,++n}++r,++t}return x.join("")}a={version:"1.4.1",ucs2:{decode:k,encode:T},decode:C,encode:I,toASCII:function(e){return x(e,(function(e){return m.test(e)?"xn--"+I(e):e}))},toUnicode:function(e){return x(e,(function(e){return g.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return a}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(46)(e),r(5))},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(444),t.encode=t.stringify=r(445)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,h,p,d,y=e[l].replace(a,"%20"),v=y.indexOf(r);v>=0?(f=y.substr(0,v),h=y.substr(v+1)):(f=y,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(s,p)?o(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return o(e[s])?i(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){var n=r(200),o=r(112),i=e.exports;for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);function a(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=a(e),n.request.call(this,e,t)},i.get=function(e,t){return e=a(e),n.get.call(this,e,t)}},function(e,t,r){(function(t,n,o){var i=r(201),s=r(10),a=r(202),u=r(203),c=r(455),l=a.IncomingMessage,f=a.readyStates;var h=e.exports=function(e){var r,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)o=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":i.vbArray&&e?"text:vbarray":"text"}(r,o),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===p.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var r=e._opts,s=e._headers,a=null;"GET"!==r.method&&"HEAD"!==r.method&&(a=i.arraybuffer?c(t.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return c(e)})),{type:(s["content-type"]||{}).value||""}):t.concat(e._body).toString());var u=[];if(Object.keys(s).forEach((function(e){var t=s[e].name,r=s[e].value;Array.isArray(r)?r.forEach((function(e){u.push([t,e])})):u.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var h=new AbortController;l=h.signal,e._fetchAbortController=h,"requestTimeout"in r&&0!==r.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:a||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new n.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(p.timeout=r.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),u.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(a)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(1).Buffer,r(5),r(16))},function(e,t){},function(e,t,r){"use strict";var n=r(113).Buffer,o=r(450);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,o,i=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=i,o=a,t.copy(r,o),a+=s.data.length,s=s.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,o,i,s,a,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){d(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},n=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var o={callback:e,args:t};return c[u]=o,n(u),u++},h.clearImmediate=p}function p(e){delete c[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(r,n)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(16))},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){var n=r(1),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";e.exports=i;var n=r(210),o=r(56);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}o.inherits=r(10),o.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n=r(1).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,o=0;o<r;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("accounts"),r}return n.__extends(t,e),t.prototype.accountId=function(e){return this.filter.push(["accounts",e]),this},t}(r(8).CallBuilder);t.AccountCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("assets"),r}return n.__extends(t,e),t.prototype.forCode=function(e){return this.url.setQuery("asset_code",e),this},t.prototype.forIssuer=function(e){return this.url.setQuery("asset_issuer",e),this},t}(r(8).CallBuilder);t.AssetsCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("effects"),r}return n.__extends(t,e),t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"effects"]),this},t.prototype.forLedger=function(e){return this.filter.push(["ledgers","number"==typeof e?e.toString():e,"effects"]),this},t.prototype.forTransaction=function(e){return this.filter.push(["transactions",e,"effects"]),this},t.prototype.forOperation=function(e){return this.filter.push(["operations",e,"effects"]),this},t}(r(8).CallBuilder);t.EffectCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t,r){var n=e.call(this,t)||this;return n.url.segment("friendbot"),n.url.setQuery("addr",r),n}return n.__extends(t,e),t}(r(8).CallBuilder);t.FriendbotBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("ledgers"),r}return n.__extends(t,e),t.prototype.ledger=function(e){return this.filter.push(["ledgers",e.toString()]),this},t}(r(8).CallBuilder);t.LedgerCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(8),i=r(34),s=function(e){function t(t,r){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=e.call(this,t)||this;if("accounts"!==r)throw new i.BadRequestError("Bad resource specified for offer:",r);return a.url.segment(n.__spreadArrays([r],o,["offers"])),a}return n.__extends(t,e),t}(o.CallBuilder);t.OfferCallBuilder=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("operations"),r}return n.__extends(t,e),t.prototype.operation=function(e){return this.filter.push(["operations",e]),this},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"operations"]),this},t.prototype.forLedger=function(e){return this.filter.push(["ledgers","number"==typeof e?e.toString():e,"operations"]),this},t.prototype.forTransaction=function(e){return this.filter.push(["transactions",e,"operations"]),this},t.prototype.includeFailed=function(e){return this.url.setQuery("include_failed",e.toString()),this},t}(r(8).CallBuilder);t.OperationCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.url.segment("order_book"),r.isNative()?o.url.setQuery("selling_asset_type","native"):(o.url.setQuery("selling_asset_type",r.getAssetType()),o.url.setQuery("selling_asset_code",r.getCode()),o.url.setQuery("selling_asset_issuer",r.getIssuer())),n.isNative()?o.url.setQuery("buying_asset_type","native"):(o.url.setQuery("buying_asset_type",n.getAssetType()),o.url.setQuery("buying_asset_code",n.getCode()),o.url.setQuery("buying_asset_issuer",n.getIssuer())),o}return n.__extends(t,e),t}(r(8).CallBuilder);t.OrderbookCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t,r,n,o,i){var s=e.call(this,t)||this;return s.url.segment("paths"),s.url.setQuery("destination_account",n),s.url.setQuery("source_account",r),s.url.setQuery("destination_amount",i),o.isNative()?s.url.setQuery("destination_asset_type","native"):(s.url.setQuery("destination_asset_type",o.getAssetType()),s.url.setQuery("destination_asset_code",o.getCode()),s.url.setQuery("destination_asset_issuer",o.getIssuer())),s}return n.__extends(t,e),t}(r(8).CallBuilder);t.PathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("payments"),r}return n.__extends(t,e),t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"payments"]),this},t.prototype.forLedger=function(e){return this.filter.push(["ledgers","number"==typeof e?e.toString():e,"payments"]),this},t.prototype.forTransaction=function(e){return this.filter.push(["transactions",e,"payments"]),this},t}(r(8).CallBuilder);t.PaymentCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;if(i.url.segment("paths/strict-receive"),"string"==typeof r)i.url.setQuery("source_account",r);else{var s=r.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("source_assets",s)}return i.url.setQuery("destination_amount",o),n.isNative()?i.url.setQuery("destination_asset_type","native"):(i.url.setQuery("destination_asset_type",n.getAssetType()),i.url.setQuery("destination_asset_code",n.getCode()),i.url.setQuery("destination_asset_issuer",n.getIssuer())),i}return n.__extends(t,e),t}(r(8).CallBuilder);t.StrictReceivePathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;if(i.url.segment("paths/strict-send"),r.isNative()?i.url.setQuery("source_asset_type","native"):(i.url.setQuery("source_asset_type",r.getAssetType()),i.url.setQuery("source_asset_code",r.getCode()),i.url.setQuery("source_asset_issuer",r.getIssuer())),i.url.setQuery("source_amount",n),"string"==typeof o)i.url.setQuery("destination_account",o);else{var s=o.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("destination_assets",s)}return i}return n.__extends(t,e),t}(r(8).CallBuilder);t.StrictSendPathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=r(8),i=r(34),s=[6e4,3e5,9e5,36e5,864e5,6048e5],a=function(e){function t(t,r,n,o,s,a,u){var c=e.call(this,t)||this;if(c.url.segment("trade_aggregations"),r.isNative()?c.url.setQuery("base_asset_type","native"):(c.url.setQuery("base_asset_type",r.getAssetType()),c.url.setQuery("base_asset_code",r.getCode()),c.url.setQuery("base_asset_issuer",r.getIssuer())),n.isNative()?c.url.setQuery("counter_asset_type","native"):(c.url.setQuery("counter_asset_type",n.getAssetType()),c.url.setQuery("counter_asset_code",n.getCode()),c.url.setQuery("counter_asset_issuer",n.getIssuer())),"number"!=typeof o||"number"!=typeof s)throw new i.BadRequestError("Invalid time bounds",[o,s]);if(c.url.setQuery("start_time",o.toString()),c.url.setQuery("end_time",s.toString()),!c.isValidResolution(a))throw new i.BadRequestError("Invalid resolution",a);if(c.url.setQuery("resolution",a.toString()),!c.isValidOffset(u,a))throw new i.BadRequestError("Invalid offset",u);return c.url.setQuery("offset",u.toString()),c}return n.__extends(t,e),t.prototype.isValidResolution=function(e){for(var t=0,r=s;t<r.length;t++){if(r[t]===e)return!0}return!1},t.prototype.isValidOffset=function(e,t){return!(e>t||e>=864e5||e%36e5!=0)},t}(o.CallBuilder);t.TradeAggregationCallBuilder=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("trades"),r}return n.__extends(t,e),t.prototype.forAssetPair=function(e,t){return e.isNative()?this.url.setQuery("base_asset_type","native"):(this.url.setQuery("base_asset_type",e.getAssetType()),this.url.setQuery("base_asset_code",e.getCode()),this.url.setQuery("base_asset_issuer",e.getIssuer())),t.isNative()?this.url.setQuery("counter_asset_type","native"):(this.url.setQuery("counter_asset_type",t.getAssetType()),this.url.setQuery("counter_asset_code",t.getCode()),this.url.setQuery("counter_asset_issuer",t.getIssuer())),this},t.prototype.forOffer=function(e){return this.url.setQuery("offer_id",e),this},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"trades"]),this},t}(r(8).CallBuilder);t.TradesCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("transactions"),r}return n.__extends(t,e),t.prototype.transaction=function(e){return this.filter.push(["transactions",e]),this},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"transactions"]),this},t.prototype.forLedger=function(e){var t="number"==typeof e?e.toString():e;return this.filter.push(["ledgers",t,"transactions"]),this},t.prototype.includeFailed=function(e){return this.url.setQuery("include_failed",e.toString()),this},t}(r(8).CallBuilder);t.TransactionCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=n.__importDefault(r(111)),i=r(47),s=n.__importDefault(r(41)),a=r(74),u=r(34),c=r(211);t.FEDERATION_RESPONSE_MAX_SIZE=102400;var l=function(){function e(e,t,r){void 0===r&&(r={}),this.serverURL=s.default(e),this.domain=t;var n=void 0===r.allowHttp?a.Config.isAllowHttp():r.allowHttp;if(this.timeout=void 0===r.timeout?a.Config.getTimeout():r.timeout,"https"!==this.serverURL.protocol()&&!n)throw new Error("Cannot connect to insecure federation server")}return e.resolve=function(t,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var o,s;return n.__generator(this,(function(n){switch(n.label){case 0:return t.indexOf("*")<0?i.StrKey.isValidEd25519PublicKey(t)?[2,Promise.resolve({account_id:t})]:[2,Promise.reject(new Error("Invalid Account ID"))]:(o=t.split("*"),s=o[1],2===o.length&&s?[4,e.createForDomain(s,r)]:[2,Promise.reject(new Error("Invalid Stellar address"))]);case 1:return[2,n.sent().resolveAddress(t)]}}))}))},e.createForDomain=function(t,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,c.StellarTomlResolver.resolve(t,r)];case 1:return(o=n.sent()).FEDERATION_SERVER?[2,new e(o.FEDERATION_SERVER,t,r)]:[2,Promise.reject(new Error("stellar.toml does not contain FEDERATION_SERVER field"))]}}))}))},e.prototype.resolveAddress=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){if(t=e,e.indexOf("*")<0){if(!this.domain)return[2,Promise.reject(new Error("Unknown domain. Make sure `address` contains a domain (ex. `bob*stellar.org`) or pass `domain` parameter when instantiating the server object."))];t=e+"*"+this.domain}return r=this.serverURL.query({type:"name",q:t}),[2,this._sendRequest(r)]}))}))},e.prototype.resolveAccountId=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){return t=this.serverURL.query({type:"id",q:e}),[2,this._sendRequest(t)]}))}))},e.prototype.resolveTransactionId=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){return t=this.serverURL.query({type:"txid",q:e}),[2,this._sendRequest(t)]}))}))},e.prototype._sendRequest=function(e){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){return r=this.timeout,[2,o.default.get(e.toString(),{maxContentLength:t.FEDERATION_RESPONSE_MAX_SIZE,timeout:r}).then((function(e){if(void 0!==e.data.memo&&"string"!=typeof e.data.memo)throw new Error("memo value should be of type string");return e.data})).catch((function(e){if(e instanceof Error){if(e.message.match(/^maxContentLength size/))throw new Error("federation response exceeds allowed size of "+t.FEDERATION_RESPONSE_MAX_SIZE);return Promise.reject(e)}return Promise.reject(new u.BadResponseError("Server query failed. Server responded: "+e.status+" "+e.statusText,e.data))}))]}))}))},e}();t.FederationServer=l},function(e,t,r){var n=r(475),o=r(476);e.exports={parse:function(e){var t=n.parse(e.toString());return o.compile(t)}}},function(e,t){e.exports=function(){function e(e,t,r,n,o,i){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=o,this.column=i,this.name="SyntaxError"}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),{SyntaxError:e,parse:function(t){var r,n=arguments.length>1?arguments[1]:{},o={},i={start:jt},s=jt,a=function(){return hr},u=o,c="#",l={type:"literal",value:"#",description:'"#"'},f=void 0,h={type:"any",description:"any character"},p="[",d={type:"literal",value:"[",description:'"["'},y="]",v={type:"literal",value:"]",description:'"]"'},g=function(e){pr(dr("ObjectPath",e,Pt,Rt))},m=function(e){pr(dr("ArrayPath",e,Pt,Rt))},w=function(e,t){return e.concat(t)},_=function(e){return[e]},b=function(e){return e},E=".",S={type:"literal",value:".",description:'"."'},A="=",O={type:"literal",value:"=",description:'"="'},x=function(e,t){pr(dr("Assign",t,Pt,Rt,e))},k=function(e){return e.join("")},T=function(e){return e.value},P='"""',R={type:"literal",value:'"""',description:'"\\"\\"\\""'},C=null,I=function(e){return dr("String",e.join(""),Pt,Rt)},N='"',j={type:"literal",value:'"',description:'"\\""'},M="'''",U={type:"literal",value:"'''",description:"\"'''\""},B="'",L={type:"literal",value:"'",description:'"\'"'},D=function(e){return e},F=function(e){return e},q="\\",K={type:"literal",value:"\\",description:'"\\\\"'},z=function(){return""},H="e",V={type:"literal",value:"e",description:'"e"'},X="E",Q={type:"literal",value:"E",description:'"E"'},G=function(e,t){return dr("Float",parseFloat(e+"e"+t),Pt,Rt)},W=function(e){return dr("Float",parseFloat(e),Pt,Rt)},Y="+",$={type:"literal",value:"+",description:'"+"'},Z=function(e){return e.join("")},J="-",ee={type:"literal",value:"-",description:'"-"'},te=function(e){return"-"+e.join("")},re=function(e){return dr("Integer",parseInt(e,10),Pt,Rt)},ne="true",oe={type:"literal",value:"true",description:'"true"'},ie=function(){return dr("Boolean",!0,Pt,Rt)},se="false",ae={type:"literal",value:"false",description:'"false"'},ue=function(){return dr("Boolean",!1,Pt,Rt)},ce=function(){return dr("Array",[],Pt,Rt)},le=function(e){return dr("Array",e?[e]:[],Pt,Rt)},fe=function(e){return dr("Array",e,Pt,Rt)},he=function(e,t){return dr("Array",e.concat(t),Pt,Rt)},pe=function(e){return e},de=",",ye={type:"literal",value:",",description:'","'},ve="{",ge={type:"literal",value:"{",description:'"{"'},me="}",we={type:"literal",value:"}",description:'"}"'},_e=function(e){return dr("InlineTable",e,Pt,Rt)},be=function(e,t){return dr("InlineTableValue",t,Pt,Rt,e)},Ee=function(e){return"."+e},Se=function(e){return e.join("")},Ae=":",Oe={type:"literal",value:":",description:'":"'},xe=function(e){return e.join("")},ke="T",Te={type:"literal",value:"T",description:'"T"'},Pe="Z",Re={type:"literal",value:"Z",description:'"Z"'},Ce=function(e,t){return dr("Date",new Date(e+"T"+t+"Z"),Pt,Rt)},Ie=function(e,t){return dr("Date",new Date(e+"T"+t),Pt,Rt)},Ne=/^[ \t]/,je={type:"class",value:"[ \\t]",description:"[ \\t]"},Me="\n",Ue={type:"literal",value:"\n",description:'"\\n"'},Be="\r",Le={type:"literal",value:"\r",description:'"\\r"'},De=/^[0-9a-f]/i,Fe={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},qe=/^[0-9]/,Ke={type:"class",value:"[0-9]",description:"[0-9]"},ze="_",He={type:"literal",value:"_",description:'"_"'},Ve=function(){return""},Xe=/^[A-Za-z0-9_\-]/,Qe={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},Ge=function(e){return e.join("")},We='\\"',Ye={type:"literal",value:'\\"',description:'"\\\\\\""'},$e=function(){return'"'},Ze="\\\\",Je={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},et=function(){return"\\"},tt="\\b",rt={type:"literal",value:"\\b",description:'"\\\\b"'},nt=function(){return"\b"},ot="\\t",it={type:"literal",value:"\\t",description:'"\\\\t"'},st=function(){return"\t"},at="\\n",ut={type:"literal",value:"\\n",description:'"\\\\n"'},ct=function(){return"\n"},lt="\\f",ft={type:"literal",value:"\\f",description:'"\\\\f"'},ht=function(){return"\f"},pt="\\r",dt={type:"literal",value:"\\r",description:'"\\\\r"'},yt=function(){return"\r"},vt="\\U",gt={type:"literal",value:"\\U",description:'"\\\\U"'},mt=function(e){return function(e,t,r){var n=parseInt("0x"+e);if(!(!isFinite(n)||Math.floor(n)!=n||n<0||n>1114111||n>55295&&n<57344))return function(){var e,t,r=[],n=-1,o=arguments.length;if(!o)return"";var i="";for(;++n<o;){var s=Number(arguments[n]);s<=65535?r.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,r.push(e,t)),(n+1==o||r.length>16384)&&(i+=String.fromCharCode.apply(null,r),r.length=0)}return i}(n);!function(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}("Invalid Unicode escape code: "+e,t,r)}(e.join(""))},wt="\\u",_t={type:"literal",value:"\\u",description:'"\\\\u"'},bt=0,Et=0,St=0,At={line:1,column:1,seenCR:!1},Ot=0,xt=[],kt=0,Tt={};if("startRule"in n){if(!(n.startRule in i))throw new Error("Can't start parsing from rule \""+n.startRule+'".');s=i[n.startRule]}function Pt(){return Ct(Et).line}function Rt(){return Ct(Et).column}function Ct(e){return St!==e&&(St>e&&(St=0,At={line:1,column:1,seenCR:!1}),function(e,r,n){var o,i;for(o=r;o<n;o++)"\n"===(i=t.charAt(o))?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===i||"\u2028"===i||"\u2029"===i?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}(At,St,e),St=e),At}function It(e){bt<Ot||(bt>Ot&&(Ot=bt,xt=[]),xt.push(e))}function Nt(r,n,o){var i=Ct(o),s=o<t.length?t.charAt(o):null;return null!==n&&function(e){var t=1;for(e.sort((function(e,t){return e.description<t.description?-1:e.description>t.description?1:0}));t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}(n),new e(null!==r?r:function(e,t){var r,n=new Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r].description;return"Expected "+(e.length>1?n.slice(0,-1).join(", ")+" or "+n[e.length-1]:n[0])+" but "+(t?'"'+function(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,(function(e){return"\\x0"+t(e)})).replace(/[\x10-\x1F\x80-\xFF]/g,(function(e){return"\\x"+t(e)})).replace(/[\u0180-\u0FFF]/g,(function(e){return"\\u0"+t(e)})).replace(/[\u1080-\uFFFF]/g,(function(e){return"\\u"+t(e)}))}(t)+'"':"end of input")+" found."}(n,s),n,s,o,i.line,i.column)}function jt(){var e,t,r,n=49*bt+0,i=Tt[n];if(i)return bt=i.nextPos,i.result;for(e=bt,t=[],r=Mt();r!==o;)t.push(r),r=Mt();return t!==o&&(Et=e,t=a()),e=t,Tt[n]={nextPos:bt,result:e},e}function Mt(){var e,r,n,i,s,a,c,l=49*bt+1,f=Tt[l];if(f)return bt=f.nextPos,f.result;for(e=bt,r=[],n=nr();n!==o;)r.push(n),n=nr();if(r!==o)if((n=function(){var e,r=49*bt+2,n=Tt[r];if(n)return bt=n.nextPos,n.result;(e=Ut())===o&&(e=function(){var e,r,n,i,s,a,c=49*bt+4,l=Tt[c];if(l)return bt=l.nextPos,l.result;e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d));if(r!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();if(n!==o)if((i=Bt())!==o){for(s=[],a=nr();a!==o;)s.push(a),a=nr();s!==o?(93===t.charCodeAt(bt)?(a=y,bt++):(a=o,0===kt&&It(v)),a!==o?(Et=e,r=g(i),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;return Tt[c]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s,a,c,l,f=49*bt+5,h=Tt[f];if(h)return bt=h.nextPos,h.result;e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d));if(r!==o)if(91===t.charCodeAt(bt)?(n=p,bt++):(n=o,0===kt&&It(d)),n!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o)if((s=Bt())!==o){for(a=[],c=nr();c!==o;)a.push(c),c=nr();a!==o?(93===t.charCodeAt(bt)?(c=y,bt++):(c=o,0===kt&&It(v)),c!==o?(93===t.charCodeAt(bt)?(l=y,bt++):(l=o,0===kt&&It(v)),l!==o?(Et=e,r=m(s),e=r):(bt=e,e=u)):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u;return Tt[f]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s,a,c=49*bt+9,l=Tt[c];if(l)return bt=l.nextPos,l.result;if(e=bt,(r=Ft())!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();if(n!==o)if(61===t.charCodeAt(bt)?(i=A,bt++):(i=o,0===kt&&It(O)),i!==o){for(s=[],a=nr();a!==o;)s.push(a),a=nr();s!==o&&(a=Kt())!==o?(Et=e,r=x(r,a),e=r):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;if(e===o)if(e=bt,(r=qt())!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();if(n!==o)if(61===t.charCodeAt(bt)?(i=A,bt++):(i=o,0===kt&&It(O)),i!==o){for(s=[],a=nr();a!==o;)s.push(a),a=nr();s!==o&&(a=Kt())!==o?(Et=e,r=x(r,a),e=r):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;return Tt[c]={nextPos:bt,result:e},e}());return Tt[r]={nextPos:bt,result:e},e}())!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o){for(s=[],a=Ut();a!==o;)s.push(a),a=Ut();if(s!==o){if(a=[],(c=or())!==o)for(;c!==o;)a.push(c),c=or();else a=u;a===o&&(a=sr()),a!==o?e=r=[r,n,i,s,a]:(bt=e,e=u)}else bt=e,e=u}else bt=e,e=u}else bt=e,e=u;else bt=e,e=u;if(e===o){if(e=bt,r=[],(n=nr())!==o)for(;n!==o;)r.push(n),n=nr();else r=u;if(r!==o){if(n=[],(i=or())!==o)for(;i!==o;)n.push(i),i=or();else n=u;n===o&&(n=sr()),n!==o?e=r=[r,n]:(bt=e,e=u)}else bt=e,e=u;e===o&&(e=or())}return Tt[l]={nextPos:bt,result:e},e}function Ut(){var e,r,n,i,s,a,p=49*bt+3,d=Tt[p];if(d)return bt=d.nextPos,d.result;if(e=bt,35===t.charCodeAt(bt)?(r=c,bt++):(r=o,0===kt&&It(l)),r!==o){for(n=[],i=bt,s=bt,kt++,(a=or())===o&&(a=sr()),kt--,a===o?s=f:(bt=s,s=u),s!==o?(t.length>bt?(a=t.charAt(bt),bt++):(a=o,0===kt&&It(h)),a!==o?i=s=[s,a]:(bt=i,i=u)):(bt=i,i=u);i!==o;)n.push(i),i=bt,s=bt,kt++,(a=or())===o&&(a=sr()),kt--,a===o?s=f:(bt=s,s=u),s!==o?(t.length>bt?(a=t.charAt(bt),bt++):(a=o,0===kt&&It(h)),a!==o?i=s=[s,a]:(bt=i,i=u)):(bt=i,i=u);n!==o?e=r=[r,n]:(bt=e,e=u)}else bt=e,e=u;return Tt[p]={nextPos:bt,result:e},e}function Bt(){var e,t,r,n=49*bt+6,i=Tt[n];if(i)return bt=i.nextPos,i.result;if(e=bt,t=[],(r=Dt())!==o)for(;r!==o;)t.push(r),r=Dt();else t=u;return t!==o&&(r=Lt())!==o?(Et=e,e=t=w(t,r)):(bt=e,e=u),e===o&&(e=bt,(t=Lt())!==o&&(Et=e,t=_(t)),e=t),Tt[n]={nextPos:bt,result:e},e}function Lt(){var e,t,r,n,i,s=49*bt+7,a=Tt[s];if(a)return bt=a.nextPos,a.result;for(e=bt,t=[],r=nr();r!==o;)t.push(r),r=nr();if(t!==o)if((r=Ft())!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();n!==o?(Et=e,e=t=b(r)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u;if(e===o){for(e=bt,t=[],r=nr();r!==o;)t.push(r),r=nr();if(t!==o)if((r=qt())!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();n!==o?(Et=e,e=t=b(r)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}return Tt[s]={nextPos:bt,result:e},e}function Dt(){var e,r,n,i,s,a,c,l=49*bt+8,f=Tt[l];if(f)return bt=f.nextPos,f.result;for(e=bt,r=[],n=nr();n!==o;)r.push(n),n=nr();if(r!==o)if((n=Ft())!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o)if(46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),s!==o){for(a=[],c=nr();c!==o;)a.push(c),c=nr();a!==o?(Et=e,e=r=b(n)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u;if(e===o){for(e=bt,r=[],n=nr();n!==o;)r.push(n),n=nr();if(r!==o)if((n=qt())!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o)if(46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),s!==o){for(a=[],c=nr();c!==o;)a.push(c),c=nr();a!==o?(Et=e,e=r=b(n)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u}return Tt[l]={nextPos:bt,result:e},e}function Ft(){var e,t,r,n=49*bt+10,i=Tt[n];if(i)return bt=i.nextPos,i.result;if(e=bt,t=[],(r=cr())!==o)for(;r!==o;)t.push(r),r=cr();else t=u;return t!==o&&(Et=e,t=k(t)),e=t,Tt[n]={nextPos:bt,result:e},e}function qt(){var e,t,r=49*bt+11,n=Tt[r];return n?(bt=n.nextPos,n.result):(e=bt,(t=zt())!==o&&(Et=e,t=T(t)),(e=t)===o&&(e=bt,(t=Ht())!==o&&(Et=e,t=T(t)),e=t),Tt[r]={nextPos:bt,result:e},e)}function Kt(){var e,r=49*bt+12,n=Tt[r];return n?(bt=n.nextPos,n.result):((e=function(){var e,r=49*bt+13,n=Tt[r];if(n)return bt=n.nextPos,n.result;(e=function(){var e,r,n,i,s,a=49*bt+14,c=Tt[a];if(c)return bt=c.nextPos,c.result;e=bt,t.substr(bt,3)===P?(r=P,bt+=3):(r=o,0===kt&&It(R));if(r!==o)if((n=or())===o&&(n=C),n!==o){for(i=[],s=Qt();s!==o;)i.push(s),s=Qt();i!==o?(t.substr(bt,3)===P?(s=P,bt+=3):(s=o,0===kt&&It(R)),s!==o?(Et=e,r=I(i),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u;return Tt[a]={nextPos:bt,result:e},e}())===o&&(e=zt())===o&&(e=function(){var e,r,n,i,s,a=49*bt+16,c=Tt[a];if(c)return bt=c.nextPos,c.result;e=bt,t.substr(bt,3)===M?(r=M,bt+=3):(r=o,0===kt&&It(U));if(r!==o)if((n=or())===o&&(n=C),n!==o){for(i=[],s=Gt();s!==o;)i.push(s),s=Gt();i!==o?(t.substr(bt,3)===M?(s=M,bt+=3):(s=o,0===kt&&It(U)),s!==o?(Et=e,r=I(i),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u;return Tt[a]={nextPos:bt,result:e},e}())===o&&(e=Ht());return Tt[r]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s,a=49*bt+38,c=Tt[a];if(c)return bt=c.nextPos,c.result;e=bt,(r=rr())!==o?(84===t.charCodeAt(bt)?(n=ke,bt++):(n=o,0===kt&&It(Te)),n!==o&&(i=function(){var e,r,n,i,s,a,c,l,f,h,p,d=49*bt+36,y=Tt[d];if(y)return bt=y.nextPos,y.result;e=bt,r=bt,(n=ur())!==o&&(i=ur())!==o?(58===t.charCodeAt(bt)?(s=Ae,bt++):(s=o,0===kt&&It(Oe)),s!==o&&(a=ur())!==o&&(c=ur())!==o?(58===t.charCodeAt(bt)?(l=Ae,bt++):(l=o,0===kt&&It(Oe)),l!==o&&(f=ur())!==o&&(h=ur())!==o?((p=tr())===o&&(p=C),p!==o?r=n=[n,i,s,a,c,l,f,h,p]:(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u);r!==o&&(Et=e,r=xe(r));return e=r,Tt[d]={nextPos:bt,result:e},e}())!==o?(90===t.charCodeAt(bt)?(s=Pe,bt++):(s=o,0===kt&&It(Re)),s!==o?(Et=e,r=Ce(r,i),e=r):(bt=e,e=u)):(bt=e,e=u)):(bt=e,e=u);e===o&&(e=bt,(r=rr())!==o?(84===t.charCodeAt(bt)?(n=ke,bt++):(n=o,0===kt&&It(Te)),n!==o&&(i=function(){var e,r,n,i,s,a,c,l,f,h,p,d,y,v,g,m,w,_=49*bt+37,b=Tt[_];if(b)return bt=b.nextPos,b.result;e=bt,r=bt,(n=ur())!==o&&(i=ur())!==o?(58===t.charCodeAt(bt)?(s=Ae,bt++):(s=o,0===kt&&It(Oe)),s!==o&&(a=ur())!==o&&(c=ur())!==o?(58===t.charCodeAt(bt)?(l=Ae,bt++):(l=o,0===kt&&It(Oe)),l!==o&&(f=ur())!==o&&(h=ur())!==o?((p=tr())===o&&(p=C),p!==o?(45===t.charCodeAt(bt)?(d=J,bt++):(d=o,0===kt&&It(ee)),d===o&&(43===t.charCodeAt(bt)?(d=Y,bt++):(d=o,0===kt&&It($))),d!==o&&(y=ur())!==o&&(v=ur())!==o?(58===t.charCodeAt(bt)?(g=Ae,bt++):(g=o,0===kt&&It(Oe)),g!==o&&(m=ur())!==o&&(w=ur())!==o?r=n=[n,i,s,a,c,l,f,h,p,d,y,v,g,m,w]:(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u);r!==o&&(Et=e,r=xe(r));return e=r,Tt[_]={nextPos:bt,result:e},e}())!==o?(Et=e,r=Ie(r,i),e=r):(bt=e,e=u)):(bt=e,e=u));return Tt[a]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s=49*bt+23,a=Tt[s];if(a)return bt=a.nextPos,a.result;e=bt,(r=Wt())===o&&(r=Yt());r!==o?(101===t.charCodeAt(bt)?(n=H,bt++):(n=o,0===kt&&It(V)),n===o&&(69===t.charCodeAt(bt)?(n=X,bt++):(n=o,0===kt&&It(Q))),n!==o&&(i=Yt())!==o?(Et=e,r=G(r,i),e=r):(bt=e,e=u)):(bt=e,e=u);e===o&&(e=bt,(r=Wt())!==o&&(Et=e,r=W(r)),e=r);return Tt[s]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,t,r=49*bt+25,n=Tt[r];if(n)return bt=n.nextPos,n.result;e=bt,(t=Yt())!==o&&(Et=e,t=re(t));return e=t,Tt[r]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n=49*bt+27,i=Tt[n];if(i)return bt=i.nextPos,i.result;e=bt,t.substr(bt,4)===ne?(r=ne,bt+=4):(r=o,0===kt&&It(oe));r!==o&&(Et=e,r=ie());(e=r)===o&&(e=bt,t.substr(bt,5)===se?(r=se,bt+=5):(r=o,0===kt&&It(ae)),r!==o&&(Et=e,r=ue()),e=r);return Tt[n]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s,a=49*bt+28,c=Tt[a];if(c)return bt=c.nextPos,c.result;e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d));if(r!==o){for(n=[],i=Jt();i!==o;)n.push(i),i=Jt();n!==o?(93===t.charCodeAt(bt)?(i=y,bt++):(i=o,0===kt&&It(v)),i!==o?(Et=e,r=ce(),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;if(e===o&&(e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d)),r!==o?((n=$t())===o&&(n=C),n!==o?(93===t.charCodeAt(bt)?(i=y,bt++):(i=o,0===kt&&It(v)),i!==o?(Et=e,r=le(n),e=r):(bt=e,e=u)):(bt=e,e=u)):(bt=e,e=u),e===o)){if(e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d)),r!==o){if(n=[],(i=Zt())!==o)for(;i!==o;)n.push(i),i=Zt();else n=u;n!==o?(93===t.charCodeAt(bt)?(i=y,bt++):(i=o,0===kt&&It(v)),i!==o?(Et=e,r=fe(n),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;if(e===o)if(e=bt,91===t.charCodeAt(bt)?(r=p,bt++):(r=o,0===kt&&It(d)),r!==o){if(n=[],(i=Zt())!==o)for(;i!==o;)n.push(i),i=Zt();else n=u;n!==o&&(i=$t())!==o?(93===t.charCodeAt(bt)?(s=y,bt++):(s=o,0===kt&&It(v)),s!==o?(Et=e,r=he(n,i),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u}return Tt[a]={nextPos:bt,result:e},e}())===o&&(e=function(){var e,r,n,i,s,a,c=49*bt+32,l=Tt[c];if(l)return bt=l.nextPos,l.result;e=bt,123===t.charCodeAt(bt)?(r=ve,bt++):(r=o,0===kt&&It(ge));if(r!==o){for(n=[],i=nr();i!==o;)n.push(i),i=nr();if(n!==o){for(i=[],s=er();s!==o;)i.push(s),s=er();if(i!==o){for(s=[],a=nr();a!==o;)s.push(a),a=nr();s!==o?(125===t.charCodeAt(bt)?(a=me,bt++):(a=o,0===kt&&It(we)),a!==o?(Et=e,r=_e(i),e=r):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u}else bt=e,e=u}else bt=e,e=u;return Tt[c]={nextPos:bt,result:e},e}()),Tt[r]={nextPos:bt,result:e},e)}function zt(){var e,r,n,i,s=49*bt+15,a=Tt[s];if(a)return bt=a.nextPos,a.result;if(e=bt,34===t.charCodeAt(bt)?(r=N,bt++):(r=o,0===kt&&It(j)),r!==o){for(n=[],i=Vt();i!==o;)n.push(i),i=Vt();n!==o?(34===t.charCodeAt(bt)?(i=N,bt++):(i=o,0===kt&&It(j)),i!==o?(Et=e,e=r=I(n)):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;return Tt[s]={nextPos:bt,result:e},e}function Ht(){var e,r,n,i,s=49*bt+17,a=Tt[s];if(a)return bt=a.nextPos,a.result;if(e=bt,39===t.charCodeAt(bt)?(r=B,bt++):(r=o,0===kt&&It(L)),r!==o){for(n=[],i=Xt();i!==o;)n.push(i),i=Xt();n!==o?(39===t.charCodeAt(bt)?(i=B,bt++):(i=o,0===kt&&It(L)),i!==o?(Et=e,e=r=I(n)):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;return Tt[s]={nextPos:bt,result:e},e}function Vt(){var e,r,n,i=49*bt+18,s=Tt[i];return s?(bt=s.nextPos,s.result):((e=fr())===o&&(e=bt,r=bt,kt++,34===t.charCodeAt(bt)?(n=N,bt++):(n=o,0===kt&&It(j)),kt--,n===o?r=f:(bt=r,r=u),r!==o?(t.length>bt?(n=t.charAt(bt),bt++):(n=o,0===kt&&It(h)),n!==o?(Et=e,e=r=D(n)):(bt=e,e=u)):(bt=e,e=u)),Tt[i]={nextPos:bt,result:e},e)}function Xt(){var e,r,n,i=49*bt+19,s=Tt[i];return s?(bt=s.nextPos,s.result):(e=bt,r=bt,kt++,39===t.charCodeAt(bt)?(n=B,bt++):(n=o,0===kt&&It(L)),kt--,n===o?r=f:(bt=r,r=u),r!==o?(t.length>bt?(n=t.charAt(bt),bt++):(n=o,0===kt&&It(h)),n!==o?(Et=e,e=r=D(n)):(bt=e,e=u)):(bt=e,e=u),Tt[i]={nextPos:bt,result:e},e)}function Qt(){var e,r,n,i=49*bt+20,s=Tt[i];return s?(bt=s.nextPos,s.result):((e=fr())===o&&(e=function(){var e,r,n,i,s=49*bt+21,a=Tt[s];if(a)return bt=a.nextPos,a.result;e=bt,92===t.charCodeAt(bt)?(r=q,bt++):(r=o,0===kt&&It(K));if(r!==o)if(or()!==o){for(n=[],i=ir();i!==o;)n.push(i),i=ir();n!==o?(Et=e,r=z(),e=r):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u;return Tt[s]={nextPos:bt,result:e},e}())===o&&(e=bt,r=bt,kt++,t.substr(bt,3)===P?(n=P,bt+=3):(n=o,0===kt&&It(R)),kt--,n===o?r=f:(bt=r,r=u),r!==o?(t.length>bt?(n=t.charAt(bt),bt++):(n=o,0===kt&&It(h)),n!==o?(Et=e,e=r=F(n)):(bt=e,e=u)):(bt=e,e=u)),Tt[i]={nextPos:bt,result:e},e)}function Gt(){var e,r,n,i=49*bt+22,s=Tt[i];return s?(bt=s.nextPos,s.result):(e=bt,r=bt,kt++,t.substr(bt,3)===M?(n=M,bt+=3):(n=o,0===kt&&It(U)),kt--,n===o?r=f:(bt=r,r=u),r!==o?(t.length>bt?(n=t.charAt(bt),bt++):(n=o,0===kt&&It(h)),n!==o?(Et=e,e=r=D(n)):(bt=e,e=u)):(bt=e,e=u),Tt[i]={nextPos:bt,result:e},e)}function Wt(){var e,r,n,i,s,a,c=49*bt+24,l=Tt[c];return l?(bt=l.nextPos,l.result):(e=bt,43===t.charCodeAt(bt)?(r=Y,bt++):(r=o,0===kt&&It($)),r===o&&(r=C),r!==o?(n=bt,(i=lr())!==o?(46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),s!==o&&(a=lr())!==o?n=i=[i,s,a]:(bt=n,n=u)):(bt=n,n=u),n!==o?(Et=e,e=r=Z(n)):(bt=e,e=u)):(bt=e,e=u),e===o&&(e=bt,45===t.charCodeAt(bt)?(r=J,bt++):(r=o,0===kt&&It(ee)),r!==o?(n=bt,(i=lr())!==o?(46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),s!==o&&(a=lr())!==o?n=i=[i,s,a]:(bt=n,n=u)):(bt=n,n=u),n!==o?(Et=e,e=r=te(n)):(bt=e,e=u)):(bt=e,e=u)),Tt[c]={nextPos:bt,result:e},e)}function Yt(){var e,r,n,i,s,a=49*bt+26,c=Tt[a];if(c)return bt=c.nextPos,c.result;if(e=bt,43===t.charCodeAt(bt)?(r=Y,bt++):(r=o,0===kt&&It($)),r===o&&(r=C),r!==o){if(n=[],(i=ur())!==o)for(;i!==o;)n.push(i),i=ur();else n=u;n!==o?(i=bt,kt++,46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),kt--,s===o?i=f:(bt=i,i=u),i!==o?(Et=e,e=r=Z(n)):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;if(e===o)if(e=bt,45===t.charCodeAt(bt)?(r=J,bt++):(r=o,0===kt&&It(ee)),r!==o){if(n=[],(i=ur())!==o)for(;i!==o;)n.push(i),i=ur();else n=u;n!==o?(i=bt,kt++,46===t.charCodeAt(bt)?(s=E,bt++):(s=o,0===kt&&It(S)),kt--,s===o?i=f:(bt=i,i=u),i!==o?(Et=e,e=r=te(n)):(bt=e,e=u)):(bt=e,e=u)}else bt=e,e=u;return Tt[a]={nextPos:bt,result:e},e}function $t(){var e,t,r,n,i,s=49*bt+29,a=Tt[s];if(a)return bt=a.nextPos,a.result;for(e=bt,t=[],r=Jt();r!==o;)t.push(r),r=Jt();if(t!==o)if((r=Kt())!==o){for(n=[],i=Jt();i!==o;)n.push(i),i=Jt();n!==o?(Et=e,e=t=pe(r)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u;return Tt[s]={nextPos:bt,result:e},e}function Zt(){var e,r,n,i,s,a,c,l=49*bt+30,f=Tt[l];if(f)return bt=f.nextPos,f.result;for(e=bt,r=[],n=Jt();n!==o;)r.push(n),n=Jt();if(r!==o)if((n=Kt())!==o){for(i=[],s=Jt();s!==o;)i.push(s),s=Jt();if(i!==o)if(44===t.charCodeAt(bt)?(s=de,bt++):(s=o,0===kt&&It(ye)),s!==o){for(a=[],c=Jt();c!==o;)a.push(c),c=Jt();a!==o?(Et=e,e=r=pe(n)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u;return Tt[l]={nextPos:bt,result:e},e}function Jt(){var e,t=49*bt+31,r=Tt[t];return r?(bt=r.nextPos,r.result):((e=nr())===o&&(e=or())===o&&(e=Ut()),Tt[t]={nextPos:bt,result:e},e)}function er(){var e,r,n,i,s,a,c,l,f,h,p,d=49*bt+33,y=Tt[d];if(y)return bt=y.nextPos,y.result;for(e=bt,r=[],n=nr();n!==o;)r.push(n),n=nr();if(r!==o)if((n=Ft())!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o)if(61===t.charCodeAt(bt)?(s=A,bt++):(s=o,0===kt&&It(O)),s!==o){for(a=[],c=nr();c!==o;)a.push(c),c=nr();if(a!==o)if((c=Kt())!==o){for(l=[],f=nr();f!==o;)l.push(f),f=nr();if(l!==o)if(44===t.charCodeAt(bt)?(f=de,bt++):(f=o,0===kt&&It(ye)),f!==o){for(h=[],p=nr();p!==o;)h.push(p),p=nr();h!==o?(Et=e,e=r=be(n,c)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u;if(e===o){for(e=bt,r=[],n=nr();n!==o;)r.push(n),n=nr();if(r!==o)if((n=Ft())!==o){for(i=[],s=nr();s!==o;)i.push(s),s=nr();if(i!==o)if(61===t.charCodeAt(bt)?(s=A,bt++):(s=o,0===kt&&It(O)),s!==o){for(a=[],c=nr();c!==o;)a.push(c),c=nr();a!==o&&(c=Kt())!==o?(Et=e,e=r=be(n,c)):(bt=e,e=u)}else bt=e,e=u;else bt=e,e=u}else bt=e,e=u;else bt=e,e=u}return Tt[d]={nextPos:bt,result:e},e}function tr(){var e,r,n,i=49*bt+34,s=Tt[i];return s?(bt=s.nextPos,s.result):(e=bt,46===t.charCodeAt(bt)?(r=E,bt++):(r=o,0===kt&&It(S)),r!==o&&(n=lr())!==o?(Et=e,e=r=Ee(n)):(bt=e,e=u),Tt[i]={nextPos:bt,result:e},e)}function rr(){var e,r,n,i,s,a,c,l,f,h,p,d,y=49*bt+35,v=Tt[y];return v?(bt=v.nextPos,v.result):(e=bt,r=bt,(n=ur())!==o&&(i=ur())!==o&&(s=ur())!==o&&(a=ur())!==o?(45===t.charCodeAt(bt)?(c=J,bt++):(c=o,0===kt&&It(ee)),c!==o&&(l=ur())!==o&&(f=ur())!==o?(45===t.charCodeAt(bt)?(h=J,bt++):(h=o,0===kt&&It(ee)),h!==o&&(p=ur())!==o&&(d=ur())!==o?r=n=[n,i,s,a,c,l,f,h,p,d]:(bt=r,r=u)):(bt=r,r=u)):(bt=r,r=u),r!==o&&(Et=e,r=Se(r)),e=r,Tt[y]={nextPos:bt,result:e},e)}function nr(){var e,r=49*bt+39,n=Tt[r];return n?(bt=n.nextPos,n.result):(Ne.test(t.charAt(bt))?(e=t.charAt(bt),bt++):(e=o,0===kt&&It(je)),Tt[r]={nextPos:bt,result:e},e)}function or(){var e,r,n,i=49*bt+40,s=Tt[i];return s?(bt=s.nextPos,s.result):(10===t.charCodeAt(bt)?(e=Me,bt++):(e=o,0===kt&&It(Ue)),e===o&&(e=bt,13===t.charCodeAt(bt)?(r=Be,bt++):(r=o,0===kt&&It(Le)),r!==o?(10===t.charCodeAt(bt)?(n=Me,bt++):(n=o,0===kt&&It(Ue)),n!==o?e=r=[r,n]:(bt=e,e=u)):(bt=e,e=u)),Tt[i]={nextPos:bt,result:e},e)}function ir(){var e,t=49*bt+41,r=Tt[t];return r?(bt=r.nextPos,r.result):((e=or())===o&&(e=nr()),Tt[t]={nextPos:bt,result:e},e)}function sr(){var e,r,n=49*bt+42,i=Tt[n];return i?(bt=i.nextPos,i.result):(e=bt,kt++,t.length>bt?(r=t.charAt(bt),bt++):(r=o,0===kt&&It(h)),kt--,r===o?e=f:(bt=e,e=u),Tt[n]={nextPos:bt,result:e},e)}function ar(){var e,r=49*bt+43,n=Tt[r];return n?(bt=n.nextPos,n.result):(De.test(t.charAt(bt))?(e=t.charAt(bt),bt++):(e=o,0===kt&&It(Fe)),Tt[r]={nextPos:bt,result:e},e)}function ur(){var e,r,n=49*bt+44,i=Tt[n];return i?(bt=i.nextPos,i.result):(qe.test(t.charAt(bt))?(e=t.charAt(bt),bt++):(e=o,0===kt&&It(Ke)),e===o&&(e=bt,95===t.charCodeAt(bt)?(r=ze,bt++):(r=o,0===kt&&It(He)),r!==o&&(Et=e,r=Ve()),e=r),Tt[n]={nextPos:bt,result:e},e)}function cr(){var e,r=49*bt+45,n=Tt[r];return n?(bt=n.nextPos,n.result):(Xe.test(t.charAt(bt))?(e=t.charAt(bt),bt++):(e=o,0===kt&&It(Qe)),Tt[r]={nextPos:bt,result:e},e)}function lr(){var e,t,r,n=49*bt+46,i=Tt[n];if(i)return bt=i.nextPos,i.result;if(e=bt,t=[],(r=ur())!==o)for(;r!==o;)t.push(r),r=ur();else t=u;return t!==o&&(Et=e,t=Ge(t)),e=t,Tt[n]={nextPos:bt,result:e},e}function fr(){var e,r,n=49*bt+47,i=Tt[n];return i?(bt=i.nextPos,i.result):(e=bt,t.substr(bt,2)===We?(r=We,bt+=2):(r=o,0===kt&&It(Ye)),r!==o&&(Et=e,r=$e()),(e=r)===o&&(e=bt,t.substr(bt,2)===Ze?(r=Ze,bt+=2):(r=o,0===kt&&It(Je)),r!==o&&(Et=e,r=et()),(e=r)===o&&(e=bt,t.substr(bt,2)===tt?(r=tt,bt+=2):(r=o,0===kt&&It(rt)),r!==o&&(Et=e,r=nt()),(e=r)===o&&(e=bt,t.substr(bt,2)===ot?(r=ot,bt+=2):(r=o,0===kt&&It(it)),r!==o&&(Et=e,r=st()),(e=r)===o&&(e=bt,t.substr(bt,2)===at?(r=at,bt+=2):(r=o,0===kt&&It(ut)),r!==o&&(Et=e,r=ct()),(e=r)===o&&(e=bt,t.substr(bt,2)===lt?(r=lt,bt+=2):(r=o,0===kt&&It(ft)),r!==o&&(Et=e,r=ht()),(e=r)===o&&(e=bt,t.substr(bt,2)===pt?(r=pt,bt+=2):(r=o,0===kt&&It(dt)),r!==o&&(Et=e,r=yt()),(e=r)===o&&(e=function(){var e,r,n,i,s,a,c,l,f,h,p,d=49*bt+48,y=Tt[d];if(y)return bt=y.nextPos,y.result;e=bt,t.substr(bt,2)===vt?(r=vt,bt+=2):(r=o,0===kt&&It(gt));r!==o?(n=bt,(i=ar())!==o&&(s=ar())!==o&&(a=ar())!==o&&(c=ar())!==o&&(l=ar())!==o&&(f=ar())!==o&&(h=ar())!==o&&(p=ar())!==o?n=i=[i,s,a,c,l,f,h,p]:(bt=n,n=u),n!==o?(Et=e,r=mt(n),e=r):(bt=e,e=u)):(bt=e,e=u);e===o&&(e=bt,t.substr(bt,2)===wt?(r=wt,bt+=2):(r=o,0===kt&&It(_t)),r!==o?(n=bt,(i=ar())!==o&&(s=ar())!==o&&(a=ar())!==o&&(c=ar())!==o?n=i=[i,s,a,c]:(bt=n,n=u),n!==o?(Et=e,r=mt(n),e=r):(bt=e,e=u)):(bt=e,e=u));return Tt[d]={nextPos:bt,result:e},e}()))))))),Tt[n]={nextPos:bt,result:e},e)}var hr=[];function pr(e){hr.push(e)}function dr(e,t,r,n,o){var i={type:e,value:t,line:r(),column:n()};return o&&(i.key=o),i}if((r=s())!==o&&bt===t.length)return r;throw r!==o&&bt<t.length&&It({type:"end",description:"end of input"}),Nt(null,xt,Ot)}}}()},function(e,t,r){"use strict";e.exports={compile:function(e){var t=[],r=[],n="",o={},i=o;return function(e){for(var t,r=0;r<e.length;r++)switch((t=e[r]).type){case"Assign":a(t);break;case"ObjectPath":l(t);break;case"ArrayPath":f(t)}return o}(e);function s(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}function a(e){var o,a=e.key,l=e.value,f=e.line,h=e.column;o=n?n+"."+a:a,void 0!==i[a]&&s("Cannot redefine existing key '"+o+"'.",f,h),i[a]=c(l),u(o)||(t.push(o),r.push(o))}function u(e){return-1!==t.indexOf(e)}function c(e){return"Array"===e.type?function(e){for(var t=null,r=0;r<e.length;r++){var n=e[r];null===t?t=n.type:n.type!==t&&s("Cannot add value of type "+n.type+" to array of type "+t+".",n.line,n.column)}return e.map(c)}(e.value):"InlineTable"===e.type?function e(t){for(var r={},n=0;n<t.length;n++){var o=t[n];"InlineTable"===o.value.type?r[o.key]=e(o.value.value):"InlineTableValue"===o.type&&(r[o.key]=c(o.value))}return r}(e.value):e.value}function l(e){var r=e.value,a=r.map(p).join("."),c=e.line,l=e.column;u(a)&&s("Cannot redefine existing key '"+r+"'.",c,l),t.push(a),i=h(o,r,{},c,l),n=r}function f(e){var r=e.value,a=r.map(p).join("."),c=e.line,l=e.column;if(u(a)||t.push(a),(t=t.filter((function(e){return 0!==e.indexOf(a)}))).push(a),i=h(o,r,[],c,l),n=a,i instanceof Array){var f={};i.push(f),i=f}else s("Cannot redefine existing key '"+r+"'.",c,l)}function h(e,t,n,o,i){for(var a=[],u="",c=(t.join("."),e),l=0;l<t.length;l++){var f=t[l];a.push(f),u=a.join("."),void 0===c[f]?l===t.length-1?c[f]=n:c[f]={}:l!==t.length-1&&r.indexOf(u)>-1&&s("Cannot redefine existing key '"+u+"'.",o,i),(c=c[f])instanceof Array&&c.length&&l<t.length-1&&(c=c[c.length-1])}return c}function p(e){return e.indexOf(".")>-1?'"'+e+'"':e}}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r(0).__importDefault(r(478)),o=r(47),i=r(34);!function(t){function r(e,t){var r=e.hash(),n=o.Keypair.fromPublicKey(t);return!!e.signatures.find((function(e){return n.verify(r,e.signature())}))}t.buildChallengeTx=function(e,t,r,i,s){void 0===i&&(i=300);var a=new o.Account(e.publicKey(),"-1"),u=Math.floor(Date.now()/1e3),c=n.default(48).toString("base64"),l=new o.TransactionBuilder(a,{fee:o.BASE_FEE,networkPassphrase:s,timebounds:{minTime:u,maxTime:u+i}}).addOperation(o.Operation.manageData({name:r+" auth",value:c,source:t})).build();return l.sign(e),l.toEnvelope().toXDR("base64").toString()},t.verifyChallengeTx=function(t,n,s){var a=new o.Transaction(t,s);if(0!==Number.parseInt(a.sequence,10))throw new i.InvalidSep10ChallengeError("The transaction sequence number should be zero");if(a.source!==n)throw new i.InvalidSep10ChallengeError("The transaction source account is not equal to the server's account");if(1!==a.operations.length)throw new i.InvalidSep10ChallengeError("The transaction should contain only one operation");var u=a.operations[0];if(!u.source)throw new i.InvalidSep10ChallengeError("The transaction's operation should contain a source account");if("manageData"!==u.type)throw new i.InvalidSep10ChallengeError("The transaction's operation should be manageData");if(48!==e.from(u.value.toString(),"base64").length)throw new i.InvalidSep10ChallengeError("The transaction's operation value should be a 64 bytes base64 random string");if(!r(a,n))throw new i.InvalidSep10ChallengeError("The transaction is not signed by the server");if(!r(a,u.source))throw new i.InvalidSep10ChallengeError("The transaction is not signed by the client");if(!function(e){if(!e.timeBounds)return!1;var t=Math.floor(Date.now()/1e3),r=e.timeBounds,n=r.minTime,o=r.maxTime;return t>=Number.parseInt(n,10)&&t<=Number.parseInt(o,10)}(a))throw new i.InvalidSep10ChallengeError("The transaction has expired");return!0},t.verifyTxSignedBy=r}(t.Utils||(t.Utils={}))}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t,n){var o=65536,i=4294967295;var s=r(24).Buffer,a=t.crypto||t.msCrypto;a&&a.getRandomValues?e.exports=function(e,t){if(e>i)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(e);if(e>0)if(e>o)for(var u=0;u<e;u+=o)a.getRandomValues(r.slice(u,u+o));else a.getRandomValues(r);if("function"==typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(5),r(16))},function(e,t,r){var n=r(13);e.exports=function(){return n.Date.now()}},function(e,t,r){var n=r(90),o=r(481);e.exports=function e(t,r,i,s,a){var u=-1,c=t.length;for(i||(i=o),a||(a=[]);++u<c;){var l=t[u];r>0&&i(l)?r>1?e(l,r-1,i,s,a):n(a,l):s||(a[a.length]=l)}return a}},function(e,t,r){var n=r(36),o=r(44),i=r(6),s=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(s&&e&&e[s])}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.splitPath=function(e){var t=[];return e.split("/").forEach((function(e){var r=parseInt(e,10);isNaN(r)||(e.length>1&&"'"===e[e.length-1]&&(r+=2147483648),t.push(r))})),t},t.foreach=function(e,t){return Promise.resolve().then((function(){return function e(r,n,o){return r>=n.length?o:t(n[r],r).then((function(t){return o.push(t),e(r+1,n,o)}))}(0,e,[])}))},t.crc16xmodem=a,t.encodeEd25519PublicKey=function(t){var r=e.from(t),o=e.from([48]),i=e.concat([o,r]),s=e.alloc(2);s.writeUInt16LE(a(i),0);var u=e.concat([i,s]);return n.default.encode(u)},t.verifyEd25519Signature=function(e,t,r){return o.default.sign.detached.verify(new Uint8Array(e.toJSON().data),new Uint8Array(t.toJSON().data),new Uint8Array(r.toJSON().data))},t.hash=function(e){var t=new i.sha256;return t.update(e,"utf8"),t.digest()},t.checkStellarBip32Path=function(e){e.split("/").forEach((function(e){if(!e.toString().endsWith("'"))throw new Error("Detected a non-hardened path element in requested BIP32 path. Non-hardended paths are not supported at this time. Please use an all-hardened path. Example: 44'/148'/0'")}))};var n=s(r(127)),o=s(r(18)),i=r(121);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=void 0!==t?~~t:0,n=0;n<e.length;n++){var o=r>>>8&255;o^=255&e[n],r=r<<8&65535,r^=o^=o>>>4,r^=o=o<<5&65535,r^=o=o<<7&65535}return r}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";e.exports=r(484)},function(e,t,r){"use strict";(function(t){e.exports=c;var n=r(485),o="undefined"!=typeof navigator&&!!navigator.userAgent,i=o&&navigator.userAgent.match(/Safari\//)&&!navigator.userAgent.match(/Chrome\//),s=o&&navigator.userAgent.match(/Edge\/1[2345]/),a=null;function u(e){return a||(a=new e((function(e,t){function r(){e({u2f:null,native:!0})}return o?i?r():(void 0!==window.u2f&&"function"==typeof window.u2f.sign&&e({u2f:window.u2f,native:!0}),s?r():"http:"===location.protocol?r():"undefined"==typeof MessageChannel?r():void n.isSupported((function(t){t?e({u2f:n,native:!1}):r()}))):r()}))),a}function c(e){return{isSupported:h.bind(e),ensureSupport:d.bind(e),register:y.bind(e),sign:v.bind(e),ErrorCodes:c.ErrorCodes,ErrorNames:c.ErrorNames}}function l(e,t){var r=null!=t?t.errorCode:1,n=c.ErrorNames[""+r],o=new Error(e);return o.metaData={type:n,code:r},o}function f(e,t){var r={};return r.promise=new e((function(e,n){r.resolve=e,r.reject=n,t.then(e,n)})),r.promise.cancel=function(t,n){u(e).then((function(e){n&&!e.native&&e.u2f.disconnect(),r.reject(l(t,{errorCode:-1}))}))},r}function h(){return u(this).then((function(e){return!!e.u2f}))}function p(e){if(!e.u2f){if("http:"===location.protocol)throw new Error("U2F isn't supported over http, only https");throw new Error("U2F not supported")}}function d(){return u(this).then(p)}function y(e,t,r){var n=this;return Array.isArray(e)||(e=[e]),"number"==typeof t&&void 0===r&&(r=t,t=null),t||(t=[]),f(n,u(n).then((function(o){p(o);var i=o.native,s=o.u2f;return new n((function(n,o){if(i){var a=e[0].appId;s.register(a,e,t,(function(e){e.errorCode?o(l("Registration failed",e)):(delete e.errorCode,n(e))}),r)}else s.register(e,t,(function(e,t){e?o(e):t.errorCode?o(l("Registration failed",t)):n(t)}),r)}))}))).promise}function v(e,t){var r=this;return Array.isArray(e)||(e=[e]),f(r,u(r).then((function(n){p(n);var o=n.native,i=n.u2f;return new r((function(r,n){if(o){var s=e[0].appId,a=e[0].challenge;i.sign(s,a,e,(function(e){e.errorCode?n(l("Sign failed",e)):(delete e.errorCode,r(e))}),t)}else i.sign(e,(function(e,t){e?n(e):t.errorCode?n(l("Sign failed",t)):r(t)}),t)}))}))).promise}function g(e){c[e]=function(){if(!t.Promise)throw new Error("The platform doesn't natively support promises");var r=[].slice.call(arguments);return c(t.Promise)[e].apply(null,r)}}c.ErrorCodes={CANCELLED:-1,OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},c.ErrorNames={"-1":"CANCELLED",0:"OK",1:"OTHER_ERROR",2:"BAD_REQUEST",3:"CONFIGURATION_UNSUPPORTED",4:"DEVICE_INELIGIBLE",5:"TIMEOUT"},g("isSupported"),g("ensureSupport"),g("register"),g("sign")}).call(this,r(5))},function(e,t,r){"use strict";var n=n||{};e.exports=n,n.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",n.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_RESPONSE:"u2f_sign_response"},n.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},n.Request,n.Response,n.Error,n.SignRequest,n.SignResponse,n.RegisterRequest,n.RegisterResponse,n.disconnect=function(){n.port_&&n.port_.port_&&(n.port_.port_.disconnect(),n.port_=null)},n.getMessagePort=function(e){if("undefined"!=typeof chrome&&chrome.runtime){var t={type:n.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(n.EXTENSION_ID,t,(function(){chrome.runtime.lastError?n.getIframePort_(e):n.getChromeRuntimePort_(e)}))}else n.getIframePort_(e)},n.getChromeRuntimePort_=function(e){var t=chrome.runtime.connect(n.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout((function(){e(null,new n.WrappedChromeRuntimePort_(t))}),0)},n.WrappedChromeRuntimePort_=function(e){this.port_=e},n.WrappedChromeRuntimePort_.prototype.postMessage=function(e){this.port_.postMessage(e)},n.WrappedChromeRuntimePort_.prototype.addEventListener=function(e,t){var r=e.toLowerCase();"message"==r||"onmessage"==r?this.port_.onMessage.addListener((function(e){t({data:e})})):console.error("WrappedChromeRuntimePort only supports onMessage")},n.getIframePort_=function(e){var t="chrome-extension://"+n.EXTENSION_ID,r=document.createElement("iframe");r.src=t+"/u2f-comms.html",r.setAttribute("style","display:none"),document.body.appendChild(r);var o=!1,i=new MessageChannel,s=function(t){"ready"==t.data?(i.port1.removeEventListener("message",s),o||(o=!0,e(null,i.port1))):console.error('First event on iframe port was not "ready"')};i.port1.addEventListener("message",s),i.port1.start(),r.addEventListener("load",(function(){r.contentWindow.postMessage("init",t,[i.port2])})),setTimeout((function(){o||(o=!0,e(new Error("IFrame extension not supported")))}),200)},n.EXTENSION_TIMEOUT_SEC=30,n.port_=null,n.waitingForPort_=[],n.reqCounter_=0,n.callbackMap_={},n.getPortSingleton_=function(e){n.port_?e(null,n.port_):(0==n.waitingForPort_.length&&n.getMessagePort((function(e,t){for(e||(n.port_=t,n.port_.addEventListener("message",n.responseHandler_));n.waitingForPort_.length;)n.waitingForPort_.shift()(e,t)})),n.waitingForPort_.push(e))},n.responseHandler_=function(e){var t=e.data,r=t.requestId;if(r&&n.callbackMap_[r]){var o=n.callbackMap_[r];delete n.callbackMap_[r],o(null,t.responseData)}else console.error("Unknown or missing requestId in response.")},n.isSupported=function(e){n.getPortSingleton_((function(t,r){e(!t)}))},n.sign=function(e,t,r){n.getPortSingleton_((function(o,i){if(o)return t(o);var s=++n.reqCounter_;n.callbackMap_[s]=t;var a={type:n.MessageTypes.U2F_SIGN_REQUEST,signRequests:e,timeoutSeconds:void 0!==r?r:n.EXTENSION_TIMEOUT_SEC,requestId:s};i.postMessage(a)}))},n.register=function(e,t,r,o){n.getPortSingleton_((function(i,s){if(i)return r(i);var a=++n.reqCounter_;n.callbackMap_[a]=r;var u={type:n.MessageTypes.U2F_REGISTER_REQUEST,signRequests:t,registerRequests:e,timeoutSeconds:void 0!==o?o:n.EXTENSION_TIMEOUT_SEC,requestId:a};s.postMessage(u)}))}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAltStatusMessage=t.StatusCodes=t.TransportStatusError=t.TransportError=void 0;var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(75),s=(n=i)&&n.__esModule?n:{default:n},a=r(212);function u(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function c(e){return function(){var t=e.apply(this,arguments);return new Promise((function(e,r){return function n(o,i){try{var s=t[o](i),a=s.value}catch(e){return void r(e)}if(!s.done)return Promise.resolve(a).then((function(e){n("next",e)}),(function(e){n("throw",e)}));e(a)}("next")}))}}t.TransportError=a.TransportError,t.TransportStatusError=a.TransportStatusError,t.StatusCodes=a.StatusCodes,t.getAltStatusMessage=a.getAltStatusMessage;var l=function(){function t(){var r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.exchangeTimeout=3e4,this._events=new s.default,this.send=(r=c(regeneratorRuntime.mark((function t(r,n,i,s){var u,c,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.alloc(0),f=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[a.StatusCodes.OK];return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(l.length>=256)){t.next=2;break}throw new a.TransportError("data.length exceed 256 bytes limit. Got: "+l.length,"DataLengthTooBig");case 2:return t.next=4,o.exchange(e.concat([e.from([r,n,i,s]),e.from([l.length]),l]));case 4:if(u=t.sent,c=u.readUInt16BE(u.length-2),f.some((function(e){return e===c}))){t.next=8;break}throw new a.TransportStatusError(c);case 8:return t.abrupt("return",u);case 9:case"end":return t.stop()}}),t,o)}))),function(e,t,n,o){return r.apply(this,arguments)}),this.exchangeAtomicImpl=(n=c(regeneratorRuntime.mark((function e(t){var r,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.exchangeBusyPromise){e.next=2;break}throw new a.TransportError("Transport race condition","RaceCondition");case 2:return r=void 0,n=new Promise((function(e){r=e})),o.exchangeBusyPromise=n,e.prev=5,e.next=8,t();case 8:return i=e.sent,e.abrupt("return",i);case 10:return e.prev=10,r&&r(),o.exchangeBusyPromise=null,e.finish(10);case 14:case"end":return e.stop()}}),e,o,[[5,,10,14]])}))),function(e){return n.apply(this,arguments)}),this._appAPIlock=null}return o(t,[{key:"on",value:function(e,t){this._events.on(e,t)}},{key:"off",value:function(e,t){this._events.removeListener(e,t)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(t=this._events).emit.apply(t,[e].concat(u(n)))}},{key:"setDebugMode",value:function(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}},{key:"setExchangeTimeout",value:function(e){this.exchangeTimeout=e}},{key:"decorateAppAPIMethods",value:function(e,t,r){var n=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value;e[u]=this.decorateAppAPIMethod(u,e[u],e,r)}}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}}},{key:"decorateAppAPIMethod",value:function(e,t,r,n){var o,i=this;return o=c(regeneratorRuntime.mark((function o(){for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];var l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(!(l=i._appAPIlock)){o.next=3;break}return o.abrupt("return",Promise.reject(new a.TransportError("Ledger Device is busy (lock "+l+")","TransportLocked")));case 3:return o.prev=3,i._appAPIlock=e,i.setScrambleKey(n),o.next=8,t.apply(r,u);case 8:return o.abrupt("return",o.sent);case 9:return o.prev=9,i._appAPIlock=null,o.finish(9);case 12:case"end":return o.stop()}}),o,i,[[3,,9,12]])}))),function(){return o.apply(this,arguments)}}}],[{key:"create",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,r=arguments[1];return new Promise((function(n,o){var i=!1,s=e.listen({next:function(r){i=!0,s&&s.unsubscribe(),u&&clearTimeout(u),e.open(r.descriptor,t).then(n,o)},error:function(e){u&&clearTimeout(u),o(e)},complete:function(){u&&clearTimeout(u),i||o(new a.TransportError(e.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),u=r?setTimeout((function(){s.unsubscribe(),o(new a.TransportError(e.ErrorMessage_ListenTimeout,"ListenTimeout"))}),r):null}))}}]),t}();l.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",l.ErrorMessage_NoDeviceFound="No Ledger device found",t.default=l}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o={},i={},s=(t.addCustomErrorDeserializer=function(e,t){i[e]=t},t.createCustomErrorClass=function(e){var t=function(t,r){Object.assign(this,r),this.name=e,this.message=t||e,this.stack=(new Error).stack};return t.prototype=new Error,o[e]=t,t});t.deserializeError=function e(t){if("object"===(void 0===t?"undefined":n(t))&&t){try{var r=JSON.parse(t.message);r.message&&r.name&&(t=r)}catch(e){}var a=void 0;if("string"==typeof t.name){var u=t.name,c=i[u];if(c)a=c(t);else{var l="Error"===u?Error:o[u];l||(console.warn("deserializing an unknown class '"+u+"'"),l=s(u)),a=Object.create(l.prototype);try{for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])}catch(e){}}}else a=new Error(t.message);return!a.stack&&Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return new Error(String(t))},t.serializeError=function(e){return e?"object"===(void 0===e?"undefined":n(e))?function e(t,r){var o={};r.push(t);var i=!0,s=!1,a=void 0;try{for(var u,c=Object.keys(t)[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l=u.value,f=t[l];"function"!=typeof f&&(f&&"object"===(void 0===f?"undefined":n(f))?-1!==r.indexOf(t[l])?o[l]="[Circular]":o[l]=e(t[l],r.slice(0)):o[l]=f)}}catch(e){s=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(s)throw a}}"string"==typeof t.name&&(o.name=t.name);"string"==typeof t.message&&(o.message=t.message);"string"==typeof t.stack&&(o.stack=t.stack);return o}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e:e}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=0,n=[],o=(t.log=function(e,t,o){var i={type:e,id:String(++r),date:new Date};t&&(i.message=t),o&&(i.data=o),function(e){for(var t=0;t<n.length;t++)try{n[t](e)}catch(e){console.error(e)}}(i)},t.listen=function(e){return n.push(e),function(){var t=n.indexOf(e);-1!==t&&(n[t]=n[n.length-1],n.pop())}});e.__ledgerLogsListen=o}).call(this,r(5))},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function i(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],i(r),i(n))}function s(e){try{return decodeURIComponent(e)}catch(o){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=i(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=o.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=s(r[0]);n!==r[0]&&(t[r[0]]=n)}r=o.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var u=i[a];e=e.replace(new RegExp(u,"g"),t[u])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"Types",(function(){return u})),r.d(n,"EffectType",(function(){return o})),r.d(n,"KeyType",(function(){return i})),r.d(n,"TransferResponseType",(function(){return s})),r.d(n,"TransactionStatus",(function(){return a})),r.d(n,"getBalanceIdentifier",(function(){return h})),r.d(n,"getTokenIdentifier",(function(){return f})),r.d(n,"getStellarSdkAsset",(function(){return p})),r.d(n,"DataProvider",(function(){return T})),r.d(n,"KeyManager",(function(){return M})),r.d(n,"KeyManagerPlugins",(function(){return ee})),r.d(n,"testEncrypter",(function(){return re})),r.d(n,"testKeyStore",(function(){return ne})),r.d(n,"DepositProvider",(function(){return ge})),r.d(n,"getKycUrl",(function(){return se})),r.d(n,"WithdrawProvider",(function(){return me})),r.d(n,"getKeyMetadata",(function(){return L}));r(217);var o,i,s,a,u=r(116);!function(e){e.account_created="account_created",e.account_credited="account_credited",e.account_debited="account_debited",e.account_home_domain_updated="account_home_domain_updated",e.account_inflation_destination_updated="account_inflation_destination_updated",e.account_removed="account_removed",e.account_thresholds_updated="account_thresholds_updated",e.signer_created="signer_created",e.signer_removed="signer_removed",e.signer_updated="signer_updated",e.trade="trade",e.trustline_created="trustline_created",e.trustline_removed="trustline_removed",e.trustline_updated="trustline_updated"}(o||(o={})),function(e){e.ledger="ledger",e.plaintextKey="plaintextKey"}(i||(i={})),function(e){e.ok="ok",e.non_interactive_customer_info_needed="non_interactive_customer_info_needed",e.interactive_customer_info_needed="interactive_customer_info_needed",e.customer_info_status="customer_info_status",e.error="error"}(s||(s={})),function(e){e.completed="completed",e.pending_external="pending_external",e.pending_anchor="pending_anchor",e.pending_stellar="pending_stellar",e.pending_trust="pending_trust",e.pending_user="pending_user",e.pending_user_transfer_start="pending_user_transfer_start",e.incomplete="incomplete",e.no_market="no_market",e.too_small="too_small",e.too_large="too_large",e.error="error"}(a||(a={}));var c=r(3),l=r.n(c);function f(e){return"native"===e.type?"native":e.code+":"+e.issuer.key}function h(e){return"native"!==e.asset_type&&e.asset_issuer?e.asset_code+":"+e.asset_issuer:"native"}function p(e){return"native"===e.type?c.Asset.native():new c.Asset(e.code,e.issuer.key)}var d=r(0),y=r(114),v=r.n(y),g=r(4),m=r.n(g),w=.5,_=2;var b=r(213),E=r.n(b);function S(e,t){return t.map((function(t){var r={publicKey:t.base_account},n={publicKey:t.counter_account},o=r.publicKey===e.publicKey,i={type:t.base_asset_type,code:t.base_asset_code||"XLM",issuer:"native"===t.base_asset_type?void 0:{key:t.base_asset_issuer}},s={type:t.counter_asset_type,code:t.counter_asset_code||"XLM",issuer:"native"===t.counter_asset_type?void 0:{key:t.counter_asset_issuer}};return{id:t.id,timestamp:Math.floor(new Date(t.ledger_close_time).getTime()/1e3),paymentToken:o?i:s,paymentAmount:o?new m.a(t.base_amount):new m.a(t.counter_amount),paymentOfferId:o?t.base_offer_id:t.counter_offer_id,incomingToken:o?s:i,incomingAmount:o?new m.a(t.counter_amount):new m.a(t.base_amount),incomingAccount:o?n:r,incomingOfferId:o?t.counter_offer_id:t.base_offer_id}}))}function A(e,t){var r=t.offers,n=t.tradeResponses,o=S(e,E()(n)).reduce((function(e,t){return t.paymentOfferId&&(e[t.paymentOfferId]=(e[t.paymentOfferId]||[]).concat([t])),e}),{});return r.map((function(e){var t=e.id,r=e.selling,n=e.seller,i=e.buying,s=e.amount,a=e.price_r,u=e.last_modified_time,c={type:r.asset_type,code:r.asset_code||"XLM",issuer:"native"===r.asset_type?void 0:{key:r.asset_issuer}},l={type:i.asset_type,code:i.asset_code||"XLM",issuer:"native"===i.asset_type?void 0:{key:i.asset_issuer}},f=(o[t]||[]).reduce((function(e,t){return e.plus(t.paymentAmount)}),new m.a(0));return{id:t,offerer:{publicKey:n},timestamp:Math.floor(new Date(u).getTime()/1e3),paymentToken:c,paymentAmount:new m.a(s),initialPaymentAmount:new m.a(s).plus(f),incomingToken:l,incomingAmount:new m.a(a.n).div(a.d).times(s),incomingTokenPrice:new m.a(1).div(a.n).times(a.d),resultingTrades:(o[t]||[]).map((function(e){return e.id}))}}))}function O(e){return"create_account"===e.type}function x(e){return"path_payment"===e.type||"path_payment_strict_send"===e.type||"path_payment_strict_receive"===e.type}function k(e,t){return t.map((function(t){var r,n=t.source_account!==e.publicKey;r=O(t)?{publicKey:t.source_account}:{publicKey:n?t.from:t.to};var o=O(t)?{type:"native",code:"XLM"}:{type:t.asset_type,code:t.asset_code||"XLM",issuer:"native"===t.asset_type?void 0:{key:t.asset_issuer}};return{id:t.id,isInitialFunding:O(t),isRecipient:n,token:o,amount:new m.a(O(t)?t.starting_balance:t.amount),timestamp:Math.floor(new Date(t.created_at).getTime()/1e3),otherAccount:r,sourceToken:x(t)?{type:t.source_asset_type,code:t.source_asset_code||"XLM",issuer:"native"===t.source_asset_type?void 0:{key:t.source_asset_issuer}}:void 0,sourceAmount:x(t)?new m.a(t.source_amount):void 0}}))}var T=function(){function e(e){var t,r=(t=e.accountOrKey)&&void 0!==t.publicKey?e.accountOrKey.publicKey:e.accountOrKey;if(!r)throw new Error("No account key provided.");if(!e.serverUrl)throw new Error("No server url provided.");try{c.Keypair.fromPublicKey(r)}catch(e){throw new Error("The provided key was not valid: "+r)}this.callbacks={},this.errorHandlers={},this.serverUrl=e.serverUrl,this.server=new c.Server(this.serverUrl),this.accountKey=r,this._watcherTimeouts={}}return e.prototype.isValidKey=function(){return c.StrKey.isValidEd25519PublicKey(this.accountKey)},e.prototype.getAccountKey=function(){return this.accountKey},e.prototype.getServer=function(){return this.server},e.prototype.isAccountFunded=function(){return d.__awaiter(this,void 0,void 0,(function(){return d.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.fetchAccountDetails()];case 1:return e.sent(),[2,!0];case 2:return[2,!e.sent().isUnfunded];case 3:return[2]}}))}))},e.prototype.fetchOpenOffers=function(e){return void 0===e&&(e={}),d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.server.offers("accounts",this.accountKey).limit(e.limit||10).order(e.order||"desc").cursor(e.cursor||"").call()];case 1:return t=r.sent(),[2,this._processOpenOffers(t)]}}))}))},e.prototype.fetchTrades=function(e){return void 0===e&&(e={}),d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.server.trades().forAccount(this.accountKey).limit(e.limit||10).order(e.order||"desc").cursor(e.cursor||"").call()];case 1:return t=r.sent(),[2,this._processTrades(t)]}}))}))},e.prototype.fetchPayments=function(e){return void 0===e&&(e={}),d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.server.payments().forAccount(this.accountKey).limit(e.limit||10).order(e.order||"desc").cursor(e.cursor||"").call()];case 1:return t=r.sent(),[2,this._processPayments(t)]}}))}))},e.prototype.fetchAccountDetails=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t,r;return d.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.server.accounts().accountId(this.accountKey).call()];case 1:return e=n.sent(),t=function(e){var t=e.balances,r=e.subentry_count;return Object.values(t).reduce((function(e,t){var n,o=h(t),i=new m.a(t.balance),s=new m.a(t.selling_liabilities),a=new m.a(t.buying_liabilities),u=i.minus(s);return"native"===o?d.__assign({},e,{native:{token:{type:"native",code:"XLM"},total:i,available:u,sellingLiabilities:s,buyingLiabilities:a,minimumBalance:new m.a(r+_).times(w)}}):d.__assign({},e,((n={})[o]={token:{type:t.asset_type,code:t.asset_code,issuer:{publicKey:t.asset_issuer}},sellingLiabilities:s,buyingLiabilities:a,total:i,limit:new m.a(t.limit),available:i.minus(s)},n))}),{})}(e),[2,{id:e.id,subentryCount:e.subentry_count,inflationDestination:e.inflation_destination,thresholds:e.thresholds,signers:e.signers,flags:e.flags,balances:t}];case 2:throw(r=n.sent()).isUnfunded=r.response&&404===r.response.status,r;case 3:return[2]}}))}))},e.prototype.watchAccountDetails=function(e){var t=this,r=e.onMessage,n=e.onError;return this.fetchAccountDetails().then((function(e){r(e),t.callbacks.accountDetails=v()((function(){t.fetchAccountDetails().then(r).catch(n)}),2e3),t.errorHandlers.accountDetails=n,t._startEffectWatcher().catch((function(e){n(e)}))})).catch((function(r){r.isUnfunded&&(t._watcherTimeouts.watchAccountDetails=setTimeout((function(){t.watchAccountDetails(e)}),2e3)),n(r)})),function(){t._watcherTimeouts.watchAccountDetails&&clearTimeout(t._watcherTimeouts.watchAccountDetails),delete t.callbacks.accountDetails,delete t.errorHandlers.accountDetails}},e.prototype.watchPayments=function(e){var t,r=this,n=e.onMessage,o=e.onError;return this.fetchPayments().then((function(e){t=e.prev,e.records.forEach(n),r.callbacks.payments=v()((function(){t().then((function(e){t=e.next,e.records.length&&e.records.forEach(n)})).catch(o)}),2e3),r.errorHandlers.payments=o,r._startEffectWatcher().catch((function(e){o(e)}))})).catch((function(t){t.isUnfunded&&(r._watcherTimeouts.watchPayments=setTimeout((function(){r.watchPayments(e)}),2e3)),o(t)})),function(){r._watcherTimeouts.watchPayments&&clearTimeout(r._watcherTimeouts.watchPayments),delete r.callbacks.accountDetails,delete r.errorHandlers.accountDetails}},e.prototype._processOpenOffers=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n=this;return d.__generator(this,(function(o){switch(o.label){case 0:return t=e.records.map((function(e){var t=e.id;return n.server.trades().forOffer(t).call()})),[4,Promise.all(t)];case 1:return r=o.sent(),[2,{next:function(){return e.next().then((function(e){return n._processOpenOffers(e)}))},prev:function(){return e.prev().then((function(e){return n._processOpenOffers(e)}))},records:A({publicKey:this.accountKey},{offers:e.records,tradeResponses:r.map((function(e){return e.records}))})}]}}))}))},e.prototype._processTrades=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t=this;return d.__generator(this,(function(r){return[2,{next:function(){return e.next().then((function(e){return t._processTrades(e)}))},prev:function(){return e.prev().then((function(e){return t._processTrades(e)}))},records:S({publicKey:this.accountKey},e.records)}]}))}))},e.prototype._processPayments=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t=this;return d.__generator(this,(function(r){return[2,{next:function(){return e.next().then((function(e){return t._processPayments(e)}))},prev:function(){return e.prev().then((function(e){return t._processPayments(e)}))},records:k({publicKey:this.accountKey},e.records)}]}))}))},e.prototype._startEffectWatcher=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t,r=this;return d.__generator(this,(function(n){switch(n.label){case 0:return this.effectStreamEnder?[2,Promise.resolve({})]:[4,this.server.effects().forAccount(this.accountKey).limit(1).order("desc").call()];case 1:return e=n.sent(),t=e.records[0].paging_token,this.effectStreamEnder=this.server.effects().forAccount(this.accountKey).cursor(t).stream({onmessage:function(){var e=Object.values(r.callbacks).filter((function(e){return!!e}));e.length?e.forEach((function(e){e()})):r.effectStreamEnder&&r.effectStreamEnder()},onerror:function(e){var t=Object.values(r.errorHandlers).filter((function(e){return!!e}));t.length&&t.forEach((function(t){t(e)}))}}),[2,Promise.resolve({})]}}))}))},e}(),P=r(214),R=r.n(P),C=r(215),I=r.n(C),N={keyType:i.ledger,signTransaction:function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s;return d.__generator(this,(function(a){switch(a.label){case 0:if(t=e.transaction,""!==(r=e.key).privateKey)throw new Error("Non-ledger key sent to ledger handler: "+JSON.stringify(r.publicKey));return[4,I.a.create(6e4)];case 1:return n=a.sent(),[4,new R.a(n).signTransaction(r.path,t.signatureBase())];case 2:return o=a.sent(),i=l.a.Keypair.fromPublicKey(r.publicKey),s=new l.a.xdr.DecoratedSignature({hint:i.signatureHint(),signature:o.signature}),t.signatures.push(s),[2,Promise.resolve(t)]}}))}))}},j={keyType:i.ledger,signTransaction:function(e){var t=e.transaction,r=e.key;if(""===r.privateKey)throw new Error("Non-plaintext key sent to plaintext handler: "+JSON.stringify(r.publicKey));var n=l.a.Keypair.fromSecret(r.privateKey);return t.sign(n),Promise.resolve(t)}},M=function(){function e(e){var t;this.encrypterMap={},this.keyHandlerMap=((t={})[i.ledger]=N,t[i.plaintextKey]=j,t),this.keyCache={},this.keyStore=e.keyStore,this.shouldCache=e.shouldCache||!1,this.defaultNetworkPassphrase=e.defaultNetworkPassphrase||l.a.Networks.PUBLIC}return e.prototype.registerKeyHandler=function(e){this.keyHandlerMap[e.keyType]=e},e.prototype.registerEncrypter=function(e){this.encrypterMap[e.name]=e},e.prototype.setDefaultNetworkPassphrase=function(e){this.defaultNetworkPassphrase=e},e.prototype.storeKey=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a;return d.__generator(this,(function(u){switch(u.label){case 0:return t=e.key,r=e.password,n=e.encrypterName,o=t.id||""+Math.random(),i=d.__assign({},t,{id:o}),[4,this.encrypterMap[n].encryptKey({key:i,password:r})];case 1:return s=u.sent(),[4,this.keyStore.storeKeys([s])];case 2:return a=u.sent(),this._writeIndexCache(i.id,i),[2,a[0]]}}))}))},e.prototype.loadAllKeys=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o;return d.__generator(this,(function(i){switch(i.label){case 0:return[4,this.keyStore.loadAllKeys()];case 1:t=i.sent(),r=[],i.label=2;case 2:return t.length?(n=t.shift(),[4,this.encrypterMap[n.encrypterName].decryptKey({encryptedKey:n,password:e})]):[3,4];case 3:return o=i.sent(),r.push(o),[3,2];case 4:return[2,r]}}))}))},e.prototype.removeKey=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.keyStore.removeKey(e)];case 1:return t=r.sent(),this._writeIndexCache(e,void 0),[2,t]}}))}))},e.prototype.signTransaction=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i;return d.__generator(this,(function(s){switch(s.label){case 0:return t=e.transaction,r=e.id,n=e.password,(o=this._readFromCache(r))?[3,3]:[4,this.keyStore.loadKey(r)];case 1:if(!(i=s.sent()))throw new Error("Couldn't sign the transaction: no key with id '"+r+"' found.");return[4,this.encrypterMap[i.encrypterName].decryptKey({encryptedKey:i,password:n})];case 2:o=s.sent(),this._writeIndexCache(r,o),s.label=3;case 3:return[4,this.keyHandlerMap[o.type].signTransaction({transaction:t,key:o})];case 4:return[2,s.sent()]}}))}))},e.prototype.fetchAuthToken=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u,l,f,h,p,y,v,g,m,w,_;return d.__generator(this,(function(d){switch(d.label){case 0:if(t=e.id,r=e.password,n=e.authServer,void 0===t)throw new Error("Required parameter `id` is missing!");if(void 0===r)throw new Error("Required parameter `password` is missing!");if(!n)throw new Error("Required parameter `authServer` is missing!");return(o=this._readFromCache(t))?[3,3]:[4,this.keyStore.loadKey(t)];case 1:if(!(i=d.sent()))throw new Error("Couldn't fetch an auth token: no key with id '"+t+"' found.");return[4,this.encrypterMap[i.encrypterName].decryptKey({encryptedKey:i,password:r})];case 2:o=d.sent(),this._writeIndexCache(t,o),d.label=3;case 3:return[4,fetch(n+"?account="+encodeURIComponent(o.publicKey))];case 4:return s=d.sent(),a=o.network||this.defaultNetworkPassphrase,[4,s.json()];case 5:if(u=d.sent(),l=u.transaction,f=u.network_passphrase,h=u.error)throw new Error(h);if(void 0!==f&&a!==f)throw new Error('\n Network mismatch: the transfer server expects "'+f+'", \n but you\'re using "'+a+'"\n ');return p=this.keyHandlerMap[o.type],y=new c.Transaction(l,a),[4,p.signTransaction({transaction:y,key:o})];case 6:return v=d.sent(),g=v.toEnvelope().toXDR().toString("base64"),[4,fetch(n,{method:"POST",body:JSON.stringify({transaction:g}),headers:{"Content-Type":"application/json"}})];case 7:return[4,d.sent().json()];case 8:if(m=d.sent(),w=m.token,_=m.message,!1===m.status&&_)throw new Error(_);return[2,w]}}))}))},e.prototype.changePassword=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i=this;return d.__generator(this,(function(s){switch(s.label){case 0:return t=e.oldPassword,r=e.newPassword,[4,this.keyStore.loadAllKeys()];case 1:return n=s.sent(),[4,Promise.all(n.map((function(e){return d.__awaiter(i,void 0,void 0,(function(){var n,o;return d.__generator(this,(function(i){switch(i.label){case 0:return[4,(n=this.encrypterMap[e.encrypterName]).decryptKey({encryptedKey:e,password:t})];case 1:return o=i.sent(),this._writeIndexCache(o.id,o),[2,n.encryptKey({key:o,password:r})]}}))}))})))];case 2:return o=s.sent(),[2,this.keyStore.updateKeys(o)]}}))}))},e.prototype._readFromCache=function(e){if(this.shouldCache)return this.keyCache[e]},e.prototype._writeIndexCache=function(e,t){this.shouldCache&&t&&(this.keyCache[e]=t)},e}(),U="IdentityEncrypter",B={name:U,encryptKey:function(e){var t=e.key,r=t.type,n=t.privateKey,o=t.publicKey,i=t.path,s=t.extra,a=d.__rest(t,["type","privateKey","publicKey","path","extra"]);return Promise.resolve(d.__assign({},a,{encryptedBlob:JSON.stringify({type:r,publicKey:o,privateKey:n,path:i,extra:s}),encrypterName:U,salt:"identity"}))},decryptKey:function(e){var t=e.encryptedKey,r=(t.encrypterName,t.salt,t.encryptedBlob),n=d.__rest(t,["encrypterName","salt","encryptedBlob"]),o=JSON.parse(r);return Promise.resolve(d.__assign({},n,o))}};function L(e){return{id:e.id}}var D=function(){function e(){this.name="MemoryKeyStore",this.keyStore={}}return e.prototype.configure=function(){return Promise.resolve()},e.prototype.storeKeys=function(e){var t=this,r=e.filter((function(e){return!!t.keyStore[e.id]}));if(r.length)return Promise.reject("Some keys were already stored in the keystore: "+r.map((function(e){return e.id})).join(", "));var n=e.map((function(e){return t.keyStore[e.id]=d.__assign({},e),L(t.keyStore[e.id])}));return Promise.resolve(n)},e.prototype.updateKeys=function(e){var t=this,r=e.filter((function(e){return!t.keyStore[e.id]}));if(r.length)return Promise.reject("Some keys couldn't be found in the keystore: "+r.map((function(e){return e.id})).join(", "));var n=e.map((function(e){var r=e.id;return t.keyStore[r]=d.__assign({},e),L(t.keyStore[r])}));return Promise.resolve(n)},e.prototype.loadKey=function(e){return Promise.resolve(this.keyStore[e])},e.prototype.removeKey=function(e){if(!this.keyStore[e])return Promise.reject(e);var t=L(this.keyStore[e]);return delete this.keyStore[e],Promise.resolve(t)},e.prototype.loadAllKeys=function(){return Promise.resolve(Object.values(this.keyStore).map((function(e){return e})))},e}(),F=r(216),q=r.n(F),K=r(18),z=r.n(K),H=r(43),V=r.n(H),X=32,Q=z.a.secretbox.nonceLength,G=(z.a.secretbox.keyLength,1),W=G,Y=z.a.secretbox.keyLength;function $(e){var t=e.password,r=e.salt,n=e.dkLen,o=void 0===n?Y:n,i=[32768,8,1],s=i[0],a=i[1],u=i[2];return new Promise((function(e,n){q()(t,r,{N:s,r:a,p:u,dkLen:o,encoding:"binary"},(function(t){t?e(t):n(new Error("scryptPass failed, derivedKey is null"))}))}))}function Z(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u,c,l;return d.__generator(this,(function(f){switch(f.label){case 0:return t=e.phrase,r=e.password,n=e.salt,o=e.nonce,i=n||V.a.encodeBase64(z.a.randomBytes(X)),s=o||z.a.randomBytes(Q),[4,$({password:r,salt:i})];case 1:if(a=f.sent(),u=V.a.decodeUTF8(t),!(c=z.a.secretbox(u,s,a)))throw new Error("Encryption failed");return(l=new Uint8Array(1+s.length+c.length)).set([W]),l.set(s,1),l.set(c,1+s.length),[2,{encryptedPhrase:V.a.encodeBase64(l),salt:i}]}}))}))}function J(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u,c;return d.__generator(this,(function(l){switch(l.label){case 0:return t=e.phrase,r=e.password,n=e.salt,[4,$({password:r,salt:n})];case 1:if(o=l.sent(),i=V.a.decodeBase64(t),(s=i[0])!==G)throw new Error("Cipher version "+s+" not supported.");if(u=i.slice(1,1+Q),c=i.slice(1+Q),!(a=z.a.secretbox.open(c,u,o)))throw new Error("That passphrase wasn’t valid.");return[2,V.a.encodeUTF8(a)]}}))}))}var ee={IdentityEncrypter:B,MemoryKeyStore:D,ScryptEncrypter:{name:"ScryptEncrypter",encryptKey:function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u,c,l,f;return d.__generator(this,(function(h){switch(h.label){case 0:return t=e.key,r=e.password,n=t.privateKey,o=t.path,i=t.extra,s=t.publicKey,a=t.type,u=d.__rest(t,["privateKey","path","extra","publicKey","type"]),[4,Z({password:r,phrase:JSON.stringify({privateKey:n,path:o,extra:i,publicKey:s,type:a})})];case 1:return c=h.sent(),l=c.encryptedPhrase,f=c.salt,[2,d.__assign({},u,{encryptedBlob:l,encrypterName:"ScryptEncrypter",salt:f})]}}))}))},decryptKey:function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u;return d.__generator(this,(function(c){switch(c.label){case 0:return t=e.encryptedKey,r=e.password,t.encrypterName,n=t.salt,o=t.encryptedBlob,i=d.__rest(t,["encrypterName","salt","encryptedBlob"]),u=(a=JSON).parse,[4,J({phrase:o,salt:n,password:r})];case 1:return s=u.apply(a,[c.sent()]),[2,d.__assign({},i,s)]}}))}))}}};function te(e){var t=function(){var e=l.a.Keypair.random(),t=e.publicKey(),r=e.secret();return{id:""+Math.random(),type:i.plaintextKey,publicKey:t,privateKey:r}}(),r=t.privateKey,n=d.__rest(t,["privateKey"]);return d.__assign({},n,{encrypterName:e,salt:"",encryptedBlob:r+"password"})}function re(e){return void 0===e&&(e=0),d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,s,a,u;return d.__generator(this,(function(c){switch(c.label){case 0:return t=l.a.Keypair.random(),e?"string"!=typeof e.name?[2,Promise.reject(new Error("[Encrypter.name] Name not defined"))]:"function"!=typeof e.encryptKey?[2,Promise.reject(new Error("[Encrypter.encryptKey] Function not found"))]:"function"!=typeof e.decryptKey?[2,Promise.reject(new Error("[Encrypter.decryptKey] Function not found"))]:(r=t.publicKey(),n=t.secret(),o={id:"test id",type:i.plaintextKey,publicKey:r,privateKey:n},s="kh2fu0b939uvdkj",[4,e.encryptKey({key:o,password:s})]):[2,Promise.reject(new Error("[Encrypter] Encrypter not defined"))];case 1:return a=c.sent(),void 0===a.encryptedBlob?[2,Promise.reject(new Error("[Encrypter.encryptKey] Encrypted key not valid"))]:[4,e.decryptKey({encryptedKey:a,password:s})];case 2:return function(e){return void 0!==e.privateKey}(u=c.sent())?u.privateKey!==o.privateKey?[2,Promise.reject(new Error("[Encrypter.decryptKey] Decrypted key doesn't match original key"))]:[2,Promise.resolve(!0)]:[2,Promise.reject(new Error("[Encrypter.decryptKey] Decrypted key not valid"))]}}))}))}function ne(e){return void 0===e&&(e=null),d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,s,a,u,c;return d.__generator(this,(function(l){switch(l.label){case 0:if(!e)return[2,Promise.reject(new Error("[KeyStore] KeyStore not defined"))];if(!e.name)return[2,Promise.reject(new Error("[KeyStore.name] Name not defined"))];for(t=0,r=["configure","storeKeys","updateKeys","loadKey","removeKey","loadAllKeys"];t<r.length;t++)if("function"!=typeof e[n=r[t]])return[2,Promise.reject(new Error("[KeyStore."+n+"] Invalid function"))];i=te((o=e).name),s=L(i),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,o.updateKeys([i])];case 2:return l.sent(),[2,Promise.reject(new Error("[KeyStore.updateKeys] Doesn't error when updating a nonexistent key"))];case 3:return l.sent(),[3,4];case 4:return[4,o.storeKeys([i])];case 5:if(a=l.sent(),s.id!==a[0].id)return[2,Promise.reject(new Error("[KeyStore.storeKeys] Key metadata doesn't match"))];l.label=6;case 6:return l.trys.push([6,8,,9]),[4,o.storeKeys([i])];case 7:return l.sent(),[2,Promise.reject(new Error("[KeyStore.updateKeys] Doesn't error when storing a stored key"))];case 8:return l.sent(),[3,9];case 9:return[4,o.loadAllKeys()];case 10:return 1!==(u=l.sent()).length||i.encryptedBlob!==u[0].encryptedBlob?[2,Promise.reject(new Error("[KeyStore.loadAllKeys] loadAllKeys doesn't match"))]:[4,o.removeKey(i.id)];case 11:return(c=l.sent())&&s.id===c.id&&c&&s.id===c.id?[4,o.loadAllKeys()]:[2,Promise.reject(new Error("[KeyStore.removeKey] Removed metadata doesn't match"))];case 12:return l.sent().length?[2,Promise.reject(new Error("[KeyStore.removeKey] Key not removed"))]:[2,Promise.resolve(!0)]}}))}))}var oe=r(19),ie=r.n(oe);function se(e){var t=new URL(e.response.url),r=t.origin,n=t.pathname,o=t.search,i=t.hash,s="",a=e,u=a.callback_url,c=a.request;if("postMessage"===u)s=(o?"&":"?")+"callback=postMessage";else if(u&&c){var l=new URL(u),f=d.__assign({},ie.a.parse(l.search));f.request=encodeURIComponent(JSON.stringify(c)),l.search=ie.a.stringify(f),s=(o?"&":"?")+"callback="+encodeURIComponent(l.toString())}return""+r+n+o+s+i}function ae(e){var t=e.response,r=e.window,n=new URL(t.url).origin;return new Promise((function(e,o){var i=function(t){t.origin===n&&(r.removeEventListener("message",i),r.close(),"success"===t.data.status?e(t.data):o(t.data))};r.addEventListener("message",i),r.location.href=se({response:t,callback_url:"postMessage"})}))}var ue=r(115),ce=r.n(ue);var le=function(e,t){var r=e.fee_fixed,n=e.fee_percent;return r&&Number(r)>0||n&&Number(n)>0?{type:"simple",fixed:r,percent:n}:{type:t?"complex":"none"}};function fe(e){var t=e[0],r=e[1];return{name:t,fields:Object.entries(r.fields||{}).map(he)}}function he(e){var t=e[0],r=e[1];return d.__assign({},r,{name:t})}function pe(e){return Object.entries(e.withdraw).reduce((function(t,r){var n=r[0],o=r[1],i=le(o,!(!e.fee||!e.fee.enabled));return t[n]={asset_code:n,fee:i,min_amount:o.min_amount,max_amount:o.max_amount,authentication_required:!!o.authentication_required,types:Object.entries(o.types||{}).map(fe)},t}),{})}function de(e){return Object.entries(e.deposit).reduce((function(t,r){var n=r[0],o=r[1],i=le(o,!(!e.fee||!e.fee.enabled));return t[n]={asset_code:n,fee:i,min_amount:o.min_amount,max_amount:o.max_amount,authentication_required:!!o.authentication_required,fields:Object.entries(o.fields||{}).map(he)},t}),{})}var ye=function(){function e(e,t,r){if(!e)throw new Error("Required parameter `transferServer` missing!");if(!t)throw new Error("Required parameter `account` missing!");if(!r)throw new Error("Required parameter `operation` missing!");this.transferServer=e,this.operation=r,this.account=t,this._watchOneTransactionRegistry={},this._watchAllTransactionsRegistry={},this._transactionsRegistry={},this._transactionsIgnoredRegistry={}}return e.prototype.fetchInfo=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,fetch(this.transferServer+"/info")];case 1:return[4,r.sent().json()];case 2:return e=r.sent(),t=function(e){if(void 0===(t=e).withdraw||void 0===t.deposit)throw new Error("The endpoint didn't return a valid info response!");var t,r=e,n=r.fee,o=r.transactions,i=r.transaction;return{withdraw:pe(e),deposit:de(e),fee:n,transactions:o,transaction:i}}(e),this.info=t,[2,t]}}))}))},e.prototype.getHeaders=function(){return new Headers(this.authToken?{Authorization:"Bearer "+this.authToken}:{})},e.prototype.setAuthToken=function(e){this.authToken=e},e.prototype.fetchTransactions=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r;return d.__generator(this,(function(n){switch(n.label){case 0:return t=this.getAuthStatus("fetchTransactions",e.asset_code),e.show_all_transactions||(r=e.kind||"deposit"===this.operation?"deposit":"withdrawal"),[4,fetch(this.transferServer+"/transactions?"+ie.a.stringify(d.__assign({},e,{account:this.account,kind:r})),{headers:t?this.getHeaders():void 0})];case 1:return[4,n.sent().json()];case 2:return[2,n.sent().transactions]}}))}))},e.prototype.fetchTransaction=function(e,t){return d.__awaiter(this,void 0,void 0,(function(){var r,n,o;return d.__generator(this,(function(i){switch(i.label){case 0:return r=e.asset_code,n=e.id,o=this.getAuthStatus(t?"watchOneTransaction":"fetchTransaction",r),[4,fetch(this.transferServer+"/transaction?"+ie.a.stringify({id:n}),{headers:o?this.getHeaders():void 0})];case 1:return[4,i.sent().json()];case 2:return[2,i.sent()]}}))}))},e.prototype.watchAllTransactions=function(e){var t,r=this,n=e.asset_code,o=e.onMessage,i=e.onError,s=e.watchlist,u=void 0===s?[]:s,c=e.timeout,l=void 0===c?5e3:c,f=e.isRetry,h=void 0!==f&&f,p=d.__rest(e,["asset_code","onMessage","onError","watchlist","timeout","isRetry"]),y=u.reduce((function(e,t){var r;return d.__assign({},e,((r={})[t]=!0,r))}),{});return h||(this._watchAllTransactionsRegistry=d.__assign({},this._watchAllTransactionsRegistry,((t={})[n]=!0,t))),this.fetchTransactions(d.__assign({asset_code:n},p||{})).then((function(e){if(r._watchAllTransactionsRegistry[n]){try{e.filter((function(e){var t=0===e.status.indexOf("pending"),o=r._transactionsRegistry[n][e.id];return h?o?!ce()(o,e):!(o||e.status!==a.completed||!h||r._transactionsIgnoredRegistry[n][e.id])||!!t:!!y[e.id]||(t||(r._transactionsIgnoredRegistry[n][e.id]=e),t)})).forEach((function(e){r._transactionsRegistry[n][e.id]=e,o(e)}))}catch(e){return void i(e)}r._allTransactionsWatcher&&clearTimeout(r._allTransactionsWatcher),r._allTransactionsWatcher=setTimeout((function(){r.watchAllTransactions({asset_code:n,onMessage:o,onError:i,timeout:l,isRetry:!0})}),l)}})).catch((function(e){i(e)})),{refresh:function(){r._watchAllTransactionsRegistry[n]&&(r._allTransactionsWatcher&&clearTimeout(r._allTransactionsWatcher),r.watchAllTransactions({asset_code:n,onMessage:o,onError:i,timeout:l,isRetry:!0}))},stop:function(){r._allTransactionsWatcher&&(r._watchAllTransactionsRegistry[n]=!1,r._transactionsRegistry[n]={},r._transactionsIgnoredRegistry[n]={},clearTimeout(r._allTransactionsWatcher))}}},e.prototype.watchOneTransaction=function(e){var t,r,n=this,o=e.asset_code,i=e.id,s=e.onMessage,u=e.onSuccess,c=e.onError,l=e.timeout,f=void 0===l?5e3:l,h=e.isRetry,p=void 0!==h&&h,y=d.__rest(e,["asset_code","id","onMessage","onSuccess","onError","timeout","isRetry"]);return p||(this._watchOneTransactionRegistry=d.__assign({},this._watchOneTransactionRegistry,((t={})[o]=d.__assign({},this._watchOneTransactionRegistry[o]||{},((r={})[i]=!0,r)),t))),this.fetchTransaction(d.__assign({asset_code:o,id:i},y||{}),!0).then((function(e){if(n._watchOneTransactionRegistry[o]&&n._watchOneTransactionRegistry[o][i]){var t=n._transactionsRegistry[o][e.id];t&&ce()(t,e)||(n._transactionsRegistry[o][e.id]=e,0===e.status.indexOf("pending")?(n._oneTransactionWatcher&&clearTimeout(n._oneTransactionWatcher),n._oneTransactionWatcher=setTimeout((function(){n.watchOneTransaction({asset_code:o,id:i,onMessage:s,onSuccess:u,onError:c,timeout:f,isRetry:!0})}),f),s(e)):e.status===a.completed?u(e):c(e))}})).catch((function(e){c(e)})),{refresh:function(){n._watchOneTransactionRegistry[o]&&n._watchOneTransactionRegistry[o][i]&&(n._oneTransactionWatcher&&clearTimeout(n._oneTransactionWatcher),n.watchOneTransaction({asset_code:o,id:i,onMessage:s,onSuccess:u,onError:c,timeout:f,isRetry:!0}))},stop:function(){n._oneTransactionWatcher&&(n._watchOneTransactionRegistry[o][i]=!1,clearTimeout(n._oneTransactionWatcher))}}},e.prototype.fetchFinalFee=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n;return d.__generator(this,(function(o){switch(o.label){case 0:if(!this.info||!this.info[this.operation])throw new Error("Run fetchSupportedAssets before running fetchFinalFee!");if(!(t=this.info[this.operation][e.asset_code]))throw new Error("Can't get fee for an unsupported asset, '"+e.asset_code);switch(r=t.fee,r.type){case"none":return[3,1];case"simple":return[3,2];case"complex":return[3,3]}return[3,6];case 1:return[2,0];case 2:return[2,((n=r).percent||0)/100*Number(e.amount)+(n.fixed||0)];case 3:return[4,fetch(this.transferServer+"/fee?"+ie.a.stringify(d.__assign({},e,r,{operation:this.operation})))];case 4:return[4,o.sent().json()];case 5:return[2,o.sent().fee];case 6:throw new Error("Invalid fee type found! Got '"+r.type+"' but expected one of 'none', 'simple', 'complex'")}}))}))},e.prototype.getAuthStatus=function(e,t){if(!t)throw new Error("Required parameter `asset_code` not provided!");if(!this.info||!this.info[this.operation])throw new Error("Run fetchSupportedAssets before running "+e+"!");var r=this.info[this.operation][t];if(!r)throw new Error("Asset "+t+" is not supported by "+this.transferServer);var n=!!r.authentication_required;if(n&&!this.authToken)throw new Error("\n Asset "+t+" requires authentication. Run KeyManager's \n fetchAuthToken function, then run setAuthToken to set it.\n ");return n},e}(),ve=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;var ge=function(e){function t(t,r){return e.call(this,t,r,"deposit")||this}return d.__extends(t,e),t.prototype.startDeposit=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,a,u,c,l,f;return d.__generator(this,(function(h){switch(h.label){case 0:return t=d.__assign({},e,{account:this.account}),r=this.getAuthStatus("deposit",e.asset_code),n=ie.a.stringify(t),[4,fetch(this.transferServer+"/deposit?"+n,{headers:r?this.getHeaders():void 0})];case 1:return[4,h.sent().json()];case 2:if((o=h.sent()).error)throw(i=new Error("string"==typeof o.error?o.error:JSON.stringify(o.error))).originalResponse=o,i;return r&&o.type===s.interactive_customer_info_needed&&o.url&&-1===o.url.indexOf("jwt")&&(a=new URL(o.url),u=a.origin,c=a.pathname,l=a.search,f=a.hash,o.url=""+u+c+l+(l?"&":"?")+"jwt="+this.authToken+f),this.request=t,this.response=o,[2,o]}}))}))},t.prototype.fetchSupportedAssets=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t=this;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.fetchInfo()];case 1:return e=r.sent().deposit,Object.keys(e).forEach((function(e){t._watchOneTransactionRegistry[e]=t._watchOneTransactionRegistry[e]||{},t._watchAllTransactionsRegistry[e]=!1,t._transactionsRegistry[e]=t._transactionsRegistry[e]||{},t._transactionsIgnoredRegistry[e]=t._transactionsIgnoredRegistry[e]||{}})),[2,e]}}))}))},t.prototype.getAssetInfo=function(e){if(!this.info||!this.info[this.operation])throw new Error("Run fetchSupportedAssets before running getAssetInfo!");if(!this.info[this.operation][e])throw new Error("Asset not supported: "+e);return this.info[this.operation][e]},t.prototype.fetchKycInBrowser=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:if(!this.response||!this.request)throw new Error("Run startDeposit before calling fetchKycInBrowser!");if(this.response.type!==s.interactive_customer_info_needed||!this.response.url)throw new Error("KYC not needed for this deposit!");return[4,ae({response:this.response,request:this.request,window:e})];case 1:if((t=r.sent()).type===s.customer_info_status)switch(t.status){case"denied":case"pending":return[2,Promise.reject(t)];case"success":return[2,Promise.resolve(t)];default:throw new Error("Invalid KYC response received: '"+t.status+"'.")}return t.status===a.completed?[2,Promise.resolve(t)]:[2,Promise.reject(t)]}}))}))},t.prototype.getKycUrl=function(e){if(!this.response||!this.request)throw new Error("Run startDeposit before calling fetchKycInBrowser!");if(this.response.type!==s.interactive_customer_info_needed||!this.response.url)throw new Error("KYC not needed for this deposit!");return se({response:this.response,request:this.request,callback_url:e})},t.prototype.validateFields=function(e,t){if(!this.info||!this.info[this.operation])throw new Error("Run fetchSupportedAssets before running fetchFinalFee!");var r=this.info[this.operation][e];if(!r)throw new Error("Can't get fee for an unsupported asset, '"+e);return(r.fields||[]).reduce((function(e,r){if(!e)return e;if(r.optional)return e;var n,o=t[r.name];if(!o)return!1;if(r.choices&&!r.choices.reduce((function(e,t){var r;return d.__assign({},e,((r={})[t]=!0,r))}),{})[o])return!1;return!("email"===r.name||"email_address"===r.name&&(n=o,!n.match(ve)))&&(("amount"!==r.name||!isNaN(parseFloat(o)))&&e)}),!0)},t}(ye),me=function(e){function t(t,r){return e.call(this,t,r,"withdraw")||this}return d.__extends(t,e),t.prototype.startWithdraw=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t,r,n,o,i,a,u,c,l,f;return d.__generator(this,(function(h){switch(h.label){case 0:return t=d.__assign({},e,{account:this.account}),r=this.getAuthStatus("withdraw",e.asset_code),n=ie.a.stringify(t),[4,fetch(this.transferServer+"/withdraw?"+n,{headers:r?this.getHeaders():void 0})];case 1:return[4,h.sent().json()];case 2:if((o=h.sent()).error)throw(i=new Error(o.error)).originalResponse=o,i;return r&&o.type===s.interactive_customer_info_needed&&o.url&&-1===o.url.indexOf("jwt")&&(a=new URL(o.url),u=a.origin,c=a.pathname,l=a.search,f=a.hash,o.url=""+u+c+l+(l?"&":"?")+"jwt="+this.authToken+f),this.request=t,this.response=o,[2,o]}}))}))},t.prototype.fetchSupportedAssets=function(){return d.__awaiter(this,void 0,void 0,(function(){var e,t=this;return d.__generator(this,(function(r){switch(r.label){case 0:return[4,this.fetchInfo()];case 1:return e=r.sent().withdraw,Object.keys(e).forEach((function(e){t._watchOneTransactionRegistry[e]=t._watchOneTransactionRegistry[e]||{},t._watchAllTransactionsRegistry[e]=!1,t._transactionsRegistry[e]=t._transactionsRegistry[e]||{},t._transactionsIgnoredRegistry[e]=t._transactionsIgnoredRegistry[e]||{}})),[2,e]}}))}))},t.prototype.getAssetInfo=function(e){if(!this.info||!this.info[this.operation])throw new Error("Run fetchSupportedAssets before running getAssetInfo!");if(!this.info[this.operation][e])throw new Error("Asset not supported: "+e);return this.info[this.operation][e]},t.prototype.fetchKycInBrowser=function(e){return d.__awaiter(this,void 0,void 0,(function(){var t;return d.__generator(this,(function(r){switch(r.label){case 0:if(!this.response||!this.request)throw new Error("Run startDeposit before calling fetchKycInBrowser!");if(this.response.type!==s.interactive_customer_info_needed||!this.response.url)throw new Error("KYC not needed for this withdrawal!");return[4,ae({response:this.response,request:this.request,window:e})];case 1:if((t=r.sent()).type===s.customer_info_status)switch(t.status){case"denied":case"pending":return[2,Promise.reject(t)];case"success":return[2,Promise.resolve(t)];default:throw new Error("Invalid KYC response received: '"+t.status+"'.")}return t.status===a.completed?[2,Promise.resolve(t)]:[2,Promise.reject(t)]}}))}))},t.prototype.getKycUrl=function(e){if(!this.response||!this.request)throw new Error("Run startDeposit before calling fetchKycInBrowser!");if(this.response.type!==s.interactive_customer_info_needed||!this.response.url)throw new Error("KYC not needed for this withdrawal!");return se({response:this.response,request:this.request,callback_url:e})},t}(ye);t.default=n},function(e,t,r){"use strict";r.r(t);var n=r(1);var o=n.Buffer.from&&n.Buffer.alloc&&n.Buffer.allocUnsafe&&n.Buffer.allocUnsafeSlow?n.Buffer.from:e=>new n.Buffer(e),i=function(e,t){const r=(e,r)=>t(e,r)>>>0;return r.signed=t,r.unsigned=r,r.model=e,r};var s=i("crc1",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=~~t,i=0;for(let t=0;t<e.length;t++){i+=e[t]}return r+=i%256,r%256}));let a=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(a=new Int32Array(a));var u=i("crc-8",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=255&a[255&(r^n)]}return r}));let c=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(c=new Int32Array(c));var l=i("dallas-1-wire",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=255&c[255&(r^n)]}return r}));let f=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(f=new Int32Array(f));var h=i("crc-16",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=~~t;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(f[255&(r^n)]^r>>8)}return r}));let p=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(p=new Int32Array(p));var d=i("ccitt",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(p[255&(r>>8^n)]^r<<8)}return r}));let y=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(y=new Int32Array(y));var v=i("crc-16-modbus",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=void 0!==t?~~t:65535;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(y[255&(r^n)]^r>>8)}return r}));var g=i("xmodem",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=void 0!==t?~~t:0;for(let t=0;t<e.length;t++){let n=r>>>8&255;n^=255&e[t],n^=n>>>4,r=r<<8&65535,r^=n,n=n<<5&65535,r^=n,n=n<<7&65535,r^=n}return r}));let m=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(m=new Int32Array(m));var w=i("kermit",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=void 0!==t?~~t:0;for(let t=0;t<e.length;t++){const n=e[t];r=65535&(m[255&(r^n)]^r>>8)}return r}));let _=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(_=new Int32Array(_));var b=i("crc-24",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=void 0!==t?~~t:11994318;for(let t=0;t<e.length;t++){const n=e[t];r=16777215&(_[255&(r>>16^n)]^r<<8)}return r}));let E=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(E=new Int32Array(E));var S=i("crc-32",(function(e,t){n.Buffer.isBuffer(e)||(e=o(e));let r=0===t?0:-1^~~t;for(let t=0;t<e.length;t++){const n=e[t];r=E[255&(r^n)]^r>>>8}return-1^r}));let A=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(A=new Int32Array(A));var O=i("jam",(function(e,t=-1){n.Buffer.isBuffer(e)||(e=o(e));let r=0===t?0:~~t;for(let t=0;t<e.length;t++){const n=e[t];r=A[255&(r^n)]^r>>>8}return r}));r.d(t,"crc1",(function(){return s})),r.d(t,"crc8",(function(){return u})),r.d(t,"crc81wire",(function(){return l})),r.d(t,"crc16",(function(){return h})),r.d(t,"crc16ccitt",(function(){return d})),r.d(t,"crc16modbus",(function(){return v})),r.d(t,"crc16xmodem",(function(){return g})),r.d(t,"crc16kermit",(function(){return w})),r.d(t,"crc24",(function(){return b})),r.d(t,"crc32",(function(){return S})),r.d(t,"crcjam",(function(){return O}));t.default={crc1:s,crc8:u,crc81wire:l,crc16:h,crc16ccitt:d,crc16modbus:v,crc16xmodem:g,crc16kermit:w,crc24:b,crc32:S,crcjam:O}}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment