xdb-digitalbits-sdk
Version:
xdb-digitalbits-sdk is a library for working with the DigitalBits Frontier server.
88 lines • 538 kB
JavaScript
var DigitalBitsSdk=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}return 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=167)}([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(183),o=r(184),i=r(95);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<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=s(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=s(e,r)).length||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?s(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=s(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=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().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 F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function v(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 P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(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:g(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):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var i,a=1,s=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;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-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 b(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 a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return V(F(t,e.length-r),e,r,n)}function _(e,t,r,n){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return _(e,t,r,n)}function k(e,t,r,n){return V(q(t),e,r,n)}function E(e,t,r,n){return V(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,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],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>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<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));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=a(),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?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(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 a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.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)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):v.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),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(n,o),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<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 m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(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 b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(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)}};function O(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 T(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 P(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+=D(e[i]);return o}function R(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 C(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 I(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 B(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 j(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 M(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 N(e,t,r,n,i){return i||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return i||M(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||C(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||C(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||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(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||C(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||C(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||C(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||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(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||C(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||C(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||C(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||C(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(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)||I(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)||I(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||I(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||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(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):j(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(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):j(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);I(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&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);I(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(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||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(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):j(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(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):j(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(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 a=u.isBuffer(e)?e:F(new u(e,n).toString()),s=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+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 q(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(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.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),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,data:3,claimableBalance:4}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V16",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),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"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V16",7),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.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),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.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("DigitalBitsValueType",{digitalBitsValueBasic:0,digitalBitsValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("DigitalBitsValueExt",{switchOn:e.lookup("DigitalBitsValueType"),switchName:"v",switches:[["digitalBitsValueBasic",e.void()],["digitalBitsValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("DigitalBitsValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("DigitalBitsValueExt")]]),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("DigitalBitsValue")],["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.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.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("LedgerCloseMetaV0")}}),e.enum("ErrorCode",{errMisc:0,errData: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,getPeers:4,peers:5,getTxSet:6,txSet:7,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBody",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageCommandType"),switchName:"type",switches:[["surveyTopology","topologyResponseBody"]],arms:{topologyResponseBody:e.lookup("TopologyResponseBody")}}),e.union("DigitalBitsMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["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"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),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("DigitalBitsMessage")],["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("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["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("MuxedAccount")],["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.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"]],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("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("OperationIdId",[["sourceAccount",e.lookup("MuxedAccount")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.union("OperationId",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","id"]],arms:{id:e.lookup("OperationIdId")}}),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("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["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("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["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.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),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,pathPaymentStrictReceiveTooFewOffers:-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,pathPaymentStrictSendTooFewOffers:-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,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),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,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),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("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"]],arms:{balanceId:e.lookup("ClaimableBalanceId")},defaultArm:e.void()}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()]],arms:{},defaultArm:e.void()}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"]],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"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"]],arms:{tr:e.lookup("OperationResultTr")},defaultArm:e.void()}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),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,keyTypeMuxedEd25519:256}),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";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),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,"__createBinding",(function(){return h})),r.d(t,"__exportStar",(function(){return p})),r.d(t,"__values",(function(){return d})),r.d(t,"__read",(function(){return v})),r.d(t,"__spread",(function(){return y})),r.d(t,"__spreadArrays",(function(){return m})),r.d(t,"__await",(function(){return g})),r.d(t,"__asyncGenerator",(function(){return b})),r.d(t,"__asyncDelegator",(function(){return w})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return k})),r.d(t,"__importDefault",(function(){return E})),r.d(t,"__classPrivateFieldGet",(function(){return x})),r.d(t,"__classPrivateFieldSet",(function(){return A}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
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 a(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 s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}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 a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}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,s])}}}function h(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function p(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.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 a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function m(){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],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(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){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(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=d(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 S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(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 E(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),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=a(r(204)),o=a(r(49)),i=r(217);function a(e){return e&&e.__esModule?e:{default:e}}var s=Math.pow(2,16),u={toXDR:function(e){var t=new i.Cursor(s);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),a=this.read(o);return a},validateXDR:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch(e){return!1}}},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(0).Buffer)},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,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.CallBuilder=void 0;var n,o=r(2),i=o.__importDefault(r(359)),a=o.__importDefault(r(34)),s=o.__importDefault(r(360)),u=r(33),c=o.__importDefault(r(87)),l=r(63).version,f=["transaction"],h=e;n=h.EventSource?h.EventSource:i.default?r(378):h.window.EventSource;var p=function(){function e(e){this.url=e.clone(),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","xdb-digitalbits-sdk"),this.url.setQuery("X-Client-Version",l);var i=function(){r=setTimeout((function(){t&&t.close(),t=a()}),e.reconnectTimeout||15e3)},a=function(){try{t=new n(o.url.toString())}catch(t){e.onerror&&e.onerror(t)}if(i(),t){var s=!1,u=function(){s||(clearTimeout(r),t.close(),a(),s=!0)},c=function(t){if("close"!==t.type){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)}else u()},l=function(t){e.onerror&&e.onerror(t)};t.addEventListener?(t.addEventListener("message",c.bind(o)),t.addEventListener("error",l.bind(o)),t.addEventListener("close",u.bind(o))):(t.onmessage=c.bind(o),t.onerror=l.bind(o))}return t};return a(),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=s.default(e.href),t=a.default(n.expand(r))):t=a.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],a=!1;if(void 0!==e[r]&&(e[r+"_attr"]=e[r],a=!0),a&&f.indexOf(r)>=0){var s=n._parseRecord(e[r]);e[r]=function(){return o.__awaiter(t,void 0,void 0,(function(){return o.__generator(this,(function(e){return[2,s]}))}))}}else e[r]=n._requestFnForLink(i)},n=this,i=0,a=Object.keys(e._links);i<a.length;i++){r(a[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())),[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(a.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(a.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){var n=r(20),o=r(3),i=r(12);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(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(190)),i=l(r(191)),a=l(r(7)),s=l(r(100)),u=l(r(9)),c=r(203);function l(e){return e&&e.__esModule?e:{default:e}}var f={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,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:"encodeMed25519PublicKey",value:function(e){return d("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return p("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return h("med25519PublicKey",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&&69!==t.length)return!1;try{var r=p(e,t);if(32!==r.length&&40!==r.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],s=n.slice(0,-2),l=s.slice(1),h=n.slice(-2);if(r!==o.default.encode(n))throw new Error("invalid encoded string");var p=f[t];if((0,a.default)(p))throw new Error(t+" is not a valid version byte name. Expected one of "+Object.keys(f).join(", "));if(i!==p)throw new Error("invalid version byte. expected "+p+", got "+i);var d=v(s);if(!(0,c.verifyChecksum)(d,h))throw new Error("invalid checksum");return e.from(l)}function d(t,r){if((0,s.default)(r)||(0,a.default)(r))throw new Error("cannot encode null data");var n=f[t];if((0,a.default)(n))throw new Error(t+" is not a valid version byte name. Expected one of "+Object.keys(f).join(", "));r=e.from(r);var i=e.from([n]),u=e.concat([i,r]),c=v(u),l=e.concat([u,c]);return o.default.encode(l)}function v(t){var r=e.alloc(2);return r.writeUInt16LE(i.default.crc16xmodem(t),0),r}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";var n=r(148),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(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:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},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:s,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(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:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(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:a}catch(e){n=a}}();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=s(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===a||!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 v(){}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||s(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=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,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,r){var n=r(94),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=n.Buffer.from&&n.Buffer.alloc&&n.Buffer.allocUnsafe&&n.Buffer.allocUnsafeSlow?n.Buffer.from:function(e){return new n.Buffer(e)};t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=function(e,r){return t(e,r)>>>0};return r.signed=t,r.unsigned=r,r.model=e,r}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAddressToMuxedAccount=function(e,t){if(t){if(i.StrKey.isValidMed25519PublicKey(e))return function(e){var t=i.StrKey.decodeMed25519PublicKey(e);return o.default.MuxedAccount.keyTypeMuxedEd25519(new o.default.MuxedAccountMed25519({id:o.default.Uint64.fromXDR(t.slice(-8)),ed25519:t.slice(0,-8)}))}(e);if(i.StrKey.isValidEd25519PublicKey(e))return u(e,"0")}return o.default.MuxedAccount.keyTypeEd25519(i.StrKey.decodeEd25519PublicKey(e))},t.encodeMuxedAccountToAddress=s,t.encodeMuxedAccount=u;var n=a(r(9)),o=a(r(1)),i=r(10);function a(e){return e&&e.__esModule?e:{default:e}}function s(t,r){if(t.switch().value===o.default.CryptoKeyType.keyTypeMuxedEd25519().value){if(r)return function(t){if(t.switch()===o.default.CryptoKeyType.keyTypeEd25519())return s(t);var r=t.med25519();return i.StrKey.encodeMed25519PublicKey(e.concat([r.ed25519(),r.id().toXDR("raw")]))}(t);t=t.med25519()}return i.StrKey.encodeEd25519PublicKey(t.ed25519())}function u(e,t){if(!i.StrKey.isValidEd25519PublicKey(e))throw new Error("address should be a DigitalBits account ID (G...)");if(!(0,n.default)(t))throw new Error("id should be a string representing a number (uint64)");return o.default.MuxedAccount.keyTypeMuxedEd25519(new o.default.MuxedAccountMed25519({id:o.default.Uint64.fromString(t),ed25519:i.StrKey.decodeEd25519PublicKey(e)}))}}).call(this,r(0).Buffer)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Keypair=void 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=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(99)),a=h(r(7)),s=h(r(9)),u=r(98),c=r(10),l=r(39),f=h(r(1));function h(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,u.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 o(t,[{key:"xdrAccountId",value:function(){return new f.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new f.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(!(0,a.default)(e)){if(!(0,s.default)(e))throw new TypeError("expected string for ID, got "+(void 0===e?"undefined":n(e)));return f.default.MuxedAccount.keyTypeMuxedEd25519(new f.default.MuxedAccountMed25519({id:f.default.Uint64.fromString(e),ed25519:this._publicKey}))}return new f.default.MuxedAccount.keyTypeEd25519(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 c.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return c.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,u.sign)(e,this._secretKey)}},{key:"verify",value:function(e,t){return(0,u.verify)(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new f.default.DecoratedSignature({hint:r,signature:t})}}],[{key:"fromSecret",value:function(e){var t=c.StrKey.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed((0,l.hash)(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=c.StrKey.decodeEd25519PublicKey(e)).length)throw new Error("Invalid DigitalBits public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=i.default.randomBytes(32);return this.fromRawEd25519Seed(e)}}]),t}()}).call(this,r(0).Buffer)},function(e,t,r){var n=r(36),o=r(175),i=r(176),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,r){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=r(0),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.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},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.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";Object.defineProperty(t,"__esModule",{value:!0});var n=r(101);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(295);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;/*! bignumber.js v4.1.0 https://github.com/MikeMcl/bignumber.js/LICENCE */!function(o){"use strict";var i,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c=" not a boolean or binary digit",l="number type has more than 15 significant digits",f="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",h=1e14,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e9;function v(e){var t=0|e;return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function g(e,t,r){return(e=k(e))>=t&&e<=r}function b(e){return"[object Array]"==Object.prototype.toString.call(e)}function w(e,t,r){for(var n,o,i=[0],a=0,s=e.length;a<s;){for(o=i.length;o--;i[o]*=t);for(i[n=0]+=f.indexOf(e.charAt(a++));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 _(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(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?s(e):u(e)}(i=function e(t){var r,n,o,i,E,x,A,O,T=0,P=K.prototype,R=new K(1),C=20,I=4,B=-7,j=21,M=-1e7,N=1e7,U=!0,L=Q,D=!1,F=1,q=0,V={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};function K(e,t){var r,o,i,s,c,h,p=this;if(!(p instanceof K))return U&&W(26,"constructor call without new",e),new K(e,t);if(null!=t&&L(t,2,64,T,"base")){if(h=e+"",10==(t|=0))return G(p=new K(e instanceof K?e:h),C+p.e+1,I);if((s="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(r="["+f.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"").test(h))return n(p,h,s,t);s?(p.s=1/e<0?(h=h.slice(1),-1):1,U&&h.replace(/^0\.0*|\./,"").length>15&&W(T,l,e),s=!1):p.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1,h=z(h,10,t,p.s)}else{if(e instanceof K)return p.s=e.s,p.e=e.e,p.c=(e=e.c)?e.slice():e,void(T=0);if((s="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(T=0)}h=e+""}else{if(!a.test(h=e+""))return n(p,h,s);p.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1}}for((o=h.indexOf("."))>-1&&(h=h.replace(".","")),(i=h.search(/e/i))>0?(o<0&&(o=i),o+=+h.slice(i+1),h=h.substring(0,i)):o<0&&(o=h.length),i=0;48===h.charCodeAt(i);i++);for(c=h.length;48===h.charCodeAt(--c););if(h=h.slice(i,c+1))if(c=h.length,s&&U&&c>15&&(e>9007199254740991||e!==u(e))&&W(T,l,p.s*e),(o=o-i-1)>N)p.c=p.e=null;else if(o<M)p.c=[p.e=0];else{if(p.e=o,p.c=[],i=(o+1)%14,o<0&&(i+=14),i<c){for(i&&p.c.push(+h.slice(0,i)),c-=14;i<c;)p.c.push(+h.slice(i,i+=14));i=14-(h=h.slice(i)).length}else i-=c;for(;i--;h+="0");p.c.push(+h)}else p.c=[p.e=0];T=0}function z(e,t,n,o){var i,a,s,u,c,l,h,p=e.indexOf("."),d=C,v=I;for(n<37&&(e=e.toLowerCase()),p>=0&&(s=q,q=0,e=e.replace(".",""),c=(h=new K(n)).pow(e.length-p),q=s,h.c=w(S(y(c.c),c.e),10,t),h.e=h.c.length),a=s=(l=w(e,n,t)).length;0==l[--s];l.pop());if(!l[0])return"0";if(p<0?--a:(c.c=l,c.e=a,c.s=o,l=(c=r(c,h,d,v,t)).c,u=c.r,a=c.e),p=l[i=a+d+1],s=t/2,u=u||i<0||null!=l[i+1],u=v<4?(null!=p||u)&&(0==v||v==(c.s<0?3:2)):p>s||p==s&&(4==v||u||6==v&&1&l[i-1]||v==(c.s<0?8:7)),i<1||!l[0])e=u?S("1",-d):"0";else{if(l.length=i,u)for(--t;++l[--i]>t;)l[i]=0,i||(++a,l=[1].concat(l));for(s=l.length;!l[--s];);for(p=0,e="";p<=s;e+=f.charAt(l[p++]));e=S(e,a)}return e}function H(e,t,r,n){var o,i,a,s,u;if(r=null!=r&&L(r,0,8,n,"rounding mode")?0|r:I,!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=y(e.c),u=19==n||24==n&&a<=B?_(u,a):S(u,a);else if(i=(e=G(new K(e),t,r)).e,s=(u=y(e.c)).length,19==n||24==n&&(t<=i||i<=B)){for(;s<t;u+="0",s++);u=_(u,i)}else if(t-=a,u=S(u,i),i+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-s)>0)for(i+1==s&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function X(e,t){var r,n,o=0;for(b(e[0])&&(e=e[0]),r=new K(e[0]);++o<e.length;){if(!(n=new K(e[o])).s){r=n;break}t.call(r,n)&&(r=n)}return r}function Q(e,t,r,n,o){return(e<t||e>r||e!=k(e))&&W(n,(o||"decimal places")+(e<t||e>r?" out of range":" not an integer"),e),!0}function Y(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+14*r-1)>N?e.c=e.e=null:r<M?e.c=[e.e=0]:(e.e=r,e.c=t),e}function W(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",T=0,n}function G(e,t,r,n){var o,i,a,c,l,f,d,v=e.c,y=p;if(v){e:{for(o=1,c=v[0];c>=10;c/=10,o++);if((i=t-o)<0)i+=14,a=t,d=(l=v[f=0])/y[o-a-1]%10|0;else if((f=s((i+1)/14))>=v.length){if(!n)break e;for(;v.length<=f;v.push(0));l=d=0,o=1,a=(i%=14)-14+1}else{for(l=c=v[f],o=1;c>=10;c/=10,o++);d=(a=(i%=14)-14+o)<0?0:l/y[o-a-1]%10|0}if(n=n||t<0||null!=v[f+1]||(a<0?l:l%y[o-a-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?a>0?l/y[o-a]: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]=y[(14-t%14)%14],e.e=-t||0):v[0]=e.e=0,e;if(0==i?(v.length=f,c=1,f--):(v.length=f+1,c=y[14-i],v[f]=a>0?u(l/y[o-a]%y[a])*c:0),n)for(;;){if(0==f){for(i=1,a=v[0];a>=10;a/=10,i++);for(a=v[0]+=c,c=1;a>=10;a/=10,c++);i!=c&&(e.e++,v[0]==h&&(v[0]=1));break}if(v[f]+=c,v[f]!=h)break;v[f--]=0,c=1}for(i=v.length;0===v[--i];v.pop());}e.e>N?e.c=e.e=null:e.e<M&&(e.c=[e.e=0])}return e}return K.another=e,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function(){var e,t,r=0,n={},o=arguments,i=o[0],a=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 a(t="DECIMAL_PLACES")&&L(e,0,d,2,t)&&(C=0|e),n[t]=C,a(t="ROUNDING_MODE")&&L(e,0,8,2,t)&&(I=0|e),n[t]=I,a(t="EXPONENTIAL_AT")&&(b(e)?L(e[0],-d,0,2,t)&&L(e[1],0,d,2,t)&&(B=0|e[0],j=0|e[1]):L(e,-d,d,2,t)&&(B=-(j=0|(e<0?-e:e)))),n[t]=[B,j],a(t="RANGE")&&(b(e)?L(e[0],-d,-1,2,t)&&L(e[1],1,d,2,t)&&(M=0|e[0],N=0|e[1]):L(e,-d,d,2,t)&&(0|e?M=-(N=0|(e<0?-e:e)):U&&W(2,t+" cannot be zero",e))),n[t]=[M,N],a(t="ERRORS")&&(e===!!e||1===e||0===e?(T=0,L=(U=!!e)?Q:g):U&&W(2,t+c,e)),n[t]=U,a(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?D=!0:U?W(2,"crypto unavailable",e?void 0:crypto):D=!1:D=!1:U&&W(2,t+c,e)),n[t]=D,a(t="MODULO_MODE")&&L(e,0,9,2,t)&&(F=0|e),n[t]=F,a(t="POW_PRECISION")&&L(e,0,d,2,t)&&(q=0|e),n[t]=q,a(t="FORMAT")&&("object"==typeof e?V=e:U&&W(2,t+" not an object",e)),n[t]=V,n},K.max=function(){return X(arguments,P.lt)},K.min=function(){return X(arguments,P.gt)},K.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,a,c=0,l=[],f=new K(R);if(e=null!=e&&L(e,0,d,14)?0|e:C,i=s(e/14),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(a=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(a%1e14),c+=2);c=i/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=7);c<i;)(a=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(a%1e14),c+=7);c=i/7}else D=!1,U&&W(14,"crypto unavailable",crypto);if(!D)for(;c<i;)(a=o())<9e15&&(l[c++]=a%1e14);for(e%=14,(i=l[--c])&&e&&(a=p[14-e],l[c]=u(i/a)*a);0===l[c];l.pop(),c--);if(c<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=14);for(c=1,a=l[0];a>=10;a/=10,c++);c<14&&(n-=14-c)}return f.e=n,f.c=l,f}),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%1e7,l=t/1e7|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%1e7)+(n=l*i+(a=e[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+l*a,e[u]=o%r;return s&&(e=[s].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,a,s){var c,l,f,p,d,y,m,g,b,w,_,S,k,E,x,A,O,T=n.s==o.s?1:-1,P=n.c,R=o.c;if(!(P&&P[0]&&R&&R[0]))return new K(n.s&&o.s&&(P?!R||P[0]!=R[0]:R)?P&&0==P[0]||!R?0*T:T/0:NaN);for(b=(g=new K(T)).c=[],T=i+(l=n.e-o.e)+1,s||(s=h,l=v(n.e/14)-v(o.e/14),T=T/14|0),f=0;R[f]==(P[f]||0);f++);if(R[f]>(P[f]||0)&&l--,T<0)b.push(1),p=!0;else{for(E=P.length,A=R.length,f=0,T+=2,(d=u(s/(R[0]+1)))>1&&(R=e(R,d,s),P=e(P,d,s),A=R.length,E=P.length),k=A,_=(w=P.slice(0,A)).length;_<A;w[_++]=0);O=R.slice(),O=[0].concat(O),x=R[0],R[1]>=s/2&&x++;do{if(d=0,(c=t(R,w,A,_))<0){if(S=w[0],A!=_&&(S=S*s+(w[1]||0)),(d=u(S/x))>1)for(d>=s&&(d=s-1),m=(y=e(R,d,s)).length,_=w.length;1==t(y,w,m,_);)d--,r(y,A<m?O:R,m,s),m=y.length,c=1;else 0==d&&(c=d=1),m=(y=R.slice()).length;if(m<_&&(y=[0].concat(y)),r(w,y,_,s),_=w.length,-1==c)for(;t(R,w,A,_)<1;)d++,r(w,A<_?O:R,_,s),_=w.length}else 0===c&&(d++,w=[0]);b[f++]=d,w[0]?w[_++]=P[k]||0:(w=[P[k]],_=1)}while((k++<E||null!=w[0])&&T--);p=null!=w[0],b[0]||b.splice(0,1)}if(s==h){for(f=1,T=b[0];T>=10;T/=10,f++);G(g,i+(g.e=f+14*l-1)+1,a,p)}else g.e=l,g.r=+p;return g}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,x=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,a=r?t:t.replace(O,"");if(A.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.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,a=a.replace(E,"$1").replace(x,"0.$1")),t!=a))return new K(a,o);U&&W(T,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,T=0},P.absoluteValue=P.abs=function(){var e=new K(this);return e.s<0&&(e.s=1),e},P.ceil=function(){return G(new K(this),this.e+1,2)},P.comparedTo=P.cmp=function(e,t){return T=1,m(this,new K(e,t))},P.decimalPlaces=P.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=14*((t=r.length-1)-v(this.e/14)),t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},P.dividedBy=P.div=function(e,t){return T=3,r(this,new K(e,t),C,I)},P.dividedToIntegerBy=P.divToInt=function(e,t){return T=4,r(this,new K(e,t),0,1)},P.equals=P.eq=function(e,t){return T=5,0===m(this,new K(e,t))},P.floor=function(){return G(new K(this),this.e+1,3)},P.greaterThan=P.gt=function(e,t){return T=6,m(this,new K(e,t))>0},P.greaterThanOrEqualTo=P.gte=function(e,t){return T=7,1===(t=m(this,new K(e,t)))||0===t},P.isFinite=function(){return!!this.c},P.isInteger=P.isInt=function(){return!!this.c&&v(this.e/14)>this.c.length-2},P.isNaN=function(){return!this.s},P.isNegative=P.isNeg=function(){return this.s<0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.lessThan=P.lt=function(e,t){return T=8,m(this,new K(e,t))<0},P.lessThanOrEqualTo=P.lte=function(e,t){return T=9,-1===(t=m(this,new K(e,t)))||0===t},P.minus=P.sub=function(e,t){var r,n,o,i,a=this,s=a.s;if(T=10,t=(e=new K(e,t)).s,!s||!t)return new K(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/14,c=e.e/14,l=a.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new K(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new K(l[0]?a:3==I?-0:0)}if(u=v(u),c=v(c),l=l.slice(),s=u-c){for((i=s<0)?(s=-s,o=l):(c=u,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=l.length)<(t=f.length))?s:t,s=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>s;){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]?Y(e,l,c):(e.s=3==I?-1:1,e.c=[e.e=0],e)},P.modulo=P.mod=function(e,t){var n,o,i=this;return T=11,e=new K(e,t),!i.c||!e.s||e.c&&!e.c[0]?new K(NaN):!e.c||i.c&&!i.c[0]?new K(i):(9==F?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,F),i.minus(n.times(e)))},P.negated=P.neg=function(){var e=new K(this);return e.s=-e.s||null,e},P.plus=P.add=function(e,t){var r,n=this,o=n.s;if(T=12,t=(e=new K(e,t)).s,!o||!t)return new K(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/14,a=e.e/14,s=n.c,u=e.c;if(!i||!a){if(!s||!u)return new K(o/0);if(!s[0]||!u[0])return u[0]?e:new K(s[0]?n:0*o)}if(i=v(i),a=v(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+u[t]+o)/h|0,s[t]=h===s[t]?0:s[t]%h;return o&&(s=[o].concat(s),++a),Y(e,s,a)},P.precision=P.sd=function(e){var t,r,n=this,o=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(U&&W(13,"argument"+c,e),e!=!!e&&(e=null)),!o)return null;if(t=14*(r=o.length-1)+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},P.round=function(e,t){var r=new K(this);return(null==e||L(e,0,d,15))&&G(r,~~e+this.e+1,null!=t&&L(t,0,8,15,"rounding mode")?0|t:I),r},P.shift=function(e){var t=this;return L(e,-9007199254740991,9007199254740991,16,"argument")?t.times("1e"+k(e)):new K(t.c&&t.c[0]&&(e<-9007199254740991||e>9007199254740991)?t.s*(e<0?0:1/0):t)},P.squareRoot=P.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=C+4,f=new K("0.5");if(1!==u||!s||!s[0])return new K(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+a))||u==1/0?(((t=y(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=v((c+1)/2)-(c<0||c%2),n=new K(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new K(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),y(i.c).slice(0,u)===(t=y(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))||(G(n,n.e+C+2,1),e=!n.times(n).eq(a));break}if(!o&&(G(i,i.e+C+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return G(n,n.e+C+1,I,e)},P.times=P.mul=function(e,t){var r,n,o,i,a,s,u,c,l,f,p,d,y,m,g=this,b=g.c,w=(T=17,e=new K(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!g.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=g.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=v(g.e/14)+v(e.e/14),e.s*=g.s,(u=b.length)<(f=w.length)&&(y=b,b=w,w=y,o=u,u=f,f=o),o=u+f,y=[];o--;y.push(0));for(m=h,1e7,o=f;--o>=0;){for(r=0,p=w[o]%1e7,d=w[o]/1e7|0,i=o+(a=u);i>o;)r=((c=p*(c=b[--a]%1e7)+(s=d*c+(l=b[a]/1e7|0)*p)%1e7*1e7+y[i]+r)/m|0)+(s/1e7|0)+d*l,y[i--]=c%m;y[i]=r}return r?++n:y.splice(0,1),Y(e,y,n)},P.toDigits=function(e,t){var r=new K(this);return e=null!=e&&L(e,1,d,18,"precision")?0|e:null,t=null!=t&&L(t,0,8,18,"rounding mode")?0|t:I,e?G(r,e,t):r},P.toExponential=function(e,t){return H(this,null!=e&&L(e,0,d,19)?1+~~e:null,t,19)},P.toFixed=function(e,t){return H(this,null!=e&&L(e,0,d,20)?~~e+this.e+1:null,t,20)},P.toFormat=function(e,t){var r=H(this,null!=e&&L(e,0,d,21)?~~e+this.e+1:null,t,21);if(this.c){var n,o=r.split("."),i=+V.groupSize,a=+V.secondaryGroupSize,s=V.groupSeparator,u=o[0],c=o[1],l=this.s<0,f=l?u.slice(1):u,h=f.length;if(a&&(n=i,i=a,a=n,h-=n),i>0&&h>0){for(n=h%i||i,u=f.substr(0,n);n<h;n+=i)u+=s+f.substr(n,i);a>0&&(u+=s+f.slice(n)),l&&(u="-"+u)}r=c?u+V.decimalSeparator+((a=+V.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+V.fractionGroupSeparator):c):u}return r},P.toFraction=function(e){var t,n,o,i,a,s,u,c,l,f=U,h=this,d=h.c,v=new K(R),m=n=new K(R),g=u=new K(R);if(null!=e&&(U=!1,s=new K(e),U=f,(f=s.isInt())&&!s.lt(R)||(U&&W(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&s.c&&G(s,s.e+1,1).gte(R)?s:null)),!d)return h.toString();for(l=y(d),i=v.e=l.length-h.e-1,v.c[0]=p[(a=i%14)<0?14+a:a],e=!e||s.cmp(v)>0?i>0?v:m:s,a=N,N=1/0,s=new K(l),u.c[0]=0;c=r(s,v,0,1),1!=(o=n.plus(c.times(g))).cmp(e);)n=g,g=o,m=u.plus(c.times(o=m)),u=o,v=s.minus(c.times(o=v)),s=o;return o=r(e.minus(n),g,0,1),u=u.plus(o.times(m)),n=n.plus(o.times(g)),u.s=m.s=h.s,t=r(m,g,i*=2,I).minus(h).abs().cmp(r(u,n,i,I).minus(h).abs())<1?[m.toString(),g.toString()]:[u.toString(),n.toString()],N=a,t},P.toNumber=function(){return+this},P.toPower=P.pow=function(e,t){var r,n,o,i=u(e<0?-e:+e),a=this;if(null!=t&&(T=23,t=new K(t)),!L(e,-9007199254740991,9007199254740991,23,"exponent")&&(!isFinite(e)||i>9007199254740991&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+a,e),new K(t?r%t:r);for(t?e>1&&a.gt(R)&&a.isInt()&&t.gt(R)&&t.isInt()?a=a.mod(t):(o=t,t=null):q&&(r=s(q/14+2)),n=new K(R);;){if(i%2){if(!(n=n.times(a)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(i=u(i/2)))break;a=a.times(a),r?a.c&&a.c.length>r&&(a.c.length=r):t&&(a=a.mod(t))}return t?n:(e<0&&(n=R.div(n)),o?n.mod(o):r?G(n,q,I):n)},P.toPrecision=function(e,t){return H(this,null!=e&&L(e,1,d,24,"precision")?0|e:null,t,24)},P.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=y(r.c),t=null!=e&&L(e,2,64,25,"base")?z(S(t,o),0|e,10,n):o<=B||o>=j?_(t,o):S(t,o),n<0&&r.c[0]&&(t="-"+t)),t},P.truncated=P.trunc=function(){return G(new K(this),this.e+1,1)},P.valueOf=P.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=y(t.c),e=r<=B||r>=j?_(e,r):S(e,r),t.s<0?"-"+e:e)},P.isBigNumber=!0,null!=t&&K.config(t),K}()).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(49),o=r(67);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(206),o=r(209);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){var n=r(92),o=r(179),i=r(24);e.exports=function(e){return i(e)?n(e,!0):o(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeMuxedAccount=t.encodeMuxedAccountToAddress=t.decodeAddressToMuxedAccount=t.StrKey=t.Networks=t.Claimant=t.MuxedAccount=t.Account=t.AuthClawbackEnabledFlag=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=t.Operation=t.Asset=t.BASE_FEE=t.TimeoutInfinite=t.TransactionBuilder=t.FeeBumpTransaction=t.Transaction=t.TransactionBase=t.Hyper=t.UnsignedHyper=t.Keypair=t.FastSigning=t.verify=t.sign=t.hash=t.xdr=void 0;var n=r(39);Object.defineProperty(t,"hash",{enumerable:!0,get:function(){return n.hash}});var o=r(98);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(19);Object.defineProperty(t,"Keypair",{enumerable:!0,get:function(){return i.Keypair}});var a=r(22);Object.defineProperty(t,"UnsignedHyper",{enumerable:!0,get:function(){return a.UnsignedHyper}}),Object.defineProperty(t,"Hyper",{enumerable:!0,get:function(){return a.Hyper}});var s=r(81);Object.defineProperty(t,"TransactionBase",{enumerable:!0,get:function(){return s.TransactionBase}});var u=r(82);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return u.Transaction}});var c=r(142);Object.defineProperty(t,"FeeBumpTransaction",{enumerable:!0,get:function(){return c.FeeBumpTransaction}});var l=r(348);Object.defineProperty(t,"TransactionBuilder",{enumerable:!0,get:function(){return l.TransactionBuilder}}),Object.defineProperty(t,"TimeoutInfinite",{enumerable:!0,get:function(){return l.TimeoutInfinite}}),Object.defineProperty(t,"BASE_FEE",{enumerable:!0,get:function(){return l.BASE_FEE}});var f=r(59);Object.defineProperty(t,"Asset",{enumerable:!0,get:function(){return f.Asset}});var h=r(129);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return h.Operation}}),Object.defineProperty(t,"AuthRequiredFlag",{enumerable:!0,get:function(){return h.AuthRequiredFlag}}),Object.defineProperty(t,"AuthRevocableFlag",{enumerable:!0,get:function(){return h.AuthRevocableFlag}}),Object.defineProperty(t,"AuthImmutableFlag",{enumerable:!0,get:function(){return h.AuthImmutableFlag}}),Object.defineProperty(t,"AuthClawbackEnabledFlag",{enumerable:!0,get:function(){return h.AuthClawbackEnabledFlag}});var p=r(86);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var d=r(349);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return d.Account}}),Object.defineProperty(t,"MuxedAccount",{enumerable:!0,get:function(){return d.MuxedAccount}});var v=r(140);Object.defineProperty(t,"Claimant",{enumerable:!0,get:function(){return v.Claimant}});var y=r(350);Object.defineProperty(t,"Networks",{enumerable:!0,get:function(){return y.Networks}});var m=r(10);Object.defineProperty(t,"StrKey",{enumerable:!0,get:function(){return m.StrKey}});var g=r(17);Object.defineProperty(t,"decodeAddressToMuxedAccount",{enumerable:!0,get:function(){return g.decodeAddressToMuxedAccount}}),Object.defineProperty(t,"encodeMuxedAccountToAddress",{enumerable:!0,get:function(){return g.encodeMuxedAccountToAddress}}),Object.defineProperty(t,"encodeMuxedAccount",{enumerable:!0,get:function(){return g.encodeMuxedAccount}});var b,w=r(1),_=(b=w)&&b.__esModule?b:{default:b};t.xdr=_.default,t.default=e.exports},function(e,t,r){var n=r(21).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,a=this._len,s=0;s<i;){for(var u=a%o,c=Math.min(i-s,o-u),l=0;l<c;l++)r[u+l]=e[s+l];s+=c,(a+=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(40)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=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>=a.MIN_VALUE&&e<=a.MAX_VALUE))}};a.MAX_VALUE=Math.pow(2,31)-1,a.MIN_VALUE=-Math.pow(2,31),(0,o.default)(a)},function(e,t,r){var n=r(102),o=r(70);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),a?o(r,c,l):n(r,c,l)}return r}},function(e,t,r){var n=r(92),o=r(107),i=r(24);e.exports=function(e){return i(e)?n(e):o(e)}},function(e,t,r){e.exports=r(283)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountRequiresMemoError=t.InvalidSep10ChallengeError=t.BadResponseError=t.BadRequestError=t.NotFoundError=t.NetworkError=void 0;var n=r(2),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 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="BadRequestError",o}return n.__extends(t,e),t}(o);t.BadRequestError=a;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="BadResponseError",o}return n.__extends(t,e),t}(o);t.BadResponseError=s;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;var c=function(e){function t(r,n,o){var i=this,a=this.constructor.prototype;return(i=e.call(this,r)||this).__proto__=a,i.constructor=t,i.name="AccountRequiresMemoError",i.accountId=n,i.operationIndex=o,i}return n.__extends(t,e),t}(Error);t.AccountRequiresMemoError=c},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(a,s){"use strict";e.exports?e.exports=s(r(145),r(146),r(147)):(o=[r(145),r(146),r(147)],void 0===(i="function"==typeof(n=s)?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 a=i.prototype,s=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 v(e){return escape(e)}function y(e){return encodeURIComponent(e).replace(/[!'()*]/g,v).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=y,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=y,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 m,g={encode:"encode",decode:"decode"},b=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(m in g)i[m+"PathSegment"]=b("pathname",g[m]),i[m+"UrnPathSegment"]=b("urnpath",g[m]);var w=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var a=(n+"").split(e),s=0,u=a.length;s<u;s++)a[s]=o(a[s]);return a.join(e)}};function _(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function S(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=w("/","decodePathSegment"),i.decodeUrnPath=w(":","decodeUrnPathSegment"),i.recodePath=w("/","encodePathSegment","decode"),i.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),i.encodeReserved=b("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 a=e.indexOf(":"),s=e.indexOf("/"),u=e.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(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,a={},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,s.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o;return a},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,a,u,c="";for(o in e)if(s.call(e,o))if(l(e[o]))for(n={},a=0,u=e[o].length;a<u;a++)void 0!==e[o][a]&&void 0===n[e[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,e[o][a],r),!0!==t&&(n[e[o][a]+""]=!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)s.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)s.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,a;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===c(t))for(a in e)t.test(a)&&(e[a]=void 0);else if("object"==typeof t)for(a in t)s.call(t,a)&&i.removeQuery(e,a,t[a]);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(s.call(e,o)&&t.test(o)&&(void 0===r||i.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var a in t)if(s.call(t,a)&&!i.hasQuery(e,a,t[a]))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 a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&t.push(a[s]),a[s]&&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,a=r.trim||i.findUri.trim,s=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 v=s.exec(p);if(!v)break;var y=v.index+v[0].length;d=Math.max(d,y)}if(!((p=d>-1?p.slice(0,d)+p.slice(d).replace(a,""):p.replace(a,"")).length<=c[0].length||r.ignore&&r.ignore.test(p))){var m=t(p,l,h=l+p.length,e);void 0!==m?(m=String(m),e=e.slice(0,l)+m+e.slice(h),n.lastIndex=l+m.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},a.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},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=S("query","?"),a.fragment=S("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.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},a.path=a.pathname,a.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 a=n?e._parts:e;for(r in a)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,a=!1,s=!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),s=(a=!(t=n||o))&&r&&r.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;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 k=a.protocol,E=a.port,x=a.hostname;a.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 k.call(this,e,t)},a.scheme=a.protocol,a.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))),E.call(this,e,t))},a.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 x.call(this,e,t)},a.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},a.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},a.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},a.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},a.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)},a.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),a=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(a,e),this.build(!t),this},a.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},a.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},a.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,a=this._parts.path.substring(0,o),s=new RegExp("^"+u(a));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(s,e),this.build(!t),this},a.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 a=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.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(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var s,c=this.suffix();if(c)s=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return s&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=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&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s<u;s++)(t[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(d(t[s])))}else(t||"string"==typeof t)&&(t=d(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=d(t):a.splice(e,1);return i&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,a;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,a=n.length;o<a;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,a=t.length;o<a;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 A=a.query;return a.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):A.call(this,e,t)},a.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)s.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},a.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},a.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},a.hasQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.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()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.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},a.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},a.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,a="";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&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[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=a+r.substring(1)),this._parts.path=r,this.build(!e),this},a.normalizePathname=a.normalizePath,a.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},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.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},a.unicode=function(){var e=i.encode,t=i.decode;i.encode=y,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.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,a=t._parts.query.split("&"),s=a.length;o<s;o++){var u=(a[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)},a.absoluteTo=function(e){var t,r,n,o=this.clone(),a=["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=a[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},a.relativeTo=function(e){var t,r,n,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=s._parts,r=e._parts,o=s.path(),a=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.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 s.build();if(null!==t.protocol||null!==t.username||null!==t.password)return s.build();if(t.hostname!==r.hostname||t.port!==r.port)return s.build();if(t.hostname=null,t.port=null,o===a)return t.path="",s.build();if(!(n=i.commonPath(o,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(n.length)||"./",s.build()},a.equals=function(e){var t,r,n,o,a,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(a in t=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),t)if(s.call(t,a)){if(l(t[a])){if(!p(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;f[a]=!0}for(a in r)if(s.call(r,a)&&!f[a])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i}))},function(e,t,r){"use strict";var n=r(62),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=Object.create(r(44));i.inherits=r(8);var a=r(160),s=r(163);i.inherits(f,a);for(var u=o(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.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){var n=r(14).Symbol;e.exports=n},function(e,t,r){(function(e){var n=r(14),o=r(177),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u}).call(this,r(38)(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.hash=function(e){var t=new n.sha256;return t.update(e,"utf8"),t.digest()};var n=r(181)},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==n(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(258),o=r(73),i=r(259),a=r(260),s=r(261),u=r(20),c=r(104),l=c(n),f=c(o),h=c(i),p=c(a),d=c(s),v=u;(n&&"[object DataView]"!=v(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=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=v},function(e,t,r){var n=r(306);e.exports=function(e){return n(e,4)}},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(0).Buffer)},function(e,t){e.exports=function(e){return e}},function(e,t,r){var n=r(174),o=r(12),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,r){var n=r(178),o=r(68),i=r(69),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},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(20),o=r(18);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},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(71),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){var n=r(52),o=r(230),i=r(231),a=r(232),s=r(233),u=r(234);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=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,r){var n=r(225),o=r(226),i=r(227),a=r(228),s=r(229);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=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(41);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(25)(Object,"create");e.exports=n},function(e,t,r){var n=r(243);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(20),o=r(12);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(56);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedInt=void 0;var n=i(r(40)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=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>=a.MIN_VALUE&&e<=a.MAX_VALUE))}};a.MAX_VALUE=Math.pow(2,32)-1,a.MIN_VALUE=0,(0,o.default)(a)},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(43)),i=l(r(138)),a=l(r(130)),s=l(r(1)),u=r(19),c=r(10);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("xdb"!==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 s.default.Asset.assetTypeNative();var e=void 0,t=void 0;this.code.length<=4?(e=s.default.AssetAlphaNum4,t="assetTypeCreditAlphanum4"):(e=s.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 s.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("XDB")}},{key:"fromOperation",value:function(e){var t=void 0,r=void 0;switch(e.switch()){case s.default.AssetType.assetTypeNative():return this.native();case s.default.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case s.default.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=c.StrKey.encodeEd25519PublicKey(t.issuer().ed25519()),new this((0,a.default)(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: "+e.switch().name)}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var n=r(2).__importDefault(r(43)),o={allowHttp:!1,timeout:0},i=n.default(o),a=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=a},function(e,t,r){e.exports=r(361)},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,a,s=arguments.length;switch(s){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(s-1),a=0;a<i.length;)i[a++]=arguments[a];return t.nextTick((function(){e.apply(null,i)}))}}}:e.exports=t}).call(this,r(13))},function(e){e.exports=JSON.parse('{"name":"xdb-digitalbits-sdk","version":"8.2.2","description":"xdb-digitalbits-sdk is a library for working with the DigitalBits Frontier server.","main":"./lib/index.js","types":"./lib/index.d.ts","files":["/types","/lib","/dist"],"scripts":{"prepare":"gulp build","test":"babel-node ./node_modules/.bin/gulp test","test:watch":"babel-node ./node_modules/.bin/gulp test:watch","build:docs":"gulp build:docs","docs":"yarn build:docs && jsdoc -c .jsdoc.json","preversion":"gulp test","version":"gulp build","postversion":"git push && git push --tags","prettier-all":"prettier --write **/*.{js,ts}"},"keywords":["digitalbits"],"repository":{"type":"git","url":"https://github.com/xdbfoundation/xdb-digitalbits-sdk.git"},"author":"XDB Foundation","license":"Apache-2.0","bugs":{"url":"https://github.com/xdbfoundation/xdb-digitalbits-sdk/issues"},"homepage":"https://github.com/xdbfoundation/xdb-digitalbits-sdk","devDependencies":{"@kollavarsham/gulp-coveralls":"0.2.8","@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","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":"^7.0.2","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":"^5.0.2","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":"^2.0.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":"^7.1.1","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"},"dependencies":{"@types/eventsource":"^1.1.2","@types/node":">= 8","@types/randombytes":"^2.0.0","@types/urijs":"^1.19.6","xdb-digitalbits-base":"5.3.0","axios":"0.21.1","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","toml":"^2.3.0","tslib":"^1.10.0","urijs":"^1.19.1","utility-types":"^3.7.0"}}')},function(e,t,r){var n=r(173)();e.exports=n},function(e,t,r){var n=r(45);e.exports=function(e){return"function"==typeof e?e:n}},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(94),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,r(38)(e))},function(e,t,r){var n=r(103);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(218),o=r(219),i=r(109),a=r(3),s=r(106);e.exports=function(e,t,r){var u=a(e)?n:o;return r&&s(e,t,r)&&(t=void 0),u(e,i(t,3))}},function(e,t,r){var n=r(220),o=r(222)(n);e.exports=o},function(e,t,r){var n=r(25)(r(14),"Map");e.exports=n},function(e,t,r){var n=r(235),o=r(242),i=r(244),a=r(245),s=r(246);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=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(257),o=r(116),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t,r){var n=r(3),o=r(56),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\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))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,r){var n=r(78);e.exports=function(e){return null==e?"":n(e)}},function(e,t,r){var n=r(36),o=r(79),i=r(3),a=r(56),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-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,r){"use strict";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}}();t.Reference=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,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),e}()},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBase=void 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}}(),a=r(1),s=(n=a)&&n.__esModule?n:{default:n},u=r(39),c=r(19);t.TransactionBase=function(){function t(e,r,n,i){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof i)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a "+(void 0===i?"undefined":o(i)));this._networkPassphrase=i,this._tx=e,this._signatures=r,this._fee=n}return i(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];n.forEach((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=c.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 s.default.DecoratedSignature({hint:o,signature:i}))}},{key:"signHashX",value:function(t){if("string"==typeof 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 s.default.DecoratedSignature({hint:o,signature:r}))}},{key:"hash",value:function(){return(0,u.hash)(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}},{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}}]),t}()}).call(this,r(0).Buffer)},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=h(r(128)),i=h(r(1)),a=r(39),s=r(10),u=r(129),c=r(86),l=r(81),f=r(17);function h(e){return e&&e.__esModule?e:{default:e}}t.Transaction=function(t){function r(t,n,a){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),"string"==typeof t){var c=e.from(t,"base64");t=i.default.TransactionEnvelope.fromXDR(c)}var l=t.switch();if(l!==i.default.EnvelopeType.envelopeTypeTxV0()&&l!==i.default.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+l.name+".");var h=t.value(),p=h.tx(),d=p.fee().toString(),v=(h.signatures()||[]).slice(),y=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)).call(this,p,v,d,n));switch(y._envelopeType=l,y._memo=p.memo(),y._sequence=p.seqNum().toString(),y._envelopeType){case i.default.EnvelopeType.envelopeTypeTxV0():y._source=s.StrKey.encodeEd25519PublicKey(y.tx.sourceAccountEd25519());break;default:y._source=(0,f.encodeMuxedAccountToAddress)(y.tx.sourceAccount(),a)}var m=p.timeBounds();m&&(y._timeBounds={minTime:m.minTime().toString(),maxTime:m.maxTime().toString()});var g=p.operations()||[];return y._operations=(0,o.default)(g,(function(e){return u.Operation.fromXDRObject(e)})),y}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),n(r,[{key:"signatureBase",value:function(){var t=this.tx;this._envelopeType===i.default.EnvelopeType.envelopeTypeTxV0()&&(t=i.default.Transaction.fromXDR(e.concat([i.default.PublicKeyType.publicKeyTypeEd25519().toXDR(),t.toXDR()])));var r=new i.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(t);return new i.default.TransactionSignaturePayload({networkId:i.default.Hash.fromXDR((0,a.hash)(this.networkPassphrase)),taggedTransaction:r}).toXDR()}},{key:"toEnvelope",value:function(){var e=this.tx.toXDR(),t=this.signatures.slice(),r=void 0;switch(this._envelopeType){case i.default.EnvelopeType.envelopeTypeTxV0():r=new i.default.TransactionEnvelope.envelopeTypeTxV0(new i.default.TransactionV0Envelope({tx:i.default.TransactionV0.fromXDR(e),signatures:t}));break;case i.default.EnvelopeType.envelopeTypeTx():r=new i.default.TransactionEnvelope.envelopeTypeTx(new i.default.TransactionV1Envelope({tx:i.default.Transaction.fromXDR(e),signatures:t}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+this._envelopeType.name+".")}return r}},{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return c.Memo.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}}]),r}(l.TransactionBase)}).call(this,r(0).Buffer)},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(108)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(112);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(7)),i=l(r(9)),a=l(r(43)),s=r(22),u=l(r(23)),c=l(r(1));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=t.MemoNone="none",p=t.MemoID="id",d=t.MemoText="text",v=t.MemoHash="hash",y=t.MemoReturn="return",m=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(f(this,t),this._type=r,this._value=n,this._type){case h:break;case p:t._validateIdValue(n);break;case d:t._validateTextValue(n);break;case v: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 h:return c.default.Memo.memoNone();case p:return c.default.Memo.memoId(s.UnsignedHyper.fromString(this._value));case d:return c.default.Memo.memoText(this._value);case v: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,a.default)(this._type)},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case h:return null;case p:case d:return(0,a.default)(this._value);case v: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(h)}},{key:"text",value:function(e){return new t(d,e)}},{key:"id",value:function(e){return new t(p,e)}},{key:"hash",value:function(e){return new t(v,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=m}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentServerTime=t.SERVER_TIME_MAP=void 0;var n=r(2),o=n.__importDefault(r(61)),i=n.__importDefault(r(34)),a=r(63).version;t.SERVER_TIME_MAP={};var s=o.default.create({headers:{"X-Client-Name":"xdb-digitalbits-sdk","X-Client-Version":a}});function u(e){return Math.floor(e/1e3)}s.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=s,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){"use strict";var n=r(383),o=r(384);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=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[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})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(385);function b(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("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?g.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,b=b.substr(_.length)}if(r||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===b.substr(0,2);!k||_&&y[_]||(b=b.substr(2),this.slashes=!0)}if(!y[_]&&(k||_&&!m[_])){for(var E,x,A=-1,O=0;O<h.length;O++){-1!==(T=b.indexOf(h[O]))&&(-1===A||T<A)&&(A=T)}-1!==(x=-1===A?b.lastIndexOf("@"):b.lastIndexOf("@",A))&&(E=b.slice(0,x),b=b.slice(x+1),this.auth=decodeURIComponent(E)),A=-1;for(O=0;O<f.length;O++){var T;-1!==(T=b.indexOf(f[O]))&&(-1===A||T<A)&&(A=T)}-1===A&&(A=b.length),this.host=b.slice(0,A),b=b.slice(A),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=(O=0,R.length);O<C;O++){var I=R[O];if(I&&!I.match(p)){for(var B="",j=0,M=I.length;j<M;j++)I.charCodeAt(j)>127?B+="x":B+=I[j];if(!B.match(p)){var N=R.slice(0,O),U=R.slice(O+1),L=I.match(d);L&&(N.push(L[1]),U.unshift(L[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=N.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),"/"!==b[0]&&(b="/"+b))}if(!v[S])for(O=0,C=l.length;O<C;O++){var q=l[O];if(-1!==b.indexOf(q)){var V=encodeURIComponent(q);V===q&&(V=escape(q)),b=b.split(q).join(V)}}var K=b.indexOf("#");-1!==K&&(this.hash=b.substr(K),b=b.slice(0,K));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=g.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var H=this.search||"";this.path=D+H}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,a="";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&&(a=g.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(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),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}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 m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[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||y[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 v=r.pathname||"",g=r.search||"";r.path=v+g}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||r.host&&e.pathname,S=_,k=r.pathname&&r.pathname.split("/")||[],E=(d=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.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),_=_&&(""===d[0]||""===k[0])),w)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,k=d;else if(d.length)k||(k=[]),k.pop(),k=k.concat(d),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(E)r.hostname=r.host=k.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(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=k.slice(-1)[0],A=(r.host||e.host||k.length>1)&&("."===x||".."===x)||""===x,O=0,T=k.length;T>=0;T--)"."===(x=k[T])?k.splice(T,1):".."===x?(k.splice(T,1),O++):O&&(k.splice(T,1),O--);if(!_&&!S)for(;O--;O)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),A&&"/"!==k.join("/").substr(-1)&&k.push("");var P,R=""===k[0]||k[0]&&"/"===k[0].charAt(0);E&&(r.hostname=r.host=R?"":k.length?k.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(_=_||r.host&&k.length)&&!R&&k.unshift(""),k.length?r.pathname=k.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=s.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){"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 a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function o(){void 0!==i&&e.removeListener("error",i),r([].slice.call(arguments))}var i;"error"!==t&&(i=function(r){e.removeListener(t,o),n(r)},e.once("error",i)),e.once(t,o)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var o,i,a,s;if(c(r),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),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=h.bind(n);return o.listener=r,n.wrapFn=o,o}function d(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 v(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(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.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},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},s.prototype.getMaxListeners=function(){return l(this)},s.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 a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}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},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,o,i,a;if(c(t),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){a=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,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.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},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(0),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.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},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.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";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountResponse=void 0;var n=r(2).__importDefault(r(172)),o=r(27),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.prototype.createSubaccount=function(e){return this._baseAccount.createSubaccount(e)},e}();t.AccountResponse=i},function(e,t,r){var n=r(93),o=r(46),i=r(3),a=r(37),s=r(66),u=r(47),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),f=!r&&!l&&a(e),h=!r&&!l&&!f&&u(e),p=r||l||f||h,d=p?n(e.length,String):[],v=d.length;for(var y in e)!t&&!c.call(e,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||d.push(y);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){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n=r(8),o=r(28),i=r(21).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,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,s=0|this._d,u=0|this._e,d=0|this._f,v=0|this._g,y=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+p(r[m-15])+r[m-16];for(var g=0;g<64;++g){var b=y+h(u)+c(u,d,v)+a[g]+r[g]|0,w=f(n)+l(n,o,i)|0;y=v,v=d,d=u,u=s+b|0,s=i,i=o,o=n,n=b+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=y+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(8),o=r(28),i=r(21).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,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 v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(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,s=0|this._eh,u=0|this._fh,g=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,E=0|this._el,x=0|this._fl,A=0|this._gl,O=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),B=v(P=t[T-4],R=t[T-4+1]),j=y(R,P),M=t[T-14],N=t[T-14+1],U=t[T-32],L=t[T-32+1],D=I+N|0,F=C+M+m(D,I)|0;F=(F=F+B+m(D=D+j|0,j)|0)+U+m(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 V=l(r,n,o),K=l(w,_,S),z=f(r,w),H=f(w,r),X=h(s,E),Q=h(E,s),Y=a[q],W=a[q+1],G=c(s,u,g),$=c(E,x,A),Z=O+Q|0,J=b+X+m(Z,O)|0;J=(J=(J=J+G+m(Z=Z+$|0,$)|0)+Y+m(Z=Z+W|0,W)|0)+F+m(Z=Z+D|0,D)|0;var ee=H+K|0,te=z+V+m(ee,H)|0;b=g,O=A,g=u,A=x,u=s,x=E,s=i+J+m(E=k+Z|0,k)|0,i=o,k=S,o=n,S=_,n=r,_=w,r=J+te+m(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+x|0,this._gl=this._gl+A|0,this._hl=this._hl+O|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+o+m(this._cl,S)|0,this._dh=this._dh+i+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,E)|0,this._fh=this._fh+u+m(this._fl,x)|0,this._gh=this._gh+g+m(this._gl,A)|0,this._hh=this._hh+b+m(this._hl,O)|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(188)}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(99);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(0).Buffer)},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 a=t(),s=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 v(e,t,r,n,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^r[n+i];return(1&a-1>>>8)-1}function y(e,t,r,n){return v(e,t,r,n,16)}function m(e,t,r,n){return v(e,t,r,n,32)}function g(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,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=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,v=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=i,S=a,k=s,E=u,x=c,A=l,O=f,T=h,P=p,R=d,C=v,I=y,B=m,j=g,M=b,N=w,U=0;U<20;U+=2)_^=(o=(B^=(o=(P^=(o=(x^=(o=_+B|0)<<7|o>>>25)+_|0)<<9|o>>>23)+x|0)<<13|o>>>19)+P|0)<<18|o>>>14,A^=(o=(S^=(o=(j^=(o=(R^=(o=A+S|0)<<7|o>>>25)+A|0)<<9|o>>>23)+R|0)<<13|o>>>19)+j|0)<<18|o>>>14,C^=(o=(O^=(o=(k^=(o=(M^=(o=C+O|0)<<7|o>>>25)+C|0)<<9|o>>>23)+M|0)<<13|o>>>19)+k|0)<<18|o>>>14,N^=(o=(I^=(o=(T^=(o=(E^=(o=N+I|0)<<7|o>>>25)+N|0)<<9|o>>>23)+E|0)<<13|o>>>19)+T|0)<<18|o>>>14,_^=(o=(E^=(o=(k^=(o=(S^=(o=_+E|0)<<7|o>>>25)+_|0)<<9|o>>>23)+S|0)<<13|o>>>19)+k|0)<<18|o>>>14,A^=(o=(x^=(o=(T^=(o=(O^=(o=A+x|0)<<7|o>>>25)+A|0)<<9|o>>>23)+O|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,N^=(o=(M^=(o=(j^=(o=(B^=(o=N+M|0)<<7|o>>>25)+N|0)<<9|o>>>23)+B|0)<<13|o>>>19)+j|0)<<18|o>>>14;_=_+i|0,S=S+a|0,k=k+s|0,E=E+u|0,x=x+c|0,A=A+l|0,O=O+f|0,T=T+h|0,P=P+p|0,R=R+d|0,C=C+v|0,I=I+y|0,B=B+m|0,j=j+g|0,M=M+b|0,N=N+w|0,e[0]=_>>>0&255,e[1]=_>>>8&255,e[2]=_>>>16&255,e[3]=_>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=x>>>0&255,e[17]=x>>>8&255,e[18]=x>>>16&255,e[19]=x>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=O>>>0&255,e[25]=O>>>8&255,e[26]=O>>>16&255,e[27]=O>>>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]=B>>>0&255,e[49]=B>>>8&255,e[50]=B>>>16&255,e[51]=B>>>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]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}(e,t,r,n)}function b(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,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=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,v=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)i^=(o=(m^=(o=(p^=(o=(c^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+p|0)<<18|o>>>14,l^=(o=(a^=(o=(g^=(o=(d^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+g|0)<<18|o>>>14,v^=(o=(f^=(o=(s^=(o=(b^=(o=v+f|0)<<7|o>>>25)+v|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(y^=(o=(h^=(o=(u^=(o=w+y|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(u^=(o=(s^=(o=(a^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|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,v^=(o=(d^=(o=(p^=(o=(y^=(o=v+d|0)<<7|o>>>25)+v|0)<<9|o>>>23)+y|0)<<13|o>>>19)+p|0)<<18|o>>>14,w^=(o=(b^=(o=(g^=(o=(m^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+g|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]=v>>>0&255,e[9]=v>>>8&255,e[10]=v>>>16&255,e[11]=v>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>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 w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(e,t,r,n,o,i,a){var s,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(g(l,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;o-=64,t+=64,n+=64}if(o>0)for(g(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function S(e,t,r,n,o){var i,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(g(u,s,o,w),a=0;a<64;a++)e[t+a]=u[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(g(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function k(e,t,r,n,o){var i=new Uint8Array(32);b(i,n,o,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return S(e,t,r,a,i)}function E(e,t,r,n,o,i,a){var s=new Uint8Array(32);b(s,i,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return _(e,t,r,n,o,u,s)}var x=function(e){var t,r,n,o,i,a,s,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,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>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 A(e,t,r,n,o,i){var a=new x(i);return a.update(r,n,o),a.finish(e,t),0}function O(e,t,r,n,o,i){var a=new Uint8Array(16);return A(a,0,r,n,o,i),y(e,t,a,0)}function T(e,t,r,n,o){var i;if(r<32)return-1;for(E(e,0,t,0,r,n,o),A(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,a=new Uint8Array(32);if(r<32)return-1;if(k(a,0,32,n,o),0!==O(t,16,t,32,r-32,a))return-1;for(E(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 B(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(C(s),C(s),C(s),o=0;o<2;o++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,I(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function j(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,e),B(n,t),m(r,0,n,0)}function M(e){var t=new Uint8Array(32);return B(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function U(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,a=0,s=0,u=0,c=0,l=0,f=0,h=0,p=0,d=0,v=0,y=0,m=0,g=0,b=0,w=0,_=0,S=0,k=0,E=0,x=0,A=0,O=0,T=0,P=0,R=0,C=0,I=0,B=0,j=0,M=0,N=r[0],U=r[1],L=r[2],D=r[3],F=r[4],q=r[5],V=r[6],K=r[7],z=r[8],H=r[9],X=r[10],Q=r[11],Y=r[12],W=r[13],G=r[14],$=r[15];i+=(n=t[0])*N,a+=n*U,s+=n*L,u+=n*D,c+=n*F,l+=n*q,f+=n*V,h+=n*K,p+=n*z,d+=n*H,v+=n*X,y+=n*Q,m+=n*Y,g+=n*W,b+=n*G,w+=n*$,a+=(n=t[1])*N,s+=n*U,u+=n*L,c+=n*D,l+=n*F,f+=n*q,h+=n*V,p+=n*K,d+=n*z,v+=n*H,y+=n*X,m+=n*Q,g+=n*Y,b+=n*W,w+=n*G,_+=n*$,s+=(n=t[2])*N,u+=n*U,c+=n*L,l+=n*D,f+=n*F,h+=n*q,p+=n*V,d+=n*K,v+=n*z,y+=n*H,m+=n*X,g+=n*Q,b+=n*Y,w+=n*W,_+=n*G,S+=n*$,u+=(n=t[3])*N,c+=n*U,l+=n*L,f+=n*D,h+=n*F,p+=n*q,d+=n*V,v+=n*K,y+=n*z,m+=n*H,g+=n*X,b+=n*Q,w+=n*Y,_+=n*W,S+=n*G,k+=n*$,c+=(n=t[4])*N,l+=n*U,f+=n*L,h+=n*D,p+=n*F,d+=n*q,v+=n*V,y+=n*K,m+=n*z,g+=n*H,b+=n*X,w+=n*Q,_+=n*Y,S+=n*W,k+=n*G,E+=n*$,l+=(n=t[5])*N,f+=n*U,h+=n*L,p+=n*D,d+=n*F,v+=n*q,y+=n*V,m+=n*K,g+=n*z,b+=n*H,w+=n*X,_+=n*Q,S+=n*Y,k+=n*W,E+=n*G,x+=n*$,f+=(n=t[6])*N,h+=n*U,p+=n*L,d+=n*D,v+=n*F,y+=n*q,m+=n*V,g+=n*K,b+=n*z,w+=n*H,_+=n*X,S+=n*Q,k+=n*Y,E+=n*W,x+=n*G,A+=n*$,h+=(n=t[7])*N,p+=n*U,d+=n*L,v+=n*D,y+=n*F,m+=n*q,g+=n*V,b+=n*K,w+=n*z,_+=n*H,S+=n*X,k+=n*Q,E+=n*Y,x+=n*W,A+=n*G,O+=n*$,p+=(n=t[8])*N,d+=n*U,v+=n*L,y+=n*D,m+=n*F,g+=n*q,b+=n*V,w+=n*K,_+=n*z,S+=n*H,k+=n*X,E+=n*Q,x+=n*Y,A+=n*W,O+=n*G,T+=n*$,d+=(n=t[9])*N,v+=n*U,y+=n*L,m+=n*D,g+=n*F,b+=n*q,w+=n*V,_+=n*K,S+=n*z,k+=n*H,E+=n*X,x+=n*Q,A+=n*Y,O+=n*W,T+=n*G,P+=n*$,v+=(n=t[10])*N,y+=n*U,m+=n*L,g+=n*D,b+=n*F,w+=n*q,_+=n*V,S+=n*K,k+=n*z,E+=n*H,x+=n*X,A+=n*Q,O+=n*Y,T+=n*W,P+=n*G,R+=n*$,y+=(n=t[11])*N,m+=n*U,g+=n*L,b+=n*D,w+=n*F,_+=n*q,S+=n*V,k+=n*K,E+=n*z,x+=n*H,A+=n*X,O+=n*Q,T+=n*Y,P+=n*W,R+=n*G,C+=n*$,m+=(n=t[12])*N,g+=n*U,b+=n*L,w+=n*D,_+=n*F,S+=n*q,k+=n*V,E+=n*K,x+=n*z,A+=n*H,O+=n*X,T+=n*Q,P+=n*Y,R+=n*W,C+=n*G,I+=n*$,g+=(n=t[13])*N,b+=n*U,w+=n*L,_+=n*D,S+=n*F,k+=n*q,E+=n*V,x+=n*K,A+=n*z,O+=n*H,T+=n*X,P+=n*Q,R+=n*Y,C+=n*W,I+=n*G,B+=n*$,b+=(n=t[14])*N,w+=n*U,_+=n*L,S+=n*D,k+=n*F,E+=n*q,x+=n*V,A+=n*K,O+=n*z,T+=n*H,P+=n*X,R+=n*Q,C+=n*Y,I+=n*W,B+=n*G,j+=n*$,w+=(n=t[15])*N,a+=38*(S+=n*L),s+=38*(k+=n*D),u+=38*(E+=n*F),c+=38*(x+=n*q),l+=38*(A+=n*V),f+=38*(O+=n*K),h+=38*(T+=n*z),p+=38*(P+=n*H),d+=38*(R+=n*X),v+=38*(C+=n*Q),y+=38*(I+=n*Y),m+=38*(B+=n*W),g+=38*(j+=n*G),b+=38*(M+=n*$),i=(n=(i+=38*(_+=n*U))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+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)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+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)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+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)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=v,e[11]=y,e[12]=m,e[13]=g,e[14]=b,e[15]=w}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 V(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]}function K(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),h=t(),p=t(),d=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,N(s,n),i=0;i<16;i++)l[i]=s[i],h[i]=c[i]=f[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)I(c,l,o=a[i>>>3]>>>(7&i)&1),I(f,h,o),U(p,c,f),L(c,c,f),U(f,l,h),L(l,l,h),F(h,p),F(d,c),D(c,f,c),D(f,l,p),U(p,c,f),L(c,c,f),F(l,c),L(f,h,d),D(c,f,u),U(c,c,h),D(f,f,c),D(c,h,d),D(h,l,s),F(l,p),I(c,l,o),I(f,h,o);for(i=0;i<16;i++)s[i+16]=c[i],s[i+32]=f[i],s[i+48]=l[i],s[i+64]=h[i];var v=s.subarray(32),y=s.subarray(16);return q(v,v),D(y,y,v),B(e,y),0}function z(e,t){return K(e,t,i)}function H(e,t){return n(t,32),z(e,t)}function X(e,t,r){var n=new Uint8Array(32);return K(n,r,t),b(e,o,n,w)}x.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,h,p,d,v,y,m,g,b,w,_,S=this.fin?0:2048,k=this.h[0],E=this.h[1],x=this.h[2],A=this.h[3],O=this.h[4],T=this.h[5],P=this.h[6],R=this.h[7],C=this.h[8],I=this.h[9],B=this.r[0],j=this.r[1],M=this.r[2],N=this.r[3],U=this.r[4],L=this.r[5],D=this.r[6],F=this.r[7],q=this.r[8],V=this.r[9];r>=16;)h=f=0,h+=(k+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*B,h+=(E+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),h+=(x+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*q),h+=(A+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(O+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*D))>>>13,h&=8191,h+=(T+=s>>>1&8191)*(5*L),h+=(P+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),h+=(R+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),h+=(C+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*M),p=f+=(h+=(I+=l>>>5|S)*(5*j))>>>13,p+=k*j,p+=E*B,p+=x*(5*V),p+=A*(5*q),f=(p+=O*(5*F))>>>13,p&=8191,p+=T*(5*D),p+=P*(5*L),p+=R*(5*U),p+=C*(5*N),f+=(p+=I*(5*M))>>>13,p&=8191,d=f,d+=k*M,d+=E*j,d+=x*B,d+=A*(5*V),f=(d+=O*(5*q))>>>13,d&=8191,d+=T*(5*F),d+=P*(5*D),d+=R*(5*L),d+=C*(5*U),v=f+=(d+=I*(5*N))>>>13,v+=k*N,v+=E*M,v+=x*j,v+=A*B,f=(v+=O*(5*V))>>>13,v&=8191,v+=T*(5*q),v+=P*(5*F),v+=R*(5*D),v+=C*(5*L),y=f+=(v+=I*(5*U))>>>13,y+=k*U,y+=E*N,y+=x*M,y+=A*j,f=(y+=O*B)>>>13,y&=8191,y+=T*(5*V),y+=P*(5*q),y+=R*(5*F),y+=C*(5*D),m=f+=(y+=I*(5*L))>>>13,m+=k*L,m+=E*U,m+=x*N,m+=A*M,f=(m+=O*j)>>>13,m&=8191,m+=T*B,m+=P*(5*V),m+=R*(5*q),m+=C*(5*F),g=f+=(m+=I*(5*D))>>>13,g+=k*D,g+=E*L,g+=x*U,g+=A*N,f=(g+=O*M)>>>13,g&=8191,g+=T*j,g+=P*B,g+=R*(5*V),g+=C*(5*q),b=f+=(g+=I*(5*F))>>>13,b+=k*F,b+=E*D,b+=x*L,b+=A*U,f=(b+=O*N)>>>13,b&=8191,b+=T*M,b+=P*j,b+=R*B,b+=C*(5*V),w=f+=(b+=I*(5*q))>>>13,w+=k*q,w+=E*F,w+=x*D,w+=A*L,f=(w+=O*U)>>>13,w&=8191,w+=T*N,w+=P*M,w+=R*j,w+=C*B,_=f+=(w+=I*(5*V))>>>13,_+=k*V,_+=E*q,_+=x*F,_+=A*D,f=(_+=O*L)>>>13,_&=8191,_+=T*U,_+=P*N,_+=R*M,_+=C*j,k=h=8191&(f=(f=((f+=(_+=I*B)>>>13)<<2)+f|0)+(h&=8191)|0),E=p+=f>>>=13,x=d&=8191,A=v&=8191,O=y&=8191,T=m&=8191,P=g&=8191,R=b&=8191,C=w&=8191,I=_&=8191,t+=16,r-=16;this.h[0]=k,this.h[1]=E,this.h[2]=x,this.h[3]=A,this.h[4]=O,this.h[5]=T,this.h[6]=P,this.h[7]=R,this.h[8]=C,this.h[9]=I},x.prototype.finish=function(e,t){var r,n,o,i,a=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,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+r,r=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,n=(1^r)-1,i=0;i<10;i++)a[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|a[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},x.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 Q=T,Y=P;var W=[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 G(e,t,r,n){for(var o,i,a,s,u,c,l,f,h,p,d,v,y,m,g,b,w,_,S,k,E,x,A,O,T,P,R=new Int32Array(16),C=new Int32Array(16),I=e[0],B=e[1],j=e[2],M=e[3],N=e[4],U=e[5],L=e[6],D=e[7],F=t[0],q=t[1],V=t[2],K=t[3],z=t[4],H=t[5],X=t[6],Q=t[7],Y=0;n>=128;){for(S=0;S<16;S++)k=8*S+Y,R[S]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],C[S]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(S=0;S<80;S++)if(o=I,i=B,a=j,s=M,u=N,c=U,l=L,D,h=F,p=q,d=V,v=K,y=z,m=H,g=X,Q,A=65535&(x=Q),O=x>>>16,T=65535&(E=D),P=E>>>16,A+=65535&(x=(z>>>14|N<<18)^(z>>>18|N<<14)^(N>>>9|z<<23)),O+=x>>>16,T+=65535&(E=(N>>>14|z<<18)^(N>>>18|z<<14)^(z>>>9|N<<23)),P+=E>>>16,A+=65535&(x=z&H^~z&X),O+=x>>>16,T+=65535&(E=N&U^~N&L),P+=E>>>16,A+=65535&(x=W[2*S+1]),O+=x>>>16,T+=65535&(E=W[2*S]),P+=E>>>16,E=R[S%16],O+=(x=C[S%16])>>>16,T+=65535&E,P+=E>>>16,T+=(O+=(A+=65535&x)>>>16)>>>16,A=65535&(x=_=65535&A|O<<16),O=x>>>16,T=65535&(E=w=65535&T|(P+=T>>>16)<<16),P=E>>>16,A+=65535&(x=(F>>>28|I<<4)^(I>>>2|F<<30)^(I>>>7|F<<25)),O+=x>>>16,T+=65535&(E=(I>>>28|F<<4)^(F>>>2|I<<30)^(F>>>7|I<<25)),P+=E>>>16,O+=(x=F&q^F&V^q&V)>>>16,T+=65535&(E=I&B^I&j^B&j),P+=E>>>16,f=65535&(T+=(O+=(A+=65535&x)>>>16)>>>16)|(P+=T>>>16)<<16,b=65535&A|O<<16,A=65535&(x=v),O=x>>>16,T=65535&(E=s),P=E>>>16,O+=(x=_)>>>16,T+=65535&(E=w),P+=E>>>16,B=o,j=i,M=a,N=s=65535&(T+=(O+=(A+=65535&x)>>>16)>>>16)|(P+=T>>>16)<<16,U=u,L=c,D=l,I=f,q=h,V=p,K=d,z=v=65535&A|O<<16,H=y,X=m,Q=g,F=b,S%16==15)for(k=0;k<16;k++)E=R[k],A=65535&(x=C[k]),O=x>>>16,T=65535&E,P=E>>>16,E=R[(k+9)%16],A+=65535&(x=C[(k+9)%16]),O+=x>>>16,T+=65535&E,P+=E>>>16,w=R[(k+1)%16],A+=65535&(x=((_=C[(k+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),O+=x>>>16,T+=65535&(E=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),P+=E>>>16,w=R[(k+14)%16],O+=(x=((_=C[(k+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,T+=65535&(E=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,R[k]=65535&T|P<<16,C[k]=65535&A|O<<16;A=65535&(x=F),O=x>>>16,T=65535&(E=I),P=E>>>16,E=e[0],O+=(x=t[0])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[0]=I=65535&T|P<<16,t[0]=F=65535&A|O<<16,A=65535&(x=q),O=x>>>16,T=65535&(E=B),P=E>>>16,E=e[1],O+=(x=t[1])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[1]=B=65535&T|P<<16,t[1]=q=65535&A|O<<16,A=65535&(x=V),O=x>>>16,T=65535&(E=j),P=E>>>16,E=e[2],O+=(x=t[2])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[2]=j=65535&T|P<<16,t[2]=V=65535&A|O<<16,A=65535&(x=K),O=x>>>16,T=65535&(E=M),P=E>>>16,E=e[3],O+=(x=t[3])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[3]=M=65535&T|P<<16,t[3]=K=65535&A|O<<16,A=65535&(x=z),O=x>>>16,T=65535&(E=N),P=E>>>16,E=e[4],O+=(x=t[4])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[4]=N=65535&T|P<<16,t[4]=z=65535&A|O<<16,A=65535&(x=H),O=x>>>16,T=65535&(E=U),P=E>>>16,E=e[5],O+=(x=t[5])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[5]=U=65535&T|P<<16,t[5]=H=65535&A|O<<16,A=65535&(x=X),O=x>>>16,T=65535&(E=L),P=E>>>16,E=e[6],O+=(x=t[6])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[6]=L=65535&T|P<<16,t[6]=X=65535&A|O<<16,A=65535&(x=Q),O=x>>>16,T=65535&(E=D),P=E>>>16,E=e[7],O+=(x=t[7])>>>16,T+=65535&E,P+=E>>>16,P+=(T+=(O+=(A+=65535&x)>>>16)>>>16)>>>16,e[7]=D=65535&T|P<<16,t[7]=Q=65535&A|O<<16,Y+=128,n-=128}return n}function $(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=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,G(o,i,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,d(a,r-8,s/536870912|0,s<<3),G(o,i,a,r),n=0;n<8;n++)d(e,8*n,o[n],i[n]);return 0}function Z(e,r){var n=t(),o=t(),i=t(),a=t(),s=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),U(o,e[0],e[1]),U(h,r[0],r[1]),D(o,o,h),D(i,e[3],r[3]),D(i,i,l),D(a,e[2],r[2]),U(a,a,a),L(s,o,n),L(u,a,i),U(c,a,i),U(f,o,n),D(e[0],s,u),D(e[1],f,c),D(e[2],c,u),D(e[3],s,f)}function J(e,t,r){var n;for(n=0;n<4;n++)I(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();q(i,r[2]),D(n,r[0],i),D(o,r[1],i),B(e,o),e[31]^=M(n)<<7}function te(e,t,r){var n,o;for(R(e[0],a),R(e[1],s),R(e[2],s),R(e[3],a),o=255;o>=0;--o)J(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),J(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];R(n[0],f),R(n[1],h),R(n[2],s),D(n[3],f,h),te(e,n,r)}function ne(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),$(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=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 ie(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]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(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;ie(e,r)}function se(e,r,n,o){var i,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];$(s,o,32),s[0]&=248,s[31]&=127,s[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]=s[32+i];for($(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for($(u,e,n+64),ae(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(a=0;a<32;a++)l[i+a]+=u[i]*s[a];return ie(e.subarray(32),l),h}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),h=t();return R(e[2],s),N(e[1],r),F(i,e[1]),D(u,i,c),L(i,i,e[2]),U(u,e[2],u),F(l,u),F(f,l),D(h,f,l),D(n,h,i),D(n,n,u),V(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],a,e[0]),D(e[3],e[0],e[1]),0)}(h,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($(l,e,n),ae(l),te(f,h,l),re(h,r.subarray(32)),Z(f,h),ee(u,f),n-=64,m(r,0,u,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}function ce(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function le(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function fe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:E,crypto_stream:k,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:S,crypto_onetimeauth:A,crypto_onetimeauth_verify:O,crypto_verify_16:y,crypto_verify_32:m,crypto_secretbox:T,crypto_secretbox_open:P,crypto_scalarmult:K,crypto_scalarmult_base:z,crypto_box_beforenm:X,crypto_box_afternm:Q,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),Q(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),Y(e,t,r,n,a)},crypto_box_keypair:H,crypto_hash:$,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,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,gf:t,D:c,L:oe,pack25519:B,unpack25519:N,M:D,A:U,S:F,Z:L,pow2523:V,add:Z,set25519:R,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){le(e,t,r),ce(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){le(e,t,r),ce(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||0!==P(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(le(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(le(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){le(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return X(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(32),t=new Uint8Array(32);return H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(le(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return z(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(le(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(le(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(le(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 ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(le(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(le(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 ne(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){le(e);var t=new Uint8Array(64);return $(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return le(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===v(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];fe(o)}))}else(t=r(189))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];fe(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},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(29);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(273);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(58);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a=r(274);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(275);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(276);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(277);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(123);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var f=r(279);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var h=r(280);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var p=r(281);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var d=r(282);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var v=r(286);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var y=r(287);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var m=r(127);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var g=r(288);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var b=r(291);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})}));var w=r(294);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}})}))},function(e,t,r){var n=r(70),o=r(41),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},function(e,t,r){var n=r(25),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(210),o=r(106);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t}))}},function(e,t,r){var n=r(41),o=r(24),i=r(66),a=r(18);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},function(e,t,r){var n=r(48),o=r(221),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(223),o=r(263),i=r(45),a=r(3),s=r(271);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},function(e,t,r){var n=r(247),o=r(12);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},function(e,t,r){var n=r(248),o=r(251),i=r(252);e.exports=function(e,t,r,a,s,u){var c=1&r,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var h=u.get(e);if(h&&u.get(t))return h==t;var p=-1,d=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var y=e[p],m=t[p];if(a)var g=c?a(m,y,p,t,e,u):a(y,m,p,e,t,u);if(void 0!==g){if(g)continue;d=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(y===e||s(y,e,r,a,u)))return v.push(t)}))){d=!1;break}}else if(y!==m&&!s(y,m,r,a,u)){d=!1;break}}return u.delete(e),u.delete(t),d}},function(e,t,r){var n=r(14).Uint8Array;e.exports=n},function(e,t,r){var n=r(114),o=r(75),i=r(31);e.exports=function(e){return n(e,i,o)}},function(e,t,r){var n=r(115),o=r(3);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},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){e.exports=function(){return[]}},function(e,t,r){var n=r(18);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(120),o=r(57);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(3),o=r(76),i=r(265),a=r(77);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(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,a;return o?0<=(n>>>=0)&&n<256&&(a=r[n])?a:(i=new e(n,(0|n)<0?-1:0,!0),0<=n&&n<256&&(r[n]=i),i):-128<=(n|=0)&&n<128&&(a=t[n])?a:(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)),a=e.ZERO,s=0;s<t.length;s+=8){var u=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));a=a.multiply(l).add(e.fromNumber(c))}else a=(a=a.multiply(i)).add(e.fromNumber(c))}return a.unsigned=r,a},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,a=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 a="";;){var s=r.divide(i),u=(r.subtract(s.multiply(i)).toInt()>>>0).toString(t);if((r=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},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,a=t.high>>>16,s=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+s)>>>16,l&=65535,c+=r+a,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(a)&&t.lessThan(a))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,s=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*s,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),a=i<=48?1:Math.pow(2,i-48),s=e.fromNumber(r),u=s.multiply(t);u.isNegative()||u.greaterThan(n);)r-=a,u=(s=e.fromNumber(r,this.unsigned)).multiply(t);s.isZero()&&(s=e.ONE),o=o.add(s),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=a(r(278)),o=r(29),i=a(r(4));function a(e){return e&&e.__esModule?e:{default:e}}var s=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)(s)},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(93),o=r(65),i=r(126),a=Math.min;e.exports=function(e,t){if((e=i(e))<1||e>9007199254740991)return[];var r=4294967295,s=a(e,4294967295);t=o(t),e-=4294967295;for(var u=n(s,t);++r<e;)t(r);return u}},function(e,t,r){var n=r(284);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=void 0;var n=i(r(7)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=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)(a)},function(e,t,r){var n=r(79),o=r(109),i=r(292),a=r(3);e.exports=function(e,t){return(a(e)?n:i)(e,o(t,3))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=t.AuthClawbackEnabledFlag=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(23)),a=g(r(130)),s=g(r(7)),u=g(r(9)),c=g(r(40)),l=g(r(304)),f=r(305),h=r(59),p=r(140),d=r(10),v=g(r(1)),y=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(326)),m=r(17);function g(e){return e&&e.__esModule?e:{default:e}}var b=1e7,w=(t.AuthRequiredFlag=1,t.AuthRevocableFlag=2,t.AuthImmutableFlag=4,t.AuthClawbackEnabledFlag=8,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)try{e.sourceAccount=(0,m.decodeAddressToMuxedAccount)(t.source,t.withMuxing)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e,t){var r={};e.sourceAccount()&&(r.source=(0,m.encodeMuxedAccountToAddress)(e.sourceAccount(),t));var n=e.body().value(),o=e.body().switch().name;switch(o){case"createAccount":r.type="createAccount",r.destination=_(n.destination()),r.startingBalance=this._fromXDRAmount(n.startingBalance());break;case"payment":r.type="payment",r.destination=(0,m.encodeMuxedAccountToAddress)(n.destination(),t),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=(0,m.encodeMuxedAccountToAddress)(n.destination(),t),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=(0,m.encodeMuxedAccountToAddress)(n.destination(),t),r.destAsset=h.Asset.fromOperation(n.destAsset()),r.destMin=this._fromXDRAmount(n.destMin()),r.path=[];var s=n.path();Object.keys(s).forEach((function(e){r.path.push(h.Asset.fromOperation(s[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=_(n.trustor()),r.assetCode=n.asset().value().toString(),r.assetCode=(0,a.default)(r.assetCode,"\0"),r.authorize=n.authorize();break;case"setOptions":if(r.type="setOptions",n.inflationDest()&&(r.inflationDest=_(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=_(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=(0,m.encodeMuxedAccountToAddress)(n,t);break;case"manageData":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;case"createClaimableBalance":r.type="createClaimableBalance",r.asset=h.Asset.fromOperation(n.asset()),r.amount=this._fromXDRAmount(n.amount()),r.claimants=[],n.claimants().forEach((function(e){r.claimants.push(p.Claimant.fromXDR(e))}));break;case"claimClaimableBalance":r.type="claimClaimableBalance",r.balanceId=n.toXDR("hex");break;case"beginSponsoringFutureReserves":r.type="beginSponsoringFutureReserves",r.sponsoredId=_(n.sponsoredId());break;case"endSponsoringFutureReserves":r.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case v.default.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=_(r.account().accountId());break;case v.default.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=_(r.trustLine().accountId()),t.asset=h.Asset.fromOperation(r.trustLine().asset());break;case v.default.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=_(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case v.default.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=_(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case v.default.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;default:throw new Error("Unknown ledgerKey: "+e.switch().name)}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=_(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case v.default.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=d.StrKey.encodeEd25519PublicKey(e.ed25519());break;case v.default.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case v.default.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: "+e.switch().name)}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: "+e.switch().name)}}(n,r);break;case"clawback":r.type="clawback",r.amount=this._fromXDRAmount(n.amount()),r.from=(0,m.encodeMuxedAccountToAddress)(n.from()),r.asset=h.Asset.fromOperation(n.asset());break;case"clawbackClaimableBalance":r.type="clawbackClaimableBalance",r.balanceId=n.toXDR("hex");break;case"setTrustLineFlags":r.type="setTrustLineFlags",r.asset=h.Asset.fromOperation(n.asset()),r.trustor=_(n.trustor());var l=n.clearFlags(),f=n.setFlags(),y={authorized:v.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:v.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:v.default.TrustLineFlags.trustlineClawbackEnabledFlag()};r.flags={},Object.keys(y).forEach((function(e){var t;r.flags[e]=(t=y[e].value,!!(f&t)||!(l&t)&&void 0)}));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(b).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,s.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(b);return o.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new i.default(e).div(b).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 v.default.Price(e);else{e=new i.default(e);var r=(0,f.best_r)(e);t=new v.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}());function _(e){return d.StrKey.encodeEd25519PublicKey(e.ed25519())}w.accountMerge=y.accountMerge,w.allowTrust=y.allowTrust,w.bumpSequence=y.bumpSequence,w.changeTrust=y.changeTrust,w.createAccount=y.createAccount,w.createClaimableBalance=y.createClaimableBalance,w.claimClaimableBalance=y.claimClaimableBalance,w.clawbackClaimableBalance=y.clawbackClaimableBalance,w.createPassiveSellOffer=y.createPassiveSellOffer,w.inflation=y.inflation,w.manageData=y.manageData,w.manageSellOffer=y.manageSellOffer,w.manageBuyOffer=y.manageBuyOffer,w.pathPaymentStrictReceive=y.pathPaymentStrictReceive,w.pathPaymentStrictSend=y.pathPaymentStrictSend,w.payment=y.payment,w.setOptions=y.setOptions,w.beginSponsoringFutureReserves=y.beginSponsoringFutureReserves,w.endSponsoringFutureReserves=y.endSponsoringFutureReserves,w.revokeAccountSponsorship=y.revokeAccountSponsorship,w.revokeTrustlineSponsorship=y.revokeTrustlineSponsorship,w.revokeOfferSponsorship=y.revokeOfferSponsorship,w.revokeDataSponsorship=y.revokeDataSponsorship,w.revokeClaimableBalanceSponsorship=y.revokeClaimableBalanceSponsorship,w.revokeSignerSponsorship=y.revokeSignerSponsorship,w.clawback=y.clawback,w.setTrustLineFlags=y.setTrustLineFlags},function(e,t,r){var n=r(78),o=r(131),i=r(297),a=r(132),s=r(77),u=/\s+$/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=a(e),l=i(c,a(t))+1;return o(c,0,l).join("")}},function(e,t,r){var n=r(296);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(302),o=r(83),i=r(303);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){(function(e){var n=r(14),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}}).call(this,r(38)(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(115),o=r(84),i=r(75),a=r(116),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,r){var n=r(85);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(317),o=r(84),i=r(48);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},function(e,t,r){var n=r(322),o=r(139),i=r(126),a=r(77);e.exports=function(e,t,r){e=a(e);var s=(t=i(t))?o(e):0;return t&&s<t?e+n(t-s,r):e}},function(e,t,r){var n=r(324),o=r(83),i=r(325);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Claimant=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(1),a=(n=i)&&n.__esModule?n:{default:n},s=r(19),u=r(10);t.Claimant=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),t&&!u.StrKey.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof a.default.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=a.default.ClaimPredicate.claimPredicateUnconditional()}return o(e,[{key:"toXDRObject",value:function(){var e=new a.default.ClaimantV0({destination:s.Keypair.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return a.default.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}],[{key:"predicateUnconditional",value:function(){return a.default.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof a.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof a.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return a.default.ClaimPredicate.claimPredicateBeforeAbsoluteTime(a.default.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return a.default.ClaimPredicate.claimPredicateBeforeRelativeTime(a.default.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t=void 0;switch(e.switch()){case a.default.ClaimantType.claimantTypeV0():return t=e.v0(),new this(u.StrKey.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());default:throw new Error("Invalid claimant type: "+e.switch().name)}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(e.balanceId);var t={};t.balanceId=i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.default.ClaimClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.validateClaimableBalanceId=a;var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};function a(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.FeeBumpTransaction=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(1),a=(n=i)&&n.__esModule?n:{default:n},s=r(39),u=r(82),c=r(81),l=r(17);t.FeeBumpTransaction=function(t){function r(t,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),"string"==typeof t){var i=e.from(t,"base64");t=a.default.TransactionEnvelope.fromXDR(i)}var s=t.switch();if(s!==a.default.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an "+s.name+".");var c=t.value(),f=c.tx(),h=f.fee().toString(),p=(c.signatures()||[]).slice(),d=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)).call(this,f,p,h,n)),v=a.default.TransactionEnvelope.envelopeTypeTx(f.innerTx().v1());return d._feeSource=(0,l.encodeMuxedAccountToAddress)(d.tx.feeSource(),o),d._innerTransaction=new u.Transaction(v,n),d}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:"signatureBase",value:function(){var e=new a.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new a.default.TransactionSignaturePayload({networkId:a.default.Hash.fromXDR((0,s.hash)(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new a.default.FeeBumpTransactionEnvelope({tx:a.default.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new a.default.TransactionEnvelope.envelopeTypeTxFeeBump(e)}},{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"feeSource",get:function(){return this._feeSource}}]),r}(c.TransactionBase)}).call(this,r(0).Buffer)},function(e,t,r){var n=r(70),o=r(41);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 a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function v(e){throw new RangeError(h[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function g(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 b(e){return y(e,(function(e){var t="";return e>65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function S(e){var t,r,n,o,i,a,s,c,l,f,h,d=[],y=e.length,m=0,g=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),d.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(i=m,a=1,s=36;o>=y&&v("invalid-input"),((c=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((u-m)/a))&&v("overflow"),m+=c*a,!(c<(l=s<=w?1:s>=w+26?26:s-w));s+=36)a>p(u/(f=36-l))&&v("overflow"),a*=f;w=_(m-i,t=d.length+1,0==i),p(m/t)>u-g&&v("overflow"),g+=p(m/t),m%=t,d.splice(m++,0,g)}return b(d)}function k(e){var t,r,n,o,i,a,s,c,l,f,h,y,m,b,S,k=[];for(y=(e=g(e)).length,t=128,r=0,i=72,a=0;a<y;++a)(h=e[a])<128&&k.push(d(h));for(n=o=k.length,o&&k.push("-");n<y;){for(s=u,a=0;a<y;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>p((u-r)/(m=n+1))&&v("overflow"),r+=(s-t)*m,t=s,a=0;a<y;++a)if((h=e[a])<t&&++r>u&&v("overflow"),h==t){for(c=r,l=36;!(c<(f=l<=i?1:l>=i+26?26:l-i));l+=36)S=c-f,b=36-f,k.push(d(w(f+S%b,0))),c=p(S/b);k.push(d(w(c,0))),i=_(r,m,n==o),r=0,++n}++r,++t}return k.join("")}s={version:"1.3.2",ucs2:{decode:g,encode:b},decode:S,encode:k,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return m(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(38)(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,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?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 a=0;a<i;a++){r=n[a].split("");for(var s=0;s<3&&("0"===r[0]&&r.length>1);s++)r.splice(0,1);n[a]=r.join("")}var u=-1,c=0,l=0,f=-1,h=!1;for(a=0;a<i;a++)h?"0"===n[a]?l+=1:(h=!1,l>c&&(u=f,c=l)):"0"===n[a]&&(h=!0,f=a,l=1);l>c&&(u=f,c=l),c>1&&n.splice(u,c,""),o=n.length;var p="";for(""===n[0]&&(p=":"),a=0;a<o&&(p+=n[a],a!==o-1);a++)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,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?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(11);function o(e){return encodeURIComponent(e).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 a=[];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)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),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(11),o=r(366),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(s=r(152)),s),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)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(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,maxBodyLength:-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(13))},function(e,t,r){"use strict";var n=r(11),o=r(367),i=r(369),a=r(149),s=r(370),u=r(373),c=r(374),l=r(153);e.exports=function(e){return new Promise((function(t,r){var f=e.data,h=e.headers;n.isFormData(f)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+v)}var y=s(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(y,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?u(p.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,r,i),p=null}},p.onabort=function(){p&&(r(l("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(l("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var m=(e.withCredentials||c(y))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;m&&(h[e.xsrfHeaderName]=m)}if("setRequestHeader"in p&&n.forEach(h,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),f||(f=null),p.send(f)}))}},function(e,t,r){"use strict";var n=r(368);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";var n=r(11);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(a,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(s,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var l=o.concat(i).concat(a).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(f,c),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(389),o=r(158),i=r(398),a=r(399),s=r(88),u=t;u.request=function(t,r){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,u=t.hostname||t.host,c=t.port,l=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+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=a,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=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(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,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&s(n().overrideMimeType),t.vbArray=s(e.VBArray),r=null}).call(this,r(5))},function(e,t,r){(function(e,n,o){var i=r(157),a=r(8),s=r(159),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,r,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===a){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")}}};a(c,s.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 a=new n(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);e.push(a)}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(13),r(0).Buffer,r(5))},function(e,t,r){(t=e.exports=r(160)).Stream=t,t.Readable=t,t.Writable=r(163),t.Duplex=r(35),t.Transform=r(165),t.PassThrough=r(396)},function(e,t,r){"use strict";(function(t,n){var o=r(62);e.exports=b;var i,a=r(95);b.ReadableState=g;r(89).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r(161),c=r(90).Buffer,l=t.Uint8Array||function(){};var f=Object.create(r(44));f.inherits=r(8);var h=r(390),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=r(391),y=r(162);f.inherits(b,u);var m=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(i=i||r(35));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,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(164).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(35),!(this instanceof b))return new b(e);this._readableState=new g(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 w(e,t,r,n,o){var i,a=e._readableState;null===t?(a.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,k(e)}(e,a)):(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}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):x(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function _(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&&k(e)),x(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.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),w(this,e,t,!1,r)},b.prototype.unshift=function(e){return w(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return d||(d=r(164).StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};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>=8388608?e=8388608:(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 k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(E,e):E(e))}function E(e){p("emit readable"),e.emit("readable"),P(e)}function x(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(A,e,t))}function A(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 O(e){p("readable nexttick read 0"),e.read(0)}function T(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function R(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,a=e>i.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));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,a=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,a),0===(e-=a)){a===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++o}return t.length-=o,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function C(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(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}b.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?C(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&C(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?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&C(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.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:b;function c(t,n){p("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",v),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&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",f);var h=!1;var d=!1;function v(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function y(t){p("onerror",t),b(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),b()}function g(){p("onfinish"),e.removeListener("close",m),b()}function b(){p("unpipe"),r.unpipe(e)}return r.on("data",v),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",m),e.once("finish",g),e.emit("pipe",r),i.flowing||(p("pipe resume"),r.resume()),e},b.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||(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 a=B(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.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&&k(this):o.nextTick(O,this))}return r},b.prototype.addListener=b.prototype.on,b.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(T,e,t))}(this,e)),this},b.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},b.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<m.length;i++)e.on(m[i],this.emit.bind(this,m[i]));return this._read=function(t){p("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R}).call(this,r(5),r(13))},function(e,t,r){e.exports=r(89).EventEmitter},function(e,t,r){"use strict";var n=r(62);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(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(62);function a(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=g;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:i.nextTick;g.WritableState=m;var c=Object.create(r(44));c.inherits=r(8);var l={deprecate:r(395)},f=r(161),h=r(90).Buffer,p=o.Uint8Array||function(){};var d,v=r(162);function y(){}function m(e,t){s=s||r(35),e=e||{};var n=t instanceof s;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(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,o);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?u(w,e,r,a,o):w(e,r,a,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 a(this)}function g(e){if(s=s||r(35),!(d.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(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 b(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function _(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 s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,b(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 a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(b(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 S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(g,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.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(g,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,h.isBuffer(n)||n instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=y),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;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 b(e,t,!1,s,n,o,i);return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.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(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.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,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=v.destroy,g.prototype._undestroy=v.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(13),r(393).setImmediate,r(5))},function(e,t,r){"use strict";var n=r(21).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=s,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 a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(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=a(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if((o=a(t[n]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if((o=a(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=a;var n=r(35),o=Object.create(r(44));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 a(e){if(!(this instanceof a))return new a(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",s)}function s(){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(8),o.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.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)}},a.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},a.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}),t.DigitalBitsTomlResolver=t.DIGITALBITS_TOML_MAX_SIZE=void 0;var n=r(2),o=n.__importDefault(r(61)),i=n.__importDefault(r(419)),a=r(60);t.DIGITALBITS_TOML_MAX_SIZE=102400;var s=o.default.CancelToken,u=function(){function e(){}return e.resolve=function(e,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var u,c,l;return n.__generator(this,(function(n){return u=void 0===r.allowHttp?a.Config.isAllowHttp():r.allowHttp,c=void 0===r.timeout?a.Config.getTimeout():r.timeout,l=u?"http":"https",[2,o.default.get(l+"://"+e+"/.well-known/digitalbits.toml",{maxContentLength:t.DIGITALBITS_TOML_MAX_SIZE,cancelToken:c?new s((function(e){return setTimeout((function(){return e("timeout of "+c+"ms exceeded")}),c)})):void 0,timeout:c}).then((function(e){try{var t=i.default.parse(e.data);return Promise.resolve(t)}catch(e){return Promise.reject(new Error("digitalbits.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("digitalbits.toml file exceeds allowed size of "+t.DIGITALBITS_TOML_MAX_SIZE):e}))]}))}))},e}();t.DigitalBitsTomlResolver=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e.exports=r(168),e.exports.axios=r(61),e.exports.DigitalBitsBase=r(27)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;var n=r(2);r(169).polyfill();var o=r(63).version;t.version=o,n.__exportStar(r(170),t),n.__exportStar(r(171),t),n.__exportStar(r(91),t),n.__exportStar(r(33),t);var i=r(60);Object.defineProperty(t,"Config",{enumerable:!0,get:function(){return i.Config}});var a=r(351);Object.defineProperty(t,"Server",{enumerable:!0,get:function(){return a.Server}});var s=r(418);Object.defineProperty(t,"FederationServer",{enumerable:!0,get:function(){return s.FederationServer}}),Object.defineProperty(t,"FEDERATION_RESPONSE_MAX_SIZE",{enumerable:!0,get:function(){return s.FEDERATION_RESPONSE_MAX_SIZE}});var u=r(166);Object.defineProperty(t,"DigitalBitsTomlResolver",{enumerable:!0,get:function(){return u.DigitalBitsTomlResolver}}),Object.defineProperty(t,"DIGITALBITS_TOML_MAX_SIZE",{enumerable:!0,get:function(){return u.DIGITALBITS_TOML_MAX_SIZE}});var c=r(87);Object.defineProperty(t,"FrontierAxiosClient",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SERVER_TIME_MAP",{enumerable:!0,get:function(){return c.SERVER_TIME_MAP}}),Object.defineProperty(t,"getCurrentServerTime",{enumerable:!0,get:function(){return c.getCurrentServerTime}}),n.__exportStar(r(422),t),n.__exportStar(r(27),t),t.default=e.exports},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,a=void 0,s=function(e,t){d[o]=e,d[o+1]=t,2===(o+=2)&&(a?a(v):w())},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(v,1)}}var d=new Array(1e3);function v(){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 y,m,g,b,w=void 0;function _(e,t){var r=this,n=new this.constructor(E);void 0===n[k]&&j(n);var o=r._state;if(o){var i=arguments[o-1];s((function(){return I(o,n,i,r._result)}))}else R(r,n,e,t);return n}function S(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(E);return A(t,e),t}f?w=function(){return t.nextTick(v)}:l?(m=0,g=new l(v),b=document.createTextNode(""),g.observe(b,{characterData:!0}),w=function(){b.data=m=++m%2}):h?((y=new MessageChannel).port1.onmessage=v,w=function(){return y.port2.postMessage(0)}):w=void 0===u?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(v)}:p()}catch(e){return p()}}():p();var k=Math.random().toString(36).substring(2);function E(){}function x(t,r,n){r.constructor===t.constructor&&n===_&&r.constructor.resolve===S?function(e,t){1===t._state?T(e,t._result):2===t._state?P(e,t._result):R(t,void 0,(function(t){return A(e,t)}),(function(t){return P(e,t)}))}(t,r):void 0===n?T(t,r):e(n)?function(e,t,r){s((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?A(e,r):T(e,r))}),(function(t){n||(n=!0,P(e,t))}),e._label);!n&&o&&(n=!0,P(e,o))}),e)}(t,r,n):T(t,r)}function A(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(n=t),null===n||"object"!==o&&"function"!==o)T(e,t);else{var r=void 0;try{r=t.then}catch(t){return void P(e,t)}x(e,t,r)}var n,o}function O(e){e._onerror&&e._onerror(e._result),C(e)}function T(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(C,e))}function P(e,t){void 0===e._state&&(e._state=2,e._result=t,s(O,e))}function R(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=r,o[i+2]=n,0===i&&e._state&&s(C,e)}function C(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?I(r,n,o,i):o(i);e._subscribers.length=0}}function I(t,r,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(e){u=!1,s=e}if(r===a)return void P(r,new TypeError("A promises callback cannot return that same promise."))}else a=o;void 0!==r._state||(i&&u?A(r,a):!1===u?P(r,s):1===t?T(r,a):2===t&&P(r,a))}var B=0;function j(e){e[k]=B++,e._state=void 0,e._result=void 0,e._subscribers=[]}var M=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(E),this.promise[k]||j(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&T(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===_&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===N){var s=new r(E);a?P(s,i):x(s,e,o),this._willSettleAt(s,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;void 0===n._state&&(this._remaining--,2===e?P(n,r):this._result[t]=r),0===this._remaining&&T(n,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;R(e,void 0,(function(e){return r._settledAt(1,t,e)}),(function(e){return r._settledAt(2,t,e)}))},e}(),N=function(){function t(e){this[k]=B++,this._result=this._state=void 0,this._subscribers=[],E!==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){A(e,t)}),(function(t){P(e,t)}))}catch(t){P(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 N.prototype.then=_,N.all=function(e){return new M(this,e).promise},N.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."))}))},N.resolve=S,N.reject=function(e){var t=new this(E);return P(t,e),t},N._setScheduler=function(e){a=e},N._setAsap=function(e){s=e},N._asap=s,N.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=N},N.Promise=N,N},e.exports=n()}).call(this,r(13),r(5))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Frontier=void 0,function(e){!function(e){e.createAccount="create_account",e.payment="payment",e.pathPayment="path_payment_strict_receive",e.createPassiveOffer="create_passive_sell_offer",e.manageOffer="manage_sell_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.manageBuyOffer="manage_buy_offer",e.pathPaymentStrictSend="path_payment_strict_send",e.createClaimableBalance="create_claimable_balance",e.claimClaimableBalance="claim_claimable_balance",e.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",e.endSponsoringFutureReserves="end_sponsoring_future_reserves",e.revokeSponsorship="revoke_sponsorship",e.clawback="clawback",e.clawbackClaimableBalance="clawback_claimable_balance",e.setTrustLineFlags="set_trust_line_flags"}(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[e.manageBuyOffer=12]="manageBuyOffer",e[e.pathPaymentStrictSend=13]="pathPaymentStrictSend",e[e.createClaimableBalance=14]="createClaimableBalance",e[e.claimClaimableBalance=15]="claimClaimableBalance",e[e.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",e[e.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",e[e.revokeSponsorship=18]="revokeSponsorship",e[e.clawback=19]="clawback",e[e.clawbackClaimableBalance=20]="clawbackClaimableBalance",e[e.setTrustLineFlags=21]="setTrustLineFlags"}(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.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",e.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",e.TX_NOT_SUPPORTED="tx_not_supported",e.TX_SUCCESS="tx_success",e.TX_TOO_EARLY="tx_too_early",e.TX_TOO_LATE="tx_too_late",e.TX_MISSING_OPERATION="tx_missing_operation",e.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",e.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",e.TX_INSUFFICIENT_FEE="tx_insufficient_fee",e.TX_INTERNAL_ERROR="tx_internal_error"}(e.TransactionFailedResultCodes||(e.TransactionFailedResultCodes={}))}(t.Frontier||(t.Frontier={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,r){var n=r(64),o=r(65),i=r(26);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),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}}},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},function(e,t,r){var n=r(36),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),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(20),o=r(67),i=r(12),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},function(e,t,r){var n=r(18),o=r(48),i=r(180),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);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){(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(182),t.sha1=r(185),t.sha224=r(186),t.sha256=r(96),t.sha384=r(187),t.sha512=r(97)},function(e,t,r){var n=r(8),o=r(28),i=r(21).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,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,s=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,s)+u+r[h]+a[p];u=s,s=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=s+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),a=n[0],s=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;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===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(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=[],a=0,s=r-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+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,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;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,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-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+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,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,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*v}},function(e,t,r){var n=r(8),o=r(28),i=r(21).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,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,s=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),v=c(n)+f(d,o,i,s)+u+r[p]+a[d]|0;u=s,s=i,i=l(o),o=n,n=v}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+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(8),o=r(96),i=r(28),a=r(21).Buffer,s=new Array(64);function u(){this.init(),this._w=s,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=a.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(8),o=r(97),i=r(28),a=r(21).Buffer,s=new Array(160);function u(){this.init(),this._w=s,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=a.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";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 a={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function s(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())}}a.charmap=n(a.alphabet,a.charmap),s.prototype.charmap=o.charmap,s.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},s.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 s(t).finalize(e)},t.Decoder=s,t.Encoder=u,t.charmap=n,t.crockford=i,t.rfc4648=o,t.base32hex=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crcjam=t.crc32=t.crc24=t.crc16kermit=t.crc16xmodem=t.crc16modbus=t.crc16ccitt=t.crc16=t.crc81wire=t.crc8=t.crc1=void 0;var n=d(r(192)),o=d(r(193)),i=d(r(194)),a=d(r(195)),s=d(r(196)),u=d(r(197)),c=d(r(198)),l=d(r(199)),f=d(r(200)),h=d(r(201)),p=d(r(202));function d(e){return e&&e.__esModule?e:{default:e}}t.crc1=n.default,t.crc8=o.default,t.crc81wire=i.default,t.crc16=a.default,t.crc16ccitt=s.default,t.crc16modbus=u.default,t.crc16xmodem=c.default,t.crc16kermit=l.default,t.crc24=f.default,t.crc32=h.default,t.crcjam=p.default,t.default={crc1:n.default,crc8:o.default,crc81wire:i.default,crc16:a.default,crc16ccitt:s.default,crc16modbus:u.default,crc16xmodem:c.default,crc16kermit:l.default,crc24:f.default,crc32:h.default,crcjam:p.default}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=i(r(15));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(16)).default)("crc1",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0,a=0;a<e.length;a++){i+=e[a]}return(r+=i%256)%256}));t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("crc-8",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=255&s[255&(r^a)]}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("dallas-1-wire",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=255&s[255&(r^a)]}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("crc-16",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("ccitt",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:65535,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r>>8^a)]^r<<8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("crc-16-modbus",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:65535,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=i(r(15));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(16)).default)("xmodem",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:0,i=0;i<e.length;i++){var a=r>>>8&255;a^=255&e[i],r=r<<8&65535,r^=a^=a>>>4,r^=a=a<<5&65535,r^=a=a<<7&65535}return r}));t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("kermit",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:0,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("crc-24",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:11994318,i=0;i<e.length;i++){var a=e[i];r=16777215&(s[255&(r>>16^a)]^r<<8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("crc-32",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=0===t?0:-1^~~t,i=0;i<e.length;i++){var a=e[i];r=s[255&(r^a)]^r>>>8}return-1^r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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&&(s=new Int32Array(s));var u=(0,i.default)("jam",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=0===t?0:~~t,i=0;i<e.length;i++){var a=e[i];r=s[255&(r^a)]^r>>>8}return r}));t.default=u},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){e.exports=r(205)},function(e,t,r){var n=r(30),o=r(105),i=r(26),a=o((function(e,t){n(t,i(t),e)}));e.exports=a},function(e,t,r){var n=r(49),o=r(207),i=r(18),a=r(104),s=/^\[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:s).test(a(e))}},function(e,t,r){var n,o=r(208),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(14)["__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(45),o=r(211),i=r(213);e.exports=function(e,t){return i(o(e,t,n),e+"")}},function(e,t,r){var n=r(212),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,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];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(214),o=r(216)(n);e.exports=o},function(e,t,r){var n=r(215),o=r(103),i=r(45),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var r=Date.now;e.exports=function(e){var t=0,n=0;return function(){var o=r(),i=16-(o-n);if(n=o,i>0){if(++t>=800)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=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(50);var i=function(){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r instanceof e||(r="number"==typeof r?e.alloc(r):e.from(r)),this._setBuffer(r),this.rewind()}return n(t,[{key:"_setBuffer",value:function(e){this._buffer=e,this.length=e.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(e){return e(this),this}},{key:"clone",value:function(e){var t=new this.constructor(this.buffer());return t.seek(0===arguments.length?this.tell():e),t}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(e,t){return 1===arguments.length&&(t=e,e="="),"+"===e?this._index+=t:"-"===e?this._index-=t:this._index=t,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(e,t,r){return this.seek("+",this.buffer().write(e,this.tell(),t,r))}},{key:"fill",value: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}},{key:"slice",value: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}},{key:"copyFrom",value:function(t){var r=t instanceof e?t:t.buffer();return r.copy(this.buffer(),this.tell(),0,r.length),this.seek("+",r.length),this}},{key:"concat",value:function(r){r.forEach((function(e,n){e instanceof t&&(r[n]=e.buffer())})),r.unshift(this.buffer());var n=e.concat(r);return this._setBuffer(n),this}},{key:"toString",value: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}},{key:"writeBufferPadded",value:function(r){var n=(0,o.calculatePadding)(r.length),i=e.alloc(n);return this.copyFrom(new t(r)).copyFrom(new t(i))}}]),t}();[[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){i.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){i.prototype[t]=function(r){return this.buffer()[t](r,this.tell()),this.seek("+",e[0]),this}}))})),t.Cursor=i}).call(this,r(0).Buffer)},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(72);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(64),o=r(31);e.exports=function(e,t){return e&&n(e,t,o)}},function(e,t,r){var n=r(108)(Object.keys,Object);e.exports=n},function(e,t,r){var n=r(24);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,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&!1!==o(s[a],a,s););return r}}},function(e,t,r){var n=r(224),o=r(262),i=r(118);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(51),o=r(110);e.exports=function(e,t,r,i){var a=r.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=r[a])[0],f=e[l],h=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var p=new n;if(i)var d=i(f,h,l,e,t,p);if(!(void 0===d?o(h,f,3,i,p):d))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(53),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(53);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(53);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(53);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(52);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(52),o=r(73),i=r(74);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)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(236),o=r(52),i=r(73);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(237),o=r(238),i=r(239),a=r(240),s=r(241);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=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(54);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(54),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},function(e,t,r){var n=r(54),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(54);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,r){var n=r(55);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(55);e.exports=function(e){return n(this,e).get(e)}},function(e,t,r){var n=r(55);e.exports=function(e){return n(this,e).has(e)}},function(e,t,r){var n=r(55);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(51),o=r(111),i=r(253),a=r(256),s=r(42),u=r(3),c=r(37),l=r(47),f="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,p,d,v){var y=u(e),m=u(t),g=y?"[object Array]":s(e),b=m?"[object Array]":s(t),w=(g="[object Arguments]"==g?f:g)==f,_=(b="[object Arguments]"==b?f:b)==f,S=g==b;if(S&&c(e)){if(!c(t))return!1;y=!0,w=!1}if(S&&!w)return v||(v=new n),y||l(e)?o(e,t,r,p,d,v):i(e,t,g,r,p,d,v);if(!(1&r)){var k=w&&h.call(e,"__wrapped__"),E=_&&h.call(t,"__wrapped__");if(k||E){var x=k?e.value():e,A=E?t.value():t;return v||(v=new n),d(x,A,r,p,v)}}return!!S&&(v||(v=new n),a(e,t,r,p,d,v))}},function(e,t,r){var n=r(74),o=r(249),i=r(250);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),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(112),i=r(41),a=r(111),s=r(254),u=r(255),c=n?n.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,f,h){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var d=1&n;if(p||(p=u),e.size!=t.size&&!d)return!1;var v=h.get(e);if(v)return v==t;n|=2,h.set(e,t);var y=a(p(e),p(t),n,c,f,h);return h.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.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(113),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var u=1&r,c=n(e),l=c.length;if(l!=n(t).length&&!u)return!1;for(var f=l;f--;){var h=c[f];if(!(u?h in t:o.call(t,h)))return!1}var p=s.get(e);if(p&&s.get(t))return p==t;var d=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var y=e[h=c[f]],m=t[h];if(i)var g=u?i(m,y,h,t,e,s):i(y,m,h,e,t,s);if(!(void 0===g?y===m||a(y,m,r,i,s):g)){d=!1;break}v||(v="constructor"==h)}if(d&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(d=!1)}return s.delete(e),s.delete(t),d}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},function(e,t,r){var n=r(25)(r(14),"DataView");e.exports=n},function(e,t,r){var n=r(25)(r(14),"Promise");e.exports=n},function(e,t,r){var n=r(25)(r(14),"Set");e.exports=n},function(e,t,r){var n=r(25)(r(14),"WeakMap");e.exports=n},function(e,t,r){var n=r(117),o=r(31);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},function(e,t,r){var n=r(110),o=r(264),i=r(268),a=r(76),s=r(117),u=r(118),c=r(57);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},function(e,t,r){var n=r(119);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(266),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=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=a},function(e,t,r){var n=r(267);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},function(e,t,r){var n=r(74);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");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 a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},function(e,t,r){var n=r(269),o=r(270);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(120),o=r(46),i=r(3),a=r(66),s=r(67),u=r(57);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)&&s(l)&&a(h,l)&&(i(e)||o(e))}},function(e,t,r){var n=r(121),o=r(272),i=r(76),a=r(57);e.exports=function(e){return i(e)?n(a(e)):o(e)}},function(e,t,r){var n=r(119);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 a=o.get;return void 0!==a?a.call(n):void 0},i=s(r(122)),a=s(r(4));function s(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,a.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 a=o.get;return void 0!==a?a.call(n):void 0},i=s(r(122)),a=s(r(4));function s(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,a.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(40)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=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)(a)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Double=void 0;var n=i(r(40)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=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)(a)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quadruple=void 0;var n,o=r(4),i=(n=o)&&n.__esModule?n:{default:n};var a=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)(a)},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==n(e)}},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(9)),i=l(r(3)),a=r(29),s=r(58),u=r(50),c=l(r(4));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=t.String=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.UnsignedInt.MAX_VALUE;f(this,t),this._maxLength=e}return n(t,[{key:"read",value:function(e){var t=a.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),a.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)(h.prototype)}).call(this,r(0).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(50),a=r(4),s=(n=a)&&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,s.default)(u.prototype)}).call(this,r(0).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(29),a=r(58),s=r(50),u=r(4),c=(n=u)&&n.__esModule?n:{default:n};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.VarOpaque=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.UnsignedInt.MAX_VALUE;l(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,s.calculatePadding)(t),n=e.slice(t);return(0,s.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)(f.prototype)}).call(this,r(0).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(71)),i=c(r(32)),a=c(r(125)),s=c(r(3)),u=c(r(4));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,a.default)(this._length,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,s.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,s.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(124),o=r(72),i=r(65),a=r(3);e.exports=function(e,t){return(a(e)?n:o)(e,i(t))}},function(e,t,r){var n=r(285);e.exports=function(e){return e?(e=n(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,r){var n=r(18),o=r(56),i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;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(i,"");var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},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(71)),i=f(r(32)),a=f(r(125)),s=f(r(3)),u=r(58),c=r(29),l=f(r(4));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.VarArray=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.UnsignedInt.MAX_VALUE;h(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,a.default)(r,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,s.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,s.default)(e)&&(!(e.length>this._maxLength)&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,l.default)(p.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(100)),i=u(r(7)),a=r(123),s=u(r(4));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(a.Bool.read(e))return this._childType.read(e)}},{key:"write",value:function(e,t){var r=!((0,o.default)(e)||(0,i.default)(e));a.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,s.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=u(r(32)),i=u(r(289)),a=r(29),s=u(r(4));function u(e){return e&&e.__esModule?e:{default:e}}function c(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 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,i.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 i=function(e){function t(){return l(this,t),c(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 i.enumName=r,t.results[r]=i,i._members={},i._byValue=new Map,(0,o.default)(n,(function(e,t){var r=new i(t,e);i._members[t]=r,i._byValue.set(e,r),i[t]=function(){return r}})),i}}]),e}();(0,s.default)(f)},function(e,t,r){var n=r(290),o=r(31);e.exports=function(e){return null==e?[]:n(e,o(e))}},function(e,t,r){var n=r(79);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 a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.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(32)),a=f(r(128)),s=f(r(7)),u=f(r(293)),c=r(80),l=f(r(4));function f(e){return e&&e.__esModule?e:{default:e}}function h(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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.Struct=function(){function e(t){p(this,e),this._attributes=t||{}}return o(e,null,[{key:"read",value:function(e){var t=(0,a.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],a=o[1],s=e._attributes[i];a.write(s,t)}))}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var a=function(e){function t(){return p(this,t),h(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 a.structName=r,t.results[r]=a,a._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)(a._fields,(function(e){var t=n(e,1)[0];a.prototype[t]=function(e){return function(t){return(0,s.default)(t)||(this._attributes[e]=t),this._attributes[e]}}(t)})),a}}]),e}();(0,l.default)(d)},function(e,t,r){var n=r(72),o=r(24);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 a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.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(32)),a=f(r(7)),s=f(r(9)),u=r(127),c=r(80),l=f(r(4));function f(e){return e&&e.__esModule?e:{default:e}}function h(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 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,s.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!==u.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===u.Void?u.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 l=function(e){function t(){return p(this,t),h(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);l.unionName=r,t.results[r]=l,o.switchOn instanceof c.Reference?l._switchOn=o.switchOn.resolve(t):l._switchOn=o.switchOn,l._switches=new Map,l._arms={},(0,i.default)(o.arms,(function(e,r){e instanceof c.Reference&&(e=e.resolve(t)),l._arms[r]=e}));var f=o.defaultArm;return f instanceof c.Reference&&(f=f.resolve(t)),l._defaultArm=f,(0,i.default)(o.switches,(function(e){var t=n(e,2),r=t[0],o=t[1];(0,s.default)(r)&&(r=l._switchOn.fromName(r)),l._switches.set(r,o)})),(0,a.default)(l._switchOn.values)||(0,i.default)(l._switchOn.values(),(function(e){l[e.name]=function(t){return new l(e,t)},l.prototype[e.name]=function(t){return this.set(e,t)}})),(0,i.default)(l._arms,(function(e,t){e!==u.Void&&(l.prototype[t]=function(){return this.get(t)})})),l}}]),e}();(0,l.default)(d)},function(e,t,r){"use strict";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(80);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})})),t.config=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=new b(t);e(r),r.resolve()}return t};var i=u(r(7)),a=u(r(32)),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(101));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(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)}var h=function(e){function t(e){c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name=e,r}return f(t,e),n(t,[{key:"resolve",value:function(e){return e.definitions[this.name].resolve(e)}}]),t}(o.Reference),p=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.childReference=e,o.length=r,o.variable=n,o}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference,r=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),r instanceof o.Reference&&(r=r.resolve(e)),this.variable?new s.VarArray(t,r):new s.Array(t,r)}}]),t}(o.Reference),d=function(e){function t(e){c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.childReference=e,r.name=e.name,r}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference;return t instanceof o.Reference&&(t=t.resolve(e)),new s.Option(t)}}]),t}(o.Reference),v=function(e){function t(e,r){c(this,t);var n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.sizedType=e,n.length=r,n}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),new this.sizedType(t)}}]),t}(o.Reference),y=function(){function e(t,r,n){c(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 m(e,t,r){return r instanceof o.Reference&&(r=r.resolve(e)),e.results[t]=r,r}function g(e,t,r){return e.results[t]=r,r}var b=function(){function e(t){c(this,e),this._destination=t,this._definitions={}}return n(e,[{key:"enum",value:function(e,t){var r=new y(s.Enum.create,e,t);this.define(e,r)}},{key:"struct",value:function(e,t){var r=new y(s.Struct.create,e,t);this.define(e,r)}},{key:"union",value:function(e,t){var r=new y(s.Union.create,e,t);this.define(e,r)}},{key:"typedef",value:function(e,t){var r=new y(m,e,t);this.define(e,r)}},{key:"const",value:function(e,t){var r=new y(g,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 v(s.String,e)}},{key:"opaque",value:function(e){return new v(s.Opaque,e)}},{key:"varOpaque",value:function(e){return new v(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,i.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,a.default)(this._definitions,(function(t){t.resolve({definitions:e._definitions,results:e._destination})}))}}]),e}()},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(298);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(299),o=r(300),i=r(301);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]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,a,s,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,r){var n=r(14).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 a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.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 a.default(e),r=void 0,o=void 0,i=[[new a.default(0),new a.default(1)],[new a.default(1),new a.default(0)]],s=2;for(;!t.gt(2147483647);){r=t.floor(),o=t.sub(r);var u=r.mul(i[s-1][0]).add(i[s-2][0]),c=r.mul(i[s-1][1]).add(i[s-2][1]);if(u.gt(2147483647)||c.gt(2147483647))break;if(i.push([u,c]),o.eq(0))break;t=new a.default(1).div(o),s+=1}var l=n(i[i.length-1],2),f=l[0],h=l[1];if(f.isZero()||h.isZero())throw new Error("Couldn't find approximation");return[f.toNumber(),h.toNumber()]};var o,i=r(23),a=(o=i)&&o.__esModule?o:{default:o}},function(e,t,r){var n=r(51),o=r(124),i=r(102),a=r(307),s=r(308),u=r(133),c=r(134),l=r(309),f=r(310),h=r(113),p=r(311),d=r(42),v=r(312),y=r(313),m=r(137),g=r(3),b=r(37),w=r(318),_=r(18),S=r(320),k=r(31),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,e.exports=function e(t,r,x,A,O,T){var P,R=1&r,C=2&r,I=4&r;if(x&&(P=O?x(t,A,O,T):x(t)),void 0!==P)return P;if(!_(t))return t;var B=g(t);if(B){if(P=v(t),!R)return c(t,P)}else{var j=d(t),M="[object Function]"==j||"[object GeneratorFunction]"==j;if(b(t))return u(t,R);if("[object Object]"==j||"[object Arguments]"==j||M&&!O){if(P=C||M?{}:m(t),!R)return C?f(t,s(P,t)):l(t,a(P,t))}else{if(!E[j])return O?t:{};P=y(t,j,R)}}T||(T=new n);var N=T.get(t);if(N)return N;T.set(t,P),S(t)?t.forEach((function(n){P.add(e(n,r,x,n,t,T))})):w(t)&&t.forEach((function(n,o){P.set(o,e(n,r,x,o,t,T))}));var U=I?C?p:h:C?keysIn:k,L=B?void 0:U(t);return o(L||t,(function(n,o){L&&(n=t[o=n]),i(P,o,e(n,r,x,o,t,T))})),P}},function(e,t,r){var n=r(30),o=r(31);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(30),o=r(26);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(30),o=r(75);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(30),o=r(135);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(114),o=r(135),i=r(26);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(85),o=r(314),i=r(315),a=r(316),s=r(136);e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Set]":return new u;case"[object Symbol]":return a(e)}}},function(e,t,r){var n=r(85);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(18),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(319),o=r(68),i=r(69),a=i&&i.isMap,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(42),o=r(12);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},function(e,t,r){var n=r(321),o=r(68),i=r(69),a=i&&i.isSet,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(42),o=r(12);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},function(e,t,r){var n=r(323),o=r(78),i=r(131),a=r(83),s=r(139),u=r(132),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/s(t)));return a(t)?i(u(l),0,e).join(""):l.slice(0,e)}},function(e,t){var r=Math.floor;e.exports=function(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=r(t/2))&&(e+=e)}while(t);return n}},function(e,t,r){var n=r(121)("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]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,a,s,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});var n=r(327);Object.defineProperty(t,"manageSellOffer",{enumerable:!0,get:function(){return n.manageSellOffer}});var o=r(328);Object.defineProperty(t,"createPassiveSellOffer",{enumerable:!0,get:function(){return o.createPassiveSellOffer}});var i=r(329);Object.defineProperty(t,"accountMerge",{enumerable:!0,get:function(){return i.accountMerge}});var a=r(330);Object.defineProperty(t,"allowTrust",{enumerable:!0,get:function(){return a.allowTrust}});var s=r(331);Object.defineProperty(t,"bumpSequence",{enumerable:!0,get:function(){return s.bumpSequence}});var u=r(332);Object.defineProperty(t,"changeTrust",{enumerable:!0,get:function(){return u.changeTrust}});var c=r(333);Object.defineProperty(t,"createAccount",{enumerable:!0,get:function(){return c.createAccount}});var l=r(334);Object.defineProperty(t,"createClaimableBalance",{enumerable:!0,get:function(){return l.createClaimableBalance}});var f=r(141);Object.defineProperty(t,"claimClaimableBalance",{enumerable:!0,get:function(){return f.claimClaimableBalance}});var h=r(335);Object.defineProperty(t,"clawbackClaimableBalance",{enumerable:!0,get:function(){return h.clawbackClaimableBalance}});var p=r(336);Object.defineProperty(t,"inflation",{enumerable:!0,get:function(){return p.inflation}});var d=r(337);Object.defineProperty(t,"manageData",{enumerable:!0,get:function(){return d.manageData}});var v=r(338);Object.defineProperty(t,"manageBuyOffer",{enumerable:!0,get:function(){return v.manageBuyOffer}});var y=r(339);Object.defineProperty(t,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return y.pathPaymentStrictReceive}});var m=r(340);Object.defineProperty(t,"pathPaymentStrictSend",{enumerable:!0,get:function(){return m.pathPaymentStrictSend}});var g=r(341);Object.defineProperty(t,"payment",{enumerable:!0,get:function(){return g.payment}});var b=r(342);Object.defineProperty(t,"setOptions",{enumerable:!0,get:function(){return b.setOptions}});var w=r(343);Object.defineProperty(t,"beginSponsoringFutureReserves",{enumerable:!0,get:function(){return w.beginSponsoringFutureReserves}});var _=r(344);Object.defineProperty(t,"endSponsoringFutureReserves",{enumerable:!0,get:function(){return _.endSponsoringFutureReserves}});var S=r(345);Object.defineProperty(t,"revokeAccountSponsorship",{enumerable:!0,get:function(){return S.revokeAccountSponsorship}}),Object.defineProperty(t,"revokeTrustlineSponsorship",{enumerable:!0,get:function(){return S.revokeTrustlineSponsorship}}),Object.defineProperty(t,"revokeOfferSponsorship",{enumerable:!0,get:function(){return S.revokeOfferSponsorship}}),Object.defineProperty(t,"revokeDataSponsorship",{enumerable:!0,get:function(){return S.revokeDataSponsorship}}),Object.defineProperty(t,"revokeClaimableBalanceSponsorship",{enumerable:!0,get:function(){return S.revokeClaimableBalanceSponsorship}}),Object.defineProperty(t,"revokeSignerSponsorship",{enumerable:!0,get:function(){return S.revokeSignerSponsorship}});var k=r(346);Object.defineProperty(t,"clawback",{enumerable:!0,get:function(){return k.clawback}});var E=r(347);Object.defineProperty(t,"setTrustLineFlags",{enumerable:!0,get:function(){return E.setTrustLineFlags}})},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),a={};return a.body=i.default.OperationBody.manageSellOffer(r),this.setSourceAccount(a,e),new i.default.Operation(a)};var n=a(r(7)),o=r(22),i=a(r(1));function a(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(7)),o=i(r(1));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountMerge=function(e){var t={};try{t.body=i.default.OperationBody.accountMerge((0,a.decodeAddressToMuxedAccount)(e.destination,e.withMuxing))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowTrust=function(e){if(!a.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.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var s=(0,n.default)(e.assetCode,12,"\0");t.asset=o.default.AssetCode.assetTypeCreditAlphanum12(s)}"boolean"==typeof e.authorize?e.authorize?t.authorize=o.default.TrustLineFlags.authorizedFlag().value:t.authorize=0: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=s(r(138)),o=s(r(1)),i=r(19),a=r(10);function s(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 a.default.BumpSequenceOp(t),s={};return s.body=a.default.OperationBody.bumpSequence(r),this.setSourceAccount(s,e),new a.default.Operation(s)};var n=r(22),o=s(r(23)),i=s(r(9)),a=s(r(1));function s(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("9223372036854775807").toString());e.source&&(t.source=e.source.masterKeypair);var r=new a.default.ChangeTrustOp(t),s={};return s.body=a.default.OperationBody.changeTrust(r),this.setSourceAccount(s,e),new a.default.Operation(s)};var n=s(r(7)),o=r(22),i=s(r(23)),a=s(r(1));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAccount=function(e){if(!s.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError("startingBalance must be of type String, represent a non-negative number and have at most 7 digits after the decimal");var t={};t.destination=a.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(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(19),s=r(10)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClaimableBalance=function(e){if(!(e.asset instanceof a.Asset))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=e.claimants.map((function(e){return e.toXDRObject()}));var r=new i.default.CreateClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(59)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.validateClaimableBalanceId)(e.balanceId);var t={balanceId:i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.default.OperationBody.clawbackClaimableBalance(new i.default.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(141)},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(1),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),a={};return a.body=o.default.OperationBody.manageData(i),this.setSourceAccount(a,t),new o.default.Operation(a)};var n=i(r(9)),o=i(r(1));function i(e){return e&&e.__esModule?e:{default:e}}}).call(this,r(0).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),a={};return a.body=i.default.OperationBody.manageBuyOffer(r),this.setSourceAccount(a,e),new i.default.Operation(a)};var n=a(r(7)),o=r(22),i=a(r(1));function a(e){return e&&e.__esModule?e:{default: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!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);try{t.destination=(0,a.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid")}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(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},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!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);try{t.destination=(0,a.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid")}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(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.payment=function(e){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={};try{t.destination=(0,a.decodeAddressToMuxedAccount)(e.destination,e.withMuxing)}catch(e){throw new Error("destination is invalid; did you forget to enable muxing?")}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(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.setOptions=function(t){var r={};if(t.inflationDest){if(!s.StrKey.isValidEd25519PublicKey(t.inflationDest))throw new Error("inflationDest is invalid");r.inflationDest=a.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(!s.StrKey.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var h=s.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.setOptions(p),this.setSourceAccount(d,t),new i.default.Operation(d)};var n=u(r(7)),o=u(r(9)),i=u(r(1)),a=r(19),s=r(10);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(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a.StrKey.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.default.BeginSponsoringFutureReservesOp({sponsoredId:s.Keypair.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.default.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(10),s=r(19)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=o.default.LedgerKey.account(new o.default.LedgerKeyAccount({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId()})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new o.default.Operation(n)},t.revokeTrustlineSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(!(e.asset instanceof s.Asset))throw new Error("asset is invalid");var t=o.default.LedgerKey.trustline(new o.default.LedgerKeyTrustLine({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),asset:e.asset.toXDRObject()})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new o.default.Operation(n)},t.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if(!(0,n.default)(e.offerId))throw new Error("offerId is invalid");var t=o.default.LedgerKey.offer(new o.default.LedgerKeyOffer({sellerId:a.Keypair.fromPublicKey(e.seller).xdrAccountId(),offerId:o.default.Int64.fromString(e.offerId)})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),s={};return s.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,e),new o.default.Operation(s)},t.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(!(0,n.default)(e.name)||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=o.default.LedgerKey.data(new o.default.LedgerKeyData({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),s={};return s.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,e),new o.default.Operation(s)},t.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(0,n.default)(e.balanceId))throw new Error("balanceId is invalid");var t=o.default.LedgerKey.claimableBalance(new o.default.LedgerKeyClaimableBalance({balanceId:o.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),i={};return i.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(i,e),new o.default.Operation(i)},t.revokeSignerSponsorship=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");var r=void 0;if(t.signer.ed25519PublicKey){if(!i.StrKey.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var s=i.StrKey.decodeEd25519PublicKey(t.signer.ed25519PublicKey);r=new o.default.SignerKey.signerKeyTypeEd25519(s)}else if(t.signer.preAuthTx){var u=void 0;if(u=(0,n.default)(t.signer.preAuthTx)?e.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!e.isBuffer(u)||32!==u.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new o.default.SignerKey.signerKeyTypePreAuthTx(u)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var c=void 0;if(c=(0,n.default)(t.signer.sha256Hash)?e.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!e.isBuffer(c)||32!==c.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new o.default.SignerKey.signerKeyTypeHashX(c)}var l=new o.default.RevokeSponsorshipOpSigner({accountId:a.Keypair.fromPublicKey(t.account).xdrAccountId(),signerKey:r}),f=o.default.RevokeSponsorshipOp.revokeSponsorshipSigner(l),h={};return h.body=o.default.OperationBody.revokeSponsorship(f),this.setSourceAccount(h,t),new o.default.Operation(h)};var n=u(r(9)),o=u(r(1)),i=r(10),a=r(19),s=r(59);function u(e){return e&&e.__esModule?e:{default:e}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clawback=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject(),t.from=(0,a.decodeAddressToMuxedAccount)(e.from);var r={body:i.default.OperationBody.clawback(new i.default.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},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};t.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==n(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be an map of boolean flags to modify");var r={authorized:a.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:a.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:a.default.TrustLineFlags.trustlineClawbackEnabledFlag()},o=0,i=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: "+t);var n=e.flags[t],a=r[t].value;!0===n?i|=a:!1===n&&(o|=a)})),t.trustor=s.Keypair.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=o,t.setFlags=i;var u={body:a.default.OperationBody.setTrustLineFlags(new a.default.SetTrustLineFlagsOp(t))};return this.setSourceAccount(u,e),new a.default.Operation(u)};var o,i=r(1),a=(o=i)&&o.__esModule?o:{default:o},s=r(19)},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=m;var o=r(22),i=d(r(23)),a=d(r(43)),s=d(r(7)),u=d(r(9)),c=d(r(1)),l=r(82),f=r(142),h=r(86),p=r(17);function d(e){return e&&e.__esModule?e:{default:e}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var y=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(v(this,e),!t)throw new Error("must specify source account for the transaction");if((0,s.default)(r.fee))throw new Error("must specify fee for the transaction (in nibbs)");this.source=t,this.operations=[],this.baseFee=(0,s.default)(r.fee)?y:r.fee,this.timebounds=(0,a.default)(r.timebounds)||null,this.memo=r.memo||h.Memo.none(),this.networkPassphrase=r.networkPassphrase||null,this.supportMuxedAccounts=r.withMuxing||!1}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(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}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"enableMuxedAccounts",value:function(){return this.supportMuxedAccounts=!0,this}},{key:"build",value:function(){var e=new i.default(this.source.sequenceNumber()).add(1),t={fee:new i.default(this.baseFee).mul(this.operations.length).toNumber(),seqNum:c.default.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");m(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),m(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 c.default.TimeBounds(this.timebounds),t.sourceAccount=(0,p.decodeAddressToMuxedAccount)(this.source.accountId(),this.supportMuxedAccounts),t.ext=new c.default.TransactionExt(0);var r=new c.default.Transaction(t);r.operations(this.operations);var n=new c.default.TransactionEnvelope.envelopeTypeTx(new c.default.TransactionV1Envelope({tx:r})),a=new l.Transaction(n,this.networkPassphrase,this.supportMuxedAccounts);return this.source.incrementSequenceNumber(),a}}],[{key:"buildFeeBumpTransaction",value:function(e,t,r,n,o){var a=r.operations.length,s=new i.default(r.fee).div(a),l=new i.default(t);if(l.lessThan(s))throw new Error("Invalid baseFee, it should be at least "+s+" nibbs.");var h=new i.default(y);if(l.lessThan(h))throw new Error("Invalid baseFee, it should be at least "+h+" nibbs.");var d=r.toEnvelope();if(d.switch()===c.default.EnvelopeType.envelopeTypeTxV0()){var v=d.v0().tx(),m=new c.default.Transaction({sourceAccount:new c.default.MuxedAccount.keyTypeEd25519(v.sourceAccountEd25519()),fee:v.fee(),seqNum:v.seqNum(),timeBounds:v.timeBounds(),memo:v.memo(),operations:v.operations(),ext:new c.default.TransactionExt(0)});d=new c.default.TransactionEnvelope.envelopeTypeTx(new c.default.TransactionV1Envelope({tx:m,signatures:d.v0().signatures()}))}var g=void 0;g=(0,u.default)(e)?(0,p.decodeAddressToMuxedAccount)(e,o):e.xdrMuxedAccount();var b=new c.default.FeeBumpTransaction({feeSource:g,fee:c.default.Int64.fromString(l.mul(a+1).toString()),innerTx:c.default.FeeBumpTransactionInnerTx.envelopeTypeTx(d.v1()),ext:new c.default.FeeBumpTransactionExt(0)}),w=new c.default.FeeBumpTransactionEnvelope({tx:b,signatures:[]}),_=new c.default.TransactionEnvelope.envelopeTypeTxFeeBump(w);return new f.FeeBumpTransaction(_,n,o)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=c.default.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===c.default.EnvelopeType.envelopeTypeTxFeeBump()?new f.FeeBumpTransaction(e,t):new l.Transaction(e,t)}}]),e}();function m(e){return e instanceof Date&&!isNaN(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MuxedAccount=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=c(r(9)),i=c(r(23)),a=c(r(1)),s=r(10),u=r(17);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.Account=function(){function e(t,r){if(l(this,e),s.StrKey.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!s.StrKey.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if(!(0,o.default)(r))throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new i.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)}},{key:"createSubaccount",value:function(e){return new h(this,e)}}]),e}(),h=t.MuxedAccount=function(){function e(t,r){l(this,e);var n=t.accountId();if(!s.StrKey.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=(0,u.decodeAddressToMuxedAccount)(n,!0),this._mAddress=(0,u.encodeMuxedAccountToAddress)(this._muxedXdr,!0),this.setId(r)}return n(e,[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if(!(0,o.default)(e))throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(a.default.Uint64.fromString(e)),this._mAddress=(0,u.encodeMuxedAccountToAddress)(this._muxedXdr,!0),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"createSubaccount",value:function(t){return new e(this.account,t)}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}],[{key:"fromAddress",value:function(t,r){var n=(0,u.decodeAddressToMuxedAccount)(t,!0),o=(0,u.encodeMuxedAccountToAddress)(n,!1),i=n.med25519().id().toString();return new e(new f(o,r),i)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Networks={PUBLIC:"LiveNet Global DigitalBits Network ; February 2021",TESTNET:"TestNet Global DigitalBits Network ; December 2020"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=t.SUBMIT_TRANSACTION_TIMEOUT=void 0;var n=r(2),o=n.__importDefault(r(23)),i=n.__importDefault(r(352)),a=n.__importDefault(r(353)),s=r(27),u=n.__importDefault(r(34)),c=r(6),l=r(60),f=r(33),h=r(403),p=r(91),d=r(404),v=r(405),y=r(406),m=r(407),g=r(408),b=r(409),w=r(410),_=r(411),S=r(412),k=r(413),E=r(414),x=r(415),A=r(416),O=r(417),T=n.__importStar(r(87));t.SUBMIT_TRANSACTION_TIMEOUT=6e4;function P(e){return new o.default(e).div(1e7).toString()}var R=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=a.default(n,e.headers),e})),"https"!==this.serverURL.protocol()&&!r)throw new Error("Cannot connect to insecure frontier 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,r){return void 0===r&&(r={skipMemoRequiredCheck:!1}),n.__awaiter(this,void 0,void 0,(function(){var i;return n.__generator(this,(function(n){switch(n.label){case 0:return r.skipMemoRequiredCheck?[3,2]:[4,this.checkMemoRequired(e)];case 1:n.sent(),n.label=2;case 2:return i=encodeURIComponent(e.toEnvelope().toXDR().toString("base64")),[2,T.default.post(u.default(this.serverURL).segment("transactions").toString(),"tx="+i,{timeout:t.SUBMIT_TRANSACTION_TIMEOUT}).then((function(e){if(!e.data.result_xdr)return e.data;var t,r,n=s.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),a=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),a=a.add(t);var n=s.Asset.fromOperation(e.assetSold()),u=s.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:s.StrKey.encodeEd25519PublicKey(e.sellerId().ed25519()),offerId:e.offerId().toString(),assetSold:c,amountSold:P(r),assetBought:l,amountBought:P(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:P(f.amount().toString()),price:{n:f.price().n(),d:f.price().d()}};var h=s.Asset.fromOperation(f.selling());n.selling={type:h.getAssetType(),assetCode:h.getCode(),issuer:h.getIssuer()};var p=s.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:P(i),amountSold:P(a),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.claimableBalances=function(){return new v.ClaimableBalanceCallBuilder(u.default(this.serverURL))},e.prototype.ledgers=function(){return new g.LedgerCallBuilder(u.default(this.serverURL))},e.prototype.transactions=function(){return new O.TransactionCallBuilder(u.default(this.serverURL))},e.prototype.offers=function(){return new b.OfferCallBuilder(u.default(this.serverURL))},e.prototype.orderbook=function(e,t){return new _.OrderbookCallBuilder(u.default(this.serverURL),e,t)},e.prototype.trades=function(){return new A.TradesCallBuilder(u.default(this.serverURL))},e.prototype.operations=function(){return new w.OperationCallBuilder(u.default(this.serverURL))},e.prototype.strictReceivePaths=function(e,t,r){return new k.StrictReceivePathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.strictSendPaths=function(e,t,r){return new E.StrictSendPathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.payments=function(){return new S.PaymentCallBuilder(u.default(this.serverURL))},e.prototype.effects=function(){return new y.EffectCallBuilder(u.default(this.serverURL))},e.prototype.friendbot=function(e){return new m.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 x.TradeAggregationCallBuilder(u.default(this.serverURL),e,t,r,n,o,i)},e.prototype.checkMemoRequired=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r,o,i,a;return n.__generator(this,(function(n){switch(n.label){case 0:if(e instanceof s.FeeBumpTransaction&&(e=e.innerTransaction),"none"!==e.memo.type)return[2];t=new Set,r=0,n.label=1;case 1:if(!(r<e.operations.length))return[3,6];switch((o=e.operations[r]).type){case"payment":case"pathPaymentStrictReceive":case"pathPaymentStrictSend":case"accountMerge":break;default:return[3,5]}if(i=o.destination,t.has(i))return[3,5];if(t.add(i),i.startsWith("M"))return[3,5];n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.loadAccount(i)];case 3:if("MQ=="===n.sent().data_attr["config.memo_required"])throw new f.AccountRequiresMemoError("account requires memo",i,r);return[3,5];case 4:if((a=n.sent())instanceof f.AccountRequiresMemoError)throw a;if(!(a instanceof f.NotFoundError))throw a;return[3,5];case 5:return r++,[3,1];case 6:return[2]}}))}))},e}();t.Server=R},function(e,t,r){var n=r(107),o=r(42),i=r(46),a=r(3),s=r(24),u=r(37),c=r(48),l=r(47),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(f.call(e,r))return!1;return!0}},function(e,t,r){var n=r(354),o=r(105)((function(e,t,r){n(e,t,r)}));e.exports=o},function(e,t,r){var n=r(51),o=r(143),i=r(64),a=r(355),s=r(18),u=r(26),c=r(144);e.exports=function e(t,r,l,f,h){t!==r&&i(r,(function(i,u){if(h||(h=new n),s(i))a(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(143),o=r(133),i=r(136),a=r(134),s=r(137),u=r(46),c=r(3),l=r(356),f=r(37),h=r(49),p=r(18),d=r(357),v=r(47),y=r(144),m=r(358);e.exports=function(e,t,r,g,b,w,_){var S=y(e,r),k=y(t,r),E=_.get(k);if(E)n(e,r,E);else{var x=w?w(S,k,r+"",e,t,_):void 0,A=void 0===x;if(A){var O=c(k),T=!O&&f(k),P=!O&&!T&&v(k);x=k,O||T||P?c(S)?x=S:l(S)?x=a(S):T?(A=!1,x=o(k,!0)):P?(A=!1,x=i(k,!0)):x=[]:d(k)||u(k)?(x=S,u(S)?x=m(S):p(S)&&!h(S)||(x=s(k))):A=!1}A&&(_.set(k,x),b(x,k,g,w,_),_.delete(k)),n(e,r,x)}}},function(e,t,r){var n=r(24),o=r(12);e.exports=function(e){return o(e)&&n(e)}},function(e,t,r){var n=r(20),o=r(84),i=r(12),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==l}},function(e,t,r){var n=r(30),o=r(26);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(a,s){"use strict";e.exports?e.exports=s(r(34)):(o=[r(34)],void 0===(i="function"==typeof(n=s)?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 a=o.prototype,s={"":{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,a,u=s[e.operator],c=u.named?"Named":"Unnamed",l=e.variables,f=[];for(a=0;i=l[a];a++){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,a){var s,u,c,l="",f=r.encode,h=r.empty_name_separator,p=!t[f].length,d=2===t.type?"":e[f](a);for(u=0,c=t.val.length;u<c;u++)i?(s=e[f](t.val[u][1].substring(0,i)),2===t.type&&(d=e[f](t.val[u][0].substring(0,i)))):p?(s=e[f](t.val[u][1]),2===t.type?(d=e[f](t.val[u][0]),t[f].push([d,s])):t[f].push([void 0,s])):(s=t[f][u][1],2===t.type&&(d=t[f][u][0])),l&&(l+=o),n?l+=d+(h||s?"=":"")+s:(u||(l+=e[f](a)+(h||s?"=":"")),2===t.type&&(l+=d+","),l+=s);return l},o.expandUnnamed=function(t,r,n,o,i){var a,s,u,c="",l=r.encode,f=r.empty_name_separator,h=!t[l].length;for(s=0,u=t.val.length;s<u;s++)i?a=e[l](t.val[s][1].substring(0,i)):h?(a=e[l](t.val[s][1]),t[l].push([2===t.type?e[l](t.val[s][0]):void 0,a])):a=t[l][s][1],c&&(c+=o),2===t.type&&(c+=i?e[l](t.val[s][0].substring(0,i)):t[l][s][0],c+=n?f||a?"=":"":","),c+=a;return c},o.noConflict=function(){return t.URITemplate===o&&(t.URITemplate=r),o},a.expand=function(e,t){var r="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var n=0,a=this.parts.length;n<a;n++)r+="string"==typeof this.parts[n]?this.parts[n]:o.expand(this.parts[n],e,t);return r},a.parse=function(){var e,t,r,n=this.expression,i=o.EXPRESSION_PATTERN,a=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,!s[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(a)))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,a={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=a,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 a;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]&&a.val.push([void 0,String(o[t])]);a.val.length&&(a.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]&&a.val.push([t,String(o[t])]);a.val.length&&(a.type=2)}else a.type=1,a.val.push([void 0,String(o)]);return a},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(11),o=r(148),i=r(362),a=r(154);function s(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=s(r(151));u.Axios=i,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(155),u.CancelToken=r(375),u.isCancel=r(150),u.all=function(e){return Promise.all(e)},u.spread=r(376),u.isAxiosError=r(377),e.exports=u,e.exports.default=u},function(e,t,r){"use strict";var n=r(11),o=r(149),i=r(363),a=r(364),s=r(154);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=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,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=s(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(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=u},function(e,t,r){"use strict";var n=r(11);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(11),o=r(365),i=r(150),a=r(151);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),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||a.adapter)(e).then((function(t){return s(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(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(11);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(11);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(153);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(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(11);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.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";var n=r(371),o=r(372);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},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(11),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,a={};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(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(11);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(155);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){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,r){(function(t,n){var o=r(379),i=r(88).parse,a=r(89),s=r(388),u=r(156),c=r(400),l=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],f=[239,187,191];function h(e,r){var a=h.CONNECTING;Object.defineProperty(this,"readyState",{get:function(){return a}}),Object.defineProperty(this,"url",{get:function(){return e}});var c,v=this;function y(t){a!==h.CLOSED&&(a=h.CONNECTING,k("error",new p("error",{message:t})),_&&(e=_,_=null),setTimeout((function(){a===h.CONNECTING&&S()}),v.reconnectInterval))}v.reconnectInterval=1e3;var m="";r&&r.headers&&r.headers["Last-Event-ID"]&&(m=r.headers["Last-Event-ID"],delete r.headers["Last-Event-ID"]);var g=!1,b="",w="",_=null;function S(){var o=i(e),d="https:"===o.protocol;if(o.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},m&&(o.headers["Last-Event-ID"]=m),r&&r.headers)for(var b in r.headers){var w=r.headers[b];w&&(o.headers[b]=w)}if(o.rejectUnauthorized=!(r&&!r.rejectUnauthorized),r&&r.proxy){var x=i(r.proxy);d="https:"===x.protocol,o.protocol=d?"https:":"http:",o.path=e,o.headers.Host=o.host,o.hostname=x.hostname,o.host=x.host,o.port=x.port}if(r&&r.https)for(var A in r.https)if(-1!==l.indexOf(A)){var O=r.https[A];void 0!==O&&(o[A]=O)}r&&void 0!==r.withCredentials&&(o.withCredentials=r.withCredentials),(c=(d?s:u).request(o,(function(r){if(500===r.statusCode||502===r.statusCode||503===r.statusCode||504===r.statusCode)return k("error",new p("error",{status:r.statusCode,message:r.statusMessage})),void y();if(301===r.statusCode||307===r.statusCode)return r.headers.location?(307===r.statusCode&&(_=e),e=r.headers.location,void t.nextTick(S)):void k("error",new p("error",{status:r.statusCode,message:r.statusMessage}));if(200!==r.statusCode)return k("error",new p("error",{status:r.statusCode,message:r.statusMessage})),v.close();a=h.OPEN,r.on("close",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),y()})),r.on("end",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),y()})),k("open",new p("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;){g&&(10===o[t]&&++t,g=!1);for(var a,s=-1,u=-1,c=t;s<0&&c<r;++c)58===(a=o[c])?u<0&&(u=c-t):13===a?(g=!0,s=c-t):10===a&&(s=c-t);if(s<0)break;E(o,t,u,s),t+=s+1}t===r?o=void 0:t>0&&(o=o.slice(t))}))}))).on("error",(function(e){y(e.message)})),c.setNoDelay&&c.setNoDelay(!0),c.end()}function k(){v.listeners(arguments[0]).length>0&&v.emit.apply(v,arguments)}function E(t,r,n,i){if(0===i){if(b.length>0){var a=w||"message";k(a,new d(a,{data:b.slice(0,-1),lastEventId:m,origin:o(e)})),b=""}w=void 0}else if(n>0){var s=n<0,u=0,c=t.slice(r,r+(s?i:n)).toString();r+=u=s?i:32!==t[r+n+1]?n+1:n+2;var l=i-u,f=t.slice(r,r+l).toString();if("data"===c)b+=f+"\n";else if("event"===c)w=f;else if("id"===c)m=f;else if("retry"===c){var h=parseInt(f,10);Number.isNaN(h)||(v.reconnectInterval=h)}}}S(),this._close=function(){a!==h.CLOSED&&(a=h.CLOSED,c.abort&&c.abort(),c.xhr&&c.xhr.abort&&c.xhr.abort())}}function p(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 d(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=h,c.inherits(h,a.EventEmitter),h.prototype.constructor=h,["open","error","message"].forEach((function(e){Object.defineProperty(h.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(h,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(h,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(h,"CLOSED",{enumerable:!0,value:2}),h.prototype.CONNECTING=0,h.prototype.OPEN=1,h.prototype.CLOSED=2,h.prototype.close=function(){this._close()},h.prototype.addEventListener=function(e,t){"function"==typeof t&&(t._listener=t,this.on(e,t))},h.prototype.dispatchEvent=function(e){if(!e.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(e.type,e.detail)},h.prototype.removeEventListener=function(e,t){"function"==typeof t&&(t._listener=void 0,this.removeListener(e,t))}}).call(this,r(13),r(0).Buffer)},function(e,t,r){"use strict";var n=r(380);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(381),o=r(382),i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,s=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(s,"")}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={},a=typeof(e=e||n);if("blob:"===e.protocol)o=new p(unescape(e.pathname),{});else if("string"===a)for(r in o=new p(e,{}),l)delete o[r];else if("object"===a){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=a.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,a,s,l,d,v,y=c.slice(),m=typeof t,g=this,b=0;for("object"!==m&&"string"!==m&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),t=f(t),i=!(a=h(e||"")).protocol&&!a.slashes,g.slashes=a.slashes||i&&t.slashes,g.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(y[3]=[/(.*)/,"pathname"]);b<y.length;b++)"function"!=typeof(l=y[b])?(s=l[0],v=l[1],s!=s?g[v]=e:"string"==typeof s?~(d=e.indexOf(s))&&("number"==typeof l[2]?(g[v]=e.slice(0,d),e=e.slice(d+l[2])):(g[v]=e.slice(d),e=e.slice(0,d))):(d=s.exec(e))&&(g[v]=d[1],e=e.slice(0,d.index)),g[v]=g[v]||i&&l[3]&&t[v]||"",l[4]&&(g[v]=g[v].toLowerCase())):e=l(e);r&&(g.query=r(g.query)),i&&t.slashes&&"/"!==g.pathname.charAt(0)&&(""!==g.pathname||""!==t.pathname)&&(g.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,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(g.pathname,t.pathname)),n(g.port,g.protocol)||(g.host=g.hostname,g.port=""),g.username=g.password="",g.auth&&(l=g.auth.split(":"),g.username=l[0]||"",g.password=l[1]||""),g.origin=g.protocol&&g.host&&"file:"!==g.protocol?g.protocol+"//"+g.host:"null",g.href=g.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 a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;default:i[e]=t}for(var s=0;s<c.length;s++){var u=c[s];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=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,i=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=encodeURIComponent(o),r=encodeURIComponent(r),null===o||null===r)continue;i.push(o+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,n={};t=r.exec(e);){var i=o(t[1]),a=o(t[2]);null===i||null===a||i in n||(n[i]=a)}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 a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function v(e){throw new RangeError(h[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function g(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 b(e){return y(e,(function(e){var t="";return e>65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=d(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function S(e){var t,r,n,o,i,a,s,c,l,f,h,d=[],y=e.length,m=0,g=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),d.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<y;){for(i=m,a=1,s=36;o>=y&&v("invalid-input"),((c=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>p((u-m)/a))&&v("overflow"),m+=c*a,!(c<(l=s<=w?1:s>=w+26?26:s-w));s+=36)a>p(u/(f=36-l))&&v("overflow"),a*=f;w=_(m-i,t=d.length+1,0==i),p(m/t)>u-g&&v("overflow"),g+=p(m/t),m%=t,d.splice(m++,0,g)}return b(d)}function k(e){var t,r,n,o,i,a,s,c,l,f,h,y,m,b,S,k=[];for(y=(e=g(e)).length,t=128,r=0,i=72,a=0;a<y;++a)(h=e[a])<128&&k.push(d(h));for(n=o=k.length,o&&k.push("-");n<y;){for(s=u,a=0;a<y;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>p((u-r)/(m=n+1))&&v("overflow"),r+=(s-t)*m,t=s,a=0;a<y;++a)if((h=e[a])<t&&++r>u&&v("overflow"),h==t){for(c=r,l=36;!(c<(f=l<=i?1:l>=i+26?26:l-i));l+=36)S=c-f,b=36-f,k.push(d(w(f+S%b,0))),c=p(S/b);k.push(d(w(c,0))),i=_(r,m,n==o),r=0,++n}++r,++t}return k.join("")}s={version:"1.4.1",ucs2:{decode:g,encode:b},decode:S,encode:k,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return m(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(38)(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(386),t.encode=t.stringify=r(387)},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 a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/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,v=e[l].replace(s,"%20"),y=v.indexOf(r);y>=0?(f=v.substr(0,y),h=v.substr(y+1)):(f=v,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(a,p)?o(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};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,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+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 a=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(156),o=r(88),i=e.exports;for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);function s(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=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},function(e,t,r){(function(t,n,o){var i=r(157),a=r(8),s=r(158),u=r(159),c=r(397),l=s.IncomingMessage,f=s.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()}))};a(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,a=e._headers,s=null;"GET"!==r.method&&"HEAD"!==r.method&&(s=i.arraybuffer?c(t.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return c(e)})),{type:(a["content-type"]||{}).value||""}):t.concat(e._body).toString());var u=[];if(Object.keys(a).forEach((function(e){var t=a[e].name,r=a[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:s||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(s)}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(0).Buffer,r(5),r(13))},function(e,t){},function(e,t,r){"use strict";var n=r(90).Buffer,o=r(392);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),a=this.head,s=0;a;)t=a.data,r=i,o=s,t.copy(r,o),s+=a.data.length,a=a.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){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(394),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){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,o,i,a,s,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)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+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,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(13))},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){"use strict";e.exports=i;var n=r(165),o=Object.create(r(44));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}o.inherits=r(8),o.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n=r(0).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){(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(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,a=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])v(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},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,a={};function s(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),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return m(o)||(o=l(e,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return f(r)}var c,w="",E=!1,x=["{","}"];(p(r)&&(E=!0,x=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+f(r)),0!==a.length||E&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=E?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)T(t,String(a))?i.push(h(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,r,n,o,!0))})),i}(e,r,n,s,a):a.map((function(t){return h(e,r,n,s,t,E)})),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,w,x)):x[0]+w+x[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===E(e)}function S(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function k(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else a[r]=function(){};return a[r]},t.inspect=s,s.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]},s.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=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=b,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,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(401);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=r(402),t._extend=function(e,t){if(!t||!w(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,a=function(){return o.apply(i,arguments)};t.apply(this,r).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(R,t,a)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(13))},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,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountCallBuilder=void 0;var n=r(2),o=r(6),i=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){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forSigner=function(e){return this.url.setQuery("signer",e),this},t.prototype.forAsset=function(e){return this.url.setQuery("asset",""+e),this},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t}(o.CallBuilder);t.AccountCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssetsCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.AssetsCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClaimableBalanceCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("claimable_balances"),r}return n.__extends(t,e),t.prototype.claimableBalance=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t.prototype.claimant=function(e){return this.url.setQuery("claimant",e),this},t.prototype.asset=function(e){return this.url.setQuery("asset",e.toString()),this},t}(o.CallBuilder);t.ClaimableBalanceCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffectCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.EffectCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FriendbotBuilder=void 0;var n=r(2),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(6).CallBuilder);t.FriendbotBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.LedgerCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OfferCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("offers"),r}return n.__extends(t,e),t.prototype.offer=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"offers"]),this},t.prototype.buying=function(e){return e.isNative()?this.url.setQuery("buying_asset_type","native"):(this.url.setQuery("buying_asset_type",e.getAssetType()),this.url.setQuery("buying_asset_code",e.getCode()),this.url.setQuery("buying_asset_issuer",e.getIssuer())),this},t.prototype.selling=function(e){return e.isNative()?this.url.setQuery("selling_asset_type","native"):(this.url.setQuery("selling_asset_type",e.getAssetType()),this.url.setQuery("selling_asset_code",e.getCode()),this.url.setQuery("selling_asset_issuer",e.getIssuer())),this},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t}(o.CallBuilder);t.OfferCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationCallBuilder=void 0;var n=r(2),o=r(6),i=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){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"operations"]),this},t.prototype.forClaimableBalance=function(e){return this.filter.push(["claimable_balances",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}(o.CallBuilder);t.OperationCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderbookCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.OrderbookCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.PaymentCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StrictReceivePathCallBuilder=void 0;var n=r(2),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 a=r.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("source_assets",a)}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(6).CallBuilder);t.StrictReceivePathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StrictSendPathCallBuilder=void 0;var n=r(2),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 a=o.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("destination_assets",a)}return i}return n.__extends(t,e),t}(r(6).CallBuilder);t.StrictSendPathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TradeAggregationCallBuilder=void 0;var n=r(2),o=r(6),i=r(33),a=[6e4,3e5,9e5,36e5,864e5,6048e5],s=function(e){function t(t,r,n,o,a,s,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 a)throw new i.BadRequestError("Invalid time bounds",[o,a]);if(c.url.setQuery("start_time",o.toString()),c.url.setQuery("end_time",a.toString()),!c.isValidResolution(s))throw new i.BadRequestError("Invalid resolution",s);if(c.url.setQuery("resolution",s.toString()),!c.isValidOffset(u,s))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=a;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=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TradesCallBuilder=void 0;var n=r(2),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(6).CallBuilder);t.TradesCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionCallBuilder=void 0;var n=r(2),o=r(6),i=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){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.filter.push(["accounts",e,"transactions"]),this},t.prototype.forClaimableBalance=function(e){return this.filter.push(["claimable_balances",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}(o.CallBuilder);t.TransactionCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FederationServer=t.FEDERATION_RESPONSE_MAX_SIZE=void 0;var n=r(2),o=n.__importDefault(r(61)),i=r(27),a=n.__importDefault(r(34)),s=r(60),u=r(33),c=r(166);t.FEDERATION_RESPONSE_MAX_SIZE=102400;var l=function(){function e(e,t,r){void 0===r&&(r={}),this.serverURL=a.default(e),this.domain=t;var n=void 0===r.allowHttp?s.Config.isAllowHttp():r.allowHttp;if(this.timeout=void 0===r.timeout?s.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,a;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("*"),a=o[1],2===o.length&&a?[4,e.createForDomain(a,r)]:[2,Promise.reject(new Error("Invalid DigitalBits 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.DigitalBitsTomlResolver.resolve(t,r)];case 1:return(o=n.sent()).FEDERATION_SERVER?[2,new e(o.FEDERATION_SERVER,t,r)]:[2,Promise.reject(new Error("digitalbits.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*livenet.digitalbits.io`) 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(420),o=r(421);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},a=jt,s=function(){return Pr},u=o,c="#",l={type:"literal",value:"#",description:'"#"'},f=void 0,h={type:"any",description:"any character"},p="[",d={type:"literal",value:"[",description:'"["'},v="]",y={type:"literal",value:"]",description:'"]"'},m=function(e){Cr(Ir("ObjectPath",e,Pt,Rt))},g=function(e){Cr(Ir("ArrayPath",e,Pt,Rt))},b=function(e,t){return e.concat(t)},w=function(e){return[e]},_=function(e){return e},S=".",k={type:"literal",value:".",description:'"."'},E="=",x={type:"literal",value:"=",description:'"="'},A=function(e,t){Cr(Ir("Assign",t,Pt,Rt,e))},O=function(e){return e.join("")},T=function(e){return e.value},P='"""',R={type:"literal",value:'"""',description:'"\\"\\"\\""'},C=null,I=function(e){return Ir("String",e.join(""),Pt,Rt)},B='"',j={type:"literal",value:'"',description:'"\\""'},M="'''",N={type:"literal",value:"'''",description:"\"'''\""},U="'",L={type:"literal",value:"'",description:'"\'"'},D=function(e){return e},F=function(e){return e},q="\\",V={type:"literal",value:"\\",description:'"\\\\"'},K=function(){return""},z="e",H={type:"literal",value:"e",description:'"e"'},X="E",Q={type:"literal",value:"E",description:'"E"'},Y=function(e,t){return Ir("Float",parseFloat(e+"e"+t),Pt,Rt)},W=function(e){return Ir("Float",parseFloat(e),Pt,Rt)},G="+",$={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 Ir("Integer",parseInt(e,10),Pt,Rt)},ne="true",oe={type:"literal",value:"true",description:'"true"'},ie=function(){return Ir("Boolean",!0,Pt,Rt)},ae="false",se={type:"literal",value:"false",description:'"false"'},ue=function(){return Ir("Boolean",!1,Pt,Rt)},ce=function(){return Ir("Array",[],Pt,Rt)},le=function(e){return Ir("Array",e?[e]:[],Pt,Rt)},fe=function(e){return Ir("Array",e,Pt,Rt)},he=function(e,t){return Ir("Array",e.concat(t),Pt,Rt)},pe=function(e){return e},de=",",ve={type:"literal",value:",",description:'","'},ye="{",me={type:"literal",value:"{",description:'"{"'},ge="}",be={type:"literal",value:"}",description:'"}"'},we=function(e){return Ir("InlineTable",e,Pt,Rt)},_e=function(e,t){return Ir("InlineTableValue",t,Pt,Rt,e)},Se=function(e){return"."+e},ke=function(e){return e.join("")},Ee=":",xe={type:"literal",value:":",description:'":"'},Ae=function(e){return e.join("")},Oe="T",Te={type:"literal",value:"T",description:'"T"'},Pe="Z",Re={type:"literal",value:"Z",description:'"Z"'},Ce=function(e,t){return Ir("Date",new Date(e+"T"+t+"Z"),Pt,Rt)},Ie=function(e,t){return Ir("Date",new Date(e+"T"+t),Pt,Rt)},Be=/^[ \t]/,je={type:"class",value:"[ \\t]",description:"[ \\t]"},Me="\n",Ne={type:"literal",value:"\n",description:'"\\n"'},Ue="\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]/,Ve={type:"class",value:"[0-9]",description:"[0-9]"},Ke="_",ze={type:"literal",value:"_",description:'"_"'},He=function(){return""},Xe=/^[A-Za-z0-9_\-]/,Qe={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},Ye=function(e){return e.join("")},We='\\"',Ge={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"'},at=function(){return"\t"},st="\\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"'},vt=function(){return"\r"},yt="\\U",mt={type:"literal",value:"\\U",description:'"\\\\U"'},gt=function(e){return Br(e.join(""))},bt="\\u",wt={type:"literal",value:"\\u",description:'"\\\\u"'},_t=0,St=0,kt=0,Et={line:1,column:1,seenCR:!1},xt=0,At=[],Ot=0,Tt={};if("startRule"in n){if(!(n.startRule in i))throw new Error("Can't start parsing from rule \""+n.startRule+'".');a=i[n.startRule]}function Pt(){return Ct(St).line}function Rt(){return Ct(St).column}function Ct(e){return kt!==e&&(kt>e&&(kt=0,Et={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)}(Et,kt,e),kt=e),Et}function It(e){_t<xt||(_t>xt&&(xt=_t,At=[]),At.push(e))}function Bt(r,n,o){var i=Ct(o),a=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,a),n,a,o,i.line,i.column)}function jt(){var e,t,r,n=49*_t+0,i=Tt[n];if(i)return _t=i.nextPos,i.result;for(e=_t,t=[],r=Mt();r!==o;)t.push(r),r=Mt();return t!==o&&(St=e,t=s()),e=t,Tt[n]={nextPos:_t,result:e},e}function Mt(){var e,t,r,n,i,a,s,c=49*_t+1,l=Tt[c];if(l)return _t=l.nextPos,l.result;for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=Nt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o){for(i=[],a=Ut();a!==o;)i.push(a),a=Ut();if(i!==o){if(a=[],(s=wr())!==o)for(;s!==o;)a.push(s),s=wr();else a=u;a===o&&(a=Sr()),a!==o?e=t=[t,r,n,i,a]:(_t=e,e=u)}else _t=e,e=u}else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){if(e=_t,t=[],(r=br())!==o)for(;r!==o;)t.push(r),r=br();else t=u;if(t!==o){if(r=[],(n=wr())!==o)for(;n!==o;)r.push(n),n=wr();else r=u;r===o&&(r=Sr()),r!==o?e=t=[t,r]:(_t=e,e=u)}else _t=e,e=u;e===o&&(e=wr())}return Tt[c]={nextPos:_t,result:e},e}function Nt(){var e,t=49*_t+2,r=Tt[t];return r?(_t=r.nextPos,r.result):((e=Ut())===o&&(e=Lt())===o&&(e=Dt())===o&&(e=Kt()),Tt[t]={nextPos:_t,result:e},e)}function Ut(){var e,r,n,i,a,s,p=49*_t+3,d=Tt[p];if(d)return _t=d.nextPos,d.result;if(e=_t,35===t.charCodeAt(_t)?(r=c,_t++):(r=o,0===Ot&&It(l)),r!==o){for(n=[],i=_t,a=_t,Ot++,(s=wr())===o&&(s=Sr()),Ot--,s===o?a=f:(_t=a,a=u),a!==o?(t.length>_t?(s=t.charAt(_t),_t++):(s=o,0===Ot&&It(h)),s!==o?i=a=[a,s]:(_t=i,i=u)):(_t=i,i=u);i!==o;)n.push(i),i=_t,a=_t,Ot++,(s=wr())===o&&(s=Sr()),Ot--,s===o?a=f:(_t=a,a=u),a!==o?(t.length>_t?(s=t.charAt(_t),_t++):(s=o,0===Ot&&It(h)),s!==o?i=a=[a,s]:(_t=i,i=u)):(_t=i,i=u);n!==o?e=r=[r,n]:(_t=e,e=u)}else _t=e,e=u;return Tt[p]={nextPos:_t,result:e},e}function Lt(){var e,r,n,i,a,s,c=49*_t+4,l=Tt[c];if(l)return _t=l.nextPos,l.result;if(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if((i=Ft())!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o?(93===t.charCodeAt(_t)?(s=v,_t++):(s=o,0===Ot&&It(y)),s!==o?(St=e,e=r=m(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;return Tt[c]={nextPos:_t,result:e},e}function Dt(){var e,r,n,i,a,s,c,l,f=49*_t+5,h=Tt[f];if(h)return _t=h.nextPos,h.result;if(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o)if(91===t.charCodeAt(_t)?(n=p,_t++):(n=o,0===Ot&&It(d)),n!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if((a=Ft())!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(93===t.charCodeAt(_t)?(c=v,_t++):(c=o,0===Ot&&It(y)),c!==o?(93===t.charCodeAt(_t)?(l=v,_t++):(l=o,0===Ot&&It(y)),l!==o?(St=e,e=r=g(a)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;return Tt[f]={nextPos:_t,result:e},e}function Ft(){var e,t,r,n=49*_t+6,i=Tt[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=Vt())!==o)for(;r!==o;)t.push(r),r=Vt();else t=u;return t!==o&&(r=qt())!==o?(St=e,e=t=b(t,r)):(_t=e,e=u),e===o&&(e=_t,(t=qt())!==o&&(St=e,t=w(t)),e=t),Tt[n]={nextPos:_t,result:e},e}function qt(){var e,t,r,n,i,a=49*_t+7,s=Tt[a];if(s)return _t=s.nextPos,s.result;for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=zt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();n!==o?(St=e,e=t=_(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=Ht())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();n!==o?(St=e,e=t=_(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}return Tt[a]={nextPos:_t,result:e},e}function Vt(){var e,r,n,i,a,s,c,l=49*_t+8,f=Tt[l];if(f)return _t=f.nextPos,f.result;for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(St=e,e=r=_(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=Ht())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(St=e,e=r=_(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}return Tt[l]={nextPos:_t,result:e},e}function Kt(){var e,r,n,i,a,s,c=49*_t+9,l=Tt[c];if(l)return _t=l.nextPos,l.result;if(e=_t,(r=zt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if(61===t.charCodeAt(_t)?(i=E,_t++):(i=o,0===Ot&&It(x)),i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o&&(s=Xt())!==o?(St=e,e=r=A(r,s)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;if(e===o)if(e=_t,(r=Ht())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if(61===t.charCodeAt(_t)?(i=E,_t++):(i=o,0===Ot&&It(x)),i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o&&(s=Xt())!==o?(St=e,e=r=A(r,s)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;return Tt[c]={nextPos:_t,result:e},e}function zt(){var e,t,r,n=49*_t+10,i=Tt[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=xr())!==o)for(;r!==o;)t.push(r),r=xr();else t=u;return t!==o&&(St=e,t=O(t)),e=t,Tt[n]={nextPos:_t,result:e},e}function Ht(){var e,t,r=49*_t+11,n=Tt[r];return n?(_t=n.nextPos,n.result):(e=_t,(t=Wt())!==o&&(St=e,t=T(t)),(e=t)===o&&(e=_t,(t=$t())!==o&&(St=e,t=T(t)),e=t),Tt[r]={nextPos:_t,result:e},e)}function Xt(){var e,t=49*_t+12,r=Tt[t];return r?(_t=r.nextPos,r.result):((e=Qt())===o&&(e=gr())===o&&(e=nr())===o&&(e=ir())===o&&(e=sr())===o&&(e=ur())===o&&(e=hr()),Tt[t]={nextPos:_t,result:e},e)}function Qt(){var e,t=49*_t+13,r=Tt[t];return r?(_t=r.nextPos,r.result):((e=Yt())===o&&(e=Wt())===o&&(e=Gt())===o&&(e=$t()),Tt[t]={nextPos:_t,result:e},e)}function Yt(){var e,r,n,i,a,s=49*_t+14,c=Tt[s];if(c)return _t=c.nextPos,c.result;if(e=_t,t.substr(_t,3)===P?(r=P,_t+=3):(r=o,0===Ot&&It(R)),r!==o)if((n=wr())===o&&(n=C),n!==o){for(i=[],a=er();a!==o;)i.push(a),a=er();i!==o?(t.substr(_t,3)===P?(a=P,_t+=3):(a=o,0===Ot&&It(R)),a!==o?(St=e,e=r=I(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Tt[s]={nextPos:_t,result:e},e}function Wt(){var e,r,n,i,a=49*_t+15,s=Tt[a];if(s)return _t=s.nextPos,s.result;if(e=_t,34===t.charCodeAt(_t)?(r=B,_t++):(r=o,0===Ot&&It(j)),r!==o){for(n=[],i=Zt();i!==o;)n.push(i),i=Zt();n!==o?(34===t.charCodeAt(_t)?(i=B,_t++):(i=o,0===Ot&&It(j)),i!==o?(St=e,e=r=I(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Tt[a]={nextPos:_t,result:e},e}function Gt(){var e,r,n,i,a,s=49*_t+16,c=Tt[s];if(c)return _t=c.nextPos,c.result;if(e=_t,t.substr(_t,3)===M?(r=M,_t+=3):(r=o,0===Ot&&It(N)),r!==o)if((n=wr())===o&&(n=C),n!==o){for(i=[],a=rr();a!==o;)i.push(a),a=rr();i!==o?(t.substr(_t,3)===M?(a=M,_t+=3):(a=o,0===Ot&&It(N)),a!==o?(St=e,e=r=I(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Tt[s]={nextPos:_t,result:e},e}function $t(){var e,r,n,i,a=49*_t+17,s=Tt[a];if(s)return _t=s.nextPos,s.result;if(e=_t,39===t.charCodeAt(_t)?(r=U,_t++):(r=o,0===Ot&&It(L)),r!==o){for(n=[],i=Jt();i!==o;)n.push(i),i=Jt();n!==o?(39===t.charCodeAt(_t)?(i=U,_t++):(i=o,0===Ot&&It(L)),i!==o?(St=e,e=r=I(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Tt[a]={nextPos:_t,result:e},e}function Zt(){var e,r,n,i=49*_t+18,a=Tt[i];return a?(_t=a.nextPos,a.result):((e=Or())===o&&(e=_t,r=_t,Ot++,34===t.charCodeAt(_t)?(n=B,_t++):(n=o,0===Ot&&It(j)),Ot--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Ot&&It(h)),n!==o?(St=e,e=r=D(n)):(_t=e,e=u)):(_t=e,e=u)),Tt[i]={nextPos:_t,result:e},e)}function Jt(){var e,r,n,i=49*_t+19,a=Tt[i];return a?(_t=a.nextPos,a.result):(e=_t,r=_t,Ot++,39===t.charCodeAt(_t)?(n=U,_t++):(n=o,0===Ot&&It(L)),Ot--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Ot&&It(h)),n!==o?(St=e,e=r=D(n)):(_t=e,e=u)):(_t=e,e=u),Tt[i]={nextPos:_t,result:e},e)}function er(){var e,r,n,i=49*_t+20,a=Tt[i];return a?(_t=a.nextPos,a.result):((e=Or())===o&&(e=tr())===o&&(e=_t,r=_t,Ot++,t.substr(_t,3)===P?(n=P,_t+=3):(n=o,0===Ot&&It(R)),Ot--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Ot&&It(h)),n!==o?(St=e,e=r=F(n)):(_t=e,e=u)):(_t=e,e=u)),Tt[i]={nextPos:_t,result:e},e)}function tr(){var e,r,n,i,a=49*_t+21,s=Tt[a];if(s)return _t=s.nextPos,s.result;if(e=_t,92===t.charCodeAt(_t)?(r=q,_t++):(r=o,0===Ot&&It(V)),r!==o)if(wr()!==o){for(n=[],i=_r();i!==o;)n.push(i),i=_r();n!==o?(St=e,e=r=K()):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Tt[a]={nextPos:_t,result:e},e}function rr(){var e,r,n,i=49*_t+22,a=Tt[i];return a?(_t=a.nextPos,a.result):(e=_t,r=_t,Ot++,t.substr(_t,3)===M?(n=M,_t+=3):(n=o,0===Ot&&It(N)),Ot--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Ot&&It(h)),n!==o?(St=e,e=r=D(n)):(_t=e,e=u)):(_t=e,e=u),Tt[i]={nextPos:_t,result:e},e)}function nr(){var e,r,n,i,a=49*_t+23,s=Tt[a];return s?(_t=s.nextPos,s.result):(e=_t,(r=or())===o&&(r=ar()),r!==o?(101===t.charCodeAt(_t)?(n=z,_t++):(n=o,0===Ot&&It(H)),n===o&&(69===t.charCodeAt(_t)?(n=X,_t++):(n=o,0===Ot&&It(Q))),n!==o&&(i=ar())!==o?(St=e,e=r=Y(r,i)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,(r=or())!==o&&(St=e,r=W(r)),e=r),Tt[a]={nextPos:_t,result:e},e)}function or(){var e,r,n,i,a,s,c=49*_t+24,l=Tt[c];return l?(_t=l.nextPos,l.result):(e=_t,43===t.charCodeAt(_t)?(r=G,_t++):(r=o,0===Ot&&It($)),r===o&&(r=C),r!==o?(n=_t,(i=Ar())!==o?(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),a!==o&&(s=Ar())!==o?n=i=[i,a,s]:(_t=n,n=u)):(_t=n,n=u),n!==o?(St=e,e=r=Z(n)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,45===t.charCodeAt(_t)?(r=J,_t++):(r=o,0===Ot&&It(ee)),r!==o?(n=_t,(i=Ar())!==o?(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),a!==o&&(s=Ar())!==o?n=i=[i,a,s]:(_t=n,n=u)):(_t=n,n=u),n!==o?(St=e,e=r=te(n)):(_t=e,e=u)):(_t=e,e=u)),Tt[c]={nextPos:_t,result:e},e)}function ir(){var e,t,r=49*_t+25,n=Tt[r];return n?(_t=n.nextPos,n.result):(e=_t,(t=ar())!==o&&(St=e,t=re(t)),e=t,Tt[r]={nextPos:_t,result:e},e)}function ar(){var e,r,n,i,a,s=49*_t+26,c=Tt[s];if(c)return _t=c.nextPos,c.result;if(e=_t,43===t.charCodeAt(_t)?(r=G,_t++):(r=o,0===Ot&&It($)),r===o&&(r=C),r!==o){if(n=[],(i=Er())!==o)for(;i!==o;)n.push(i),i=Er();else n=u;n!==o?(i=_t,Ot++,46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),Ot--,a===o?i=f:(_t=i,i=u),i!==o?(St=e,e=r=Z(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o)if(e=_t,45===t.charCodeAt(_t)?(r=J,_t++):(r=o,0===Ot&&It(ee)),r!==o){if(n=[],(i=Er())!==o)for(;i!==o;)n.push(i),i=Er();else n=u;n!==o?(i=_t,Ot++,46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Ot&&It(k)),Ot--,a===o?i=f:(_t=i,i=u),i!==o?(St=e,e=r=te(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Tt[s]={nextPos:_t,result:e},e}function sr(){var e,r,n=49*_t+27,i=Tt[n];return i?(_t=i.nextPos,i.result):(e=_t,t.substr(_t,4)===ne?(r=ne,_t+=4):(r=o,0===Ot&&It(oe)),r!==o&&(St=e,r=ie()),(e=r)===o&&(e=_t,t.substr(_t,5)===ae?(r=ae,_t+=5):(r=o,0===Ot&&It(se)),r!==o&&(St=e,r=ue()),e=r),Tt[n]={nextPos:_t,result:e},e)}function ur(){var e,r,n,i,a,s=49*_t+28,c=Tt[s];if(c)return _t=c.nextPos,c.result;if(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o){for(n=[],i=fr();i!==o;)n.push(i),i=fr();n!==o?(93===t.charCodeAt(_t)?(i=v,_t++):(i=o,0===Ot&&It(y)),i!==o?(St=e,e=r=ce()):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o&&(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o?((n=cr())===o&&(n=C),n!==o?(93===t.charCodeAt(_t)?(i=v,_t++):(i=o,0===Ot&&It(y)),i!==o?(St=e,e=r=le(n)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u),e===o)){if(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o){if(n=[],(i=lr())!==o)for(;i!==o;)n.push(i),i=lr();else n=u;n!==o?(93===t.charCodeAt(_t)?(i=v,_t++):(i=o,0===Ot&&It(y)),i!==o?(St=e,e=r=fe(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o)if(e=_t,91===t.charCodeAt(_t)?(r=p,_t++):(r=o,0===Ot&&It(d)),r!==o){if(n=[],(i=lr())!==o)for(;i!==o;)n.push(i),i=lr();else n=u;n!==o&&(i=cr())!==o?(93===t.charCodeAt(_t)?(a=v,_t++):(a=o,0===Ot&&It(y)),a!==o?(St=e,e=r=he(n,i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u}return Tt[s]={nextPos:_t,result:e},e}function cr(){var e,t,r,n,i,a=49*_t+29,s=Tt[a];if(s)return _t=s.nextPos,s.result;for(e=_t,t=[],r=fr();r!==o;)t.push(r),r=fr();if(t!==o)if((r=Xt())!==o){for(n=[],i=fr();i!==o;)n.push(i),i=fr();n!==o?(St=e,e=t=pe(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Tt[a]={nextPos:_t,result:e},e}function lr(){var e,r,n,i,a,s,c,l=49*_t+30,f=Tt[l];if(f)return _t=f.nextPos,f.result;for(e=_t,r=[],n=fr();n!==o;)r.push(n),n=fr();if(r!==o)if((n=Xt())!==o){for(i=[],a=fr();a!==o;)i.push(a),a=fr();if(i!==o)if(44===t.charCodeAt(_t)?(a=de,_t++):(a=o,0===Ot&&It(ve)),a!==o){for(s=[],c=fr();c!==o;)s.push(c),c=fr();s!==o?(St=e,e=r=pe(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;return Tt[l]={nextPos:_t,result:e},e}function fr(){var e,t=49*_t+31,r=Tt[t];return r?(_t=r.nextPos,r.result):((e=br())===o&&(e=wr())===o&&(e=Ut()),Tt[t]={nextPos:_t,result:e},e)}function hr(){var e,r,n,i,a,s,c=49*_t+32,l=Tt[c];if(l)return _t=l.nextPos,l.result;if(e=_t,123===t.charCodeAt(_t)?(r=ye,_t++):(r=o,0===Ot&&It(me)),r!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o){for(i=[],a=pr();a!==o;)i.push(a),a=pr();if(i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o?(125===t.charCodeAt(_t)?(s=ge,_t++):(s=o,0===Ot&&It(be)),s!==o?(St=e,e=r=we(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u}else _t=e,e=u}else _t=e,e=u;return Tt[c]={nextPos:_t,result:e},e}function pr(){var e,r,n,i,a,s,c,l,f,h,p,d=49*_t+33,v=Tt[d];if(v)return _t=v.nextPos,v.result;for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(61===t.charCodeAt(_t)?(a=E,_t++):(a=o,0===Ot&&It(x)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();if(s!==o)if((c=Xt())!==o){for(l=[],f=br();f!==o;)l.push(f),f=br();if(l!==o)if(44===t.charCodeAt(_t)?(f=de,_t++):(f=o,0===Ot&&It(ve)),f!==o){for(h=[],p=br();p!==o;)h.push(p),p=br();h!==o?(St=e,e=r=_e(n,c)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(61===t.charCodeAt(_t)?(a=E,_t++):(a=o,0===Ot&&It(x)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o&&(c=Xt())!==o?(St=e,e=r=_e(n,c)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}return Tt[d]={nextPos:_t,result:e},e}function dr(){var e,r,n,i=49*_t+34,a=Tt[i];return a?(_t=a.nextPos,a.result):(e=_t,46===t.charCodeAt(_t)?(r=S,_t++):(r=o,0===Ot&&It(k)),r!==o&&(n=Ar())!==o?(St=e,e=r=Se(n)):(_t=e,e=u),Tt[i]={nextPos:_t,result:e},e)}function vr(){var e,r,n,i,a,s,c,l,f,h,p,d,v=49*_t+35,y=Tt[v];return y?(_t=y.nextPos,y.result):(e=_t,r=_t,(n=Er())!==o&&(i=Er())!==o&&(a=Er())!==o&&(s=Er())!==o?(45===t.charCodeAt(_t)?(c=J,_t++):(c=o,0===Ot&&It(ee)),c!==o&&(l=Er())!==o&&(f=Er())!==o?(45===t.charCodeAt(_t)?(h=J,_t++):(h=o,0===Ot&&It(ee)),h!==o&&(p=Er())!==o&&(d=Er())!==o?r=n=[n,i,a,s,c,l,f,h,p,d]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=ke(r)),e=r,Tt[v]={nextPos:_t,result:e},e)}function yr(){var e,r,n,i,a,s,c,l,f,h,p,d=49*_t+36,v=Tt[d];return v?(_t=v.nextPos,v.result):(e=_t,r=_t,(n=Er())!==o&&(i=Er())!==o?(58===t.charCodeAt(_t)?(a=Ee,_t++):(a=o,0===Ot&&It(xe)),a!==o&&(s=Er())!==o&&(c=Er())!==o?(58===t.charCodeAt(_t)?(l=Ee,_t++):(l=o,0===Ot&&It(xe)),l!==o&&(f=Er())!==o&&(h=Er())!==o?((p=dr())===o&&(p=C),p!==o?r=n=[n,i,a,s,c,l,f,h,p]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=Ae(r)),e=r,Tt[d]={nextPos:_t,result:e},e)}function mr(){var e,r,n,i,a,s,c,l,f,h,p,d,v,y,m,g,b,w=49*_t+37,_=Tt[w];return _?(_t=_.nextPos,_.result):(e=_t,r=_t,(n=Er())!==o&&(i=Er())!==o?(58===t.charCodeAt(_t)?(a=Ee,_t++):(a=o,0===Ot&&It(xe)),a!==o&&(s=Er())!==o&&(c=Er())!==o?(58===t.charCodeAt(_t)?(l=Ee,_t++):(l=o,0===Ot&&It(xe)),l!==o&&(f=Er())!==o&&(h=Er())!==o?((p=dr())===o&&(p=C),p!==o?(45===t.charCodeAt(_t)?(d=J,_t++):(d=o,0===Ot&&It(ee)),d===o&&(43===t.charCodeAt(_t)?(d=G,_t++):(d=o,0===Ot&&It($))),d!==o&&(v=Er())!==o&&(y=Er())!==o?(58===t.charCodeAt(_t)?(m=Ee,_t++):(m=o,0===Ot&&It(xe)),m!==o&&(g=Er())!==o&&(b=Er())!==o?r=n=[n,i,a,s,c,l,f,h,p,d,v,y,m,g,b]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=Ae(r)),e=r,Tt[w]={nextPos:_t,result:e},e)}function gr(){var e,r,n,i,a,s=49*_t+38,c=Tt[s];return c?(_t=c.nextPos,c.result):(e=_t,(r=vr())!==o?(84===t.charCodeAt(_t)?(n=Oe,_t++):(n=o,0===Ot&&It(Te)),n!==o&&(i=yr())!==o?(90===t.charCodeAt(_t)?(a=Pe,_t++):(a=o,0===Ot&&It(Re)),a!==o?(St=e,e=r=Ce(r,i)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,(r=vr())!==o?(84===t.charCodeAt(_t)?(n=Oe,_t++):(n=o,0===Ot&&It(Te)),n!==o&&(i=mr())!==o?(St=e,e=r=Ie(r,i)):(_t=e,e=u)):(_t=e,e=u)),Tt[s]={nextPos:_t,result:e},e)}function br(){var e,r=49*_t+39,n=Tt[r];return n?(_t=n.nextPos,n.result):(Be.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Ot&&It(je)),Tt[r]={nextPos:_t,result:e},e)}function wr(){var e,r,n,i=49*_t+40,a=Tt[i];return a?(_t=a.nextPos,a.result):(10===t.charCodeAt(_t)?(e=Me,_t++):(e=o,0===Ot&&It(Ne)),e===o&&(e=_t,13===t.charCodeAt(_t)?(r=Ue,_t++):(r=o,0===Ot&&It(Le)),r!==o?(10===t.charCodeAt(_t)?(n=Me,_t++):(n=o,0===Ot&&It(Ne)),n!==o?e=r=[r,n]:(_t=e,e=u)):(_t=e,e=u)),Tt[i]={nextPos:_t,result:e},e)}function _r(){var e,t=49*_t+41,r=Tt[t];return r?(_t=r.nextPos,r.result):((e=wr())===o&&(e=br()),Tt[t]={nextPos:_t,result:e},e)}function Sr(){var e,r,n=49*_t+42,i=Tt[n];return i?(_t=i.nextPos,i.result):(e=_t,Ot++,t.length>_t?(r=t.charAt(_t),_t++):(r=o,0===Ot&&It(h)),Ot--,r===o?e=f:(_t=e,e=u),Tt[n]={nextPos:_t,result:e},e)}function kr(){var e,r=49*_t+43,n=Tt[r];return n?(_t=n.nextPos,n.result):(De.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Ot&&It(Fe)),Tt[r]={nextPos:_t,result:e},e)}function Er(){var e,r,n=49*_t+44,i=Tt[n];return i?(_t=i.nextPos,i.result):(qe.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Ot&&It(Ve)),e===o&&(e=_t,95===t.charCodeAt(_t)?(r=Ke,_t++):(r=o,0===Ot&&It(ze)),r!==o&&(St=e,r=He()),e=r),Tt[n]={nextPos:_t,result:e},e)}function xr(){var e,r=49*_t+45,n=Tt[r];return n?(_t=n.nextPos,n.result):(Xe.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Ot&&It(Qe)),Tt[r]={nextPos:_t,result:e},e)}function Ar(){var e,t,r,n=49*_t+46,i=Tt[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=Er())!==o)for(;r!==o;)t.push(r),r=Er();else t=u;return t!==o&&(St=e,t=Ye(t)),e=t,Tt[n]={nextPos:_t,result:e},e}function Or(){var e,r,n=49*_t+47,i=Tt[n];return i?(_t=i.nextPos,i.result):(e=_t,t.substr(_t,2)===We?(r=We,_t+=2):(r=o,0===Ot&&It(Ge)),r!==o&&(St=e,r=$e()),(e=r)===o&&(e=_t,t.substr(_t,2)===Ze?(r=Ze,_t+=2):(r=o,0===Ot&&It(Je)),r!==o&&(St=e,r=et()),(e=r)===o&&(e=_t,t.substr(_t,2)===tt?(r=tt,_t+=2):(r=o,0===Ot&&It(rt)),r!==o&&(St=e,r=nt()),(e=r)===o&&(e=_t,t.substr(_t,2)===ot?(r=ot,_t+=2):(r=o,0===Ot&&It(it)),r!==o&&(St=e,r=at()),(e=r)===o&&(e=_t,t.substr(_t,2)===st?(r=st,_t+=2):(r=o,0===Ot&&It(ut)),r!==o&&(St=e,r=ct()),(e=r)===o&&(e=_t,t.substr(_t,2)===lt?(r=lt,_t+=2):(r=o,0===Ot&&It(ft)),r!==o&&(St=e,r=ht()),(e=r)===o&&(e=_t,t.substr(_t,2)===pt?(r=pt,_t+=2):(r=o,0===Ot&&It(dt)),r!==o&&(St=e,r=vt()),(e=r)===o&&(e=Tr()))))))),Tt[n]={nextPos:_t,result:e},e)}function Tr(){var e,r,n,i,a,s,c,l,f,h,p,d=49*_t+48,v=Tt[d];return v?(_t=v.nextPos,v.result):(e=_t,t.substr(_t,2)===yt?(r=yt,_t+=2):(r=o,0===Ot&&It(mt)),r!==o?(n=_t,(i=kr())!==o&&(a=kr())!==o&&(s=kr())!==o&&(c=kr())!==o&&(l=kr())!==o&&(f=kr())!==o&&(h=kr())!==o&&(p=kr())!==o?n=i=[i,a,s,c,l,f,h,p]:(_t=n,n=u),n!==o?(St=e,e=r=gt(n)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,t.substr(_t,2)===bt?(r=bt,_t+=2):(r=o,0===Ot&&It(wt)),r!==o?(n=_t,(i=kr())!==o&&(a=kr())!==o&&(s=kr())!==o&&(c=kr())!==o?n=i=[i,a,s,c]:(_t=n,n=u),n!==o?(St=e,e=r=gt(n)):(_t=e,e=u)):(_t=e,e=u)),Tt[d]={nextPos:_t,result:e},e)}var Pr=[];function Rr(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}function Cr(e){Pr.push(e)}function Ir(e,t,r,n,o){var i={type:e,value:t,line:r(),column:n()};return o&&(i.key=o),i}function Br(e,t,r){var n=parseInt("0x"+e);if(!(!isFinite(n)||Math.floor(n)!=n||n<0||n>1114111||n>55295&&n<57344))return jr(n);Rr("Invalid Unicode escape code: "+e,t,r)}function jr(){var e,t,r=16384,n=[],o=-1,i=arguments.length;if(!i)return"";for(var a="";++o<i;){var s=Number(arguments[o]);s<=65535?n.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,n.push(e,t)),(o+1==i||n.length>r)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a}if((r=a())!==o&&_t===t.length)return r;throw r!==o&&_t<t.length&&It({type:"end",description:"end of input"}),Bt(null,At,xt)}}}()},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":s(t);break;case"ObjectPath":l(t);break;case"ArrayPath":f(t)}return o}(e);function a(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}function s(e){var o,s=e.key,l=e.value,f=e.line,h=e.column;o=n?n+"."+s:s,void 0!==i[s]&&a("Cannot redefine existing key '"+o+"'.",f,h),i[s]=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&&a("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,s=r.map(p).join("."),c=e.line,l=e.column;u(s)&&a("Cannot redefine existing key '"+r+"'.",c,l),t.push(s),i=h(o,r,{},c,l),n=r}function f(e){var r=e.value,s=r.map(p).join("."),c=e.line,l=e.column;if(u(s)||t.push(s),(t=t.filter((function(e){return 0!==e.indexOf(s)}))).push(s),i=h(o,r,[],c,l),n=s,i instanceof Array){var f={};i.push(f),i=f}else a("Cannot redefine existing key '"+r+"'.",c,l)}function h(e,t,n,o,i){for(var s=[],u="",c=(t.join("."),e),l=0;l<t.length;l++){var f=t[l];s.push(f),u=s.join("."),void 0===c[f]?l===t.length-1?c[f]=n:c[f]={}:l!==t.length-1&&r.indexOf(u)>-1&&a("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}),t.Utils=void 0;var n=r(2),o=n.__importDefault(r(43)),i=n.__importDefault(r(423)),a=r(27),s=r(33);!function(t){function r(t,r,n,o,i){var u;if(r.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");var c=a.TransactionBuilder.fromXDR(t,n);if(!(c instanceof a.Transaction))throw new s.InvalidSep10ChallengeError("Invalid challenge: expected a Transaction but received a FeeBumpTransaction");if(0!==Number.parseInt(c.sequence,10))throw new s.InvalidSep10ChallengeError("The transaction sequence number should be zero");if(c.source!==r)throw new s.InvalidSep10ChallengeError("The transaction source account is not equal to the server's account");if(c.operations.length<1)throw new s.InvalidSep10ChallengeError("The transaction should contain at least one operation");var l=c.operations,f=l[0],h=l.slice(1);if(!f.source)throw new s.InvalidSep10ChallengeError("The transaction's operation should contain a source account");var p,d=f.source;if("manageData"!==f.type)throw new s.InvalidSep10ChallengeError("The transaction's operation type should be 'manageData'");if(c.timeBounds&&Number.parseInt(null===(u=c.timeBounds)||void 0===u?void 0:u.maxTime,10)===a.TimeoutInfinite)throw new s.InvalidSep10ChallengeError("The transaction requires non-infinite timebounds");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)}(c))throw new s.InvalidSep10ChallengeError("The transaction has expired");if(void 0===f.value)throw new s.InvalidSep10ChallengeError("The transaction's operation values should not be null");if(!f.value)throw new s.InvalidSep10ChallengeError("The transaction's operation value should not be null");if(48!==e.from(f.value.toString(),"base64").length)throw new s.InvalidSep10ChallengeError("The transaction's operation value should be a 64 bytes base64 random string");if(!o)throw new s.InvalidSep10ChallengeError("Invalid homeDomains: a home domain must be provided for verification");if("string"==typeof o)o+" auth"===f.name&&(p=o);else{if(!Array.isArray(o))throw new s.InvalidSep10ChallengeError("Invalid homeDomains: homeDomains type is "+typeof o+" but should be a string or an array");p=o.find((function(e){return e+" auth"===f.name}))}if(!p)throw new s.InvalidSep10ChallengeError("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");for(var v=0,y=h;v<y.length;v++){var m=y[v];if("manageData"!==m.type)throw new s.InvalidSep10ChallengeError("The transaction has operations that are not of type 'manageData'");if(m.source!==r)throw new s.InvalidSep10ChallengeError("The transaction has operations that are unrecognized");if("web_auth_domain"===m.name){if(void 0===m.value)throw new s.InvalidSep10ChallengeError("'web_auth_domain' operation value should not be null");if(m.value.compare(e.from(i)))throw new s.InvalidSep10ChallengeError("'web_auth_domain' operation value does not match "+i)}}return{tx:c,clientAccountID:d,matchedHomeDomain:p}}function u(e,t,o,i,u,l){var f,h=r(e,t,o,u,l).tx;try{f=a.Keypair.fromPublicKey(t)}catch(e){throw new Error("Couldn't infer keypair from the provided 'serverAccountID': "+e.message)}for(var p=new Set,d=0,v=i;d<v.length;d++){var y=v[d];y!==f.publicKey()&&("G"===y.charAt(0)&&p.add(y))}if(0===p.size)throw new s.InvalidSep10ChallengeError("No verifiable client signers provided, at least one G... address must be provided");var m=c(h,n.__spreadArrays([f.publicKey()],Array.from(p)));if(-1===m.indexOf(f.publicKey()))throw new s.InvalidSep10ChallengeError("Transaction not signed by server: '"+f.publicKey()+"'");if(1===m.length)throw new s.InvalidSep10ChallengeError("None of the given signers match the transaction signatures");if(m.length!==h.signatures.length)throw new s.InvalidSep10ChallengeError("Transaction has unrecognized signatures");return m.splice(m.indexOf(f.publicKey()),1),m}function c(e,t){for(var r=e.hash(),n=o.default(e.signatures),i=new Set,u=0,c=t;u<c.length;u++){var l=c[u];if(0===n.length)break;var f=void 0;try{f=a.Keypair.fromPublicKey(l)}catch(e){throw new s.InvalidSep10ChallengeError("Signer is not a valid address: "+e.message)}for(var h=0;h<n.length;h++){var p=n[h];if(p.hint().equals(f.signatureHint())&&f.verify(r,p.signature())){i.add(l),n.splice(h,1);break}}}return Array.from(i)}t.buildChallengeTx=function(e,t,r,n,o,s){if(void 0===n&&(n=300),t.startsWith("M"))throw Error("Invalid clientAccountID: multiplexed accounts are not supported.");var u=new a.Account(e.publicKey(),"-1"),c=Math.floor(Date.now()/1e3),l=i.default(48).toString("base64"),f=new a.TransactionBuilder(u,{fee:a.BASE_FEE,networkPassphrase:o,timebounds:{minTime:c,maxTime:c+n}}).addOperation(a.Operation.manageData({name:r+" auth",value:l,source:t})).addOperation(a.Operation.manageData({name:"web_auth_domain",value:s,source:u.accountId()})).build();return f.sign(e),f.toEnvelope().toXDR("base64").toString()},t.readChallengeTx=r,t.verifyChallengeTxThreshold=function(e,t,r,n,o,i,a){for(var c,l=u(e,t,r,o.map((function(e){return e.key})),i,a),f=0,h=function(e){var t=(null===(c=o.find((function(t){return t.key===e})))||void 0===c?void 0:c.weight)||0;f+=t},p=0,d=l;p<d.length;p++){h(d[p])}if(f<n)throw new s.InvalidSep10ChallengeError("signers with weight "+f+" do not meet threshold "+n+'"');return l},t.verifyChallengeTxSigners=u,t.verifyTxSignedBy=function(e,t){return 0!==c(e,[t]).length},t.gatherTxSigners=c}(t.Utils||(t.Utils={}))}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t,n){var o=r(21).Buffer,i=t.crypto||t.msCrypto;i&&i.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)i.getRandomValues(r.slice(a,a+65536));else i.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(13))}]);